/* The public pages (templates/site_*.html): home, privacy, terms. It wears the app's own
   palette and faces (templates/login.html, static/css/app.css) so a visitor who
   signs in lands somewhere that looks like where they came from. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light;
  --bg: #f4ecdd;
  --panel: #fffaf0;
  --border: #d6c6ab;
  --rule: #e6dac4;
  --ink: #173442;
  --muted: #4d6670;
  --accent: #123e52;
  --accent-ink: #fffaf0;
  --wash: #ebe0cc;
  --serif: 'Spectral', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image: linear-gradient(90deg, rgba(183,161,125,.13) 1px, transparent 1px), linear-gradient(rgba(183,161,125,.1) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */

.site-top { padding: 22px 0; }
.site-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-top .brand img { display: block; width: 104px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease-out;
}
.btn:hover { background: #0c2e3e; }
.btn-lg { padding: 14px 30px; font-size: 17px; }
.site-nav .btn { padding: 8px 18px; }

/* ---------- Home: hero ---------- */

.hero { padding: 48px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 20px;
}

.hero .lede { font-size: 20px; color: var(--muted); max-width: 34ch; margin-bottom: 30px; }
.hero .cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.hero .cta-note { font-size: 14px; color: var(--muted); }

/* The example conversation: the product's actual mechanism, a todo arriving in
   a chat with numbered routes and a one-digit reply. */
.convo {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.45;
}

.convo-label { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 4px; }

.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; }
.msg-in { background: var(--wash); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg-out { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; align-self: flex-end; }
.msg strong { font-weight: 600; }
.msg ol { margin: 6px 0 0; padding-left: 20px; }
.msg li { margin: 2px 0; }
.msg li::marker { font-weight: 600; }
.msg-reply { font-weight: 600; font-size: 17px; min-width: 44px; text-align: center; }

/* ---------- Home: sections ---------- */

.section { padding: 72px 0; border-top: 1px solid var(--rule); }

.section h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin-bottom: 14px;
}

.section .intro { color: var(--muted); max-width: 60ch; margin-bottom: 40px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 14px;
}
.steps h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.steps p { color: var(--muted); }

/* The Google data section is what a verification reviewer reads: every
   permission, why it is asked for, and when it is used. */
.perms { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); font-size: 16px; }
.perms th, .perms td { text-align: left; vertical-align: top; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.perms thead th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--wash); border-bottom-color: var(--border); }
.perms tbody tr:last-child > * { border-bottom: 0; }
.perms tbody th { font-weight: 600; width: 30%; }
.perms td:last-child { width: 24%; color: var(--muted); }

.promise { margin-top: 28px; max-width: 70ch; }
.promise p + p { margin-top: 10px; }

.closing { text-align: center; }
.closing h2 { margin-bottom: 24px; }

/* ---------- Footer ---------- */

.site-foot { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ---------- Legal pages ---------- */

.doc {
  width: min(760px, 100% - 32px);
  margin: 0 auto 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 48px 56px;
  font-size: 16px;
}

.doc h1 { font-family: var(--serif); font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 6px; }
.doc .effective { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.doc h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 36px 0 10px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}
.doc h3 { font-size: 16px; font-weight: 600; margin: 22px 0 6px; }
.doc p, .doc ul { margin-bottom: 12px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--muted); }
.doc strong { font-weight: 600; }

.doc .summary { background: var(--wash); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 22px 8px; }
.doc .summary h2 { border: 0; margin: 0 0 8px; padding: 0; font-size: 18px; }

.legal-body .site-foot { margin-top: 32px; }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .hero { padding: 24px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 56px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-top .brand img { width: 88px; }
  .site-nav { flex-wrap: nowrap; gap: 16px; }
  .site-nav .nav-wide { display: none; }
  .hero .lede { font-size: 18px; }
  .perms, .perms thead, .perms tbody, .perms tr, .perms th, .perms td { display: block; width: auto !important; }
  .perms thead { display: none; }
  .perms tr { padding: 14px 18px; border-bottom: 1px solid var(--rule); }
  .perms tbody tr:last-child { border-bottom: 0; }
  .perms th, .perms td { padding: 0; border: 0; }
  .perms td { margin-top: 4px; }
  .perms td:last-child { font-size: 14px; }
  .doc { padding: 28px 20px; font-size: 15px; }
  .doc h1 { font-size: 29px; }
}
