/* md2nativedocx in the browser. System fonts only: the page loads nothing from another site. */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --text: #161b26;
  --muted: #586174;
  --border: #dde1ea;
  /* The three formats' hues: close enough to call Word, PowerPoint and LibreOffice to mind, never their
     brands' own values. --accent is the Word-like one, the page's main colour. */
  --fmt-docx: #2f5d9e;
  --fmt-pptx: #c0532d;
  --fmt-odt: #2c8a4b;
  --accent: var(--fmt-docx);
  --accent-strong: #213f6c;
  --accent-text: #ffffff;
  --brand: #6b4fe8; /* the icon's violet */
  --brand-soft: rgb(107 79 232 / 12%);
  --ok: #1f7a4d;
  --warn: #8a5a00;
  --error: #b42318;
  --focus: #2b7bd6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 4px 16px rgb(16 24 40 / 6%);
  --shadow-lift: 0 2px 4px rgb(16 24 40 / 6%), 0 12px 32px rgb(16 24 40 / 10%);
  /* Illustration */
  --art-page: #ffffff;
  --art-page-edge: #d5dae5;
  --art-line: #e3e7ef;
  --art-line-strong: #c3cad8;
  --art-node: #dfe9f7;
  --art-node-edge: #2f5d9e;
  --art-node-text: #213f6c;
  --art-code: #1d1933;
  --art-code-text: #e7e3ff;
  --art-code-dim: #8f87b8;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --surface: #171b23;
    --surface-2: #20252f;
    --text: #e8ebf1;
    --muted: #a2abbb;
    --border: #2d3441;
    --fmt-docx: #79a2e0;
    --fmt-pptx: #ec9670;
    --fmt-odt: #66c78c;
    --accent: var(--fmt-docx);
    --accent-strong: #9dbcec;
    --accent-text: #0d1117;
    --brand: #a08cff;
    --brand-soft: rgb(160 140 255 / 14%);
    --ok: #4cc38a;
    --warn: #e0b04a;
    --error: #f2786d;
    --focus: #93b6ec;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-lift: 0 8px 28px rgb(0 0 0 / 45%);
    --art-page: #e9ecf2;
    --art-page-edge: #e9ecf2;
    --art-line: #d3d8e2;
    --art-line-strong: #aeb6c6;
    --art-node: #d5e2f5;
    --art-node-edge: #2f5d9e;
    --art-node-text: #213f6c;
    --art-code: #241f3d;
    --art-code-text: #ece8ff;
    --art-code-dim: #9a92c6;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

/* `hidden` must win over the display rules below (progress, .primary links…). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* A soft glow of the brand colours behind the top of the page. */
  background-image:
    radial-gradient(60rem 28rem at 85% -6rem, var(--brand-soft), transparent 70%),
    radial-gradient(48rem 24rem at 0% -4rem, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  background-repeat: no-repeat;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

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

h1, h2, h3 { letter-spacing: -0.015em; }

.topbar, .hero, .layout, .band, .site-footer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* --- top bar --- */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { flex: none; }
.name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a, .lang-menu summary {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.topnav a:hover, .lang-menu summary:hover { color: var(--text); background: var(--surface-2); }

/* The language menu: a <details>, so it opens without the script. */
.lang-menu { position: relative; }
/* display: flex, not the links' inline-flex: inside <details> an inline box would leave a line's descent below it. */
.lang-menu summary { display: flex; gap: 6px;border: 1px solid var(--border); background: var(--surface); cursor: pointer; list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.lang-menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.globe { fill: none; stroke: currentColor; stroke-width: 1.3; flex: none; }
.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
  min-width: 11rem;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
}
.lang-menu ul a { display: flex; border-radius: 6px; color: var(--text); font-weight: 500; }
.lang-menu ul a[aria-current="page"] { font-weight: 700; color: var(--accent); }
.lang-menu ul a[aria-current="page"]::after { content: "✓"; margin-left: auto; padding-left: 12px; }

/* Read by screen readers, not shown. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- hero --- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 32px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 32px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 650;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
}
h1 span { display: block; }
h1 .accent {
  background: linear-gradient(100deg, var(--accent), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline { margin: 18px 0 0; max-width: 56ch; font-size: 1.12rem; color: var(--muted); }

.proof { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.proof li { position: relative; padding-left: 30px; font-weight: 550; }
.proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-soft);
}
/* The tick, drawn with two borders so no image or font is needed. */
.proof li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.12em + 5px);
  width: 5px;
  height: 9px;
  border: solid var(--brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.proof li.privacy { color: var(--ok); }
.proof li.privacy::before { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.proof li.privacy::after { border-color: var(--ok); }

/* "Get it on…" badges: dark like a store's, drawn here (no store's logo or colours). A tool not available
   yet gets an outlined one. */
.get-it { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--text);
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.badge:hover { color: var(--bg); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.badge svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge span { display: flex; flex-direction: column; line-height: 1.15; }
.badge small { font-size: 0.72rem; font-weight: 500; opacity: 0.85; }
.badge strong { font-size: 1rem; font-weight: 700; }
.badge[data-store="soon"] { background: transparent; color: var(--text); border-style: dashed; border-color: color-mix(in srgb, var(--text) 45%, transparent); }
.badge[data-store="soon"]:hover { color: var(--text); border-color: var(--brand); }
.follow { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  .badge { transition: none; }
  .badge:hover { transform: none; }
}

/* --- tool pages (src/tool.html) --- */

.tool-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); }
.tool-status {
  margin: 18px 0 0;
  max-width: 56ch;
  padding: 10px 14px;
  border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  font-weight: 600;
}
/* A configuration the steps ask to paste (tools.mjs snippet): kept as written, scrolled on a narrow screen. */
.tool-snippet {
  margin: 24px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--art-code);
  color: var(--art-code-text);
  font: 0.9rem/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  white-space: pre;
  overflow-x: auto;
}
.tool-shot { margin: 0; }
.tool-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature-list li { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.feature-list h3 { margin: 0 0 6px; font-size: 1.05rem; }
.feature-list p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.feature-list .refs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.85rem; }
.feature-list .refs li { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.how-steps li p { margin: 0; }

/* --- the text pages (src/text-page.html): text only, no drawing beside the heading --- */

.text-hero { grid-template-columns: minmax(0, 1fr); }
.text-hero .tagline { max-width: 68ch; }
.text-hero .updated { color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 0; }

/* The Word add-in page's drawing (scripts/tool-art.mjs). */
.art-window { fill: var(--surface); stroke: var(--border); }
.art-ribbon { fill: var(--surface-2); }
.art-tab { fill: var(--text); font: 600 12px system-ui, "Segoe UI", sans-serif; }
.art-tab-line { fill: var(--brand); }
.art-separator { stroke: var(--border); stroke-width: 1; }
.art-button { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 1.2; }
.art-button-icon { fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.art-button-text { fill: var(--text); font: 600 11px system-ui, "Segoe UI", sans-serif; text-anchor: middle; }
.art-small-icon { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linejoin: round; }
.art-ribbon-text { fill: var(--text); font: 11px system-ui, "Segoe UI", sans-serif; }
.art-group-label { fill: var(--muted); font: 10px system-ui, "Segoe UI", sans-serif; text-anchor: middle; }
.art-caret { fill: var(--text); }

.hero-art { margin: 0; }
.hero-art svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 18px 30px rgb(16 24 40 / 14%)); }

.art-page { fill: var(--art-page); stroke: var(--art-page-edge); }
.art-line { fill: var(--art-line); }
.art-line.strong { fill: var(--art-line-strong); }
.art-node { fill: var(--art-node); stroke: var(--art-node-edge); stroke-width: 1.5; }
.art-label { fill: var(--art-node-text); font: 600 12px system-ui, "Segoe UI", sans-serif; text-anchor: middle; dominant-baseline: central; }
.art-edge { fill: none; stroke: var(--art-node-edge); stroke-width: 1.5; }
.art-tip { fill: var(--art-node-edge); }
.art-selection { fill: none; stroke: #6b7280; stroke-width: 1; stroke-dasharray: 4 3; }
.art-handle circle { fill: #ffffff; stroke: #6b7280; stroke-width: 1; }
.art-cursor { fill: #ffffff; stroke: #111827; stroke-width: 1.2; stroke-linejoin: round; }
.art-flow { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 7; }
.art-flow-tip { fill: var(--brand); }
.art-code { fill: var(--art-code); }
.art-code-name { fill: var(--art-code-dim); font: 600 11px system-ui, "Segoe UI", sans-serif; }
.art-code-text { fill: var(--art-code-text); font: 12px ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; white-space: pre; }
.art-code-text.dim { fill: var(--art-code-dim); }

/* --- converter --- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
  padding-bottom: 48px;
}

.editor-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.editor-panel:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }

.editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.editor-bar label { font-weight: 700; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.editor-wrap { position: relative; }

textarea {
  display: block;
  width: 100%;
  min-height: 60vh;
  resize: vertical;
  padding: 18px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font: 14px/1.6 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  tab-size: 2;
}
/* The panel shows focus (its border), so the field itself needs no second ring. */
textarea:focus-visible { outline: none; }

.drop-hint {
  position: absolute;
  inset: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 85%, var(--accent));
  font-weight: 600;
  color: var(--accent-strong);
  pointer-events: none;
}
.editor-wrap.dragging .drop-hint { display: flex; }

.editor-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.editor-meta:not(:has(span:not(:empty))) { display: none; }
.editor-meta span:empty { display: none; }

/* --- side column --- */

.side { display: flex; flex-direction: column; gap: 16px; min-width: 0; position: sticky; top: 16px; }

.card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 8px; font-size: 1rem; }

.convert-box { display: flex; flex-direction: column; gap: 8px; }
.shortcut { margin: 0; text-align: center; font-size: 0.82rem; color: var(--muted); }

/* Word, PowerPoint or LibreOffice: three large choices above the convert button, each in its format's
   hue (a soft nudge: the colour says which application the file opens in). The radios stay in the page
   (keyboard, screen readers); only their look is replaced. The chosen hue also colours the button. */
.convert-box[data-format='docx'] { --format: var(--fmt-docx); }
.convert-box[data-format='pptx'] { --format: var(--fmt-pptx); }
.convert-box[data-format='odt'] { --format: var(--fmt-odt); }
.formats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
}
.formats legend {
  padding: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.formats label { position: relative; display: block; --hue: var(--fmt-docx); }
.formats label:nth-of-type(2) { --hue: var(--fmt-pptx); }
.formats label:nth-of-type(3) { --hue: var(--fmt-odt); }
.formats input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.formats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px 10px;
  border: 2px solid var(--border);
  border-top: 5px solid color-mix(in srgb, var(--hue) 55%, var(--border));
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.formats small { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.formats input:checked + span {
  border-color: var(--hue);
  background: color-mix(in srgb, var(--hue) 12%, var(--surface));
  color: color-mix(in srgb, var(--hue) 80%, var(--text));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--hue) 25%, transparent);
}
.formats input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.formats label:hover input:not(:checked) + span { border-color: color-mix(in srgb, var(--hue) 50%, var(--border)); }
.format-note { margin: 0; font-size: 0.85rem; color: var(--muted); }
/* An option that does not apply to the chosen format (SmartArt in a deck, for instance). */
.option:has(input:disabled) { opacity: 0.45; }

.status { margin: 0; overflow-wrap: anywhere; }
.status.ok { color: var(--ok); }
.status.error { color: var(--error); }

progress {
  display: block;
  width: 100%;
  height: 8px;
  margin: 10px 0 2px;
  border: none;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
  appearance: none;
}
progress::-webkit-progress-bar { background: var(--surface-2); }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--brand)); }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--brand)); }

details { margin-top: 10px; font-size: 0.92rem; }
summary { cursor: pointer; color: var(--accent); font-weight: 600; }
details p { margin: 6px 0 0; color: var(--muted); }

.option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.option + .option { border-top: 1px solid var(--border); }
.option input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--accent); }
.option span { display: flex; flex-direction: column; }
.option small { color: var(--muted); font-size: 0.85rem; }
/* An option typed rather than ticked: label, field, then the hint. */
.option-field { flex-direction: column; gap: 4px; cursor: default; }
.option-field input {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.option-field input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.option-field input[aria-invalid="true"] { border-color: var(--error); }
.option-field input[aria-invalid="true"] ~ small { color: var(--error); }

/* --- buttons --- */

button, .download {
  font: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 40px;
}

.primary {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #ffffff), var(--accent));
  color: var(--accent-text);
  font-weight: 700;
  font-size: 1.06rem;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 1px 0 rgb(255 255 255 / 25%) inset, 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.primary:hover:not(:disabled) { background: var(--accent-strong); color: var(--accent-text); transform: translateY(-1px); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.primary:active:not(:disabled) { transform: translateY(0); }
.primary:disabled { opacity: 0.7; cursor: progress; }

/* The page's two steps, numbered and in strong colours so they are found at a glance: 1 convert, 2 download.
   The number is a pseudo-element: the label itself is replaced on each change of language. */
#convert, #download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 62px;
  padding: 16px 20px;
  font-size: 1.18rem;
}
#convert::before, #download::before {
  content: '1';
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-text);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
}
#convert { background: linear-gradient(100deg, var(--format, var(--accent)), color-mix(in srgb, var(--format, var(--accent)) 55%, var(--brand))); box-shadow: 0 6px 18px color-mix(in srgb, var(--format, var(--accent)) 35%, transparent); }
#convert:hover:not(:disabled) { background: linear-gradient(100deg, color-mix(in srgb, var(--format, var(--accent)) 80%, #000000), color-mix(in srgb, var(--format, var(--accent)) 45%, var(--brand))); }
#convert::before { color: var(--format, var(--accent)); }
#download::before { content: '2'; color: var(--ok); }
#download {
  background: linear-gradient(180deg, color-mix(in srgb, var(--ok) 85%, #ffffff), var(--ok));
  box-shadow: 0 1px 0 rgb(255 255 255 / 25%) inset, 0 6px 18px color-mix(in srgb, var(--ok) 35%, transparent);
}
#download:hover { background: color-mix(in srgb, var(--ok) 82%, #000000); box-shadow: 0 10px 24px color-mix(in srgb, var(--ok) 40%, transparent); }

.secondary {
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
}
.secondary:hover { border-color: var(--accent); color: var(--accent-strong); }
.card .secondary { margin-top: 10px; }

.link-button {
  padding: 8px 4px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: underline;
}
.link-button:hover { color: var(--text); }

/* --- conversion steps --- */

.steps { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); }
.steps li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transform: translateY(1px);
}
.steps li.active { color: var(--text); font-weight: 600; }
.steps li.active::before { border-color: var(--accent); border-top-color: transparent; animation: spin 0.9s linear infinite; }
.steps li.done { color: var(--text); }
.steps li.done::before { border-color: var(--ok); background: var(--ok); }

@keyframes spin { to { transform: translateY(1px) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .steps li.active::before { animation: none; background: var(--accent); }
  .primary { transition: none; }
  .primary:hover:not(:disabled) { transform: none; }
}

.download { margin-top: 12px; }
.hint { margin: 10px 0 0; font-size: 0.92rem; color: var(--muted); }

#warnings ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
#warnings li { overflow-wrap: anywhere; }
#warnings summary { color: var(--warn); }

/* Feedback: links styled as the card's buttons (a link, so the page sends nothing itself). */
.feedback { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.feedback-question { margin: 0; font-weight: 600; }
.feedback-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.feedback-actions a { display: inline-flex; align-items: center; min-height: 40px; border-radius: var(--radius-sm); text-decoration-thickness: 1px; }
.feedback-actions a.secondary { text-decoration: none; }
.card .feedback-actions .secondary { margin-top: 0; }

/* --- explanation bands below the converter --- */

.band { padding-bottom: 48px; }
.band > h2 { margin: 0 0 18px; font-size: 1.5rem; }

.how-steps {
  list-style: none;
  counter-reset: how;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.how-steps li { counter-increment: how; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.how-steps li::before {
  content: counter(how);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #ffffff;
  font-weight: 800;
}
.how-steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.how-steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tiles a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.tiles a:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--text); }
.tiles strong { font-size: 1.05rem; }
.tiles strong::after { content: " →"; color: var(--brand); }
.tiles span { color: var(--muted); font-size: 0.95rem; }
@media (prefers-reduced-motion: reduce) {
  .tiles a { transition: none; }
  .tiles a:hover { transform: none; }
}

.faq-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.faq-list > div { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.faq-list dt { margin: 0 0 6px; font-weight: 700; font-size: 1.05rem; }
.faq-list dd { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* The tools and packages: four tiles, as many per row as fit. */
.elsewhere .tiles { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* --- footer --- */

.site-footer { padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--border); font-size: 0.88rem; color: var(--muted); }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* --- narrower screens --- */

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-art { max-width: 460px; }
  .tool-shot { max-width: 640px; }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  textarea { min-height: 45vh; }
  .how-steps, .tiles, .faq-list, .feature-list, .elsewhere .tiles { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .topbar { padding-top: 12px; padding-bottom: 8px; }
  .hero { padding-top: 8px; }
  .tagline { font-size: 1.02rem; }
  .editor-bar { padding-left: 12px; }
  .editor-actions { width: 100%; }
  .editor-actions .secondary { flex: 1 1 auto; }
}
