/*
  Yeetlist website styles, shared by every page in docs/.
  No external fonts, images or scripts. Light and dark follow the system setting.
*/

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --accent: #4F46E5;          /* brand accent: links, icons, progress */
  --accent-hover: #4338CA;
  --accent-soft: #EEF0FF;     /* tinted backgrounds behind icons */
  --on-accent: #FFFFFF;       /* text on accent-filled buttons */

  --bg: #FFFFFF;
  --bg-tint: #F7F7FC;         /* alternating page bands */
  --surface: #FFFFFF;         /* cards */
  --surface-sunken: #F1F1F6;  /* progress track, code */
  --text: #121218;
  --text-muted: #52525E;
  --border: #E3E3EB;
  --shadow: 0 1px 2px rgb(18 18 24 / 0.06), 0 12px 32px rgb(18 18 24 / 0.08);

  /* Item states (same in light and dark) */
  --st-done: #34C759;
  --st-na: #FF3B30;
  --st-unsure: #8E8E93;
  --st-open: #C7C7CC;

  /* Messages mock-up on the landing page */
  --bubble-in: #E9E9EB;
  --bubble-in-text: #000000;
  --bubble-out: #0A7CFF;
  --bubble-out-text: #FFFFFF;

  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1080px;
  --gutter: 16px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7B73FF;
    --accent-hover: #968FFF;
    --accent-soft: rgb(123 115 255 / 0.16);
    --on-accent: #0B0B14;

    --bg: #0B0B12;
    --bg-tint: #111119;
    --surface: #17171F;
    --surface-sunken: #24242E;
    --text: #F3F3F7;
    --text-muted: #A9A9B8;
    --border: #2A2A36;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.35);

    --bubble-in: #26252B;
    --bubble-in-text: #FFFFFF;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-soft); /* visible placeholder until the icon file exists */
}
.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0; padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: var(--surface-sunken); }
.site-nav a[aria-current="page"] { color: var(--text); }

@media (max-width: 379px) {
  .brand { gap: 8px; }
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 8px 6px; font-size: 0.95rem; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent-hover); color: var(--on-accent); }
.button-lg { min-height: 52px; padding: 14px 26px; font-size: 1.0625rem; }
@media (max-width: 379px) {
  .button-lg { padding: 14px 18px; font-size: 1rem; }
}
.button-secondary {
  background: var(--surface-sunken);
  color: var(--text);
}
.button-secondary:hover { background: var(--border); color: var(--text); }
.button svg { width: 18px; height: 18px; flex: none; }

/* ---------- Landing: hero ---------- */
.hero { padding: 48px 0 56px; }
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
.app-icon {
  width: 96px; height: 96px;
  border-radius: 22px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent), #8B5CF6); /* placeholder until icon-512.png exists */
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.lead {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  color: var(--text-muted);
  max-width: 36em;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 28px;
}
.cta-note { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

@media (min-width: 880px) {
  .hero { padding: 72px 0 80px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
}

/* ---------- Landing: Messages mock-up ---------- */
.chat-mock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--bg-tint);
  box-shadow: var(--shadow);
  font-size: 0.97rem;
  line-height: 1.35;
}
.msg {
  max-width: 78%;
  padding: 8px 14px;
  border-radius: 20px;
}
.msg-in {
  align-self: flex-start;
  background: var(--bubble-in);
  color: var(--bubble-in-text);
  border-bottom-left-radius: 6px;
}
.msg-out {
  align-self: flex-end;
  background: var(--bubble-out);
  color: var(--bubble-out-text);
  border-bottom-right-radius: 6px;
}
.ld-bubble {
  align-self: flex-end;
  width: 82%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
}
.ld-bubble-body { padding: 14px 16px 10px; }
.ld-title { margin: 0 0 8px; font-weight: 700; font-size: 1.05rem; }
.ld-count { margin: 6px 0 8px; color: var(--text-muted); font-size: 0.85rem; }
.ld-items { margin: 0; padding: 0; list-style: none; }
.ld-items li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.ld-items .status-icon { width: 20px; height: 20px; }
.ld-more { margin: 4px 0 0 30px; color: var(--text-muted); font-size: 0.85rem; }
.ld-caption {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.ld-caption strong { color: var(--text); font-weight: 600; }

/* ---------- Shared: progress bar & status icons ---------- */
.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-sunken);
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
}
.progress-fill.w-50 { width: 50%; }

.status-icon { flex: none; width: 24px; height: 24px; }

.is-done .item-text,
.is-na .item-text {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  color: var(--text-muted);
}

/* ---------- Landing: sections ---------- */
.section { padding: 64px 0; }
.section-tint { background: var(--bg-tint); border-block: 1px solid var(--border); }
.section-head { max-width: 40em; margin-bottom: 32px; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }

.feature-grid {
  display: grid;
  gap: 16px;
  margin: 0; padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.feature h3 { margin-top: 14px; }
.feature p { margin: 0; color: var(--text-muted); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.feature-icon svg { width: 24px; height: 24px; }

.steps {
  display: grid;
  gap: 16px;
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--text-muted); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px; padding: 0;
  list-style: none;
}
.chips li {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 500;
}

.split {
  display: grid;
  gap: 32px;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
}
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li {
  position: relative;
  padding: 6px 0 6px 32px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 6px; top: calc(0.62em + 5px);
  width: 8px; height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Prose pages (privacy, support) ---------- */
.page { padding: 48px 0 72px; }
.prose { max-width: 44rem; }
.prose h1 { font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem); }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; scroll-margin-top: 16px; }
.prose h3 { margin-top: 1.8em; scroll-margin-top: 16px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin: 0.35em 0; }
.prose .meta { color: var(--text-muted); }
.prose code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface-sunken);
  font-size: 0.92em;
}
.summary-box {
  margin: 24px 0 8px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-tint);
}
.summary-box p:last-child, .summary-box ul:last-child { margin-bottom: 0; }
.toc {
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.toc h2 { margin: 0 0 8px; font-size: 1rem; }
.toc ol { margin: 0; }
.contact-card {
  margin-top: 40px;
}
.contact-card h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 12px; padding: 0;
  list-style: none;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0 0 6px; }
.legal { font-size: 0.82rem; }

/* ---------- List viewer (l/index.html) ---------- */
.viewer-main {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
}
.list-card { padding: 24px 20px 20px; box-shadow: var(--shadow); }
@media (min-width: 480px) {
  .list-card { padding: 28px 28px 24px; }
}
.list-card h1 {
  font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.1rem);
  overflow-wrap: anywhere;
}
.progress-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 8px;
}
.progress-label { margin: 0; font-weight: 600; }
.breakdown { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.items { margin: 16px 0 0; padding: 0; list-style: none; }
.items li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.items li:last-child { border-bottom: 0; }
.items .status-icon { margin-top: 1px; }
.item-text {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.item-text.is-blank { color: var(--text-muted); font-style: italic; }
.empty-note { margin: 16px 0 0; color: var(--text-muted); }
.list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.updated { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.copy-status { flex-basis: 100%; margin: 0; min-height: 1.6em; color: var(--text-muted); font-size: 0.92rem; }
.copy-status:empty { min-height: 0; }
.state-card { text-align: center; padding: 36px 24px; }
.state-card h1 { font-size: 1.6rem; }
.state-card p { color: var(--text-muted); }
.state-card p:last-child { margin-bottom: 0; }
.viewer-cta {
  margin-top: 20px;
  text-align: center;
}
.viewer-cta p { color: var(--text-muted); margin-bottom: 14px; }
.viewer-note {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}

/* ---------- Sample/test page ---------- */
.sample-links { padding-left: 1.2em; }
.sample-links li { margin: 0.5em 0; }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .site-nav a { transition: background-color 0.15s ease, color 0.15s ease; }
}

@media print {
  .site-header, .site-footer, .viewer-cta, .list-footer button, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}
