@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap");

/* ────────────────────────────────────────────
   Theme: Gavin Hao Digital Garden — Subpage
   ──────────────────────────────────────────── */

:root {
  --deep-sea: #0A192F;
  --deep-sea-2: #0D1E3A;
  --deep-sea-3: #12243D;
  --ocean-blue: #2B5FDE;
  --warm-gold: #D4A373;
  --garden-green: #2D6A4F;
  --warm-cream: #F5F0EB;
  --paper-white: #FDFCF8;
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-muted: #8A8AA0;
  --text-light: #F0F0F5;
  --text: #F0F0F5;
  --surface: rgba(255, 255, 255, 0.08);
  --accent-rose: #8B1545;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-light: rgba(253, 252, 248, 0.88);
  --border: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(212, 163, 115, 0.42);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
  --shadow-hover: 0 24px 70px rgba(10, 25, 47, 0.22);
  --shadow-dark: 0 28px 80px rgba(0, 0, 0, 0.24);
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Playfair Display", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--deep-sea);
}

html.page-transition-preload body {
  opacity: 0;
}

html.page-transition-preload::before,
html.page-transition-entering::before,
html.page-transition-leaving::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 16%, rgba(212, 163, 115, 0.2), transparent 30rem),
    radial-gradient(circle at 80% 12%, rgba(45, 106, 79, 0.2), transparent 28rem),
    linear-gradient(180deg, var(--deep-sea) 0%, var(--deep-sea-2) 58%, var(--deep-sea-3) 100%);
  opacity: 1;
}

html.page-transition-entering::before {
  opacity: 0;
  transition: opacity 260ms ease;
}

html.page-transition-leaving::before {
  animation: siteTransitionIn 180ms ease both;
}

html.page-transition-leaving body.page-leaving::after {
  opacity: 0;
}

@keyframes siteTransitionIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
   1. BODY — deep blue gradient + grid texture overlay
   ============================================================ */
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: block;
  overflow-x: hidden;
  font-family: var(--font-serif);
  color: var(--text-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 18% 12%, rgba(212, 163, 115, 0.12), transparent 28rem),
    radial-gradient(circle at 86% 6%, rgba(43, 95, 222, 0.15), transparent 30rem),
    linear-gradient(180deg, var(--deep-sea) 0%, var(--deep-sea-2) 58%, var(--deep-sea-3) 100%);
  animation: subpageEnter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.08) 42.2%, transparent 43%),
    radial-gradient(circle, rgba(255, 255, 255, 0.34) 1px, transparent 1.5px);
  background-size: 620px 420px, 34px 34px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.68) 46%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: var(--deep-sea);
  opacity: 0;
  transition: opacity 220ms ease;
}

/* ============================================================
   SCROLL ANIMATION — .visible class + IntersectionObserver
   ============================================================ */
article,
.panel,
.verdict,
.tool-card,
.project-card,
.stat-card,
.input-area,
.summary-panel,
.uc-wrap,
.note-card,
.card,
.hero-component {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   2. CONTAINER / .dns-page — content containers
   ============================================================ */
.container,
.dns-page {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 44px));
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(5.8rem, 10vh, 8rem) 0 44px;
}

/* ============================================================
   3. .back-link / .tool-nav — pill-shaped back buttons
   ============================================================ */
.back-link,
.tool-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 2.25rem;
  color: rgba(240, 240, 245, 0.74);
  position: relative;
  z-index: 1;
}

.back-link a,
.tool-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.5rem 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(240, 240, 245, 0.82);
  text-decoration: none;
  background: rgba(10, 25, 47, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    background 0.22s ease;
}

.back-link a:hover,
.tool-nav a:hover {
  color: var(--warm-gold);
  border-color: rgba(212, 163, 115, 0.46);
  background: rgba(10, 25, 47, 0.62);
  transform: translateY(-1px);
}

/* ============================================================
   4. .article-header — left gold vertical line + heading
   ============================================================ */
.article-header {
  position: relative;
  max-width: 860px;
  margin: 0 0 3rem;
  padding-left: 2rem;
  z-index: 1;
}

.article-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 2px;
  height: calc(100% - 0.5rem);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(212, 163, 115, 0.92), rgba(212, 163, 115, 0));
}

.article-header h1 {
  margin: 0;
  color: var(--text-light);
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: 0;
}

/* ============================================================
   5. .article-meta / .section-label — labels
   ============================================================ */
.article-meta,
.section-label {
  margin-top: 1rem;
  color: rgba(240, 240, 245, 0.62);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0;
}

/* ============================================================
   6. article, .panel, .verdict — glassmorphism cards
   ============================================================ */
article,
.panel,
.verdict,
.project-card,
.tool-card,
.stat-card,
.timer-wrap,
.input-area,
.summary-panel,
.uc-wrap,
.card {
  position: relative;
  z-index: 1;
  color: var(--text-primary);
  background: var(--glass-light);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

article {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(2rem, 5vw, 3.75rem);
}

.container > .article-header:has(+ main article) {
  margin-left: auto;
  margin-right: auto;
}

article p {
  margin: 0 0 1.15rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

article h2 {
  margin: 2.4rem 0 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
}

/* ============================================================
   7. .tool-card — hover float cards
   ============================================================ */
.projects {
  margin: 0 0 3rem;
  position: relative;
  z-index: 1;
}

.projects .section-label {
  color: rgba(212, 163, 115, 0.84);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.tool-card {
  display: block;
  min-height: 180px;
  padding: 1.45rem;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.tool-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tool-icon {
  color: var(--warm-gold);
}

.tool-card h4,
.tool-card p,
.tool-link {
  color: inherit;
}

.tool-card h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.tool-card p {
  color: var(--text-secondary);
  font-family: var(--font-serif);
}

.tool-link,
.card-link {
  color: var(--warm-gold);
  text-decoration: none;
  font-weight: 600;
}

/* ============================================================
   8. .timer-wrap, .timer-btn, buttons — unified button styles
   ============================================================ */
.timer-wrap,
.input-area,
.summary-panel,
.verdict,
.panel {
  margin-bottom: 1rem;
}

.timer-wrap {
  padding: 2.5rem 1.5rem;
}

.timer-ring .track {
  stroke: rgba(10, 25, 47, 0.12);
}

.timer-ring .progress {
  stroke: var(--warm-gold);
}

.timer-display {
  color: var(--text-primary);
}

.timer-mode,
.stat-label,
.label {
  color: var(--text-muted);
}

.timer-btn,
.mode-btn,
button,
.switch-link,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.6rem 1.2rem;
  border: 1px solid;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.timer-btn.primary,
button,
.btn {
  border-color: var(--deep-sea);
  background: var(--deep-sea);
  color: #fff;
}

.timer-btn,
.mode-btn.active,
button.secondary,
.switch-link {
  border-color: rgba(10, 25, 47, 0.12);
  background: rgba(253, 252, 248, 0.72);
  color: var(--text-primary);
}

.timer-btn:hover,
.mode-btn:hover,
button:hover,
.switch-link:hover,
.btn:hover {
  border-color: var(--warm-gold);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212, 163, 115, 0.15);
}

/* ============================================================
   STATS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-card {
  padding: 1.3rem 1rem;
}

.stat-value {
  color: var(--deep-sea);
  font-family: var(--font-serif);
  font-weight: 600;
}

/* ============================================================
   TEXTAREA
   ============================================================ */
textarea {
  color: var(--text-primary);
  background: var(--glass-light);
  border: 1px solid rgba(10, 25, 47, 0.1);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-serif);
  font-size: 0.875rem;
  line-height: 1.6;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--warm-gold);
  box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.12);
}

/* ============================================================
   DNS PAGE
   ============================================================ */
.dns-page {
  max-width: 1120px;
}

.header-row {
  gap: 1.25rem;
}

.panel,
.verdict {
  padding: 1.5rem;
}

.metric,
.table-wrap,
.hosts {
  color: var(--text-primary);
}

.value,
.verdict h2,
.panel h2 {
  color: var(--deep-sea);
  font-family: var(--font-serif);
}

.verdict p {
  color: var(--text-secondary);
}

table {
  color: var(--text-primary);
  width: 100%;
  border-collapse: collapse;
}

th {
  color: var(--text-muted);
  font-weight: 500;
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(10, 25, 47, 0.08);
}

td {
  color: var(--text-secondary);
  padding: 0.75rem;
  border-bottom: 1px solid rgba(10, 25, 47, 0.04);
}

/* ============================================================
   10. .error-code, .hero-component, .uc-wrap — error/construction
   ============================================================ */
.error-code {
  margin: 0 0 -0.9rem;
  color: rgba(212, 163, 115, 0.46);
  font-family: var(--font-serif);
  font-size: clamp(5.5rem, 16vw, 11rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0;
}

.container:has(.error-code) {
  min-height: 100vh;
  max-width: 960px;
  padding: clamp(4rem, 8vh, 6rem) 0 2.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-component {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  margin: 0 0 1.6rem;
  padding: clamp(2rem, 5vw, 3.25rem);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(10, 25, 47, 0.72);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-border {
  display: none;
}

.hero-quote,
.hero-quote em {
  margin: 0;
  color: var(--text-light);
  font-style: normal;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.35;
}

.quote-mark {
  color: var(--warm-gold);
  opacity: 0.7;
  font-family: var(--font-serif);
}

.hero-body {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-body p {
  color: rgba(240, 240, 245, 0.68);
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.btn,
.uc-back {
  min-height: 44px;
  padding: 0.72rem 1.55rem;
  border: 1px solid rgba(212, 163, 115, 0.46);
  border-radius: 999px;
  color: var(--deep-sea);
  background: rgba(245, 240, 235, 0.96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  font-family: var(--font-serif);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.btn:hover,
.uc-back:hover {
  color: var(--deep-sea);
  background: var(--warm-gold);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(212, 163, 115, 0.25);
}

.uc-wrap {
  min-height: 56vh;
  padding: clamp(2.5rem, 7vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.uc-title {
  color: var(--deep-sea);
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 600;
}

.uc-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.uc-back {
  margin-top: 1.5rem;
}

/* ============================================================
   9. FOOTER — centered footer
   ============================================================ */
footer {
  position: relative;
  z-index: 1;
  margin-top: 4rem;
  padding: 2rem 0 0;
  color: rgba(240, 240, 245, 0.52);
  text-align: center;
  font-size: 0.75rem;
}

footer p {
  margin: 0;
  color: inherit;
  line-height: 1.8;
}

footer a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

footer a:hover {
  color: var(--warm-gold);
  text-decoration: underline;
  opacity: 0.8;
}

footer img {
  vertical-align: -3px;
  margin: 0 2px 0 4px;
  opacity: 0.65;
}

.container:has(.error-code) footer,
.container:has(.uc-wrap) footer {
  margin-top: 2.2rem;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes subpageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ============================================================
   !IMPORTANT OVERRIDES — for old style.css compatibility
   ============================================================ */
body {
  min-height: 100vh !important;
  display: block !important;
  align-items: initial !important;
  justify-content: initial !important;
  padding: 0 !important;
  font-family: var(--font-serif) !important;
  color: var(--text-light) !important;
}

body::before {
  opacity: 0.46 !important;
  background-image:
    linear-gradient(112deg, transparent 0 45%, rgba(212, 163, 115, 0.08) 45.2%, transparent 45.9%),
    linear-gradient(154deg, transparent 0 62%, rgba(255, 255, 255, 0.05) 62.2%, transparent 62.8%) !important;
  background-size: 760px 520px, 920px 620px !important;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.52) 58%, transparent 100%) !important;
}

.container,
.dns-page {
  width: min(1120px, calc(100% - 44px)) !important;
  padding-top: clamp(5.8rem, 10vh, 8rem) !important;
}

.article-header,
.projects,
main,
footer,
.back-link,
.tool-nav,
.hero-component,
.btn,
.uc-wrap {
  position: relative;
  z-index: 1;
}

.article-header h1,
article h2,
.tool-card h4,
.uc-title,
.hero-quote,
.hero-quote em,
.panel h2,
.verdict h2,
.section-title {
  font-family: var(--font-serif) !important;
  letter-spacing: 0 !important;
}

.article-meta,
.section-label,
.tool-card,
.tool-card h4,
.tool-card p,
.tool-link,
.card-link,
.stat-label,
.timer-mode,
.timer-btn,
.mode-btn,
button,
textarea,
.hero-body p,
.btn,
.back-link a,
.tool-nav a,
.uc-desc,
footer,
footer p,
footer a,
.note-date,
.note-excerpt {
  font-family: var(--font-serif) !important;
  letter-spacing: 0 !important;
}

.back-link a,
.tool-nav a {
  font-family: var(--font-serif) !important;
}

article p,
article li,
article blockquote {
  font-family: var(--font-serif) !important;
  letter-spacing: 0 !important;
}

article,
.panel,
.verdict,
.project-card,
.tool-card,
.stat-card,
.timer-wrap,
.input-area,
.summary-panel,
.uc-wrap,
.card {
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.56) !important;
  background: var(--glass-light) !important;
  box-shadow: 0 24px 70px rgba(10, 25, 47, 0.18) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.tool-card,
.note-card,
.project-card {
  overflow: hidden;
}

.tool-card:hover,
.note-card:hover,
.project-card:hover {
  border-color: rgba(212, 163, 115, 0.62) !important;
}

.container:has(.error-code) {
  min-height: 100vh;
  max-width: 960px !important;
  padding: clamp(4rem, 8vh, 6rem) 0 2.6rem !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-code {
  margin: 0 0 0.85rem !important;
  color: rgba(212, 163, 115, 0.46) !important;
  opacity: 1 !important;
  font-family: var(--font-serif) !important;
  font-size: clamp(5.5rem, 16vw, 11rem) !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

.hero-component {
  width: min(720px, 100%);
  margin: 0 0 1.6rem !important;
  padding: clamp(2rem, 5vw, 3.25rem) !important;
  text-align: center !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(10, 25, 47, 0.72);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-border {
  display: none !important;
}

.hero-quote,
.hero-quote em {
  margin: 0 !important;
  color: var(--text-light) !important;
  font-style: normal !important;
  font-family: var(--font-serif) !important;
  font-size: clamp(2rem, 4vw, 3.4rem) !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

.quote-mark {
  color: var(--warm-gold) !important;
  opacity: 0.7 !important;
  font-family: var(--font-serif) !important;
}

.hero-body {
  margin-top: 1.2rem !important;
  padding-top: 1.2rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.hero-body p {
  color: rgba(240, 240, 245, 0.68) !important;
  font-family: var(--font-serif) !important;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem) !important;
}

.btn,
.uc-back {
  min-height: 44px !important;
  padding: 0.72rem 1.55rem !important;
  border: 1px solid rgba(212, 163, 115, 0.46) !important;
  border-radius: 999px !important;
  color: var(--deep-sea) !important;
  background: rgba(245, 240, 235, 0.96) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18) !important;
  font-family: var(--font-serif) !important;
}

.btn:hover,
.uc-back:hover {
  color: var(--deep-sea) !important;
  background: var(--warm-gold) !important;
}

.container:has(.error-code) footer {
  margin-top: 2.2rem !important;
}

footer,
.container:has(.error-code) footer,
.container:has(.uc-wrap) footer {
  color: rgba(240, 240, 245, 0.54) !important;
}

.timer-controls .timer-btn {
  color: var(--deep-sea) !important;
  background: rgba(245, 240, 235, 0.9) !important;
  border-color: rgba(245, 240, 235, 0.58) !important;
}

.timer-controls .timer-btn.primary {
  color: var(--text-light) !important;
  background: var(--deep-sea) !important;
  border-color: var(--deep-sea) !important;
}

.timer-controls .timer-btn:hover,
.timer-controls .timer-btn.primary:hover {
  color: var(--deep-sea) !important;
  background: var(--warm-gold) !important;
  border-color: var(--warm-gold) !important;
}

.timer-modes .mode-btn {
  color: rgba(240, 240, 245, 0.62) !important;
  background: transparent !important;
  border-color: transparent !important;
}

.timer-modes .mode-btn.active,
.timer-modes .mode-btn:hover {
  color: var(--deep-sea) !important;
  background: rgba(245, 240, 235, 0.94) !important;
  border-color: rgba(212, 163, 115, 0.68) !important;
}

body.page-leaving {
  opacity: 1 !important;
  transform: none;
  filter: none;
  transition: none;
}

body.page-leaving::after {
  opacity: 1;
}

.error-garden-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ============================================================
   RESPONSIVE — media query at 768px
   ============================================================ */
@media (max-width: 768px) {
  .container,
  .dns-page {
    width: min(100% - 28px, 1120px) !important;
    padding-top: 74px !important;
  }

  .container:has(.error-code) {
    padding-top: 3.2rem !important;
  }

  .article-header {
    padding-left: 1.25rem;
  }

  .article-header h1 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
  }

  .tool-grid,
  .stats-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  article,
  .panel,
  .verdict,
  .tool-card,
  .uc-wrap,
  .hero-component {
    border-radius: 14px !important;
  }

  .hero-component {
    border-radius: 18px;
  }

  .hero-quote {
    font-size: clamp(1.6rem, 6vw, 2.5rem) !important;
  }

  .back-link a,
  .tool-nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  .timer-wrap {
    padding: 1.5rem 1rem;
  }

  .btn,
  .uc-back {
    padding: 0.6rem 1.2rem !important;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none !important;
  }

  body.page-leaving {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  body.page-leaving::after {
    opacity: 0 !important;
  }

  html.page-transition-preload body {
    opacity: 1 !important;
  }

  html.page-transition-preload::before,
  html.page-transition-entering::before,
  html.page-transition-leaving::before {
    opacity: 0 !important;
    animation: none !important;
    transition: none !important;
  }

  article,
  .panel,
  .verdict,
  .tool-card,
  .project-card,
  .stat-card,
  .timer-wrap,
  .input-area,
  .summary-panel,
  .uc-wrap,
  .note-card,
  .card,
  .hero-component {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
