/* ═══════════════════════════════════════════════════════════════
   DOCSTRUCT — style.css
   Theme: shadcn/ui dark · matched to StyleGuard v0.1.0
   Geist + Geist Mono · rounded panes · neutral tokens
═══════════════════════════════════════════════════════════════ */

/* ── 1. SHARED TOKENS ─────────────────────────────────────── */
:root {
  --radius:    0.625rem;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);/* ═══════════════════════════════════════════════════════════════
   DOCSTRUCT — style.css
   Theme: shadcn/ui dark · matched to StyleGuard v0.1.0
   Geist + Geist Mono · rounded panes · neutral tokens
═══════════════════════════════════════════════════════════════ */

/* ── 1. SHARED TOKENS ─────────────────────────────────────── */
:root {
  --radius:    0.625rem;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);

  --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-mid:  250ms;
}

/* ── 2. DARK TOKENS ───────────────────────────────────────── */
[data-theme="dark"] {
  color-scheme: dark;
  --background:           #09090b;
  --card:                 #18181b;
  --secondary:            #27272a;
  --muted:                #27272a;
  --accent:               #27272a;
  --foreground:           #fafafa;
  --card-foreground:      #fafafa;
  --primary:              #e4e4e7;
  --primary-foreground:   #18181b;
  --secondary-foreground: #fafafa;
  --muted-foreground:     #a1a1aa;
  --accent-foreground:    #fafafa;
  --border:               rgba(255,255,255,0.10);
  --input:                rgba(255,255,255,0.15);
  --ring:                 #71717a;
  --toggle-border:        rgba(255,255,255,0.18);

  --stat-words-bg:    rgba( 96,165,250,.10); --stat-words-fg:    #93c5fd;
  --stat-lines-bg:    rgba(251,191, 36,.10); --stat-lines-fg:    #fcd34d;
  --stat-sections-bg: rgba( 52,211,153,.10); --stat-sections-fg: #6ee7b7;
}

/* ── 3. LIGHT TOKENS ──────────────────────────────────────── */
[data-theme="light"] {
  color-scheme: light;
  --background:           #ffffff;
  --card:                 #ffffff;
  --secondary:            #f4f4f5;
  --muted:                #f4f4f5;
  --accent:               #f4f4f5;
  --foreground:           #09090b;
  --card-foreground:      #09090b;
  --primary:              #18181b;
  --primary-foreground:   #fafafa;
  --secondary-foreground: #18181b;
  --muted-foreground:     #71717a;
  --accent-foreground:    #18181b;
  --border:               rgba(0,0,0,0.10);
  --input:                rgba(0,0,0,0.08);
  --ring:                 #a1a1aa;
  --toggle-border:        rgba(0,0,0,0.15);

  --stat-words-bg:    rgba( 37, 99,235,.07); --stat-words-fg:    #1d4ed8;
  --stat-lines-bg:    rgba(161,109,  8,.07); --stat-lines-fg:    #92400e;
  --stat-sections-bg: rgba(  5,150,105,.07); --stat-sections-fg: #065f46;
}

/* ── 4. THEME TRANSITION ──────────────────────────────────── */
body, .site-header, .pane, .pane-header, .pane-step,
.stat, #preview-output, .site-footer, .btn,
.field-input, .field-textarea {
  transition:
    background-color var(--dur-mid) var(--ease-out),
    border-color     var(--dur-mid) var(--ease-out),
    color            var(--dur-mid) var(--ease-out),
    box-shadow       var(--dur-mid) var(--ease-out);
}

/* ── 5. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── 6. HEADER ────────────────────────────────────────────── */
.site-header {
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.625rem; }

.brand-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--primary-foreground);
  letter-spacing: -0.02em;
}

.brand-text { display: flex; flex-direction: column; gap: 1px; }

.brand-name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--foreground);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  font-weight: 400;
  line-height: 1;
}

.header-right { display: flex; align-items: center; gap: 0.75rem; }



/* ── 7. THEME TOGGLE — exact copy of StyleGuard ──────────── */
.btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: 9999px;
  background: var(--secondary);
  border: 1px solid var(--toggle-border);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
  transition:
    background   var(--dur-fast) var(--ease-out),
    box-shadow   var(--dur-fast) var(--ease-out);
}

.btn--icon:hover        { background: var(--accent); box-shadow: 0 0 0 1px var(--ring); }
.btn--icon:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.theme-toggle-label     { line-height: 1; }

[data-theme="dark"]  .icon-sun    { display: none; }
[data-theme="dark"]  .icon-moon   { display: block; }
[data-theme="light"] .icon-moon   { display: none; }
[data-theme="light"] .icon-sun    { display: block; }
[data-theme="dark"]  .label-dark  { display: inline; }
[data-theme="dark"]  .label-light { display: none; }
[data-theme="light"] .label-dark  { display: none; }
[data-theme="light"] .label-light { display: inline; }

.btn--icon.toggling svg { animation: spin-icon 0.35s var(--ease-out) both; }

@keyframes spin-icon {
  from { transform: rotate(-30deg) scale(0.8); opacity: 0; }
  to   { transform: rotate(0)      scale(1);   opacity: 1; }
}

/* ── 8. APP SHELL ─────────────────────────────────────────── */
.app-shell {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
}

/* ── 9. PANES ─────────────────────────────────────────────── */
.pane {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pane:focus-within { box-shadow: 0 0 0 1px var(--ring); }

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.pane-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

.pane-step {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-foreground);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.45em;
  line-height: 1.4;
}

/* ── 10. TEMPLATE SELECTOR ────────────────────────────────── */
.selector-wrap {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.field-select {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--foreground);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  width: 100%;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow   var(--dur-fast) var(--ease-out);
}

.field-select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 30%, transparent);
}

.field-select option { background: var(--card); color: var(--foreground); }

/* ── 11. FORM FIELDS ──────────────────────────────────────── */
.form-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0 0.5rem;
}

.form-scroll::-webkit-scrollbar       { width: 4px; }
.form-scroll::-webkit-scrollbar-track { background: transparent; }
.form-scroll::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 2px; }

#template-form { display: flex; flex-direction: column; }

.field-group {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  animation: fade-up 0.25s var(--ease-out) both;
}
.field-group:last-child { border-bottom: none; }

/* Stagger */
.field-group:nth-child(1) { animation-delay: .03s; }
.field-group:nth-child(2) { animation-delay: .06s; }
.field-group:nth-child(3) { animation-delay: .09s; }
.field-group:nth-child(4) { animation-delay: .12s; }
.field-group:nth-child(5) { animation-delay: .15s; }
.field-group:nth-child(6) { animation-delay: .18s; }
.field-group:nth-child(7) { animation-delay: .21s; }
.field-group:nth-child(8) { animation-delay: .24s; }

.field-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  opacity: 0.65;
  margin-bottom: 0.375rem;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.field-group:focus-within .field-label { opacity: 1; }

.required-star { color: var(--muted-foreground); }

.field-input,
.field-textarea {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--foreground);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--input);
  outline: none;
  width: 100%;
  padding: 0.25rem 0;
  resize: none;
  caret-color: var(--foreground);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.field-input::placeholder,
.field-textarea::placeholder { color: var(--muted-foreground); opacity: 0.5; }

.field-input:focus,
.field-textarea:focus { border-bottom-color: var(--ring); }

.field-textarea { min-height: 60px; }

/* ── 12. INPUT ACTIONS ────────────────────────────────────── */
.input-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--border);
}

.btn {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 0.875rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background    var(--dur-fast) var(--ease-out),
    color         var(--dur-fast) var(--ease-out),
    border-color  var(--dur-fast) var(--ease-out),
    opacity       var(--dur-fast) var(--ease-out);
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn--primary:hover   { opacity: 0.88; }
.btn--primary:active  { opacity: 0.75; }
.btn--primary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.btn--ghost {
  background: transparent;
  color: var(--muted-foreground);
}
.btn--ghost:hover  { background: var(--accent); color: var(--accent-foreground); }
.btn--ghost:active { opacity: 0.8; }
.btn--ghost:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Copy button — sits in pane header */
.btn--copy {
  font-size: 0.6875rem;
  height: 1.75rem;
  padding: 0 0.625rem;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  background: transparent;
}
.btn--copy:hover { color: var(--foreground); border-color: var(--ring); background: var(--secondary); }
.btn--copy:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Flash states */
.btn--success {
  color: var(--stat-sections-fg) !important;
  border-color: var(--stat-sections-fg) !important;
  background: var(--stat-sections-bg) !important;
}

.btn--warn {
  color: var(--stat-lines-fg) !important;
  border-color: var(--stat-lines-fg) !important;
  background: var(--stat-lines-bg) !important;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── 13. STATS BAR ────────────────────────────────────────── */
#stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  gap: 0.2rem;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }

.stat-value {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.65;
}

.stat--words    { background: var(--stat-words-bg); }
.stat--words    .stat-value, .stat--words    .stat-label { color: var(--stat-words-fg); }

.stat--lines    { background: var(--stat-lines-bg); }
.stat--lines    .stat-value, .stat--lines    .stat-label { color: var(--stat-lines-fg); }

.stat--sections { background: var(--stat-sections-bg); }
.stat--sections .stat-value, .stat--sections .stat-label { color: var(--stat-sections-fg); }

.stat-value.updated { animation: pop-value 0.3s var(--ease-out) forwards; }

@keyframes pop-value {
  0%   { transform: scale(1.25); opacity: 0.5; }
  100% { transform: scale(1);    opacity: 1; }
}

/* ── 14. PREVIEW PANEL ────────────────────────────────────── */
#preview-output {
  flex: 1;
  min-height: 280px;
  overflow-y: auto;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--foreground);
  white-space: pre-wrap;
  word-break: break-word;
}

#preview-output::-webkit-scrollbar       { width: 4px; }
#preview-output::-webkit-scrollbar-track { background: transparent; }
#preview-output::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 2px; }

.preview-empty {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  text-align: center;
  padding: 2rem;
}

.preview-empty-icon { color: var(--muted-foreground); opacity: 0.3; }

.preview-empty p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  max-width: 24ch;
  line-height: 1.55;
}

/* Live indicator */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stat-sections-fg);
  animation: live-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Filename display in pane header */
.preview-filename {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 18ch;
}

/* ── 15. FOOTER ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer-inner p { opacity: 0.5; }

.footer-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.25em 0.65em;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.footer-link:hover { background: var(--secondary); color: var(--foreground); border-color: var(--ring); }

/* ── 16. UTILITY ──────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── 17. PAGE LOAD ────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-header  { animation: fade-up 0.3s  var(--ease-out) both; }
.pane--input  { animation: fade-up 0.35s 0.05s var(--ease-out) both; }
.pane--output { animation: fade-up 0.35s 0.10s var(--ease-out) both; }
.site-footer  { animation: fade-up 0.3s  0.15s var(--ease-out) both; }

/* ── 18. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.875rem;
    align-items: start;
  }
  #preview-output { min-height: 220px; }
}

@media (max-width: 560px) {
  .header-inner  { padding: 0 1rem; height: 48px; }
  .brand-tagline { display: none; }
  .app-shell     { padding: 0.75rem; gap: 0.75rem; }
  .btn           { height: 1.875rem; font-size: 0.75rem; }
  #stats-bar     { grid-template-columns: repeat(3, 1fr); }
  .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.75rem 1rem; }
}

/* ── 19. REDUCED MOTION ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ── 20. VERSION TAG (button that opens changelog) ────────── */
.version-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  padding: 0.2em 0.5em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.version-tag:hover {
  color: var(--foreground);
  background: var(--secondary);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.version-tag:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}


/* ── 21. CHANGELOG TOGGLE BUTTON ─────────────────────────── */
.changelog-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.25em 0.65em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background    var(--dur-fast) var(--ease-out),
    color         var(--dur-fast) var(--ease-out),
    border-color  var(--dur-fast) var(--ease-out);
}

.changelog-toggle-btn:hover {
  background: var(--secondary);
  color: var(--foreground);
  border-color: var(--ring);
}

.changelog-toggle-btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.changelog-toggle-chevron {
  transition: transform var(--dur-fast) var(--ease-out);
}

.changelog-toggle-btn[aria-expanded="true"] .changelog-toggle-chevron {
  transform: rotate(180deg);
}


/* ── 22. CHANGELOG PANEL ──────────────────────────────────── */
.changelog-panel {
  border-top: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height var(--dur-mid) var(--ease-out),
    opacity    var(--dur-mid) var(--ease-out);
}

/* When not hidden, animate open */
.changelog-panel:not([hidden]) {
  max-height: 480px;
  opacity: 1;
}

/* Keep in DOM but invisible when hidden — same trick as StyleGuard */
.changelog-panel[hidden] {
  display: block !important;
  visibility: visible;
  pointer-events: none;
}

.changelog-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem 1.25rem;
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

.changelog-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--foreground);
}

.changelog-gh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.changelog-gh-link:hover { color: var(--foreground); }
.changelog-gh-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.changelog-content {
  overflow-y: auto;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.changelog-content::-webkit-scrollbar       { width: 4px; }
.changelog-content::-webkit-scrollbar-track { background: transparent; }
.changelog-content::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 2px; }

.changelog-release        { display: flex; flex-direction: column; gap: 0.375rem; }
.changelog-release-header { display: flex; align-items: baseline; gap: 0.625rem; }
.changelog-version  { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; color: var(--foreground); }
.changelog-date     { font-family: var(--font-mono); font-size: 0.625rem; color: var(--muted-foreground); }

.changelog-latest-badge {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--stat-sections-fg);
  background: var(--stat-sections-bg);
  border-radius: 999px;
  padding: 0.1em 0.55em;
}

.changelog-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.changelog-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted-foreground);
  line-height: 1.5;
  display: flex;
  gap: 0.5rem;
}

.changelog-item::before {
  content: '—';
  color: var(--ring);
  flex-shrink: 0;
}

  --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-mid:  250ms;
}

/* ── 2. DARK TOKENS ───────────────────────────────────────── */
[data-theme="dark"] {
  color-scheme: dark;
  --background:           #09090b;
  --card:                 #18181b;
  --secondary:            #27272a;
  --muted:                #27272a;
  --accent:               #27272a;
  --foreground:           #fafafa;
  --card-foreground:      #fafafa;
  --primary:              #e4e4e7;
  --primary-foreground:   #18181b;
  --secondary-foreground: #fafafa;
  --muted-foreground:     #a1a1aa;
  --accent-foreground:    #fafafa;
  --border:               rgba(255,255,255,0.10);
  --input:                rgba(255,255,255,0.15);
  --ring:                 #71717a;
  --toggle-border:        rgba(255,255,255,0.18);

  --stat-words-bg:    rgba( 96,165,250,.10); --stat-words-fg:    #93c5fd;
  --stat-lines-bg:    rgba(251,191, 36,.10); --stat-lines-fg:    #fcd34d;
  --stat-sections-bg: rgba( 52,211,153,.10); --stat-sections-fg: #6ee7b7;
}

/* ── 3. LIGHT TOKENS ──────────────────────────────────────── */
[data-theme="light"] {
  color-scheme: light;
  --background:           #ffffff;
  --card:                 #ffffff;
  --secondary:            #f4f4f5;
  --muted:                #f4f4f5;
  --accent:               #f4f4f5;
  --foreground:           #09090b;
  --card-foreground:      #09090b;
  --primary:              #18181b;
  --primary-foreground:   #fafafa;
  --secondary-foreground: #18181b;
  --muted-foreground:     #71717a;
  --accent-foreground:    #18181b;
  --border:               rgba(0,0,0,0.10);
  --input:                rgba(0,0,0,0.08);
  --ring:                 #a1a1aa;
  --toggle-border:        rgba(0,0,0,0.15);

  --stat-words-bg:    rgba( 37, 99,235,.07); --stat-words-fg:    #1d4ed8;
  --stat-lines-bg:    rgba(161,109,  8,.07); --stat-lines-fg:    #92400e;
  --stat-sections-bg: rgba(  5,150,105,.07); --stat-sections-fg: #065f46;
}

/* ── 4. THEME TRANSITION ──────────────────────────────────── */
body, .site-header, .pane, .pane-header, .pane-step,
.stat, #preview-output, .site-footer, .btn,
.field-input, .field-textarea {
  transition:
    background-color var(--dur-mid) var(--ease-out),
    border-color     var(--dur-mid) var(--ease-out),
    color            var(--dur-mid) var(--ease-out),
    box-shadow       var(--dur-mid) var(--ease-out);
}

/* ── 5. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── 6. HEADER ────────────────────────────────────────────── */
.site-header {
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.625rem; }

.brand-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--primary-foreground);
  letter-spacing: -0.02em;
}

.brand-text { display: flex; flex-direction: column; gap: 1px; }

.brand-name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--foreground);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  font-weight: 400;
  line-height: 1;
}

.header-right { display: flex; align-items: center; gap: 0.75rem; }

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  padding: 0.2em 0.5em;
  border-radius: var(--radius-sm);
  cursor: default;
}

/* ── 7. THEME TOGGLE ──────────────────────────────────────── */
.btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: 9999px;
  background: var(--secondary);
  border: 1px solid var(--toggle-border);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition:
    background   var(--dur-fast) var(--ease-out),
    box-shadow   var(--dur-fast) var(--ease-out);
}

.btn--icon:hover { background: var(--accent); box-shadow: 0 0 0 1px var(--ring); }
.btn--icon:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }


[data-theme="dark"]  .icon-sun   { display: none; }
[data-theme="dark"]  .icon-moon  { display: block; }
[data-theme="light"] .icon-moon  { display: none; }
[data-theme="light"] .icon-sun   { display: block; }
[data-theme="dark"]  .label-dark  { display: inline; }
[data-theme="dark"]  .label-light { display: none; }
[data-theme="light"] .label-dark  { display: none; }
[data-theme="light"] .label-light { display: inline; }

@keyframes spin-icon {
  from { transform: rotate(-30deg) scale(0.8); opacity: 0; }
  to   { transform: rotate(0)      scale(1);   opacity: 1; }
}
.btn--icon.toggling svg { animation: spin-icon 0.35s var(--ease-out) both; }

/* ── 8. APP SHELL ─────────────────────────────────────────── */
.app-shell {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
}

/* ── 9. PANES ─────────────────────────────────────────────── */
.pane {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pane:focus-within { box-shadow: 0 0 0 1px var(--ring); }

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.pane-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

.pane-step {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-foreground);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.45em;
  line-height: 1.4;
}

/* ── 10. TEMPLATE SELECTOR ────────────────────────────────── */
.selector-wrap {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.field-select {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--foreground);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  width: 100%;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow   var(--dur-fast) var(--ease-out);
}

.field-select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 30%, transparent);
}

.field-select option { background: var(--card); color: var(--foreground); }

/* ── 11. FORM FIELDS ──────────────────────────────────────── */
.form-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0 0.5rem;
}

.form-scroll::-webkit-scrollbar       { width: 4px; }
.form-scroll::-webkit-scrollbar-track { background: transparent; }
.form-scroll::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 2px; }

#template-form { display: flex; flex-direction: column; }

.field-group {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  animation: fade-up 0.25s var(--ease-out) both;
}
.field-group:last-child { border-bottom: none; }

/* Stagger */
.field-group:nth-child(1) { animation-delay: .03s; }
.field-group:nth-child(2) { animation-delay: .06s; }
.field-group:nth-child(3) { animation-delay: .09s; }
.field-group:nth-child(4) { animation-delay: .12s; }
.field-group:nth-child(5) { animation-delay: .15s; }
.field-group:nth-child(6) { animation-delay: .18s; }
.field-group:nth-child(7) { animation-delay: .21s; }
.field-group:nth-child(8) { animation-delay: .24s; }

.field-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  opacity: 0.65;
  margin-bottom: 0.375rem;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.field-group:focus-within .field-label { opacity: 1; }

.required-star { color: var(--muted-foreground); }

.field-input,
.field-textarea {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--foreground);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--input);
  outline: none;
  width: 100%;
  padding: 0.25rem 0;
  resize: none;
  caret-color: var(--foreground);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.field-input::placeholder,
.field-textarea::placeholder { color: var(--muted-foreground); opacity: 0.5; }

.field-input:focus,
.field-textarea:focus { border-bottom-color: var(--ring); }

.field-textarea { min-height: 60px; }

/* ── 12. INPUT ACTIONS ────────────────────────────────────── */
.input-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--border);
}

.btn {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 0.875rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background    var(--dur-fast) var(--ease-out),
    color         var(--dur-fast) var(--ease-out),
    border-color  var(--dur-fast) var(--ease-out),
    opacity       var(--dur-fast) var(--ease-out);
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn--primary:hover   { opacity: 0.88; }
.btn--primary:active  { opacity: 0.75; }
.btn--primary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.btn--ghost {
  background: transparent;
  color: var(--muted-foreground);
}
.btn--ghost:hover  { background: var(--accent); color: var(--accent-foreground); }
.btn--ghost:active { opacity: 0.8; }
.btn--ghost:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Copy button — sits in pane header */
.btn--copy {
  font-size: 0.6875rem;
  height: 1.75rem;
  padding: 0 0.625rem;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  background: transparent;
}
.btn--copy:hover { color: var(--foreground); border-color: var(--ring); background: var(--secondary); }
.btn--copy:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Flash states */
.btn--success {
  color: var(--stat-sections-fg) !important;
  border-color: var(--stat-sections-fg) !important;
  background: var(--stat-sections-bg) !important;
}

.btn--warn {
  color: var(--stat-lines-fg) !important;
  border-color: var(--stat-lines-fg) !important;
  background: var(--stat-lines-bg) !important;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── 13. STATS BAR ────────────────────────────────────────── */
#stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  gap: 0.2rem;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }

.stat-value {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.65;
}

.stat--words    { background: var(--stat-words-bg); }
.stat--words    .stat-value, .stat--words    .stat-label { color: var(--stat-words-fg); }

.stat--lines    { background: var(--stat-lines-bg); }
.stat--lines    .stat-value, .stat--lines    .stat-label { color: var(--stat-lines-fg); }

.stat--sections { background: var(--stat-sections-bg); }
.stat--sections .stat-value, .stat--sections .stat-label { color: var(--stat-sections-fg); }

.stat-value.updated { animation: pop-value 0.3s var(--ease-out) forwards; }

@keyframes pop-value {
  0%   { transform: scale(1.25); opacity: 0.5; }
  100% { transform: scale(1);    opacity: 1; }
}

/* ── 14. PREVIEW PANEL ────────────────────────────────────── */
#preview-output {
  flex: 1;
  min-height: 280px;
  overflow-y: auto;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--foreground);
  white-space: pre-wrap;
  word-break: break-word;
}

#preview-output::-webkit-scrollbar       { width: 4px; }
#preview-output::-webkit-scrollbar-track { background: transparent; }
#preview-output::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 2px; }

.preview-empty {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  text-align: center;
  padding: 2rem;
}

.preview-empty-icon { color: var(--muted-foreground); opacity: 0.3; }

.preview-empty p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  max-width: 24ch;
  line-height: 1.55;
}

/* Live indicator */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stat-sections-fg);
  animation: live-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Filename display in pane header */
.preview-filename {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 18ch;
}

/* ── 15. FOOTER ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer-inner p { opacity: 0.5; }

.footer-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.25em 0.65em;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.footer-link:hover { background: var(--secondary); color: var(--foreground); border-color: var(--ring); }

/* ── 16. UTILITY ──────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── 17. PAGE LOAD ────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-header  { animation: fade-up 0.3s  var(--ease-out) both; }
.pane--input  { animation: fade-up 0.35s 0.05s var(--ease-out) both; }
.pane--output { animation: fade-up 0.35s 0.10s var(--ease-out) both; }
.site-footer  { animation: fade-up 0.3s  0.15s var(--ease-out) both; }

/* ── 18. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.875rem;
    align-items: start;
  }
  #preview-output { min-height: 220px; }
}

@media (max-width: 560px) {
  .header-inner  { padding: 0 1rem; height: 48px; }
  .brand-tagline { display: none; }
  .app-shell     { padding: 0.75rem; gap: 0.75rem; }
  .btn           { height: 1.875rem; font-size: 0.75rem; }
  #stats-bar     { grid-template-columns: repeat(3, 1fr); }
  .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.75rem 1rem; }
}

/* ── 19. REDUCED MOTION ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ── 20. VERSION TAG (button that opens changelog) ────────── */
.version-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  padding: 0.2em 0.5em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.version-tag:hover {
  color: var(--foreground);
  background: var(--secondary);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.version-tag:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}


/* ── 21. CHANGELOG TOGGLE BUTTON ─────────────────────────── */
.changelog-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.25em 0.65em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background    var(--dur-fast) var(--ease-out),
    color         var(--dur-fast) var(--ease-out),
    border-color  var(--dur-fast) var(--ease-out);
}

.changelog-toggle-btn:hover {
  background: var(--secondary);
  color: var(--foreground);
  border-color: var(--ring);
}

.changelog-toggle-btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.changelog-toggle-chevron {
  transition: transform var(--dur-fast) var(--ease-out);
}

.changelog-toggle-btn[aria-expanded="true"] .changelog-toggle-chevron {
  transform: rotate(180deg);
}


/* ── 22. CHANGELOG PANEL ──────────────────────────────────── */
.changelog-panel {
  border-top: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height var(--dur-mid) var(--ease-out),
    opacity    var(--dur-mid) var(--ease-out);
}

/* When not hidden, animate open */
.changelog-panel:not([hidden]) {
  max-height: 480px;
  opacity: 1;
}

/* Keep in DOM but invisible when hidden — same trick as StyleGuard */
.changelog-panel[hidden] {
  display: block !important;
  visibility: visible;
  pointer-events: none;
}

.changelog-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem 1.25rem;
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

.changelog-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--foreground);
}

.changelog-gh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.changelog-gh-link:hover { color: var(--foreground); }
.changelog-gh-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.changelog-content {
  overflow-y: auto;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.changelog-content::-webkit-scrollbar       { width: 4px; }
.changelog-content::-webkit-scrollbar-track { background: transparent; }
.changelog-content::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 2px; }

.changelog-release        { display: flex; flex-direction: column; gap: 0.375rem; }
.changelog-release-header { display: flex; align-items: baseline; gap: 0.625rem; }
.changelog-version  { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; color: var(--foreground); }
.changelog-date     { font-family: var(--font-mono); font-size: 0.625rem; color: var(--muted-foreground); }

.changelog-latest-badge {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--stat-sections-fg);
  background: var(--stat-sections-bg);
  border-radius: 999px;
  padding: 0.1em 0.55em;
}

.changelog-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.changelog-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted-foreground);
  line-height: 1.5;
  display: flex;
  gap: 0.5rem;
}

.changelog-item::before {
  content: '—';
  color: var(--ring);
  flex-shrink: 0;
}
