/* =========================================================
   VidRatio — design system: clean SaaS-style cards,
   dropdown category nav, pill buttons, soft tinted shadows.
   Type: Plus Jakarta Sans (display) + Inter (body). Bright
   red + white primary, with monochromatic red category shades.
   ========================================================= */
:root {
  /* --- neutrals --- */
  --ink:        #18181B;
  --ink-2:      #4B4B52;
  --ink-3:      #8B8B93;
  --line:       #ECE7E7;
  --line-soft:  #F5F1F1;
  --paper:      #FFFFFF;
  --bg:         #FBF9F9;
  --bg-tint:    #F6EFEF;

  /* --- brand (VidRatio red — tuned from raw #FF0000 for AA contrast) --- */
  --brand:      #D5161E;
  --brand-ink:  #B01218;
  --brand-tint: #FCE9EA;
  --cta:        #D5161E;
  --cta-ink:    #B01218;
  --cta-tint:   #FCE9EA;

  /* --- vibrant accent used on dark result cards (numbers, gauge fill) --- */
  --lime:       #FF4B50;
  --lime-ink:   #FFFFFF;

  /* --- dark result-card palette, independent of light/dark site theme --- */
  --results-dark-bg:    #1B1517;
  --results-dark-bg-2:  #241C1E;
  --results-dark-line:  rgba(255,255,255,.12);
  --results-dark-ink:   #FBF7F7;
  --results-dark-ink-2: #BFAFB0;

  /* --- category identity (red = earnings, blue = video/link, amber = utilities) --- */
  --cat-earn:       #D5161E;
  --cat-earn-tint:  #FCE9EA;
  --cat-video:      #2563EB;
  --cat-video-tint: #E9EFFD;
  --cat-util:       #C2410C;
  --cat-util-tint:  #FCEEE4;

  /* --- legacy category aliases (kept for formula/example boxes) --- */
  --cat-body:      #D5161E;
  --cat-body-tint: #FCE9EA;
  --cat-nutrition:      #B01218;
  --cat-nutrition-tint: #FBE4E4;
  --cat-fitness:      #8A0F17;
  --cat-fitness-tint: #F7DEDF;
  --cat-planning:  #D5161E;
  --cat-planning-tint: #FCE9EA;
  --cat-food:      #B01218;
  --cat-food-tint: #FBE4E4;

  /* --- state --- */
  --ok:         #12A150;
  --ok-tint:    #E4F9EC;
  --warn:       #E5A100;
  --warn-tint:  #FFF4DE;
  --err:        #E5252A;
  --err-tint:   #FDE7E7;

  /* --- type --- */
  --display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  /* --- metrics --- */
  --gut: 24px;
  --max: 1240px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(24,24,27,.04), 0 2px 8px -2px rgba(24,24,27,.06);
  --shadow: 0 4px 16px -4px rgba(24,24,27,.08), 0 2px 6px -2px rgba(24,24,27,.05);
  --shadow-lift: 0 24px 48px -16px rgba(24,24,27,.18), 0 8px 20px -8px rgba(24,24,27,.1);
  --shadow-brand: 0 12px 26px -10px rgba(213,22,30,.45);
  --shadow-cta: 0 12px 26px -10px rgba(213,22,30,.45);

  --cat: var(--brand);
  --cat-tint: var(--brand-tint);
}

[data-theme="dark"] {
  --ink:        #F1F1F1;
  --ink-2:      #AAAAAA;
  --ink-3:      #717171;
  --line:       #303030;
  --line-soft:  #272727;
  --paper:      #181818;
  --bg:         #0F0F0F;
  --bg-tint:    #212121;

  --brand:      #FF5A5F;
  --brand-ink:  #FF7A7E;
  --brand-tint: #3A1516;
  --cta:        #FF5A5F;
  --cta-ink:    #FF7A7E;
  --cta-tint:   #3A1516;

  --cat-earn:       #FF5A5F; --cat-earn-tint:  #3A1516;
  --cat-video:      #7CA7FF; --cat-video-tint: #14213D;
  --cat-util:       #F59E0B; --cat-util-tint:  #3A2810;

  --cat-body:      #FF5A5F; --cat-body-tint: #3A1516;
  --cat-nutrition: #FF7A7E; --cat-nutrition-tint: #3A1414;
  --cat-fitness:   #FF9A95; --cat-fitness-tint: #341818;
  --cat-planning:  #FF5A5F; --cat-planning-tint: #3A1516;
  --cat-food:      #FF7A7E; --cat-food-tint: #3A1414;

  --ok: #3FD79C; --ok-tint: #163229;
  --warn: #FFC15C; --warn-tint: #382A15;
  --err: #FF7A7E; --err-tint: #3A1D1F;

  --results-dark-bg:    #181818;
  --results-dark-bg-2:  #212121;
  --results-dark-line:  rgba(255,255,255,.14);
  --results-dark-ink:   #F1F1F1;
  --results-dark-ink-2: #AAAAAA;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px -2px rgba(0,0,0,.35);
  --shadow: 0 4px 16px -4px rgba(0,0,0,.45), 0 2px 6px -2px rgba(0,0,0,.3);
  --shadow-lift: 0 24px 48px -16px rgba(0,0,0,.6), 0 8px 20px -8px rgba(0,0,0,.4);
  --shadow-brand: 0 12px 26px -10px rgba(255,90,95,.35);
  --shadow-cta: 0 12px 26px -10px rgba(255,90,95,.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 12px;
}
h1 { font-size: clamp(2rem, 4.2vw, 2.85rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-top: 44px; font-weight: 700; }
h3 { font-size: 1.08rem; margin-top: 0; font-weight: 700; }
p { margin: 0 0 14px; color: var(--ink-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-size: .78rem; font-weight: 700;
  letter-spacing: .01em; color: #fff;
  background: var(--brand); padding: 7px 14px 7px 12px; border-radius: var(--r-pill);
}
.eyebrow svg { width: 15px; height: 15px; flex: none; }

/* ============================================================ icons */
.icon-badge {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.icon-badge-svg { width: 23px; height: 23px; }
.arrow-icon { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; margin-left: 2px; }

/* ============================================================ header / nav */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  position: sticky; top: 0; z-index: 60;
}
.bar { display: flex; align-items: center; gap: 8px; height: 72px; }

.logo {
  font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.03em;
  color: var(--ink); display: inline-flex; align-items: center; gap: 2px; flex: none; white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo .dot { color: var(--brand); }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 22px; }

.nav-item { position: relative; }
.nav-trig {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-size: 15.5px; font-weight: 600; color: var(--ink-2);
  background: none; border: 0; box-shadow: none; cursor: pointer; padding: 10px 12px 10px 14px; border-radius: 10px;
  white-space: nowrap; transition: background .14s, color .14s;
}
.nav-trig:hover, .nav-item[data-open="true"] .nav-trig, .nav-item:focus-within .nav-trig { background: var(--bg-tint); color: var(--ink); }
.nav-caret { width: 14px; height: 14px; flex: none; transition: transform .16s ease; }
.nav-item[data-open="true"] .nav-caret { transform: rotate(90deg); }

.nav-drop {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 250px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lift); padding: 10px; z-index: 60;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}
/* Invisible bridge over the gap above the dropdown — without this, moving
   the mouse from the trigger down to the dropdown crosses a dead zone with
   no hoverable element under it, breaking the hover chain and closing the
   menu before the cursor arrives. */
.nav-drop::before {
  content: "";
  position: absolute;
  top: -6px; left: 0; right: 0; height: 6px;
}
.nav-item[data-open="true"] .nav-drop {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  transition: opacity .14s ease, transform .14s ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
    transition: opacity .14s ease, transform .14s ease;
  }
}
.nav-drop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-drop ul a {
  display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; padding: 9px 10px; border-radius: 9px; line-height: 1.35;
  transition: background .12s, color .12s, padding-left .12s;
}
.nav-drop ul a:hover, .nav-drop ul a:focus-visible { background: var(--bg-tint); color: var(--ink); padding-left: 14px; }
.nav-drop-icon {
  width: 28px; height: 28px; flex: none; padding: 6px; border-radius: 8px;
  background: var(--cat, var(--brand)); color: #fff;
}

.head-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1.5px solid var(--line); background: var(--paper);
  border-radius: 12px; cursor: pointer; color: var(--ink-2); flex: none;
  transition: border-color .14s, color .14s, background .14s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.icon-btn svg { width: 19px; height: 19px; }
[data-theme="dark"] .sun { display: none; }
:root:not([data-theme="dark"]) .moon { display: none; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; margin-left: 0;
    background: var(--paper); border-bottom: 1.5px solid var(--line);
    padding: 10px var(--gut) 16px; gap: 2px; box-shadow: var(--shadow-lift);
    z-index: 55; max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .nav-item { width: 100%; }
  .nav-trig { width: 100%; justify-content: space-between; padding: 12px; }
  .nav-drop {
    position: static; opacity: 1; visibility: visible; transform: none; transition: none;
    display: none; min-width: 0; width: 100%; box-shadow: none; border: 0;
    background: var(--bg-tint); margin: 2px 0 6px; padding: 6px;
  }
  .nav-item[data-open="true"] .nav-drop { display: block; }
  .nav-toggle { display: grid; }
}

/* ============================================================ pulse divider */
.pulse-divider { width: 100%; height: 26px; margin: 0; overflow: hidden; opacity: .7; }
.pulse-divider svg { width: 100%; height: 100%; display: block; }
.pulse-divider path {
  fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 500; stroke-dashoffset: 500;
  animation: draw 1.1s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ============================================================ hero */
.hero { padding: 52px 0 40px; }
.hero-center { max-width: 700px; margin: 0 auto; text-align: center; }
.hero-center h1 { max-width: none; margin-top: 18px; }
.hero-center .lede { max-width: 58ch; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }

.search-box { position: relative; max-width: 480px; margin: 26px auto 0; }
.search-box input {
  width: 100%; padding: 14px 18px 14px 44px; border-radius: var(--r-pill); border: 1.5px solid var(--line);
  font-family: var(--body); font-size: .95rem; background: var(--paper); color: var(--ink);
}
.search-box input:focus { border-color: var(--brand); outline: none; }
.search-box::before {
  content: ""; position: absolute; left: 17px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; background: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") center/contain no-repeat;
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lift);
  max-height: 320px; overflow-y: auto; z-index: 50; display: none; padding: 8px;
}
.search-results.show { display: block; }
.search-results a { display: block; padding: 10px 12px; color: var(--ink); border-radius: 9px; font-size: .92rem; transition: background .12s; }
.search-results a:hover { background: var(--bg-tint); }
.search-results .cat-tag-inline { color: var(--ink-3); font-size: .78rem; }
.search-empty { padding: 14px 12px; color: var(--ink-3); font-size: .88rem; }

/* ============================================================ live demo widget */
.live-demo {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 28px;
  position: relative; box-shadow: var(--shadow-sm); max-width: 720px; margin: 36px auto 0;
}
.live-demo .demo-label { font-family: var(--display); font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 6px; text-align: center; }
.live-demo .demo-title { font-family: var(--display); font-weight: 700; font-size: 1.12rem; margin-bottom: 22px; text-align: center; }
.live-demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 620px) { .live-demo-grid { grid-template-columns: 1fr; gap: 20px; } }
.live-demo .slider-row { margin-bottom: 18px; }
.live-demo label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink-2); margin-bottom: 6px; font-family: var(--display); font-weight: 600; }
.live-demo input[type=range] { width: 100%; accent-color: var(--brand); }
.live-demo .demo-result { text-align: center; padding: 20px; background: var(--brand-tint); border-radius: var(--r); }
.live-demo .demo-number { font-family: var(--display); font-size: 2.9rem; font-weight: 800; color: var(--ink); line-height: 1; }
.live-demo .demo-cat { font-family: var(--display); font-weight: 700; font-size: .9rem; color: var(--brand-ink); margin-top: 8px; }
.live-demo .demo-cta { display: inline-block; margin-top: 14px; font-size: .85rem; color: var(--brand-ink); font-weight: 700; }

/* ============================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: var(--r-pill);
  font-weight: 700; font-size: .94rem; border: 1.5px solid transparent; cursor: pointer; font-family: var(--display);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn-block { width: 100%; }

/* ============================================================ sections */
.section { padding: 46px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { margin-top: 0; }
.section-head a { font-weight: 700; font-size: .9rem; color: var(--brand-ink); display: inline-flex; align-items: center; }

/* ============================================================ category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 16px; }
.cat-card {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cat-card:hover { border-color: var(--cat, var(--brand)); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-card .cat-tagline { font-size: .78rem; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.cat-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.cat-card .cat-count { color: var(--ink-3); font-size: .85rem; }

/* ============================================================ tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }
.tool-card {
  position: relative; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; display: block; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tool-card:hover { border-color: var(--cat, var(--brand)); transform: translateY(-3px); box-shadow: var(--shadow); }
.tool-card h3 { font-size: 1.03rem; margin: 0 0 6px; }
.tool-card p { font-size: .87rem; margin: 0; color: var(--ink-3); }
.tool-card .arrow { display: inline-flex; align-items: center; margin-top: 12px; color: var(--cat, var(--brand-ink)); font-size: .85rem; font-weight: 700; }
.cat-tag {
  position: absolute; top: 20px; right: 20px;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--cat, var(--brand)); color: #fff;
}

/* ============================================================ breadcrumb */
.breadcrumb { font-size: .82rem; color: var(--ink-3); padding: 16px 0 0; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand-ink); }

/* ============================================================ calculator page */
.calc-header { padding: 28px 0 8px; }
.calc-header .eyebrow { margin-bottom: 10px; }

.calc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin: 22px 0 8px; }
@media (max-width: 860px) { .calc-split { grid-template-columns: 1fr; gap: 28px; } }

.calc-form-col { padding: 4px 0; }
.calc-form-col .eyebrow { margin-bottom: 14px; }
.calc-title {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  max-width: 14ch;
}
.calc-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 42ch;
  margin: 0 0 30px;
}
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 18px; margin-bottom: 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: .85rem; font-weight: 700; color: var(--ink); font-family: var(--display); }
.field .input-row { display: flex; gap: 8px; }
.field input[type=number], .field input[type=text], .field select {
  flex: 1; padding: 14px 15px; border: 1.5px solid var(--line); border-radius: var(--r);
  font-family: var(--body); font-size: 1rem; background: var(--paper); color: var(--ink); width: 100%;
  box-shadow: var(--shadow-sm);
}
.field select.unit-select { flex: 0 0 auto; min-width: 84px; width: auto; padding-right: 34px; }
.field input:focus, .field select:focus { border-color: var(--brand); outline: none; }
.field .measurement-ftin { align-items: center; }
.unit-tag { align-self: center; color: var(--ink-3); font-family: var(--body); font-size: .82rem; white-space: nowrap; }
.calc-form-col .btn-block { padding: 16px 24px; font-size: 1rem; }

/* ---------- dark results card ---------- */
.results-panel {
  display: none;
}
.results-panel.show { display: block; }
.results-panel-dark {
  background: var(--results-dark-bg); color: var(--results-dark-ink);
  border-radius: var(--r-lg); padding: 34px 30px; box-shadow: var(--shadow-lift);
  text-align: center;
}
.r-label-dark { font-family: var(--display); font-size: .85rem; font-weight: 700; color: var(--results-dark-ink-2); }
.r-value-dark { font-family: var(--display); font-size: 3.4rem; font-weight: 800; line-height: 1.05; color: var(--lime); margin-top: 2px; }
.r-category-dark { font-family: var(--display); font-size: .95rem; font-weight: 700; color: var(--results-dark-ink); margin-top: 6px; }

.results-secondary-dark { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 14px; margin: 22px 0 6px; }
.r-item-dark { background: var(--results-dark-bg-2); border-radius: var(--r-sm); padding: 12px 10px; }
.r-label-sm.r-label-dark { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.r-value-sm.r-value-dark { font-size: 1.15rem; color: var(--results-dark-ink); margin-top: 3px; }

.results-notes-dark { border-top: 1px solid var(--results-dark-line); padding-top: 16px; margin-top: 22px; text-align: left; }
.results-notes-dark p { color: var(--results-dark-ink-2); font-size: .87rem; margin: 0 0 8px; }
.results-notes-dark p:last-child { margin-bottom: 0; }

/* ---------- semicircle arc gauge ---------- */
.gauge-wrap-arc { margin: 18px 0 4px; }
.gauge-svg { width: 100%; height: auto; overflow: visible; }
.gauge-zone-arc { transition: opacity .15s; }
.gauge-scale-label { font-family: var(--body); font-size: 11px; font-weight: 600; fill: var(--results-dark-ink-2); }
.gauge-marker-ring { fill: rgba(255,255,255,.16); }
.gauge-marker-dot { fill: var(--lime); stroke: var(--results-dark-bg); stroke-width: 3; }

/* ---------- zone range list ---------- */
.zone-list { text-align: left; margin-top: 8px; }
.zone-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--results-dark-line); font-size: .92rem;
  border-radius: var(--r-sm); transition: background .15s;
}
.zone-row:last-child { border-bottom: none; }
.zone-row-active { background: var(--results-dark-bg-2); padding-left: 10px; padding-right: 10px; }
.zone-row-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--results-dark-ink); }
.zone-row-active .zone-row-label { color: var(--lime); }
.zone-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.zone-row-value { color: var(--results-dark-ink-2); font-variant-numeric: tabular-nums; }
.zone-row-active .zone-row-value { color: var(--results-dark-ink); }

/* ============================================================ content on calc pages */
.content-block { padding: 8px 0 28px; }
.content-block p { max-width: 72ch; }
.content-block h2 { font-size: 1.35rem; }
.content-block > p:first-of-type { font-size: 1.02rem; line-height: 1.65; color: var(--ink-2); }
.howto-steps { max-width: 72ch; padding-left: 22px; margin: 0; counter-reset: step; }
.howto-steps li { padding-left: 6px; margin-bottom: 10px; line-height: 1.6; color: var(--ink-2); }
.howto-steps li::marker { font-weight: 700; color: var(--brand); font-family: var(--display); }
.feature-list, .usecase-list { max-width: 72ch; padding-left: 20px; margin: 0; }
.feature-list li, .usecase-list li { margin-bottom: 9px; line-height: 1.6; color: var(--ink-2); }
.feature-list li strong, .usecase-list li strong { color: var(--ink); }
.terminology-list { max-width: 72ch; }
.terminology-list dt { font-family: var(--display); font-weight: 700; color: var(--ink); margin-top: 14px; font-size: .98rem; }
.terminology-list dt:first-child { margin-top: 0; }
.terminology-list dd { margin: 4px 0 0; color: var(--ink-2); line-height: 1.6; }
.formula-box {
  background: var(--brand-tint); border-left: 3px solid var(--brand); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 16px 20px; font-size: .92rem; color: var(--ink); margin: 14px 0;
}
.example-box {
  background: var(--cat-body-tint); border-left: 3px solid var(--cat-body); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 16px 20px; font-size: .92rem; margin: 14px 0; color: var(--ink-2);
}

/* ============================================================ FAQ (always visible, no accordion) */
.faq { border-top: 1.5px solid var(--line); }
.faq-item { padding: 20px 0; border-bottom: 1.5px solid var(--line); }
.faq-item h3 { font-family: var(--display); font-weight: 700; font-size: 15.5px; color: var(--ink); margin: 0 0 8px; }
.faq-item p { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; margin: 0; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }

/* ============================================================ footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 30px; margin-top: 50px; background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(7, 1fr); gap: 24px; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(3,1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 620px) { .footer-grid { grid-template-columns: repeat(2,1fr); } }
.footer-grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; margin-bottom: 12px; font-family: var(--display); }
.footer-grid a { display: block; color: var(--ink-2); font-size: .87rem; margin-bottom: 9px; }
.footer-grid a:hover { color: var(--brand-ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; margin-top: 30px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-3); }
.footer-bottom a { color: var(--ink-3); }

/* ============================================================ custom tool layout (link parser, embed gen, thumbnails, etc.) */
.custom-tool-layout { max-width: 760px; margin: 22px auto 0; }
.custom-tool-header { margin-bottom: 22px; }
.custom-tool-header .calc-title { font-size: clamp(1.7rem, 3vw, 2.2rem); max-width: none; }
.custom-tool-header .calc-intro { max-width: 62ch; margin-bottom: 0; }

.tool-card-panel {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 28px;
}
.tool-card-panel-center { text-align: center; }
.tool-card-panel .field { margin-bottom: 0; }
.tool-card-panel .field label { display: block; font-size: .85rem; font-weight: 700; color: var(--ink); font-family: var(--display); margin-bottom: 7px; }

/* RPM by Niche comparison tool */
.rpm-tier-group { margin-bottom: 28px; }
.rpm-tier-group:last-child { margin-bottom: 0; }
.rpm-tier-heading {
  font-family: var(--display); font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 16px; padding-bottom: 8px; border-bottom: 1.5px solid var(--line);
}
.rpm-creators { margin-top: 9px; font-size: .78rem; line-height: 2; }
.rpm-creators-label { color: var(--ink-3); font-weight: 600; margin-right: 4px; }
.rpm-creator-chip {
  display: inline-block; margin: 0 4px 4px 0; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--bg-tint); color: var(--ink-2); text-decoration: none; font-size: .77rem;
  border: 1px solid var(--line); transition: all .12s;
}
.rpm-creator-chip:hover { border-color: var(--brand); color: var(--brand); }
.rpm-creator-chip-match { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.rpm-creator-chip-match:hover { color: #fff; }
.rpm-format-toggle { display: flex; gap: 8px; margin: 14px 0 18px; }
.rpm-format-btn {
  flex: 1; padding: 10px 14px; border-radius: var(--r); border: 1.5px solid var(--line);
  background: var(--bg-tint); color: var(--ink-2); font-family: var(--display); font-weight: 700; font-size: .88rem;
  cursor: pointer; transition: all .14s;
}
.rpm-format-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.rpm-row { margin-bottom: 18px; }
.rpm-row-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.rpm-row-label { font-family: var(--display); font-weight: 700; font-size: .92rem; color: var(--ink); }
.rpm-row-value { font-family: var(--display); font-weight: 800; font-size: .95rem; color: var(--brand); }
.rpm-bar-track { position: relative; height: 22px; background: var(--bg-tint); border-radius: 11px; overflow: hidden; border: 1px solid var(--line); }
.rpm-bar-low, .rpm-bar-high {
  position: absolute; top: 0; left: 0; bottom: 0; border-radius: 11px;
  transition: width .35s ease;
}
.rpm-bar-high { background: var(--brand-tint); border: 1.5px dashed var(--brand); }
.rpm-bar-low { background: var(--brand); z-index: 1; box-shadow: 2px 0 4px rgba(0,0,0,.15); }
.rpm-row-meta { font-size: .78rem; color: var(--ink-3); margin-top: 5px; }
.rpm-shorts-note { font-size: .82rem; color: var(--ink-3); margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); line-height: 1.55; }

.tool-card-panel input[type=text], .tool-card-panel input[type=number], .tool-card-panel textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--r);
  font-family: var(--body); font-size: 1rem; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
}
.tool-card-panel textarea { resize: vertical; font-family: var(--mono, monospace); font-size: .92rem; }
.tool-card-panel input:focus, .tool-card-panel textarea:focus { border-color: var(--brand); outline: none; }
.tool-card-panel .btn { margin-top: 16px; }
.tool-empty { color: var(--ink-3); font-size: .92rem; margin: 18px 0 0; }
.check-row { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); font-weight: 500; cursor: pointer; }
.check-label input { width: 17px; height: 17px; accent-color: var(--brand); }

/* key-value list — Link Parser */
.kv-list { margin-top: 20px; border-top: 1.5px solid var(--line); }
.kv-row {
  display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.kv-label { font-size: .82rem; font-weight: 700; color: var(--ink-3); font-family: var(--display); }
.kv-value { font-family: var(--mono, monospace); font-size: .88rem; color: var(--ink); word-break: break-all; }
.kv-copy {
  flex: none; background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 6px 14px; font-size: .78rem; font-weight: 700; color: var(--ink-2); cursor: pointer; font-family: var(--display);
  transition: background .12s, border-color .12s;
}
.kv-copy:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-ink); }
@media (max-width: 560px) {
  .kv-row { grid-template-columns: 1fr; gap: 4px; }
  .kv-copy { justify-self: start; margin-top: 4px; }
}

/* Embed Generator */
.embed-preview-wrap { margin-top: 20px; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 16/9; }
.embed-preview-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.code-box-wrap { margin-top: 14px; }
.code-box {
  width: 100%; background: var(--results-dark-bg); color: var(--results-dark-ink); border: none;
  border-radius: var(--r-sm); padding: 14px; font-family: var(--mono, monospace); font-size: .82rem;
  line-height: 1.6; resize: vertical;
}

/* Thumbnail Downloader */
.thumb-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; }
.thumb-card { border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-tint); }
.thumb-img-wrap { aspect-ratio: 16/9; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-meta { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px 4px; }
.thumb-label { font-size: .85rem; font-weight: 700; color: var(--ink); font-family: var(--display); }
.thumb-dims { font-size: .76rem; color: var(--ink-3); }
.thumb-dl { margin: 10px 12px 12px; width: calc(100% - 24px); padding: 9px 12px; font-size: .82rem; }

/* Title & Description Checker */
.char-meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.char-bar-track { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--bg-tint); overflow: hidden; }
.char-bar { height: 100%; background: var(--brand); border-radius: var(--r-pill); width: 0%; transition: width .15s ease, background .15s ease; }
.char-bar.bar-danger { background: var(--err); }
.char-count { flex: none; font-size: .78rem; font-weight: 700; color: var(--ink-3); font-family: var(--display); white-space: nowrap; }
.char-warn { font-size: .82rem; color: var(--warn); margin-top: 8px; font-weight: 600; }

/* BPM Finder */
.bpm-display { margin-bottom: 22px; }
.bpm-value { font-family: var(--display); font-size: 4.5rem; font-weight: 800; color: var(--brand); line-height: 1; }
.bpm-label { font-family: var(--display); font-size: .85rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.bpm-tap-btn {
  width: 180px; height: 180px; border-radius: 50%; background: var(--brand); color: #fff;
  border: none; font-family: var(--display); font-size: 1.4rem; font-weight: 800; letter-spacing: .04em;
  cursor: pointer; box-shadow: 0 20px 40px -12px rgba(229,37,42,.5); transition: transform .08s ease;
  margin: 0 auto; display: block;
}
.bpm-tap-btn:active { transform: scale(0.94); }
.bpm-tap-btn.bpm-pulse { animation: bpmPulse .12s ease; }
@keyframes bpmPulse { 0% { box-shadow: 0 0 0 0 rgba(229,37,42,.5); } 100% { box-shadow: 0 20px 40px -12px rgba(229,37,42,.5); } }
.bpm-count { margin-top: 16px; color: var(--ink-2); font-size: .92rem; font-weight: 600; }
#tool-bpm-finder .tool-empty { margin-bottom: 18px; }
#tool-bpm-finder .btn-ghost { margin-top: 0; }

/* Hashtag Generator */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; background: var(--brand-tint); color: var(--brand-ink);
  border-radius: var(--r-pill); padding: 7px 14px; font-size: .87rem; font-weight: 600;
  font-family: var(--mono, monospace);
}

/* Template lists — Title Generator, Channel Ideas, Comment Replies */
.template-list { display: flex; flex-direction: column; gap: 2px; }
.template-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.template-row:last-child { border-bottom: none; }
.template-text { font-size: .93rem; color: var(--ink); line-height: 1.5; }
@media (max-width: 560px) {
  .template-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Playlist Duration Calculator — static (non-widget) results block */
.results-primary-static { text-align: center; padding: 22px 0 18px; border-bottom: 1px solid var(--line); margin-top: 20px; }
.r-label-static { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-family: var(--display); }
.r-value-static { font-family: var(--display); font-size: 2.6rem; font-weight: 800; color: var(--brand); margin-top: 4px; }
.results-secondary-static { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-top: 18px; }
.r-item-static { background: var(--bg-tint); border-radius: var(--r-sm); padding: 14px; text-align: center; }
.r-value-sm-static { font-family: var(--display); font-size: 1.2rem; font-weight: 700; color: var(--ink); margin-top: 3px; }

/* ============================================================ static pages */
.static-page { padding: 40px 0 60px; max-width: 74ch; }
.static-page h2 { margin-top: 32px; }
.static-page ul { color: var(--ink-2); }

/* ============================================================ habit tracker */
.habit-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.habit-table th, .habit-table td { border: 1px solid var(--line); padding: 10px; text-align: center; font-size: .85rem; }
.habit-table th { background: var(--brand-tint); font-size: .74rem; text-transform: uppercase; font-weight: 700; color: var(--brand-ink); }
.habit-table td:first-child, .habit-table th:first-child { text-align: left; font-weight: 600; }
.habit-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.habit-add-row { display: flex; gap: 10px; margin-top: 16px; }
.habit-add-row input { flex: 1; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-family: var(--body); }
.habit-pct { font-family: var(--display); font-weight: 700; color: var(--brand-ink); }

@media (max-width: 760px) {
  .hero { padding: 40px 0 30px; }
  .section { padding: 34px 0; }
  .results-panel-dark { padding: 24px 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media print { .site-header, .site-footer, .search-box { display: none; } }

/* =========================================================
   v2 refinement layer — visual identity, hierarchy, states.
   Appended last so it wins cascade ties at equal specificity.
   ========================================================= */

/* ---------- accessibility utilities ---------- */
.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;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper); font-family: var(--display);
  font-weight: 700; font-size: .88rem; padding: 12px 18px; border-radius: 0 0 12px 12px;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: var(--paper); }

/* ---------- brand mark (the "ratio" glyph: two unequal bars) ---------- */
.logo-mark { width: 21px; height: 21px; flex: none; }
.logo-mark .bar-a { fill: var(--ink); opacity: .3; }
.logo-mark .bar-b { fill: var(--brand); }
.logo { gap: 8px; }

/* ---------- typography rhythm ---------- */
h1 { letter-spacing: -.025em; }
.lede { font-size: 1.06rem; line-height: 1.65; }
.kv-value, .r-value-dark, .r-value-sm.r-value-dark, .r-value-static,
.r-value-sm-static, .char-count, .rpm-row-value, .bpm-value, .zone-row-value,
.demo-number { font-variant-numeric: tabular-nums; }

/* ---------- hero: search + category chips + trust strip ---------- */
.hero-chips {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 8px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink-2); font-family: var(--display);
  font-weight: 600; font-size: .87rem; transition: border-color .14s, color .14s, transform .14s;
}
.hero-chip:hover { border-color: var(--chip, var(--brand)); color: var(--ink); transform: translateY(-1px); }
.hero-chip .chip-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--chip, var(--brand)); flex: none; }
.hero-trust {
  display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 26px; font-size: .82rem; color: var(--ink-3); font-weight: 500;
}
.hero-trust .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); opacity: .6; }

/* ---------- inputs: hover, focus ring, validation ---------- */
.field input[type=number]:hover, .field input[type=text]:hover, .field select:hover,
.tool-card-panel input:hover, .tool-card-panel textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus,
.tool-card-panel input:focus, .tool-card-panel textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand) 16%, transparent);
}
.field input[aria-invalid="true"], .tool-card-panel input[aria-invalid="true"] {
  border-color: var(--err);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--err) 14%, transparent);
}
.field-msg {
  display: none; font-size: .8rem; font-weight: 600; color: var(--err); margin-top: 2px;
}
.field-msg.show { display: block; }
.field input, .field select { min-height: 48px; }

/* ---------- buttons: press states + touch minimums ---------- */
.btn { min-height: 48px; }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary:focus-visible { outline-color: var(--ink); }
.kv-copy, .rpm-format-btn, .cookie-btn { min-height: 40px; }

/* ---------- tool cards: focus + refined tag ---------- */
.tool-card:focus-visible, .cat-card:focus-visible, .hero-chip:focus-visible {
  outline: 2.5px solid var(--cat, var(--brand)); outline-offset: 3px;
}
.cat-tag { letter-spacing: .02em; }
.tool-card .icon-badge { border-radius: 12px; }
.tool-card:hover .arrow .arrow-icon { transform: translateX(3px); }
.arrow-icon { transition: transform .15s ease; }

/* ---------- results panel: ratio-mark accent + sticky + hierarchy ---------- */
.results-panel-dark { position: relative; overflow: hidden; }
.results-panel-dark::before {
  /* the signature "ratio" strip: short bright bar + long quiet bar */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg,
    var(--lime) 0 34%, transparent 34% 40%,
    rgba(255,255,255,.22) 40% 100%);
}
@media (min-width: 861px) {
  .results-panel.show { position: sticky; top: 92px; }
}
.results-live-hint {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--results-dark-ink-2);
  margin-bottom: 14px;
}
.results-live-hint::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  animation: liveDot 2.2s ease-in-out infinite;
}
@keyframes liveDot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .results-live-hint::before { animation: none; } }
.r-item-dark { border: 1px solid transparent; transition: border-color .14s; }
.r-item-dark:hover { border-color: var(--results-dark-line); }

/* ---------- empty states ---------- */
.tool-empty {
  border: 1.5px dashed var(--line); border-radius: var(--r);
  padding: 22px 20px; text-align: center; background: var(--bg-tint);
  color: var(--ink-3);
}

/* ---------- content sections: quieter headers, clearer scan ---------- */
.content-block h2 {
  display: flex; align-items: center; gap: 10px;
}
.content-block h2::before {
  content: ""; width: 4px; height: 1.05em; border-radius: 3px;
  background: var(--cat, var(--brand)); flex: none;
}
.formula-box, .example-box { font-variant-numeric: tabular-nums; }

/* ---------- mobile & touch ---------- */
@media (max-width: 900px) {
  .nav-drop ul a { min-height: 46px; padding-top: 11px; padding-bottom: 11px; }
  .nav-trig { min-height: 48px; }
}
@media (max-width: 760px) {
  .field-grid { gap: 15px; }
  .calc-form-col .btn-block { min-height: 54px; }
  .thumb-dl { min-height: 44px; }
  .kv-copy { min-height: 44px; padding: 8px 16px; }
}

/* ---------- footer polish ---------- */
.site-footer .logo { font-size: 18px; }
.footer-bottom { align-items: center; }

/* ---------- category color, dark-theme safe treatments ---------- */
.eyebrow { background: var(--cat, var(--brand)); }
[data-theme="dark"] .eyebrow {
  background: var(--cat-tint, var(--brand-tint));
  color: var(--cat, var(--brand-ink));
}
[data-theme="dark"] .cat-tag {
  background: var(--cat-tint, var(--brand-tint));
  color: var(--cat, var(--brand-ink));
}
[data-theme="dark"] .nav-drop-icon {
  background: var(--cat-tint, var(--brand-tint));
  color: var(--cat, var(--brand-ink));
}
/* icon badges carry inline background:var(--cat) — needs !important in dark */
[data-theme="dark"] .icon-badge {
  background: var(--cat-tint, var(--brand-tint)) !important;
  color: var(--cat, var(--brand-ink)) !important;
}

/* =========================================================
   v3 tools layer — Transcript Cleaner & Chapter Generator
   ========================================================= */

/* shared: readonly result textareas + button rows */
.result-textarea {
  background: var(--bg-tint); font-family: var(--mono); font-size: .85rem;
  line-height: 1.65; color: var(--ink-2);
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Transcript Cleaner */
#tool-transcript-cleaner textarea#tcl-input { min-height: 220px; font-family: var(--mono); font-size: .88rem; line-height: 1.6; }
#tool-transcript-cleaner .check-row { flex-direction: row; flex-wrap: wrap; gap: 18px 22px; padding-top: 2px; }
#tool-transcript-cleaner .check-label { transition: opacity .15s; }
#tcl-result { min-height: 220px; }
#tcl-stats { margin-top: 16px; }

/* Chapter Generator */
.cg-rows { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 4px; }
.cg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cg-row .cg-time {
  flex: 0 0 92px; padding: 12px 10px; border: 1.5px solid var(--line); border-radius: var(--r);
  font-family: var(--body); font-variant-numeric: tabular-nums; text-align: center; font-size: .95rem;
  background: var(--paper); color: var(--ink); min-height: 48px; box-shadow: var(--shadow-sm);
}
.cg-row .cg-title {
  flex: 1 1 180px; min-width: 0; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: var(--r);
  font-family: var(--body); font-size: 1rem; background: var(--paper); color: var(--ink);
  min-height: 48px; box-shadow: var(--shadow-sm);
}
.cg-row .cg-time:focus, .cg-row .cg-title:focus {
  border-color: var(--brand); outline: none;
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand) 16%, transparent);
}
.cg-row .cg-time:hover, .cg-row .cg-title:hover { border-color: var(--ink-3); }
.cg-row.cg-row-error .cg-time { border-color: var(--err); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--err) 14%, transparent); }
.cg-row .cg-remove { flex: none; width: 44px; height: 44px; }
.cg-row .cg-remove svg { width: 17px; height: 17px; }
.cg-validation {
  margin: 16px 0; padding: 14px 18px; border-radius: var(--r); font-size: .88rem; line-height: 1.6;
}
.cg-validation:empty { display: none; margin: 0; padding: 0; }
.cg-validation.cg-ok {
  background: var(--ok-tint); color: var(--ok); border: 1.5px solid color-mix(in srgb, var(--ok) 40%, transparent); font-weight: 700;
}
.cg-validation.cg-warn { background: var(--err-tint); color: var(--err); border: 1.5px solid color-mix(in srgb, var(--err) 35%, transparent); }
.cg-validation ul { margin: 8px 0 0; padding-left: 18px; }
.cg-validation li { margin-bottom: 4px; }
#cg-output { min-height: 130px; }

@media (max-width: 480px) {
  .cg-row .cg-time { flex-basis: 84px; }
  .cg-row .cg-title { flex-basis: 140px; }
}

/* =========================================================
   v4 — VidRatio Lite extension landing page
   ========================================================= */

/* download buttons */
.ext-download-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; justify-content: center; }
.ext-download-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px 13px 18px;
  border-radius: var(--r); border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: .95rem; min-height: 52px;
  transition: border-color .14s, transform .14s, box-shadow .14s;
}
.ext-download-btn:hover { border-color: var(--cat-video); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.ext-download-btn .ext-btn-icon { width: 22px; height: 22px; flex: none; border-radius: 6px; display: grid; place-items: center; }
.ext-download-btn .ext-btn-sub { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-3); margin-top: 1px; }
.ext-download-btn .ext-btn-label { text-align: left; line-height: 1.25; }
.ext-trust-line { text-align: center; margin-top: 16px; font-size: .85rem; color: var(--ink-3); }

/* popup mockup */
.ext-mockup-wrap { display: flex; justify-content: center; margin: 40px 0 8px; }
.ext-mockup { width: 100%; max-width: 380px; background: var(--results-dark-bg); border-radius: var(--r-lg); box-shadow: var(--shadow-lift); overflow: hidden; }
.ext-mockup-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--results-dark-bg-2); border-bottom: 1px solid var(--results-dark-line); }
.ext-mockup-bar .ext-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--results-dark-ink-2); opacity: .5; }
.ext-mockup-bar .ext-mockup-title { font-family: var(--display); font-weight: 700; font-size: .82rem; color: var(--results-dark-ink); margin-left: 4px; }
.ext-mockup-body { padding: 16px; }
.ext-thumb { width: 100%; aspect-ratio: 16/9; border-radius: var(--r-sm); background: linear-gradient(135deg, color-mix(in srgb, var(--cat-video) 55%, #000) 0%, #101018 100%); margin-bottom: 10px; position: relative; overflow: hidden; }
.ext-thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), transparent 60%); }
.ext-video-title { font-family: var(--display); font-weight: 700; font-size: .92rem; color: var(--results-dark-ink); line-height: 1.35; margin-bottom: 3px; }
.ext-video-channel { font-size: .8rem; color: var(--results-dark-ink-2); margin-bottom: 12px; }
.ext-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ext-chip { font-size: .72rem; font-weight: 600; padding: 4px 9px; border-radius: var(--r-pill); background: var(--results-dark-bg-2); color: var(--results-dark-ink-2); }
.ext-stat-block { text-align: center; padding: 12px 0; }
.ext-stat-label { font-family: var(--display); font-size: .72rem; font-weight: 700; color: var(--results-dark-ink-2); text-transform: uppercase; letter-spacing: .03em; }
.ext-stat-value { font-family: var(--display); font-size: 1.9rem; font-weight: 800; color: var(--lime); line-height: 1.1; margin-top: 2px; }
.ext-stat-range { font-size: .74rem; color: var(--results-dark-ink-2); margin-top: 3px; }
.ext-stat-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 14px; }
.ext-mockup-divider { border-top: 1px solid var(--results-dark-line); margin: 14px 0; }
.ext-channel-name { font-family: var(--display); font-weight: 700; font-size: .9rem; color: var(--results-dark-ink); margin-bottom: 10px; }
.ext-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.ext-mini-item { background: var(--results-dark-bg-2); border-radius: var(--r-sm); padding: 9px 6px; text-align: center; }
.ext-mini-value { font-family: var(--display); font-weight: 800; font-size: .88rem; color: var(--results-dark-ink); }
.ext-mini-label { font-size: .62rem; color: var(--results-dark-ink-2); margin-top: 2px; line-height: 1.2; }
.ext-upload-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--results-dark-line); }
.ext-upload-row:last-child { border-bottom: none; }
.ext-upload-title { font-size: .78rem; color: var(--results-dark-ink); line-height: 1.3; max-width: 62%; }
.ext-upload-meta { font-size: .68rem; color: var(--results-dark-ink-2); margin-top: 2px; }
.ext-upload-amount { font-family: var(--display); font-weight: 800; font-size: .85rem; color: var(--lime); flex: none; text-align: right; }
.ext-mockup-footer { display: flex; justify-content: space-between; padding: 12px 16px; background: var(--results-dark-bg-2); font-size: .72rem; }
.ext-mockup-footer a { color: var(--results-dark-ink-2); }
.ext-mockup-caption { text-align: center; font-size: .82rem; color: var(--ink-3); margin-top: 14px; }

/* feature grid reuses .tool-grid / .cat-card patterns already in the design system */

@media (max-width: 480px) {
  .ext-mini-grid { grid-template-columns: repeat(2, 1fr); }
}

/* nav CTA — VidRatio Lite promoted above the category dropdowns, not buried in one */
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-size: 14.5px; font-weight: 700; color: #fff;
  background: var(--brand); padding: 9px 16px; border-radius: var(--r-pill);
  margin-left: 6px; white-space: nowrap; transition: background .14s, transform .14s;
}
.nav-cta:hover { background: var(--brand-ink); color: #fff; transform: translateY(-1px); }
.nav-cta svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 900px) {
  .nav-cta { width: 100%; justify-content: center; margin: 6px 0 2px; padding: 12px; }
}
