/* ════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ════════════════════════════════════════════════════════════════════════ */
:root {
  --ink:        #1C2B3A;   /* primary text, dark chrome */
  --ink-soft:   #3D4F5E;   /* secondary text */
  --gold:       #C98A3E;   /* single accent — permission, momentum */
  --gold-deep:  #A66E2C;
  --gold-pale:  #F3E3CC;
  --paper:      #FAF6F0;   /* warm background */
  --paper-deep: #F0E9DD;   /* card background on paper */
  --thread:     #D9CFC0;   /* the connecting line between cards */
  --good:       #3F7D58;   /* confirmation green, used sparingly */
  --good-pale:  #E3EFE7;
  --white:      #FFFFFF;

  --f-xs:   14px;
  --f-sm:   16px;
  --f-base: 18px;
  --f-lg:   21px;
  --f-xl:   26px;
  --f-xxl:  30px;

  --radius: 18px;
  --radius-sm: 12px;

  --font-display: Arial, Helvetica, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
}

/* Accessibility mode override — bumps size, flattens contrast further, widens line-height */
body[data-a11y="on"] {
  --f-xs:   17px;
  --f-sm:   19px;
  --f-base: 21px;
  --f-lg:   25px;
  --f-xl:   30px;
  --f-xxl:  34px;
  --ink-soft: #1C2B3A;
}
body[data-a11y="on"] .card-body,
body[data-a11y="on"] .q-list li,
body[data-a11y="on"] .accom-list li {
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ════════════════════════════════════════════════════════════════════════
   BASE / SHELL
   ════════════════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--f-base);
  background: var(--ink);
  color: var(--ink);
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.app {
  width: 100%;
  max-width: 480px;
  height: 100%;
  min-height: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ── Top bar: brand + accessibility toggle, always visible, minimal ── */
.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink);
}
.brand {
  font-family: var(--font-display);
  font-size: var(--f-sm);
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.01em;
}
.brand .reg { font-size: 0.6em; vertical-align: super; }

.a11y-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--f-xs);
  font-weight: 600;
  cursor: pointer;
}
.a11y-btn.is-on {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.a11y-btn:active { transform: scale(0.96); }

/* ── Thread: the scrollable conversation area ── */
.thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 18px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* spine removed per feedback — cards now rely on spacing alone */

/* ════════════════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════════════════ */
.turn {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  animation: settle 0.35s ease both;
}
/* dot marker removed per feedback */
@keyframes settle {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-left: 0;
  box-shadow: 0 1px 2px rgba(28,43,58,0.06);
  border: 1px solid rgba(28,43,58,0.06);
}
.card.dot {
  position: relative;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--f-xl);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 8px;
}
.card-sub {
  font-size: var(--f-sm);
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 4px;
}
.card-body {
  font-size: var(--f-sm);
  color: var(--ink);
  line-height: 1.6;
}

.card.tip {
  background: var(--gold-pale);
  border-color: rgba(201,138,62,0.25);
}
.card.tip .card-eyebrow { color: var(--gold-deep); }

.card.good {
  background: var(--good-pale);
  border-color: rgba(63,125,88,0.25);
}

.card-eyebrow {
  font-size: var(--f-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

/* simple lists inside cards */
.accom-list, .q-list { list-style: none; margin-top: 10px; }
.accom-list li, .q-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  font-size: var(--f-sm);
  color: var(--ink);
  line-height: 1.5;
  border-bottom: 1px solid var(--paper-deep);
}
.accom-list li:last-child, .q-list li:last-child { border-bottom: none; }
.dot-bullet {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0; margin-top: 7px;
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSE CONTROLS — the tappable "answer" beneath a statement card
   ════════════════════════════════════════════════════════════════════════ */
.responses {
  margin-left: 0;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resp-btn {
  text-align: left;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: var(--f-sm);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 0 rgba(28,43,58,0.12);
}
.resp-btn::after {
  content: '→';
  margin-left: auto;
  color: var(--gold-deep);
  font-weight: 700;
  flex-shrink: 0;
}
.resp-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 1px 0 rgba(28,43,58,0.12);
}
.resp-btn .emoji { font-size: 1.3em; flex-shrink: 0; }
.resp-btn .meta { font-size: var(--f-xs); color: var(--ink-soft); display: block; margin-top: 2px; }

.resp-btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  font-weight: 700;
  justify-content: center;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
}
.resp-btn.primary::after { content: none; }

/* the chosen button stays in place, marked instead of being removed */
.resp-btn.selected {
  background: var(--gold-pale);
  border-color: var(--gold);
  color: var(--ink);
}
.resp-btn.selected::after { content: '✓'; color: var(--gold-deep); }


/* ════════════════════════════════════════════════════════════════════════
   FOOTER — disclaimer, shown once at the very end of the thread
   ════════════════════════════════════════════════════════════════════════ */
.card-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 200px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.disclaimer {
  margin-left: 0;
  margin-top: 8px;
  font-size: var(--f-xs);
  color: var(--ink-soft);
  line-height: 1.55;
  padding: 12px 14px;
  background: var(--paper-deep);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--thread);
}

/* utility */
.hidden { display: none !important; }
