/* Hanji — paper, ink and a vermilion seal. */
:root {
  --paper: #f5f0e6;
  --paper-2: #ede5d6;
  --card: #fbf8f2;
  --card-2: #f7f2e9;
  --ink: #1b1a17;
  --ink-2: #47433c;
  --muted: #7c7468;
  --line: #e3dac8;
  --line-2: #d3c6ad;
  --seal: #c8361f;
  --seal-2: #a92a16;
  --seal-soft: #f6ddd4;
  --jade: #2f7a5f;
  --jade-soft: #dcebe3;
  --warn: #b26b00;
  --shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 1px 2px rgba(60, 40, 10, .05), 0 12px 32px -12px rgba(60, 40, 10, .18);
  --shadow-sm: 0 1px 2px rgba(60, 40, 10, .08);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --f-pdf: #c0392b;
  --f-docx: #2b5cb8;
  --f-doc: #4a72b8;
  --f-hwp: #127d8f;
  --f-hwpx: #6a4fb3;
  --radius: 18px;
  --radius-sm: 11px;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13120f; --paper-2: #1a1915; --card: #1d1b17; --card-2: #23211c;
    --ink: #f1ebdf; --ink-2: #cfc6b6; --muted: #958c7e; --line: #2f2b25; --line-2: #403a31;
    --seal: #e2553a; --seal-2: #f06a50; --seal-soft: #3a1d16; --jade: #5cbf97; --jade-soft: #173328; --warn: #e3a246;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 40px -16px rgba(0, 0, 0, .6);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --f-pdf: #e0614f; --f-docx: #5b8ae0; --f-doc: #7898d8; --f-hwp: #35a9bb; --f-hwpx: #9a80e0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13120f; --paper-2: #1a1915; --card: #1d1b17; --card-2: #23211c;
  --ink: #f1ebdf; --ink-2: #cfc6b6; --muted: #958c7e; --line: #2f2b25; --line-2: #403a31;
  --seal: #e2553a; --seal-2: #f06a50; --seal-soft: #3a1d16; --jade: #5cbf97; --jade-soft: #173328; --warn: #e3a246;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 40px -16px rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --f-pdf: #e0614f; --f-docx: #5b8ae0; --f-doc: #7898d8; --f-hwp: #35a9bb; --f-hwpx: #9a80e0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 6px; }

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- seal & brand ---------- */
.seal {
  --s: 34px;
  display: inline-grid; place-items: center;
  width: var(--s); height: var(--s); flex: none;
  background: var(--seal); color: #fff8f0;
  font: 900 calc(var(--s) * .52)/1 var(--serif);
  border-radius: 9px;
  box-shadow: inset 0 0 0 2px rgba(255, 240, 225, .35), 0 2px 6px -2px rgba(168, 40, 20, .5);
  transform: rotate(-4deg);
}
.seal--xl { --s: 84px; border-radius: 20px; font-size: 44px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand__text { display: grid; line-height: 1.1; }
.brand__text strong { font: 700 20px/1 var(--serif); letter-spacing: -0.02em; }
.brand__text small { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
/* the Korean name is longer than the old one: between 540 and 960 px the sub-line goes, so the bar still fits */
@media (min-width: 541px) and (max-width: 960px) { .brand__text small { display: none; } .topbar__inner { gap: 10px; } }
.brand--sm .seal { --s: 26px; border-radius: 7px; }
.brand--sm strong { font-size: 16px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 14.5px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.nav__cta { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 8px 16px; background: var(--seal); color: #fff; font-weight: 700; box-shadow: 0 6px 16px -8px var(--seal); }
.nav a.nav__cta:hover { background: var(--seal-2); color: #fff; }
.nav a.nav__cta .i { width: 14px; height: 14px; transition: transform .2s; }
.nav a.nav__cta:hover .i { transform: translateX(3px); }
/* on the page the button leads to, it shows where you are instead of inviting a click */
.nav a.nav__cta[aria-current="page"], .nav a.nav__cta[aria-current="page"]:hover { background: transparent; color: var(--seal); box-shadow: inset 0 0 0 1.5px var(--seal); }
.nav a.nav__cta[aria-current="page"] .i { display: none; }
.nav a.nav__cta[aria-current="page"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--seal); }
/* home and the sample market are same-tab pages; the browser cross-fades between them where it supports view transitions */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
.topbar__tools { display: flex; align-items: center; gap: 8px; }
.lang { position: relative; }
.lang .lang__btn { padding: 0 10px; gap: 5px; }
.lang__code { font-size: 13px; font-weight: 700; letter-spacing: .03em; }
.lang .lang__btn .lang__chev { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.lang.is-open .lang__chev { transform: rotate(180deg); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 170px; padding: 6px;
  display: none; flex-direction: column; gap: 2px; border-radius: 14px;
}
.lang.is-open .lang__menu { display: flex; }
.lang__menu button {
  display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; cursor: pointer;
  padding: 9px 10px; border-radius: 9px; font-size: 14px; color: var(--ink-2);
}
.lang__menu button:hover { background: var(--paper-2); color: var(--ink); }
.lang__menu b { width: 22px; font-size: 11.5px; letter-spacing: .03em; color: var(--muted); }
.lang__menu [aria-checked="true"] { color: var(--ink); font-weight: 600; }
.lang__menu [aria-checked="true"]::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--seal); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); background: var(--card); border-radius: 50%; cursor: pointer; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn--sm { width: 32px; height: 32px; background: transparent; border-color: transparent; }
.icon-btn--sm:hover { background: var(--paper-2); }
.icon-btn--sm .i { width: 16px; height: 16px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--sm { height: 34px; padding: 0 13px; font-size: 13.5px; gap: 6px; }
.btn--sm .i { width: 16px; height: 16px; }
.btn--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--ink:hover { background: color-mix(in srgb, var(--ink) 86%, var(--seal)); border-color: transparent; }
.btn--seal { background: var(--seal); color: #fff; border-color: var(--seal); box-shadow: 0 6px 16px -8px var(--seal); }
.btn--seal:hover:not(:disabled) { background: var(--seal-2); border-color: var(--seal-2); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--paper-2); border-color: transparent; color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 24px; position: relative; }
.hero::before {
  content: "紙"; position: absolute; right: -10px; top: -10px; z-index: -1;
  font: 900 300px/1 var(--serif); color: var(--ink); opacity: .035; pointer-events: none;
}
.hero__head { max-width: 760px; margin-bottom: 32px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; color: var(--muted);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--seal); box-shadow: 0 0 0 4px var(--seal-soft); }
.hero__title { margin: 0; font: 700 clamp(34px, 5.6vw, 60px)/1.14 var(--serif); letter-spacing: -0.035em; }
.hero__title span { display: block; }
.hero__title span + span { color: var(--ink-2); }
.hero__title em {
  font-style: normal; color: var(--seal); position: relative; white-space: nowrap;
  background: linear-gradient(transparent 72%, var(--seal-soft) 72%, var(--seal-soft) 94%, transparent 94%);
}
.hero__sub { margin: 20px 0 0; max-width: 620px; font-size: 17px; color: var(--ink-2); }

/* ---------- converter ---------- */
.converter { padding: 14px; }
.converter__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.converter__grid .dropzone { min-height: 460px; }   /* the file area reaches down the full height of the card */

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 330px; padding: 36px 24px; cursor: pointer; border-radius: 13px;
  border: 1.5px dashed var(--line-2);
  background-color: var(--card-2);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: -1px -1px;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.dropzone::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--card-2) 30%, color-mix(in srgb, var(--card-2) 40%, transparent) 75%);
}
.dropzone > * { position: relative; z-index: 1; }
.dropzone:hover, .dropzone.is-over { border-color: var(--seal); }
.dropzone.is-over { background-color: var(--seal-soft); transform: scale(.995); }
.dropzone__icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px;
  border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--seal);
  box-shadow: var(--shadow-sm); transition: transform .25s;
}
.dropzone__icon .i { width: 28px; height: 28px; }
.dropzone:hover .dropzone__icon { transform: translateY(-3px); }
.dropzone__title { font: 700 22px/1.3 var(--serif); letter-spacing: -0.02em; }
.dropzone__sub { margin-top: 8px; font-size: 14px; color: var(--muted); }
.dropzone__btn { margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 22px; }
.fmt-chip {
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; padding: 4px 9px; border-radius: 6px;
  color: var(--fc); background: color-mix(in srgb, var(--fc) 11%, var(--card));
  border: 1px solid color-mix(in srgb, var(--fc) 22%, transparent);
}
[data-fmt="pdf"] { --fc: var(--f-pdf); }
[data-fmt="docx"] { --fc: var(--f-docx); }
[data-fmt="doc"] { --fc: var(--f-doc); }
[data-fmt="hwp"] { --fc: var(--f-hwp); }
[data-fmt="hwpx"] { --fc: var(--f-hwpx); }

.targets { display: flex; flex-direction: column; padding: 10px 8px 6px; }
.targets__label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 4px 12px; font-weight: 700; font-size: 15px; }
.targets__hint { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.targets__list { display: grid; gap: 8px; }
.target {
  position: relative; display: grid; grid-template-columns: 70px 1fr 24px; align-items: center; gap: 10px;
  padding: 14px 14px 14px 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.target:hover { border-color: var(--line-2); }
.target input { position: absolute; opacity: 0; pointer-events: none; }
.target__fmt { font: 800 17px/1 var(--sans); letter-spacing: .02em; color: var(--fc); }
.target__desc { font-size: 14px; color: var(--ink-2); }
.target__tick {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line-2); color: transparent; transition: all .15s;
}
.target__tick .i { width: 13px; height: 13px; stroke-width: 3; }
.target:has(input:checked) { border-color: var(--fc); background: color-mix(in srgb, var(--fc) 6%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc) 13%, transparent); }
.target:has(input:checked) .target__tick { background: var(--fc); border-color: var(--fc); color: #fff; }
.target:has(input:focus-visible) { outline: 2px solid var(--seal); outline-offset: 2px; }

.scanopt { display: flex; align-items: flex-start; gap: 10px; margin: 12px 4px 0; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.scanopt input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--seal); flex: none; }
.scanopt__text { display: flex; flex-direction: column; gap: 2px; }
.scanopt__hint { font-size: 12px; color: var(--muted); }
.limitnote {
  margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; line-height: 1.55;
  color: var(--ink); background: color-mix(in srgb, var(--seal) 12%, var(--card)); border: 1.5px solid var(--seal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--seal) 12%, transparent);
  animation: limit-pulse 2.4s ease-in-out infinite;
}
.limitnote::before { content: "⚠ "; color: var(--seal); }
@keyframes limit-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--seal) 4%, transparent); } }
@media (prefers-reduced-motion: reduce) { .limitnote { animation: none; } }

.engines { list-style: none; margin: auto 0 0; padding: 16px 4px 2px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.engines li { display: inline-flex; align-items: center; gap: 7px; }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.engines li.on .led { background: var(--jade); box-shadow: 0 0 0 3px var(--jade-soft); }
.engines li.off { text-decoration: line-through; opacity: .7; }

/* ---------- queue ---------- */
.queue { margin-top: 14px; border-top: 1px solid var(--line); padding: 18px 8px 4px; }
.queue__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.queue__title { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--paper-2); font-size: 12.5px; color: var(--ink-2); }
.queue__actions { display: flex; gap: 6px; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.row {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 200px auto; align-items: center; gap: 14px;
  padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  animation: row-in .35s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }
.row.is-leaving { animation: row-out .22s ease both; }
@keyframes row-out { to { opacity: 0; transform: translateX(12px); } }

.fmt-badge {
  position: relative; display: grid; place-items: end center; width: 40px; height: 48px; padding-bottom: 7px; flex: none;
  border-radius: 7px 13px 7px 7px; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  color: #fff; background: var(--fc, var(--muted));
  box-shadow: inset 0 -14px 20px -14px rgba(0, 0, 0, .25);
}
.fmt-badge::before {
  content: ""; position: absolute; right: 0; top: 0; width: 13px; height: 13px; border-radius: 0 0 0 5px;
  background: color-mix(in srgb, #fff 45%, var(--fc, var(--muted)));
}
.row__main { min-width: 0; }
.row__name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { display: flex; align-items: center; gap: 10px; margin-top: 3px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row__route { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; letter-spacing: .03em; }
.row__route .i { width: 13px; height: 13px; }
.row__route .from { color: var(--fc-from); }
.row__route .to { color: var(--fc-to); }
.row__progress { height: 4px; margin-top: 9px; border-radius: 99px; background: var(--paper-2); overflow: hidden; transition: height .25s ease; }
.row__progress span { position: relative; display: block; height: 100%; width: 0; border-radius: inherit; background: var(--seal); transition: width .12s linear; }
/* uploading is a calm ink bar; converting is vermilion with moving stripes and a bright tip */
.row[data-status="uploading"] .row__progress span { background: var(--ink-2); }
.row[data-status="running"] .row__progress { height: 9px; }
.row[data-status="running"] .row__progress span,
.row[data-status="queued"] .row__progress span {
  background-color: var(--seal);
  background-image:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent),
    linear-gradient(135deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%);
  background-size: 40% 100%, 18px 18px; background-repeat: no-repeat, repeat;
  animation: run 1.3s linear infinite;
}
.row[data-status="running"] .row__progress span::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 18px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
  animation: tip 1.1s ease-in-out infinite;
}
@keyframes run { from { background-position: -100% 0, 0 0; } to { background-position: 250% 0, 18px 0; } }
@keyframes tip { 50% { opacity: .35; } }
.row[data-status="done"] .row__progress span { background: var(--jade); }
.row[data-status="error"] .row__progress span { background: var(--warn); }

/* a scan line sweeps the page icon while the file is being read */
.row[data-status="running"] .fmt-badge::after,
.row[data-status="queued"] .fmt-badge::after {
  content: ""; position: absolute; left: 5px; right: 5px; top: 10px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent); box-shadow: 0 0 8px 1px rgba(255, 255, 255, .8);
  animation: scan 1.7s ease-in-out infinite;
}
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateY(24px); opacity: 0; } }

/* three dots travel from the source format to the target format */
.flow { display: none; align-items: center; gap: 3px; }
.flow i { width: 4px; height: 4px; border-radius: 50%; background: var(--seal); opacity: .2; animation: flow 1.2s ease-in-out infinite; }
.flow i:nth-child(2) { animation-delay: .2s; }
.flow i:nth-child(3) { animation-delay: .4s; }
@keyframes flow { 0%, 100% { opacity: .2; transform: translateX(-2px); } 50% { opacity: 1; transform: translateX(2px); } }
.row[data-status="running"] .row__route .i { display: none; }
.row[data-status="running"] .flow { display: inline-flex; }

.row__pct { display: none; align-items: baseline; font: 800 26px/1.05 var(--sans); letter-spacing: -.03em; color: var(--seal); font-variant-numeric: tabular-nums; }
.row__pct b { font-weight: inherit; }
.row__pct small { margin-left: 1px; font-size: 14px; font-weight: 700; letter-spacing: 0; opacity: .75; }
.row[data-status="running"] .row__pct { display: flex; }
.row__eta { display: none; color: var(--muted); font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.row[data-status="running"] .row__eta { display: block; }
.row__hint { display: none; margin-top: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row[data-status="running"] .row__hint { display: block; }
.dots { display: inline-block; width: 0; overflow: hidden; vertical-align: bottom; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { to { width: 1.1em; } }

.row__status { display: grid; gap: 1px; font-size: 13px; min-width: 0; }
.row__state { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.row__state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.row[data-status="running"] .row__state::before, .row[data-status="uploading"] .row__state::before { background: var(--seal); animation: pulse 1s ease-in-out infinite; }
.row[data-status="done"] .row__state { color: var(--jade); }
.row[data-status="done"] .row__state::before { background: var(--jade); }
.row[data-status="error"] .row__state { color: var(--warn); }
.row[data-status="error"] .row__state::before { background: var(--warn); }
@keyframes pulse { 50% { opacity: .35; } }
.row__step { color: var(--muted); font-size: 12.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row[data-status="error"] .row__step { color: var(--ink-2); }

.row__actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.more { position: relative; }
.row:has(.more.is-open) { z-index: 10; }
.more__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 150px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  display: none;
}
.more.is-open .more__menu { display: grid; gap: 2px; }
.more__menu button {
  display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
}
.more__menu button:hover { background: var(--paper-2); }
.more__menu button span { width: 8px; height: 8px; border-radius: 2px; background: var(--fc); }

.pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.pick button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.pick button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.row__icon { position: relative; width: 40px; height: 48px; }
.stamp {
  position: absolute; left: -8px; top: -7px;
  display: grid; place-items: center; width: 21px; height: 21px; border-radius: 6px;
  background: var(--card); border: 1.5px solid var(--seal); color: var(--seal); font: 900 12px/1 var(--serif);
  box-shadow: 0 2px 6px -2px rgba(168, 40, 20, .45);
  opacity: 0; pointer-events: none; transform: rotate(-12deg) scale(2.2);
}
.row[data-status="done"] .stamp { animation: stamp .45s .05s cubic-bezier(.2, 1.3, .4, 1) forwards; }
@keyframes stamp { 70% { opacity: 1; } to { opacity: 1; transform: rotate(-12deg) scale(1); } }

/* ---------- trust strip ---------- */
.trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; padding: 0; margin: 22px 0 0; color: var(--ink-2); font-size: 14px; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .i { color: var(--seal); }

/* ---------- sections ---------- */
.section { padding: 88px 0 8px; }
.section__head { max-width: 640px; margin-bottom: 28px; }
.kicker { margin: 0 0 10px; font: 700 13px/1 var(--sans); color: var(--seal); letter-spacing: .18em; }
.section__head h2 { margin: 0; font: 700 clamp(26px, 3.4vw, 36px)/1.25 var(--serif); letter-spacing: -0.03em; }
.section__head p:not(.kicker) { margin: 12px 0 0; color: var(--ink-2); }

.matrix-wrap { overflow-x: auto; padding: 6px; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; }
.matrix th, .matrix td { padding: 14px; text-align: left; vertical-align: middle; }
.matrix thead th { font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.matrix__corner { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.matrix__corner .i { width: 14px; height: 14px; }
.matrix tbody th { width: 120px; border-bottom: 1px solid var(--line); }
.matrix tbody td { border-bottom: 1px solid var(--line); border-left: 1px dashed var(--line); }
.matrix tbody tr:last-child > * { border-bottom: 0; }
.matrix .fmt-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--fc); letter-spacing: .03em; }
.matrix .fmt-label::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--fc); }
.cell-ok { display: grid; gap: 7px; }
.cell-ok__mark { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--jade); }
.cell-ok__mark .i { width: 15px; height: 15px; stroke-width: 2.6; }
.route { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.route span { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.route i { font-style: normal; color: var(--muted); font-size: 11px; }
.cell-na { color: var(--muted); font-size: 13px; }
.cell-same { color: var(--line-2); font-size: 20px; }
.matrix tbody td.is-current { background: color-mix(in srgb, var(--seal) 5%, transparent); }

.legend { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 18px 4px 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); border-top: 1px solid var(--line); }
.legend div { display: contents; }
.legend dt, .legend dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.legend dt { padding-right: 24px; }
.legend dd { color: var(--muted); }
.legend__tag { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.5; padding: 2px 8px; border-radius: 5px; background: var(--paper-2); white-space: nowrap; }
@media (max-width: 560px) {
  .legend { grid-template-columns: minmax(0, 1fr); }
  .legend dt { padding-bottom: 0; border-bottom: 0; }
  .legend dd { padding-top: 6px; }
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { padding: 26px 24px 24px; position: relative; overflow: hidden; }
.step__num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  background: var(--seal-soft); color: var(--seal); font: 900 22px/1 var(--serif);
}
.step h3 { margin: 0 0 8px; font: 700 20px/1.3 var(--serif); }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.compare__item { display: flex; gap: 18px; padding: 24px; align-items: flex-start; }
.compare__item h3 { margin: 2px 0 6px; font-size: 16.5px; }
.compare__item p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* cards glide in as they scroll into view, and back out when they leave (reveal.js) */
.js-reveal { opacity: 0; transform: translateY(42px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js-reveal.is-above { transform: translateY(-42px); }
.js-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal { opacity: 1; transform: none; transition: none; } }

.faq { display: grid; gap: 10px; max-width: 860px; }
.faq__item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.faq__item[open] { border-color: var(--line-2); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; cursor: pointer; list-style: none; font-weight: 600; font-size: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .i { transition: transform .2s; color: var(--muted); }
.faq__item[open] summary .i { transform: rotate(180deg); }
.faq__item p { margin: 0; padding: 0 20px 20px; color: var(--ink-2); }

/* ---------- footer ---------- */
.footer { margin-top: 96px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 28px 0 40px; font-size: 13.5px; color: var(--muted); }
.footer__inner p { margin: 0; }
.footer__link { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.footer__link:hover { color: var(--ink); text-decoration: underline; }
.footer__engines { margin-left: auto !important; }

/* ---------- overlay & toasts ---------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.drop-overlay.is-on { opacity: 1; }
.drop-overlay__card {
  display: grid; justify-items: center; gap: 18px; padding: 48px 64px; border-radius: 28px;
  border: 2px dashed var(--seal); background: var(--card); box-shadow: var(--shadow);
  font: 700 20px/1.3 var(--serif);
}
.drop-overlay__card p { margin: 0; }
.drop-overlay.is-on .seal--xl { animation: wobble 1.4s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(4deg) scale(1.04); } }

.toasts { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .35);
  animation: toast-in .3s cubic-bezier(.2, .8, .2, 1) both;
}
.toast .i { color: var(--seal-soft); }
.toast.is-leaving { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------- account ---------- */
.account { position: relative; }
.acct { position: relative; }
.acct__btn { max-width: 210px; }
.acct__email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__crown { display: none; color: var(--warn); }
.acct__btn.is-premium .acct__crown { display: block; }
.acct__pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; padding: 8px;
  display: none; flex-direction: column; border-radius: 14px;
}
.acct.is-open .acct__pop { display: flex; }
.acct__status { margin: 4px 8px 8px; font-size: 13px; color: var(--muted); }
.acct__item {
  display: block; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px;
  font-size: 14px; color: var(--ink-2); text-decoration: none; cursor: pointer;
}
.acct__item:hover { background: var(--paper-2); color: var(--ink); }

/* ---------- premium & template library ---------- */
.premium { display: grid; gap: 18px; padding: 22px; margin-bottom: 22px; }
.premium__intro, .premium.is-active { display: flex; align-items: center; gap: 14px; }
.premium__intro p, .premium.is-active p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.premium__icon { width: 34px; height: 34px; color: var(--warn); stroke-width: 1.5; }
.premium.is-active { border-color: color-mix(in srgb, var(--jade) 45%, var(--line)); background: var(--jade-soft); }
.premium.is-active .premium__icon { color: var(--jade); }
.premium__note { margin: 0; font-size: 13.5px; color: var(--muted); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.plan {
  display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-2);
}
.plan--best { border-color: var(--seal); box-shadow: 0 0 0 3px var(--seal-soft); }
.plan__name { font-weight: 700; }
.plan__price { font: 800 26px/1.2 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.plan__per { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.plan .btn { justify-self: start; }

.tpl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tpl-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-cat {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 999px;
  padding: 6px 13px; font-size: 13.5px; cursor: pointer;
}
.tpl-cat[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tpl-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; min-width: 220px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted);
}
.tpl-search input { border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); width: 100%; }
.tpl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tpl { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; }
.tpl__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tpl .fmt-badge { width: 34px; height: 40px; font-size: 9px; padding-bottom: 6px; }
.tpl__cat { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.tpl__title { margin: 4px 0 0; font-size: 16px; line-height: 1.4; }
.tpl__desc { margin: 0; font-size: 13.5px; color: var(--ink-2); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tpl__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.tpl__meta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tpl__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tpl__actions .btn { flex: 1 1 auto; justify-content: center; }
.tpl-empty { color: var(--muted); text-align: center; padding: 28px 0; margin: 0; }
.tpl-back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.tpl-back:hover { color: var(--seal); }
.tpl-back .i { width: 16px; height: 16px; transform: rotate(180deg); }
.tpl-detail [hidden] { display: none !important; }
.tpl-detail__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tpl-prev { margin: 0; padding: 14px; }
.tpl-prev__frame { position: relative; display: grid; place-items: center; min-height: 420px; border-radius: 10px; background: var(--paper-2); overflow: hidden; }
.tpl-prev__frame img { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .5); }
.tpl-pages { display: grid; gap: 14px; margin-top: 14px; }
.tpl-pages img { display: block; width: 100%; height: auto; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px -18px rgba(60, 40, 10, .45); }
.tpl-prev__wait, .tpl-prev__none { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--muted); }
.tpl-prev__wait p, .tpl-prev__none p { margin: 0; font-size: 14px; }
.tpl-prev__none .fmt-badge { width: 44px; height: 52px; }
.tpl-prev figcaption { margin-top: 10px; font-size: 12.5px; color: var(--muted); text-align: center; }
.tpl-info { display: flex; flex-direction: column; gap: 14px; padding: 26px; }
.tpl-info .fmt-badge { width: 40px; height: 48px; font-size: 10px; padding-bottom: 6px; }
.tpl-info__title { margin: 0; font: 700 clamp(24px, 3vw, 32px)/1.25 var(--serif); letter-spacing: -0.02em; }
.tpl-info__desc { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); white-space: pre-line; }
.tpl-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tpl-facts dt { font-size: 12px; color: var(--muted); }
.tpl-facts dd { margin: 3px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.tpl-info__price { margin: 0; font: 700 24px/1.2 var(--serif); }
.tpl-info .tpl__actions { margin-top: 0; }
.tpl-info__note { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.tpl__title a { color: inherit; text-decoration: none; }
.tpl__title a:hover { color: var(--seal); }
@media (max-width: 760px) { .tpl-detail__grid { grid-template-columns: 1fr; } .tpl-prev__frame { min-height: 300px; } }
#premiumBox { margin-top: 56px; }   /* the plans come after the list, with room to breathe */

/* ---------- dialog & forms ---------- */
.modal { border: 0; padding: 0; background: none; color: inherit; width: min(420px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(20, 16, 10, .45); backdrop-filter: blur(3px); }
.modal__card { display: grid; gap: 14px; padding: 22px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; }
.modal__title { margin: 0; font: 700 22px/1.3 var(--serif); }
.modal__tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; background: var(--paper-2); border-radius: 999px; }
.modal__tabs button { border: 0; background: none; padding: 8px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.modal__tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.modal__err { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--seal-soft); color: var(--seal-2); font-size: 14px; }
.modal__submit { width: 100%; }
.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select {
  height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--card);
  color: var(--ink); font: inherit; font-weight: 400; font-size: 15px;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--seal); outline-offset: 1px; }
.field__hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .topbar__tools { margin-left: auto; }
  .converter__grid { grid-template-columns: 1fr; }
  .dropzone, .converter__grid .dropzone { min-height: 260px; }
  .targets__list { grid-template-columns: 1fr 1fr; }
  .target { grid-template-columns: 1fr 22px; grid-template-rows: auto auto; row-gap: 4px; }
  .target__fmt { grid-column: 1; }
  .target__desc { grid-column: 1; font-size: 13px; }
  .target__tick { grid-column: 2; grid-row: 1 / span 2; }
  .steps, .compare { grid-template-columns: 1fr; }
}
.tabbar { display: none; }
.totop { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 960px) {
  body { padding-bottom: 84px; }   /* room for the bar at the bottom */
  .tabbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); align-items: center; gap: 2px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 56px; padding: 6px 2px; font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center;
    color: var(--ink-2); text-decoration: none; border-radius: 12px; }
  .tabbar a .i { width: 20px; height: 20px; }
  .topbar { transition: transform .25s ease, border-color .2s; }
  .topbar.is-away { transform: translateY(-100%); }
  .tabbar { transform: translateY(120%); opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease; }
  .tabbar.is-active { transform: none; opacity: 1; pointer-events: auto; }
  .totop { display: grid; place-items: center; position: fixed; right: 16px; bottom: 88px; z-index: 41;
    width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--seal); color: #fff;
    box-shadow: 0 8px 20px -10px var(--seal); cursor: pointer; opacity: 0; transform: translateY(12px);
    pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
  .totop.is-shown { opacity: 1; transform: none; pointer-events: auto; }
  .totop .i { width: 20px; height: 20px; transform: rotate(-90deg); }
  .tabbar a[aria-current="page"] { color: var(--seal); }
  .tabbar a.tabbar__main { background: var(--seal); color: #fff; border-radius: 14px;
    box-shadow: 0 6px 16px -8px var(--seal); }
}
@media (prefers-reduced-motion: reduce) { .topbar, .tabbar, .totop { transition: none !important; } }
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar__inner { height: 60px; gap: 10px; }
  .brand__text small { display: none; }
  .lang .lang__btn { padding: 0 9px; }
  .lang .lang__btn .lang__chev { display: none; }
  .hero { padding-top: 32px; }
  .hero::before { font-size: 180px; }
  .hero__sub { font-size: 15.5px; }
  .converter { padding: 8px; }
  .dropzone { padding: 28px 16px; }
  .dropzone__title { font-size: 19px; }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px 12px; padding: 12px; }
  .row__status { grid-column: 2 / -1; grid-row: 2; }
  .row__actions { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; flex-wrap: wrap; }
  .row__actions:empty { display: none; }
  .row__remove { position: absolute; top: 8px; right: 6px; }
  .queue__actions .btn span { display: none; }
  .queue__actions .btn { width: 42px; padding: 0; }
  .section { padding-top: 64px; }
  .footer__engines { margin-left: 0 !important; }
  #loginBtn span, .acct__email { display: none; }
  #loginBtn, .acct__btn { width: 38px; padding: 0; }
  .acct__btn .acct__crown { display: block; }
  .acct__btn:not(.is-premium) .acct__crown { color: var(--muted); }
  .tpl-search { min-width: 0; flex: 1; }
  .premium { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- PDF menu ---------- */
.nav a[aria-current="page"]:not(.nav__cta) { color: var(--seal); background: var(--seal-soft); }
.pm { padding: 56px 0 8px; }
/* the list of tools: a search box and a row of categories filter one grid of cards */
.pm-hero { max-width: 780px; margin: 0 auto; text-align: center; }
.pm-hero h1 { margin: 0; font: 700 clamp(34px, 5.2vw, 58px)/1.08 var(--serif); letter-spacing: -0.035em; }
.pm-hero__sub { max-width: 620px; margin: 16px auto 0; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.pm-search {
  display: flex; align-items: center; gap: 12px; width: min(560px, 100%); height: 56px; margin: 28px auto 0; padding: 0 12px 0 20px;
  border-radius: 99px; border: 1px solid var(--line-2); background: var(--card); box-shadow: 0 12px 30px -20px rgba(0, 0, 0, .4);
  cursor: text; transition: border-color .15s, box-shadow .15s;
}
.pm-search:focus-within { border-color: var(--seal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--seal) 14%, transparent); }
.pm-search > .i { flex: none; width: 20px; height: 20px; color: var(--muted); }
.pm-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
.pm-search kbd {
  flex: none; display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--muted); font: 600 13px/1 var(--sans);
}
.pm-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-2); }
.pm-badges li { display: inline-flex; align-items: center; gap: 6px; }
.pm-badges .i { width: 15px; height: 15px; color: var(--jade); stroke-width: 2.6; }
.pm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 40px 0 24px; }
.pm-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 16px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600;
  white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.pm-chip[data-tc]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc); }
.pm-chip span { min-width: 24px; padding: 3px 7px; border-radius: 99px; background: var(--paper-2); color: var(--muted); font-size: 12px; text-align: center; }
.pm-chip:hover { border-color: var(--ink-2); color: var(--ink); }
.pm-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.pm-chip[aria-pressed="true"] span { background: color-mix(in srgb, var(--card) 20%, transparent); color: var(--card); }
.pm-chip:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.pm-tool {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 178px; padding: 22px 20px 20px; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm);
  color: inherit; text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.pm-tool::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--cc); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.pm-tool::after { content: "→"; position: absolute; top: 22px; right: 20px; color: var(--cc); font-size: 18px; opacity: 0; transform: translateX(-6px); transition: opacity .18s, transform .18s; }
.pm-tool:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--cc) 45%, var(--line)); box-shadow: 0 22px 40px -24px color-mix(in srgb, var(--cc) 70%, transparent); }
.pm-tool:hover::before { transform: scaleX(1); }
.pm-tool:hover::after { opacity: 1; transform: none; }
.pm-tool:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.pm-tool__icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; border-radius: 14px;
  background: color-mix(in srgb, var(--cc) 15%, var(--card)); color: color-mix(in srgb, var(--cc) 85%, var(--ink));
}
.pm-tool__icon .i { width: 24px; height: 24px; }
.pm-tool strong { font: 700 17px/1.3 var(--serif); letter-spacing: -0.01em; }
.pm-tool > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.pm-empty { grid-column: 1 / -1; margin: 0; padding: 56px 0; text-align: center; color: var(--muted); }
/* each category has its colour: the cards, the chips and the header menu */
[data-tc="organize"] { --cc: #e0522c; }
[data-tc="optimize"] { --cc: #2e9a57; }
[data-tc="topdf"] { --cc: #d4900f; }
[data-tc="frompdf"] { --cc: #2f6fd0; }
[data-tc="edit"] { --cc: #b14ab5; }
[data-tc="security"] { --cc: #178a86; }
[data-tc="intelligence"] { --cc: #6c5ce7; }
@media (max-width: 560px) {
  .pm-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 28px -16px 18px; padding: 0 16px 4px; scrollbar-width: none; }
  .pm-chips::-webkit-scrollbar { display: none; }
  .pm-grid { grid-template-columns: 1fr; gap: 10px; }
  .pm-tool { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 2px; align-items: center; min-height: 0; padding: 14px 16px; border-radius: 14px; }
  .pm-tool__icon { grid-row: span 2; width: 44px; height: 44px; margin: 0; }
  .pm-tool::after { display: none; }
  .pm-search { height: 52px; }
  .pm-search kbd { display: none; }
}

/* the PDF tools drop down from the header (assets/pdfmenu.js) */
.nav__item { position: relative; display: flex; align-items: center; }
.nav__item > a { display: inline-flex; align-items: center; gap: 4px; }
.nav__chev { width: 14px; height: 14px; transition: transform .2s; }
.nav__item:not(.is-closed):hover .nav__chev, .nav__item:not(.is-closed):focus-within .nav__chev { transform: rotate(180deg); }
.nav__item::after { content: ""; position: absolute; left: -8px; right: -8px; top: 100%; height: 26px; }
.megamenu {
  position: fixed; top: 64px; left: 50%; z-index: 60; width: min(1240px, calc(100vw - 32px)); padding: 22px 18px 14px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.nav__item:not(.is-closed):hover .megamenu, .nav__item:not(.is-closed):focus-within .megamenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.megamenu__in { columns: 7 150px; column-gap: 10px; }
.megamenu section { break-inside: avoid; margin: 0 0 14px; }
.megamenu h3 { margin: 0 0 6px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.megamenu a, .megamenu a:hover { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.3; }
.megamenu a:hover, .megamenu a:focus-visible { background: var(--seal-soft); }
.megamenu .is-soon { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; column-gap: 8px; padding: 6px 8px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--muted); cursor: default; }
.megamenu .is-soon .megamenu__icon { grid-row: span 2; background: var(--paper-2); color: var(--muted); }
.megamenu .is-soon em { justify-self: start; padding: 0 6px; border-radius: 99px; background: var(--paper-2); font-size: 10.5px; font-style: normal; font-weight: 700; }
.megamenu__icon { background: var(--paper-2); color: var(--muted); }
.megamenu .is-soon em { flex: none; margin-left: auto; padding: 1px 6px; border-radius: 99px; background: var(--paper-2); font-size: 10.5px; font-style: normal; font-weight: 700; }
.megamenu__icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--seal-soft); color: var(--seal); }
.megamenu__icon .i { width: 16px; height: 16px; }
.megamenu a[data-tc] .megamenu__icon { background: color-mix(in srgb, var(--cc) 15%, var(--card)); color: color-mix(in srgb, var(--cc) 85%, var(--ink)); }

/* the guide under the file picker: a looping drawing of the steps, one of five shapes per tool */
.pm-guide { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding: 18px 20px; }
.pm-guide__title { margin: 0; font: 700 15px/1.3 var(--serif); }
.pm-guide__body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.pm-guide__stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.pm-guide__steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: gs; }
.pm-guide__steps li { position: relative; padding: 2px 0 2px 36px; font-size: 14px; line-height: 1.5; color: var(--ink-2); counter-increment: gs; }
.pm-guide__steps li::before {
  content: counter(gs); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--seal-soft); color: var(--seal); font: 700 13px/26px var(--sans); text-align: center;
}
.pm-guide .g-card { fill: var(--card); stroke: var(--line-2); stroke-width: 1.5; }
.pm-guide .g-drop { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 6 5; }
.pm-guide .g-seal { fill: var(--seal); }
.pm-guide .g-soft { fill: var(--seal-soft); }
.pm-guide .g-bar { fill: var(--line-2); }
.pm-guide .g-mark { fill: var(--seal); fill-opacity: .16; stroke: var(--seal); stroke-width: 1.5; }
.pm-guide .g-cur { fill: var(--ink); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.pm-guide .g-on { fill: var(--seal); }
.pm-guide .g-rot { transform-box: fill-box; transform-origin: center; }
.pm-guide .g-press { transform-box: fill-box; transform-origin: center; }
.pm-guide .g-radio { fill: var(--card); stroke: var(--line-2); stroke-width: 1.5; }

/* pages: a cursor picks two pages */
.g-k-pages .g-cur { animation: g-cur-pages 4.8s ease-in-out infinite; }
.g-k-pages .g-mark-a { animation: g-show-a 4.8s linear infinite; }
.g-k-pages .g-mark-b { animation: g-show-b 4.8s linear infinite; }
@keyframes g-cur-pages {
  0% { transform: translate(40px, 150px); } 22% { transform: translate(128px, 96px); } 26% { transform: translate(128px, 96px) scale(.85); }
  30% { transform: translate(128px, 96px); } 44% { transform: translate(198px, 96px); } 48% { transform: translate(198px, 96px) scale(.85); }
  52% { transform: translate(198px, 96px); } 80%, 100% { transform: translate(40px, 150px); }
}
@keyframes g-show-a { 0%, 26% { opacity: 0; } 30%, 82% { opacity: 1; } 86%, 100% { opacity: 0; } }
@keyframes g-show-b { 0%, 48% { opacity: 0; } 52%, 82% { opacity: 1; } 86%, 100% { opacity: 0; } }

/* drag: the first card is moved to the last place */
.g-k-drag .g-c1 { animation: g-c1 5s ease-in-out infinite; }
.g-k-drag .g-c23 { animation: g-c23 5s ease-in-out infinite; }
.g-k-drag .g-cur { animation: g-cur-drag 5s ease-in-out infinite; }
@keyframes g-c1 { 0%, 14% { transform: translate(0, 0); } 46%, 86% { transform: translate(160px, 0); } 100% { transform: translate(0, 0); } }
@keyframes g-c23 { 0%, 14% { transform: translate(0, 0); } 46%, 86% { transform: translate(-80px, 0); } 100% { transform: translate(0, 0); } }
@keyframes g-cur-drag {
  0%, 14% { transform: translate(60px, 150px); } 46%, 86% { transform: translate(220px, 150px); } 100% { transform: translate(60px, 150px); }
}

/* options: a choice in the side panel, then the button */
.g-k-side .g-cur { animation: g-cur-side 5s ease-in-out infinite; }
.g-k-side .g-on { animation: g-show-on 5s linear infinite; }
.g-k-side .g-press { animation: g-press 5s linear infinite; }
@keyframes g-cur-side {
  0% { transform: translate(40px, 150px); } 28% { transform: translate(184px, 82px); } 34% { transform: translate(184px, 82px) scale(.85); }
  40% { transform: translate(184px, 82px); } 58% { transform: translate(236px, 133px); } 64% { transform: translate(236px, 133px) scale(.85); }
  70%, 100% { transform: translate(40px, 150px); }
}
@keyframes g-show-on { 0%, 32% { opacity: 0; } 36%, 86% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes g-press { 0%, 62% { transform: scale(1); } 66% { transform: scale(.94); } 72%, 100% { transform: scale(1); } }

/* file: the file button is pressed, the file comes into the picture */
.g-k-file .g-cur { animation: g-cur-file 5s ease-in-out infinite; }
.g-k-file .g-file { animation: g-file 5s ease-in-out infinite; }
@keyframes g-cur-file {
  0% { transform: translate(40px, 150px); } 22% { transform: translate(214px, 74px); } 28% { transform: translate(214px, 74px) scale(.85); }
  32% { transform: translate(214px, 74px); } 80%, 100% { transform: translate(40px, 150px); }
}
@keyframes g-file {
  0%, 30% { opacity: 0; transform: translate(70px, 0); } 42%, 84% { opacity: 1; transform: translate(0, 0); } 92%, 100% { opacity: 0; transform: translate(0, 0); }
}

/* turn: the rotate button turns the page */
.g-k-turn .g-cur { animation: g-cur-turn 5s ease-in-out infinite; }
.g-k-turn .g-rot { animation: g-rot 5s ease-in-out infinite; }
@keyframes g-cur-turn {
  0%, 8% { transform: translate(262px, 146px); } 20% { transform: translate(220px, 32px); } 26% { transform: translate(220px, 32px) scale(.85); }
  30%, 84% { transform: translate(220px, 32px); } 94%, 100% { transform: translate(262px, 146px); }
}
@keyframes g-rot { 0%, 30% { transform: rotate(0deg); } 48%, 84% { transform: rotate(90deg); } 92%, 100% { transform: rotate(0deg); } }

@media (max-width: 560px) { .pm-guide__body { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .pm-guide__stage { display: none; } }

/* sign / edit: one big page with marks on it */
.pgrid.is-place { display: block; padding: 4px; }
.pg--place { width: fit-content; margin: 0 auto; padding: 10px; gap: 10px; cursor: default; }
.place__nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.place__page { box-shadow: 0 1px 6px rgba(0, 0, 0, .3); background: #fff; }
.pg--place .place__page img { position: absolute; inset: 0; left: 0; top: 0; width: 100%; height: 100%; transform: none; box-shadow: none; }
.place__ov { position: absolute; inset: 0; overflow: hidden; user-select: none; touch-action: none; }
.mk { position: absolute; cursor: move; user-select: none; touch-action: none; white-space: pre; line-height: 1.15; font-family: Helvetica, Arial, "Malgun Gothic", sans-serif; }
.mk.is-sel { outline: 1.5px dashed var(--seal); outline-offset: 3px; }
.mk--image img { display: block; width: 100%; pointer-events: none; }
.mk--rect { opacity: .45; }
.mk__x, .mk__rs { position: absolute; background: var(--seal); }
.mk__x { top: -13px; right: -13px; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; }
.mk__x::after { content: "×"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 15px/1 sans-serif; font-style: normal; }
.mk__rs { right: -7px; bottom: -7px; width: 12px; height: 12px; border-radius: 3px; cursor: nwse-resize; }
.sigpad { display: block; width: 100%; height: 120px; border: 1px dashed var(--line-2); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--card); background: var(--c); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.swatch.is-on { box-shadow: 0 0 0 2.5px var(--seal); }
.pm-field input[type="range"] { height: auto; padding: 0; accent-color: var(--seal); }

.ff { position: absolute; box-sizing: border-box; min-width: 12px; padding: 0 3px; border: 1px solid var(--seal); border-radius: 2px; background: rgba(255, 238, 190, .65); color: #111; font-family: Helvetica, Arial, "Malgun Gothic", sans-serif; }
.ff:focus { outline: 2px solid var(--seal); background: rgba(255, 255, 255, .9); }
.ff--check, .ff--radio { padding: 0; margin: 0; accent-color: var(--seal); }

.target-now { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 15px; font-weight: 600; }
.target-now__desc { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.pair__sub { margin: 14px 0 0; font-size: 16.5px; color: var(--ink-2); }
.dropzone.is-disabled { opacity: .5; pointer-events: none; }
.target-now { appearance: none; border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; cursor: default; }
.target-now__more { display: none; font-size: 13px; font-weight: 600; color: var(--seal); }
.target-dlg { width: min(440px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 20px; }
.target-dlg__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.target-dlg__head .modal__title { margin: 0; font: 700 18px/1.3 var(--serif); }
.target-dlg__list section { margin: 0 0 14px; }
.target-dlg__list h3 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.target-opt { display: block; width: 100%; margin: 0 0 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.target-opt.is-on, .target-opt:hover { border-color: var(--seal); background: var(--seal-soft); }
@media (max-width: 960px) {
  .target-now { cursor: pointer; }
  .target-now__more { display: inline; }
}

.megamenu[hidden] { display: none; }
.megamenu--conv { width: min(780px, calc(100vw - 32px)); }
.megamenu--conv .megamenu__in { columns: 3 220px; column-gap: 12px; }
.megamenu--conv .conv-pair { display: flex; flex-direction: column; gap: 4px; }
.megamenu--conv .conv-pair h3 { margin: 0 0 4px 8px; }

/* the round "add more files" button beside a file list, and the size label over a file card */
.fab {
  position: sticky; top: 90px; z-index: 5; float: right; display: grid; place-items: center; width: 52px; height: 52px; margin: 0 0 12px 12px;
  padding: 0; border: 0; border-radius: 50%; background: var(--seal); color: #fff; box-shadow: 0 8px 20px -6px var(--seal); cursor: pointer; transition: background .15s, transform .15s;
}
.fab[hidden] { display: none; }
.fab:hover { background: var(--seal-2); transform: scale(1.06); }
.fab .i { width: 24px; height: 24px; stroke-width: 2.4; }
.fab b { position: absolute; top: -5px; left: -5px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--ink); color: var(--card); font-size: 12px; }
.fab__tip, .pg__tip {
  position: absolute; z-index: 6; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--card); font-size: 13px; font-weight: 700;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.fab__tip { right: calc(100% + 10px); top: 50%; transform: translateY(-50%); }
.fab:hover .fab__tip, .fab:focus-visible .fab__tip, .pg:hover .pg__tip { opacity: 1; }
.pg__tip { bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .72); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

.pm__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.pm__title { margin: 0; font: 700 clamp(22px, 3vw, 30px)/1.2 var(--serif); letter-spacing: -0.02em; }
.pm-drop { min-height: 380px; }
.pm-drop__note { margin-top: 18px; font-size: 12.5px; color: var(--muted); }

.pm-work { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.pm-canvas { padding: 14px; background: var(--card-2); }
.pm-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; padding: 0 4px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pm-file strong { max-width: 46ch; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-file span { color: var(--muted); }
.pm-file__fill { flex: 1; }

.pgrid { list-style: none; margin: 0; padding: 4px; display: grid; grid-template-columns: repeat(auto-fill, 164px); gap: 14px; justify-content: center; }
.pg {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 8px 6px;
  border-radius: 12px; border: 2px solid transparent; background: var(--card); box-shadow: var(--shadow-sm);
  cursor: pointer; outline: none; user-select: none; -webkit-user-select: none;
}
.pgrid.is-drag .pg { cursor: grab; }
.pg:hover { border-color: var(--line-2); }
.pg:focus-visible { border-color: var(--seal); }
.pg__thumb { position: relative; width: 144px; height: 192px; }
.pg__thumb img { position: absolute; left: 50%; top: 50%; max-width: none; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .28); }
.pg__num { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pg__num:empty { display: none; }
.pg__meta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -4px; font-size: 11.5px; color: var(--muted); }
.pg__meta:empty { display: none; }
.pgrid.is-single { grid-template-columns: 264px; }
.pgrid.is-single .pg { cursor: default; }
.pgrid.is-single .pg__thumb { width: 248px; height: 330px; }
.pg__tools { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity .15s; }
.pg:hover .pg__tools, .pg:focus-within .pg__tools { opacity: 1; }
.pg__btn {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm);
}
.pg__btn:hover { background: var(--seal); border-color: var(--seal); color: #fff; }
.pg__btn .i { width: 16px; height: 16px; }
.pg__grip {
  display: none; position: absolute; top: 12px; left: 12px; width: 30px; height: 30px; place-items: center;
  border-radius: 8px; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 18px; touch-action: none;
}
.pg__mark {
  display: none; position: absolute; top: 12px; left: 12px; min-width: 24px; height: 24px; padding: 0 6px;
  place-items: center; border-radius: 99px; background: var(--seal); color: #fff; font-size: 12px;
}
.pg__mark .i { width: 14px; height: 14px; stroke-width: 3; }
.pg__mark b { display: none; font-style: normal; }
.pg.is-picked { border-color: var(--seal); background: var(--seal-soft); }
.pg.is-picked .pg__mark { display: grid; }
.pg.has-range { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 10%, var(--card)); }
.pg.has-range .pg__mark { display: grid; background: var(--rc); }
.pg.has-range .pg__mark .i { display: none; }
.pg.has-range .pg__mark b { display: block; }
.pg.is-dropped .pg__thumb img { opacity: .28; filter: grayscale(1); }
.pg.is-dropped .pg__thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top right, transparent calc(50% - 1.5px), var(--seal) calc(50% - 1.5px), var(--seal) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(to bottom right, transparent calc(50% - 1.5px), var(--seal) calc(50% - 1.5px), var(--seal) calc(50% + 1.5px), transparent calc(50% + 1.5px));
}
.pg.is-lifted { opacity: .25; }
.pg--ghost { position: fixed; z-index: 80; margin: 0; pointer-events: none; border-color: var(--seal); transform: rotate(3deg) scale(1.04); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .45); }
@media (hover: none) {
  .pg__tools { opacity: 1; }
  .pgrid.is-drag .pg__grip { display: grid; }
}

.pm-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.pm-side__title { margin: 0; font: 700 20px/1.3 var(--serif); }
.pm-side__hint { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.pm-side__body { display: flex; flex-direction: column; gap: 12px; }
.pm-side__info { min-height: 1.4em; margin: 0; font-size: 13.5px; font-weight: 600; }
.pm-side__go { width: 100%; height: 52px; font-size: 16px; }
.pm-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pm-field input, .pm-range input {
  height: 40px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink); font: inherit; font-size: 14px;
}
.pm-field textarea {
  width: 100%; min-height: 120px; padding: 10px 12px; resize: vertical; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.5;
}
.pm-field input:focus, .pm-field textarea:focus, .pm-range input:focus { outline: 2px solid var(--seal); outline-offset: 1px; }
.pm-field small { font-size: 12.5px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.pm-pass { max-width: 420px; margin: 0 auto 16px; }
.pm-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pm-sides label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.pm-sides input { height: 40px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.pm-sides input:focus { outline: 2px solid var(--seal); outline-offset: 1px; }
.pg__ov { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); overflow: hidden; pointer-events: none; }
.pg__crop { position: absolute; border: 1.5px dashed var(--seal); box-shadow: 0 0 0 999px rgba(0, 0, 0, .5); }
.pg__wm { position: absolute; left: 50%; top: 50%; white-space: nowrap; font-weight: 700; line-height: 1; }
.pg__pn { position: absolute; white-space: nowrap; line-height: 1; font-family: Helvetica, Arial, sans-serif; color: #000; }
.pm-field input[aria-invalid] { border-color: var(--seal); }
.pm-modes { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--paper-2); }
.pm-modes button { min-height: 34px; padding: 4px 6px; line-height: 1.3; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pm-modes button[aria-selected="true"], .pm-modes button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.pm-opts { display: flex; flex-direction: column; gap: 8px; }
.pm-opt {
  display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; text-align: left; cursor: pointer;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit;
}
.pm-opt b { font-size: 14px; }
.pm-opt small { font-size: 12.5px; color: var(--muted); }
.pm-opt[aria-checked="true"] { border-color: var(--seal); background: var(--seal-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--seal) 14%, transparent); }
.pm-opt:focus-visible, .pm-modes button:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.pm-range {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px 10px; align-items: end; margin-bottom: 8px; padding: 12px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--card);
}
.pm-range.is-active { border-color: var(--rc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 18%, transparent); }
.pm-range__name { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.pm-range__name i { width: 10px; height: 10px; border-radius: 50%; background: var(--rc); }
.pm-range label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.pm-range input { height: 36px; padding: 0 8px; border-radius: 8px; }

.pm-state { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 24px; text-align: center; }
.pm-state p { margin: 0; color: var(--ink-2); }
.pm-spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--paper-2); border-top-color: var(--seal); animation: pm-spin .8s linear infinite; }
@keyframes pm-spin { to { transform: rotate(360deg); } }
.pm-bar { width: min(360px, 100%); margin: 0; }
.pm-done__tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--jade-soft); color: var(--jade); }
.pm-done__tick .i { width: 30px; height: 30px; stroke-width: 2.6; }
.pm-done h2 { margin: 0; font: 700 26px/1.3 var(--serif); }
.pm-done p { word-break: break-all; }
.pm-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

@media (max-width: 960px) {
  .pm { padding-top: 28px; }
  .pm-work { grid-template-columns: 1fr; }
  .pm-side { position: static; }
  .pm-side__go { position: sticky; bottom: 84px; z-index: 5; }


}
@media (max-width: 480px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pg__thumb { width: 120px; height: 160px; }
}

/* the two menus (변환하기, PDF 도구) replace the links on narrow screens: in the header row, or on a row of their own
   below 540px. A device with a mouse keeps the hover; a touch-only device opens a menu with a tap. */
@media (max-width: 960px) {
  .topbar__inner { gap: 12px; }
  .nav { display: flex; margin: 0 auto; gap: 8px; }
  .nav__ico { display: none; }
  .nav > a, .nav > a.nav__cta { display: none; }
  .nav__item > a {
    height: 36px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-2);
    color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap;
  }
  .nav__item.is-open > a { border-color: var(--seal); color: var(--seal); }
  .nav__item .nav__chev { width: 13px; height: 13px; }
  .nav__item::after { display: none; }
}
/* on a phone the two menus sit in the top bar, centred between the logo and the right-hand controls: icon and a small label */
@media (max-width: 539px) {
  .nav { gap: 6px; }
  .nav__item > a { height: 34px; padding: 0 9px; gap: 3px; font-size: 12.5px; }
  .nav__item > a .nav__chev { width: 12px; height: 12px; }
  .nav__item.is-open > a .nav__chev { transform: rotate(180deg); }
  .nav__ico { display: block; width: 17px; height: 17px; }
  /* three menus do not fit with their words on a phone: icon and arrow only; the word stays for screen readers,
     and the bottom tab bar still names them */
  .nav__item > a > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 960px) and (hover: none) {
  .nav__item { position: static; }
  .nav__item .megamenu {
    position: fixed; top: 76px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 96px); overflow-y: auto;
    padding: 14px 12px 10px; border-radius: 16px; transform: none;
  }
  .nav__item .megamenu__in, .megamenu--conv .megamenu__in { columns: 2 140px; column-gap: 8px; }
  .nav__item:not(.is-open):hover .megamenu, .nav__item:not(.is-open):focus-within .megamenu { opacity: 0; visibility: hidden; transform: none; }
  .nav__item.is-open .megamenu { opacity: 1; visibility: visible; transform: none; }
  /* a tap leaves the hover state on: the desktop centring must not move the menu off the screen */
  .nav__item:not(.is-closed):hover .megamenu, .nav__item:not(.is-closed):focus-within .megamenu { transform: none; }
}
/* on a phone the language, theme and account buttons sit behind one burger; the two menus stay in the header */
.tools__burger { display: none; }
@media (max-width: 539px) {
  .tools__burger { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; }
  .tools__burger { position: relative; order: 9; }
  .tools__burger span { position: absolute; left: 11px; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
  .tools__burger span:nth-child(1) { top: 12px; }
  .tools__burger span:nth-child(2) { top: 18px; }
  .tools__burger span:nth-child(3) { top: 24px; }
  .topbar__tools.is-open ~ .tools__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .topbar__tools.is-open ~ .tools__burger span:nth-child(2) { opacity: 0; }
  .topbar__tools.is-open ~ .tools__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .topbar__tools:not(.is-open) > * { display: none; }
  /* open: the language, theme and account buttons drop down in a row under the bar; the menus stay where they are */
  .topbar__inner { position: relative; }
  .topbar__tools.is-open { position: absolute; top: calc(100% + 6px); right: 12px; z-index: 60; display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .35); animation: tools-drop .25s ease; }
  @keyframes tools-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}

/* 계산기: the hub reuses the PDF tool cards; one calculator = the live picture beside its values and result */
[data-tc="elec"] { --cc: #1f8fd6; }
[data-tc="fin"] { --cc: #2e9a57; }
[data-tc="gov"] { --cc: #d4900f; }
.megamenu--calc { width: min(660px, calc(100vw - 32px)); }
.megamenu--calc .megamenu__in { columns: 3 190px; column-gap: 12px; }
.cx .pm__bar { margin-bottom: 4px; }
.cx-desc { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.cx-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.cx-side { display: grid; gap: 16px; }
.cx-note { margin: 22px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

/* the stage: each category has its own setting: a dark bench for electronics, ledger paper for finance,
   a planning sheet for support projects */
.cx-stage {
  --acc: var(--cc, var(--seal)); --st-bg: var(--card); --st-fg: var(--ink); --st-dim: var(--muted); --wire: var(--ink-2);
  --good: var(--jade); --fair: var(--warn); --bad: var(--seal); --mute: color-mix(in srgb, var(--ink) 14%, transparent);
  --track: color-mix(in srgb, var(--ink) 8%, transparent);
  position: sticky; top: 92px; overflow: hidden; border-radius: 22px; border: 1px solid var(--line);
  background: var(--st-bg); box-shadow: var(--shadow); color: var(--st-fg); aspect-ratio: 3 / 2;
}
.cx-stage[data-tc="elec"] {
  --st-bg: #0d1520; --st-fg: #e6f1fb; --st-dim: #7f93a8; --wire: #9fb4c8; --acc: #38bdf8; --mute: #26384a; --track: #1a2736;
  border-color: #1d2b3a;
  background: radial-gradient(120% 90% at 50% 0%, #15273a 0%, #0d1520 60%), #0d1520;
}
.cx-stage[data-tc="elec"]::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(56, 189, 248, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(56, 189, 248, .07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.cx-stage[data-tc="fin"] {
  --acc: #2e9a57;
  background: repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--jade) 9%, transparent) 31px 32px), var(--card);
}
.cx-stage[data-tc="gov"] {
  --acc: #d4900f;
  background: radial-gradient(color-mix(in srgb, #d4900f 16%, transparent) 1px, transparent 1.5px) 0 0 / 18px 18px, var(--card);
}
.cx-svg { position: relative; display: block; width: 100%; height: 100%; font-family: var(--sans); }

/* text */
.cx-t { fill: var(--st-fg); font-size: 13px; font-weight: 600; }
.cx-t--dim { fill: var(--st-dim); font-size: 12px; font-weight: 600; }
.cx-t--lbl { fill: var(--st-fg); font-size: 12.5px; font-weight: 700; }
.cx-t--val { fill: var(--st-fg); font-size: 14px; font-weight: 700; }
.cx-t--hot { fill: var(--acc); font-size: 16px; font-weight: 800; }
.cx-t--big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.cx-t--formula { fill: var(--st-dim); font: italic 600 14px var(--serif); }
.cx-t--cap { fill: var(--st-dim); font-size: 11.5px; font-weight: 500; }
.cx-t--on { fill: #fff; font-size: 12.5px; font-weight: 700; }
.cx-t.cx-tone-good { fill: var(--good); }
.cx-t.cx-tone-fair { fill: var(--fair); }
.cx-t.cx-tone-bad { fill: var(--bad); }
.cx-t--strong { font-size: 15px; font-weight: 800; }
.cx-t--meter { fill: var(--st-fg); font-size: 15px; font-weight: 800; }

/* circuits */
.cx-wire { fill: none; stroke: var(--wire); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cx-thin { stroke-width: 2; }
.cx-res { stroke: var(--st-fg); stroke-width: 3.2; }
.cx-plate { stroke: var(--st-fg); stroke-width: 3; }
.cx-plate--short { stroke-width: 6; }
.cx-meter { fill: var(--st-bg); stroke: var(--acc); stroke-width: 3; }
.cx-node { fill: var(--st-fg); }
.cx-node--hot { fill: var(--acc); }
.cx-flow { fill: none; stroke: var(--acc); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 15; filter: drop-shadow(0 0 4px var(--acc)); animation: cx-flow 1.5s linear infinite; }
@keyframes cx-flow { to { stroke-dashoffset: -32; } }
.cx-heat { fill: #ff7849; filter: blur(14px); }
.cx-led { stroke: var(--st-fg); stroke-width: 2.6; stroke-linejoin: round; }
.cx-flicker { animation: cx-flicker .35s steps(2) infinite; }
@keyframes cx-flicker { 50% { opacity: .35; } }
.cx-glass { fill: color-mix(in srgb, var(--st-fg) 6%, transparent); stroke: var(--st-fg); stroke-width: 2.5; stroke-linejoin: round; }
.cx-fil { fill: none; stroke: #ffd25e; stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 5px #ffb02e); }
.cx-ray { stroke: #ffd25e; stroke-width: 3; stroke-linecap: round; }
.cx-base { fill: var(--wire); }
.cx-cell { fill: none; stroke: var(--st-fg); stroke-width: 3; }
.cx-charge { fill: #34d399; transform-box: fill-box; transform-origin: left center; }
.cx-drain { animation: cx-drain 6s ease-in infinite; }
@keyframes cx-drain { 0% { transform: scaleX(1); fill: #34d399; } 80% { transform: scaleX(.06); fill: #f87171; } 92% { transform: scaleX(.06); fill: #f87171; } 100% { transform: scaleX(1); fill: #34d399; } }
.cx-bolt { fill: #0d1520; opacity: .55; }
.cx-dash { fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-dasharray: 4 4; }

/* charts */
.cx-svg .cx-good, .cx-good-fill { fill: var(--good); }
.cx-svg .cx-fair { fill: var(--fair); }
.cx-svg .cx-bad { fill: var(--bad); }
.cx-svg .cx-acc, .cx-svg .cx-elec { fill: var(--acc); }
.cx-svg .cx-muted, .cx-muted-fill { fill: var(--mute); }
.cx-svg .cx-gov, .cx-gov-fill { fill: #3b82f6; }
.cx-svg .cx-cash, .cx-cash-fill { fill: #2e9a57; }
.cx-svg .cx-kind, .cx-kind-fill { fill: #d4900f; }
.cx-track { fill: var(--track); }
.cx-ring { fill: none; stroke: var(--track); stroke-width: 28; }
.cx-svg .cx-arc { fill: none; stroke-width: 28; }
.cx-svg .cx-arc.cx-good { stroke: var(--good); }
.cx-svg .cx-arc.cx-muted { stroke: var(--mute); }
.cx-svg .cx-arc.cx-cash { stroke: #2e9a57; }
.cx-svg .cx-arc.cx-kind { stroke: #d4900f; }
.cx-svg .cx-zone { fill: none; stroke-width: 20; }
.cx-svg .cx-zone.cx-bad { stroke: var(--bad); }
.cx-svg .cx-zone.cx-fair { stroke: var(--fair); }
.cx-svg .cx-zone.cx-good { stroke: var(--good); }
.cx-needle { fill: none; stroke: var(--st-fg); stroke-width: 5; stroke-linecap: round; }
.cx-axis { fill: none; stroke: var(--st-dim); stroke-width: 1.5; }
.cx-bench { fill: none; stroke: var(--st-fg); stroke-width: 2; stroke-dasharray: 3 3; }
.cx-stand { fill: var(--wire); stroke: var(--wire); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.cx-beam { fill: none; stroke: var(--st-fg); stroke-width: 6; stroke-linecap: round; }
.cx-pan { fill: color-mix(in srgb, var(--st-fg) 12%, transparent); stroke: var(--st-fg); stroke-width: 2; }
.cx-liquid { fill: color-mix(in srgb, #8b5cf6 70%, var(--acc)); opacity: .85; }
.cx-bubble { fill: #fff; opacity: 0; animation: cx-bubble 1.8s ease-in infinite; transform-box: fill-box; }
@keyframes cx-bubble { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: .8; } 100% { opacity: 0; transform: translateY(-80px); } }
.cx-orbit { fill: none; stroke: var(--track); stroke-width: 2; stroke-dasharray: 4 6; }
.cx-spin { transform-box: view-box; transform-origin: 180px 112px; animation: cx-spin 6s linear infinite; }
@keyframes cx-spin { to { transform: rotate(360deg); } }
.cx-coin { fill: var(--acc); stroke: var(--card); stroke-width: 3; }
.cx-core { fill: var(--acc); }
.cx-brace { fill: none; stroke: var(--st-dim); stroke-width: 2; stroke-linejoin: round; }

/* the values and the result */
.cx-form, .cx-result { padding: 20px; }
.cx-h { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cx-field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.cx-input { display: flex; align-items: center; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); transition: border-color .15s, box-shadow .15s; }
.cx-input:focus-within { border-color: var(--cc, var(--seal)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cc, var(--seal)) 16%, transparent); }
.cx-input input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: 700 17px var(--sans); font-variant-numeric: tabular-nums; outline: none; }
.cx-input em { flex: none; margin-left: 8px; color: var(--muted); font-style: normal; font-weight: 700; font-size: 14px; }
.cx-field.is-out .cx-input { border-style: dashed; background: color-mix(in srgb, var(--cc, var(--seal)) 9%, var(--card)); }
.cx-field.is-out input { color: color-mix(in srgb, var(--cc, var(--seal)) 85%, var(--ink)); }
.cx-actions { display: flex; gap: 8px; margin-top: 4px; }
.cx-seg-ctl, .cx-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.cx-seg-ctl > span, .cx-swatches > span { width: 100%; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cx-seg-ctl button, .cx-swatches button {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font: 700 13px var(--sans);
}
.cx-seg-ctl button[aria-pressed="true"], .cx-swatches button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.cx-swatches i { width: 12px; height: 12px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 0 8px var(--sw); }
.cx-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cx-main span { width: 100%; font-size: 13px; font-weight: 700; color: var(--muted); }
.cx-main strong { font: 800 32px/1.1 var(--sans); letter-spacing: -.02em; color: color-mix(in srgb, var(--cc, var(--seal)) 85%, var(--ink)); font-variant-numeric: tabular-nums; }
.cx-main strong.is-good { color: var(--jade); }
.cx-main strong.is-fair { color: var(--warn); }
.cx-main strong.is-bad { color: var(--seal); }
.cx-rows { margin: 12px 0 0; display: grid; gap: 8px; }
.cx-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.cx-rows dt { color: var(--ink-2); }
.cx-rows dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.cx-badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-style: normal; font-weight: 800; }
.cx-badge--good { background: var(--jade-soft); color: var(--jade); }
.cx-badge--fair { background: color-mix(in srgb, var(--warn) 16%, var(--card)); color: var(--warn); }
.cx-badge--bad { background: var(--seal-soft); color: var(--seal); }
.cx-empty { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  .cx-layout { grid-template-columns: minmax(0, 1fr); }
  .cx-stage { position: relative; top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-flow, .cx-drain, .cx-bubble, .cx-spin, .cx-flicker { animation: none; }
}
.megamenu--support { width: min(300px, calc(100vw - 32px)); }
.megamenu--support .megamenu__in { columns: 1; }
