/* Home Papers by Noxe. Ruled-table layout in Inter Tight and Plex Mono; ledger blue ink on cool paper. */
@font-face { font-family: 'Inter Tight'; src: url('../fonts/InterTight-var.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/IBMPlexMono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/IBMPlexMono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #F8F9FB; --ink: #1B4A85; --ink2: #3F5F8A; --tint: #E2E8EF; --rule: #1B4A85;
  --btn: #1B4A85; --on-btn: #FFFFFF; --now: #A3321A; --soon: #7A5200;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1118; --ink: #9CC3F2; --ink2: #8CAAD0; --tint: #232D3B; --rule: #9CC3F2;
    --btn: #9CC3F2; --on-btn: #08192E; --now: #FF9E80; --soon: #E6BE5A;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--sans); min-height: 100vh; }
h1, h2, h3 { font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
h1 { font-size: 40px; font-weight: 400; letter-spacing: -.04em; line-height: 1; overflow-wrap: anywhere; } h2 { font-size: 22px; } h3 { font-size: 18px; }
p { margin: 0 0 12px; }
a { color: var(--ink); text-underline-offset: 3px; }
.muted { color: var(--ink2); }
.small { font-size: 15px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--btn); color: var(--on-btn); padding: 12px 16px; border-radius: 14px; z-index: 50; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn { font: 600 17px/1.2 var(--sans); min-height: 48px; padding: 12px 18px; border-radius: 14px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; gap: 10px; }
.btn:hover { background: var(--tint); }
.btn.main { min-height: 64px; background: var(--btn); color: var(--on-btn); border-color: var(--btn); font-size: 22px; font-weight: 700; }
.btn.main:hover { background: var(--btn); filter: brightness(1.1); }
.btn.quiet { border-color: transparent; }
.btn.danger { color: var(--now); border-color: var(--now); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg, .tab svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* app shell */
.top { max-width: 720px; margin: 0 auto; padding: 18px 18px 0; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 19px/1 var(--sans); letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
main.app-main { max-width: 720px; margin: 0 auto; padding: 22px 18px 140px; }
main.app-main > * + * { margin-top: 16px; }
.lead { font-size: 17px; line-height: 1.35; margin: 10px 0 0; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 2.5px solid var(--rule); display: flex; justify-content: center; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 20; }
.tabs-in { display: flex; gap: 6px; width: 100%; max-width: 720px; }
.tab { flex: 1; min-width: 0; min-height: 56px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink); font: 600 14px/1.1 var(--sans); }
.tab[aria-current="page"] { background: var(--btn); color: var(--on-btn); }

/* the table: a header rule, then ruled rows with a divider before the date */
.group { margin: 24px -18px 0; }
.group > h2 { display: grid; grid-template-columns: 34px minmax(0, 1fr) 104px; padding: 0 18px 8px; border-bottom: 2.5px solid var(--rule); font-size: 18px; font-weight: 400; letter-spacing: 0; }
.group > h2 span:first-child { grid-column: 1 / 3; padding-left: 34px; }
.row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 104px; align-items: center; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1.5px solid var(--rule); padding: 0 18px; color: var(--ink); font: inherit; cursor: pointer; min-height: 78px; }
.row:hover { background: var(--tint); }
.row .n { font: 400 16px/1 var(--mono); }
.row .m { display: block; padding: 12px 8px 12px 0; min-width: 0; }
.row .t { display: block; font-size: 19px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.row .k { display: block; font-size: 16px; line-height: 1.25; color: var(--ink2); overflow-wrap: anywhere; }
.row .ex { display: block; font-size: 15px; color: var(--ink2); }
.row .dt { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-left: 20px; }
.row .dt::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 1.5px; background: var(--rule); }
.row code { font: 500 16px/1.2 var(--mono); background: var(--tint); padding: 4px 8px; border-radius: 4px; align-self: flex-start; white-space: nowrap; }
.row em { font-style: normal; font-size: 16px; font-weight: 600; line-height: 1.15; color: var(--ink2); }
.g-now .row em { color: var(--now); } .g-soon .row em { color: var(--soon); }
.card { border-top: 1.5px solid var(--rule); padding: 16px 0 0; }
.card > * + * { margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions > .btn { flex: 1 1 200px; }
.stack > * + * { margin-top: 10px; }

/* forms */
label, .lab { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { color: var(--ink2); font-size: 15px; font-weight: 400; display: block; }
input[type=text], input[type=date], input[type=number], select, textarea { width: 100%; min-height: 48px; font: 400 17px/1.3 var(--sans); padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
input[type=date] { font-family: var(--mono); }
textarea { min-height: 88px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink2); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; background: var(--tint); }
.field + .field { margin-top: 16px; }
.pair { display: flex; gap: 10px; align-items: center; } .pair > :first-child { flex: 0 0 96px; } .pair > :last-child { flex: 1; }
.seg { display: flex; gap: 4px; padding: 4px; border: 1.5px solid var(--ink); border-radius: 14px; }
.seg label { flex: 1; margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; font-weight: 600; cursor: pointer; text-align: center; }
.seg input:checked + span { background: var(--btn); color: var(--on-btn); }
.seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.err { color: var(--now); font-weight: 600; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type { min-height: 60px; text-align: left; justify-content: flex-start; font-weight: 600; font-size: 16px; padding: 10px 14px; }
.photo { max-width: 100%; max-height: 240px; border-radius: 10px; display: block; border: 1.5px solid var(--ink); }
dl.facts { margin: 0; display: grid; grid-template-columns: 110px 1fr; border-top: 2.5px solid var(--rule); }
dl.facts dt, dl.facts dd { padding: 10px 0; border-bottom: 1.5px solid var(--rule); margin: 0; }
dl.facts dt { color: var(--ink2); } dl.facts dd { overflow-wrap: anywhere; white-space: pre-wrap; padding-left: 12px; }

/* dialogs */
dialog.sheet { border: 0; border-top: 2.5px solid var(--rule); padding: 0; background: var(--bg); color: var(--ink); width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: 0; }
dialog.sheet::backdrop { background: rgba(8, 14, 24, .6); }
.sheet-in { padding: 20px 18px 24px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) { dialog.sheet { max-width: 560px; margin: auto; border: 2.5px solid var(--rule); } }

/* undo bar */
.toast { position: fixed; left: 18px; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom)); max-width: 684px; margin: 0 auto; z-index: 60; background: var(--btn); color: var(--on-btn); border-radius: 12px; padding: 0 14px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; line-height: 1.25; }
.toast span { flex: 1; padding: 10px 0; }
.toast .btn { min-height: 44px; padding: 0 4px; background: transparent; color: var(--on-btn); border-color: transparent; font-size: 16px; font-weight: 600; gap: 6px; }
.toast .btn:hover { background: transparent; text-decoration: underline; }
.toast[hidden] { display: none; }

/* where everything is */
.place { padding: 16px 0; border-top: 1.5px solid var(--rule); }
.place ul { margin: 8px 0 0; padding-left: 20px; }
.place li { margin: 4px 0; }
.place li b { font-weight: 500; }
.group.places { margin-top: 24px; }
.group.places > .place { padding-left: 18px; padding-right: 18px; }
.only-print { display: none; }

/* website */
.site { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.site-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 12px; }
.hero { display: grid; gap: 28px; padding: 24px 0 40px; align-items: center; }
.hero h1 { font-size: 38px; }
.hero p.big { font-size: 20px; margin: 14px 0 22px; }
.hero img { width: 100%; height: auto; max-width: 340px; border-radius: 28px; border: 1.5px solid var(--ink); justify-self: center; }
@media (min-width: 860px) { .hero img { justify-self: end; } }
.steps { display: grid; gap: 14px; padding: 0; margin: 20px 0 0; list-style: none; }
.steps li { border-top: 2.5px solid var(--rule); padding: 14px 0 0; }
.steps b { font-size: 19px; font-weight: 500; display: block; margin-bottom: 4px; }
section.band { padding: 28px 0; }
details { border-top: 1.5px solid var(--rule); padding: 4px 0; }
summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
footer.site-foot { border-top: 2.5px solid var(--rule); margin-top: 32px; padding: 24px 0 40px; color: var(--ink2); font-size: 15px; }
footer.site-foot p { margin: 0 0 8px; }
.prose { max-width: 680px; }
.prose h2 { margin: 28px 0 8px; }
.prose ul { padding-left: 22px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.3fr 1fr; gap: 56px; } .hero h1 { font-size: 48px; } .steps { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { main.app-main { padding-bottom: 130px; } }

@media print {
  body { background: #fff; color: #000; font-size: 14pt; }
  .top, .tabs, .toast, .no-print, .skip { display: none !important; }
  .only-print { display: block; }
  main { padding: 0; max-width: none; }
  .group { margin: 0; }
  .place { break-inside: avoid; border-top: 1px solid #999; }
  h1, h2, h3, .muted, .hint { color: #000; }
}
