/* theme.css — Nightstand reading list: warm paper, oxblood ink, serif display. */
/* 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: #f6f1e6;
  --surface: #fffdf8;
  --surface-2: #efe7d7;
  --border: #ded2bd;
  --border-strong: #bda98e;
  --ink: #2a2018;
  --muted: #6b5d4b;
  --accent: #7c2d1c;
  --accent-hover: #622315;
  --accent-ink: #fff7f0;
  --accent-text: #7c2d1c;
  --accent-strong: #591c10;
  --accent-soft: #f3e2d7;
  --accent-border: #d8b09b;
  --success: #2e6a45;
  --success-ink: #ffffff;
  --success-soft: #dee1d3;
  --success-strong: #2e6a45;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #eedecb;
  --warning-strong: #994607;
  --danger: #a5231c;
  --danger-ink: #ffffff;
  --danger-soft: #ecd8ce;
  --danger-strong: #a5231c;
  --chart-1: #7c2d1c;
  --chart-2: #766103;
  --chart-3: #0b5c32;
  --chart-4: #0e6689;
  --chart-5: #503b8d;
  --chart-6: #9d5191;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --display-weight: 600;
  --display-tracking: -0.015em;
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-input: 10px;
  --card-pad: 1.25rem;
  --x-ribbon: linear-gradient(180deg, #f3e7d3 0%, #efe2c9 100%);
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #110604;
  --surface: #291f1d;
  --surface-2: #1d1211;
  --border: #322927;
  --border-strong: #58514f;
  --ink: #f6f1e6;
  --muted: #9a938c;
  --accent: #7c2d1c;
  --accent-hover: #904d3e;
  --accent-ink: #ffffff;
  --accent-text: #b07f75;
  --accent-strong: #a97469;
  --accent-soft: #290f09;
  --accent-border: #41180f;
  --success: #2e6a45;
  --success-ink: #ffffff;
  --success-soft: #171c12;
  --success-strong: #69947b;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #351705;
  --warning-strong: #c57a40;
  --danger: #a5231c;
  --danger-ink: #ffffff;
  --danger-soft: #320c09;
  --danger-strong: #c46f69;
  --chart-1: #a95643;
  --chart-2: #a68905;
  --chart-3: #2f965b;
  --chart-4: #2195ab;
  --chart-5: #6978cd;
  --chart-6: #b769a9;
}

/* app.css — paper grain, the read-mark control, shelf motion. Compiled last. */

html {
  background-image:
    radial-gradient(circle at 18% 12%, rgba(124, 45, 28, 0.05), transparent 42%),
    radial-gradient(circle at 84% 78%, rgba(42, 32, 24, 0.06), transparent 46%);
  background-attachment: fixed;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
}

.mark {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  margin-top: 0.15rem;
  border-radius: 999px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mark:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mark[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.mark .icon {
  width: 1rem;
  height: 1rem;
}

.mark:focus-visible,
.shelf-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shelf-item[data-read="true"] .shelf-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.progress-track {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.35s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .shelf-item {
    animation: shelf-in 0.32s ease both;
  }

  .progress-fill {
    animation: fill-in 0.6s ease both;
  }
}

html.reduced-motion .shelf-item,
html.reduced-motion .progress-fill {
  animation: none;
}

@keyframes shelf-in {
  from {
    transform: translateY(8px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fill-in {
  from {
    transform: scaleX(0.75);
    transform-origin: left center;
  }
  to {
    transform: scaleX(1);
    transform-origin: left center;
  }
}