/* ChatAgain's pages (thisbrain.ai/chatagain/): the app icon's indigo and coral, with a light
   variant for people who prefer one. Same page structure as the LocalLM Lab and AnswerSearch pages. */
:root {
  color-scheme: dark light;
  --bg: #17152f;
  --card: #221f47;
  --border: #34305c;
  --text: #f1ece2;
  --muted: #aaa5c0;
  --accent: #ff8a6b;
  --on-accent: #1d1a3f;
  --link: #ff8a6b;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f4ee;
    --card: #ffffff;
    --border: #dedae6;
    --text: #1d1a3f;
    --muted: #5c5873;
    --link: #a63d24;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and footer */
.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.brand img { width: 30px; height: 30px; border-radius: 7px; }

.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }

.site-footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a { color: var(--muted); margin: 0 10px; }
.site-footer a:hover { color: var(--text); }

main { max-width: 920px; margin: 0 auto; padding: 0 16px 24px; }
main.narrow { max-width: 760px; }

/* Home */
.hero { text-align: center; padding: 40px 0 24px; }
.hero img { width: 128px; height: 128px; border-radius: 29px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
.hero h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.1; margin: 20px 0 12px; font-weight: 800; }
.kicker { color: var(--accent); font-weight: 600; font-size: 17px; margin: 0 0 12px; }
@media (prefers-color-scheme: light) { .kicker { color: var(--link); } }
.lede { font-size: clamp(18px, 3vw, 21px); color: var(--muted); max-width: 820px; margin: 0 auto 24px; text-wrap: balance; }

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.btn[aria-disabled="true"] { cursor: default; opacity: 0.92; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.fine { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

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

.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.tile h3 { margin: 0 0 6px; font-size: 17px; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }

a.tile { display: block; text-decoration: none; color: inherit; }
a.tile:hover { border-color: var(--accent); }
a.tile strong { display: block; color: var(--link); margin-bottom: 4px; }
a.tile span { color: var(--muted); font-size: 14px; }

section.band { margin: 48px 0; }
section.band > h2 { font-size: 26px; margin: 0 0 8px; }
section.band > p { color: var(--muted); max-width: 680px; }
section.band > ul, section.band > ol { max-width: 680px; }

/* Text pages */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(20px, 5vw, 40px);
}

h1 { font-size: 30px; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 20px; margin: 36px 0 8px; line-height: 1.3; }
h3 { font-size: 16px; margin: 24px 0 4px; }
.note { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
p, li { font-size: 16px; }
li { margin: 4px 0; }
code { font-size: 0.9em; background: color-mix(in srgb, var(--text) 10%, transparent); padding: 1px 6px; border-radius: 5px; word-break: break-word; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 15px; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
thead th { font-size: 14px; color: var(--muted); font-weight: 600; }
td.yes { color: var(--accent); font-weight: 700; }
@media (prefers-color-scheme: light) { td.yes { color: var(--link); } }

/* The privacy page's three-column table: a wide middle column */
table.flows th:first-child { width: 22%; }
table.flows th:last-child, table.flows td:last-child { width: 24%; }
table.flows { min-width: 620px; }

@media (max-width: 560px) {
  th, td { padding: 8px 10px; font-size: 14px; }
  .site-header { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* User guide: screenshots, and the grey placeholders that stand in until they are supplied */
figure.shot { margin: 16px 0 24px; }
figure.shot img, figure.shot .placeholder { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 12px; }
figure.shot .placeholder { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; background: color-mix(in srgb, var(--text) 8%, var(--card)); color: var(--muted); font-size: 14px; }
figure.shot figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }
ol.steps { padding-left: 22px; }
