/* The public trust pages, /status and /changelog, rendered by src/status.ts and src/changelog.ts.
   Tokens come from base.css. Calm and plain: one column, state always named in words as well as colour,
   the 90-day bars are decoration over a text summary. No scripts on these pages. */

:root {
  --st-ok: var(--ok);
  --st-slow: var(--warn);
  --st-down: var(--danger);
  --st-none: var(--raised);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --st-slow: #a86a00; --st-none: #dfe1e5; }
}
:root[data-theme="light"] { --st-slow: #a86a00; --st-none: #dfe1e5; }

/* header and footer, matching the content pages */
.tp-bar { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--ground) 86%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.tp-bar-in { display: flex; align-items: center; gap: var(--s-4); height: 64px; }
.tp-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--text); letter-spacing: -0.01em; }
.tp-brand img { width: 20px; height: 22px; }
.tp-nav { display: flex; gap: var(--s-1); margin-left: auto; }
.tp-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-control); font-size: 13.5px; font-weight: 500; color: var(--body); transition: color var(--t-1) var(--ease); }
.tp-nav a:hover, .tp-nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 480px) { .tp-bar-in { gap: var(--s-2); } .tp-bar .btn { display: none; } }

.tp-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-6); padding-bottom: var(--s-7); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.tp-foot nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.tp-foot a:hover { color: var(--text); }

.tp-page { max-width: 820px; padding-top: var(--s-7); padding-bottom: var(--s-8); }
.tp-head { margin-bottom: var(--s-7); }
.tp-head h1 { margin: var(--s-3) 0 var(--s-4); font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; }
.lede { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; max-width: 62ch; }
.tp-note { margin-top: var(--s-8); padding: var(--s-6); border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); font-size: 16px; line-height: 1.6; }
.tp-note h2 { font-size: 20px; margin-bottom: var(--s-3); }
.tp-note p + p { margin-top: var(--s-3); }
.tp-note a, .lede a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.tp-note a:hover { text-decoration-color: var(--text); }

/* ---------------- status ---------------- */
.st-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.st-title { display: flex; align-items: center; gap: 14px; }
.st-title .st-dot { width: 14px; height: 14px; }
.st-title.st-operational .st-dot { color: var(--st-ok); box-shadow: 0 0 0 6px color-mix(in srgb, var(--st-ok) 18%, transparent); }
.st-title.st-degraded .st-dot { color: var(--st-slow); box-shadow: 0 0 0 6px color-mix(in srgb, var(--st-slow) 18%, transparent); }
.st-title.st-down .st-dot { color: var(--st-down); box-shadow: 0 0 0 6px color-mix(in srgb, var(--st-down) 18%, transparent); }

.st-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.st-row { padding: var(--s-5); }
.st-row + .st-row { border-top: 1px solid var(--line); }
.st-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.st-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.005em; }
.st-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: var(--r-control); background: var(--raised); color: var(--text); font-size: 13.5px; font-weight: 500; }
.st-pill.st-operational .st-dot { color: var(--st-ok); }
.st-pill.st-degraded .st-dot { color: var(--st-slow); }
.st-pill.st-down .st-dot { color: var(--st-down); }
.st-ms { color: var(--muted); font-weight: 400; }
.st-what { margin-top: var(--s-2); font-size: 14.5px; color: var(--muted); max-width: 64ch; }

.st-bar { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 32px; margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.st-bar li { border-radius: 2px; background: var(--st-none); }
.st-bar .st-operational { background: var(--st-ok); }
.st-bar .st-degraded { background: var(--st-slow); }
.st-bar .st-down { background: var(--st-down); }
@media (max-width: 560px) { .st-bar { gap: 1px; height: 28px; } }
.st-scale { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.st-sum { margin-top: var(--s-2); font-size: 14.5px; color: var(--body); font-variant-numeric: tabular-nums; }

.st-legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.st-legend li { display: inline-flex; align-items: center; gap: 8px; }
.st-key { width: 12px; height: 12px; border-radius: 3px; background: var(--st-none); }
.st-key.st-operational { background: var(--st-ok); }
.st-key.st-degraded { background: var(--st-slow); }
.st-key.st-down { background: var(--st-down); }

/* ---------------- changelog ---------------- */
.cl-feed { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin-top: var(--s-5); font-size: 13.5px; color: var(--muted); }
.cl-day { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s-5); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.cl-day + .cl-day { margin-top: var(--s-7); }
.cl-day > h2 { position: sticky; top: 88px; align-self: start; font-size: 14.5px; font-weight: 500; color: var(--muted); }
@media (max-width: 720px) { .cl-day { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); } .cl-day > h2 { position: static; } }
.cl-entry { scroll-margin-top: 88px; font-size: 16.5px; line-height: 1.6; }
.cl-entry + .cl-entry { margin-top: var(--s-7); }
.cl-entry h3 { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; letter-spacing: -0.01em; margin-bottom: var(--s-2); }
.cl-entry h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.cl-entry ul { margin: var(--s-3) 0 0; padding-left: 1.2em; }
.cl-entry li + li { margin-top: var(--s-2); }
.cl-entry li::marker { color: var(--muted); }
.cl-tag { display: inline-flex; align-items: center; min-height: 26px; margin-bottom: var(--s-3); padding: 0 10px; border-radius: var(--r-control); font-size: 12.5px; font-weight: 500; color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); }

@media (prefers-reduced-motion: reduce) { .tp-nav a { transition: none; } }

/* the business pages (src/legal.ts): pricing plans, long-form legal text, the contact form */
.pr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 640px) { .pr-grid { grid-template-columns: 1fr; } }
.pr-plan { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-6); border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); }
.pr-plan h2 { font-size: 20px; }
.pr-plan .ticks { flex: 1; margin: 0; padding: 0; list-style: none; display: grid; align-content: start; gap: var(--s-3); font-size: 15px; line-height: 1.5; }
.pr-plan .ticks li { display: flex; gap: 12px; align-items: baseline; }
.pr-plan .ticks li::before { content: ""; flex: none; width: 9px; height: 5px; border: solid var(--ok); border-width: 0 0 1.6px 1.6px; transform: translateY(-3px) rotate(-45deg); }
.pr-plan .btn { align-self: flex-start; }
.pr-hi { border-color: color-mix(in srgb, var(--text) 40%, var(--line)); }
.pr-amt { font-size: 44px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.pr-amt small { font-size: 15px; font-weight: 450; color: var(--muted); letter-spacing: 0; }
.lg-updated { margin-top: var(--s-3); font-size: 13.5px; color: var(--muted); }
.lg { max-width: 68ch; font-size: 16px; line-height: 1.65; }
.lg h2 { margin: var(--s-7) 0 var(--s-3); font-size: 21px; letter-spacing: -0.01em; }
.lg p + p, .lg ul + p, .lg p + ul { margin-top: var(--s-3); }
.lg ul { display: grid; gap: var(--s-2); padding-left: 1.2em; list-style: disc; }
.lg a, .lg-small a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.lg-form { display: grid; gap: var(--s-4); max-width: 620px; }
.lg-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 560px) { .lg-row { grid-template-columns: 1fr; } }
.lg-form label { display: grid; gap: var(--s-2); font-size: 14px; font-weight: 500; color: var(--text); }
.lg-form input, .lg-form select, .lg-form textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 400 16px/1.5 var(--font); }
.lg-form textarea { resize: vertical; min-height: 160px; }
.lg-form input:focus-visible, .lg-form select:focus-visible, .lg-form textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.lg-form .btn { justify-self: start; }
.lg-small { font-size: 13.5px; color: var(--muted); }
.lg-msg { max-width: 620px; margin-bottom: var(--s-5); padding: var(--s-4) var(--s-5); border-radius: 12px; font-size: 15px; border: 1px solid var(--line); background: var(--surface); }
.lg-ok { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.lg-bad { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); }
.pr-trial { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: var(--s-4); padding: 6px 14px 6px 6px; border-radius: var(--r-control); background: var(--surface); font-size: 14.5px; font-weight: 500; color: var(--text); }
.tag-new { padding: 4px 9px; border-radius: var(--r-control); font-size: 11.5px; line-height: 1; font-weight: 600; color: color-mix(in srgb, var(--ok) 72%, var(--text)); background: color-mix(in srgb, var(--ok) 16%, transparent); }
