:root {
  /* Original Medal Downloader Palette: Deep Graphite Slate & Trophy Gold */
  --bg: #0c0e13;
  --bg-band: #10141c;
  --surface: #141923;
  --surface-2: #1a202d;
  --surface-hover: #212838;
  --inset: #0b0e14;

  --ink: #f4f6fa;
  --ink-soft: #d2d8e4;
  --muted: #939db0;
  --faint: #677185;

  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Trophy Gold primary identity + Mint success */
  --gold: #f5b82e;
  --gold-bright: #ffd059;
  --gold-deep: #dc9a12;
  --gold-soft: rgba(245, 184, 46, 0.13);
  --gold-line: rgba(245, 184, 46, 0.32);
  --cta-ink: #110d04;

  --mint: #34d399;
  --mint-soft: rgba(52, 211, 153, 0.12);
  --mint-line: rgba(52, 211, 153, 0.3);

  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.1);
  --warn-line: rgba(251, 191, 36, 0.3);
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.12);

  /* 100% Free SIL OFL Fonts */
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Consolas, monospace;

  --radius: 10px;
  --radius-card: 18px;
  --ease: cubic-bezier(0.22, 0.82, 0.22, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 50% -10%, rgba(245, 184, 46, 0.1), transparent 64%),
    radial-gradient(640px 420px at 85% 15%, rgba(56, 189, 248, 0.055), transparent 60%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--cta-ink);
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Sticky Glass Header with Pill Switcher ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 14, 19, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1200px;
  height: 70px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
}

.brand-mark.small {
  width: 32px;
  height: 32px;
}

/* Segmented Pill Rail Navigation */
.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.main-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.main-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-pill {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-pill:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--gold-bright);
}

.icon-pill svg {
  width: 16px;
  height: 16px;
}

.header-pill {
  height: 38px;
  padding: 0 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.header-pill:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
}

.header-pill svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.header-pill .chev {
  width: 14px;
  height: 14px;
  margin-left: -2px;
}

.history-count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--cta-ink);
  font: 700 11px/19px var(--mono);
  text-align: center;
}

.lang-dropdown {
  position: relative;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.65);
  display: grid;
  gap: 2px;
  z-index: 60;
}

.lang-menu a {
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-menu a:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.lang-menu a[aria-current="page"] {
  background: var(--gold-soft);
  color: var(--gold-bright);
  font-weight: 600;
}

.lang-menu a[aria-current="page"]::after {
  content: "✓";
  font-size: 12px;
}

/* ---------- Hero & Trophy Gold Command Deck ---------- */
.tool-hero {
  max-width: 1020px;
  margin: 0 auto;
  padding: 50px 24px 64px;
}

.hero-copy {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 32px;
}

h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(34px, 4.8vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
}

.hero-sub {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
}

.tool-card {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%), var(--surface);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  position: relative;
}

/* Signature subtle warm-gold hairline accent along the card crest */
.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.85;
}

.tool-card-body {
  padding: 28px 30px 24px;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.card-lead svg {
  width: 17px;
  height: 17px;
  color: var(--gold);
}

.format-tag {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.textarea-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.textarea-head .input-label {
  margin-bottom: 0;
}

.input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 6px 8px 6px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 184, 46, 0.16);
}

.input-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: 400 14.5px/1.2 var(--mono);
  color: var(--ink);
  outline: none;
}

.input-box input::placeholder,
#bulk-urls::placeholder {
  color: var(--faint);
}

.clear-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.clear-btn:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.clear-btn svg {
  width: 14px;
  height: 14px;
}

.paste-inline {
  height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.paste-inline:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.28);
}

.paste-inline svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

#bulk-urls {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  padding: 13px 15px;
  font: 400 13.5px/1.6 var(--mono);
  color: var(--ink);
  background: var(--inset);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#bulk-urls:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 184, 46, 0.16);
}

.input-help {
  margin: 8px 0 18px;
  font-size: 12.5px;
  color: var(--faint);
}

.bulk-meta {
  margin: 8px 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--faint);
}

.mono-counter {
  font: 600 12px/1 var(--mono);
  color: var(--gold-bright);
}

/* Signature Warm Trophy Gold Primary CTA */
.cta-main {
  width: 100%;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 55%, var(--gold-deep) 100%);
  color: var(--cta-ink);
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(245, 184, 46, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: filter 0.15s ease, transform 0.14s var(--ease), opacity 0.15s ease;
}

.cta-main:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.cta-main:active:not(:disabled) {
  transform: translateY(0);
}

.cta-main:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.cta-main svg {
  width: 17px;
  height: 17px;
}

.tool-card-foot {
  padding: 13px 30px;
  background: rgba(11, 14, 20, 0.65);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.tool-card-foot svg {
  width: 15px;
  height: 15px;
  color: var(--mint);
  flex-shrink: 0;
}

.inline-status {
  margin: 0 !important;
  font-size: 12px;
}

.cross-cta {
  text-align: center;
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.cross-cta a {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: none;
}

.cross-cta a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.benefit-strip {
  max-width: 700px;
  margin: 30px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 13.5px;
  color: var(--muted);
}

.benefit-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.benefit-strip svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

/* ---------- Generic Buttons ---------- */
.btn-solid, .btn-outline {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.btn-solid {
  border: 0;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--cta-ink);
  font-weight: 700;
}

.btn-solid:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-outline {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink-soft);
}

.btn-outline:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--ink);
}

.btn-solid.small, .btn-outline.small {
  padding: 8px 13px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-solid:disabled, .btn-outline:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-solid svg, .btn-outline svg {
  width: 15px;
  height: 15px;
}

/* ---------- Status & Draft Conflict ---------- */
.status {
  margin: 12px 0 0;
  font: 500 12.5px/1.5 var(--mono);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.status:empty {
  display: none;
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: var(--mint);
}

.draft-action {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.draft-btns {
  display: flex;
  gap: 8px;
}

/* ---------- Video / MP3 / Bulk Results ---------- */
.result-wrap {
  max-width: 840px;
  margin: 28px auto 0;
  animation: fadeUp 0.28s var(--ease);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
}

.result-card {
  display: grid;
  grid-template-columns: 380px 1fr;
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  overflow: hidden;
}

.media {
  position: relative;
  background: #05070b;
  border-right: 1px solid var(--line);
  min-height: 240px;
  cursor: pointer;
  overflow: hidden;
}

.media img, .media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media video {
  object-fit: contain;
  background: #000;
}

.media .play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
  cursor: pointer;
}

.media .play span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--cta-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  transition: transform 0.16s var(--ease), background 0.16s ease;
}

.media:hover .play span {
  transform: scale(1.07);
  background: var(--gold-bright);
}

.media .play svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.media .chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(11, 14, 20, 0.86);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 600 11.5px/1 var(--mono);
}

.info {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.kicker {
  display: inline-block;
  font: 600 10.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold-bright);
}

.info .result-title, .mp3-info .result-title {
  margin: 10px 0 3px;
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.by {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.fact {
  font: 500 11.5px/1 var(--mono);
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  margin-top: 12px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bar.on {
  opacity: 1;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.16s linear;
}

.fallback-notice {
  margin: 0 0 12px;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid rgba(245, 184, 46, 0.36);
  background: rgba(245, 184, 46, 0.1);
  color: var(--gold-bright);
  font-size: 13px;
  line-height: 1.5;
}

/* Static Fact / Spec Tables */
.fact-table-wrap {
  margin-top: 20px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  overflow-x: auto;
}

.fact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

.fact-table th,
.fact-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.fact-table thead th {
  font: 600 12px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}

.fact-table tbody tr:last-child th,
.fact-table tbody tr:last-child td {
  border-bottom: 0;
}

.fact-table tbody th {
  width: 38%;
  font-weight: 600;
  color: var(--ink);
}

.fact-table tbody td {
  color: var(--ink-soft);
}

.fact-table a {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: none;
}

.fact-table a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.section-links a {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: none;
}

.section-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-callout {
  margin: 18px 0 24px;
  padding: 16px 20px;
  border-radius: var(--radius-card);
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.65;
}

.guide-callout p {
  margin: 0 0 10px;
}

.guide-callout p:last-child {
  margin-bottom: 0;
}

.guide-callout a {
  color: var(--gold-bright);
  font-weight: 600;
}

/* MP3 Result */
.mp3-result-card {
  padding: 22px 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  gap: 16px;
}

.mp3-result-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mp3-thumb {
  width: 96px;
  height: 64px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.mp3-audio {
  width: 100%;
  height: 44px;
}

/* Bulk Results */
.bulk-panel {
  border-radius: var(--radius-card);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 20px 22px;
}

.bulk-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.bulk-rows {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.bulk-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.bulk-thumb {
  width: 72px;
  height: 46px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--inset);
  flex-shrink: 0;
}

.bulk-info {
  flex: 1;
  min-width: 0;
}

.bulk-info strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-info span {
  font: 400 12px/1.4 var(--mono);
  color: var(--muted);
}

.bulk-info span.error {
  color: var(--danger);
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- Cohesive Graphite & Slate Editorial Bands ---------- */
.editorial-band {
  border-top: 1px solid var(--line);
  padding: 72px 24px;
  background: var(--bg);
}

.pale-band {
  background: var(--bg-band);
}

.section-inner {
  max-width: 1060px;
  margin: 0 auto;
}

.editorial-prose {
  max-width: 780px;
  margin: 0 auto;
}

.editorial-prose h2,
.editorial-head h2,
.compare-intro h2,
.split-feature h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ink);
}

.editorial-prose p,
.editorial-head p,
.compare-intro p,
.split-feature p {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
}

.editorial-prose p:last-child {
  margin-bottom: 0;
}

.editorial-prose a {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.editorial-head {
  max-width: 780px;
  margin: 0 auto 36px;
  text-align: center;
}

/* Output Format Capability Band */
.format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.format-card {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.format-card.featured {
  border-color: var(--gold-line);
  background: linear-gradient(180deg, rgba(245, 184, 46, 0.06), transparent 48%), var(--surface);
}

.format-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.format-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold-bright);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.format-icon svg {
  width: 18px;
  height: 18px;
}

.format-spec {
  font: 600 10.5px/1 var(--mono);
  letter-spacing: 0.07em;
  color: var(--muted);
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
}

.format-card.featured .format-spec {
  color: var(--gold-bright);
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.format-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.format-card ul.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.format-card ul.check-list li {
  position: relative;
  padding-left: 18px;
}

.format-card ul.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold-bright);
  font-weight: 700;
}

.format-link {
  margin-top: auto;
  padding-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold-bright);
  text-decoration: none;
}

.format-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.format-link-next::after {
  content: "\2192";
}

.format-link-up::after {
  content: "\2191";
}

.compare-note {
  margin: 24px auto 0;
  max-width: 78ch;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--faint);
}

/* 3-Step Cards */
.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.steps-list li {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.step-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  border-radius: 7px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  font: 600 12px/1 var(--mono);
  color: var(--gold-bright);
  margin-bottom: 14px;
}

.steps-list h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.steps-list p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* Two Device Cards */
.two-cards {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-box {
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.info-box h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.info-box p {
  margin: 0;
  font-size: 14.5px;
}

/* Split Feature Callout */
.split-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: center;
}

.split-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.feature-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.feature-points li {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14.5px;
  color: var(--muted);
}

.feature-points strong {
  color: var(--ink);
}

/* ---------- Cohesive Dark Slate 2-Column FAQ ---------- */
.faq-section {
  background: var(--bg);
}

.faq-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 44px;
  align-items: start;
}

.faq-head {
  text-align: left;
  position: sticky;
  top: 96px;
}

.faq-section .faq-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
}

.faq-tag {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.sq-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  display: inline-block;
  flex-shrink: 0;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.16s ease;
}

.faq-list details[open] {
  border-color: var(--gold-line);
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  display: grid;
  grid-template-columns: 32px 1fr 22px;
  align-items: center;
  gap: 12px;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-num {
  font: 600 11.5px/1 var(--mono);
  color: var(--gold-bright);
}

.faq-list summary::after {
  content: "+";
  font: 500 20px/1 var(--mono);
  color: var(--muted);
  text-align: right;
  transition: transform 0.2s var(--ease), color 0.2s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
  color: var(--gold-bright);
}

.faq-list details p {
  margin: 0 0 18px;
  padding: 0 24px 0 64px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- Clean 2-Column Footer (no site-wide tool dump) ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--inset);
  padding: 56px 24px 48px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(180px, 0.75fr);
  gap: 36px 48px;
  align-items: start;
}

.footer-tagline {
  margin: 14px 0 0;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-col .footer-heading {
  margin: 0 0 12px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-col a,
.footer-link-btn {
  text-decoration: none;
  font-size: 13.5px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease;
}

.footer-col a:hover,
.footer-link-btn:hover {
  color: var(--ink);
}

.footer-col a[aria-current="page"] {
  color: var(--gold-bright);
}

.footer-bottom {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--faint);
}

/* ---------- Legal / Info Pages (About, Privacy, Terms, Contact) ---------- */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold-bright);
  text-decoration: none;
  margin-bottom: 22px;
}

.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 42px);
}

.legal-intro {
  margin: 0 0 32px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
}

.legal-content {
  display: grid;
  gap: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.legal-content h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.legal-content p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.72;
  color: var(--muted);
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-content ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.legal-content a {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-card {
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--gold-line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-email {
  font: 600 15px/1.3 var(--mono);
  color: var(--gold-bright);
  text-decoration: none !important;
}

/* ---------- Floating Bottom-Right Bookmark Cue ---------- */
.floating-bookmark {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
}

.floating-bookmark-btn {
  height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(20, 25, 35, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s var(--ease);
}

.floating-bookmark-btn:hover {
  border-color: var(--gold-line);
  background: var(--surface-2);
  color: var(--ink);
  transform: translateY(-1px);
}

.floating-bookmark-btn svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

/* ---------- Slide-Over History Drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.68);
  backdrop-filter: blur(4px);
  z-index: 70;
}

.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line-strong);
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.72);
  z-index: 75;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.22s var(--ease);
}

@keyframes slideIn {
  from { transform: translateX(100%); }
}

.drawer-head {
  padding: 24px 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.drawer-head .drawer-title {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.drawer-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.drawer-close:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.drawer-close svg {
  width: 17px;
  height: 17px;
}

.drawer-tabs {
  margin: 0 24px;
  padding: 4px;
  border-radius: 10px;
  background: var(--inset);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.drawer-tab {
  border: 0;
  border-radius: 7px;
  padding: 8px 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.drawer-tab.active {
  background: var(--gold);
  color: var(--cta-ink);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-entry {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  gap: 8px;
}

.history-entry .recent-row {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 5px;
}

.recent-row .rt {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.recent-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.status-pill {
  font: 600 10px/1 var(--mono);
  padding: 3px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}

.status-pill.viewed {
  background: var(--inset);
  color: var(--muted);
}

.status-pill.downloaded {
  background: var(--mint-soft);
  color: var(--mint);
}

.recent-row .ra {
  font: 400 11px/1.3 var(--mono);
  color: var(--faint);
}

.history-empty {
  text-align: center;
  padding: 56px 16px;
  color: var(--muted);
}

.history-empty svg {
  width: 34px;
  height: 34px;
  color: var(--faint);
  margin-bottom: 10px;
}

.history-empty strong {
  display: block;
  font-size: 15.5px;
  color: var(--ink);
  margin-bottom: 4px;
}

.history-empty p {
  margin: 0 0 14px;
  font-size: 13.5px;
}

.empty-link {
  font-weight: 600;
  color: var(--gold-bright);
  text-decoration: none;
}

.drawer-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--faint);
}

.text-link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-link-btn:hover {
  color: var(--ink);
}

/* ---------- Modals ---------- */
dialog {
  background: var(--surface);
  color: var(--ink);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  width: min(430px, 92vw);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8);
}

dialog::backdrop {
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(5px);
}

.dialog-head .dialog-title {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.dialog-sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

dialog fieldset {
  border: 0;
  padding: 0;
  margin: 18px 0 14px;
}

dialog legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.stars {
  display: flex;
  gap: 8px;
}

.stars label {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--faint);
  font-size: 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.stars label.lit {
  color: var(--gold-bright);
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.stars input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

dialog textarea, .link-field {
  display: block;
  width: 100%;
  background: var(--inset);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-top: 8px;
  font: 400 14px/1.5 var(--sans);
}

.link-field {
  font-family: var(--mono);
  font-size: 12px;
}

.bookmark-guide {
  margin: 14px 0 4px;
  font-size: 14.5px;
  color: var(--muted);
}

.bookmark-guide kbd {
  display: inline-block;
  font: 600 12.5px/1 var(--mono);
  color: var(--gold-bright);
  background: var(--surface-2);
  border: 1px solid var(--gold-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 5px 8px;
  margin: 0 2px;
}

.dialog-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

input[type="checkbox"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .format-grid,
  .split-feature,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-head {
    position: static;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .media {
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .floating-bookmark {
    right: 14px;
    bottom: 14px;
  }

  .topbar-inner {
    padding: 10px 16px;
    height: auto;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .main-nav a {
    flex: 1;
    justify-content: center;
    padding: 7px 6px;
  }

  .tool-hero {
    padding: 36px 16px 44px;
  }

  .tool-card-body {
    padding: 20px 18px;
  }

  .tool-card-foot {
    padding: 12px 18px;
  }

  .steps-list,
  .two-cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .faq-list details p {
    padding: 0 18px 0 18px;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 15.5px;
    gap: 8px;
  }

  .header-pill {
    padding: 0 10px;
    font-size: 12.5px;
  }
}
