/*
  TEMPLATE STYLES: These styles are used as a base template.
  AI is allowed to modify these styles as needed.
*/
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700;9..144,900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap");


body {
  font-family: "Inter", sans-serif;
  overflow-x: clip;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.font-display {
  font-family: "Fraunces", Georgia, serif;
}

.font-mono-num {
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.marker-underline {
  background-image: linear-gradient(hsl(var(--accent-warm) / 0.55), hsl(var(--accent-warm) / 0.55));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 0.38em;
  padding: 0 0.06em;
}

.grain {
  background-image: radial-gradient(hsl(var(--ink) / 0.16) 1px, transparent 1px);
  background-size: 4px 4px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-track {
  animation: ticker 32s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* Article / single post detail page — lightweight editorial layout
   that maps cleanly to a WordPress single.php template. */
.article-title {
  font-size: clamp(2.125rem, 3.2vw, 3.25rem); /* ~34px mobile → ~52px desktop */
  line-height: 1.12;
}

@media (min-width: 640px) {
  .article-title { font-size: clamp(2.25rem, 3.6vw, 3.25rem); } /* ~36px → ~52px */
}

/* ── Book review reading typography ──────────────────────────────── */
.article-body p {
  font-size: 1.125rem;
  line-height: 1.78;
  color: hsl(var(--ink) / 0.86);
}

.article-body p + p {
  margin-top: 1.4em;
}

.article-body h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: hsl(var(--ink));
  margin-top: 2.4em;
  margin-bottom: 0.6em;
}

.article-body h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  font-weight: 600;
  line-height: 1.3;
  color: hsl(var(--ink));
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

/* Spoiler-light section — subtle, never alarming */
.spoiler-block {
  border: 1px solid hsl(var(--ink) / 0.14);
  border-left: 3px solid hsl(var(--ink) / 0.4);
  border-radius: var(--radius);
  background: hsl(var(--paper));
  padding: 1.5rem 1.5rem 1.25rem;
}

.spoiler-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--ink) / 0.62);
}

.spoiler-label::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: hsl(var(--ink) / 0.4);
}

/* Book cover frame — subtle paper shadow, never ecommerce */
.book-cover {
  display: block;
  border-radius: 4px;
  box-shadow: 0 1px 2px hsl(var(--ink) / 0.08), 0 8px 24px -12px hsl(var(--ink) / 0.28);
}

/*
  ---break---
*/

@layer base {
  :root {
    --background: 38 44% 96%;
    --foreground: 24 18% 12%;
    --card: 0 0% 100%;
    --card-foreground: 24 18% 12%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 24 18% 12%;
    --primary-foreground: 38 44% 97%;
    --secondary: 36 30% 91%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 36 26% 92%;
    --muted-foreground: 26 10% 40%;
    --accent: 36 30% 91%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 30 16% 86%;
    --input: 30 16% 86%;
    --ring: 24 18% 12%;
    --radius: 0.35rem;
    --ink: 24 18% 12%;
    --accent-warm: 32 96% 56%;
    --paper: 38 44% 96%;
    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
  .dark {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}
