/* Frost editorial for the Jinja pages (sign-in, free sample). Same tokens as
   frontend/src/styles.css and docs/FRONTEND_DESIGN_PROMPT.md. */
:root {
  --bg: #f3f7fa; --panel: #ffffff; --panel-2: #f8fbfd;
  --ink: #14202b; --text-2: #3d4b57; --muted: #5b6b78;
  --line: #dfe6ec; --line-soft: #eef3f7;
  --brand: #1f6f9c; --brand-ink: #14506f; --brand-tint: #e6f0f6; --accent: #b4530a;
  --ok: #2f7d5b; --ok-tint: #e4f3ea; --warn: #8a5a12; --warn-tint: #fbf3e6; --bad: #b42318; --bad-tint: #fce9e7;
  --ring: 0 0 0 3px rgba(31,111,156,.15);
  --shadow-lg: 0 24px 48px -16px rgba(20,32,43,.28);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0f1720; --panel: #16222e; --panel-2: #1a2733;
  --ink: #e9eef3; --text-2: #c3cdd6; --muted: #93a2af;
  --line: #24333f; --line-soft: #1e2b36;
  --brand: #5fa8d3; --brand-ink: #8cc3e4; --brand-tint: #163241; --accent: #e8853a;
  --ok: #5cc08e; --ok-tint: #12301f; --warn: #e0a84a; --warn-tint: #33260c; --bad: #f0776c; --bad-tint: #3a1a18;
  --ring: 0 0 0 3px rgba(95,168,211,.25);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); text-decoration: underline; }
h1, h2, h3 { letter-spacing: 0; }
.serif { font-family: var(--serif); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 19px; }

/* ---------- brand mark, header ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); white-space: nowrap; flex: none; }
.wordmark:hover { text-decoration: none; color: var(--ink); }
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--panel); }
.mark::before { content: ""; position: absolute; left: 11px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); z-index: 1; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 36px; background: var(--panel); border-bottom: 1px solid var(--line); }
.bar-r { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bar-r .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- controls ---------- */
label, .lbl { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 600; }
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; }
.lbl-row a { font-size: 12px; font-weight: 600; }
input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: var(--panel); transition: border-color .13s, box-shadow .13s; }
input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input[aria-invalid="true"] { border-color: var(--bad); }
.hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.err { margin-top: 6px; font-size: 13px; color: var(--bad); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; background: var(--ink); color: var(--bg); font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; transition: background .13s, color .13s; }
.btn:hover { background: var(--brand-ink); color: #fff; text-decoration: none; }
.btn.secondary { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--panel-2); color: var(--ink); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.fld { margin: 0 0 14px; }
.fld:last-of-type { margin-bottom: 18px; }

/* ---------- cards, notices ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 24px; }
.card-body { padding: 18px 20px; }
.card-body > b { display: block; margin-bottom: 4px; }
.card-body p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; background: var(--brand-tint); border: 1px solid #c9dde9; color: var(--brand-ink); line-height: 20px; }
.notice.bad { background: var(--bad-tint); border-color: #efc4bf; color: var(--bad); }
.notice.bad a { color: inherit; font-weight: 600; text-decoration: underline; }
.ok { background: var(--ok-tint); border: 1px solid var(--line); color: var(--ok); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 19px; margin: 0 0 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--brand-tint); color: var(--brand-ink); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.done { background: var(--ok-tint); color: var(--ok); }
.pill.failed { background: var(--bad-tint); color: var(--bad); }

/* ---------- sign-in layout ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.pitch { padding: 56px 72px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; border-right: 1px solid var(--line); }
.pitch h1 { margin: 0 0 18px; font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1.1; max-width: 12ch; }
.pitch p { margin: 0; max-width: 52ch; font-size: 16px; line-height: 26px; color: var(--text-2); }
.proofs { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.proofs b { color: var(--ink); font-weight: 600; }
.foot { font-size: 12px; color: var(--muted); }
.pane { display: grid; place-items: center; padding: 48px 24px; }
.pane .card { width: 100%; max-width: 400px; padding: 28px; }
.pane h2 { margin: 0 0 4px; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 30px; }
.eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lede { margin: 0 0 16px; font-size: 13px; line-height: 19px; color: var(--muted); }
.after { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.after a { font-weight: 600; }
.terms { margin: 12px 0 0; font-size: 12px; line-height: 17px; color: var(--muted); text-align: center; }

/* ---------- free sample ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 48px 36px 80px; }
.try { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.try-hero h1 { margin: 0 0 14px; font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1.1; }
.try-hero .lede { font-size: 16px; line-height: 26px; color: var(--text-2); margin-bottom: 24px; }
.try-form { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.try-row { display: flex; gap: 10px; }
.try-row input { flex-grow: 1; }
.try-steps ol { list-style: none; margin: 0; padding: 0; }
.try-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-soft); counter-increment: step; }
.try-steps li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.try-steps li b { display: block; }
.try-steps li span { grid-column: 2; font-size: 13px; color: var(--muted); line-height: 19px; }
.try-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 40px; align-items: start; }
.try-grid h1 { margin: 0 0 8px; font-size: 34px; line-height: 40px; }
.try-grid .lede { font-size: 15px; line-height: 23px; color: var(--text-2); margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; }
.step .dot { width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 2px solid #b9c7d2; flex: none; box-sizing: border-box; }
.step.done .dot { background: var(--ok); border-color: var(--ok); }
.step.active .dot { border: 3px solid var(--brand); box-shadow: 0 0 0 5px var(--brand-tint); animation: pulse 1.6s ease-in-out infinite; }
.step .name { font-weight: 500; color: var(--muted); }
.step.done .name, .step.active .name { font-weight: 600; color: var(--ink); }
.step .detail { font-size: 13px; color: var(--muted); line-height: 19px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px var(--brand-tint); } 50% { box-shadow: 0 0 0 8px var(--brand-tint); } }
.preview .card-body { padding: 32px 40px; }
.skel { border-radius: 6px; background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 50%, var(--line-soft) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-2); }
.cta-card .btn { width: 100%; margin-top: 12px; }
.cta-card .btn + .btn { margin-top: 8px; }
.rings { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ring .g { position: relative; width: 56px; height: 56px; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .v { position: absolute; font-weight: 700; font-size: 14px; }
.ring figcaption { font-size: 12px; color: var(--muted); }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { display: flex; flex-direction: column; gap: 2px; padding: 10px 20px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.linklist li:first-child { border-top: 0; }
.linklist a { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.hero { width: 100%; height: auto; border-radius: 12px; display: block; aspect-ratio: 1680 / 882; object-fit: cover; margin-bottom: 18px; }
.article-title { margin: 0 0 16px; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.2; }
.prose { font-size: 16px; line-height: 26px; color: var(--text-2); }
.prose h2, .prose h3 { color: var(--ink); font-weight: 600; margin: 36px 0 10px; line-height: 1.3; }
.prose h2 { font-size: 24px; } .prose h3 { font-size: 20px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 16px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose th { font-size: 12px; color: var(--muted); }
.prose blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--line); color: var(--muted); }

@media (max-width: 900px) {
  .try, .try-grid { grid-template-columns: 1fr; gap: 24px; }
  .wrap { padding: 24px 16px 60px; }
  .bar { padding: 8px 16px; min-height: 56px; }
  .try-hero h1, .try-grid h1 { font-size: 30px; line-height: 36px; }
  .try-row { flex-direction: column; }
  .preview .card-body { padding: 20px 18px; }
  .cta { flex-direction: column; align-items: stretch; text-align: center; }
}
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; align-content: start; }
  .pitch { padding: 20px 16px 24px; border-right: 0; border-bottom: 1px solid var(--line); gap: 18px; justify-content: flex-start; }
  .pitch h1 { font-size: 30px; margin-bottom: 10px; }
  .pitch p, .foot { display: none; }
  .proofs { margin-top: 0; }
  .pane { padding: 24px 16px 40px; align-items: start; }
  .pane .card { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) { input, .btn { transition: none; } .step.active .dot, .skel { animation: none; } }
