:root {
  --bg: #fff8f3;
  --surface: #ffffff;
  --surface-2: #f7e9e5;
  --text: #17233c;
  --muted: #647087;
  --border: #e6ddd8;
  --love: #f05a55;
  --love-dark: #ce3e3a;
  --hate: #17233c;
  --accent: #087b5c;
  --ok: #087b5c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(60, 30, 30, .07);
  --shadow-lg: 0 24px 80px rgba(23, 35, 60, .14);
  --radius: 16px;
  --radius-lg: 28px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101827;
    --surface: #17233c;
    --surface-2: #22304b;
    --text: #fff8f3;
    --muted: #b5bfd0;
    --border: #31405d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, .42);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: clamp(18px, 4vw, 32px); }
.skip-link {
  position: fixed; top: 10px; left: 12px; z-index: 100; padding: 10px 14px;
  border-radius: 10px; background: var(--ink, #17233c); color: #fff; font-weight: 750;
  transform: translateY(-150%); transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header::after {
  content: ""; position: fixed; inset: 72px 0 0; background: rgba(18, 13, 24, .38);
  opacity: 0; pointer-events: none; transition: opacity .16s ease; z-index: 1;
}
.site-header:has(.mega-menu[open])::after { opacity: 1; pointer-events: auto; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.header-inner { position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand picture { display: flex; }
.brand .love { color: var(--love); }
.brand .hate { color: var(--muted); }
.brand-lockup { display: block; width: 154px; height: 42px; object-fit: contain; object-position: left center; }
.footer-brand { font-size: 1rem; }
.footer-lockup { width: 180px; height: 48px; }
.centered-prose, .not-found { text-align: center; }
.not-found { padding: 60px 0; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links > a { color: var(--muted); font-weight: 700; font-size: .9rem; padding: 10px 9px; border-radius: 9px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.mega-menu { position: static; }
.mega-menu summary {
  display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  color: #fff; font-weight: 800; font-size: .9rem; min-height: 44px; padding: 9px 14px;
  border: 1px solid #17233c; border-radius: 11px; background: #17233c;
}
.mega-menu summary::-webkit-details-marker { display: none; }
.mega-menu summary span { font-size: 1rem; transition: transform .15s ease; }
.mega-menu[open] summary { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.mega-menu[open] summary span { transform: rotate(180deg); }
.mega-menu summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 3px;
}
.mega-panel {
  position: fixed; top: 82px; left: 50%; transform: translateX(-50%);
  width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 98px); overflow: auto;
  background: color-mix(in srgb, var(--surface) 97%, transparent); border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow-lg); padding: 22px;
  overscroll-behavior: contain;
  z-index: 3;
}
.mega-menu:not([open]) .mega-panel { display: none; }
.mega-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.mega-heading > div { display: flex; flex-direction: column; }
.mega-heading strong { font-size: 1.05rem; }
.mega-heading span { color: var(--muted); font-size: .82rem; }
.mega-search { width: min(320px, 42vw); }
.mega-search input {
  width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px;
  background: var(--surface-2); color: var(--text); font: inherit;
}
.mega-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.mega-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 24px; padding-top: 18px; }
.mega-group h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; margin: 0 0 7px; }
.mega-group h2 a { color: var(--love); }
.mega-tool { display: flex; align-items: center; gap: 9px; min-height: 38px; color: var(--text); font-size: .87rem; font-weight: 650; border-radius: 9px; padding: 5px 7px; }
.mega-tool:hover { background: var(--surface-2); }
.mega-icon {
  width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 27px;
  border-radius: 8px; background: color-mix(in srgb, var(--accent) 13%, var(--surface-2));
  color: var(--accent);
}
.mega-icon .tool-icon-svg { width: 16px; height: 16px; }
.mega-group[data-group="organize"] .mega-icon { background: color-mix(in srgb, #ff4d5e 17%, var(--surface-2)); }
.mega-group[data-group="edit"] .mega-icon { background: color-mix(in srgb, #7c4dff 17%, var(--surface-2)); }
.mega-group[data-group="optimize"] .mega-icon { background: color-mix(in srgb, #16a36a 17%, var(--surface-2)); }
.mega-group[data-group="convert"] .mega-icon { background: color-mix(in srgb, #ff7a00 17%, var(--surface-2)); }
.mega-group[data-group="security"] .mega-icon { background: color-mix(in srgb, #e80046 17%, var(--surface-2)); }
.mega-group[data-group="image"] .mega-icon { background: color-mix(in srgb, #0b82f6 17%, var(--surface-2)); }
.mega-group[data-group="intelligence"] .mega-icon { background: color-mix(in srgb, #5837e8 17%, var(--surface-2)); }
.mega-empty { text-align: center; color: var(--muted); padding: 28px 0 10px; margin: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (max-width: 800px) {
  .popular-link { display: none; }
  .mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 801px) and (max-width: 1000px) { .mega-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 540px) {
  .site-header .wrap { min-height: 64px; padding-inline: 14px; }
  .brand { font-size: 1rem; }
  .brand-lockup { width: 132px; height: 36px; }
  .nav-links { gap: 8px; }
  .nav-links > a { display: none; }
  .mega-menu summary { min-height: 44px; padding: 7px 12px; }
  .mega-panel { inset: 72px 10px auto; width: auto; height: calc(100dvh - 82px); max-height: calc(100dvh - 82px); transform: none; padding: 16px; border-radius: 18px; }
  .mega-heading { align-items: stretch; flex-direction: column; gap: 10px; }
  .mega-search { width: 100%; }
  .mega-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* Hero */
.hero { padding: clamp(54px, 8vw, 96px) 0 clamp(42px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: clamp(30px, 6vw, 84px); align-items: center; }
.hero-copy { min-width: 0; }
.eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px;
  color: var(--accent); font-size: .78rem; font-weight: 850; text-transform: uppercase; letter-spacing: .13em;
}
.eyebrow span { font-size: .65rem; }
.hero h1 { max-width: 720px; font-size: clamp(3rem, 6.2vw, 5.6rem); line-height: .96; letter-spacing: -.065em; margin: 0 0 24px; }
.hero h1 .love { color: var(--love); }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 650px; margin: 0 0 28px; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-actions .btn { min-height: 50px; }
.hero-primary span { transition: transform .15s ease; }
.hero-primary:hover span { transform: translateY(2px); }
.badges { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; background: transparent;
  padding: 5px 0; font-size: .82rem; font-weight: 650; color: var(--muted);
}
.badge + .badge::before { content: ""; width: 1px; height: 16px; background: var(--border); margin-right: 3px; }
.badge > span { color: var(--accent); font-weight: 900; }
.badge b { color: var(--text); }
.hero-visual {
  position: relative; display: grid; place-items: center; min-height: 480px; isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--mint, #26b98b) 28%, var(--border)); border-radius: 42% 42% 34% 34% / 34% 34% 28% 28%;
  background: #fff; box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; border-radius: 999px; z-index: -1; }
.hero-visual::before { width: 130px; height: 130px; right: -28px; top: -30px; background: color-mix(in srgb, var(--love) 16%, transparent); }
.hero-visual::after { width: 90px; height: 90px; left: -22px; bottom: 18px; background: color-mix(in srgb, #26b98b 18%, transparent); }
.hero-visual img { width: 100%; height: 100%; min-height: inherit; object-fit: contain; object-position: center; }
.hero-orbit {
  position: absolute; z-index: 2; padding: 9px 13px; border: 1px solid var(--border); border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow);
  color: var(--text); font-size: .77rem; font-weight: 800; backdrop-filter: blur(8px);
}
.orbit-one { left: 16px; top: 22%; }
.orbit-two { right: 16px; bottom: 20%; }
.trust-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 30px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.trust-strip > div { display: flex; flex-direction: column; gap: 2px; padding: 20px 24px; }
.trust-strip > div + div { border-left: 1px solid var(--border); }
.trust-strip strong { font-size: .9rem; }
.trust-strip span { color: var(--muted); font-size: .82rem; }

.tool-finder {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin: 18px 0 4px; padding: 24px; border: 1px solid var(--border);
  border-radius: 20px; background: #17233c; color: #fff; box-shadow: var(--shadow-lg);
}
.tool-finder h2 { font-size: 1.15rem; margin: 0 0 2px; color: #fff; }
.tool-finder p { color: #c6cedb; font-size: .85rem; margin: 0; }
.home-search { width: min(440px, 50%); }
.home-search input {
  width: 100%; min-height: 50px; padding: 12px 14px 12px 44px; border: 1px solid #4a5770; border-radius: 13px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23647087' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 15px center;
  color: #17233c; font: inherit;
}
.home-search input:focus { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 2px; }
.home-empty { text-align: center; color: var(--muted); padding: 38px 16px 8px; }
@media (max-width: 640px) {
  .hero { padding-top: 42px; }
  .tool-finder { align-items: stretch; flex-direction: column; gap: 12px; }
  .home-search { width: 100%; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; }
  .hero-copy .eyebrow, .hero-actions, .badges { justify-content: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-visual { width: min(560px, 90%); min-height: 440px; margin-inline: auto; }
}

@media (max-width: 620px) {
  .hero h1 { font-size: clamp(2.8rem, 14vw, 4.25rem); }
  .hero-visual { width: calc(100% - 12px); min-height: 350px; border-radius: 32px; }
  .hero-visual img { width: 100%; }
  .hero-orbit { font-size: .7rem; padding: 7px 10px; }
  .orbit-one { left: 10px; top: 18%; }
  .orbit-two { right: 10px; bottom: 14%; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip > div { padding: 16px 18px; }
  .trust-strip > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .hero-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .badges { gap: 4px 10px; }
  .badge + .badge::before { display: none; }
}

/* Tool grid */
.home-group { padding-top: 18px; }
.section-title { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin: 30px 0 14px; }
.section-sub { color: var(--muted); margin: 0 0 20px; }
.grid {
  display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 0; min-height: 174px; padding: 19px; box-shadow: 0 1px 2px rgba(23, 35, 60, .04);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  display: flex; flex-direction: column; color: var(--text);
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--love) 70%, var(--border)); box-shadow: var(--shadow); text-decoration: none; }
.card .icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px; border-radius: 12px; background: var(--surface-2); font-size: 1.45rem; }
.tool-icon-svg { display: block; width: 24px; height: 24px; }
.card[data-group="organize"] .icon { color: #d94050; background: color-mix(in srgb, #ff4d5e 13%, var(--surface)); }
.card[data-group="edit"] .icon { color: #6941d9; background: color-mix(in srgb, #7c4dff 13%, var(--surface)); }
.card[data-group="optimize"] .icon { color: #087b5c; background: color-mix(in srgb, #16a36a 13%, var(--surface)); }
.card[data-group="convert"] .icon { color: #c75900; background: color-mix(in srgb, #ff7a00 13%, var(--surface)); }
.card[data-group="security"] .icon { color: #c7003c; background: color-mix(in srgb, #e80046 13%, var(--surface)); }
.card[data-group="image"] .icon { color: #056bc7; background: color-mix(in srgb, #0b82f6 13%, var(--surface)); }
.card[data-group="intelligence"] .icon { color: #5131d1; background: color-mix(in srgb, #5837e8 13%, var(--surface)); }
.card h3 { margin: 5px 0 5px; font-size: 1.04rem; }
.card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.card .group-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--love); font-weight: 700; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 0; padding: 17px; }
}

/* Tool page */
.breadcrumbs { display: flex; align-items: center; gap: 8px; padding-top: 22px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span[aria-hidden] { opacity: .55; }
.tool-head { text-align: center; padding: clamp(28px, 5vw, 52px) 0 12px; }
.tool-head .icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 20px; color: var(--love); background: color-mix(in srgb, var(--love) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--love) 22%, var(--border)); box-shadow: var(--shadow);
}
.tool-head .icon .tool-icon-svg { width: 30px; height: 30px; }
.tool-kicker { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 0 0 8px !important; color: var(--accent) !important; font-size: .75rem; font-weight: 850; text-transform: uppercase; letter-spacing: .11em; }
.tool-kicker span { font-size: .58rem; }
.tool-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0 8px; }
.tool-head > p:not(.tool-kicker) { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 1.02rem; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(18px, 4vw, 28px); margin: 24px auto;
  max-width: 920px;
}
.tool-workspace { position: relative; overflow: hidden; }
.tool-workspace::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--love), #26b98b); }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.workspace-heading > div { display: flex; align-items: center; gap: 10px; }
.step-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 999px; background: var(--text); color: var(--surface); font-size: .72rem; font-weight: 850; }
.workspace-heading strong { font-size: .94rem; }
.workspace-limit { color: var(--muted); font-size: .76rem; }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 46px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease; background: var(--surface-2);
}
.dropzone:hover, .dropzone.drag { border-color: var(--love); background: color-mix(in srgb, var(--love) 7%, var(--surface)); }
.dropzone-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 17px; color: var(--love); background: color-mix(in srgb, var(--love) 12%, var(--surface)); }
.dropzone-icon svg { width: 27px; height: 27px; }
.dropzone-action { display: inline-flex !important; align-items: center; justify-content: center; width: max-content; min-height: 36px; margin: 14px auto 0; padding: 7px 14px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--text) !important; font-weight: 800; box-shadow: 0 1px 2px rgba(23,35,60,.05); }
.dropzone:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 3px;
}
.dropzone strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.dropzone span { color: var(--muted); font-size: .9rem; }

.filelist { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.filelist li {
  display: flex; align-items: center; gap: 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: .92rem;
}
.filelist li .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist li .fsize { color: var(--muted); font-size: .82rem; }
.filelist li .drag-handle { cursor: grab; color: var(--muted); }
.filelist li button.remove {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.filelist li button.remove:hover { color: var(--love); }
.filelist li.dragging { opacity: .4; }

.options { display: grid; gap: 16px; margin-top: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=number], .field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .92rem;
}
.field input[type=range] { width: 100%; }
.field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .92rem;
  resize: vertical; min-height: 90px;
}
.field .hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.field.checkbox { display: flex; align-items: center; gap: 8px; }
.field.checkbox label { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--love); color: #fff; border: none; border-radius: 10px;
  min-height: 46px; padding: 12px 24px; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer;
  transition: background .12s ease, transform .12s ease;
}
.btn:hover { background: var(--love-dark); text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; margin-top: 22px; }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--border); }

.progress { margin-top: 20px; }
.progress .bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--love), var(--accent)); transition: width .2s ease; }
.progress .label { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 8px; }
.processing-note { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.processing-note span { color: var(--accent); font-weight: 900; }

.result { text-align: center; padding: 30px 20px; }
.result-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto; border-radius: 18px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.result-mark svg { width: 30px; height: 30px; }
.result h3 { margin: 10px 0 6px; }
.result p { color: var(--muted); margin: 0 0 18px; }

.alert { background: color-mix(in srgb, var(--love) 12%, var(--surface)); border: 1px solid var(--love); color: var(--love-dark); border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin-top: 16px; }
@media (prefers-color-scheme: dark) { .alert { color: #ffb3ba; } }

/* thumbnails (organize) */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin-top: 20px; }
.thumb {
  position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--surface-2); cursor: grab;
}
.thumb canvas { display: block; width: 100%; height: auto; background: #fff; }
.thumb .pageno { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: .72rem; padding: 2px 6px; border-radius: 6px; }
.thumb .ctrls { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.thumb .ctrls button { border: none; background: rgba(0,0,0,.65); color: #fff; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: .8rem; line-height: 1; }
.thumb .ctrls button:hover { background: var(--love); }
.thumb.dragging { opacity: .35; }
.thumb.removed { display: none; }

/* content sections */
.prose { max-width: 720px; margin: 30px auto; }
.prose h2 { font-size: 1.3rem; margin-top: 28px; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.related { margin: 40px 0; }
.related .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.brand-story {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 7vw, 90px); align-items: start;
  margin: clamp(64px, 10vw, 120px) 0; padding: clamp(28px, 5vw, 52px);
  border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--border);
}
.brand-story h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.045em; }
.brand-story > p { margin: 32px 0 0; color: var(--muted); font-size: 1.05rem; }
.brand-story a { font-weight: 800; white-space: nowrap; }
@media (max-width: 700px) {
  .brand-story { grid-template-columns: 1fr; gap: 10px; margin-block: 64px; padding: 26px 22px; }
  .brand-story > p { margin-top: 8px; }
}

/* Blog */
.blog-hero { max-width: 880px; padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 78px); }
.blog-hero h1, .blog-collection-head h1 { margin: 0 0 20px; font-size: clamp(2.8rem, 7vw, 5.8rem); line-height: .96; letter-spacing: -.065em; }
.blog-hero > p:not(.eyebrow), .blog-collection-head > p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.24rem); }
.blog-filter { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.blog-filter a, .article-tags a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 7px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .82rem; font-weight: 750;
}
.blog-filter a:hover, .blog-filter a.active, .article-tags a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.blog-feature, .blog-archive { margin-bottom: clamp(68px, 10vw, 120px); }
.section-label { margin: 0 0 18px; color: var(--muted); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.blog-card {
  display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 22px;
  background: var(--surface); box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.blog-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: var(--shadow-lg); }
.blog-card-image { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--surface-2); }
.blog-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.025); }
.blog-card-copy { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.blog-card h2 { margin: 13px 0 10px; font-size: clamp(1.3rem, 2.2vw, 1.72rem); }
.blog-card h2 a { color: var(--text); }
.blog-card h2 a:hover { color: var(--love); text-decoration: none; }
.blog-card p { margin: 0 0 20px; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; font-weight: 800; }
.text-link:hover { text-decoration: none; }
.text-link span { transition: transform .15s ease; }
.text-link:hover span { transform: translateX(3px); }
.blog-card-featured { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); }
.blog-card-featured .blog-card-image { aspect-ratio: auto; min-height: 390px; background: #fff8f3; }
.blog-card-featured .blog-card-image img { object-fit: contain; object-position: center; }
.blog-card-featured:hover .blog-card-image img { transform: none; }
.blog-card-featured .blog-card-copy { justify-content: center; padding: clamp(30px, 5vw, 58px); }
.blog-card-featured h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); letter-spacing: -.045em; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.section-heading > a, .rss-link { font-weight: 800; white-space: nowrap; }
.blog-collection-head { padding: 34px 0 56px; }
.blog-collection-head .breadcrumbs { margin-bottom: 54px; }
.blog-collection-head .eyebrow { margin-top: 0; }

.blog-article { margin-bottom: 96px; }
.article-head { max-width: 900px; padding: 34px 0 44px; }
.article-head .breadcrumbs { margin-bottom: 58px; }
.article-head h1 { margin: 16px 0 20px; font-size: clamp(2.7rem, 6.6vw, 5.5rem); line-height: .98; letter-spacing: -.06em; }
.article-deck { max-width: 820px; margin: 0 0 24px; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.3rem); }
.article-meta, .article-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .8rem; font-weight: 650; }
.article-meta > span, .article-byline > span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta > span:not(:last-child)::after, .article-byline > span:not(:last-child)::after { content: ""; width: 3px; height: 3px; margin-left: 8px; border-radius: 50%; background: var(--muted); }
.article-category { color: var(--love); font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.article-category:hover { text-decoration: none; }
.article-cover { overflow: hidden; margin: 0 0 clamp(44px, 7vw, 76px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.article-cover img { display: block; width: 100%; height: auto; }
.article-layout { display: grid; grid-template-columns: 210px minmax(0, 720px); justify-content: center; gap: clamp(38px, 7vw, 84px); align-items: start; }
.article-toc { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 9px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.article-toc strong { margin-bottom: 4px; font-size: .8rem; }
.article-toc a { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.article-toc a:hover { color: var(--accent); text-decoration: none; }
.article-toc .toc-level-3 { padding-left: 12px; }
.article-content { min-width: 0; font-size: 1.04rem; }
.article-content > :first-child { margin-top: 0; }
.article-content h2 { margin: 2.6em 0 .75em; font-size: clamp(1.65rem, 3.2vw, 2.25rem); scroll-margin-top: 100px; }
.article-content h3 { margin: 2em 0 .65em; font-size: 1.35rem; scroll-margin-top: 100px; }
.article-content p, .article-content ul, .article-content ol { margin: 0 0 1.35em; }
.article-content li + li { margin-top: .45em; }
.article-content blockquote { margin: 2em 0; padding: 18px 22px; border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; background: var(--surface-2); color: var(--muted); }
.article-content code { padding: .15em .38em; border-radius: 5px; background: var(--surface-2); font-size: .9em; }
.article-content pre { overflow: auto; padding: 18px; border-radius: 14px; background: #101a30; color: #eef3f9; }
.article-content pre code { padding: 0; background: none; color: inherit; }
.article-content img { display: block; height: auto; margin: 2em auto; border-radius: 16px; }
.article-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 2em 0; }
.article-content th, .article-content td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--border); }
.article-tools { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.3fr); gap: 36px; margin: 76px 0; padding: clamp(26px, 5vw, 48px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-2); }
.article-tools h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.15rem); }
.article-tools > div:last-child { display: grid; gap: 9px; }
.article-tools > div:last-child > a { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--text); }
.article-tools a:hover { border-color: var(--accent); text-decoration: none; }
.article-tools a strong, .article-tools a small { display: block; }
.article-tools a small { color: var(--muted); }
.related-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); color: var(--accent); }
.related-icon svg { width: 22px; height: 22px; }
.article-related { margin-top: 80px; }

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-card-featured { grid-template-columns: 1fr; }
  .blog-card-featured .blog-card-image { min-height: 0; aspect-ratio: 1200 / 630; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { position: static; }
}
@media (max-width: 600px) {
  .blog-hero { padding-top: 52px; }
  .blog-hero h1, .blog-collection-head h1, .article-head h1 { font-size: 2.65rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-copy { padding: 20px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .article-head .breadcrumbs { margin-bottom: 40px; }
  .article-cover { margin-inline: -8px; border-radius: 20px; }
  .article-tools { grid-template-columns: 1fr; gap: 22px; margin-block: 56px; padding: 24px 18px; }
}

/* footer */
.site-footer {
  position: relative; overflow: hidden; margin-top: 88px; padding: 0 0 max(26px, env(safe-area-inset-bottom));
  background: #101a30; color: #b9c4d7; font-size: .9rem;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 88% 8%, rgba(38, 185, 139, .13), transparent 29%), radial-gradient(circle at 5% 55%, rgba(240, 90, 85, .08), transparent 24%);
}
.footer-wrap { position: relative; }
.footer-cta {
  display: grid; grid-template-columns: minmax(0, 1fr) 230px; align-items: center; min-height: 265px;
  margin-top: -1px; padding: clamp(30px, 5vw, 52px) clamp(26px, 6vw, 72px) 0;
  border: 1px solid rgba(255, 255, 255, .11); border-top: 0; border-radius: 0 0 28px 28px;
  background: linear-gradient(125deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); overflow: hidden;
}
.footer-cta-copy { position: relative; z-index: 1; align-self: center; padding-bottom: clamp(30px, 5vw, 52px); }
.footer-kicker { display: inline-flex; align-items: center; gap: 9px; color: #79dbbd; font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.footer-kicker > span { width: 8px; height: 8px; border-radius: 50%; background: #26b98b; box-shadow: 0 0 0 5px rgba(38,185,139,.13); }
.footer-cta h2 { max-width: 650px; margin: 12px 0 10px; color: #fff8f3; font-size: clamp(1.8rem, 4vw, 3.2rem); letter-spacing: -.05em; }
.footer-cta p { max-width: 620px; margin: 0 0 22px; color: #c3cddd; font-size: clamp(.95rem, 1.6vw, 1.08rem); }
.footer-cta-button { min-height: 48px; padding-inline: 20px; }
.footer-cta-button span { display: inline-block; margin-left: 7px; transition: transform .15s ease; }
.footer-cta-button:hover span { transform: translateX(3px); }
.footer-mascot { align-self: end; width: 230px; height: 230px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 18px 25px rgba(0,0,0,.22)); }
.footer-main { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(0, 1.35fr); gap: clamp(40px, 8vw, 96px); padding: 48px 0 38px; }
.site-footer a { color: #c3cddd; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-privacy-link { padding: 0; border: 0; background: none; color: #c3cddd; font: inherit; cursor: pointer; }
.footer-privacy-link:hover { color: #fff; }
.footer-intro p { max-width: 360px; margin: 14px 0 18px; }
.footer-signals { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-signals span { padding: 6px 10px; border: 1px solid rgba(255,255,255,.11); border-radius: 999px; color: #dbe3ee; font-size: .75rem; font-weight: 750; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.footer-nav > div { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.footer-nav h2 { margin: 0 0 7px; color: #fff8f3; font-size: .83rem; letter-spacing: .02em; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); color: #8f9cb1; font-size: .78rem; }
@media (max-width: 820px) {
  .footer-cta { grid-template-columns: minmax(0, 1fr) 170px; min-height: 240px; padding-inline: 30px; }
  .footer-mascot { width: 180px; height: 200px; }
  .footer-main { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 520px) {
  .site-footer { margin-top: 64px; }
  .footer-cta { grid-template-columns: 1fr 92px; min-height: 0; padding: 30px 20px 0; border-radius: 0 0 22px 22px; }
  .footer-cta-copy { padding-bottom: 30px; }
  .footer-cta h2 { font-size: 1.9rem; }
  .footer-cta p { font-size: .92rem; }
  .footer-cta-button { width: 100%; justify-content: center; }
  .footer-mascot { width: 108px; height: 150px; margin-right: -15px; }
  .footer-main { padding: 36px 0 30px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .footer-nav > div:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-nav > div:last-child h2 { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 5px; }
}

/* preview (image tools) */
.preview-mount { margin-top: 20px; text-align: center; }
.preview-mount canvas, .preview-mount img {
  max-width: 100%; max-height: 460px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; box-shadow: var(--shadow);
}
.preview-mount .hint { margin-top: 8px; }

.result-text {
  text-align: left; white-space: pre-wrap; word-break: break-word;
  max-height: 320px; overflow: auto; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0 0 18px;
}

.hidden { display: none !important; }

.consent-panel {
  position: fixed; z-index: 1000; right: 20px; bottom: 20px; left: 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 28px; max-width: 980px; margin-inline: auto; padding: 20px 22px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 20px; background: #17233c; color: #eef3f9;
  box-shadow: 0 24px 70px rgba(10,18,35,.32);
}
.consent-panel[hidden] { display: none; }
.consent-copy { max-width: 650px; }
.consent-copy strong { display: block; margin-bottom: 5px; color: #fff; font-size: 1rem; }
.consent-copy p { margin: 0 0 5px; color: #c3cddd; font-size: .86rem; line-height: 1.5; }
.consent-copy a { color: #79dbbd; font-size: .82rem; font-weight: 750; }
.consent-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.consent-actions .btn { min-height: 44px; padding: 10px 16px; white-space: nowrap; }
.consent-decline { border-color: rgba(255,255,255,.2); color: #fff; }
@media (max-width: 680px) {
  .consent-panel { right: 12px; bottom: 12px; left: 12px; align-items: stretch; flex-direction: column; gap: 16px; padding: 18px; }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .consent-actions .btn { width: 100%; }
}

@media (max-width: 540px) {
  .panel { margin-inline: -2px; }
  .dropzone { padding: 34px 16px; }
  .options { grid-template-columns: 1fr; }
  .filelist li { align-items: flex-start; flex-wrap: wrap; }
  .filelist li .fname { flex-basis: calc(100% - 42px); }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result .btn { width: 100%; margin-inline: 0 !important; }
  .workspace-heading { align-items: flex-start; }
  .workspace-limit { max-width: 110px; text-align: right; }
  .breadcrumbs { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
}

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