/* Infostat Konto — the one stylesheet (plans/sprint-infostat-konto.md Phase 4, IK11).
 *
 * Infostat's own neutral look, not a product's brand: paper, ink and one quiet blue. A serif for
 * headings, the system sans for everything a person reads or types. No script, no web font, no
 * image but the logo — the CSP allows 'self' styles and images only.
 *
 * Breakpoint: the house compact boundary (docs/reference/CODING_PATTERNS.md §Breakpoints) —
 * max-width 599.98px / min-width 600px. Works from 320px with a 16px gutter.
 */

:root {
  --paper: #f6f4ef;
  --sheet: #ffffff;
  --ink: #1c2026;
  --ink-soft: #4d5560;
  --rule: #e2ded6;
  --rule-strong: #a9a399;
  --accent: #1f4b6e;
  --accent-deep: #163a56;
  --accent-wash: #eef3f7;
  --error: #9a2a2a;
  --error-wash: #fbf2f1;
  --notice-wash: #f4f2ed;
  --focus: #2f6fa3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
  font-kerning: normal;
  overflow-wrap: break-word;
}

/* -- frame ---------------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 35rem;
  margin: 0 auto;
  padding: 0 16px;
}

.wide .wrap {
  max-width: 43rem;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 1;
  padding: 0.5rem 0.75rem;
  background: var(--sheet);
}

.masthead {
  padding: 32px 0 0;
}

.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand {
  display: block;
  flex: none;
  width: 33px;
  height: 32px;
}

.product {
  min-width: 0;
  margin: 0;
  padding-left: 0.9rem;
  border-left: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.3;
}

main {
  flex: 1 0 auto;
  padding: 28px 0 40px;
}

.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 40px 44px 36px;
}

.colophon {
  padding: 0 0 32px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.colophon p {
  margin: 0 0 0.2rem;
}

.colophon a {
  color: inherit;
}

/* -- type ----------------------------------------------------------------------------------- */
.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  margin: 0 0 0.85rem;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.3125rem;
  line-height: 1.25;
}

p {
  margin: 0 0 1rem;
}

.lead {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.lead strong,
.address {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-deep);
}

/* -- notices -------------------------------------------------------------------------------- */
.notice {
  margin: 0 0 1.5rem;
  padding: 0.7rem 0.95rem;
  border-left: 3px solid var(--rule-strong);
  background: var(--notice-wash);
  color: var(--ink);
}

.notice.error {
  border-left-color: var(--error);
  background: var(--error-wash);
  color: var(--error);
}

/* -- forms ---------------------------------------------------------------------------------- */
form {
  margin: 0;
}

.field {
  margin: 0 0 1.35rem;
}

label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.optional {
  color: var(--ink-soft);
  font-weight: 400;
}

.hint {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

input[type="email"],
input[type="text"],
input[type="tel"] {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* never below 16px: iOS would zoom */
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}

input[type="email"]:hover,
input[type="text"]:hover,
input[type="tel"]:hover {
  border-color: var(--ink-soft);
}

input[aria-invalid="true"] {
  border-color: var(--error);
}

input.code-input {
  max-width: 12.5rem;
  padding: 0.6rem 0.8rem;
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3em;
}

.pair {
  display: grid;
  gap: 0 1rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  font-weight: 400;
}

.check input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.2rem 0 0;
  accent-color: var(--accent);
}

.check label {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.button {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
  font: 600 1rem/1.25 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
  color: #ffffff;
}

.button.quiet {
  background: var(--sheet);
  color: var(--accent);
}

.button.quiet:hover {
  background: var(--accent-wash);
  color: var(--accent-deep);
}

.linklike {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.linklike:hover {
  color: var(--accent-deep);
}

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

input:focus-visible {
  border-color: var(--accent);
  outline-offset: 1px;
}

.after {
  margin: 2rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.after p {
  margin: 0 0 0.6rem;
}

.after > p:last-child {
  margin: 0;
}

.small {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* -- the account page ----------------------------------------------------------------------- */
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.45rem 1.75rem;
  margin: 0 0 0.5rem;
}

.facts dt {
  color: var(--ink-soft);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ledger {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.ledger li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.ledger .name {
  display: block;
  font-weight: 600;
}

.ledger .meta {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  vertical-align: 0.15em;
  white-space: nowrap;
}

.services a {
  font-weight: 600;
  text-decoration: none;
}

.services a:hover {
  text-decoration: underline;
}

.services .meta {
  overflow-wrap: anywhere;
}

.mono {
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

/* -- bands (docs/reference/CODING_PATTERNS.md §Breakpoints) --------------------------------- */
@media (min-width: 600px) {
  .pair {
    grid-template-columns: 1fr 1fr;
  }

  .actions {
    display: flex;
    gap: 0.75rem;
  }

  .actions .button {
    width: auto;
  }
}

@media (max-width: 599.98px) {
  .masthead {
    padding-top: 20px;
  }

  main {
    padding: 20px 0 28px;
  }

  .sheet {
    padding: 28px 20px 24px;
  }

  h1 {
    font-size: 1.6875rem;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .facts dd {
    margin: 0 0 0.6rem;
  }
}
