/* The ertechin design: black and white only, 2px lines, square, flat, and still. */
:root {
  color-scheme: only light;
  --ink: #000;
  --paper: #fff;
  --font-sans: ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Base */

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Paints autofilled fields white again; the inset shadow is not visible as a shadow. */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
  -webkit-text-fill-color: var(--ink);
}

.mono {
  font-family: var(--font-mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Components */

.box {
  border: 2px solid var(--ink);
  background: var(--paper);
}

.box-header {
  padding: 12px 24px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.button:hover {
  background: var(--paper);
  color: var(--ink);
}

.chip {
  display: inline-block;
  padding: 4px 8px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.chip:hover,
.chip[aria-current] {
  background: var(--ink);
  color: var(--paper);
}

.label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.field {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.field::placeholder {
  color: transparent;
}

textarea.field {
  resize: vertical;
}

.flash,
.flash-alert {
  width: 100%;
  max-width: 448px;
  margin: 0 auto;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.flash-alert {
  background: var(--ink);
  color: var(--paper);
}

.text-link {
  padding: 0 4px;
}

.text-link:hover {
  background: var(--ink);
  color: var(--paper);
}

/* App shell */

.site-header {
  border-bottom: 2px solid var(--ink);
}

.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  max-width: 1024px;
  margin: 0 auto;
  padding: 16px;
}

.locale-nav {
  display: flex;
  gap: 8px;
}

.wordmark {
  padding-left: 0.4em;
  font-size: 14px;
  line-height: 20px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4em;
}

.site-header-contact {
  justify-self: end;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 48px 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.site-footer {
  border-top: 2px solid var(--ink);
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 1024px;
  margin: 0 auto;
  padding: 32px 16px;
  text-align: center;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  font-size: 12px;
  line-height: 16px;
}

.site-footer-dash {
  display: none;
}

.site-footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@media (min-width: 640px) {
  .site-footer-dash {
    display: inline;
  }
}

@media (min-width: 768px) {
  .site-footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Message form */

.card {
  width: 100%;
  max-width: 448px;
  margin: 0 auto;
}

.card-body {
  padding: 24px;
}

.check-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

.field-label {
  display: block;
  margin-bottom: 8px;
}

.field-number {
  font-family: var(--font-mono);
  text-align: center;
}

/* Scores: one ledger row per category; a value at or above the threshold is inverted like a badge. */

.ledger {
  display: grid;
  gap: 2px;
  background: var(--ink);
}

.score {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--paper);
}

.score-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.score-number {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
}

.score-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.score-value {
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.score-over .score-value {
  background: var(--ink);
  color: var(--paper);
}

.score-bar {
  position: relative;
  display: block;
  height: 16px;
  border: 2px solid var(--ink);
}

.score-fill {
  display: block;
  height: 100%;
  max-width: 100%;
  background: var(--ink);
}

.score-threshold {
  position: absolute;
  top: -8px;
  bottom: -8px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
}
