/* RefTrail on the web: the design kit's tokens (design/reftrail/tokens/tokens.css in the app
   repo) and the few pieces every server page shares. Green only, Sora for headings, Manrope
   for text, JetBrains Mono for IDs and labels. */
:root {
  --rt-ink: #12332B; --rt-green: #1F5A4A; --rt-mid: #4F8574; --rt-soft: #9DBFB2; --rt-pale: #C9D8D2; --rt-mist: #EEF3F0;
  --rt-white: #FFFFFF; --rt-canvas: #FBFCFB; --rt-line: #DCE5E1; --rt-body: #3E4F4A; --rt-quiet: #5E7570;
  --rt-danger: #A63D2F; --rt-danger-bg: #F7E9E6; --rt-caution: #8A6A1F; --rt-caution-bg: #F6F0E1;
  --rt-display: 'Sora', system-ui, sans-serif;
  --rt-text: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rt-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --rt-radius: 16px;
  --rt-shadow: 0 4px 16px rgba(18, 51, 43, 0.08);
  --rt-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--rt-canvas); color: var(--rt-body); font: 400 16px/1.5 var(--rt-text); }
h1, h2, h3 { font-family: var(--rt-display); color: var(--rt-ink); letter-spacing: -0.01em; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; font-weight: 700; }
h2 { font-size: 20px; line-height: 1.25; margin: 28px 0 8px; font-weight: 700; }
h3 { font-size: 17px; line-height: 1.3; margin: 20px 0 6px; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: var(--rt-green); text-underline-offset: 2px; }
strong, b { color: var(--rt-ink); font-weight: 700; }

/* One column, centred. .rt-page for reading pages, .rt-narrow for one message. */
.rt-page { max-width: 680px; margin: 0 auto; padding: 24px 16px 48px; }
.rt-narrow { max-width: 440px; margin: 0 auto; padding: 32px 16px 48px; }
.rt-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 24px; }
.rt-top img { display: block; height: 28px; width: auto; }
.rt-card { background: var(--rt-white); border: 1px solid var(--rt-line); border-radius: var(--rt-radius); padding: 24px; box-shadow: var(--rt-shadow); }
.rt-centre { text-align: center; }
.rt-mark { display: block; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 14px; }

.rt-eyebrow, .rt-mono { font-family: var(--rt-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rt-mid); }
.rt-id { font-family: var(--rt-mono); font-weight: 500; letter-spacing: 0.06em; color: var(--rt-green); }
.rt-muted { color: var(--rt-quiet); font-size: 14px; }
.rt-note { color: var(--rt-quiet); font-size: 13px; margin-top: 12px; }

.rt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; font: 700 16px/1 var(--rt-text); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background var(--rt-ease) 200ms; }
.rt-btn.primary { background: var(--rt-green); color: var(--rt-white); }
.rt-btn.primary:hover { background: var(--rt-ink); }
.rt-btn.ghost { background: transparent; color: var(--rt-green); border-color: var(--rt-line); }
.rt-btn.ghost:hover { background: var(--rt-mist); }
.rt-btn.block { display: flex; width: 100%; }
.rt-btns { display: grid; gap: 10px; margin-top: 20px; }

.rt-badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--rt-mist); color: var(--rt-green); font: 800 13px/1 var(--rt-text); }
.rt-badge.dark { background: var(--rt-ink); color: var(--rt-white); }
.rt-badge svg { width: 16px; height: 16px; }
.rt-ok { color: var(--rt-green); }
.rt-bad { color: var(--rt-danger); }
.rt-alert { background: var(--rt-danger-bg); color: var(--rt-danger); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.rt-caution { background: var(--rt-caution-bg); color: var(--rt-caution); border-radius: 12px; padding: 12px 14px; font-size: 14px; }

table.rt-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.rt-table th, .rt-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--rt-line); }
.rt-table th { font-weight: 700; color: var(--rt-ink); width: 34%; }

.rt-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rt-line); font-size: 13px; color: var(--rt-quiet); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rt-foot a { color: var(--rt-quiet); }
.rt-disclaimer { font-size: 13px; color: var(--rt-quiet); }

/* The trail rows, oldest at the top. */
.rt-rows { display: inline-grid; gap: 3px; width: 22px; }
.rt-rows i { display: block; height: 3px; border-radius: 2px; }
.rt-rows i:nth-child(1) { background: #C9D8D2; } .rt-rows i:nth-child(2) { background: #9DBFB2; }
.rt-rows i:nth-child(3) { background: #4F8574; } .rt-rows i:nth-child(4) { background: #1F5A4A; }
.rt-rows i:nth-child(5) { background: #12332B; }
@keyframes rt-write-in { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
.rt-write-in { transform-origin: left center; animation: rt-write-in 450ms var(--rt-ease) both; }
@media (prefers-reduced-motion: reduce) { .rt-write-in { animation: none; } }
.rt-badge.bad { background: var(--rt-danger-bg); color: var(--rt-danger); }
