/*
 * Zysnor design system. Loaded last on every page, so it sets the final
 * type scale, spacing, controls and colour tokens for both sections.
 * Light and dark mode: follows the system setting unless the visitor picks
 * one with the theme button (stored as data-theme on <html>).
 */

/* ---------- Scale ---------- */
:root {
  --fs-xs: .875rem;      /* 14px: captions, badges */
  --fs-sm: .9375rem;     /* 15px: secondary text */
  --fs-base: 1.0625rem;  /* 17px: body */
  --fs-lg: 1.1875rem;    /* 19px: lead */
  --fs-xl: 1.3125rem;    /* 21px: h3 */
  --fs-2xl: clamp(1.4rem, 1.15rem + 1vw, 1.75rem);    /* h2: 22-28px */
  --fs-3xl: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);  /* page h1: 28-40px */
  --fs-display: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem); /* landing h1: 34-52px */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem;
  --radius-sm: 10px; --radius: 14px; --radius-lg: 20px;
  --tap: 48px;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Colour tokens: tools, home and legal pages ---------- */
body.theme-tools, body.theme-home {
  --bg: #f8f7f3; --panel: #ffffff; --panel-2: #f3f1ea; --line: #e3dfd3; --line-strong: #cfc9b8;
  --ink: #111a2e; --muted: #4b566b; --accent: #0a6f82; --accent-ink: #ffffff;
  --cta: #f5b524; --cta-hover: #ffc640; --cta-ink: #1a1200; --cta-edge: #c98f08;
  --ok-bg: #e5f5ec; --ok-ink: #135235; --err-bg: #fdecea; --err-ink: #8a1f17; --info-bg: #eaf6f8; --info-ink: #0b4d5a;
  --drop: #fffaf0; --drop-active: #fff1c9; --shadow: 0 1px 2px #1b2a4a14, 0 8px 24px -16px #1b2a4a40;
  --cyan: var(--accent);
}
html[data-theme="dark"] body.theme-tools, html[data-theme="dark"] body.theme-home {
  --bg: #0e1320; --panel: #151c2c; --panel-2: #1b2336; --line: #283349; --line-strong: #37445f;
  --ink: #e9eef7; --muted: #aab5c8; --accent: #62d3e6; --accent-ink: #062027;
  --cta: #f5b524; --cta-hover: #ffc640; --cta-ink: #1a1200; --cta-edge: #a87505;
  --ok-bg: #12372a; --ok-ink: #a6ecc8; --err-bg: #3f1a17; --err-ink: #ffc2bc; --info-bg: #10303a; --info-ink: #b4ecf6;
  --drop: #182134; --drop-active: #2a2a1c; --shadow: 0 1px 2px #0006, 0 10px 28px -18px #000c;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body.theme-tools, html:not([data-theme="light"]) body.theme-home {
    --bg: #0e1320; --panel: #151c2c; --panel-2: #1b2336; --line: #283349; --line-strong: #37445f;
    --ink: #e9eef7; --muted: #aab5c8; --accent: #62d3e6; --accent-ink: #062027;
    --cta: #f5b524; --cta-hover: #ffc640; --cta-ink: #1a1200; --cta-edge: #a87505;
    --ok-bg: #12372a; --ok-ink: #a6ecc8; --err-bg: #3f1a17; --err-ink: #ffc2bc; --info-bg: #10303a; --info-ink: #b4ecf6;
    --drop: #182134; --drop-active: #2a2a1c; --shadow: 0 1px 2px #0006, 0 10px 28px -18px #000c;
    color-scheme: dark;
  }
}
body.theme-software {
  --panel-2: #14263f; --line-strong: #2f4b6e; --accent: #5fd8ec; --accent-ink: #04202a;
  --cta: #f5b524; --cta-hover: #ffc640; --cta-ink: #1a1200; --cta-edge: #a87505;
  --ok-bg: #12372a; --ok-ink: #a6ecc8; --err-bg: #3f1a17; --err-ink: #ffc2bc; --info-bg: #10303a; --info-ink: #b4ecf6;
  --drop: #12233a; --drop-active: #1c3350; --shadow: 0 1px 2px #0006, 0 12px 30px -18px #000c;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body.theme-tools, body.theme-home, body.theme-software {
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.theme-tools, body.theme-home { background: var(--bg); color: var(--ink); }
.theme-tools h1, .theme-tools h2, .theme-tools h3,
.theme-home h1, .theme-home h2, .theme-home h3,
.theme-software h1, .theme-software h2, .theme-software h3 {
  line-height: 1.18; letter-spacing: -.02em; font-weight: 750; text-wrap: balance;
}
body h1, body .page-intro h1, body .home-intro h1, body .product-home h1 {
  font-size: var(--fs-3xl); max-width: 24ch; margin: 0 0 var(--sp-3);
}
body.theme-home .gateway h1, body .home-intro h1, body .product-home h1, body.theme-software .software-hero h1 {
  font-size: var(--fs-display);
}
body h2, body .founder-copy h2 { font-size: var(--fs-2xl); }
body h3, body .tool-card h3 { font-size: var(--fs-xl); }
body p, body li, body dd { font-size: inherit; }
body .lead { font-size: var(--fs-lg); line-height: 1.55; max-width: 60ch; color: var(--muted); }
body .label, body .gateway-kicker, body .guide-number { font-size: var(--fs-xs); letter-spacing: .08em; }
body small, body .language-status, body figcaption, body .scene-caption { font-size: var(--fs-xs); }
body .guide-window b, body .guide-field b, body .guide-field, body .guide-action, body .guide-result, body .guide-window { font-size: var(--fs-xs); }
.theme-tools p, .theme-home p { text-wrap: pretty; }

/* Readable links */
.theme-tools main a:not(.cta):not(.secondary-action):not(.chip):not(.tool-tile),
.theme-home main a:not(.cta):not(.secondary-action):not(.chip):not(.tool-tile) {
  color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px;
}

/* ---------- Focus ---------- */
body :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
body .cta, body button.cta, body a.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: var(--tap); padding: .7rem 1.35rem; border: 0; border-radius: var(--radius-sm);
  background: var(--cta); color: var(--cta-ink); box-shadow: 0 2px 0 var(--cta-edge);
  font: 750 var(--fs-base)/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
body .cta:hover { background: var(--cta-hover); }
body .cta:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--cta-edge); }
body .cta:disabled, body .cta[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; }
body .secondary-action, body .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: .6rem 1.1rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink); font: 700 var(--fs-sm)/1.2 var(--font); text-decoration: none; cursor: pointer;
}
body .secondary-action:hover, body .btn-ghost:hover { border-color: var(--accent); }
.theme-tools button:not(.cta):not(.btn-ghost):not(.icon-btn):not(.chip):not(.scene-replay),
.theme-tools .utility-form button:not(.cta) {
  min-height: 44px; padding: .5rem .95rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: 650 var(--fs-sm)/1.2 var(--font); cursor: pointer;
}
.cta .ico, .btn-ghost .ico, .icon-btn .ico { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Forms ---------- */
.theme-tools label, .theme-home label { font-weight: 650; font-size: var(--fs-sm); color: var(--ink); }
.theme-tools input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),
.theme-tools select, .theme-tools textarea, .theme-home input:not([type=checkbox]):not([type=radio]), .theme-home select, .theme-home textarea {
  min-height: var(--tap); padding: .65rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink); font: 500 var(--fs-base)/1.4 var(--font); width: 100%; max-width: 100%;
}
.theme-tools textarea { min-height: 9rem; line-height: 1.55; resize: vertical; }
.theme-tools input[type=checkbox], .theme-tools input[type=radio] { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.theme-tools input::placeholder, .theme-tools textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.theme-tools input:focus, .theme-tools select:focus, .theme-tools textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent); }

/* Status messages: one style for success, error and progress */
.theme-tools .utility-status:not(:empty), .theme-tools [role=status].study-status:not(:empty) {
  display: flex; align-items: flex-start; gap: .55rem; margin: var(--sp-3) 0 0; padding: .75rem .95rem;
  border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info-ink); font-weight: 600; font-size: var(--fs-sm);
}
.theme-tools .utility-status[data-state=ok], .theme-tools .is-ok { background: var(--ok-bg) !important; color: var(--ok-ink) !important; }
.theme-tools .utility-status[data-state=error], .theme-tools .is-error { background: var(--err-bg) !important; color: var(--err-ink) !important; }
.theme-tools .utility-status[data-state=busy]::before {
  content: ""; width: 1rem; height: 1rem; margin-top: .15rem; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: zy-spin .8s linear infinite;
}
@keyframes zy-spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.theme-tools .product-header, .theme-home .product-header {
  background: color-mix(in srgb, var(--panel) 92%, transparent); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(1.4) blur(8px);
}
.product-header .product-bar { padding-block: .55rem; gap: .5rem 1.2rem; }
.product-header .product-nav a { min-height: 44px; padding: .4rem .8rem; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.theme-tools .product-nav a, .theme-home .product-nav a { color: var(--ink); }
.theme-tools .product-nav a:hover, .theme-home .product-nav a:hover { background: var(--panel-2); }
.theme-tools .product-nav a[data-active], .theme-tools .product-nav a[aria-current], .theme-home .product-nav a[aria-current] {
  background: color-mix(in srgb, var(--cta) 22%, var(--panel)); color: var(--ink); box-shadow: inset 0 -3px var(--cta);
}
.header-tools { display: flex; align-items: center; gap: .35rem; justify-self: end; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line); }
.icon-btn svg { width: 22px; height: 22px; }
.theme-software .icon-btn { color: #dce7f2; }
.theme-software .icon-btn:hover { background: #15283f; border-color: #233a57; }
.install-btn[hidden] { display: none; }
.install-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .8rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: 700 var(--fs-xs)/1 var(--font); cursor: pointer; }
.install-btn svg { width: 18px; height: 18px; }
.product-header .language-picker label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.product-header .language-picker select { min-height: 40px; max-width: 9.5rem; padding: .35rem .6rem; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.theme-tools .language-picker select, .theme-home .language-picker select { background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); }
html[data-theme="dark"] .theme-tools .product-header .brand img, html[data-theme="dark"] .theme-home .product-header .brand img { content: url("zysnor-logo-light.png"); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-tools .product-header .brand img, html:not([data-theme="light"]) .theme-home .product-header .brand img { content: url("zysnor-logo-light.png"); }
}
@media (max-width: 760px) {
  .product-header .product-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .product-header .product-nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    justify-self: stretch; margin-inline: -4px; padding: 0 4px 2px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .product-header .product-nav::-webkit-scrollbar { display: none; }
  .product-header .product-nav a { white-space: nowrap; flex: none; }
  .product-header .language-picker { grid-column: auto; grid-row: auto; }
  .product-header .language-picker select { max-width: 7.2rem; }
  .product-header .brand img { width: 128px; }
  .install-btn .install-label { display: none; }
}

/* ---------- Layout ---------- */
.theme-tools .product-main, .theme-home .product-main { padding-block: var(--sp-5) var(--sp-8); }
.theme-tools .section, .theme-home .section { padding-block: var(--sp-6); }
.theme-tools .card, .theme-home .card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink);
}
.theme-tools .card:hover { border-color: var(--line-strong); }
.theme-tools .utility-help, .theme-tools aside.prose { background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); }
.theme-tools .prose p, .theme-tools .prose li, .theme-tools p { color: inherit; }
.theme-tools .lead, .theme-tools .muted { color: var(--muted); }

/* Breadcrumb that replaces the separate back link */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; margin: 0 0 var(--sp-2); padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: .4rem; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; text-decoration: none !important; }
.crumbs a:hover { text-decoration: underline !important; }

/* ---------- Tool page ---------- */
.theme-tools .tool-intro { display: block; padding: var(--sp-2) 0 var(--sp-4); margin: 0; border: 0; min-height: 0; }
.theme-tools .tool-intro .lead { margin: 0; }
.theme-tools .tool-intro-copy { max-width: none; }
.tool-trust { display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.tool-trust li { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); font-weight: 650; }
.tool-trust svg { width: 15px; height: 15px; color: var(--accent); }
.theme-tools .tool-workspace { padding-top: 0; gap: var(--sp-5); border: 0; }
.theme-tools .utility-panel { padding: clamp(1rem, 3vw, 1.75rem); border-radius: var(--radius-lg); }
.theme-tools .workspace-heading { font-size: var(--fs-xl); margin: 0 0 var(--sp-4); }
.theme-tools .utility-form { display: grid; gap: var(--sp-3); }
.theme-tools .utility-form > .cta { justify-self: start; min-width: 12rem; }
@media (max-width: 560px) { .theme-tools .utility-form > .cta, .theme-tools .utility-form > a.cta { width: 100%; justify-self: stretch; } }
.theme-tools .utility-help { border-radius: var(--radius-lg); padding: var(--sp-5); font-size: var(--fs-sm); }
.theme-tools .utility-help h2 { font-size: var(--fs-lg) !important; }
.theme-tools .utility-help ol { padding-inline-start: 1.2rem; }
.theme-tools .utility-help li { margin-bottom: .35rem; }
.workspace-example { border-inline-start: 3px solid var(--cta); padding-inline-start: .8rem; }

/* Drop zone added by zysnor-app.js to every file input */
.dropzone {
  position: relative; display: grid; justify-items: center; gap: .35rem; text-align: center;
  padding: clamp(1.25rem, 4vw, 2.25rem) 1rem; border: 2px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--drop); color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone.is-dragover { background: var(--drop-active); border-color: var(--cta); border-style: solid; transform: scale(1.01); }
.dropzone:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.dropzone > input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-icon { width: 44px; height: 44px; color: var(--accent); }
.dropzone-title { font-size: var(--fs-lg); font-weight: 750; }
.dropzone-hint { font-size: var(--fs-sm); color: var(--muted); }
.dropzone-btn { pointer-events: none; margin-top: .35rem; }
.dropzone-files { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin: .35rem 0 0; padding: 0; list-style: none; }
.dropzone-files li { max-width: 100%; padding: .25rem .6rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone-error { margin: 0; padding: .6rem .85rem; border-radius: var(--radius-sm); background: var(--err-bg); color: var(--err-ink); font-weight: 650; font-size: var(--fs-sm); }
.dropzone-error[hidden] { display: none; }
label.dropzone-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Result actions added after a result appears */
.result-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--sp-3); }
.result-actions[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, 150%);
  max-width: min(92vw, 28rem); padding: .75rem 1.1rem; border-radius: 999px; background: #111a2e; color: #fff; font-weight: 650; font-size: var(--fs-sm);
  box-shadow: 0 10px 30px #0005; transition: transform .25s var(--ease); pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); }

/* Bookmark and install tip: small inline strip, never a pop-up */
.save-tip { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .75rem; margin: var(--sp-4) 0 0; padding: .6rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--muted); font-size: var(--fs-sm); }
.save-tip[hidden] { display: none; }
.save-tip svg { width: 18px; height: 18px; color: var(--cta-edge); flex: none; }
.save-tip kbd { padding: .05rem .4rem; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; font: 650 var(--fs-xs) var(--font); color: var(--ink); background: var(--panel-2); }
.save-tip .tip-close { margin-inline-start: auto; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0 !important; background: transparent !important; color: var(--muted) !important; font-size: 1.25rem; line-height: 1; }

/* Reserved ad space: sits below the tool, never above it */
.ad-slot { margin: var(--sp-5) auto; min-height: 0; text-align: center; }
.ad-slot[hidden] { display: none; }
.ad-slot.is-live { min-height: 280px; }
.ad-slot::before { content: "Advertisement"; display: block; font-size: var(--fs-xs); color: var(--muted); margin-bottom: .25rem; }

/* Visual guide: animation sits below the tool */
.theme-tools .visual-guide { display: grid; gap: var(--sp-4); }
.theme-tools .visual-guide .tool-scene { margin: 0; max-width: 34rem; }
.guide-skip { justify-self: start; font-size: var(--fs-sm); }
.theme-tools .guide-step { background: var(--panel); border-color: var(--line); color: var(--ink); }
.theme-tools .guide-screen { background: var(--panel-2); border-color: var(--line); }
.theme-tools .guide-window { background: var(--panel-2); border-color: var(--line); color: var(--muted); }
.theme-tools .guide-field { background: var(--panel); border-color: var(--line-strong); color: var(--ink); }

/* FAQ */
.theme-tools details, .theme-home details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: .6rem; }
.theme-tools details > summary, .theme-home details > summary {
  display: flex; align-items: center; gap: .6rem; min-height: var(--tap); padding: .7rem 1rem; cursor: pointer; font-weight: 700; list-style: none;
}
.theme-tools details > summary::-webkit-details-marker { display: none; }
.theme-tools details > summary::after, .theme-home details > summary::after {
  content: ""; margin-inline-start: auto; width: .6rem; height: .6rem; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s;
}
.theme-tools details[open] > summary::after, .theme-home details[open] > summary::after { transform: rotate(-135deg); }
.theme-tools details > :not(summary), .theme-home details > :not(summary) { padding: 0 1rem .9rem; margin: 0; }

/* Related and recent tools */
.tool-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.tool-tile { display: flex; align-items: center; gap: .8rem; min-height: 64px; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tool-tile:hover { border-color: var(--cta); transform: translateY(-2px); }
.tool-tile .tile-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--tile, var(--accent)) 16%, var(--panel)); color: var(--tile, var(--accent)); }
.tool-tile .tile-icon svg { width: 22px; height: 22px; }
.tool-tile strong { display: block; font-size: var(--fs-base); line-height: 1.25; }
.tool-tile span.tile-desc { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.35; margin-top: .15rem; }
.recent-tools[hidden] { display: none; }

/* Search */
.site-search { position: relative; max-width: 40rem; }
.site-search input[type=search] { padding-inline-start: 2.9rem !important; min-height: 56px !important; font-size: var(--fs-lg) !important; border-radius: 999px !important; box-shadow: var(--shadow); }
.site-search svg { position: absolute; left: 1rem; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-results { margin-top: var(--sp-3); }
.search-empty { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: var(--sp-4) 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--ink); font: 650 var(--fs-sm)/1 var(--font); text-decoration: none; cursor: pointer; }
.chip:hover, .chip[aria-pressed=true] { border-color: var(--cta); background: color-mix(in srgb, var(--cta) 18%, var(--panel)); }
.chip svg { width: 18px; height: 18px; color: var(--tile, var(--accent)); }

/* Feedback panel */
.theme-tools .tool-feedback { margin-top: var(--sp-5); }

/* Footer */
.theme-tools .product-footer, .theme-home .product-footer { background: #0f1729; color: #c7d0e0; }
.site-footer h2 { font-size: var(--fs-sm) !important; letter-spacing: .04em; }
.site-footer a { display: inline-flex; min-height: 36px; align-items: center; font-size: var(--fs-sm); }
.site-footer .footer-bottom { font-size: var(--fs-xs); }

/* Legal pages and long text */
.theme-tools .legal, .theme-home .legal, .legal { max-width: 72ch; }
.legal h2 { margin-top: var(--sp-6); }

/* Tap targets inside content */
.theme-tools main a.arrow, .theme-home main a.arrow { display: inline-flex; align-items: center; min-height: 44px; }
.theme-tools .contact-list a, .theme-home .legal a, .theme-tools .legal a { padding-block: .35rem; display: inline-block; }

/* ---------- Software section ---------- */
.theme-software .label, .theme-software .gateway-kicker { font-size: var(--fs-xs); }
.theme-software .software-products a, .theme-software main .arrow { min-height: 44px; display: inline-flex; align-items: center; }
.theme-software .chip { background: #0f1e33; color: #e9f1f9; border-color: #2c4767; }
.theme-software button:not(.icon-btn):not(.cta):not(.chip) { min-height: 44px; font-size: var(--fs-sm); }
.theme-software details > summary { min-height: var(--tap); display: flex; align-items: center; }
.theme-software span, .theme-software button { font-size: max(var(--fs-xs), 1em); }

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

/* ---------- Dark mode: fix hard-coded light surfaces in older styles ---------- */
html[data-theme="dark"] .theme-tools .tool-scene, html[data-theme="dark"] .theme-tools .scene-stage { filter: brightness(.92); }
html[data-theme="dark"] .theme-tools .icon, html[data-theme="dark"] .theme-tools .card .icon { background: var(--panel-2); color: var(--accent); }
html[data-theme="dark"] .theme-tools mark { background: #6b5310; color: #fff; }
html[data-theme="dark"] .theme-tools table, html[data-theme="dark"] .theme-tools th, html[data-theme="dark"] .theme-tools td { border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .theme-tools canvas.signature-pad, html[data-theme="dark"] .theme-tools .image-previews img { background: #fff; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-tools .tool-scene, html:not([data-theme="light"]) .theme-tools .scene-stage { filter: brightness(.92); }
  html:not([data-theme="light"]) .theme-tools .icon, html:not([data-theme="light"]) .theme-tools .card .icon { background: var(--panel-2); color: var(--accent); }
  html:not([data-theme="light"]) .theme-tools mark { background: #6b5310; color: #fff; }
  html:not([data-theme="light"]) .theme-tools table, html:not([data-theme="light"]) .theme-tools th, html:not([data-theme="light"]) .theme-tools td { border-color: var(--line); color: var(--ink); }
}

/* Utility */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Header tools group ---------- */
.product-header .header-tools .language-picker { display: flex; align-items: center; gap: .3rem; }
.product-header .header-tools .language-translate { font-size: var(--fs-xs); }

/* ---------- Tools hub ---------- */
.tools-hub .hub-intro { padding: var(--sp-5) 0 var(--sp-4); border: 0; }
.tools-hub .hub-intro h1 { font-size: var(--fs-display); }
.tools-hub .site-search { margin-top: var(--sp-5); }
.tool-group .group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: var(--sp-4); }
.tool-group h2 { display: flex; align-items: center; gap: .65rem; margin: 0; }
.tool-group h2 .tile-icon, .theme-tools .tool-card .tile-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: color-mix(in srgb, var(--tile) 16%, var(--panel)); color: var(--tile); }
.tool-group h2 .tile-icon svg, .theme-tools .tool-card .tile-icon svg { width: 22px; height: 22px; }
.tools-hub .tool-group { padding-block: var(--sp-5); border-top: 1px solid var(--line); }

/* Category pages: the whole card opens the tool */
.theme-tools .tool-card[data-catalog-tool] { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-content: start; padding: 1.1rem 1.2rem; }
.theme-tools .tool-card[data-catalog-tool] .tile-icon { grid-row: span 2; }
.theme-tools .tool-card[data-catalog-tool] h2 { font-size: var(--fs-lg); margin: 0; align-self: center; }
.theme-tools .tool-card[data-catalog-tool] p { grid-column: 2; margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.theme-tools .tool-card[data-catalog-tool] .tool-card-open { grid-column: 2; position: static; min-height: 44px; font-weight: 700; }
.theme-tools .tool-card[data-catalog-tool] .tool-card-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.theme-tools .tool-card[data-catalog-tool] .tool-guide-link { grid-column: 2; position: relative; z-index: 1; min-height: 44px; font-size: var(--fs-sm); }
.theme-tools .tool-card[data-catalog-tool]:hover { border-color: var(--cta); }
.theme-tools .catalog-controls { max-width: 40rem; }
.theme-tools .catalog-search { display: grid; gap: .35rem; }
.dropzone .dropzone-btn { justify-self: center; background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; font-size: var(--fs-sm); min-height: 44px; }
.dropzone:hover .dropzone-btn { border-color: var(--accent); }

@media (min-width: 900px) {
  .theme-tools .visual-guide { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); align-items: start; column-gap: var(--sp-6); }
  .theme-tools .visual-guide > h2, .theme-tools .visual-guide > .guide-skip, .theme-tools .visual-guide > .guide-return { grid-column: 1 / -1; }
  .theme-tools .visual-guide .tool-scene { position: sticky; top: 6rem; }
}
.theme-tools .guide-steps { display: grid; gap: var(--sp-3); margin: 0; padding: 0; }
.theme-tools .guide-step { padding: var(--sp-4); gap: var(--sp-4); }
.theme-tools .guide-step h3 { font-size: var(--fs-lg); margin: 0 0 .2rem; }
.theme-tools .guide-number { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--cta); color: var(--cta-ink); font-weight: 800; letter-spacing: 0; }
.theme-tools .tool-feedback { background: var(--panel); color: var(--ink); border-color: var(--line); }
.theme-tools .tool-feedback summary { color: var(--ink); }
body .tool-tile, body .tool-tile strong { color: var(--ink) !important; text-decoration: none !important; }
.theme-tools .tool-card[data-catalog-tool] .tool-card-open { justify-self: start; padding: 0; border: 0; background: none; box-shadow: none; color: var(--accent); }
.theme-tools .compact-intro { padding-top: var(--sp-2); }
/* Tap targets for links that sit outside running text */
.theme-tools .guide-skip, .theme-tools .guide-return, .theme-tools .utility-help a, .theme-tools .related-tools h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.theme-tools .scene-replay { min-height: 44px; min-width: 64px; padding: .4rem .9rem; font-size: var(--fs-sm); }
.theme-tools .related-tools .card { position: relative; }
.theme-tools .related-tools h3 a { color: var(--ink) !important; text-decoration: none !important; }
.theme-tools .related-tools h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.theme-tools .related-tools .card:hover { border-color: var(--cta); }
.theme-tools .related-tools .card p { color: var(--muted); font-size: var(--fs-sm); }

/* =========================================================
   Direction A · Workbench (approved 11 Nov 2026)
   Headings: Inter Display (self-hosted, OFL). Body: system UI font.
   ========================================================= */
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-ExtraBold.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
:root { --font-display: "Inter Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif; }
body h1, body h2, body .dropzone-title, body .workspace-heading { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; }
body h3, body .tool-tile strong { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }

/* Micro-interactions */
body .cta { will-change: transform; }
@media (hover: hover) {
  body .cta:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--cta-edge), 0 10px 22px -12px var(--cta-edge); }
  .theme-tools .card, .tool-tile, .cat-tile, .product-card { transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
  .theme-tools .related-tools .card:hover, .cat-tile:hover, .product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -22px #1b2a4a80; }
}
.dropzone.is-dragover .dropzone-icon { animation: zy-bob .7s var(--ease) infinite alternate; }
@keyframes zy-bob { to { transform: translateY(-6px); } }

/* Home */
.home-a { padding: 0; }
.eyebrow { display: inline-flex; align-self: flex-start; margin: 0; padding: .35rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); font-weight: 700; font-size: var(--fs-xs); }
.eyebrow-dark { background: #2a2a1c; color: #f5c66a; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; }
.hero-a { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem); }
.hero-a-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.hero-a-copy { display: flex; flex-direction: column; gap: var(--sp-4); }
.hero-a-copy h1 { font-size: var(--fs-display); max-width: 18ch; margin: 0; line-height: 1.08; }
.hero-a-copy .lead { margin: 0; }
.hero-search { display: flex; align-items: center; gap: .5rem; padding: .4rem .4rem .4rem 1rem; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow); max-width: 36rem; }
.hero-search .search-icon { position: static; transform: none; width: 22px; height: 22px; flex: none; color: var(--muted); }
.hero-search input[type=search] { border: 0 !important; box-shadow: none !important; min-height: 48px !important; padding: 0 .25rem !important; background: transparent !important; font-size: var(--fs-lg) !important; }
.hero-search input[type=search]:focus { outline: none; }
.hero-search:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.hero-search .cta { border-radius: 999px; min-height: 48px; flex: none; }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.hero-points li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-points svg { width: 18px; height: 18px; color: var(--accent); }
.hero-art { position: relative; min-height: 360px; border-radius: 28px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(160deg, var(--panel), var(--panel-2)); }
.hero-art .grip { position: absolute; width: 12px; height: 12px; border-radius: 2px; background: var(--cta); }
.hero-art .g1 { left: 20px; top: 20px; } .hero-art .g2 { right: 20px; bottom: 20px; }
.float-card { position: absolute; display: flex; flex-direction: column; gap: .55rem; padding: 1rem 1.1rem; border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: 0 18px 40px -20px #111a2e88; animation: zy-float 6s ease-in-out infinite alternate; }
.float-card strong { font-family: var(--font-display); font-size: 1rem; }
.fc-1 { left: 8%; top: 12%; width: 46%; transform: rotate(-6deg); }
.fc-2 { right: 7%; top: 9%; width: 44%; background: #0e1b2e; color: #fff; transform: rotate(5deg); animation-delay: -2s; }
.fc-3 { left: 26%; bottom: 9%; width: 54%; animation-delay: -4s; }
.fc-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--tile) 18%, transparent); color: var(--tile); }
.fc-icon svg { width: 22px; height: 22px; }
.fc-line { display: block; height: 8px; border-radius: 4px; background: var(--panel-2); } .fc-line.short { width: 65%; }
.fc-note { font-size: var(--fs-xs); color: var(--muted); } .fc-2 .fc-note { color: #aab5c8; }
.fc-big { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--accent); }
@keyframes zy-float { from { translate: 0 0; } to { translate: 0 -8px; } }
.home-cats, .home-a .recent-tools { padding-block: var(--sp-5); }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.cat-tile { display: flex; flex-direction: column; gap: .6rem; min-height: 9rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--ink) !important; text-decoration: none !important; box-shadow: var(--shadow); }
.cat-tile .tile-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--tile) 15%, var(--panel)); color: var(--tile); }
.cat-tile .tile-icon svg { width: 24px; height: 24px; }
.cat-tile strong { font-family: var(--font-display); font-size: var(--fs-lg); }
.cat-tile .tile-desc { color: var(--muted); font-size: var(--fs-sm); }
.home-software { margin-top: var(--sp-6); padding: clamp(2.5rem, 6vw, 4rem) 0; background: #0e1b2e linear-gradient(#ffffff0a 1px, transparent 1px) 0 0 / 40px 40px; color: #e9eef7;
  background-image: radial-gradient(ellipse 50% 70% at 90% 0%, #19c2d42e, transparent 70%), linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px; }
.home-software h2 { color: #fff; margin: .6rem 0 0; }
.home-software .group-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: var(--sp-5); }
.btn-ghost.on-dark { background: transparent; color: #fff; border-color: #37445f; }
.product-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.product-card { display: flex; flex-direction: column; gap: .6rem; height: 100%; padding: 1.5rem; border-radius: 18px; background: #14233a; border: 1px solid #283a57; color: #aab5c8 !important; text-decoration: none !important; }
.product-card strong { font-family: var(--font-display); font-size: var(--fs-xl); color: #fff; }
.product-card .arrow-link { margin-top: auto; color: #5fd8ec; font-weight: 700; }
.status-pill { align-self: flex-start; padding: .25rem .7rem; border-radius: 999px; background: #2a2a1c; color: #f5c66a; font-size: var(--fs-xs); font-weight: 700; }
.home-founder { margin: var(--sp-5) 0 0; color: #aab5c8; }
.home-founder a { color: #5fd8ec !important; }
@media (max-width: 820px) {
  .hero-a-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 260px; order: 2; }
  .hero-search .cta { padding-inline: 1rem; }
}

/* Software section: Direction A with a soft glow */
body.theme-software { background:
  radial-gradient(ellipse 55% 40% at 85% -5%, #19c2d438, transparent 70%),
  linear-gradient(#ffffff08 1px, transparent 1px) 0 0 / 40px 40px,
  linear-gradient(90deg, #ffffff08 1px, transparent 1px) 0 0 / 40px 40px, #0b1626; }
.theme-software h1 { font-size: var(--fs-display); max-width: 20ch; }
.theme-software .card, .theme-software article { border-radius: 18px; }
.home-cats .group-head, .home-a .group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: var(--sp-4); }
.home-cats h2 { margin: 0; }
.cat-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); }
body .btn-ghost.on-dark { color: #fff !important; text-decoration: none !important; }
body .btn-ghost.on-dark:hover { border-color: #5fd8ec; }
@media (max-width: 560px) { .hero-art { display: none; } }

/* ---------- Software product pages ---------- */
.sw-page { padding-bottom: var(--sp-8); }
.sw-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; padding: clamp(2rem, 6vw, 4rem) 0 var(--sp-5); }
.sw-hero-centered { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.sw-hero-centered .product-actions { justify-content: center; }
.sw-hero-copy { display: flex; flex-direction: column; gap: var(--sp-3); }
.sw-hero-copy h1 { margin: 0; line-height: 1.06; }
.sw-hero-copy .lead { margin: 0; color: #a7b8cc; max-width: 62ch; }
.theme-software .label { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: #f5b524; letter-spacing: .08em; text-transform: uppercase; font-size: var(--fs-xs); margin: 0; }
.sw-figure { margin: 0; padding: 14px; border-radius: 24px; background: #101f35; border: 1px solid #233a57; box-shadow: 0 30px 60px -30px #000c; }
.sw-figure figcaption { margin-top: .7rem; color: #a7b8cc; }
.sw-art { position: relative; height: clamp(220px, 26vw, 300px); border-radius: 14px; overflow: hidden; background: #0b1626 linear-gradient(#5fd8ec1f 1px, transparent 1px) 0 0 / 24px 24px; }
.sw-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #5fd8ec1f 1px, transparent 1px) 0 0 / 24px 24px; }
.art-room { position: absolute; left: 9%; top: 16%; width: 48%; height: 62%; border: 6px solid #5fd8ec; border-radius: 3px; box-shadow: 0 0 28px #19c2d455; }
.art-wall { position: absolute; left: 9%; top: 47%; width: 26%; height: 6px; background: #5fd8ec; }
.art-wall.blue { background: #6ea8ff; }
.art-tag { position: absolute; left: 60%; z-index: 1; padding: .4rem .65rem; border-radius: 8px; font: 600 var(--fs-xs) ui-monospace, Consolas, monospace; }
.art-tag.t1 { top: 22%; background: #f5b524; color: #1a1200; } .art-tag.t2 { top: 48%; background: #19c2d4; color: #04202a; }
.art-grip { position: absolute; width: 12px; height: 12px; background: #f5b524; border-radius: 2px; z-index: 1; }
.art-grip.g1 { left: calc(9% - 6px); top: calc(16% - 6px); } .art-grip.g2 { left: calc(57% - 6px); top: calc(16% - 6px); }
.art-grip.g3 { left: calc(9% - 6px); top: calc(78% - 6px); } .art-grip.g4 { left: calc(57% - 6px); top: calc(78% - 6px); }
.art-taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: #16243a; border-top: 1px solid #2f4b6e; }
.art-buddy { position: absolute; left: 14%; bottom: 14%; width: 70px; height: 92px; border-radius: 34px 34px 22px 22px; background: linear-gradient(180deg, #19c2d4, #0a8fa3); box-shadow: 0 10px 24px -8px #19c2d4aa; animation: zy-float 3s ease-in-out infinite alternate; }
.art-buddy::before, .art-buddy::after { content: ""; position: absolute; top: 30px; width: 10px; height: 14px; border-radius: 6px; background: #0b1626; }
.art-buddy::before { left: 20px; } .art-buddy::after { right: 20px; }
.art-bubble { position: absolute; left: 32%; bottom: 52%; padding: .55rem .8rem; border-radius: 14px 14px 14px 2px; background: #fff; color: #111a2e; font-weight: 700; font-size: var(--fs-sm); z-index: 1; }
.art-note { position: absolute; right: 9%; top: 14%; width: 34%; padding: .8rem; border-radius: 6px; background: #ffd98a; color: #3a2a00; font-weight: 700; font-size: var(--fs-sm); transform: rotate(3deg); z-index: 1; }
.sw-section { padding-block: var(--sp-5); border-top: 1px solid #233a57; }
.sw-section h2 { margin: 0 0 var(--sp-4); color: #f4f8fc; }
.sw-intro { margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); color: #a7b8cc; }
.sw-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; max-width: 70ch; }
.sw-list li { position: relative; padding-left: 1.6rem; color: #c7d3e0; }
.sw-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 2px; background: #f5b524; }
.sw-list strong { color: #fff; }
.sw-chips { display: flex; flex-wrap: wrap; gap: .6rem; max-width: none; }
.sw-chips li { padding: .6rem 1rem; border: 1px solid #2f4b6e; border-radius: 999px; background: #101f35; }
.sw-chips li::before { display: none; }
.sw-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.sw-steps li { display: flex; gap: .9rem; padding: 1.25rem; border-radius: 18px; background: #101f35; border: 1px solid #233a57; }
.sw-step-no { flex: none; font: 600 var(--fs-sm) ui-monospace, Consolas, monospace; color: #f5b524; }
.sw-steps h3 { margin: 0 0 .35rem; color: #fff; font-size: var(--fs-lg); }
.sw-steps p { margin: 0; color: #a7b8cc; font-size: var(--fs-sm); }
.sw-facts { display: grid; gap: 0; margin: 0; border: 1px solid #233a57; border-radius: 18px; overflow: hidden; max-width: 860px; }
.sw-facts div { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 1rem; padding: .9rem 1.2rem; background: #101f35; }
.sw-facts div + div { border-top: 1px solid #233a57; }
.sw-facts dt { color: #fff; font-weight: 700; margin: 0; }
.sw-facts dd { color: #c7d3e0; margin: 0; }
@media (max-width: 560px) { .sw-facts div { grid-template-columns: 1fr; gap: .2rem; } }
.sw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: var(--sp-3); }
.theme-software .sw-card { padding: 1.3rem; background: #101f35; border: 1px solid #233a57; }
.theme-software .sw-card h3 { margin: 0 0 .4rem; }
.theme-software .sw-card p { margin: 0; }
.sw-faq details { border: 1px solid #233a57; border-radius: 14px; background: #101f35; margin-bottom: .6rem; padding: 0 1rem; }
.sw-faq summary { cursor: pointer; font-weight: 700; color: #fff; }
.sw-faq details p { margin: 0 0 1rem; color: #c7d3e0; }
@media (max-width: 860px) { .sw-hero { grid-template-columns: 1fr; } }

/* Inquiry form on the dark software theme */
.inquiry-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; max-width: 860px; padding: clamp(1rem, 3vw, 1.75rem); border-radius: 20px; background: #101f35; border: 1px solid #233a57; }
.inquiry-form .form-row { display: grid; gap: .35rem; }
.inquiry-form .form-wide { grid-column: 1 / -1; }
.inquiry-form label { color: #fff; font-weight: 650; }
.inquiry-form .optional, .inquiry-form .field-hint { color: #a7b8cc; font-weight: 400; font-size: var(--fs-sm); margin: 0; }
.theme-software .inquiry-form input:not([type=checkbox]), .theme-software .inquiry-form select, .theme-software .inquiry-form textarea {
  min-height: 48px; padding: .65rem .85rem; border: 1px solid #2f4b6e; border-radius: 10px; background: #0b1626; color: #e9f1f9; font: 500 var(--fs-base)/1.4 var(--font); width: 100%; }
.theme-software .inquiry-form textarea { min-height: 9rem; }
.inquiry-form .form-check { grid-template-columns: auto 1fr; align-items: start; gap: .7rem; }
.inquiry-form .form-check input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: #19c2d4; }
.inquiry-form .form-check label { font-weight: 500; color: #c7d3e0; }
.inquiry-form .form-check a { color: #5fd8ec; }
.theme-software .utility-status:not(:empty) { margin: .75rem 0 0; padding: .75rem .95rem; border-radius: 10px; background: #10303a; color: #b4ecf6; font-weight: 600; }
.theme-software .utility-status[data-state=ok] { background: #12372a; color: #a6ecc8; }
.theme-software .utility-status[data-state=error] { background: #3f1a17; color: #ffc2bc; }
@media (max-width: 640px) { .inquiry-form { grid-template-columns: 1fr; } }

/* Policies */
.policy-updated { color: var(--muted, #a7b8cc); margin: 0; }
.legal .table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid #233a57; border-radius: 14px; }
.legal table { width: 100%; border-collapse: collapse; min-width: 640px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid #233a57; font-size: var(--fs-sm); }
.theme-software .legal th { color: #fff; background: #14263f; }
.theme-software .legal td { color: #c7d3e0; }
.theme-software .legal h2 { margin-top: var(--sp-6); }
.theme-software .legal code { color: #f5c66a; }

/* ===== Languages: switcher, suggestion, Urdu and Arabic type, right-to-left layout ===== */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: 0 .7rem; border-radius: 999px;
  color: var(--ink); font: 700 var(--fs-sm)/1 var(--font); text-decoration: none; }
.lang-switch a[lang=ur] { font-family: var(--font-ur); font-size: var(--fs-base); }
.lang-switch a[lang=ar] { font-family: var(--font-ar); }
.lang-switch a:hover { background: var(--panel-2); }
.lang-switch a[aria-current] { background: var(--ink); color: var(--panel); }
.lang-switch a:focus-visible { outline: 3px solid var(--focus, #19c2d4); outline-offset: 2px; }
.theme-software .lang-switch { background: #0f1e33; border-color: #2c4767; }
.theme-software .lang-switch a { color: #e9f1f9; }
.theme-software .lang-switch a[aria-current] { background: #e9f1f9; color: #0b1626; }

.lang-suggest { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem 1rem; padding: .55rem max(16px, env(safe-area-inset-right, 0px)) .55rem max(16px, env(safe-area-inset-left, 0px));
  background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--ink); font-size: var(--fs-sm); }
.lang-suggest[lang=ur] { font-family: var(--font-ur); font-size: var(--fs-base); }
.lang-suggest[lang=ar] { font-family: var(--font-ar); }
.lang-suggest a { font-weight: 750; min-height: 44px; display: inline-flex; align-items: center; }
.lang-suggest button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; font-size: 1.4rem; cursor: pointer; }

.translation-notice { padding: .8rem 1rem; border-inline-start: 4px solid #f5b524; border-radius: 8px; background: #f5b5241a; font-size: var(--fs-sm); }
.translation-notice a { margin-inline-start: .35rem; font-weight: 700; }

:root {
  --font-ar: "Noto Naskh Arabic", "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", "Arabic Typesetting", system-ui, sans-serif;
  --font-ur: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}
/* Arabic-script text needs a slightly larger size and taller lines to stay readable at the same scale. */
html[lang=ar] { font-size: 103%; }
html[lang=ur] { font-size: 104%; }
html[lang=ar] body, html[lang=ar] button, html[lang=ar] input, html[lang=ar] select, html[lang=ar] textarea { font-family: var(--font-ar); }
html[lang=ur] body, html[lang=ur] button, html[lang=ur] input, html[lang=ur] select, html[lang=ur] textarea { font-family: var(--font-ur); }
html[lang=ar] body { line-height: 1.8; }
html[lang=ur] body { line-height: 2; }
html[lang=ar] :is(h1, h2, h3, h4, .display, .hero-a h1) { font-family: var(--font-ar); line-height: 1.45; letter-spacing: 0; }
html[lang=ur] :is(h1, h2, h3, h4, .display, .hero-a h1) { font-family: var(--font-ur); line-height: 1.7; letter-spacing: 0; }
/* Letter spacing breaks the joins between Arabic letters. */
html[dir=rtl] * { letter-spacing: 0 !important; }
html[dir=rtl] :is(code, kbd, samp, pre, .ltr) { direction: ltr; unicode-bidi: isolate; font-family: ui-monospace, Consolas, monospace; }
/* Numbers, file names, e-mail addresses and URLs keep left-to-right order inside right-to-left text. */
html[dir=rtl] :is(input[type=number], input[type=email], input[type=url], input[type=date]) { direction: ltr; text-align: right; }
html[dir=rtl] bdi, html[dir=rtl] [dir=ltr] { unicode-bidi: isolate; }

/* Mirror direction-specific layout for right-to-left pages. */
html[dir=rtl] .site-search svg { left: auto; right: 1rem; }
html[dir=rtl] .sw-list li { padding-left: 0; padding-right: 1.6rem; }
html[dir=rtl] .sw-list li::before { left: auto; right: 0; }
html[dir=rtl] :is(.legal th, .legal td, .legal-body th, .legal-body td, .report-table th, .report-table td) { text-align: right; }
html[dir=rtl] .legal-body ul, html[dir=rtl] #pdf-edit-list { padding-left: 0; padding-right: 1.2rem; }
html[dir=rtl] #pdf-edit-list button { margin-left: 0; margin-right: 5px; }
html[dir=rtl] .guide-window b { margin-left: 0; margin-right: 5px; }
html[dir=rtl] input[type=file]::file-selector-button { margin-right: 0; margin-left: 8px; }
html[dir=rtl] .founder-facts div { border-left: 0; border-right: 3px solid #2c7e67; border-radius: 8px 4px 4px 8px; }
html[dir=rtl] .skip { left: auto; right: 8px; }
html[dir=rtl] :is(.chat-toggle, .assistant) { right: auto; left: 16px; }
html[dir=rtl] .report-tag { margin-right: 0; margin-left: .3rem; }
html[dir=rtl] .ico-dir, html[dir=rtl] .tool-return-icon { transform: scaleX(-1); }
html[dir=rtl] .art-bubble { border-radius: 14px 14px 2px 14px; }
html[lang=ar] { --font: var(--font-ar); --font-display: var(--font-ar); }
html[lang=ur] { --font: var(--font-ur); --font-display: var(--font-ur); }

/* Hijri converter: month name lists, with the current or converted month highlighted. */
.month-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); gap: var(--sp-4, 1rem); margin-top: var(--sp-4, 1rem); }
.month-list h3 { margin: 0 0 .5rem; font-size: var(--fs-base); }
.month-list ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
#date-result { white-space: pre-line; }
.month-list li { display: grid; grid-template-columns: 1.6em 1fr; align-items: baseline; column-gap: .45rem; padding: .4rem .6rem; border-radius: 8px; color: var(--muted); opacity: .75; font-size: var(--fs-sm); }
.month-list .month-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.month-list .month-local { grid-column: 2; justify-self: start; font-family: var(--font-ar); }
.month-list li[aria-current] { opacity: 1; color: var(--ink); background: #f5b52433; outline: 2px solid #f5b524; font-weight: 750; }
