/* ============================================================
   HxHTracker — shadcn/ui v4 Design System (Enhanced)
   Variables: HSL format (shadcn convention)
   Default: dark theme (.dark on <html>)
   Components: Card / Button / Badge / Alert / Accordion / Progress
   Enhanced: Glassmorphism / Scroll Reveal / Reading Progress / Mobile Nav
   ============================================================ */

:root {
  /* Light theme */
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 142 71% 45%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 142 71% 45%;
  --gold: 38 92% 50%;
  --gold-foreground: 0 0% 100%;
  /* v4 radius scale */
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 2px);
  --container: 1000px;
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 8px -2px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-xs: 0 1px 1px 0 rgb(0 0 0 / 0.03);
  --shadow-lg: 0 10px 24px -4px rgb(0 0 0 / 0.08), 0 4px 8px -2px rgb(0 0 0 / 0.04);
  --shadow-glow: 0 0 24px -4px hsl(var(--primary) / 0.15);
  /* Glass effect */
  --glass-bg: hsl(0 0% 100% / 0.7);
  --glass-border: hsl(0 0% 100% / 0.5);
}

html.dark {
  --background: 240 10% 4%;
  --foreground: 0 0% 98%;
  --card: 240 10% 6%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 4%;
  --popover-foreground: 0 0% 98%;
  --primary: 142 71% 45%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 3.7% 12%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 12%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 14%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 50%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 3.7% 15%;
  --input: 240 3.7% 16%;
  --ring: 142 71% 45%;
  --gold: 38 92% 50%;
  --gold-foreground: 0 0% 100%;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
  --shadow-md: 0 4px 8px -2px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
  --shadow-xs: 0 1px 1px 0 rgb(0 0 0 / 0.15);
  --shadow-lg: 0 10px 24px -4px rgb(0 0 0 / 0.4), 0 4px 8px -2px rgb(0 0 0 / 0.2);
  --shadow-glow: 0 0 24px -4px hsl(var(--primary) / 0.2);
  --glass-bg: hsl(240 10% 8% / 0.6);
  --glass-border: hsl(0 0% 100% / 0.08);
}

/* ===== Reset ===== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
html.dark{color-scheme:dark}
body{
  background:hsl(var(--background));
  color:hsl(var(--foreground));
  font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
  font-size:15px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  transition:background-color .3s ease,color .3s ease;
}
a{color:hsl(var(--primary));text-decoration:none}
a:hover{text-decoration:underline}
strong{font-weight:650}
::selection{background:hsl(var(--primary)/.25)}

.container{max-width:var(--container);margin:0 auto;padding:0 24px}

/* ===== Scrollbar ===== */
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:4px}
::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground)/.5)}

/* ===== Reading Progress Bar ===== */
.reading-progress{
  position:fixed;top:0;left:0;right:0;
  height:3px;z-index:100;
  background:transparent;
  pointer-events:none;
}
.reading-progress-bar{
  height:100%;
  background:hsl(var(--primary));
  width:0;
  transition:width .1s linear;
  box-shadow:0 0 8px hsl(var(--primary)/.4);
}

/* ===== Back to Top ===== */
.back-to-top{
  position:fixed;
  bottom:24px;right:24px;
  width:44px;height:44px;
  border-radius:50%;
  background:hsl(var(--primary));
  color:hsl(var(--primary-foreground));
  border:none;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  font-size:20px;
  box-shadow:var(--shadow-lg);
  opacity:0;visibility:hidden;
  transform:translateY(10px) scale(.9);
  transition:all .25s ease;
  z-index:90;
}
.back-to-top.visible{
  opacity:1;visibility:visible;
  transform:translateY(0) scale(1);
}
.back-to-top:hover{
  transform:translateY(-2px) scale(1.05);
  box-shadow:var(--shadow-glow);
}

/* ===== Header / Nav ===== */
.site-header{
  position:sticky;top:0;z-index:50;
  background:hsl(var(--background)/.8);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid hsl(var(--border));
  transition:border-color .3s ease;
}
.site-header .container{
  display:flex;align-items:center;justify-content:space-between;
  min-height:56px;gap:12px;
}
.logo{
  font-weight:800;font-size:18px;letter-spacing:-.02em;
  color:hsl(var(--foreground));white-space:nowrap;
}
.logo-accent{color:hsl(var(--primary))}

.nav-wrap{
  display:flex;align-items:center;gap:2px;
  overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;
}
.nav-wrap::-webkit-scrollbar{display:none}

.nav-link{
  color:hsl(var(--muted-foreground));
  text-decoration:none!important;
  font-size:13.5px;font-weight:500;
  padding:7px 12px;
  border-radius:var(--radius-md);
  white-space:nowrap;
  position:relative;
  transition:color .15s,background .15s;
}
.nav-link:hover{color:hsl(var(--foreground));background:hsl(var(--accent));text-decoration:none!important}
.nav-link.active{color:hsl(var(--foreground));background:hsl(var(--accent))}
.nav-link.active::after{
  content:"";
  position:absolute;
  bottom:2px;left:50%;
  transform:translateX(-50%);
  width:16px;height:2px;
  border-radius:1px;
  background:hsl(var(--primary));
  animation:navSlide .2s ease;
}
@keyframes navSlide{
  from{width:0;opacity:0}
  to{width:16px;opacity:1}
}

/* Mobile menu toggle */
.nav-toggle{
  display:none;
  background:transparent;border:none;cursor:pointer;
  padding:6px;border-radius:var(--radius-md);
  color:hsl(var(--foreground));
  font-size:20px;line-height:1;
  transition:background .15s;
}
.nav-toggle:hover{background:hsl(var(--accent))}

/* ===== Buttons (shadcn v4 variants + sizes) ===== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:6px;
  font-size:13px;font-weight:500;
  line-height:1;
  padding:0 14px;
  border-radius:var(--radius-md);
  border:1px solid transparent;
  cursor:pointer;white-space:nowrap;
  transition:all .15s;
  height:36px;
  outline:none;
}
.btn:focus-visible{
  border-color:hsl(var(--ring));
  box-shadow:0 0 0 3px hsl(var(--ring)/.5);
}
.btn:active{transform:translateY(.5px)}

/* Variants */
.btn-primary{
  background:hsl(var(--primary));
  color:hsl(var(--primary-foreground));
  box-shadow:0 1px 3px -1px hsl(var(--primary)/.3);
}
.btn-primary:hover{background:hsl(var(--primary)/.9);box-shadow:0 2px 8px -2px hsl(var(--primary)/.4)}

.btn-secondary{
  background:hsl(var(--secondary));
  color:hsl(var(--secondary-foreground));
}
.btn-secondary:hover{background:hsl(var(--secondary)/.8)}

.btn-outline{
  color:hsl(var(--foreground));
  border-color:hsl(var(--border));
  background:hsl(var(--background));
  box-shadow:var(--shadow-xs);
}
.btn-outline:hover{
  background:hsl(var(--accent));
  color:hsl(var(--foreground));
  border-color:hsl(var(--primary)/.3);
}
html.dark .btn-outline{
  border-color:hsl(var(--input));
  background:hsl(var(--input)/.3);
}
html.dark .btn-outline:hover{
  background:hsl(var(--input)/.5);
}

.btn-ghost{
  color:hsl(var(--muted-foreground));
  background:transparent;
}
.btn-ghost:hover{
  color:hsl(var(--foreground));
  background:hsl(var(--accent));
}
html.dark .btn-ghost:hover{background:hsl(var(--accent)/.5)}

.btn-link{
  color:hsl(var(--primary));
  background:transparent;
  text-decoration:underline;
  text-underline-offset:4px;
}
.btn-link:hover{text-decoration:underline}

.btn-destructive{
  background:hsl(var(--destructive));
  color:hsl(var(--destructive-foreground));
}
.btn-destructive:hover{background:hsl(var(--destructive)/.9)}
html.dark .btn-destructive{
  background:hsl(var(--destructive)/.6);
}

/* Sizes */
.btn-sm{height:32px;font-size:12.5px;padding:0 12px;gap:5px}
.btn-lg{height:40px;font-size:14px;padding:0 24px}
.btn-xs{height:24px;font-size:11px;padding:0 8px;gap:4px;border-radius:var(--radius-sm)}
.btn-icon{width:36px;padding:0}
.btn-icon-sm{width:32px;height:32px;padding:0}
.btn-icon-lg{width:40px;height:40px;padding:0}

/* ===== Badge (shadcn v4) ===== */
.badge{
  display:inline-flex;align-items:center;gap:5px;
  font-size:11.5px;font-weight:600;
  padding:3px 10px;
  border-radius:999px;
  border:1px solid transparent;
  white-space:nowrap;
  line-height:1.4;
  transition:color .15s,background .15s;
}
.badge-default{
  background:hsl(var(--primary));
  color:hsl(var(--primary-foreground));
}
.badge-secondary{
  background:hsl(var(--secondary));
  color:hsl(var(--secondary-foreground));
}
.badge-outline{
  border-color:hsl(var(--border));
  color:hsl(var(--foreground));
}
.badge-ghost{
  color:hsl(var(--foreground));
}
.badge-ghost:hover{background:hsl(var(--accent));}
.badge-success{
  background:hsl(var(--primary)/.12);
  color:hsl(var(--primary));
  border-color:hsl(var(--primary)/.25);
}
.badge-warning{
  background:hsl(var(--gold)/.12);
  color:hsl(var(--gold));
  border-color:hsl(var(--gold)/.25);
}
.badge-neutral{
  background:hsl(var(--muted));
  color:hsl(var(--muted-foreground));
  border-color:hsl(var(--border));
}
.badge-destructive{
  background:hsl(var(--destructive)/.12);
  color:hsl(var(--destructive));
  border-color:hsl(var(--destructive)/.25);
}

/* ===== Card (shadcn v4 structured) ===== */
.card{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-xl);
  color:hsl(var(--card-foreground));
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.card-header{
  display:flex;flex-direction:column;gap:4px;
  padding:24px;
  border-bottom:1px solid hsl(var(--border));
}
.card-header.no-border{border-bottom:none}
.card-title{
  font-size:16px;font-weight:600;
  letter-spacing:-.01em;
  line-height:1.3;
}
.card-description{
  font-size:13.5px;
  color:hsl(var(--muted-foreground));
  line-height:1.5;
}
.card-action{
  margin-left:auto;
  align-self:flex-start;
}
.card-content{
  padding:24px;
}
.card-content.flush{padding:0}
.card-footer{
  display:flex;align-items:center;gap:8px;
  padding:24px;
  border-top:1px solid hsl(var(--border));
}
.card-footer.no-border{border-top:none;padding-top:0}

/* Card link (interactive card) */
.card-link{
  display:block;
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-xl);
  padding:24px;
  color:hsl(var(--card-foreground));
  text-decoration:none!important;
  box-shadow:var(--shadow-sm);
  transition:border-color .25s,transform .25s,box-shadow .25s;
  position:relative;
  overflow:hidden;
}
.card-link::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background:linear-gradient(90deg,hsl(var(--primary)),hsl(var(--gold)));
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .3s ease;
}
.card-link:hover{
  border-color:hsl(var(--primary)/.5);
  transform:translateY(-3px);
  box-shadow:var(--shadow-lg);
}
.card-link:hover::before{transform:scaleX(1)}
.card-link h2,.card-link h3{
  font-size:16px;font-weight:600;
  margin-bottom:8px;
  letter-spacing:-.01em;
}
.card-link p{
  color:hsl(var(--muted-foreground));
  font-size:13.5px;
  margin-bottom:14px;
  line-height:1.6;
}
.card-link .arrow{
  color:hsl(var(--primary));
  font-size:13.5px;font-weight:600;
  display:inline-flex;align-items:center;gap:4px;
  transition:gap .2s;
}
.card-link:hover .arrow{gap:8px}

/* ===== Alert (shadcn v4) ===== */
.alert{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  align-items:start;
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-lg);
  padding:12px 16px;
  font-size:14px;
  background:hsl(var(--card));
  color:hsl(var(--card-foreground));
  box-shadow:var(--shadow-xs);
}
.alert-icon{
  display:flex;align-items:center;
  font-size:16px;
  line-height:1.4;
  flex-shrink:0;
  margin-top:1px;
}
.alert-title{
  font-weight:600;
  font-size:14px;
  line-height:1.4;
  margin-bottom:2px;
}
.alert-desc{
  font-size:13px;
  color:hsl(var(--muted-foreground));
  line-height:1.5;
}
.alert-primary{
  border-color:hsl(var(--primary)/.3);
  background:hsl(var(--primary)/.05);
}
.alert-primary .alert-icon{color:hsl(var(--primary))}
.alert-warning{
  border-color:hsl(var(--gold)/.3);
  background:hsl(var(--gold)/.05);
}
.alert-warning .alert-icon{color:hsl(var(--gold))}
.alert-destructive{
  border-color:hsl(var(--destructive)/.3);
  background:hsl(var(--destructive)/.05);
}
.alert-destructive .alert-icon,
.alert-destructive .alert-title{color:hsl(var(--destructive))}
.alert-destructive .alert-desc{color:hsl(var(--destructive)/.8)}

/* ===== Accordion (shadcn v4) ===== */
.accordion{
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-lg);
  background:hsl(var(--card));
  overflow:hidden;
}
.accordion-item{
  border-bottom:1px solid hsl(var(--border));
}
.accordion-item:last-child{border-bottom:none}
.accordion-trigger{
  display:flex;width:100%;
  align-items:center;justify-content:space-between;
  gap:16px;
  padding:16px 20px;
  text-align:left;
  font-size:14px;font-weight:500;
  color:hsl(var(--foreground));
  background:transparent;
  border:none;
  cursor:pointer;
  transition:background .15s;
  border-radius:0;
}
.accordion-trigger:hover{background:hsl(var(--accent))}
.accordion-trigger:focus-visible{
  outline:2px solid hsl(var(--ring));
  outline-offset:-2px;
}
.accordion-chevron{
  flex-shrink:0;
  transition:transform .2s;
  font-size:14px;
  color:hsl(var(--muted-foreground));
}
.accordion-item.open .accordion-chevron{transform:rotate(180deg)}
.accordion-content{
  overflow:hidden;
  max-height:0;
  transition:max-height .25s ease;
}
.accordion-item.open .accordion-content{max-height:600px}
.accordion-content-inner{
  padding:0 20px 16px;
  font-size:13.5px;
  color:hsl(var(--muted-foreground));
  line-height:1.7;
}
.accordion-content-inner p{margin-bottom:8px}
.accordion-content-inner ul{margin:0 0 8px 18px}
.accordion-content-inner li{margin-bottom:6px}

/* ===== Progress (shadcn v4) ===== */
.progress{
  position:relative;
  height:8px;
  width:100%;
  border-radius:999px;
  background:hsl(var(--primary)/.2);
  overflow:hidden;
}
.progress-bar{
  height:100%;
  border-radius:999px;
  background:hsl(var(--primary));
  transition:width .4s ease;
  position:relative;
}
.progress-bar::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,transparent,hsl(0 0% 100% / .3),transparent);
  animation:shimmer 2s infinite;
}
@keyframes shimmer{
  0%{transform:translateX(-100%)}
  100%{transform:translateX(100%)}
}

/* ===== Separator (shadcn v4) ===== */
.separator{
  height:1px;
  width:100%;
  background:hsl(var(--border));
  border:none;
  margin:32px 0;
}
.separator.vertical{
  height:auto;width:1px;
  align-self:stretch;
  margin:0 16px;
}

/* ===== Hero ===== */
.hero{
  padding:56px 0 44px;
  text-align:center;
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute;inset:0;
  background:radial-gradient(ellipse 60% 50% at 50% 0%,hsl(var(--primary)/.06),transparent 70%);
  pointer-events:none;
}
.hero::after{
  content:"";
  position:absolute;
  top:-40%;left:50%;
  transform:translateX(-50%);
  width:500px;height:500px;
  background:radial-gradient(circle,hsl(var(--primary)/.04),transparent 60%);
  filter:blur(60px);
  pointer-events:none;
  animation:heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow{
  0%{transform:translateX(-50%) scale(.9);opacity:.6}
  100%{transform:translateX(-50%) scale(1.1);opacity:1}
}
.hero .container{position:relative}

.hero-tag{
  display:inline-flex;align-items:center;gap:8px;
  font-size:12px;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;
  color:hsl(var(--gold));
  margin-bottom:20px;
}
.pulse{
  width:7px;height:7px;border-radius:50%;
  background:hsl(var(--primary));
  display:inline-block;
  animation:pulse 2s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{box-shadow:0 0 0 0 hsl(var(--primary)/.5)}
  50%{box-shadow:0 0 0 6px hsl(var(--primary)/0)}
}

.hero h1{
  font-size:clamp(30px,5.5vw,46px);
  font-weight:800;
  line-height:1.15;
  letter-spacing:-.03em;
  margin-bottom:12px;
  text-wrap:balance;
}
.hero h1 .accent{color:hsl(var(--primary))}
.hero .subtitle{
  color:hsl(var(--muted-foreground));
  max-width:580px;
  margin:0 auto 36px;
  font-size:15px;
  text-wrap:pretty;
}

/* ===== Countdown (Glassmorphism) ===== */
.countdown{
  display:flex;gap:12px;
  justify-content:center;
  margin-bottom:16px;
}
.cd-box{
  background:var(--glass-bg);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid var(--glass-border);
  border-radius:var(--radius-xl);
  padding:20px 0;
  width:92px;
  box-shadow:var(--shadow-sm);
  transition:border-color .25s,transform .25s,box-shadow .25s;
}
.cd-box:hover{
  border-color:hsl(var(--primary)/.4);
  transform:translateY(-3px);
  box-shadow:var(--shadow-glow);
}
.cd-num{
  display:block;
  font-size:34px;font-weight:800;
  color:hsl(var(--primary));
  font-variant-numeric:tabular-nums;
  line-height:1;
}
.cd-label{
  display:block;
  font-size:10.5px;
  color:hsl(var(--muted-foreground));
  text-transform:uppercase;
  letter-spacing:.1em;
  margin-top:8px;
}
.cd-note{
  color:hsl(var(--muted-foreground));
  font-size:13px;
}
.cd-note strong{color:hsl(var(--foreground))}

/* ===== Timeline ===== */
.timeline{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-xl);
  padding:20px 24px;
  margin:36px 0 8px;
  box-shadow:var(--shadow-sm);
}
.timeline-title{
  font-size:11.5px;
  color:hsl(var(--muted-foreground));
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:16px;
  font-weight:600;
}
.timeline-track{
  display:flex;align-items:flex-start;
  overflow-x:auto;
  padding-bottom:6px;
  scrollbar-width:thin;
  gap:0;
}
.tl-node{
  flex:0 0 auto;
  text-align:center;
  position:relative;
  min-width:72px;
}
.tl-node:not(:last-child)::after{
  content:"";
  position:absolute;
  top:17px;left:calc(50% + 19px);
  right:calc(-50% + 19px);
  height:2px;
  background:hsl(var(--border));
}
.tl-node.done:not(:last-child)::after{
  background:hsl(var(--primary)/.5);
}
.tl-dot{
  width:34px;height:34px;
  border-radius:50%;
  margin:0 auto 8px;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:700;
  border:2px solid hsl(var(--border));
  background:hsl(var(--secondary));
  color:hsl(var(--muted-foreground));
  position:relative;z-index:1;
  transition:transform .2s;
}
.tl-node:hover .tl-dot{transform:scale(1.1)}
.tl-node.done .tl-dot{
  background:hsl(var(--primary)/.12);
  border-color:hsl(var(--primary)/.4);
  color:hsl(var(--primary));
}
.tl-node.next .tl-dot{
  background:hsl(var(--primary));
  border-color:hsl(var(--primary));
  color:hsl(var(--primary-foreground));
  box-shadow:0 0 0 5px hsl(var(--primary)/.12);
  animation:nextPulse 2s ease-in-out infinite;
}
@keyframes nextPulse{
  0%,100%{box-shadow:0 0 0 5px hsl(var(--primary)/.12)}
  50%{box-shadow:0 0 0 8px hsl(var(--primary)/.18)}
}
.tl-ch{font-size:12.5px;font-weight:600;color:hsl(var(--foreground))}
.tl-date{font-size:10.5px;color:hsl(var(--muted-foreground))}

/* ===== Steps ===== */
.steps{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  margin:32px 0;
}
.step{
  display:block;
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-xl);
  padding:22px;
  text-decoration:none!important;
  color:hsl(var(--card-foreground));
  box-shadow:var(--shadow-sm);
  transition:border-color .25s,transform .25s,box-shadow .25s;
  position:relative;
  overflow:hidden;
}
.step::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background:linear-gradient(90deg,hsl(var(--primary)),hsl(var(--gold)));
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .3s ease;
}
.step:hover{
  border-color:hsl(var(--primary)/.5);
  transform:translateY(-3px);
  box-shadow:var(--shadow-lg);
}
.step:hover::before{transform:scaleX(1)}
.step-num{
  font-size:10.5px;font-weight:700;
  color:hsl(var(--gold));
  letter-spacing:.08em;
  margin-bottom:8px;
}
.step h3{font-size:15px;margin-bottom:6px;font-weight:700}
.step p{
  color:hsl(var(--muted-foreground));
  font-size:13px;
}

/* ===== Card Grid ===== */
.card-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
  margin:36px 0;
}

/* ===== Section Label ===== */
.section-label{
  display:flex;align-items:center;gap:10px;
  margin-bottom:20px;
}
.section-label-text{
  font-size:11.5px;font-weight:700;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:hsl(var(--muted-foreground));
}
.section-label-line{
  flex:1;height:1px;
  background:hsl(var(--border));
}

/* ===== News Block ===== */
.news-block{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-xl);
  padding:24px 26px;
  margin-bottom:48px;
  box-shadow:var(--shadow-sm);
}
.news-block h2{margin-bottom:16px;font-size:18px;font-weight:700}
.news-list{list-style:none}
.news-list li{
  padding:12px 0;
  border-bottom:1px solid hsl(var(--border));
  color:hsl(var(--muted-foreground));
  font-size:14px;
  transition:padding-left .2s;
}
.news-list li:hover{padding-left:6px}
.news-list li:last-child{border-bottom:none}
.news-list strong{
  color:hsl(var(--gold));
  margin-right:8px;
  font-weight:700;
}

/* ===== Page (interior pages) ===== */
.page{
  padding:48px 24px;
  max-width:820px;
  margin:0 auto;
}
.page h1{
  font-size:clamp(24px,4vw,30px);
  font-weight:800;
  margin-bottom:16px;
  line-height:1.25;
  letter-spacing:-.02em;
  text-wrap:balance;
}
.page h2{
  font-size:20px;
  margin:36px 0 12px;
  font-weight:700;
  letter-spacing:-.01em;
  scroll-margin-top:72px;
}
.page p{margin-bottom:14px;color:hsl(var(--foreground))}
.page p.lede{
  font-size:16px;
  color:hsl(var(--muted-foreground));
  line-height:1.7;
  text-wrap:pretty;
}
.page ul,.page ol{margin:0 0 18px 20px}
.page li{margin-bottom:10px}
.page li strong{color:hsl(var(--foreground))}

.muted{
  color:hsl(var(--muted-foreground));
  font-size:13px;
  font-style:italic;
}

/* ===== Table (shadcn v4 enhanced) ===== */
.roster-table{
  width:100%;
  border-collapse:collapse;
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-lg);
  overflow:hidden;
  font-size:14px;
  margin-bottom:20px;
  box-shadow:var(--shadow-xs);
}
.roster-table th{
  background:hsl(var(--secondary));
  text-align:left;
  padding:11px 16px;
  font-size:12px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:hsl(var(--muted-foreground));
  border-bottom:1px solid hsl(var(--border));
  position:sticky;
  top:56px;
  z-index:10;
}
.roster-table td{
  padding:12px 16px;
  border-bottom:1px solid hsl(var(--border));
  vertical-align:top;
  transition:background .15s;
}
.roster-table tbody tr:nth-child(even){background:hsl(var(--accent)/.3)}
.roster-table tbody tr:last-child td{border-bottom:none}
.roster-table tbody tr:hover{background:hsl(var(--accent)/.8)}
.roster-table td:nth-child(2),
.roster-table td:nth-child(3){
  color:hsl(var(--muted-foreground));
}

/* Status tags */
.st{
  font-size:11px;font-weight:600;
  padding:3px 10px;
  border-radius:999px;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.st.released{
  background:hsl(var(--primary)/.12);
  color:hsl(var(--primary));
}
.st.expected{
  background:hsl(var(--gold)/.12);
  color:hsl(var(--gold));
}

/* ===== Callout (inline highlight box) ===== */
.callout{
  background:hsl(var(--accent)/.5);
  border:1px solid hsl(var(--border));
  border-left:3px solid hsl(var(--primary));
  border-radius:var(--radius-lg);
  padding:16px 20px;
  margin:16px 0;
  font-size:14px;
}
.callout strong{color:hsl(var(--foreground))}

/* ===== TL;DR Box ===== */
.tldr{
  background:hsl(var(--primary)/.06);
  border:1px solid hsl(var(--primary)/.2);
  border-radius:var(--radius-lg);
  padding:14px 18px;
  margin:16px 0 24px;
  font-size:14px;
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.tldr-tag{
  flex-shrink:0;
  font-size:11px;font-weight:700;
  color:hsl(var(--primary));
  background:hsl(var(--primary)/.12);
  padding:2px 8px;
  border-radius:var(--radius-sm);
  letter-spacing:.05em;
  text-transform:uppercase;
  margin-top:1px;
}
.tldr-text{color:hsl(var(--foreground));line-height:1.6}
.tldr-text strong{color:hsl(var(--primary))}

/* ===== Status Hero (is-it-alive.html) ===== */
.status-hero{
  text-align:center;
  padding:48px 0 36px;
  position:relative;
  overflow:hidden;
}
.status-hero::before{
  content:"";
  position:absolute;inset:0;
  background:radial-gradient(ellipse 50% 40% at 50% 30%,hsl(var(--primary)/.08),transparent 70%);
  pointer-events:none;
}
.status-light{
  width:80px;height:80px;
  border-radius:50%;
  margin:0 auto 20px;
  background:hsl(var(--primary)/.15);
  border:3px solid hsl(var(--primary)/.4);
  display:flex;align-items:center;justify-content:center;
  position:relative;z-index:1;
  animation:statusPulse 2.5s ease-in-out infinite;
}
@keyframes statusPulse{
  0%,100%{box-shadow:0 0 0 0 hsl(var(--primary)/.4),0 0 0 12px hsl(var(--primary)/0)}
  50%{box-shadow:0 0 0 8px hsl(var(--primary)/.15),0 0 0 20px hsl(var(--primary)/0)}
}
.status-light.hiatus{
  background:hsl(var(--destructive)/.15);
  border-color:hsl(var(--destructive)/.4);
  animation:statusPulseRed 2.5s ease-in-out infinite;
}
@keyframes statusPulseRed{
  0%,100%{box-shadow:0 0 0 0 hsl(var(--destructive)/.4),0 0 0 12px hsl(var(--destructive)/0)}
  50%{box-shadow:0 0 0 8px hsl(var(--destructive)/.15),0 0 0 20px hsl(var(--destructive)/0)}
}
.status-light-dot{
  width:28px;height:28px;
  border-radius:50%;
  background:hsl(var(--primary));
}
.status-light.hiatus .status-light-dot{background:hsl(var(--destructive))}
.status-text{
  font-size:clamp(28px,5vw,40px);
  font-weight:800;
  letter-spacing:-.03em;
  position:relative;z-index:1;
  margin-bottom:6px;
}
.status-text.alive{color:hsl(var(--primary))}
.status-text.dead{color:hsl(var(--destructive))}
.status-subtitle{
  font-size:14px;
  color:hsl(var(--muted-foreground));
  position:relative;z-index:1;
}

/* ===== Stat Grid ===== */
.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:12px;
  margin:28px 0;
}
.stat-card{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-lg);
  padding:18px 16px;
  text-align:center;
  box-shadow:var(--shadow-xs);
  transition:transform .2s,border-color .2s;
}
.stat-card:hover{
  transform:translateY(-2px);
  border-color:hsl(var(--primary)/.3);
}
.stat-number{
  font-size:28px;font-weight:800;
  color:hsl(var(--primary));
  line-height:1;
  margin-bottom:6px;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.02em;
}
.stat-number.gold{color:hsl(var(--gold))}
.stat-number.red{color:hsl(var(--destructive))}
.stat-label{
  font-size:11px;font-weight:600;
  color:hsl(var(--muted-foreground));
  text-transform:uppercase;
  letter-spacing:.06em;
}

/* ===== Stockpile Meter ===== */
.stockpile{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-xl);
  padding:24px;
  margin:28px 0;
  box-shadow:var(--shadow-sm);
}
.stockpile-header{
  display:flex;justify-content:space-between;align-items:center;
  margin-bottom:12px;
}
.stockpile-title{font-size:14px;font-weight:600}
.stockpile-count{font-size:13px;color:hsl(var(--primary));font-weight:700}
.stockpile .progress{height:10px;margin-bottom:8px}
.stockpile-note{font-size:12px;color:hsl(var(--muted-foreground))}

/* ===== Statement Timeline ===== */
.stmt-timeline{
  position:relative;
  padding-left:24px;
  margin:20px 0;
}
.stmt-timeline::before{
  content:"";
  position:absolute;
  left:6px;top:0;bottom:0;
  width:2px;
  background:hsl(var(--border));
}
.stmt-item{
  position:relative;
  padding-bottom:20px;
}
.stmt-item::before{
  content:"";
  position:absolute;
  left:-21px;top:4px;
  width:10px;height:10px;
  border-radius:50%;
  background:hsl(var(--card));
  border:2px solid hsl(var(--primary));
}
.stmt-date{
  font-size:12px;font-weight:600;
  color:hsl(var(--primary));
  margin-bottom:2px;
}
.stmt-text{
  font-size:13.5px;
  color:hsl(var(--foreground));
  line-height:1.6;
}

/* ===== Hiatus Visual Bar ===== */
.hiatus-viz{
  display:flex;
  height:48px;
  border-radius:var(--radius-md);
  overflow:hidden;
  margin:16px 0 0;
  border:1px solid hsl(var(--border));
  position:relative;
}
.hiatus-viz::after{
  content:"";
  position:absolute;inset:0;
  pointer-events:none;
  box-shadow:inset 0 0 0 1px hsl(var(--border)/.5);
  border-radius:var(--radius-md);
}
.hiatus-seg{
  height:100%;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:700;
  color:hsl(var(--card-foreground));
  transition:opacity .2s, filter .2s;
  position:relative;
  cursor:default;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:clip;
  border-right:1px solid hsl(var(--background)/.25);
}
.hiatus-seg:last-child{border-right:none}
.hiatus-seg.serializing{background:hsl(var(--primary)/.55)}
.hiatus-seg.hiatus{background:hsl(var(--muted-foreground)/.28)}
.hiatus-seg:hover{opacity:1;filter:brightness(1.15)}
.hiatus-axis{
  display:flex;
  justify-content:space-between;
  font-size:11px;
  color:hsl(var(--muted-foreground));
  padding:6px 2px 0;
  margin-bottom:12px;
}
.hiatus-axis span{
  position:relative;
  padding-top:6px;
}
.hiatus-axis span::before{
  content:"";
  position:absolute;
  top:0;left:50%;
  transform:translateX(-50%);
  width:1px;height:5px;
  background:hsl(var(--muted-foreground)/.5);
}
.hiatus-legend{
  display:flex;gap:16px;
  font-size:12px;color:hsl(var(--muted-foreground));
  margin-bottom:12px;
}
.hiatus-legend-dot{
  display:inline-block;
  width:10px;height:10px;
  border-radius:2px;
  margin-right:4px;
  vertical-align:middle;
}

/* ===== Chapter Selector (catch-up) ===== */
.selector-wrap{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-xl);
  padding:24px;
  margin:24px 0;
  box-shadow:var(--shadow-sm);
}
.selector-label{
  font-size:14px;font-weight:600;
  margin-bottom:12px;
}
.selector-row{
  display:flex;gap:12px;align-items:flex-end;
  flex-wrap:wrap;
}
.selector-field{flex:1;min-width:200px}
.selector-field label{
  display:block;
  font-size:12px;font-weight:600;
  color:hsl(var(--muted-foreground));
  margin-bottom:6px;
  text-transform:uppercase;letter-spacing:.05em;
}
.selector-select{
  width:100%;
  padding:10px 14px;
  border-radius:var(--radius-md);
  border:1px solid hsl(var(--input));
  background:hsl(var(--background));
  color:hsl(var(--foreground));
  font-size:14px;
  font-family:inherit;
  cursor:pointer;
  transition:border-color .15s;
}
.selector-select:focus{
  outline:none;
  border-color:hsl(var(--ring));
  box-shadow:0 0 0 3px hsl(var(--ring)/.3);
}
.catchup-result{
  margin-top:24px;
  display:none;
}
.catchup-result.show{display:block}
.catchup-result h3{
  font-size:16px;font-weight:700;
  margin-bottom:12px;
  color:hsl(var(--primary));
}
.catchup-list{
  list-style:none;
  margin:0;
}
.catchup-list li{
  padding:12px 0;
  border-bottom:1px solid hsl(var(--border));
  font-size:14px;
  line-height:1.6;
}
.catchup-list li:last-child{border-bottom:none}
.catchup-list li strong{color:hsl(var(--foreground))}
.catchup-list .ch-num{
  display:inline-block;
  font-size:11px;font-weight:700;
  color:hsl(var(--primary));
  background:hsl(var(--primary)/.1);
  padding:2px 8px;
  border-radius:var(--radius-sm);
  margin-right:8px;
}

/* ===== Prince Status Grid (succession-war) ===== */
.prince-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:12px;
  margin:24px 0;
}
.prince-card{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-lg);
  padding:16px;
  text-align:center;
  box-shadow:var(--shadow-xs);
  transition:transform .2s,border-color .2s;
  position:relative;
  overflow:hidden;
}
.prince-card:hover{
  transform:translateY(-2px);
  border-color:hsl(var(--primary)/.3);
}
.prince-card.alive{border-left:3px solid hsl(var(--primary))}
.prince-card.eliminated{border-left:3px solid hsl(var(--destructive));opacity:.6}
.prince-card.unknown{border-left:3px solid hsl(var(--gold))}
.prince-num{
  font-size:11px;font-weight:700;
  color:hsl(var(--muted-foreground));
  text-transform:uppercase;letter-spacing:.06em;
  margin-bottom:4px;
}
.prince-name{
  font-size:14px;font-weight:600;
  margin-bottom:6px;
}
.prince-status{
  display:inline-flex;align-items:center;gap:4px;
  font-size:11px;font-weight:600;
  padding:2px 8px;
  border-radius:999px;
}
.prince-status.alive{
  background:hsl(var(--primary)/.12);
  color:hsl(var(--primary));
}
.prince-status.eliminated{
  background:hsl(var(--destructive)/.12);
  color:hsl(var(--destructive));
}
.prince-status.unknown{
  background:hsl(var(--gold)/.12);
  color:hsl(var(--gold));
}
.prince-beast{
  font-size:11px;
  color:hsl(var(--muted-foreground));
  margin-top:6px;
}

/* ===== Poll ===== */
.poll-wrap{
  background:hsl(var(--card));
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-xl);
  padding:24px;
  margin:24px 0;
  box-shadow:var(--shadow-sm);
}
.poll-question{
  font-size:15px;font-weight:600;
  margin-bottom:16px;
}
.poll-option{
  display:flex;align-items:center;gap:10px;
  padding:10px 14px;
  border:1px solid hsl(var(--border));
  border-radius:var(--radius-md);
  margin-bottom:8px;
  cursor:pointer;
  transition:background .15s,border-color .15s;
  position:relative;
  overflow:hidden;
}
.poll-option:hover{
  background:hsl(var(--accent));
  border-color:hsl(var(--primary)/.3);
}
.poll-option.voted{
  cursor:default;
}
.poll-bar-fill{
  position:absolute;
  left:0;top:0;bottom:0;
  background:hsl(var(--primary)/.1);
  transition:width .4s ease;
}
.poll-option-text{
  position:relative;z-index:1;
  font-size:13.5px;font-weight:500;
  flex:1;
}
.poll-option-pct{
  position:relative;z-index:1;
  font-size:13px;font-weight:700;
  color:hsl(var(--primary));
}

/* ===== Share Buttons ===== */
.share-row{
  display:flex;gap:8px;
  margin:32px 0;
  flex-wrap:wrap;
}
.share-btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 14px;
  border-radius:var(--radius-md);
  border:1px solid hsl(var(--border));
  background:hsl(var(--card));
  color:hsl(var(--muted-foreground));
  font-size:13px;font-weight:500;
  cursor:pointer;
  transition:all .15s;
  text-decoration:none!important;
}
.share-btn:hover{
  border-color:hsl(var(--primary)/.3);
  color:hsl(var(--primary));
  background:hsl(var(--primary)/.05);
}

/* ===== Big Number ===== */
.big-number{
  font-size:clamp(36px,6vw,52px);
  font-weight:800;
  color:hsl(var(--primary));
  line-height:1;
  letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;
}
.big-number.gold{color:hsl(var(--gold))}
.big-number.red{color:hsl(var(--destructive))}
.big-number-label{
  font-size:13px;font-weight:600;
  color:hsl(var(--muted-foreground));
  text-transform:uppercase;letter-spacing:.06em;
  margin-top:6px;
}

/* ===== Footer ===== */
.site-footer{
  border-top:1px solid hsl(var(--border));
  padding:28px 0;
  margin-top:24px;
}
.site-footer p{
  color:hsl(var(--muted-foreground));
  font-size:12px;
  text-align:center;
}

/* ===== Focus states ===== */
a:focus-visible,
.btn:focus-visible,
button:focus-visible{
  outline:2px solid hsl(var(--ring));
  outline-offset:2px;
}

/* ===== Scroll Reveal ===== */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .5s ease,transform .5s ease;
}
.reveal.visible{
  opacity:1;
  transform:translateY(0);
}

/* ===== Mobile ===== */
@media(max-width:760px){
  .container{padding:0 16px}
  .hero{padding:40px 0 34px}
  .countdown{gap:8px}
  .cd-box{width:66px;padding:14px 0;border-radius:var(--radius-lg)}
  .cd-num{font-size:24px}
  .cd-label{font-size:9px}
  .card-grid{grid-template-columns:1fr}
  .steps{grid-template-columns:1fr}
  .nav-link{padding:6px 8px;font-size:12.5px}
  .logo{font-size:16px}
  .tl-node{min-width:64px}
  .timeline{padding:16px 14px;margin:28px 0 6px}
  .page{padding:36px 16px}
  .page h1{font-size:22px}
  .page h2{font-size:18px}
  .news-block{padding:18px 18px}
  .site-header .container{min-height:52px}
  .card-header,.card-content,.card-footer{padding:18px}
  .card-link{padding:18px}
  .alert{padding:10px 14px}
  .accordion-trigger{padding:14px 16px}
  .accordion-content-inner{padding:0 16px 14px}

  /* Mobile nav: hamburger */
  .nav-toggle{display:flex;align-items:center;justify-content:center}
  .nav-wrap{
    position:fixed;
    top:52px;left:0;right:0;
    background:hsl(var(--background));
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    border-bottom:1px solid hsl(var(--border));
    flex-direction:column;
    align-items:stretch;
    padding:8px 16px 16px;
    gap:2px;
    transform:translateY(-100%);
    opacity:0;
    visibility:hidden;
    transition:transform .25s ease,opacity .25s ease;
    box-shadow:var(--shadow-md);
    overflow-y:auto;
    max-height:calc(100vh - 52px);
  }
  .nav-wrap.open{
    transform:translateY(0);
    opacity:1;
    visibility:visible;
  }
  .nav-link{
    padding:12px 14px;
    font-size:15px;
    border-radius:var(--radius-md);
  }
  .nav-link.active::after{display:none}
  .nav-wrap .btn{margin-top:8px}
  .back-to-top{bottom:16px;right:16px;width:40px;height:40px;font-size:18px}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .stat-card{padding:14px 10px}
  .stat-number{font-size:22px}
  .stockpile,.selector-wrap,.poll-wrap,.prince-grid{padding:16px}
  .prince-grid{grid-template-columns:repeat(2,1fr)}
  .hiatus-viz{height:36px}
  .hiatus-seg{font-size:9px}
  .hiatus-axis{font-size:10px}
  .status-hero{padding:32px 0 24px}
  .status-light{width:60px;height:60px}
  .status-light-dot{width:20px;height:20px}
}

/* ===== Reduced motion ===== */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    transition-duration:.01ms!important;
  }
  .reveal{opacity:1;transform:none}
}
