/* Shared chrome for every dawter.app page that is not the home page.
 *
 * The :root token block below used to be copy-pasted into privacy.html and
 * thanks.html, each with a comment saying it was kept in step by hand. The
 * account, login, support and manual pages would have made that eleven copies,
 * at which point "kept in step by hand" stops being true. One file instead.
 *
 * index.html deliberately keeps its own inline styles: it is a different kind of
 * page, it carries animation and layout nothing else needs, and it should not
 * wait on a stylesheet to render its first screen. privacy.html and thanks.html
 * can adopt this later as a change of their own.
 */

:root {
  --ground: #0c131d;
  --surface: #191e29;
  --line: #242c3b;
  --text: #ffffff;
  --muted: #8b93a1;
  --faint: #4a5365;
  --accent: #f57b47;
  --ok: #4ba36a;
  --warn: #d8a13c;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 740px; margin: 0 auto; padding-inline: 24px; }
.wrap.wide { max-width: 1020px; }

/* ── nav ─────────────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 14px; flex-wrap: wrap;
}
.wordmark {
  font: 800 17px/1 var(--display); font-stretch: 125%;
  letter-spacing: .28em; text-decoration: none; color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a { font-size: 15px; color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav a.back { font-size: 15px; color: var(--muted); text-decoration: none; }
.nav a.back:hover { color: var(--text); }

/* ── type ────────────────────────────────────────────────────────────── */
h1 { font: 800 clamp(32px, 5.5vw, 48px)/1.05 var(--display); font-stretch: 112%; margin: 48px 0 12px; }
h2 {
  font: 700 22px/1.25 var(--display); margin: 44px 0 12px;
  padding-top: 28px; border-top: 1px solid var(--line);
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { font: 600 17px/1.3 var(--body); color: var(--text); margin: 26px 0 8px; }
p, li { color: var(--muted); }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 7px; }
li::marker { color: var(--faint); }
strong, b { color: var(--text); font-weight: 600; }
code {
  font: 500 .88em var(--mono); color: var(--text); background: var(--surface);
  padding: 2px 6px; border-radius: 5px;
}
.lede { color: var(--text); font-size: 19px; }
.updated { font: 400 13px/1.4 var(--mono); color: var(--faint); margin-bottom: 44px; }

/* ── blocks ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; margin: 0 0 16px;
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.note { /* kept as an alias: privacy.html already uses this name */
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin: 0 0 16px;
}
.note p:last-child { margin-bottom: 0; }

/* ── forms ───────────────────────────────────────────────────────────── */
label { display: block; font-size: 14px; color: var(--text); margin: 0 0 6px; }
input[type=email], input[type=password], input[type=text], select, textarea {
  width: 100%; padding: 11px 13px; font: 400 16px/1.4 var(--body);
  color: var(--text); background: var(--ground);
  border: 1px solid var(--line); border-radius: 9px;
}
textarea { min-height: 140px; resize: vertical; font-size: 15px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
.field { margin-bottom: 16px; }
.hint { font-size: 13px; color: var(--faint); margin: 6px 0 0; }

.btn {
  display: inline-block; padding: 12px 20px; border: 0; border-radius: 10px;
  font: 600 15px/1 var(--body); cursor: pointer; text-decoration: none;
  background: var(--surface); color: var(--text);
}
.btn.primary { background: var(--accent); color: #0c131d; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.btn.small { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn.quiet { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── status messages ─────────────────────────────────────────────────── */
.msg { font-size: 14px; margin: 14px 0 0; min-height: 20px; }
.msg.err { color: #e0785c; }
.msg.ok { color: var(--ok); }

/* ── pills, for plan and ticket state ────────────────────────────────── */
.pill {
  display: inline-block; font: 500 12px/1 var(--mono); text-transform: uppercase;
  letter-spacing: .06em; padding: 5px 9px; border-radius: 6px;
  background: var(--line); color: var(--muted);
}
.pill.pro { background: var(--accent); color: #0c131d; }
.pill.trial { background: var(--warn); color: #0c131d; }
.pill.done { background: var(--ok); color: #0c131d; }

/* ── a list of things, one per line ──────────────────────────────────── */
.list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.item:last-child { border-bottom: 0; }
.item-main { min-width: 0; }
.item-name {
  font-size: 15px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item-sub { font-size: 13px; color: var(--faint); }
.empty { padding: 16px; font-size: 14px; color: var(--faint); }

/* ── usage bar ───────────────────────────────────────────────────────── */
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--line); }
.bar span { background: var(--accent); }
.bar-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--faint); margin-top: 8px; }

/* ── manual layout ───────────────────────────────────────────────────── */
.manual { display: grid; grid-template-columns: 210px 1fr; gap: 44px; align-items: start; }
.manual-nav { position: sticky; top: 24px; }
.manual-nav ul { list-style: none; margin: 0; padding: 0; }
.manual-nav li { margin: 0 0 2px; }
.manual-nav a {
  display: block; padding: 7px 10px; border-radius: 7px;
  font-size: 14.5px; color: var(--muted); text-decoration: none;
}
.manual-nav a:hover { background: var(--surface); color: var(--text); }
.manual-nav a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 600; }
.manual-nav .nav-head {
  font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em;
  color: var(--faint); padding: 0 10px; margin: 0 0 10px;
}
.manual h1 { margin-top: 0; }
@media (max-width: 760px) {
  .manual { grid-template-columns: 1fr; gap: 24px; }
  .manual-nav { position: static; }
  .manual-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
}

footer {
  border-top: 1px solid var(--line); margin-top: 64px;
  padding-block: 28px 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font: 400 13px/1.4 var(--mono); color: var(--faint);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

[hidden] { display: none !important; }
