
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100dvh;
  line-height: 1.5;
  padding: 0;
  margin: 0;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 5em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

:root {
  --color-bg: #ffffff;
  --color-text: #444;
  --color-silver: #cdcaca;
  --color-blue: #004772;
  --color-blue-light: #0c5e90;
  --color-red: #d65563;
  --color-gold: #bc9c62;
  --color-matrix: #a2a59c;
  --color-cyan: #0092bb;
  --color-cyan-focus: #00abd2;
  --color-white: #fff;
  --color-charcoal: #383838;
}

/* Utilities */

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.my-0 { margin-block: 0; }
.m-0 { margin: 0; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, sans-serif;
  font-weight: normal;
  display: flex;
  flex-direction: column;
}

.navbar {
  border-top: 4px solid var(--color-blue);
  margin: 0;
  padding: 1rem;
}

.navbar__title {
  font-size: 1.5rem;
  margin: 0;
  color: var(--color-text);
}

.form {
  padding: 1rem;
}

.form--auth {
  padding: 1rem;
  width: calc(min(460px, 100%));
  margin-inline: auto;
  border-radius: 4px;
  margin-top: 2rem;
}

.form__title {
  margin-block: 0rem 1rem;
  font-size: 1.5rem;
}

.form__field {
  margin-bottom: 1rem;

  & label {
    display: block;
    margin-bottom: 0.5rem;
  }
}

::placeholder {
  color: var(--color-text);
  opacity: 0.5; /* Firefox */
}

input[type=email], input[type=password] {
  width: 100%;
  outline: none;
  border: 2px solid var(--color-silver);
  border-radius: 4px;
  padding: 0.5rem;
  background-color: var(--color-bg);
  color: var(--color-text);
}

input[type=email]:focus, input[type=password]:focus {
  outline: none;
  border: 2px solid var(--color-cyan-focus);
}

button[type=submit] {
  background-color: var(--color-cyan);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--color-white);
}

button[type=submit]:hover {
  background-color: var(--color-cyan-focus);
  cursor: pointer;
}

textarea {
  outline: none;
  border: 2px solid var(--color-silver);
  border-radius: 4px;
  padding: 0.5rem;
  background-color: var(--color-bg);
  color: var(--color-text);
}

textarea:focus {
  border: 2px solid var(--color-cyan-focus);
}


.container {
  padding: 1rem;
  flex-grow: 1;
  margin-inline: auto;
  max-width: 720px;
}


.footer {
  display: flex;
  justify-content: space-between;
  background-color: var(--color-charcoal);
  padding: 1rem;
  color: var(--color-silver);
}


/* Posts */

.post {
  border-radius: 4px;
  padding: 0.25rem;
  margin-block: 0.5rem;
}
