/* Ubuntu, served from /fonts (Ubuntu Font Licence, fonts/LICENSE.txt): no request to Google Fonts. Latin + Latin Extended. */
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ubuntu-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ubuntu-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ubuntu-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ubuntu-latin-ext-500.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/ubuntu-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/ubuntu-latin-ext-700.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --green: #02C873;
  --green-dark: #0A7A48;   /* green text: 4.5:1 on all light surfaces (WCAG AA) */
  --green-strong: #087F4B; /* green surfaces with white text (buttons, badges): 5:1 */
  --green-hover: #06703F;  /* hovered green buttons, the same in both themes */
  --green-soft: #e6f8ee;
  /* Warm neutrals, a hint of "night shift": paper instead of blue-white, coffee instead of grey. */
  --bg: #F7F4EF;
  --bg-top: #FFFDF9;
  --bg-accent: #F3ECE2;
  --card: #FFFEFB;
  --border: #E6DED2;
  --ring: #E6DED2;
  --text: #34302B;
  --muted: #6E655B;       /* 4.8:1 or more on every light surface */
  --muted-light: #72695F; /* 4.5:1 or more on every light surface */
  --danger: #C42B30;
  --danger-soft: #ffe8e6;
  --warn-bg: #fff2d6; --warn-fg: #805800;
  --radius: 8px;
  --shadow: 0 0 72px rgba(214, 196, 170, .45);
  --shadow-modal: 0 24px 64px rgba(40, 28, 14, .22);
  --check-a: #EDE6DB; --check-b: #F5EFE6;
  --overlay: rgba(52, 46, 40, .45);
  --crop-shade: rgba(255, 252, 246, .55);
  --glow: rgba(255, 178, 102, .16);      /* soft amber light at the top and the bottom of the page */
  --glow-low: rgba(255, 166, 88, .12);
  --font: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green-dark: #5fc996; --green-soft: rgba(95, 201, 150, .13);
    --bg: #1C1814; --bg-top: #241E18; --bg-accent: #29221C; --card: #27211B; --border: #3D342A; --ring: #3A3128;
    --text: #EFE6DA; --muted: #A99D8D; --muted-light: #9A8E7E; --danger: #f2777b;
    --danger-soft: rgba(229, 72, 77, .15); --warn-bg: rgba(240, 180, 60, .14); --warn-fg: #f0c060;
    --shadow: 0 0 72px rgba(0, 0, 0, .3); --shadow-modal: 0 24px 64px rgba(0, 0, 0, .55);
    --check-a: #332B23; --check-b: #2B241D; --overlay: rgba(14, 11, 8, .62); --crop-shade: rgba(0, 0, 0, .5);
    --glow: rgba(255, 136, 56, .09); --glow-low: rgba(255, 130, 50, .045);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --green-dark: #5fc996; --green-soft: rgba(95, 201, 150, .13);
  --bg: #1C1814; --bg-top: #241E18; --bg-accent: #29221C; --card: #27211B; --border: #3D342A; --ring: #3A3128;
  --text: #EFE6DA; --muted: #A99D8D; --muted-light: #9A8E7E; --danger: #f2777b;
  --danger-soft: rgba(229, 72, 77, .15); --warn-bg: rgba(240, 180, 60, .14); --warn-fg: #f0c060;
  --shadow: 0 0 72px rgba(0, 0, 0, .3); --shadow-modal: 0 24px 64px rgba(0, 0, 0, .55);
  --check-a: #332B23; --check-b: #2B241D; --overlay: rgba(14, 11, 8, .62); --crop-shade: rgba(0, 0, 0, .5);
  --glow: rgba(255, 136, 56, .09); --glow-low: rgba(255, 130, 50, .045);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); background-image: radial-gradient(ellipse 90% 520px at 50% -80px, var(--glow), transparent 72%), linear-gradient(180deg, var(--bg-top) 0, var(--bg) 420px); background-repeat: no-repeat; min-height: 100vh; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
.layout { width: 100%; }
main { display: block; width: 100%; }
main:focus { outline: none; }
.footer { margin-top: auto; }
button, input, select { font: inherit; color: inherit; }
h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 15px; font-weight: 700; }
h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
[hidden] { display: none !important; }
small { font-weight: 400; color: var(--muted-light); }
strong { font-weight: 500; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg-top) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1210px; margin: 0 auto; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #0ad184, #02C873 60%, #0FA263); box-shadow: 0 4px 12px rgba(2, 200, 115, .35); flex: none; display: grid; place-items: center; color: #fff; }
.brand-mark svg { width: 62%; height: 62%; transition: transform .25s ease; }
.brand:hover .brand-mark svg { transform: scale(.86); } /* it shrinks, of course */
.brand-mark.small { width: 22px; height: 22px; border-radius: 6px; box-shadow: none; }
.brand-name .tld, .footer-brand .tld { color: var(--green-dark); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand-tag { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.topbar-right { display: flex; gap: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg-accent); border: 1px solid var(--border); }
.toggle button, .toggle a { height: 30px; min-width: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s, box-shadow .15s; }
.toggle button svg { width: 15px; height: 15px; }
.toggle a { text-decoration: none; }
.toggle button:hover, .toggle a:hover { color: var(--text); }
.toggle button.active, .toggle a.active { background: var(--card); color: var(--green-dark); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }

/* Footer */
.footer { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); background: var(--bg-accent); }
.footer-inner { max-width: 1210px; margin: 0 auto; padding: 28px 20px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--text); text-decoration: none; border-radius: 6px; transition: opacity .15s; }
.footer-brand:hover { opacity: .8; }
.footer-text { margin: 0; flex: 1 1 320px; font-size: 13px; color: var(--muted); }
.footer-meta { margin: 0; font-size: 12px; color: var(--muted-light); }
.footer-meta a { color: var(--green-dark); text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }

/* Layout */
.layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; max-width: 1210px; margin: 28px auto 40px; padding: 0 20px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Hero */
.hero { padding: 6px 4px 18px; }
.hero p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* Settings */
.settings { padding: 18px 20px 20px; align-self: start; position: sticky; top: 82px; }
.settings-title { padding-bottom: 14px; }
.scope { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.group { padding: 16px 0; border-top: 1px solid var(--bg-accent); }
.group-head { display: flex; align-items: center; justify-content: space-between; }
.pill { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); margin-bottom: 10px; }
.pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
:root[data-theme="dark"] .pill, :root:not([data-theme="light"]) .pill { color: var(--green-dark); }

/* Info icons; the tooltip itself is a floating element appended to <body> (see app.js) */
.info { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--muted-light); color: var(--muted-light); font-size: 9px; font-weight: 700; font-style: normal; text-transform: none; letter-spacing: 0; cursor: help; vertical-align: middle; margin-left: 6px; flex: none; }
.info::before { content: "i"; }
.info:hover, .info:focus-visible, .info.open { border-color: var(--green); color: var(--green-dark); outline: none; }
.tip { position: fixed; z-index: 100; max-width: 280px; padding: 8px 10px; border-radius: 6px; background: #333; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); pointer-events: none; opacity: 0; transition: opacity .12s; }
.tip.show { opacity: 1; }
.tip::after { content: ""; position: absolute; left: var(--arrow-x, 14px); width: 8px; height: 8px; background: #333; transform: rotate(45deg); }
.tip.above::after { bottom: -4px; }
.tip.below::after { top: -4px; }

/* Profiles */
.profile-row { display: flex; gap: 8px; }
.profile-row select, .ed-select, .select {
  flex: 1; min-width: 0; width: 100%; padding: 8px 32px 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text);
  appearance: none; -webkit-appearance: none; cursor: pointer; font-weight: 500; font-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5l3.5 3.5 3.5-3.5' fill='none' stroke='%23877E74' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.profile-row select:focus, .ed-select:focus, .select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 2px var(--bg-accent); }
.profile-tools { display: flex; gap: 14px; margin-top: 8px; }
.linkbtn { border: 0; background: none; padding: 0; font-size: 12px; color: var(--muted); cursor: pointer; }
.linkbtn:hover { color: var(--green-dark); text-decoration: underline; }
.linkbtn.danger:hover { color: var(--danger); }
.linkbtn:disabled { opacity: .4; cursor: default; text-decoration: none; }
.linkbtn.confirm { color: var(--danger); font-weight: 500; }
.profile-edit { display: flex; gap: 6px; margin-top: 10px; }
.profile-edit input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; outline: none; background: var(--card); color: var(--text); }
.profile-edit input:focus { border-color: var(--green); box-shadow: 0 0 0 2px var(--bg-accent); }

/* Segmented controls */
.seg { display: flex; flex-wrap: wrap; gap: 3px; background: var(--bg-accent); border-radius: 8px; padding: 3px; }
.seg button { flex: 1 1 auto; min-width: 52px; border: 0; background: transparent; border-radius: 6px; padding: 8px 8px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--card); color: var(--green-dark); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
:root[data-theme="dark"] .seg button.active, :root:not([data-theme="light"]) .seg button.active { color: var(--green-dark); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .seg button.active { color: var(--green-dark); } }
.seg-sm button { padding: 6px 6px; font-size: 12px; }
.seg button.wide { flex-basis: 100%; }

.mode-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.mode-fields .field { margin-top: 0; }
.field[data-for="percent"] { grid-column: 1 / -1; }
.field.disabled { opacity: .45; pointer-events: none; }
.input-suffix { position: relative; display: block; }
.input-suffix input { width: 100%; padding: 9px 36px 9px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.input-suffix input:focus { border-color: var(--green); box-shadow: 0 0 0 2px var(--bg-accent); }
.input-suffix input:read-only { color: var(--muted-light); background: var(--bg); }
.input-suffix em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--muted-light); }
input[type=number]::-webkit-inner-spin-button { opacity: .5; }

.hint { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.hint strong { color: var(--text); }
.check { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--green); margin: 0; }

.disclosure { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; }
.disclosure h3 { margin: 0; }
.disclosure .chev { width: 8px; height: 8px; border-right: 2px solid var(--muted-light); border-bottom: 2px solid var(--muted-light); transform: rotate(45deg); transition: transform .15s; margin-right: 4px; }
.disclosure[aria-expanded="true"] .chev { transform: rotate(-135deg); }
#advBody .field:first-child { margin-top: 14px; }

/* Quality slider */
.steps { position: relative; padding: 6px 0 2px; }
.steps input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; --ticks: radial-gradient(circle, var(--border) 2.2px, transparent 2.6px); }
.steps input[type=range]::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: var(--border); background-image: var(--ticks), var(--ticks), var(--ticks), var(--ticks), var(--ticks); background-size: 8px 8px; background-repeat: no-repeat; background-position: 0 -3px, 25% -3px, 50% -3px, 75% -3px, 100% -3px; }
.steps input[type=range]::-moz-range-track { height: 2px; border-radius: 2px; background: var(--border); }
.steps input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; border-radius: 3px; background: var(--green); border: 2px solid var(--green); box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 6px #9fe9c9; transition: transform .1s; }
.steps input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 3px; background: var(--green); border: 2px solid var(--green); box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 6px #9fe9c9; }
.steps input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.12); }
.steps input[type=range]:focus-visible { outline: none; }
.steps-field > span { display: flex; justify-content: space-between; align-items: center; }
.steps-field output { color: var(--text); font-weight: 500; }

/* Buttons */
.btn { border: 1px solid transparent; border-radius: 6px; padding: 10px 16px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--green-strong); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--green-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:not(:disabled):hover { background: var(--bg-accent); }
/* Store link that is not live yet (site.js storeLinks / WP_ORG_LIVE): looks like the button, does nothing. */
.btn.is-soon { background: transparent; border: 1px dashed currentColor; color: inherit; cursor: default; pointer-events: none; transform: none; }
.btn-apply { width: 100%; margin-top: 16px; background: var(--text); color: var(--card); white-space: normal; line-height: 1.35; text-wrap: balance; }
.btn-apply:hover { opacity: .9; }
.btn-small { padding: 7px 12px; font-size: 13px; }
.icon-btn { border: 0; background: transparent; color: var(--muted-light); font-size: 20px; line-height: 1; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; }
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* Decorative corner marks (resizing.app style) */
.corner { position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 2; }
.corner::before, .corner::after { content: ""; position: absolute; background: var(--green); border-radius: 2px; }
.corner.tr { top: -8px; right: -8px; }
.corner.tr::before { top: 0; right: 0; width: 22px; height: 3px; }
.corner.tr::after { top: 0; right: 0; width: 3px; height: 22px; }
.corner.bl { bottom: -8px; left: -8px; }
.corner.bl::before { bottom: 0; left: 0; width: 22px; height: 3px; }
.corner.bl::after { bottom: 0; left: 0; width: 3px; height: 22px; }

/* Dropzone */
.dropzone { position: relative; min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer; outline: none; color: var(--ring); transition: min-height .25s ease, color .2s; }
.dropzone.compact { min-height: 230px; }
.dropzone:hover, .dropzone:focus-visible { color: var(--muted-light); }
.dropzone.over { color: var(--green); }
.dropzone .corner { opacity: 0; transition: opacity .2s; }
.dropzone:hover .corner, .dropzone.over .corner { opacity: 1; }
.rings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: var(--radius); }
.drop-inner { position: relative; display: flex; align-items: center; gap: 24px; }
.plus { position: relative; width: 58px; height: 58px; border-radius: 50%; background: var(--green); flex: none; transition: transform .15s, background .15s; box-shadow: 0 6px 18px rgba(2, 200, 115, .35); }
.plus::before, .plus::after { content: ""; position: absolute; background: #fff; border-radius: 2px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.plus::before { width: 24px; height: 3.5px; } .plus::after { width: 3.5px; height: 24px; }
.dropzone:hover .plus { transform: scale(1.06); background: var(--green-hover); }
.dropzone.over .plus { transform: scale(1.12); }
.drop-text { font-size: 18px; color: var(--text); }
.touch-only { display: none; }
.drop-text .link { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.drop-sub { position: relative; font-size: 12px; color: var(--muted-light); text-align: center; padding: 0 16px; line-height: 1.5; }
.drop-sub.limits { margin-top: -8px; }
.drop-sub.limits:empty { display: none; }
.dropzone.compact .drop-sub { display: none; }

/* Results / history */
.results, .history { margin-top: 20px; overflow: hidden; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
.results-summary { font-size: 14px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.results-summary strong { color: var(--text); }
.results-summary .saved { color: var(--green-dark); font-weight: 500; }
.results-summary .done-pill { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 12px; font-weight: 500; }
.results-summary .done-pill::before { content: "✓"; font-size: 11px; }
.results-actions { display: flex; gap: 8px; }
.progress { height: 3px; background: var(--bg-accent); }
.progress .bar { height: 100%; width: 0; background: var(--green); transition: width .25s; }
.list { list-style: none; margin: 0; padding: 0; }
.list-hint { margin: 0; padding: 10px 20px; font-size: 12px; color: var(--muted-light); border-top: 1px solid var(--bg-accent); }
.list-hint strong { color: var(--text); }

.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--bg-accent); animation: rowin .25s ease-out; }
@keyframes rowin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.row.error { background: var(--danger-soft); }

.thumb { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; position: relative; border: 0; padding: 0; cursor: pointer; font: inherit; background: var(--bg-accent);
  background-image: linear-gradient(45deg, var(--check-a) 25%, transparent 25%), linear-gradient(-45deg, var(--check-a) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--check-a) 75%), linear-gradient(-45deg, transparent 75%, var(--check-a) 75%);
  background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; }
.thumb.static { cursor: default; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; }
.thumb img.ready { opacity: 1; }
.thumb-edit { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(2, 200, 115, .9); opacity: 0; transition: opacity .15s; }
.thumb:hover .thumb-edit { opacity: 1; }
/* PDFs: no preview or editor, a label instead */
.row.pdf .thumb { cursor: default; }
.row.pdf .thumb img, .row.pdf .thumb-edit, .row.pdf .actions .edit { display: none; }
.row.pdf.done .thumb::after, .row.pdf.error .thumb::after { content: 'PDF'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.spinner { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.55); }
.spinner::after { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(2, 200, 115, .25); border-top-color: var(--green); animation: spin .7s linear infinite; }
.row.done .spinner, .row.error .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.rowinfo { min-width: 0; }
.name-wrap { min-width: 0; }
.name { display: block; max-width: 100%; border: 0; background: none; padding: 2px 6px; margin-left: -6px; border-radius: 4px; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; color: var(--text); }
button.name:hover { background: var(--bg-accent); }
button.name::after { content: " ✎"; color: var(--muted-light); font-weight: 400; opacity: 0; }
button.name:hover::after { opacity: 1; }
.actions .redo { display: inline-flex; align-items: center; gap: 5px; }
.actions .redo svg { width: 14px; height: 14px; }
.name-edit { display: flex; align-items: center; gap: 2px; }
.name-input { flex: 0 1 auto; min-width: 120px; max-width: 100%; padding: 2px 6px; border: 1px solid var(--green); border-radius: 4px; outline: none; font-weight: 500; box-shadow: 0 0 0 2px var(--bg-accent); background: var(--card); color: var(--text); }
.name-ext { font-weight: 500; color: var(--muted); }
.meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 3px; flex-wrap: wrap; }
.meta > span:empty { display: none; }
.meta .arrow { color: var(--muted-light); }
.meta .down { color: var(--green-dark); font-weight: 500; }
.meta .up, .meta .warn { color: var(--warn-fg); font-weight: 500; }
.row-progress { height: 3px; border-radius: 2px; background: var(--bg-accent); margin-top: 8px; overflow: hidden; }
.row-progress .bar { height: 100%; width: 0; background: var(--green); transition: width .2s; }
.row.done .row-progress, .row.error .row-progress { display: none; }
.status { font-size: 12px; color: var(--muted); margin-top: 5px; }
.status:empty { display: none; }
.row.error .status { color: var(--danger); }
.actions { display: flex; align-items: center; gap: 8px; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 7px; border-radius: 4px; background: var(--bg-accent); color: var(--muted); text-transform: uppercase; }
.badge:empty { display: none; }
.row.done .badge { background: var(--green-soft); color: var(--green-dark); }
.badge.custom, .row.done .badge.custom { background: var(--warn-bg); color: var(--warn-fg); cursor: help; }
.btn.edit { display: inline-flex; align-items: center; gap: 6px; }
.btn.edit svg { width: 14px; height: 14px; }
.btn.edit:hover { border-color: var(--green); color: var(--green-dark); }


/* Editor */
.editor { position: fixed; inset: 0; height: 100dvh; z-index: 50; background: var(--overlay); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.editor-card { display: flex; flex-direction: column; width: min(1180px, 100%); height: min(780px, 100%); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-modal); overflow: hidden; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--bg-accent); }
.editor-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.editor-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.editor-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; flex: 1; min-height: 0; }
.editor-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; background: var(--bg); min-width: 0; overflow: hidden; }
.stage-wrap { position: relative; line-height: 0; user-select: none; box-shadow: 0 4px 20px rgba(0, 0, 0, .12); }
.stage-wrap img { display: block; max-width: 100%; }
.stage-info { flex: none; margin-top: 16px; font-size: 11px; line-height: 1.4; color: var(--muted); background: var(--card); padding: 3px 8px; border-radius: 4px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-info:empty { visibility: hidden; }
.editor-panel { padding: 18px 20px; overflow-y: auto; border-left: 1px solid var(--bg-accent); }
.editor-panel .group { padding: 16px 0; }
.editor-intro { margin: 10px 0 2px; }
.crop-pill { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 12px; border-radius: 6px; background: var(--green-soft); color: var(--green-dark); font-size: 12px; font-weight: 500; }
.crop-pill .linkbtn { font-size: 12px; }
.ed-crop-actions { display: flex; gap: 8px; margin-top: 14px; }
.ed-crop-actions .btn { flex: 1; }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--bg-accent); background: var(--card); }
.editor-foot .linkbtn { margin: 0; }
.editor-foot-actions { display: flex; gap: 8px; margin-left: auto; }

/* Cropper */
.cropper { position: absolute; inset: 0; touch-action: none; z-index: 3; }
.crop-box { position: absolute; box-shadow: 0 0 0 9999px var(--crop-shade); outline: 1px solid #fff; cursor: move; touch-action: none; --g: rgba(255,255,255,.7);
  background-image:
    linear-gradient(to right, transparent calc(33.333% - .5px), var(--g) calc(33.333% - .5px), var(--g) calc(33.333% + .5px), transparent calc(33.333% + .5px), transparent calc(66.667% - .5px), var(--g) calc(66.667% - .5px), var(--g) calc(66.667% + .5px), transparent calc(66.667% + .5px)),
    linear-gradient(to bottom, transparent calc(33.333% - .5px), var(--g) calc(33.333% - .5px), var(--g) calc(33.333% + .5px), transparent calc(33.333% + .5px), transparent calc(66.667% - .5px), var(--g) calc(66.667% - .5px), var(--g) calc(66.667% + .5px), transparent calc(66.667% + .5px)); }
.crop-box .h { position: absolute; width: 10px; height: 10px; background: #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.crop-box .h[data-h="nw"], .crop-box .h[data-h="ne"], .crop-box .h[data-h="sw"], .crop-box .h[data-h="se"] { background: var(--green); }
.crop-box .h[data-h="nw"] { left: -5px; top: -5px; cursor: nwse-resize; }
.crop-box .h[data-h="n"] { left: calc(50% - 5px); top: -5px; cursor: ns-resize; }
.crop-box .h[data-h="ne"] { right: -5px; top: -5px; cursor: nesw-resize; }
.crop-box .h[data-h="w"] { left: -5px; top: calc(50% - 5px); cursor: ew-resize; }
.crop-box .h[data-h="e"] { right: -5px; top: calc(50% - 5px); cursor: ew-resize; }
.crop-box .h[data-h="sw"] { left: -5px; bottom: -5px; cursor: nesw-resize; }
.crop-box .h[data-h="s"] { left: calc(50% - 5px); bottom: -5px; cursor: ns-resize; }
.crop-box .h[data-h="se"] { right: -5px; bottom: -5px; cursor: nwse-resize; }


/* Toast */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); max-width: calc(100% - 32px); text-align: center; transform: translate(-50%, 20px); background: #333; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Explanation sections ---------- */
.explain { padding: 56px 20px; }
.explain.features { background: radial-gradient(ellipse 70% 45% at 50% 62%, var(--glow-low), transparent 72%), linear-gradient(180deg, var(--bg) 0, var(--bg-accent) 100%); }
.explain-inner { max-width: 1000px; margin: 0 auto; }
.explain-title { font-size: 28px; font-weight: 700; text-align: center; margin: 0; }
.explain-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 10px auto 0; font-size: 15px; line-height: 1.5; }

/* How it works */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
.step { text-align: center; }
.step h3 { justify-content: center; font-size: 13px; color: var(--text); margin: 22px 0 8px; }
.step p { margin: 0 auto; max-width: 280px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.mini { position: relative; width: 190px; height: 150px; margin: 0 auto; background: var(--card); border-radius: 8px; box-shadow: var(--shadow), 0 6px 18px rgba(0, 0, 0, .08); }
.mini::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; background: linear-gradient(135deg, rgba(2, 200, 115, .12), rgba(2, 200, 115, .03)); border-radius: 10px; z-index: -1; }
.mini-bar { display: flex; gap: 4px; padding: 8px 10px; }
.mini-bar i { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.mini-bar i:nth-child(1) { background: #ff5f57; } .mini-bar i:nth-child(2) { background: #febc2e; } .mini-bar i:nth-child(3) { background: #28c840; }
.mini-body { position: relative; margin: 0 10px; height: 110px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.mini-upload { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ring); }
.mini-rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-plus { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--green); flex: none; }
.mini-plus::before, .mini-plus::after { content: ""; position: absolute; background: #fff; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.mini-plus::before { width: 8px; height: 1.6px; } .mini-plus::after { width: 1.6px; height: 8px; }
.mini-text { position: relative; font-size: 10px; color: var(--text); }
.mini-text em { font-style: normal; color: var(--green-dark); text-decoration: underline; }
.mini-photo { width: 100%; height: 100%; display: block; }
.mini-float { position: absolute; border-radius: 6px; background: var(--card); box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
.mini-float.photo { right: -22px; bottom: -18px; width: 78px; height: 56px; overflow: visible; }
.mini-float.photo svg { width: 100%; height: 100%; border-radius: 6px; display: block; }
.mini-badge { position: absolute; right: -8px; bottom: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-strong); color: #fff; font-size: 14px; line-height: 20px; text-align: center; font-weight: 700; }
.mini-float.card { right: -22px; bottom: -14px; width: 96px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.mini-seg { display: flex; gap: 3px; background: var(--bg-accent); padding: 2px; border-radius: 4px; }
.mini-seg i { flex: 1; height: 8px; border-radius: 3px; } .mini-seg i.on { background: var(--card); box-shadow: 0 0 0 1px var(--green) inset; }
.mini-slider { position: relative; height: 2px; background: var(--border); margin: 4px 2px; }
.mini-slider b { position: absolute; left: 40%; top: -4px; width: 10px; height: 10px; background: var(--green); border-radius: 2px; box-shadow: inset 0 0 0 2px var(--card); }
.mini-btn { height: 12px; border-radius: 3px; background: var(--green); }
.mini-done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.mini-check { font-size: 11px; font-weight: 700; color: var(--green-dark); background: var(--green-soft); padding: 4px 10px; border-radius: 999px; }
.mini-file { font-size: 9px; color: var(--muted); }
.mini-float.folder { right: -22px; bottom: -16px; width: 56px; height: 56px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); }
.mini-float.folder svg { width: 26px; height: 26px; }

/* Features */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 72px; }
.feature.reverse .feature-text { order: 2; }
.feature.reverse .feature-ill { order: 1; }
.feature-text h3 { font-size: 16px; color: var(--text); text-transform: none; letter-spacing: 0; margin-bottom: 12px; }
.feature-text p { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.feature-ill { position: relative; padding: 18px 18px 46px 18px; }
.feature.reverse .feature-ill { padding: 18px 18px 46px 18px; }
.ill-photo { position: relative; aspect-ratio: 3 / 2; border-radius: 8px; overflow: visible; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.ill-photo > svg { width: 100%; height: 100%; display: block; border-radius: 8px; }
.ill-photo .corner { opacity: 1; }
.ill-photo .corner.tr { top: -12px; right: -12px; } .ill-photo .corner.bl { bottom: -12px; left: -12px; }
.ill-photo svg.hue { filter: hue-rotate(-30deg) saturate(1.1); }
.ill-photo svg.hue2 { filter: hue-rotate(-10deg) saturate(.95); }
.ill-split { position: absolute; top: 0; bottom: 0; left: 55%; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.ill-photo.split > svg { -webkit-mask: linear-gradient(90deg, #000 55%, rgba(0,0,0,.5) 55%); mask: linear-gradient(90deg, #000 55%, rgba(0,0,0,.5) 55%); }
.ill-split-knob { position: absolute; top: -14px; left: calc(55% - 8px); width: 16px; height: 16px; background: var(--green); border-radius: 3px; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 6px #9fe9c9; }
.ill-cropbox { position: absolute; left: 14%; top: 16%; width: 66%; height: 62%; outline: 1px solid #fff; box-shadow: 0 0 0 9999px rgba(255, 255, 255, .35); border-radius: 2px; clip-path: none; }
.ill-clip { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; }
.ill-clip > svg { width: 100%; height: 100%; display: block; }
.ill-cropbox i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.ill-cropbox i.nw { left: -4px; top: -4px; } .ill-cropbox i.ne { right: -4px; top: -4px; } .ill-cropbox i.sw { left: -4px; bottom: -4px; } .ill-cropbox i.se { right: -4px; bottom: -4px; }
.ill-card { position: absolute; right: -6px; bottom: 6px; width: 236px; padding: 14px; border-radius: 8px; background: var(--card); box-shadow: 0 14px 34px rgba(0, 0, 0, .18); z-index: 2; }
.ill-card.left { right: auto; left: -6px; }
.ill-card.top { bottom: auto; top: -8px; right: -6px; }
.ill-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.ill-select { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; margin-bottom: 8px; }
.ill-select i { width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.ill-wh { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); }
.ill-wh span:not(.link-ico) { flex: 1; padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; white-space: nowrap; }
.ill-wh b { color: var(--text); font-weight: 500; }
.link-ico { color: var(--muted-light); font-size: 10px; }
.ill-slider { position: relative; height: 2px; background: var(--border); margin: 12px 4px 6px; }
.ill-slider b { position: absolute; left: 84%; top: -7px; width: 14px; height: 14px; background: var(--green); border-radius: 3px; box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 5px #9fe9c9; }
.ill-slider-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-light); }
.ill-formats { display: flex; gap: 3px; background: var(--bg-accent); padding: 3px; border-radius: 6px; }
.ill-formats span { flex: 1; text-align: center; font-size: 11px; font-weight: 500; color: var(--muted); padding: 5px 0; border-radius: 4px; }
.ill-formats span.on { background: var(--card); color: var(--green-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.ill-arrow { position: absolute; top: 22px; right: 220px; width: 90px; height: 40px; z-index: 3; }

.results-head .info { margin-left: 8px; }

/* Simplified sidebar */
.settings .group { padding: 14px 0; }
.settings h3 { margin-bottom: 8px; }
.settings .mode-fields { margin-top: 10px; }
.settings .check { margin-top: 10px; }
.settings .info { opacity: .55; }
.settings .group:hover .info, .settings .info:focus-visible { opacity: 1; }
.seg-row { flex-wrap: nowrap; }
.seg-row button { min-width: 0; padding: 7px 4px; font-size: 12px; }
.btn-icon { padding: 7px 10px; font-weight: 700; letter-spacing: .1em; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; padding: 6px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); z-index: 25; }
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.menu-item:hover { background: var(--bg-accent); }
.menu-item:disabled { opacity: .4; cursor: default; background: none; }
.menu-item.danger { color: var(--danger); }
.menu-item.confirm { background: var(--danger-soft); font-weight: 500; }

/* ---------- Hero above the tool ---------- */
.hero { text-align: center; max-width: 760px; margin: 40px auto 6px; padding: 0 20px; }
.hero h1 { font-size: 36px; letter-spacing: -.02em; }
.hero p { font-size: 16px; margin-top: 10px; }

/* ---------- Step hover fun ---------- */
.step .mini { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.step:hover .mini { transform: translateY(-6px) rotate(-1.5deg); box-shadow: var(--shadow), 0 18px 36px rgba(0, 0, 0, .14); }
.step .mini-float { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.step:hover .mini-float { transform: translate(6px, 6px) rotate(3deg); }
.step:hover .mini-plus { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.step:hover .mini-rings { animation: spin 14s linear infinite; }
.step:hover .mini-slider b { animation: slide 1.6s ease-in-out infinite alternate; }
@keyframes slide { from { left: 15%; } to { left: 80%; } }
.step:hover .mini-btn { animation: press .8s ease-in-out infinite alternate; }
@keyframes press { from { transform: scaleX(1); opacity: 1; } to { transform: scaleX(.94); opacity: .8; } }
.step:hover .mini-check { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.step:hover .mini-float.folder svg { animation: drop .9s ease-in-out infinite; }
@keyframes drop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.step h3 { transition: color .2s; }
.step:hover h3 { color: var(--green-dark); }

/* ---------- Interactive demos ---------- */
.try { color: var(--green-dark) !important; font-size: 13px !important; font-weight: 500; }
.try::before { content: "→ "; }
.demo { user-select: none; }
.ill-select-real { width: 100%; padding: 7px 28px 7px 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--card); color: var(--text); font-size: 12px; appearance: none; -webkit-appearance: none; cursor: pointer; margin-bottom: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5l3.5 3.5 3.5-3.5' fill='none' stroke='%23877E74' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.ill-select-real:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 2px var(--bg-accent); }
.ill-wh.real label { flex: 1; display: flex; align-items: center; gap: 4px; padding: 0 6px; border: 1px solid var(--border); border-radius: 5px; font-size: 11px; color: var(--muted); background: var(--card); }
.ill-wh.real label:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px var(--bg-accent); }
.ill-wh.real input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 12px; font-weight: 500; padding: 6px 0; text-align: right; -moz-appearance: textfield; appearance: textfield; }
.ill-wh.real input::-webkit-inner-spin-button, .ill-wh.real input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ill-wh.real input:read-only { color: var(--muted-light); }
.ill-wh.real em { font-style: normal; color: var(--muted-light); }
.demo-range { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 6px 0 0; background: transparent; cursor: pointer; }
.demo-range::-webkit-slider-runnable-track { height: 2px; background: var(--border); border-radius: 2px; }
.demo-range::-moz-range-track { height: 2px; background: var(--border); border-radius: 2px; }
.demo-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 3px; background: var(--green); box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 5px #9fe9c9; }
.demo-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 3px; background: var(--green); box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 5px #9fe9c9; }

/* Resize demo */
#demoResize { min-height: 0; }
.ill-ghost { position: absolute; left: 18px; right: 18px; top: 18px; aspect-ratio: 3 / 2; border: 1.5px dashed color-mix(in srgb, var(--muted-light) 70%, transparent); border-radius: 8px; }
.ill-ghost-dim { position: absolute; right: 8px; top: 6px; font-size: 10px; color: var(--muted); background: var(--card); padding: 1px 6px; border-radius: 4px; }
.ill-photo.scaled { transform-origin: top left; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.ill-dim { position: absolute; left: 10px; bottom: 10px; transform-origin: bottom left; white-space: nowrap; font-size: 11px; font-weight: 500; color: #fff; background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 4px; backdrop-filter: blur(4px); }

/* Optimize demo (before / after) */
.ill-photo.cmp { cursor: ew-resize; }
.ill-photo.cmp .ill-clip > svg { -webkit-mask: none; mask: none; }
.cmp-after { position: absolute; inset: 0; clip-path: inset(0 0 0 55%); }
.cmp-after svg { width: 100%; height: 100%; display: block; transition: filter .15s; }
.cmp-label { position: absolute; top: 10px; font-size: 11px; font-weight: 500; color: #fff; background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 4px; backdrop-filter: blur(4px); pointer-events: none; }
.cmp-label.l { left: 10px; } .cmp-label.r { right: 10px; }
.ill-photo.cmp .ill-split { left: 55%; cursor: ew-resize; }
.ill-photo.cmp .ill-split-knob { top: 50%; left: calc(55% - 8px); margin-top: -8px; cursor: ew-resize; pointer-events: none; }
.ill-photo.cmp .ill-split, .ill-photo.cmp .ill-split-knob { transition: none; }

/* Convert demo */
.fmt-badge { position: absolute; left: 10px; bottom: 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--green-strong); padding: 4px 9px; border-radius: 4px; box-shadow: 0 4px 12px rgba(2, 200, 115, .4); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.fmt-badge.bump { animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.ill-formats.real button { flex: 1; border: 0; background: transparent; font-size: 11px; font-weight: 500; color: var(--muted); padding: 5px 0; border-radius: 4px; cursor: pointer; font-family: inherit; }
.ill-formats.real button:hover { color: var(--text); }
.ill-formats.real button.on { background: var(--card); color: var(--green-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.ill-size { margin-top: 10px; font-size: 11px; color: var(--muted); }
.ill-size b.down { color: var(--green-dark); font-weight: 500; }
.ill-size b.up { color: var(--warn-fg); font-weight: 500; }
.ill-arrow-path { stroke-dashoffset: 0; }
.ill-arrow.go .ill-arrow-path { animation: dash .6s linear; }
@keyframes dash { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
#dcSvg { transition: filter .35s; }

/* Crop demo */
.ill-cropbox.live { cursor: move; touch-action: none; left: 0; top: 0; width: 0; height: 0; }
.ill-cropbox.live i { width: 12px; height: 12px; cursor: nwse-resize; touch-action: none; }
.ill-cropbox.live i[data-h="ne"], .ill-cropbox.live i[data-h="sw"] { cursor: nesw-resize; }
.ill-cropbox.live i[data-h="nw"] { left: -6px; top: -6px; } .ill-cropbox.live i[data-h="ne"] { right: -6px; top: -6px; }
.ill-cropbox.live i[data-h="sw"] { left: -6px; bottom: -6px; } .ill-cropbox.live i[data-h="se"] { right: -6px; bottom: -6px; }
#dkStage { touch-action: none; }

/* Footer credit */
.footer-by { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-by:hover { color: var(--text); }
.bb-logo { height: 34px; width: auto; display: block; margin: -6px 0; }
.bb-logo.dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bb-logo.light { display: none; } :root:not([data-theme="light"]) .bb-logo.dark { display: block; } }
:root[data-theme="dark"] .bb-logo.light { display: none; } :root[data-theme="dark"] .bb-logo.dark { display: block; }
.footer-inner { gap: 10px 28px; }

/* =====================================================================
   Responsive / mobile-first layer
   Base styles above target phones first in content and flow; the rules
   here adapt spacing, columns and hit targets per viewport and input.
   ===================================================================== */

/* --- Mobile settings sheet (hidden on desktop) --- */
.settings-toggle, .sheet-head, .sheet-foot, .mobile-hint { display: none; }
@keyframes sheetin { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- Touch input: larger targets, no drag/paste hints --- */
@media (hover: none) and (pointer: coarse) {
  .mouse-only { display: none !important; }
  .touch-only { display: block; }
  .drop-text.touch-only { display: inline; }
  .info { width: 20px; height: 20px; font-size: 11px; margin-left: 8px; }
  .info::after { content: ""; position: absolute; inset: -8px; }
  .info { position: relative; }
  .crop-box .h::before, .ill-cropbox.live i::before { content: ""; position: absolute; inset: -14px; }
  .crop-box .h, .ill-cropbox.live i { width: 14px; height: 14px; }
  .crop-box .h[data-h="nw"] { left: -7px; top: -7px; } .crop-box .h[data-h="n"] { left: calc(50% - 7px); top: -7px; } .crop-box .h[data-h="ne"] { right: -7px; top: -7px; }
  .crop-box .h[data-h="w"] { left: -7px; top: calc(50% - 7px); } .crop-box .h[data-h="e"] { right: -7px; top: calc(50% - 7px); }
  .crop-box .h[data-h="sw"] { left: -7px; bottom: -7px; } .crop-box .h[data-h="s"] { left: calc(50% - 7px); bottom: -7px; } .crop-box .h[data-h="se"] { right: -7px; bottom: -7px; }
  .ill-cropbox.live i[data-h="nw"] { left: -7px; top: -7px; } .ill-cropbox.live i[data-h="ne"] { right: -7px; top: -7px; }
  .ill-cropbox.live i[data-h="sw"] { left: -7px; bottom: -7px; } .ill-cropbox.live i[data-h="se"] { right: -7px; bottom: -7px; }
  .ill-split-knob { width: 22px; height: 22px; }
  .ill-photo.cmp .ill-split-knob { left: calc(55% - 11px); margin-top: -11px; }
  button.name::after { opacity: 1; }
  .settings .info { opacity: .8; }
  .toggle button, .toggle a { height: 34px; min-width: 34px; }
  .btn-small { padding: 9px 12px; }
  .icon-btn { width: 36px; height: 36px; }
  .linkbtn { padding: 6px 0; }
  .step:hover .mini { transform: none; }
}

/* --- Large tablets / small laptops --- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr); gap: 20px; }
}

/* --- Tablets and below: single column, settings collapse --- */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 16px auto 32px; padding: 0 16px; }
  .hero { margin: 24px auto 2px; padding: 0 16px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .settings { position: static; padding: 0; }
  .settings-title { display: none; }
  .settings-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--radius); }
  .settings-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
  .settings-toggle .st-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .settings-toggle .st-title { font-weight: 700; font-size: 15px; }
  .settings-toggle .st-summary { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .settings-toggle .chev { width: 9px; height: 9px; flex: none; border-right: 2px solid var(--muted-light); border-bottom: 2px solid var(--muted-light); transform: rotate(45deg); transition: transform .15s; margin: 0 6px 4px 0; }
  .settings-toggle[aria-expanded="true"] .chev { transform: rotate(-135deg); margin-bottom: -2px; }
  .settings-body { display: none; }
  .settings.open .settings-body { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; max-height: calc(100dvh - max(40px, 6vh)); z-index: 46; background: var(--card); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-modal); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 20px; animation: sheetin .25s cubic-bezier(.2, .8, .2, 1); }
  .settings.open::after { content: ""; position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(2px); z-index: 45; }
  .sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin: 0 -20px; padding: 12px 12px 12px 20px; background: var(--card); border-bottom: 1px solid var(--bg-accent); }
  .sheet-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border); }
  .sheet-title { font-weight: 700; font-size: 16px; padding-top: 4px; }
  .sheet-foot { display: block; position: sticky; bottom: 0; margin: auto -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--bg-accent); }
  .sheet-foot .btn { width: 100%; }
  .settings-body .group:first-of-type { border-top: 0; }
  .settings .btn-apply { width: calc(100% - 32px); margin: 0 16px 16px; }
  html.sheet-open, html.sheet-open body { overflow: hidden; }
  .menu { right: 0; }

  /* Native-size inputs stop iOS from zooming on focus */
  .select, .ed-select, .input-suffix input, .profile-edit input, .name-input, .profile-row select { font-size: 16px; }

  .results-head { padding: 14px 16px; }
  .row { padding: 12px 16px; gap: 12px; }
  .list-hint { padding: 10px 16px; }

  .explain { padding: 40px 16px; }
  .explain-title { font-size: 24px; }
  .explain-sub { font-size: 14px; }
  .steps3 { gap: 36px; margin-top: 32px; }
  .explain .feature { margin-top: 44px; }
}

/* --- Features section stacks; demo cards sit under the photo --- */
@media (max-width: 760px) {
  .steps3 { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 20px; }
  .feature.reverse .feature-text { order: 1; }
  .feature.reverse .feature-ill { order: 2; }
  .feature-text h3 { margin-bottom: 8px; }
  .feature-text p { font-size: 14px; }
  .feature-ill, .feature.reverse .feature-ill { padding: 14px 14px 0; }
  .ill-ghost { left: 14px; right: 14px; top: 14px; }
  .ill-arrow { display: none; }
  .ill-card, .ill-card.left, .ill-card.top { position: static; width: 100%; margin-top: 18px; right: auto; left: auto; bottom: auto; top: auto; }
  .ill-select-real, .ill-wh.real input { font-size: 16px; }
  .ill-wh.real label { padding: 0 8px; }
}

/* --- Phones --- */
@media (max-width: 560px) {
  .topbar-inner { padding: 10px 16px; gap: 10px; }
  .brand { gap: 9px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-name { font-size: 15px; }
  .brand-tag { display: none; }
  .topbar-right { gap: 6px; }
  .toggle button, .toggle a { padding: 0 7px; font-size: 11px; }
  .hero { margin-top: 20px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; margin-top: 8px; }

  .dropzone { min-height: 300px; border-radius: var(--radius); }
  .dropzone.compact { min-height: 170px; }
  .drop-inner { flex-direction: column; gap: 14px; text-align: center; padding: 0 16px; }
  .drop-text { font-size: 16px; }
  .plus { width: 52px; height: 52px; }

  .results-summary { font-size: 13px; }
  .results-actions { width: 100%; flex-direction: column; }
  .results-actions .btn { min-width: 0; white-space: normal; }



  .footer-inner { padding: 22px 16px 28px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-text { flex: none; }
  .mini { width: 170px; height: 136px; }
  .mini-body { height: 96px; }
}


/* --- Result rows follow the width of their card, not the viewport ---
   Narrow card (phones, and the work column next to the sidebar on small laptops):
   thumb + text on top, remove at top right, badges under the text, buttons across the bottom. */
.results, .history { container-type: inline-size; }
@container (max-width: 700px) {
  /* thumb + name + remove on one line, full-width meta with the format badge at the right, two buttons */
  .row { grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) 36px; grid-template-areas: "thumb name name remove" "meta meta meta meta" "prog prog prog prog" "status status status status" "edit edit dl dl"; gap: 0 12px; align-items: center; padding: 12px 12px 14px 16px; }
  .row.hist { grid-template-areas: "thumb name name remove" "meta meta meta meta" "redo redo dl dl"; }
  .actions .redo { grid-area: redo; justify-content: center; margin-right: 4px; }
  .rowinfo, .actions, .name-wrap { display: contents; }
  .thumb { grid-area: thumb; width: 52px; height: 52px; }
  .name { grid-area: name; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; margin: 0; padding: 0; font-size: 15px; }
  button.name::after { opacity: 1; font-size: 13px; }
  .nm-ext { display: none; }
  .name-edit { grid-area: name; }
  .actions .remove { grid-area: remove; width: 36px; height: 36px; margin: 0 -4px 0 0; align-self: start; }
  .meta { grid-area: meta; margin-top: 12px; gap: 6px 10px; padding-right: 64px; min-height: 18px; align-items: center; }
  .actions .badge { grid-area: meta; justify-self: end; align-self: start; margin-top: 12px; }
  .actions .badge.custom { margin-top: 36px; }
  .row-progress { grid-area: prog; margin-top: 10px; }
  .status { grid-area: status; margin-top: 8px; }
  .status:empty { display: none; }
  .row.done .row-progress, .row.error .row-progress { display: none; }
  .actions .btn.edit { grid-area: edit; justify-content: center; margin-right: 4px; }
  .actions .btn.pages { grid-area: edit; display: inline-flex; align-items: center; justify-content: center; margin-right: 4px; }
  .actions .dl { grid-area: dl; margin-left: 4px; }
  .actions .btn { padding: 10px 12px; margin-top: 12px; }
  .row.hist .actions .dl { margin-left: 0; }
}
@media (max-width: 900px) {
  .row { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .row:active { background: var(--bg-accent); }
  .desktop-hint { display: none; }
  .mobile-hint { display: block; }
}

/* --- Editor stacked: phones, and tablets held upright --- */
@media (max-width: 560px), (max-width: 900px) and (orientation: portrait) {
  .editor { padding: 0; }
  .editor-card { height: 100%; border-radius: 0; }
  .editor-head { padding: 10px 14px; }
  .editor-title { flex-direction: column; gap: 1px; }
  .editor-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .editor-stage { padding: 12px; }
  .stage-info { margin-top: 12px; }
  /* Cropping on a small screen: the crop panel has its own Apply / Cancel, so give the image the room */
  .editor.cropping .editor-foot, .editor.cropping .editor-intro, .editor.cropping #edPanelCrop .hint { display: none; }
  .editor.cropping .editor-panel { max-height: none; }
  .editor.cropping #edPanelCrop .group { padding-bottom: 4px; }
  .editor-panel { border-left: 0; border-top: 1px solid var(--bg-accent); max-height: 52vh; padding: 12px 14px; }
  .editor-panel .group { padding: 12px 0; }
  .editor-foot { flex-wrap: wrap; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .editor-foot .linkbtn { width: 100%; text-align: center; }
  .editor-foot-actions { width: 100%; margin-left: 0; }
  .editor-foot-actions .btn { flex: 1; padding: 10px 8px; font-size: 13px; }
}
@media (max-width: 560px) {
  .editor-panel { max-height: 44vh; }
  /* Primary action across the full width, Cancel / Apply side by side underneath */
  .editor-foot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .editor-foot-actions .btn { width: 100%; padding: 11px 8px; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .editor-foot-actions .btn-primary { grid-column: 1 / -1; order: -1; }
}
@media (min-width: 561px) and (max-width: 900px) and (orientation: portrait) {
  .editor-panel { max-height: 46vh; padding: 14px 20px; }
  .editor-foot-actions .btn { font-size: 14px; }
}

/* --- Tablet landscape editor: keep side panel but narrower --- */
@media (min-width: 561px) and (max-width: 900px) and (orientation: landscape) {
  .editor { padding: 0; }
  .editor-card { height: 100%; border-radius: 0; }
  .editor-body { grid-template-columns: minmax(0, 1fr) 290px; }
  .editor-stage { padding: 18px; }
  .editor-panel { padding: 14px 16px; }
}

/* --- Low screens (phones in landscape): compact editor chrome --- */
@media (max-height: 520px) {
  .editor { padding: 0; }
  .editor-card { height: 100%; border-radius: 0; }
  .editor-head { padding: 8px 14px; }
  .editor-intro { display: none; }
  .editor-stage { padding: 12px; }
  .stage-info { margin-top: 8px; }
  .editor-panel { padding: 10px 16px; }
  .editor-panel .group { padding: 10px 0; }
  .editor-foot { padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .editor-foot .linkbtn { width: auto; }
  .editor-foot .btn { padding: 8px 12px; }
  .editor.cropping .editor-foot, .editor.cropping #edPanelCrop .hint { display: none; }
  .editor.cropping .ed-crop-actions { margin-top: 10px; }
}

/* --- Large and ultra-wide screens: let the tool grow instead of floating in the middle --- */
@media (min-width: 1680px) {
  .topbar-inner, .footer-inner { max-width: 1440px; }
  .layout { max-width: 1440px; grid-template-columns: 360px minmax(0, 1fr); gap: 28px; }
  .explain-inner { max-width: 1120px; }
}
@media (min-width: 2400px) {
  .topbar-inner, .footer-inner { max-width: 1680px; }
  .layout { max-width: 1680px; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; }
  .dropzone { min-height: 600px; }
  .explain-inner { max-width: 1240px; }
}

/* --- Very small phones --- */
@media (max-width: 360px) {
  .brand-text { display: none; }
  .seg-row button { font-size: 11px; padding: 7px 2px; }
  .mode-fields { gap: 8px; }
}

/* Accessibility (WCAG 2.2 AA) */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 6px; background: var(--card); color: var(--text); font-weight: 500; font-size: 14px; text-decoration: none; box-shadow: var(--shadow-modal); }
.skip-link:focus { top: 12px; }
/* One clear keyboard focus ring everywhere (text fields keep their green border instead). */
html :is(a, button, summary, [role="button"], [tabindex]:not([tabindex="-1"]), input[type="checkbox"], input[type="radio"], input[type="range"]):focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
html .seg button:focus-visible, html .toggle button:focus-visible, html .toggle a:focus-visible { outline-offset: -2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .step:hover .mini, .step:hover .mini-float { transform: none; }
  .step:hover .mini-plus, .step:hover .mini-rings, .step:hover .mini-slider b, .step:hover .mini-btn, .step:hover .mini-check, .step:hover .mini-float.folder svg { animation: none; }
  .ill-photo.scaled, .fmt-badge, .dropzone { transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Mobile per-image sheet ---------- */
.msheet { position: fixed; inset: 0; z-index: 46; display: flex; align-items: flex-end; background: var(--overlay); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.msheet-panel { width: 100%; max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; background: var(--card); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-modal); padding: 0 20px calc(16px + env(safe-area-inset-bottom)); animation: sheetin .25s cubic-bezier(.2, .8, .2, 1); }
.msheet .sheet-head { display: flex; position: sticky; top: 0; z-index: 2; align-items: center; justify-content: space-between; margin: 0 -20px; padding: 12px 12px 12px 20px; background: var(--card); border-bottom: 1px solid var(--bg-accent); }
.msheet .sheet-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border); }
.msheet .sheet-title { font-weight: 700; font-size: 16px; padding-top: 4px; }
.is-top { display: flex; gap: 14px; align-items: center; padding: 16px 0 4px; }
.is-thumb { width: 84px; height: 84px; flex: none; border-radius: 8px; }
.is-meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.is-meta .meta { margin: 0; font-size: 13px; }
.is-badges { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.is-when { font-size: 12px; color: var(--muted); }
.msheet .badge { background: var(--green-soft); color: var(--green-dark); }
.msheet .badge:empty { display: none; }
.is-name-field { margin-top: 16px; }
.is-name { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--card); padding: 0 12px; }
.is-name:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px var(--bg-accent); }
.is-name input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 16px; font-weight: 500; padding: 12px 0; }
.is-name em { font-style: normal; color: var(--muted); font-size: 15px; }
.is-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.is-actions .btn { padding: 12px 10px; }
.is-actions .btn.edit { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.is-actions .btn.edit svg { width: 14px; height: 14px; }
.is-actions:has(.edit[hidden]) { grid-template-columns: 1fr; }
.is-remove { width: 100%; margin-top: 8px; color: var(--danger); border-color: transparent; }
.is-remove:hover { background: var(--danger-soft); }
.msheet.busy .is-thumb::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); }
@media (min-width: 901px) { .msheet:not(.dlg) { display: none !important; } }

/* --- Sidebar: never a scroll box of its own (the mouse wheel always scrolls the page). When it is taller than
   the window, app.js gives it a negative sticky top, so it scrolls along and then sticks at its bottom edge. --- */
@media (min-width: 901px) {
  .settings .btn-apply { position: sticky; bottom: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
}
@media (min-width: 901px) and (max-height: 820px) {
  .settings { padding-top: 14px; }
  .settings-title { padding-bottom: 10px; }
  .settings .group { padding: 11px 0; }
  .settings .field, .settings .check { margin-top: 9px; }
}

/* --- Profile: one compact row; "modified" pill and an active Save only when there is something to save --- */
.profiles { padding: 10px 0 !important; }
.profile-row { align-items: center; gap: 6px; }
.profile-label { display: inline-flex; align-items: center; font-size: 12px; color: var(--muted); flex: none; margin-right: 2px; }
.profile-label .info { margin-left: 4px; }
.profile-row select { padding-top: 5px; padding-bottom: 5px; font-size: 12.5px; border-color: transparent; background-color: var(--bg-accent); }
.profile-row select:hover { border-color: var(--border); }
.profile-row .pill { display: none; } /* the active Save button already says it */
.profile-row .btn-small { padding: 5px 10px; font-size: 12.5px; }
.profile-row #profileSave:disabled { display: none; }
.profile-row #profileSave:not(:disabled) { background: var(--green-strong); border-color: var(--green-strong); color: #fff; }
.profile-row .btn-icon { padding: 5px 8px; border-color: transparent; color: var(--muted); }
.profile-row .btn-icon:hover { border-color: var(--border); }

/* --- PDF settings --- */
.pdf-group .field.first { margin-top: 0; }
.pdf-group .field > span:first-child { display: inline-flex; align-items: center; }

/* PDF rows: "Pages" instead of "Resize / crop" */
.row:not(.pdf) .actions .pages { display: none; }
.actions .pages svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* --- Dialogs: the mobile sheet, centred on wider screens --- */
.text-input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.text-input:focus { border-color: var(--green); box-shadow: 0 0 0 2px var(--bg-accent); }
.text-input[aria-invalid="true"] { border-color: var(--danger); }
.dlg .msheet-panel { display: flex; flex-direction: column; }
.dlg-sub { margin: 14px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.dlg-hint { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.dlg-error { margin: 10px 0 0; font-size: 13px; color: var(--danger); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dlg-actions #pgReset { margin-right: auto; }
.merge-list { list-style: none; margin: 14px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.merge-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.merge-row .mg-btns { display: flex; }
.merge-row .icon-btn { width: 28px; height: 32px; font-size: 16px; }
.merge-row .mg-up:hover, .merge-row .mg-down:hover { background: var(--bg-accent); color: var(--text); }
.merge-row .icon-btn:disabled { opacity: .3; cursor: default; background: none; }
#mgAdd { align-self: flex-start; }
@media (max-width: 520px) {
  .merge-row { grid-template-columns: minmax(0, 1fr) auto; }
  .merge-row .mg-pages { grid-column: 1; }
  .merge-row .mg-btns { grid-row: 1 / span 2; grid-column: 2; flex-direction: column; }
  .merge-row { padding-bottom: 8px; border-bottom: 1px solid var(--bg-accent); }
}
@media (min-width: 600px) {
  .msheet.dlg { align-items: center; justify-content: center; padding: 20px; }
  .dlg .msheet-panel { max-width: 520px; border-radius: var(--radius); max-height: calc(100dvh - 40px); padding-bottom: 20px; }
  .dlg .sheet-head::before { display: none; }
}

/* --- PDF page editor: open page on top, all pages in a strip below --- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pdfed .editor-card { width: min(1280px, 100%); height: min(900px, 100%); }
.pe-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--bg-accent); flex-wrap: wrap; }
.pe-tool { display: inline-flex; align-items: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 9px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; justify-content: center; }
.pe-tool svg { width: 17px; height: 17px; flex: none; }
.pe-tool:not(:disabled):hover { background: var(--bg-accent); }
.pe-tool:disabled { color: var(--muted-light); cursor: default; }
.pe-tool:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
#peDelete:not(:disabled):hover { background: var(--danger-soft); color: var(--danger); }
.pe-text { color: var(--muted); }
.pe-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.pe-status { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pe-add-wrap { position: relative; }
.pe-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 5; min-width: 240px; max-width: 340px; max-height: 320px; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-modal); padding: 6px; }
.pe-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 6px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-menu button:hover, .pe-menu button:focus-visible { background: var(--bg-accent); outline: none; }
.pe-menu-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 10px 4px; }
.pe-menu .pe-menu-file { color: var(--green-dark); font-weight: 600; border-top: 1px solid var(--bg-accent); border-radius: 0 0 6px 6px; margin-top: 4px; }
.pe-menu .pe-menu-file:first-child { border-top: 0; margin-top: 0; }

.pe-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: stretch; background: var(--bg); padding: 16px 8px 34px; }
.pe-view { position: relative; flex: 1; min-width: 0; }
.pe-view img { position: absolute; left: 50%; top: 50%; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .18); transition: transform .25s ease; user-select: none; }
.pe-view img.swap { transition: none; }
.pe-nav { flex: none; align-self: center; width: 40px; height: 64px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); font-size: 34px; line-height: 1; cursor: pointer; }
.pe-nav:not(:disabled):hover { background: var(--bg-accent); color: var(--text); }
.pe-nav:disabled { opacity: .25; cursor: default; }
.pe-pageno { position: absolute; left: 0; right: 0; bottom: 9px; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; }
.pe-spin { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: pe-spin .8s linear infinite; }
.pe-spin[hidden] { display: none; }
@keyframes pe-spin { to { transform: rotate(360deg); } }

.pe-strip { --tw: 92px; --th: 124px; position: relative; display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 12px 16px 10px; border-top: 1px solid var(--bg-accent); background: var(--card); touch-action: pan-x; scroll-padding: 0 24px; flex: none; outline: none; }
.pe-thumb { position: relative; flex: none; width: var(--tw); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; padding-bottom: 18px; }
.pe-tbox { position: relative; width: var(--tw); height: var(--th); display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--bg); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .12s; }
.pe-tbox img { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); transition: transform .25s ease; opacity: 0; }
.pe-thumb.loaded .pe-tbox img { opacity: 1; }
.pe-thumb.loaded .pe-spin { display: none; }
.pe-thumb.turned .pe-tbox img { max-width: var(--th); max-height: var(--tw); }
.pe-tbox .pe-spin { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-width: 2px; }
.pe-thumb:hover .pe-tbox { outline-color: var(--border); }
.pe-thumb.current .pe-tbox { outline-color: var(--green); }
.pe-thumb.selected .pe-tbox { background: var(--green-soft); outline-color: var(--green); }
.pe-thumb.dragging { opacity: .35; }
.pe-num { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--text); }
.pe-src { position: absolute; left: 4px; top: 4px; font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 4px; background: rgba(0, 0, 0, .55); color: #fff; pointer-events: none; opacity: 0; transition: opacity .12s; }
.pe-thumb:hover .pe-src, .pe-thumb.extra .pe-src { opacity: 1; }
.pe-thumb.extra .pe-src { background: #6d5ce8; }
.pe-thumb.extra[data-src="C"] .pe-src { background: #d9822b; }
.pe-thumb.extra[data-src="D"] .pe-src { background: #2b8fd9; }
.pe-thumb.extra[data-src="E"] .pe-src { background: #c2417a; }
.pe-check { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); cursor: pointer; opacity: 0; transition: opacity .12s; }
.pe-thumb:hover .pe-check, .pe-thumb.selected .pe-check, .pe-strip.any-sel .pe-check { opacity: 1; }
.pe-thumb.selected .pe-check { background: var(--green); }
.pe-thumb.selected .pe-check::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pe-tools { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 6px; opacity: 0; transition: opacity .12s; }
.pe-thumb:hover .pe-tools { opacity: 1; }
.pe-tools > span { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; padding: 0; }
.pe-tools svg { width: 14px; height: 14px; }
.pe-tools .pe-tdel:hover { background: var(--danger); color: #fff; }
.pe-tools .pe-trot:hover { background: var(--green-strong); color: #fff; }
.pe-strip.drag-on .pe-tools, .pe-strip.drag-on .pe-check { opacity: 0; }
.pe-mark { position: absolute; top: 8px; bottom: 26px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--green); pointer-events: none; box-shadow: 0 0 0 2px var(--green-soft); }
.pe-ghost { position: fixed; left: 0; top: 0; z-index: 100; width: 60px; pointer-events: none; transform-origin: 0 0; }
.pe-ghost img { width: 60px; height: auto; display: block; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); border-radius: 3px; opacity: .92; }
.pe-count { position: absolute; right: -8px; top: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--green-strong); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.pdfed .editor-foot { flex-wrap: wrap; }
.pe-hint { margin: 0; font-size: 12px; color: var(--muted); flex: 1 1 300px; min-width: 0; }
.pe-error { margin: 0; font-size: 13px; color: var(--danger); flex: 1 1 100%; order: -1; }
.pe-error[hidden] { display: none; }
@media (hover: none) {
  .pe-check { opacity: 1; }
  .pe-tools { display: none; }
  .pe-src { opacity: 1; }
}
@media (max-width: 900px) {
  .pdfed { padding: 0; }
  .pdfed .editor-card { height: 100%; border-radius: 0; }
  .pe-toolbar { padding: 6px 8px; gap: 2px; }
  .pe-label { display: none; }
  .pe-status { flex-basis: 100%; order: 10; margin: 2px 0 0 4px; }
  .pe-stage { padding: 8px 0 28px; }
  .pe-nav { width: 34px; font-size: 28px; }
  .pe-strip { --tw: 66px; --th: 90px; gap: 10px; padding: 10px 12px 8px; }
  .pe-hint { display: none; }
  .pdfed .editor-foot-actions { display: flex; }
  .pdfed .editor-foot-actions .btn { flex: 1; }
}
@media (max-width: 560px), (max-width: 900px) and (orientation: portrait) {
  .pdfed .editor-foot-actions .btn-primary { order: 0; }
}

/* Settings for one PDF: a full-height column beside the open page and the strip, everything in view */
.pe-main { position: relative; flex: 1; min-height: 0; display: flex; }
.pe-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pe-left .pe-stage { flex: 1; min-height: 0; }
.pe-hint-m { display: none; }
.pe-panel { flex: none; width: 300px; overflow-y: auto; padding: 12px 18px 14px; border-left: 1px solid var(--bg-accent); background: var(--card); }
.pe-panel .field { margin-top: 10px; gap: 4px; font-size: 12px; }
.pe-panel .field.first { margin-top: 8px; }
.pe-panel .seg button { padding: 6px 6px; }
.pe-panel .input-suffix input { padding-top: 6px; padding-bottom: 6px; }
.pe-panel .check { margin-top: 8px; }
.pe-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pe-panel-title { font-weight: 700; font-size: 14px; }
.pe-set-state { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.pe-set-state.own { color: var(--warn-fg); }
.pe-use-global { margin-top: 12px; }
.pe-settings { margin-left: 8px; position: relative; }
.pe-settings[aria-pressed="true"] { background: var(--bg-accent); }
.pe-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn-fg); display: none; }
.pe-settings.has-own .pe-dot { display: block; }

/* Phones and small tablets: page, pages and settings stacked in one scrolling column;
   toolbar and buttons stay put. */
@media (max-width: 900px) {
  .pdfed .editor-head { padding: 8px 12px; }
  .pdfed .editor-name { font-size: 14px; }
  .pe-toolbar { padding: 4px 6px; gap: 0; flex-wrap: nowrap; position: relative; }
  .pe-tool { min-width: 44px; height: 44px; padding: 0 10px; }
  .pe-tool svg { width: 20px; height: 20px; }
  .pe-sep { margin: 0 2px; }
  .pe-text { font-size: 12px; padding: 0 6px; white-space: nowrap; }
  .pe-status { display: none; }
  .pe-settings { margin-left: auto; }
  .pe-add-wrap { position: static; }
  .pe-menu { left: 8px; right: 8px; min-width: 0; max-width: none; }
  .pe-menu button { padding: 12px 10px; font-size: 15px; }
  .pe-main { display: block; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .pe-left { display: block; }
  .pe-left .pe-stage { height: min(54vh, 560px); padding: 10px 0 30px; }
  .pe-view { touch-action: pan-y; } /* sideways swipe turns the page */
  .pe-nav { width: 40px; height: 72px; }
  .pe-strip { --tw: 70px; --th: 94px; }
  .pe-check { width: 28px; height: 28px; right: 2px; top: 2px; }
  .pe-thumb.selected .pe-check::after { left: 8px; top: 4px; width: 6px; height: 12px; }
  .pe-hint-m { display: block; margin: 0; padding: 4px 14px 12px; font-size: 12px; color: var(--muted); background: var(--card); }
  .pe-panel { width: auto; overflow: visible; border-left: 0; border-top: 8px solid var(--bg); padding: 14px 16px 20px; }
  .pe-panel .field { font-size: 13px; }
  .pe-panel .seg button { padding: 10px 6px; font-size: 14px; }
  .pe-panel .check { margin-top: 12px; font-size: 15px; }
  .pe-panel .check input { width: 20px; height: 20px; }
  .pe-panel .input-suffix input { font-size: 16px; padding-top: 10px; padding-bottom: 10px; } /* 16px: no zoom on iOS */
  #pePanelClose { display: none; }
  .pdfed .editor-foot { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .pdfed .editor-foot-actions .btn { min-height: 44px; }
}
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .pe-left .pe-stage { height: 78vh; }
}
.pe-text.on { color: var(--green-dark); }
.pe-text svg { display: none; }
@media (max-width: 900px) { .pe-text svg { display: block; } .pe-text { padding: 0 10px; } }
/* Low laptop screens: less chrome, so the page stays large and every setting stays in view */
@media (min-width: 901px) and (max-height: 780px) {
  .pdfed { padding: 10px; }
  .pdfed .editor-card { height: 100%; }
  .pdfed .editor-head { padding: 8px 18px; }
  .pe-toolbar { padding: 4px 12px; }
  .pe-strip { --tw: 70px; --th: 94px; padding: 8px 14px 6px; }
  .pe-stage { padding: 10px 8px 28px; }
  .pdfed .editor-foot { padding: 8px 18px; }
  .pe-panel { padding: 8px 16px 10px; }
  .pe-panel .field { margin-top: 7px; }
  .pe-panel .field.first { margin-top: 6px; }
  .pe-panel .seg button { padding: 5px 6px; }
  .pe-panel .input-suffix input { padding-top: 4px; padding-bottom: 4px; }
  .pe-panel .check { margin-top: 6px; }
  .pe-use-global { margin-top: 8px; }
}
@media (max-width: 360px) {
  .pe-tool { min-width: 36px; padding: 0 6px; }
  .pe-text { padding: 0 6px; }
  .pe-sep { display: none; }
  .pe-toolbar { padding: 4px 2px; }
}
@media (max-width: 900px) and (hover: none) { /* touch: no hover tools there, so the circle can sit bottom right */
  .pe-check { top: auto; bottom: 22px; right: 3px; width: 26px; height: 26px; }
  .pe-thumb.selected .pe-check::after { left: 7px; top: 3px; }
}

/* Mobile sheet for a PDF: no picture, a label; the edit button opens the page editor */
.is-thumb.pdf img { display: none; }
.is-thumb.pdf::before { content: 'PDF'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
#isEdit.pdf svg { display: none; }
.field > span > small { margin-left: 4px; }

/* Hero: "Verklein het nu." with the brand green on "nu" */
.hero h1 em { font-style: normal; color: var(--green-dark); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .04em; height: .16em; border-radius: 99px; background: var(--green); opacity: .28; z-index: -1; }
.hero h1 { position: relative; z-index: 0; font-size: 44px; letter-spacing: -.03em; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 16px 0 0; padding: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5' fill='none' stroke='%2302C873' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
@media (max-width: 900px) { .hero h1 { font-size: 34px; } }
@media (max-width: 560px) { .hero h1 { font-size: 30px; } .hero-points { font-size: 12px; gap: 6px 12px; margin-top: 12px; } }
@media (max-width: 360px) { .brand-text { display: flex; } .brand-tag { display: none; } .brand-name { font-size: 16px; } }

/* --- Chrome extension call to action (home) ------------------------------- */
.ext-cta { padding: 0 20px 56px; background: var(--bg-accent); }
.ext-cta-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 20px 24px; flex-wrap: wrap; padding: 24px 28px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.ext-cta-icon { width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0ad184, #02C873 60%, #0FA263); box-shadow: 0 6px 16px rgba(2, 200, 115, .3); }
.ext-cta-icon svg { width: 60%; height: 60%; }
.ext-cta-text { flex: 1 1 320px; min-width: 0; }
.ext-cta-text h2 { font-size: 20px; }
.ext-cta-text p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ext-cta-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ext-cta-actions .btn, .ext-ctas .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 13px; }
.footer-links a { display: inline-block; padding: 5px 0; color: var(--muted); text-decoration: none; } /* 24px tall: WCAG target size */
.footer-links a:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a[aria-current="page"] { color: var(--text); font-weight: 500; }
@media (max-width: 640px) {
  .ext-cta { padding: 0 16px 40px; }
  .ext-cta-inner { padding: 20px; }
  .ext-cta-actions { width: 100%; }
  .ext-cta-actions .btn { flex: 1 1 auto; }
}

/* --- Content pages: extension, privacy, terms ------------------------------ */
.doc { width: 100%; max-width: 860px; margin: 0 auto; padding: 40px 20px 64px; line-height: 1.6; font-size: 15px; }
.doc h1 { font-size: 34px; letter-spacing: -.02em; line-height: 1.2; }
.doc h1 em { font-style: normal; color: var(--green-dark); }
.doc h2 { font-size: 20px; margin: 36px 0 10px; }
.doc h3 { font-size: 13px; color: var(--text); margin: 0 0 4px; }
.doc p { margin: 10px 0; }
.doc ul { padding-left: 20px; margin: 10px 0; }
.doc li { margin: 6px 0; }
.doc a { color: var(--green-dark); }
.doc a.btn { text-decoration: none; }
.doc a.btn-primary { color: #fff; }
.doc a.btn-ghost { color: var(--text); }
.doc code { font-size: 13px; background: var(--bg-accent); padding: 1px 5px; border-radius: 4px; }
.doc .fine { color: var(--muted); font-size: 13px; }
.legal h1 { margin-bottom: 4px; }
.eyebrow { margin: 0 0 6px !important; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.lead { font-size: 17px; color: var(--muted); }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.ext-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.ext-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 6px; }
.ext-shot { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 0 14px 14px; font-size: 13px; }
.ext-shot-bar { display: flex; align-items: center; gap: 5px; padding: 10px 0; color: var(--muted); font-weight: 700; }
.ext-shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.ext-shot-bar span { margin-left: 8px; }
.ext-shot-drop { border: 2px dashed var(--border); border-radius: 8px; padding: 18px 10px; text-align: center; font-weight: 500; }
.ext-shot-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; }
.ext-shot-row b { width: 34px; height: 34px; border-radius: 6px; background: linear-gradient(135deg, #8fd3ff, #17724f); flex: none; }
.ext-shot-row span { display: grid; font-weight: 500; }
.ext-shot-row small { font-size: 12px; color: var(--muted); }
.ext-shot-row em { font-style: normal; color: var(--green-dark); font-weight: 700; }
.ext-shot-btn { margin-top: 10px; padding: 9px; border-radius: 6px; background: var(--green-strong); color: #fff; text-align: center; font-weight: 500; }
.ext-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.ext-grid > div { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.ext-grid p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.perm { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.perm th, .perm td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--border); }
.perm tr:first-child th, .perm tr:first-child td { border-top: 0; }
.perm th { width: 32%; font-weight: 500; }
@media (max-width: 760px) {
  .doc { padding: 28px 16px 48px; font-size: 14.5px; }
  .doc h1 { font-size: 28px; }
  .ext-hero { grid-template-columns: 1fr; gap: 24px; }
  .ext-grid { grid-template-columns: 1fr; }
  .perm, .perm tbody, .perm tr, .perm th, .perm td { display: block; width: 100%; }
  .perm td { border-top: 0; padding-top: 0; color: var(--muted); }
}

/* --- More Chrome extension promotion --------------------------------------- */
.ext-top { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--green-strong); color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; box-shadow: 0 4px 12px rgba(2, 200, 115, .25); transition: background .15s, transform .15s; white-space: nowrap; }
.ext-top:hover { background: var(--green-hover); transform: translateY(-1px); }
.ext-top svg { width: 16px; height: 16px; }
.hero-ext { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: border-color .15s, transform .15s; }
.hero-ext:hover { border-color: var(--green); transform: translateY(-1px); }
.hero-ext svg { width: 16px; height: 16px; color: var(--green-dark); }
.hero-ext-new { padding: 3px 9px; border-radius: 999px; background: var(--green-strong); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hero-ext-arrow { color: var(--green-dark); transition: transform .15s; }
.hero-ext:hover .hero-ext-arrow { transform: translateX(3px); }
.ext-installed { display: none; color: var(--green-dark); font-weight: 500; }
/* The extension's content script sets data-verklein-ext on verklein.nu: no point selling it then. */
html[data-verklein-ext] .ext-promo { display: none !important; }
html[data-verklein-ext] .ext-installed { display: block; }
/* Phones and tablets cannot run Chrome extensions. */
@media (max-width: 820px), (pointer: coarse) { .ext-top, .hero-ext { display: none; } }
@media (pointer: coarse) { .ext-cta { display: none; } }

/* --- Ad slots (public/ads.js) ---------------------------------------------- */
.ad-slot { padding: 8px 20px 24px; }
.ad-slot-accent { background: var(--bg-accent); padding-top: 0; padding-bottom: 40px; }
.ad-inner { max-width: 1000px; margin: 0 auto; min-height: 120px; }
.ad-label { display: block; margin-bottom: 4px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }

/* Placeholder ads for ?ads=preview */
.ad-mock { position: relative; display: flex; align-items: center; gap: 16px; max-width: 728px; height: 90px; margin: 0 auto; padding: 0 16px 0 0; background: #fff; color: #202124; border: 1px solid #dadce0; overflow: hidden; font-family: Arial, Helvetica, sans-serif; }
.ad-mock-big { max-width: 970px; height: 250px; padding: 0 32px 0 0; gap: 28px; }
.ad-mock-img { align-self: stretch; flex: none; width: 160px; background: linear-gradient(135deg, #8ec5fc, #e0c3fc); }
.ad-mock-big .ad-mock-img { width: 420px; background: linear-gradient(135deg, #f6d365, #fda085); }
.ad-mock-text { flex: 1; min-width: 0; display: grid; gap: 4px; font-size: 13px; line-height: 1.35; color: #5f6368; }
.ad-mock-text b { font-size: 16px; color: #202124; }
.ad-mock-big .ad-mock-text { font-size: 15px; gap: 8px; }
.ad-mock-big .ad-mock-text b { font-size: 24px; }
.ad-mock-btn { flex: none; padding: 9px 18px; border-radius: 4px; background: #1a73e8; color: #fff; font-size: 14px; font-weight: 700; }
.ad-mock-choices { position: absolute; top: 0; right: 0; padding: 1px 4px; font-size: 10px; color: #00728a; background: #fff; border-bottom-left-radius: 4px; }
@media (max-width: 760px) {
  .ad-mock, .ad-mock-big { max-width: 336px; height: 280px; flex-direction: column; align-items: stretch; padding: 0 0 14px; gap: 10px; }
  .ad-mock-img, .ad-mock-big .ad-mock-img { width: auto; height: 150px; flex: none; }
  .ad-mock-text { padding: 0 14px; }
  .ad-mock-text b, .ad-mock-big .ad-mock-text b { font-size: 16px; }
  .ad-mock-big .ad-mock-text { font-size: 13px; }
  .ad-mock-btn { align-self: flex-start; margin-left: 14px; }
}

.hist-more { display: block; margin: 10px auto 2px; }
.hist-more:not(:disabled):hover { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }

/* "This page is in Dutch / English" hint (lang-hint.js), shown only to visitors whose browser has another language.
   Floating at the bottom: it appears after the first paint, so in the page flow it would push everything down (CLS). */
.lang-hint { position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 6px 8px 6px 16px; border: 1px solid var(--green); border-radius: var(--radius); background: linear-gradient(var(--green-soft), var(--green-soft)), var(--card); color: var(--text); font-size: 14px; box-shadow: var(--shadow-modal); }
.lang-hint[hidden] { display: none; }
.lang-hint p { margin: 0; }
.lang-hint a { color: var(--green-dark); font-weight: 500; }
.lang-hint .icon-btn:hover { background: transparent; color: var(--text); }

/* FAQ on the home page */
.faq-list { max-width: 760px; margin: 28px auto 0; display: grid; gap: 10px; }

/* Landing pages (landing.js): the guide under the tool and the "More tools" links. */
.lp-body { max-width: 760px; margin: 22px auto 0; font-size: 16px; line-height: 1.65; }
.lp-body h3 { font-size: 19px; margin: 28px 0 8px; }
.lp-body p, .lp-body ul, .lp-body ol { margin: 0 0 14px; }
.lp-body ul, .lp-body ol { padding-left: 22px; }
.lp-body li { margin: 4px 0; }
.lp-body a, .faq-list a { color: var(--green-dark); }
.lp-tool-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; margin: 24px auto 0; padding: 0; }
.lp-tool-list a { display: inline-block; padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }
.lp-tool-list a:hover { border-color: var(--green); color: var(--green-dark); }
.faq-list details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.faq-list summary { cursor: pointer; padding: 14px 44px 14px 18px; font-weight: 500; font-size: 16px; list-style: none; position: relative; border-radius: var(--radius); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list summary:hover { color: var(--green-dark); }
.faq-list details p { margin: 0; padding: 0 18px 16px; color: var(--muted); line-height: 1.6; }

/* --- Header menu: "WordPress plugin" dropdown (built by site.js, closed by nav.js) --- */
.topbar-right { align-items: center; }
.nav-drop { position: relative; }
.nav-drop > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-accent); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; user-select: none; transition: background .15s, border-color .15s; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary:hover, .nav-drop[open] > summary { background: var(--card); border-color: color-mix(in srgb, var(--green) 45%, var(--border)); }
.nav-drop.is-current > summary { color: var(--green-dark); }
.nav-drop > summary svg { width: 16px; height: 16px; flex: none; }
.nav-drop > summary .nav-drop-chev { width: 14px; height: 14px; transition: transform .15s; }
.nav-drop[open] > summary .nav-drop-chev { transform: rotate(180deg); }
.nav-drop-short { display: none; }
.nav-drop-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 300px; max-width: calc(100vw - 32px); margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-modal); }
.nav-drop-menu li { margin: 0; }
.nav-drop-menu a { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav-drop-menu a strong { font-size: 14px; font-weight: 700; }
.nav-drop-menu a > span:not(.sr-only) { font-size: 12.5px; color: var(--muted); }
.nav-drop-menu a:hover, .nav-drop-menu a:focus-visible { background: var(--bg-accent); }
.nav-drop-menu a[aria-current="page"] strong { color: var(--green-dark); }
.nav-drop-menu .nav-drop-ext { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.nav-drop-menu .nav-drop-ext strong { color: var(--green-dark); }
.nav-drop > summary:focus-visible, .nav-drop-menu a:focus-visible, .sub-nav a:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
@media (max-width: 820px) { .nav-drop-long { display: none; } .nav-drop-short { display: inline; } }
@media (max-width: 560px) {
  .nav-drop > summary { height: 36px; padding: 0 10px; gap: 4px; font-size: 12px; }
  .nav-drop > summary > svg:first-child, .nav-drop > summary .nav-drop-chev { display: none; }
  /* The button is not at the right edge here: open the menu across the screen, under the top bar. */
  .nav-drop-menu { position: fixed; top: 58px; left: 16px; right: 16px; width: auto; max-width: none; }
}
/* Narrow phones: the logo mark alone, so the menu and both toggles still fit next to it. */
@media (max-width: 430px) { .topbar .brand-text { display: none; } }
@media (prefers-reduced-motion: reduce) { .nav-drop > summary .nav-drop-chev { transition: none; } }

/* --- WordPress plugin pages (public/plugin*.html) ------------------------------------------------------------ */
/* Bar under the header: product name, tabs, download (built by site.js). */
.wp-bar { border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); background: color-mix(in srgb, var(--bg-accent) 70%, transparent); }
.wp-bar-inner { max-width: 1210px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; min-height: 52px; }
.wp-bar-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.wp-bar-brand svg { width: 20px; height: 20px; color: var(--green-dark); }
.wp-bar-tabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; align-self: stretch; }
.wp-bar-tabs::-webkit-scrollbar { display: none; }
.wp-bar-tabs a { display: inline-flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.wp-bar-tabs a:hover { color: var(--text); }
.wp-bar-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--green); }
.wp-bar-cta { text-decoration: none; flex: none; }
.wp-bar a:focus-visible { outline: 2px solid var(--green-dark); outline-offset: -2px; border-radius: 4px; }
@media (max-width: 720px) {
  .wp-bar-inner { flex-wrap: wrap; gap: 0 12px; padding: 8px 16px 0; }
  .wp-bar-brand { flex: 1; }
  .wp-bar-tabs { order: 3; flex-basis: 100%; min-height: 44px; margin: 4px -16px 0; padding: 0 8px; }
  .wp-bar-tabs a { padding: 0 10px; }
}

/* Page frame and type. */
.wp-main { width: 100%; max-width: 1210px; margin: 0 auto; padding: 48px 20px 72px; box-sizing: border-box; }
.wp-main a:not(.btn):not(.wp-link-card):not(.wp-more) { color: var(--green-dark); }
.wp-main h1 { margin: 0; font-size: 46px; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.wp-main h1 em { font-style: normal; color: var(--green-dark); }
.wp-main h2 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.wp-main h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.wp-main code { font-size: .9em; background: var(--bg-accent); padding: 1px 5px; border-radius: 4px; }
.wp-pill { display: inline-flex; margin: 0 0 16px; padding: 5px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.wp-lead { margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 600px; text-wrap: pretty; }
.wp-fine { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.wp-center { text-align: center; }
.wp-narrow { max-width: 820px; margin-left: auto; margin-right: auto; }
.wp-ico { width: 22px; height: 22px; flex: none; color: var(--green-dark); }
.wp-ico-lg { width: 28px; height: 28px; }
.wp-ico-sm { width: 16px; height: 16px; flex: none; }
.wp-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.wp-ctas .btn, .wp-contact-actions .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.wp-main .btn-primary { color: #fff; }
.wp-main .btn-ghost { color: var(--text); }
.wp-section { margin-top: 96px; }
.wp-head { margin-bottom: 28px; max-width: 640px; }
.wp-head p { margin: 10px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.wp-tag { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.wp-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.wp-checks li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.wp-checks .wp-ico { width: 18px; height: 18px; margin-top: 2px; }
.wp-sr-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero with an illustration of the admin. */
.wp-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.wp-points { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted); }
.wp-points li { display: inline-flex; align-items: center; gap: 6px; }
.wp-points .wp-ico { width: 16px; height: 16px; }
.wp-mock { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-modal); padding: 0 18px 18px; font-size: 13px; }
.wp-mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 0; color: var(--muted); font-weight: 700; font-size: 12px; }
.wp-mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.wp-mock-bar span { margin-left: 8px; }
.wp-mock-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--border); margin: 0 -18px 14px; padding: 0 18px; font-size: 12.5px; color: var(--muted); }
.wp-mock-tabs > * { padding: 8px 0; }
.wp-mock-tabs b { color: var(--text); border-bottom: 2px solid var(--green); margin-bottom: -1px; }
.wp-mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wp-mock-cards div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.wp-mock-cards small { color: var(--muted); font-size: 11px; }
.wp-mock-cards strong { font-size: 18px; }
.wp-mock-cards .is-accent { background: var(--green-soft); border-color: transparent; }
.wp-mock-cards em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--green-dark); }
.wp-mock-progress { margin: 14px 0 10px; }
.wp-mock-progress div { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.wp-mock-progress p { margin: 0; height: 8px; border-radius: 99px; background: var(--bg-accent); overflow: hidden; }
.wp-mock-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0ad184, #02C873); }
.wp-mock-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 7px 10px 7px 7px; border: 1px solid var(--border); border-radius: 10px; }
.wp-mock-row b { width: 34px; height: 34px; border-radius: 7px; background: linear-gradient(135deg, #ffcf8a, #e8774b); flex: none; }
.wp-mock-row b.b2 { background: linear-gradient(135deg, #8fd3ff, #17724f); }
.wp-mock-row span { flex: 1; display: flex; flex-direction: column; font-weight: 500; min-width: 0; }
.wp-mock-row small { color: var(--muted); font-weight: 400; }
.wp-mock-row small em, .wp-mock-row > em { font-style: normal; color: var(--green-dark); font-weight: 700; }
.wp-mock-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg-accent); font-size: 12.5px; color: var(--muted); }
.wp-mock-toggle strong { color: var(--text); }
.wp-mock-toggle i { width: 34px; height: 20px; border-radius: 99px; background: var(--green-strong); position: relative; flex: none; }
.wp-mock-toggle i::after { content: ""; position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }

/* Numbers strip. */
.wp-stats { margin-top: 72px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: 16px; background: var(--card); overflow: hidden; }
.wp-stats div { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.wp-stats div + div { border-left: 1px solid var(--border); }
.wp-stats strong { font-size: 26px; letter-spacing: -.02em; color: var(--green-dark); }
.wp-stats span { font-size: 14px; color: var(--muted); }

/* Two columns of big cards (two sides, the two delivery modes). */
.wp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wp-side-card, .wp-mode { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); }
.wp-side-card p:not(.wp-tag) { margin: 0; color: var(--muted); line-height: 1.6; }
.wp-side-head { display: flex; align-items: center; justify-content: space-between; }
.wp-side-card h3, .wp-mode h3 { font-size: 22px; }
.wp-more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); font-weight: 500; text-decoration: none; }
.wp-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.wp-mode.is-rec { border-color: color-mix(in srgb, var(--green) 50%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 30%, transparent); }
.wp-mode .wp-checks { color: var(--muted); }
.wp-mode-foot { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13.5px; font-weight: 500; color: var(--text); }
.wp-shot { margin: 28px 0 0; }
.wp-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.wp-shot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* Steps. */
.wp-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: none; }
.wp-steps li { position: relative; padding: 22px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.wp-steps p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.wp-step-n { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px; border-radius: 50%; background: var(--green-strong); color: #fff; font-weight: 700; font-size: 14px; }

/* Why. */
.wp-why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 40px; }
.wp-why .wp-ico { width: 26px; height: 26px; margin-bottom: 12px; }
.wp-why p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* Features: cards that open. */
.wp-feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.wp-feat { border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.wp-feat summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 12px; }
.wp-feat summary::-webkit-details-marker { display: none; }
.wp-feat summary > span { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.wp-feat summary small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.wp-feat summary em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.wp-feat summary::after { content: ""; width: 8px; height: 8px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; margin: 0 4px 4px; }
.wp-feat[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.wp-feat summary:hover strong { color: var(--green-dark); }
.wp-feat ul { margin: 0; padding: 4px 18px 16px 36px; font-size: 14px; line-height: 1.55; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; }
.wp-feat li { margin: 6px 0; }
.wp-feat summary:focus-visible, .faq-list summary:focus-visible, .wp-toc-box summary:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }

/* Closing call to action and link cards. */
.wp-end { margin-top: 104px; }
.wp-end-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding: 40px 44px; border-radius: 20px; background: radial-gradient(ellipse 80% 120% at 100% 0%, color-mix(in srgb, var(--green) 22%, transparent), transparent 60%), var(--card); border: 1px solid color-mix(in srgb, var(--green) 35%, var(--border)); }
.wp-end-cta p { margin: 8px 0 0; color: var(--muted); }
.wp-end-cta .wp-ctas { margin: 0; }
.wp-link-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.wp-link-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.wp-link-card:hover { border-color: color-mix(in srgb, var(--green) 55%, var(--border)); transform: translateY(-2px); }
.wp-link-card span { display: flex; flex-direction: column; gap: 2px; }
.wp-link-card strong { font-size: 15px; }
.wp-link-card small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.wp-link-card .wp-ico { width: 36px; height: 36px; padding: 8px; box-sizing: border-box; border-radius: 10px; background: var(--green-soft); }
.wp-link-cards-sm { margin: 28px 0 8px; }

/* Docs: sticky table of contents next to the article. */
.wp-docs-main { max-width: 1210px; }
.wp-docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }
.wp-toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 14px; }
.wp-toc-box summary { list-style: none; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; pointer-events: none; }
.wp-toc-box summary::-webkit-details-marker { display: none; }
.wp-toc ul { margin: 0; padding: 0; list-style: none; }
.wp-toc > details > nav > ul > li { margin-bottom: 16px; }
.wp-toc li p { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--text); }
.wp-toc li li a { display: block; padding: 5px 10px; border-left: 2px solid var(--border); color: var(--muted); text-decoration: none; }
.wp-main .wp-toc li li a { color: var(--muted); }
.wp-toc li li a:hover { color: var(--text); }
.wp-main .wp-toc li li a[aria-current] { color: var(--green-dark); border-left-color: var(--green); font-weight: 500; }
.wp-toc-help { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.wp-article.doc { max-width: 780px; margin: 0; padding: 0; }
.wp-article h1 { font-size: 40px; }
.wp-article .doc-section { scroll-margin-top: 88px; padding-top: 8px; margin-top: 48px; border-top: 1px solid var(--border); }
.wp-article .doc-section > h2 { font-size: 24px; margin: 24px 0 12px; }
.wp-article .doc-section h3 { font-size: 15px; margin: 24px 0 6px; }
.wp-main pre.code { overflow-x: auto; margin: 14px 0; padding: 14px 16px; border-radius: 10px; background: #1b1612; color: #f1e9de; border: 1px solid #2f2720; font-size: 13px; line-height: 1.6; }
.wp-main pre.code code { padding: 0; background: none; color: inherit; font-size: inherit; }
.wp-article .perm th { width: 34%; }
@media (max-width: 960px) {
  .wp-docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .wp-toc { position: static; max-height: none; overflow: visible; }
  .wp-toc-box { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 12px 16px; }
  .wp-toc-box summary { pointer-events: auto; cursor: pointer; margin: 0; display: flex; justify-content: space-between; }
  .wp-toc-box summary::after { content: "+"; font-size: 16px; line-height: 1; }
  .wp-toc-box[open] summary { margin-bottom: 12px; }
  .wp-toc-box[open] summary::after { content: "−"; }
  .wp-toc-help { display: none; }
}

/* Support. */
.wp-page-head { text-align: center; max-width: 900px; margin: 0 auto; }
.wp-page-head .wp-lead { margin-left: auto; margin-right: auto; }
.wp-page-head .wp-link-cards { margin-top: 36px; text-align: left; }
.wp-trouble { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wp-trouble-item { padding: 20px 22px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.wp-trouble-item h3 { font-size: 16px; }
.wp-trouble-item p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.wp-main .faq-list { max-width: none; margin: 0; }
.wp-main .faq-list details p { margin: 0; padding: 0 18px 16px; color: var(--muted); line-height: 1.6; }
.wp-contact { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; padding: 36px; border-radius: 20px; background: var(--card); border: 1px solid color-mix(in srgb, var(--green) 35%, var(--border)); }
.wp-contact p { color: var(--muted); }
.wp-contact .wp-checks { font-size: 14.5px; color: var(--muted); }
.wp-contact-actions { display: flex; flex-direction: column; gap: 10px; justify-content: center; }

/* Changelog: timeline. */
.wp-timeline { list-style: none; margin-top: 48px; padding: 0 0 0 28px; border-left: 2px solid var(--border); }
.wp-release { position: relative; padding-bottom: 40px; }
.wp-release::before { content: ""; position: absolute; left: -36px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--green); }
.wp-release h2 { display: flex; align-items: center; gap: 10px; font-size: 24px; scroll-margin-top: 88px; }
.wp-release ul { margin: 14px 0 0; padding: 0; list-style: none; border-radius: 14px; background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.wp-release li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 14px 18px; line-height: 1.55; font-size: 14.5px; }
.wp-release li + li { border-top: 1px solid var(--border); }
.wp-release li > span:only-child { grid-column: 2; }
.wp-chip { justify-self: start; display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--bg-accent); color: var(--muted); }
.wp-chip-new { background: var(--green-soft); color: var(--green-dark); }
.wp-chip-changed { background: var(--warn-bg); color: var(--warn-fg); }
@media (max-width: 560px) { .wp-release li { grid-template-columns: 1fr; gap: 6px; } .wp-release li > span:only-child { grid-column: 1; } }
.wp-chip-latest { background: var(--green-strong); color: #fff; margin: 0; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

@media (max-width: 960px) {
  .wp-hero { grid-template-columns: 1fr; gap: 40px; }
  .wp-mock { transform: none; max-width: 520px; }
  .wp-steps { grid-template-columns: 1fr 1fr; }
  .wp-why-grid { grid-template-columns: 1fr 1fr; }
  .wp-stats { grid-template-columns: 1fr 1fr; }
  .wp-stats div:nth-child(3) { border-left: 0; }
  .wp-stats div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .wp-main { padding: 32px 16px 56px; }
  .wp-main h1, .wp-article h1 { font-size: 34px; }
  .wp-main h2 { font-size: 24px; }
  .wp-lead { font-size: 16.5px; }
  .wp-section { margin-top: 64px; }
  .wp-two, .wp-feat-grid, .wp-trouble, .wp-link-cards, .wp-contact { grid-template-columns: 1fr; }
  .wp-steps, .wp-why-grid { grid-template-columns: 1fr; }
  .wp-side-card, .wp-mode { padding: 22px; }
  .wp-end-cta, .wp-contact { padding: 26px 22px; }
  .wp-ctas .btn { flex: 1 1 auto; }
  .wp-mock-cards strong { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .wp-link-card, .wp-feat summary::after { transition: none; } .wp-link-card:hover { transform: none; } }

/* --- Footer (built by site.js): brand + three link columns, thin bottom row ------------------------------- */
.footer-inner { display: grid; grid-template-columns: minmax(220px, 1.1fr) 2fr; gap: 32px 56px; align-items: start; padding: 44px 20px 28px; }
.footer-about { display: flex; flex-direction: column; gap: 12px; max-width: 340px; }
.footer-about .footer-text { flex: none; font-size: 13.5px; line-height: 1.55; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-col h2 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.footer-col a { display: inline-block; padding: 4px 0; font-size: 14px; color: var(--muted); text-decoration: none; } /* 24px+ tall: WCAG target size */
.footer-col a:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.footer-col a[aria-current="page"] { color: var(--text); font-weight: 500; }
.footer-bottom { position: relative; max-width: 1210px; margin: 0 auto; padding: 16px 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: 20px; right: 20px; border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
@media (max-width: 560px) { .footer-bottom::before { left: 16px; right: 16px; } }
.footer-bottom p { margin: 0; }
@media (min-width: 1400px) { .footer-bottom { max-width: 1440px; } }
@media (min-width: 1800px) { .footer-bottom { max-width: 1680px; } }
@media (max-width: 820px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .footer-inner { display: grid; padding: 32px 16px 20px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer-cols .footer-col:last-child { grid-column: 1 / -1; }
  .footer-bottom { padding: 14px 16px 22px; }
}

/* Header: plugin menu, "Add to Chrome", language and theme must fit next to the brand. */
@media (max-width: 1100px) { .topbar .nav-drop-long { display: none; } .topbar .nav-drop-short { display: inline; } }

/* Home: room between the ad (or the FAQ) and the Chrome extension call to action. */
.ext-cta { padding-top: 24px; }
@media (max-width: 640px) { .ext-cta { padding-top: 20px; } }
.wp-main h3 { display: block; text-transform: none; letter-spacing: -.005em; color: var(--text); }
@media (max-width: 720px) { .wp-stats strong { font-size: 20px; } .wp-stats div { padding: 16px 18px; } .wp-article .perm th { width: 40%; } }

/* --- Page transitions: a short cross-fade between pages (Chrome, Edge, Safari 18.2+; others just navigate) --- */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
.wp-bar { view-transition-name: subbar; }
/* Plain cross-fade of the page; header and plugin bar stay put. Don't name <main>:
   its group morphs between page sizes, which looks like a zoom. */
::view-transition-group(topbar), ::view-transition-group(subbar) { animation: none; }
::view-transition-old(root) { animation: vt-out .12s ease-out both; }
::view-transition-new(root) { animation: vt-in .22s ease-out both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
/* While an accordion closes, its arrow already points down. */
.faq-list details.is-closing summary::after { transform: translateY(-70%) rotate(45deg); }
details.wp-feat.is-closing summary::after { transform: rotate(45deg); margin: 0 4px 4px; }

/* --- Chrome extension page (public/chrome-extensie.html): reuses the wp-* building blocks above ------------- */
.ext-page .ext-installed { margin: 18px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--green-soft); font-size: 14px; }
html[data-verklein-ext] .ext-page .ext-installed { display: flex; gap: 8px; align-items: flex-start; }
.ext-page .ext-installed .wp-ico-sm { margin-top: 2px; }
/* Hero illustration: a browser with the side panel open and the right-click menu on an image. */
.ext-m { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-modal); overflow: hidden; font-size: 12.5px; }
.ext-m-top { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-accent); }
.ext-m-top > i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.ext-m-top span { flex: 1; margin-left: 10px; padding: 4px 10px; border-radius: 99px; background: var(--card); color: var(--muted); font-size: 11.5px; }
.ext-m-top b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--green-soft); color: var(--green-dark); }
.ext-m-ico { width: 14px; height: 14px; flex: none; }
.ext-m-body { display: grid; grid-template-columns: 1fr 210px; min-height: 300px; }
.ext-m-page { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.ext-m-line { margin: 0; height: 8px; border-radius: 99px; background: var(--bg-accent); }
.ext-m-line.w50 { width: 50%; } .ext-m-line.w60 { width: 60%; } .ext-m-line.w70 { width: 70%; } .ext-m-line.w80 { width: 80%; } .ext-m-line.w90 { width: 90%; }
.ext-m-img { position: relative; height: 120px; margin: 6px 0; border-radius: 10px; background: linear-gradient(135deg, #ffcf8a, #e8774b 55%, #8a3d63); }
.ext-m-menu { position: absolute; left: 38%; top: 34%; margin: 0; padding: 5px; list-style: none; width: 190px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-modal); }
.ext-m-menu li { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; color: var(--muted); white-space: nowrap; }
.ext-m-menu li.is-hit { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.ext-m-panel { border-left: 1px solid var(--border); padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-top); }
.ext-m-head { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ext-m-drop { border: 2px dashed var(--border); border-radius: 8px; padding: 14px 8px; text-align: center; color: var(--muted); font-size: 11.5px; }
.ext-m-fmt { margin: 0; font-size: 11px; color: var(--muted); }
.ext-m-row { display: flex; align-items: center; gap: 8px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.ext-m-row b { width: 26px; height: 26px; border-radius: 5px; flex: none; background: linear-gradient(135deg, #8fd3ff, #17724f); }
.ext-m-row b.r1 { background: linear-gradient(135deg, #f3a1a1, #b9373d); }
.ext-m-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 500; font-size: 11.5px; }
.ext-m-row small { color: var(--muted); font-weight: 400; font-size: 10.5px; }
.ext-m-row small em, .ext-m-row > em { font-style: normal; color: var(--green-dark); font-weight: 700; }
.ext-m-row > em { font-size: 11px; }
.ext-m-btn { margin-top: auto; padding: 8px; border-radius: 8px; background: var(--green-strong); color: #fff; text-align: center; font-weight: 700; font-size: 11.5px; }

/* Three ways to start. */
.ext-ways { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ext-ways li { padding: 26px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); }
.ext-way-ico { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 14px; background: var(--green-soft); }
.ext-way-ico .wp-ico { width: 24px; height: 24px; }
.ext-ways p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* Spotlight: scan a page. */
.ext-spot { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 44px; border-radius: 20px; background: radial-gradient(ellipse 70% 90% at 0% 0%, color-mix(in srgb, var(--green) 14%, transparent), transparent 60%), var(--card); border: 1px solid var(--border); }
.ext-spot-text h2 { margin-top: 6px !important; }
.ext-spot-text > p:not(.wp-tag) { color: var(--muted); line-height: 1.65; margin: 14px 0 20px; }
.ext-spot-text .wp-checks { font-size: 14.5px; }
.ext-spot-wp { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.ext-spot-wp .wp-ico-sm { margin-top: 3px; color: var(--green-dark); }
.ext-s { background: var(--bg-top); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); font-size: 13px; }
.ext-s-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ext-s-head span { color: var(--green-dark); font-weight: 700; }
.ext-s-bar { height: 8px; margin: 12px 0 6px; border-radius: 99px; background: var(--bg-accent); overflow: hidden; }
.ext-s-bar i { display: block; height: 100%; background: linear-gradient(90deg, #0ad184, #02C873); }
.ext-s-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 7px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.ext-s-row b { width: 32px; height: 32px; border-radius: 6px; flex: none; background: linear-gradient(135deg, #ffcf8a, #e8774b); }
.ext-s-row b.r1 { background: linear-gradient(135deg, #8fd3ff, #17724f); } .ext-s-row b.r2 { background: linear-gradient(135deg, #c7b3ff, #5a3fb0); } .ext-s-row b.r3 { background: linear-gradient(135deg, #b6e3a8, #3f8a3a); }
.ext-s-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 500; }
.ext-s-row small { color: var(--muted); font-weight: 400; }
.ext-s-row em { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--green-soft); color: var(--green-dark); white-space: nowrap; }
.ext-s-row em.is-warn { background: var(--warn-bg); color: var(--warn-fg); }

/* Privacy and permissions. */
.ext-priv { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.ext-priv-list { font-size: 16px; gap: 14px; }
.ext-perm-title { margin: 6px 0 14px !important; font-size: 17px; }
.ext-priv .faq-list summary { font-size: 15px; }

@media (max-width: 960px) {
  .ext-spot, .ext-priv { grid-template-columns: 1fr; gap: 32px; }
  .ext-m { max-width: 560px; }
}
@media (max-width: 720px) {
  .ext-ways { grid-template-columns: 1fr; }
  .ext-spot { padding: 26px 20px; }
  .ext-m-body { grid-template-columns: 1fr; min-height: 0; }
  .ext-m-page { display: none; }
  .ext-m-panel { border-left: 0; }
}

/* /sitemap: every page with its description (site.js sitemapLists). */
.sitemap-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.sitemap-list a { font-weight: 500; }
.sitemap-list span { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; }
