/* =====================================================================
   BoringHero Converter Styles v8.5 — 2-Row Compact Control Header
   Layout  : 2-Row top controls · 280px high typing panes · Zero scroll
   Palette : Indian Flag Saffron (#FF671F) · Green (#046A38) · Navy (#06038D / #0F172A)
   Icons   : Bold, high-legibility 16px–20px vector icons
   ===================================================================== */

:root {
  --legacy-font: "Kruti Dev 010", "DevLys 010", "BH Remington Hindi", Arial, sans-serif;
  --uni-font: "Noto Sans Devanagari", "Nirmala UI", Mangal, system-ui, sans-serif;
  --editor-muted: #94A3B8;
  --editor-line:  #E2E8F0;
  --editor-en-bg: #FEF9C3;
}

/* ── Converter Shell ─────────────────────────────────────────── */
.cv-shell {
  position: relative;
  z-index: 10;
  margin-top: 0;
  margin-bottom: 24px;
}

.cv-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
  padding: 12px 16px 14px;
}

/* ── Tool Header (Compact, no heavy button pills) ───────────────── */
.bh-tool-header {
  padding: 10px 0 8px;
  background: transparent;
  border-bottom: none;
}
.bh-tool-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bh-tool-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.bh-tool-title-group h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-slate);
  letter-spacing: -0.02em;
  margin: 0;
}
.bh-tool-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--saffron-dark);
  background: var(--saffron-soft);
  border: 1px solid var(--saffron-border);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}
.bh-tool-pills {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.bh-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--green);
}
.bh-pill svg {
  width: 14px;
  height: 14px;
  stroke: var(--green);
  flex: none;
}

/* ══════════════════════════════════════════════════════════════
   SINGLE INTEGRATED TOP CONTROL BAR (Line 2 of the Page)
   Tabs (Left) · Fonts (Center) · Options & Actions (Right) — In 1 Clean Line
   ══════════════════════════════════════════════════════════════ */
.cv-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 2px 4px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

@media (max-width: 1080px) {
  .cv-top-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Mode Tabs */
.tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px;
  flex: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.77rem;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.tab svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.tab:hover:not(.active) {
  color: var(--navy-slate);
  background: rgba(15, 23, 42, 0.05);
}
.tab:active {
  background: rgba(15, 23, 42, 0.08);
}
.tab.active {
  background: #FFFFFF;
  color: var(--navy-slate);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

/* Integrated Font Selector Chip Bar (Center) */
.cv-font-bar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F8FAFC;
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  flex: none;
}
.font-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip-label {
  display: none;
}
.font-arrow {
  color: var(--saffron);
  font-weight: 800;
  font-size: 0.95rem;
}

/* Quick Actions & Toggles (Right) */
.cv-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.cv-quick-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-body);
  cursor: pointer;
  user-select: none;
}
.cv-quick-actions label:hover {
  color: var(--navy-slate);
}

/* Switches (Center of Single Row) */
.options-switches {
  display: inline-flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
  font-size: 0.775rem;
}

.options-switches label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-body);
  user-select: none;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: var(--radius-xs);
  transition: background-color 0.12s ease;
}
.options-switches label:hover {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.04);
}

/* Minimalist Toggle Switch */
.switch {
  position: relative;
  width: 28px;
  height: 16px;
  flex: none;
  display: inline-block;
}
.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.switch span {
  position: absolute;
  inset: 0;
  background: var(--line-strong);
  border-radius: var(--radius-pill);
  transition: background-color 0.15s ease;
}
.switch:hover span {
  background: #94A3B8;
}
.switch span::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
.switch input:checked + span {
  background: var(--saffron);
}
.switch input:checked + span::after {
  transform: translateX(12px);
}

/* Actions (Right of Single Row) */
.options-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.act-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-slate);
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}
.act-btn:hover {
  background: #F1F5F9;
  border-color: var(--navy);
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}
.act-btn:active {
  transform: translateY(0);
  background: #E2E8F0;
}
.act-btn svg {
  width: 14px;
  height: 14px;
  flex: none;
}

body.on-file .text-only { display: none; }

/* ══════════════════════════════════════════════════════════════
   TWO-PANE LAYOUT — EXPANDED TO 280px HEIGHT FOR COMFORTABLE WORK
   ══════════════════════════════════════════════════════════════ */
.work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: start;
}

/* Panel Containers */
.panel {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Left: Legacy Kruti Dev (Kesariya Saffron accent) */
.panel.is-legacy {
  border-top: 3px solid var(--saffron);
}
.panel.is-legacy:hover {
  border-color: #FDBA74;
}
.panel.is-legacy:focus-within {
  border-color: var(--saffron) !important;
  box-shadow: 0 0 0 3px rgba(255, 103, 31, 0.18) !important;
}

/* Right: Unicode Mangal (Indian Emerald Green accent) */
.panel.is-unicode {
  border-top: 3px solid var(--green);
}
.panel.is-unicode:hover {
  border-color: #86EFAC;
}
.panel.is-unicode:focus-within {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(4, 106, 56, 0.18) !important;
}

/* Panel Header — Strictly 1 Single Line on Desktop */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
  padding: 6px 10px;
  min-height: 44px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 560px) {
  .panel-head {
    flex-wrap: wrap;
  }
}

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--navy-slate);
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-font-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.panel-font-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--saffron-dark);
  background: var(--saffron-soft);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--saffron-border);
}

.panel-font-tag.tag-uni {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: var(--green-border);
}

.pane-font-select {
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  min-height: 28px;
  color: var(--navy-slate);
  font-size: 0.8rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pane-font-select:hover {
  border-color: var(--navy);
}
.pane-font-select:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255, 103, 31, 0.18);
}
.panel.is-unicode .pane-font-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(4, 106, 56, 0.18);
}

.select-scale {
  font-weight: 600;
  color: var(--ink-body);
}

/* Panel Toolbar Action Buttons */
.tools {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.tbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--navy-slate);
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.tbtn.icon-only {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
}
.tbtn:hover {
  background: #F8FAFC;
  border-color: var(--navy);
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.tbtn:active {
  transform: translateY(0);
  background: #E2E8F0;
}
.tbtn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

/* Prominent "Copy Word" hero button */
.tbtn[data-act="copy"] {
  background: var(--navy-soft);
  color: var(--navy);
  border-color: var(--navy-border);
}
.tbtn[data-act="copy"]:hover {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(6, 3, 141, 0.28);
}
.tbtn[data-act="copy"]:active {
  background: #020617;
}

/* Word .docx Export button */
.tbtn[data-act="docx"] {
  background: #F0FDF4;
  color: #046A38;
  border-color: #BBF7D0;
}
.tbtn[data-act="docx"]:hover {
  background: #046A38;
  color: #FFFFFF;
  border-color: #046A38;
  box-shadow: 0 4px 12px rgba(4, 106, 56, 0.28);
}

/* A4 Word Document View active state */
.tbtn.is-active {
  background: var(--saffron-soft);
  color: var(--saffron-dark);
  border-color: var(--saffron);
}

/* Voice Dictation Listening Pulse */
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
.tbtn.is-listening {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #EF4444;
  animation: micPulse 1.4s ease-in-out infinite;
}

.tbtn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
.tbtn.ghost:hover {
  color: var(--navy-slate);
  background: var(--surface-hover);
  border-color: var(--line);
}

/* A4 Official Word Document View Ruler & Margin Simulation */
.a4-ruler {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 5px 14px;
  background: #FFFBEB;
  border-bottom: 1px solid #FDE68A;
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400E;
}
.work.a4-mode .a4-ruler {
  display: flex;
}
.work.a4-mode .pane {
  background: linear-gradient(90deg, #FFFDF7 0, #FFFDF7 62px, #FCA5A5 62px, #FCA5A5 63px, #FFFFFF 63px, #FFFFFF 100%);
  padding: 26px 26px 34px 78px;
  line-height: 1.55;
  box-shadow: inset 0 6px 14px rgba(15, 23, 42, 0.05);
}

/* Subtle Legal Local Font Detection Pill */
.font-fallback-chip {
  font-size: 0.73rem;
  font-weight: 600;
  color: #92400E;
  background: #FFFBEB;
  border-top: 1px solid #FDE68A;
  padding: 5px 12px;
}

/* Editorial 1,000-Word Deep Guide Section */
.cv-guide {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-xs);
}
.cv-guide h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-slate);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.cv-guide h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--navy-slate);
  margin: 24px 0 8px;
}
.cv-guide p {
  font-size: 0.94rem;
  color: var(--ink-body);
  line-height: 1.75;
  margin-bottom: 12px;
}
.cv-guide ul, .cv-guide ol {
  font-size: 0.92rem;
  color: var(--ink-body);
  line-height: 1.7;
  padding-left: 20px;
  margin-bottom: 14px;
}
.cv-guide li {
  margin-bottom: 6px;
}
.cv-guide-callout {
  background: #F8FAFC;
  border-left: 4px solid var(--saffron);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 0.9rem;
  color: var(--navy-slate);
  line-height: 1.65;
}
@media (max-width: 640px) {
  .cv-guide { padding: 20px 16px; }
}

/* Text Panes — EXPANDED TO 480px HEIGHT (Maximum room for typists) */
.pane {
  position: relative;
  flex: 1;
  height: 480px;
  min-height: 420px;
  max-height: 700px;
  overflow-y: auto;
  outline: none;
  padding: 18px 20px;
  font-size: 1.05rem;
  line-height: 1.68;
  background: #FFFFFF;
  color: var(--ink);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.pane::-webkit-scrollbar {
  width: 6px;
}
.pane::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}

.pane.empty::before {
  content: attr(data-placeholder);
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  pointer-events: none;
  color: var(--editor-muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  white-space: pre-line;
  line-height: 1.6;
}

#legacy-pane { font-family: var(--legacy-font); }
#unicode-pane { font-family: var(--uni-font); }
.pane [data-f="L"] { font-family: var(--legacy-font); }
.pane [data-f="U"] { font-family: var(--uni-font); }
.pane [data-f="E"] {
  font-family: var(--font-ui);
  background: var(--editor-en-bg);
  border-radius: 2px;
  padding: 0 3px;
}

.pane p { margin: 0 0 0.35em; }
.pane table {
  border-collapse: collapse;
  margin: 0.35em 0 0.65em;
  width: 100%;
}
.pane td, .pane th {
  padding: 5px 8px;
  vertical-align: top;
  border: 1px solid var(--editor-line);
}
.pane th {
  background: #F8FAFC;
  font-weight: 700;
  text-align: left;
}

/* Panel Footer Stats */
.font-note { display: none; }
.panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 5px 12px;
  background: #FAFBFC;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--muted);
}
.panel-foot span b { color: var(--navy-slate); }

/* ══════════════════════════════════════════════════════════════
   ACTION BUTTON BAR (Spans both pane columns directly below)
   ══════════════════════════════════════════════════════════════ */
.convert-col {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 4px 2px;
}

/* Primary Action: To Unicode (Kesariya Saffron) */
.cbtn.primary {
  background: var(--saffron);
  color: #FFFFFF !important;
  border: 1px solid var(--saffron-dark);
  box-shadow: 0 2px 6px rgba(255, 103, 31, 0.25);
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.cbtn.primary:hover {
  background: #D94E07;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 103, 31, 0.38);
}
.cbtn.primary:active {
  transform: translateY(0);
  background: #C2410C;
  color: #FFFFFF !important;
  box-shadow: 0 2px 4px rgba(255, 103, 31, 0.2);
}

/* Secondary Action: To Kruti Dev (Indian Flag Green) */
.cbtn.secondary {
  background: var(--green);
  color: #FFFFFF !important;
  border: 1px solid var(--green-dark);
  box-shadow: 0 2px 6px rgba(4, 106, 56, 0.25);
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.cbtn.secondary:hover {
  background: var(--green-dark);
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(4, 106, 56, 0.38);
}
.cbtn.secondary:active {
  transform: translateY(0);
  background: #02381D;
  color: #FFFFFF !important;
  box-shadow: 0 2px 4px rgba(4, 106, 56, 0.2);
}

.cbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.cbtn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.live-hint {
  display: none;
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
  flex-basis: 100%;
  order: 10;
  margin-top: 4px;
}
.convert-col.live .live-hint { display: block; }

/* ── Privacy Note below Converter ────────────────────────────── */
.cv-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 0.785rem;
  color: var(--muted);
  text-align: center;
}
.cv-privacy svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex: none;
}

/* ══════════════════════════════════════════════════════════════
   FILE CONVERSION TAB (.docx & .xlsx)
   ══════════════════════════════════════════════════════════════ */
.file-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
}

.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.card h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy-slate);
  margin-bottom: 4px;
}
.card .sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.dir {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.dir label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.12s;
}
.dir label:hover {
  border-color: var(--navy);
}
.dir label:has(input:checked) {
  border-color: var(--navy);
  background: var(--navy-soft);
  box-shadow: 0 1px 3px rgba(6, 3, 141, 0.1);
}
.dir label div { display: flex; flex-direction: column; }
.dir label b { font-size: 0.82rem; color: var(--navy-slate); }
.dir label span { font-size: 0.72rem; color: var(--muted); }

/* Dropzone */
#dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  cursor: pointer;
  background: #F8FAFC;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
#dropzone:hover, #dropzone:focus, #dropzone.over {
  border-color: var(--saffron);
  background: var(--saffron-soft);
}
#dropzone svg {
  width: 40px;
  height: 40px;
  color: var(--saffron);
  margin-bottom: 8px;
}
#dropzone b {
  display: block;
  font-size: 0.92rem;
  color: var(--navy-slate);
  margin-bottom: 4px;
}
#dropzone span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* File Picked & Conversion Results */
#file-picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.nm { font-weight: 700; font-size: 0.86rem; color: var(--navy-slate); }
.mt { font-size: 0.75rem; color: var(--muted); }

.btn-main {
  padding: 8px 16px;
  background: var(--navy-slate);
  color: #FFFFFF;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-main:hover:not(:disabled) {
  background: var(--navy);
}
.btn-main:disabled { opacity: 0.5; cursor: not-allowed; }

.file-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-body);
  margin-top: 12px;
  cursor: pointer;
  user-select: none;
}

#file-error {
  margin-top: 10px;
  padding: 10px 12px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  color: #B91C1C;
  font-size: 0.82rem;
}

#file-result {
  margin-top: 10px;
  padding: 12px;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
}
#file-result.none {
  background: #FEF2F2;
  border-color: #FECACA;
}
#file-summary {
  font-size: 0.85rem;
  color: var(--navy-slate);
  margin-bottom: 8px;
}
.samples-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 4px;
}
#file-samples {
  padding-left: 1.2em;
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-body);
}

.btn-dl {
  margin-top: 12px;
  padding: 9px 18px;
  background: var(--green);
  color: #FFFFFF;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-dl:hover {
  background: var(--green-dark);
}

/* How It Works (File Tab) */
.card.how ol {
  padding-left: 1.3em;
  margin: 0;
}
.card.how li {
  font-size: 0.835rem;
  color: var(--ink-body);
  margin-bottom: 6px;
  line-height: 1.55;
}
.card.how li:last-child { margin-bottom: 0; }
.k { font-weight: 700; color: var(--navy-slate); }
.card.how .note {
  margin-top: 12px;
  padding: 8px 10px;
  background: var(--surface-alt);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Responsive Rules ────────────────────────────────────────── */
@media (max-width: 820px) {
  .work { grid-template-columns: 1fr; }
  .file-grid { grid-template-columns: 1fr; }
  .convert-col { flex-direction: column; align-items: stretch; }
  .cbtn { width: 100%; }
  .cv-control-row-1, .cv-control-row-2 { flex-direction: column; align-items: stretch; }
  .font-select-group { justify-content: space-between; }
  .pane { height: 220px; }
}

@media (max-width: 480px) {
  .cv-card { padding: 10px 10px; }
  .pane { height: 190px; }
}
