/* Direction: Fieldnote — oat paper stationery, one deep forest green, Fraunces serif headings */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #f4ecdd;
  --surface: #fdfaf2;
  --surface-2: #eae0cb;
  --border: #dccfb5;
  --border-strong: #aca89d;
  --ink: #241f18;
  --muted: #6b6052;
  --accent: #1f4a33;
  --accent-hover: #1a3f2b;
  --accent-ink: #ffffff;
  --accent-text: #1d4530;
  --accent-strong: #15331f;
  --accent-soft: #e2eadf;
  --accent-border: #94a391;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #d9dfca;
  --success-strong: #116d34;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #ecdac4;
  --warning-strong: #994607;
  --danger: #8f3220;
  --danger-ink: #ffffff;
  --danger-soft: #e8d6c6;
  --danger-strong: #8f3220;
  --chart-1: #1f4a33;
  --chart-2: #105f85;
  --chart-3: #55398b;
  --chart-4: #872c55;
  --chart-5: #753b03;
  --chart-6: #646d11;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", system-ui, sans-serif;
  --display-weight: 600;
  --display-tracking: -0.02em;
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-input: 10px;
  --card-pad: 1.6rem;
  --shadow-card: 0 1px 2px rgba(36, 31, 24, 0.05), 0 18px 40px -26px rgba(36, 31, 24, 0.4);
  --x-on-photo: #ffffff;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Karla", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #040a07;
  --surface: #1d2320;
  --surface-2: #111613;
  --border: #272c2a;
  --border-strong: #4f5451;
  --ink: #f4ecdd;
  --muted: #949287;
  --accent: #1f4a33;
  --accent-hover: #416552;
  --accent-ink: #ffffff;
  --accent-text: #779084;
  --accent-strong: #6b8679;
  --accent-soft: #0a1811;
  --accent-border: #10271b;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #082413;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #2b1a07;
  --warning-strong: #c57a40;
  --danger: #8f3220;
  --danger-ink: #ffffff;
  --danger-soft: #23130d;
  --danger-strong: #b5786c;
  --chart-1: #4c775e;
  --chart-2: #0995b2;
  --chart-3: #6f76cc;
  --chart-4: #b15f9b;
  --chart-5: #c06143;
  --chart-6: #978317;
}

/* Fieldnote — paper grain, question slide-in, stars, copied tick */

.paper {
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.018) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.014) 0 1px, transparent 1px 7px);
}

.rule-line {
  height: 1px;
  background: var(--border);
}

/* cards lift on hover, questions slide in */
.q-card {
  animation: q-in 0.5s cubic-bezier(0.22, 0.7, 0.2, 1) both;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.q-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
@keyframes q-in {
  from {
    transform: translateX(-18px);
  }
}
html.reduced-motion .q-card {
  animation: none;
}
html.reduced-motion .q-card:hover {
  transform: none;
}

/* star rating */
.stars {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.stars .star {
  cursor: pointer;
  color: var(--border);
  transition: transform 0.16s ease, color 0.16s ease;
  line-height: 0;
}
.stars .star .icon {
  width: 1.9rem;
  height: 1.9rem;
}
.stars .star:hover {
  transform: scale(1.14) rotate(-4deg);
}
.stars[data-val="1"] .star:nth-child(-n + 1),
.stars[data-val="2"] .star:nth-child(-n + 2),
.stars[data-val="3"] .star:nth-child(-n + 3),
.stars[data-val="4"] .star:nth-child(-n + 4),
.stars[data-val="5"] .star:nth-child(-n + 5) {
  color: var(--accent);
}
.stars .star:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}
html.reduced-motion .stars .star:hover {
  transform: none;
}

/* choice rows */
.choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.choice:hover {
  transform: translateX(3px);
  border-color: var(--accent);
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.choice:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
html.reduced-motion .choice:hover {
  transform: none;
}

/* copied tick pops */
.copy-tick {
  display: none;
}
.is-copied .copy-tick {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  animation: tick-pop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.is-copied .copy-label {
  display: none;
}
@keyframes tick-pop {
  0% {
    transform: scale(0.45);
  }
  60% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}
html.reduced-motion .is-copied .copy-tick {
  animation: none;
}

/* charts */
.bar-track {
  background: var(--surface-2);
}
.bar-fill {
  background: var(--accent);
  transition: width 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
