/* Trove — Ink & Brass. Plain CSS, no build step, no inline styles (CSP). */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/lato-latin-400-normal.e1b3b5908c9c.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/lato-latin-ext-400-normal.633f8feda218.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/lato-latin-700-normal.de69cf9e514d.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/lato-latin-ext-700-normal.33c906549bd6.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("../fonts/lato-latin-900-normal.1c6c65523675.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("../fonts/lato-latin-ext-900-normal.3d62dac47ae3.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --fg: #141C2E;
  --muted: #5B6478;
  --line: #DDE1E8;
  --line-strong: #C3C9D4;
  --primary: #1B2A4A;      /* ink: main buttons */
  --on-primary: #FFFFFF;
  --brass: #8A6A35;        /* accent: links, focus, highlights */
  --danger: #A2302A;
  --danger-bg: #FBEDEC;
  --ok: #2F6B4A;
  --ok-bg: #EAF4EE;
  --code-bg: #F0F2F6;

  --font: "Lato", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 28, 46, 0.04), 0 8px 24px rgba(20, 28, 46, 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1422;
    --surface: #161E30;
    --fg: #E8EBF2;
    --muted: #9AA3B5;
    --line: #2A3349;
    --line-strong: #3A4560;
    --primary: #C9A66B;    /* brass becomes the button colour on ink */
    --on-primary: #141C2E;
    --brass: #C9A66B;
    --danger: #F0A39D;
    --danger-bg: #3A1D1C;
    --ok: #8FD3AE;
    --ok-bg: #16302A;
    --code-bg: #0E1422;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }

a { color: var(--brass); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }

/* --- frame ---------------------------------------------------------------- */

.site-header, .site-footer, main { width: 100%; max-width: 720px; margin: 0 auto; padding-inline: 20px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 900; font-size: 18px; letter-spacing: -0.01em; }
.wordmark-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--brass); }
.site-nav { display: flex; gap: 18px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--fg); }

main { flex: 1; display: grid; align-content: start; gap: 24px; padding-block: 24px 56px; }
.site-footer { padding-block: 24px 32px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); }

/* --- type ----------------------------------------------------------------- */

.page-head { display: grid; gap: 8px; }
h1 { margin: 0; font-size: clamp(28px, 5vw, 36px); line-height: 1.15; font-weight: 900; letter-spacing: -0.02em; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); font-size: 17px; max-width: 58ch; }
h2 { margin: 0; font-size: 18px; font-weight: 700; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }

/* --- panel and form ------------------------------------------------------- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: grid; gap: 18px; min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field-label { font-size: 14px; font-weight: 700; }
.field-hint { font-size: 13px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
textarea { font-family: var(--mono); font-size: 14px; line-height: 1.5; min-height: 168px; resize: vertical; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: transparent; }
input[readonly] { font-family: var(--mono); font-size: 13.5px; }

.counter { display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 700; }

.input-with-action { display: flex; gap: 8px; }
.input-with-action input { flex: 1; min-width: 0; }

/* --- buttons -------------------------------------------------------------- */

.btn { font: inherit; font-weight: 700; font-size: 15px; border-radius: var(--radius-sm); padding: 11px 18px; cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-danger { background: transparent; color: var(--danger); border-color: currentColor; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- states --------------------------------------------------------------- */

.notice { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.notice-error { background: var(--danger-bg); color: var(--danger); }
.notice-ok { background: var(--ok-bg); color: var(--ok); }

.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.pill-pending { color: var(--brass); }
.pill-viewed { color: var(--ok); }
.pill-burned, .pill-expired { color: var(--muted); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }

.secret-text { margin: 0; font-family: var(--mono); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; max-height: 420px; overflow: auto; }

.gone { text-align: left; }
.gone-mark { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: var(--muted); font-weight: 900; }


/* --- abuse report -------------------------------------------------------- */

.report-area { display: grid; gap: 12px; }
.report-prompt { margin: 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.link-button { font: inherit; font-weight: 700; color: var(--brass); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.report-form h2 { font-size: 17px; }
.report-form textarea { font-family: var(--font); font-size: 15px; min-height: 96px; }

/* --- legal page ------------------------------------------------------------ */

.prose { display: grid; gap: 14px; max-width: 64ch; }
.prose h2 { margin-top: 12px; }
.prose p, .prose li { margin: 0; color: var(--fg); font-size: 15.5px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prose .updated { color: var(--muted); font-size: 14px; }

/* --- how it works --------------------------------------------------------- */

.how { display: grid; gap: 28px; padding-block: 40px 8px; margin-top: 16px; border-top: 1px solid var(--line); }
.section-title { font-size: clamp(22px, 3.6vw, 26px); line-height: 1.25; font-weight: 900; letter-spacing: -0.015em; text-wrap: balance; }
.how h3 { margin: 0; font-size: 16px; font-weight: 700; }
.how p { margin: 0; color: var(--muted); font-size: 14.5px; }
.how code { font-family: var(--mono); font-size: 0.92em; color: var(--fg); }

.how-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; }
.how-steps li { counter-increment: step; display: grid; gap: 6px; align-content: start; padding-top: 14px; border-top: 2px solid var(--brass); min-width: 0; }
.how-steps li::before { content: counter(step); font-size: 13px; font-weight: 900; color: var(--brass); font-variant-numeric: tabular-nums; }

.how-ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.how-ledger > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 10px; align-content: start; }
.how-ledger ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14.5px; }
.how-ledger li { display: flex; gap: 10px; align-items: baseline; }
.how-ledger > div:first-child li::before { content: "\2715"; color: var(--brass); font-weight: 700; font-size: 12px; }
.how-ledger > div:last-child li::before { content: "\2022"; color: var(--muted); font-weight: 700; }

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

@media (max-width: 480px) {
  .panel { padding: 16px; }
  .site-nav { gap: 12px; }
  .input-with-action { flex-direction: column; }
}
