/* ask-legal.css — shared minimalist design system for Ask Rhodes
   informational / legal pages (contact, terms, privacy, about, api).
   Matches the Ask Rhodes app aesthetic: Inter, calm neutrals, light by
   default with a .ask-rhodes-dark mode toggled via localStorage('rhodes-theme').
   This is the single source of truth — do not re-inline these tokens per page. */

:root {
  --ask-bg: #ffffff;
  --ask-panel: #f7f7f5;
  --ask-card: #ffffff;
  --ask-text: #1f1f1f;
  --ask-muted: #6f6f6b;
  --ask-border: #e6e6e2;
  --ask-hover: #ececea;
  --ask-accent: #171717;
  --ask-field: #ffffff;
  --ask-danger: #b23b2e;
  --ask-ok: #2f7d52;
  color-scheme: light;
}
html.ask-rhodes-dark {
  --ask-bg: #181915;
  --ask-panel: #20211d;
  --ask-card: #22231f;
  --ask-text: #f6f6ef;
  --ask-muted: #aaa99d;
  --ask-border: #3a3b35;
  --ask-hover: #2d2e29;
  --ask-accent: #f6f6ef;
  --ask-field: #1d1e1a;
  --ask-danger: #e58a7e;
  --ask-ok: #7fcf9f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ask-bg);
  color: var(--ask-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

main {
  width: min(900px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 18px 0 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  margin-bottom: 30px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ask-text);
  text-decoration: none;
}

.brand-face {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-wordmark {
  color: var(--ask-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.back-link {
  display: inline-block;
  color: var(--ask-muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.back-link:hover { color: var(--ask-text); }

.theme-btn {
  border: 1px solid var(--ask-border);
  background: var(--ask-card);
  color: var(--ask-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.theme-btn:hover { color: var(--ask-text); background: var(--ask-hover); }

h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin: 38px 0 12px;
  font-size: 21px;
  font-weight: 730;
  letter-spacing: 0;
}

h3 {
  margin: 24px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ask-text);
}

p { margin: 0 0 14px; }

.tagline {
  max-width: 640px;
  margin: 0 0 30px;
  color: var(--ask-muted);
  font-size: 17px;
}

.updated {
  color: var(--ask-muted);
  font-size: 14px;
  margin: 0 0 28px;
}

a { color: var(--ask-text); text-underline-offset: 3px; }
a:hover { color: var(--ask-muted); }

.muted { color: var(--ask-muted); }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 0 0 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 26px 0;
}

.card {
  border: 1px solid var(--ask-border);
  border-radius: 8px;
  background: var(--ask-card);
  padding: 22px;
}
.card h2 { margin-top: 0; font-size: 18px; font-weight: 720; }
.card h3 { margin-top: 0; }

/* table of contents */
.toc {
  border: 1px solid var(--ask-border);
  border-radius: 8px;
  background: var(--ask-panel);
  padding: 18px 22px;
  margin: 0 0 34px;
}
.toc h2 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ask-muted); }
.toc ol { columns: 2; column-gap: 28px; margin: 0; padding-left: 18px; font-size: 14px; }
.toc a { color: var(--ask-muted); text-decoration: none; }
.toc a:hover { color: var(--ask-text); }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* forms */
form { margin: 26px 0 0; }
.field { margin: 0 0 18px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 7px;
}
.field .hint { color: var(--ask-muted); font-weight: 500; }
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ask-text);
  background: var(--ask-field);
  border: 1px solid var(--ask-border);
  border-radius: 8px;
  padding: 11px 13px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--ask-accent); }
textarea { min-height: 150px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

/* honeypot — visually hidden, off-screen, not display:none (bots skip those) */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 680;
  color: var(--ask-bg);
  background: var(--ask-accent);
  border: 1px solid var(--ask-accent);
  border-radius: 8px;
  padding: 12px 22px;
  cursor: pointer;
}

@media (max-width: 560px) {
  main { width: min(100vw - 28px, 900px); padding-top: 14px; }
  .topbar { margin-bottom: 24px; }
  .brand-wordmark { font-size: 12px; }
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.55; cursor: default; }

.form-status { margin: 16px 0 0; font-size: 15px; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: var(--ask-ok); }
.form-status.err { color: var(--ask-danger); }

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
  flex-wrap: wrap;
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid var(--ask-border);
  text-align: center;
}
.footer-links a {
  color: var(--ask-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}
.footer-links a:hover { color: var(--ask-text); }
.footer-rights {
  color: var(--ask-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  margin: 6px 0 0;
  text-align: center;
}
.footer-rights a {
  color: var(--ask-muted);
  text-decoration: none;
}
.footer-rights a:hover { color: var(--ask-text); }
body.ask-rhodes-shell.ask-rhodes-page-shell > main .footer-rights {
  max-width: none !important;
  color: var(--ask-muted) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

/* value cards (about page) */
.value-card h3 { margin: 0 0 8px; font-size: 16px; }
.value-card p { margin: 0; color: var(--ask-muted); font-size: 14px; }

/* generic small print */
.fineprint { color: var(--ask-muted); font-size: 13px; margin-top: 30px; }
