:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --ink: #111827;
  --muted: #5b6474;
  --line: #e3e8ef;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0fe;
  --good: #15803d;
  --good-soft: #e9f7ee;
  --warn: #92400e;
  --warn-soft: #fff7e6;
  --bad: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.06);
  --font: "IBM Plex Sans Thai", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, -apple-system, "Segoe UI", sans-serif;
  --glow: rgba(31, 111, 235, 0.14);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b;
    --bg-soft: #151c25;
    --ink: #e8edf4;
    --muted: #9aa6b6;
    --line: #26313e;
    --accent: #5b9cff;
    --accent-ink: #0b1220;
    --accent-soft: #16263d;
    --good: #5fd08a;
    --good-soft: #13291d;
    --warn: #f3c46b;
    --warn-soft: #2b2212;
    --bad: #ff8a80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --glow: rgba(91, 156, 255, 0.18);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b;
  --bg-soft: #151c25;
  --ink: #e8edf4;
  --muted: #9aa6b6;
  --line: #26313e;
  --accent: #5b9cff;
  --accent-ink: #0b1220;
  --accent-soft: #16263d;
  --good: #5fd08a;
  --good-soft: #13291d;
  --warn: #f3c46b;
  --warn-soft: #2b2212;
  --bad: #ff8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --glow: rgba(91, 156, 255, 0.18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--accent); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(1120px, 100%); margin: 0 auto; padding-inline: 20px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 0.95rem; }
.nav a:hover { background: var(--bg-soft); }
.lang {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  padding: 7px 12px; border-radius: 10px; cursor: pointer;
}
.lang:hover { background: var(--bg-soft); }
.menu-toggle { display: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 7px 10px; min-width: 40px; min-height: 40px; cursor: pointer; }
.nav a.on { color: var(--accent); font-weight: 600; }
.controls { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

@media (max-width: 760px) {
  .top .wrap { gap: 8px; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 12px 14px;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .controls { margin-left: auto; }
  .lang .lang-word { display: none; }
}

/* hero */
.hero { padding-block: 64px 48px; display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--muted); font-size: 0.95rem; }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); line-height: 1.15; margin: 10px 0 16px; letter-spacing: -0.01em; text-wrap: balance; }
.hero h1 .hl { color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 1.15rem; max-width: 36em; margin: 0 0 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer;
  min-height: 48px;
}
.btn:hover { background: var(--bg-soft); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.excel { background: #107c41; color: #fff; border-color: #107c41; }
.btn.excel:hover { filter: brightness(1.08); background: #107c41; }
.btn.word { background: #185abd; color: #fff; border-color: #185abd; }
.btn.word:hover { filter: brightness(1.08); background: #185abd; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.note { margin-top: 18px; color: var(--muted); font-size: 0.95rem; }
.mock {
  border: 1px solid var(--line); border-radius: 18px; background: var(--bg-soft); box-shadow: var(--shadow);
  padding: 14px; aspect-ratio: 4 / 3; display: grid; grid-template-rows: auto 1fr; gap: 10px; max-width: 100%;
}
.mock .bar { display: flex; gap: 6px; }
.mock .bar i { width: 26px; height: 8px; border-radius: 4px; background: var(--line); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-block: 40px 28px; }
  .mock { width: min(520px, 100%); margin-inline: auto; }
}

/* sections */
section.band { padding-block: 48px; border-top: 1px solid var(--line); }
section.band.soft { background: var(--bg-soft); }
.band-head { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: end; margin-bottom: 28px; }
.band-head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.2; margin: 0; text-wrap: balance; }
.band-head p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .band-head { grid-template-columns: 1fr; } }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1020px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  padding: 16px; text-decoration: none; color: var(--ink); min-height: 96px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.card h3 { margin: 0 0 4px; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.card .soon { display: inline-block; margin-left: 6px; font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); vertical-align: middle; }

.ficon { width: 36px; height: 42px; flex: none; }

.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.points div { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg); }
.points h3 { margin: 0 0 6px; font-size: 1.05rem; }
.points p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .points { grid-template-columns: 1fr; } }

/* tool page */
.tool-hero { text-align: center; padding-block: 44px 24px; }
.tool-hero .ficon { width: 54px; height: 62px; }
.tool-hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 12px 0 6px; line-height: 1.2; }
.tool-hero p { color: var(--muted); margin: 0 auto; max-width: 40em; }

.drop {
  margin: 26px auto 0; width: min(620px, 100%);
  border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 18px;
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--bg)); padding: 32px 20px; text-align: center;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .hint { color: var(--muted); font-size: 0.92rem; margin-top: 10px; }
.privacy {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: var(--good-soft); color: var(--good); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem;
}

.work { width: min(760px, 100%); margin: 22px auto 0; display: grid; gap: 14px; }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files li {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; background: var(--bg);
}
.files li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li .size { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.files li button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; min-width: 36px; min-height: 36px; }
.options { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; background: var(--bg); }
.options label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.options .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.options input[type="text"], .options input[type="password"], .options input[type="number"], .options select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-height: 44px;
}
.options .check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.options .check input { width: 20px; height: 20px; }
.options .help { font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.status { text-align: center; color: var(--muted); min-height: 1.5em; }
.status.bad { color: var(--bad); }
.result { border: 1px solid var(--good); background: var(--good-soft); border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.result h3 { margin: 0; color: var(--good); font-size: 1.05rem; }
.result .dl { display: flex; flex-wrap: wrap; gap: 10px; }
.result pre { white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; font-size: 0.9rem; }
.warn { border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: 0.93rem; }

.stage { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: var(--bg-soft); max-height: 70vh; touch-action: pan-x pan-y; }
.stage canvas { display: block; margin: 0 auto; }
.pad { width: 100%; height: 180px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; display: block; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diff > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); overflow: auto; max-height: 60vh; font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; }
.diff del { background: #fde2e1; color: #8a1c14; text-decoration: none; }
.diff ins { background: #dcf5e3; color: #11602c; text-decoration: none; }
@media (max-width: 640px) { .diff { grid-template-columns: 1fr; } }

.how { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; counter-increment: s; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.9rem; }
.about { margin-top: 22px; color: var(--muted); }
.about .k { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
details { border-top: 1px solid var(--line); padding-block: 14px; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "\2212"; }
details p { color: var(--muted); margin: 8px 0 0; }



.lang .lang-short { display: none; }
@media (max-width: 760px) {
  .lang { padding: 0 10px; min-height: 40px; }
  .lang .lang-short { display: inline; }
}

/* hero showcase: PDF, Word, Excel and AI scenes that play in turn */
.mock.sc {
  --c: #1f6feb; --pdf: #1f6feb; --word: #185abd; --xl: #107c41; --ai: #7c3aed;
  --paper: #ffffff; --paper-ink: #1b2330; --paper-muted: #8a94a3; --paper-line: #e6ebf2;
  --chrome: rgba(255, 255, 255, 0.72); --chrome-line: rgba(15, 23, 42, 0.08);
  position: relative; display: block; padding: 0; border: 0; background: none; box-shadow: none;
  aspect-ratio: auto; isolation: isolate; margin: 18px 10px;
}
:root[data-theme="dark"] .mock.sc {
  --paper: #161d27; --paper-ink: #e6ecf4; --paper-muted: #8391a4; --paper-line: #273241;
  --chrome: rgba(22, 29, 39, 0.78); --chrome-line: rgba(255, 255, 255, 0.07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mock.sc {
    --paper: #161d27; --paper-ink: #e6ecf4; --paper-muted: #8391a4; --paper-line: #273241;
    --chrome: rgba(22, 29, 39, 0.78); --chrome-line: rgba(255, 255, 255, 0.07);
  }
}
.mock.sc[data-scene="1"] { --c: var(--word); }
.mock.sc[data-scene="2"] { --c: var(--xl); }
.mock.sc[data-scene="3"] { --c: var(--ai); }
.sc-glow {
  position: absolute; inset: -12% -8%; z-index: -1; pointer-events: none; filter: blur(38px); opacity: 0.55;
  background:
    radial-gradient(40% 45% at 30% 35%, color-mix(in srgb, var(--c) 55%, transparent), transparent 70%),
    radial-gradient(35% 40% at 75% 70%, color-mix(in srgb, var(--ai) 35%, transparent), transparent 70%);
  transition: background 0.9s; animation: sc-breathe 7s ease-in-out infinite;
}
@keyframes sc-breathe { 50% { transform: scale(1.06) translateY(-2%); opacity: 0.7; } }
.sc-win {
  container-type: inline-size; position: relative; border-radius: 18px; overflow: hidden;
  background: var(--chrome); border: 1px solid var(--chrome-line);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 30px 60px -20px rgba(15, 23, 42, 0.35), 0 10px 24px -12px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.sc-top { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--chrome-line); }
.sc-lights { display: flex; gap: 6px; flex: none; }
.sc-lights i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.sc-lights i:nth-child(2) { background: #febc2e; }
.sc-lights i:nth-child(3) { background: #28c840; }
.sc-tabs { display: flex; gap: 4px; margin-inline: auto; background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 3px; border-radius: 10px; }
.sc-tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; overflow: hidden;
  font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 4px 11px; border-radius: 8px; cursor: pointer;
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
}
.sc-tab i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--tc) 80%, #fff); opacity: 0.7; transition: opacity 0.3s, transform 0.3s; }
.sc-tab.on { color: var(--ink); background: var(--bg); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14); }
.sc-tab.on i { opacity: 1; transform: scale(1.25); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 25%, transparent); }
.sc-tab b { position: absolute; left: 8px; right: 8px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--tc); transform: scaleX(0); transform-origin: left; }
.sc-tab.on b { animation: sc-progress var(--dur, 4200ms) linear forwards; }
.mock.sc.still .sc-tab b { display: none; }
@keyframes sc-progress { to { transform: scaleX(1); } }

.sc-stage {
  position: relative; aspect-ratio: 16 / 11.2; overflow: hidden;
  font-size: clamp(8.5px, 2.55cqw, 14.5px); color: var(--paper-ink);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 0) 0 0 / 16px 16px,
    color-mix(in srgb, var(--bg-soft) 80%, transparent);
}
.scene {
  position: absolute; inset: 0; padding: 4.2% 5% 7.5%; display: flex; flex-direction: column; gap: 0.9em;
  opacity: 0; visibility: hidden; transform: translateX(6%) scale(0.98); filter: blur(4px);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(.2,.8,.2,1), filter 0.55s, visibility 0s 0.7s;
}
.scene.on { opacity: 1; visibility: visible; transform: none; filter: none; transition: opacity 0.55s ease 0.1s, transform 0.7s cubic-bezier(.2,.8,.2,1) 0.1s, filter 0.55s 0.1s, visibility 0s; }
.scene.out { opacity: 0; visibility: visible; transform: translateX(-6%) scale(0.98); filter: blur(4px); }
.mock.sc .doc {
  position: relative; background: var(--paper); border-radius: 0.7em; border: 1px solid var(--paper-line);
  box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 12px 28px -14px rgba(15,23,42,.3);
  padding: 1.2em 1.4em; display: flex; flex-direction: column; gap: 0.7em;
}
.mock.sc .ln { display: block; height: 0.55em; width: var(--w); border-radius: 1em; background: var(--paper-line); flex: none; }
.mock.sc .caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -0.18em; background: var(--c); opacity: 0; }
.mock.sc .typing > .caret, .mock.sc .typing .caret { opacity: 1; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* pointer */
.sc-ptr {
  position: absolute; left: 80%; top: 80%; width: 1.9em; height: 1.9em; z-index: 5; pointer-events: none;
  transition: left 0.75s cubic-bezier(.45,0,.2,1), top 0.75s cubic-bezier(.45,0,.2,1), opacity 0.3s, transform 0.15s;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.3)); opacity: 0;
}
.sc-ptr.in { opacity: 1; }
.sc-ptr.press { transform: scale(0.82); }
.sc-ptr::after {
  content: ""; position: absolute; left: -0.6em; top: -0.6em; width: 1.4em; height: 1.4em; border-radius: 50%;
  border: 2px solid var(--c); opacity: 0; transform: scale(0.3);
}
.sc-ptr.press::after { animation: sc-ripple 0.5s ease-out; }
@keyframes sc-ripple { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.6); } }
.sc-ptr svg { width: 100%; height: 100%; display: block; }

/* floating cards */
.sc-float {
  position: absolute; z-index: 6; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--ink); padding: 8px 14px 8px 8px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid var(--line);
  box-shadow: 0 16px 32px -14px rgba(15,23,42,.35), 0 2px 6px rgba(15,23,42,.08);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: sc-float 6s ease-in-out infinite;
}
.sc-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; background: var(--pdf); flex: none; }
.sc-ic svg { width: 15px; height: 15px; }
.sc-ic.sc-ok { background: var(--c); transition: background 0.6s; }
.sc-f1 { bottom: -16px; right: -12px; animation-delay: -2s; }
.sc-f2 { bottom: -16px; left: -12px; opacity: 0; transform: translateY(10px); transition: opacity 0.4s, transform 0.4s; animation: none; }
.sc-f2.in { opacity: 1; transform: none; animation: sc-float 6s ease-in-out infinite; }
@keyframes sc-float { 50% { translate: 0 -7px; } }

/* 1: PDF */
.sp-tools { display: flex; gap: 0.5em; align-self: center; background: var(--paper); padding: 0.35em; border-radius: 0.8em; border: 1px solid var(--paper-line); box-shadow: 0 6px 16px -10px rgba(15,23,42,.35); }
.sp-tool { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.3em 0.75em; border-radius: 0.55em; font-weight: 600; color: var(--paper-muted); transition: background 0.3s, color 0.3s; }
.sp-tool b { font-size: 1.05em; }
.sp-tool.on { background: color-mix(in srgb, var(--pdf) 14%, transparent); color: var(--pdf); }
.sp-doc { flex: 1; }
.sp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.sp-title { font-weight: 700; font-size: 1.45em; color: var(--paper-ink); }
.sp-no { color: var(--paper-muted); font-size: 0.85em; }
.sp-row + .sp-row { margin-top: -0.35em; background: none; }
.sp-row { display: flex; justify-content: space-between; align-items: center; padding: 0.55em 0.8em; border-radius: 0.5em; background: color-mix(in srgb, var(--pdf) 6%, var(--paper)); font-weight: 500; }
.sp-price { font-weight: 700; }
.sp-num { position: relative; display: inline-block; padding: 0 0.15em; font-variant-numeric: tabular-nums; }
.sp-sel { position: absolute; inset: -0.1em 0; border-radius: 0.25em; background: color-mix(in srgb, var(--pdf) 30%, transparent); transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; }
.sp-num.selected .sp-sel { transform: none; }
.sp-num.edited { color: var(--pdf); }
.sp-val { position: relative; }
.sp-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; }
.sp-signbox { width: 46%; border-bottom: 1.5px dashed var(--paper-line); position: relative; padding-bottom: 0.3em; }
.sp-sig { display: block; width: 100%; height: auto; }
.sp-sig path { fill: none; stroke: #1b3fa6; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
:root[data-theme="dark"] .sp-sig path { stroke: #8ab4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sp-sig path { stroke: #8ab4ff; } }
.sp-signbox.drawn .sp-sig path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s cubic-bezier(.5,.1,.4,1); }
.sp-by { position: absolute; left: 0; bottom: -1.5em; font-size: 0.8em; color: var(--paper-muted); }
.sp-stamp {
  display: grid; justify-items: center; gap: 0.1em; padding: 0.4em 0.9em; border: 0.2em solid #d92d20; border-radius: 0.5em;
  color: #d92d20; font-weight: 800; font-size: 1.15em; letter-spacing: 0.02em; transform: rotate(-10deg) scale(2.2); opacity: 0;
  box-shadow: inset 0 0 0 0.12em color-mix(in srgb, #d92d20 30%, transparent); background: color-mix(in srgb, #d92d20 5%, transparent);
  margin-right: 0.5em;
}
.sp-stamp small { font-size: 0.55em; font-weight: 700; opacity: 0.85; }
.sp-stamp.in { animation: sc-thud 0.45s cubic-bezier(.3,1.6,.5,1) forwards; }
.sp-stamp.done { opacity: 0.92; transform: rotate(-10deg); }
@keyframes sc-thud { 0% { opacity: 0; transform: rotate(-10deg) scale(2.2); } 60% { opacity: 1; transform: rotate(-10deg) scale(0.92); } 100% { opacity: 0.92; transform: rotate(-10deg) scale(1); } }
.sp-doc.shake { animation: sc-shake 0.3s ease; }
@keyframes sc-shake { 30% { transform: translate(1px, 2px); } 60% { transform: translate(-1px, -1px); } }

/* 2: Word */
.sw-ribbon { display: flex; align-items: center; gap: 0.4em; padding: 0.4em 0.5em; border-radius: 0.7em; background: var(--paper); border: 1px solid var(--paper-line); box-shadow: 0 6px 16px -10px rgba(15,23,42,.35); }
.sw-font, .sw-size { padding: 0.2em 0.6em; border: 1px solid var(--paper-line); border-radius: 0.4em; color: var(--paper-muted); font-size: 0.9em; }
.sw-font { min-width: 7.5em; }
.sw-btn { width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 0.4em; font-weight: 700; color: var(--paper-muted); transition: background 0.25s, color 0.25s, transform 0.15s; }
.sw-btn.on { background: color-mix(in srgb, var(--word) 16%, transparent); color: var(--word); }
.sw-btn.tap { transform: scale(0.88); }
.sw-doc { flex: 1; padding: 1.4em 1.8em; border-top: 0.25em solid var(--word); }
.sw-h { font-size: 1.55em; font-weight: 700; color: var(--word); min-height: 1.5em; }
:root[data-theme="dark"] .sw-h { color: #7aa7f0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sw-h { color: #7aa7f0; } }
.sw-p { margin: 0; line-height: 1.6; min-height: 1.6em; }
.sw-bold { border-radius: 0.2em; transition: background 0.3s, font-weight 0.2s; }
.sw-bold.sel { background: color-mix(in srgb, var(--word) 24%, transparent); }
.sw-bold.bold { font-weight: 800; }
.sw-ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45em; }
.sw-ul li { display: flex; align-items: center; gap: 0.6em; opacity: 0; transform: translateX(-0.8em); transition: opacity 0.35s, transform 0.45s cubic-bezier(.2,.8,.2,1); }
.sw-ul li::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--word); flex: none; }
.sw-ul li.in { opacity: 1; transform: none; }

/* 3: Excel */
.sx-fbar { display: flex; align-items: center; gap: 0.6em; padding: 0.35em 0.5em; border-radius: 0.6em; background: var(--paper); border: 1px solid var(--paper-line); font-size: 0.95em; }
.sx-ref { padding: 0.1em 0.6em; border-right: 1px solid var(--paper-line); color: var(--paper-muted); font-weight: 600; }
.sx-fx { font-style: italic; color: var(--xl); font-weight: 700; }
.sx-f { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; min-height: 1.3em; }
.sx-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1em; align-items: start; }
.sx-grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border-radius: 0.6em; overflow: hidden; border: 1px solid var(--paper-line); box-shadow: 0 12px 28px -14px rgba(15,23,42,.3); table-layout: fixed; }
.sx-grid th, .sx-grid td { border-right: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); padding: 0 0.6em; height: 2.45em; white-space: nowrap; }
.sx-grid tr > :last-child { border-right: 0; }
.sx-grid tr:last-child > * { border-bottom: 0; }
.sx-grid th { background: color-mix(in srgb, var(--paper-line) 55%, var(--paper)); color: var(--paper-muted); font-weight: 600; font-size: 0.85em; width: 1.8em; text-align: center; padding: 0; }
.sx-grid tr:first-child th { height: 1.7em; }
.sx-grid tr:first-child th:not(:first-child) { width: auto; }
.sx-grid td.hd { font-weight: 700; background: color-mix(in srgb, var(--xl) 12%, var(--paper)); }
.sx-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sx-grid td.num.pop { animation: sc-pop 0.35s ease; }
@keyframes sc-pop { 40% { background: color-mix(in srgb, var(--xl) 18%, transparent); } }
.sx-grid tr.tot td { font-weight: 700; }
.sx-grid td.sx-sum { transition: box-shadow 0.3s, background 0.3s; }
.sx-grid td.sx-sum.active { box-shadow: inset 0 0 0 2px var(--xl); background: color-mix(in srgb, var(--xl) 8%, var(--paper)); }
.sx-grid td.sx-sum.active::after { content: ""; float: right; }
.sx-grid.ranging tr:nth-child(n+3):nth-child(-n+5) td.num { background: color-mix(in srgb, #2563eb 10%, var(--paper)); box-shadow: inset 2px 0 0 #2563eb, inset -2px 0 0 #2563eb; }
.sx-grid.ranging tr:nth-child(3) td.num { box-shadow: inset 2px 0 0 #2563eb, inset -2px 0 0 #2563eb, inset 0 2px 0 #2563eb; }
.sx-grid.ranging tr:nth-child(5) td.num { box-shadow: inset 2px 0 0 #2563eb, inset -2px 0 0 #2563eb, inset 0 -2px 0 #2563eb; }
.sx-chart { align-self: stretch; background: var(--paper); border-radius: 0.6em; border: 1px solid var(--paper-line); box-shadow: 0 12px 28px -14px rgba(15,23,42,.3); padding: 0.8em 0.9em 0.5em; display: flex; flex-direction: column; opacity: 0; transform: translateY(0.8em) scale(0.97); transition: opacity 0.4s, transform 0.5s cubic-bezier(.2,.8,.2,1); }
.sx-chart.in { opacity: 1; transform: none; }
.sx-ct { font-weight: 700; font-size: 0.9em; }
.sx-bars { flex: 1; display: flex; align-items: flex-end; justify-content: space-around; gap: 0.8em; padding-top: 0.6em; border-bottom: 1px solid var(--paper-line); background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--paper-line) calc(25% - 1px) 25%); }
.xb { position: relative; flex: 1; max-width: 2.6em; height: 100%; display: flex; align-items: flex-end; }
.xb i { display: block; width: 100%; height: var(--h); border-radius: 0.35em 0.35em 0 0; background: linear-gradient(to top, var(--xl), #2fb36b); transform: scaleY(0); transform-origin: bottom; }
.xb em { position: absolute; bottom: -1.5em; left: 50%; translate: -50% 0; font-style: normal; font-size: 0.75em; color: var(--paper-muted); white-space: nowrap; }
.sx-chart.in .xb i { transform: scaleY(1); transition: transform 0.8s cubic-bezier(.2,.9,.25,1.15); }
.sx-chart.in .xb:nth-child(2) i { transition-delay: 0.15s; }
.sx-chart.in .xb:nth-child(3) i { transition-delay: 0.3s; }
.sx-chart { padding-bottom: 1.6em; }
.sx-status { margin-top: auto; display: flex; align-items: center; gap: 0.4em; font-size: 0.85em; color: var(--paper-muted); }
.sx-sheet { padding: 0.25em 0.9em; border-radius: 0.4em; background: var(--paper); border: 1px solid var(--paper-line); border-bottom: 2px solid var(--xl); color: var(--xl); font-weight: 700; }
.sx-sheet.off { border-bottom-color: var(--paper-line); color: var(--paper-muted); font-weight: 600; }
.sx-stat { margin-left: auto; opacity: 0; transform: translateY(0.4em); transition: opacity 0.35s, transform 0.35s; }
.sx-stat b { color: var(--paper-ink); }
.sx-stat.in { opacity: 1; transform: none; }

/* 4: AI */
.s-ai { flex-direction: row; gap: 1.1em; }
.sa-file { width: 38%; display: flex; flex-direction: column; gap: 0.5em; }
.sa-name { display: flex; align-items: center; gap: 0.5em; font-weight: 600; font-size: 0.9em; white-space: nowrap; overflow: hidden; }
.sa-name b { font-size: 0.75em; color: #fff; background: #e5484d; padding: 0.1em 0.45em; border-radius: 0.3em; }
.sa-doc { flex: 1; padding: 1em; gap: 0.6em; overflow: hidden; }
.sa-graph { display: flex; align-items: flex-end; gap: 0.35em; height: 3.2em; padding: 0.3em; border-radius: 0.4em; background: color-mix(in srgb, var(--ai) 7%, var(--paper)); }
.sa-graph i { flex: 1; height: var(--h); border-radius: 0.2em; background: color-mix(in srgb, var(--ai) 55%, var(--paper)); }
.sa-scan { position: absolute; left: 0; right: 0; top: 0; height: 2.6em; opacity: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ai) 22%, transparent) 70%, color-mix(in srgb, var(--ai) 70%, transparent) 96%, transparent); }
.sa-doc.scanning .sa-scan { animation: sc-scan 1.3s ease-in-out 2; }
@keyframes sc-scan { 0% { opacity: 0; transform: translateY(-100%); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(12em); } }
.sa-chat { flex: 1; display: flex; flex-direction: column; gap: 0.7em; min-width: 0; }
.sa-q { align-self: flex-end; max-width: 85%; background: var(--ai); color: #fff; padding: 0.5em 0.9em; border-radius: 1em 1em 0.3em 1em; font-weight: 500; opacity: 0; transform: translateY(0.6em) scale(0.96); transition: opacity 0.3s, transform 0.4s cubic-bezier(.2,.8,.2,1); box-shadow: 0 8px 18px -10px var(--ai); }
.sa-q.in { opacity: 1; transform: none; }
.sa-a { background: var(--paper); border: 1px solid var(--paper-line); border-radius: 1em 1em 1em 0.3em; padding: 0.7em 0.9em; box-shadow: 0 12px 28px -14px rgba(15,23,42,.3); opacity: 0; transform: translateY(0.6em); transition: opacity 0.3s, transform 0.4s cubic-bezier(.2,.8,.2,1); }
.sa-a.in { opacity: 1; transform: none; }
.sa-who { display: flex; align-items: center; gap: 0.4em; font-weight: 700; font-size: 0.85em; color: var(--ai); margin-bottom: 0.3em; }
:root[data-theme="dark"] .sa-who { color: #b194ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sa-who { color: #b194ff; } }
.sa-spark { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 0.5em; color: #fff; background: linear-gradient(135deg, #7c3aed, #c026d3); }
.sa-spark svg { width: 1em; height: 1em; }
.sa-think { display: none; align-items: center; gap: 0.3em; color: var(--paper-muted); font-size: 0.9em; }
.sa-think i { width: 0.4em; height: 0.4em; border-radius: 50%; background: var(--ai); animation: sc-dot 1s ease-in-out infinite; }
.sa-think i:nth-child(2) { animation-delay: 0.15s; }
.sa-think i:nth-child(3) { animation-delay: 0.3s; margin-right: 0.3em; }
@keyframes sc-dot { 50% { transform: translateY(-0.3em); opacity: 0.4; } }
.sa-a.thinking .sa-think { display: flex; }
.sa-a.thinking .sa-body { display: none; }
.sa-body p { margin: 0 0 0.35em; font-weight: 600; }
.sa-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3em; }
.sa-body li { display: flex; gap: 0.5em; align-items: baseline; opacity: 0; transform: translateY(0.4em); transition: opacity 0.35s, transform 0.4s; }
.sa-body li::before { content: ""; width: 0.45em; height: 0.45em; border-radius: 0.15em; background: linear-gradient(135deg, #7c3aed, #c026d3); flex: none; transform: translateY(-0.1em); }
.sa-body li.in { opacity: 1; transform: none; }
.sa-input { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.5em; padding: 0.45em 0.5em 0.45em 0.9em; border-radius: 0.8em; background: var(--paper); border: 1px solid var(--paper-line); color: var(--paper-muted); font-size: 0.9em; white-space: nowrap; overflow: hidden; }
.sa-typed { color: var(--paper-ink); overflow: hidden; text-overflow: ellipsis; }
.sa-input.has .sa-ph { display: none; }
.sa-input:not(.has) .sa-typed { display: none; }
.sa-send { display: grid; place-items: center; width: 1.8em; height: 1.8em; flex: none; border-radius: 0.5em; background: var(--ai); color: #fff; font-weight: 700; }

.mock.sc.paused *, .mock.sc.paused *::before, .mock.sc.paused *::after { animation-play-state: paused !important; }

@media (max-width: 860px) {
  .mock.sc { width: min(560px, calc(100% - 20px)); margin: 8px auto 26px; }
}
@media (max-width: 520px) {
  .sc-top { gap: 8px; padding: 8px; }
  .sc-lights { display: none; }
  .sc-tab { font-size: 11.5px; padding: 4px 9px; }
  .sc-float { font-size: 11.5px; padding: 6px 10px 6px 6px; }
  .sc-ic { width: 22px; height: 22px; }
  .sc-f1 { right: -6px; }
  .sc-f1 > span:last-child { max-width: 11em; overflow: hidden; text-overflow: ellipsis; }
  .sc-f2 { left: -6px; }
  .sc-stage { aspect-ratio: 16 / 12.5; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-glow, .sc-float, .sc-f2.in { animation: none; }
  .scene { transition: none; filter: none; }
}

/* big closing call to action */
.closer {
  text-align: center; border-radius: 24px; padding: clamp(28px, 6vw, 56px) 20px;
  background: radial-gradient(120% 140% at 0% 0%, var(--glow), transparent 60%),
              radial-gradient(120% 140% at 100% 100%, var(--glow), transparent 60%), var(--bg-soft);
  border: 1px solid var(--line);
}
.closer h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: 0 0 8px; line-height: 1.25; }
.closer p { color: var(--muted); margin: 0 0 22px; }

/* tools directory */
.search {
  width: min(520px, 100%); display: flex; align-items: center; gap: 8px; margin: 18px auto 0;
  border: 1px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 14px; background: var(--bg);
}
.search input { flex: 1; border: 0; background: transparent; color: var(--ink); min-height: 44px; outline: none; min-width: 0; }
.group { margin-top: 34px; }
.group h2 { font-size: 1.25rem; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.group h2 i { font-style: normal; font-size: 0.8rem; font-weight: 600; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 10px; border-radius: 999px; }
.empty-search { text-align: center; color: var(--muted); padding: 40px 0; }

/* simple page head */
.page-head { text-align: center; padding-block: 52px 8px; position: relative; }
.page-head .kicker { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 12px; border-radius: 999px; }
.page-head h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.15; margin: 14px 0 10px; text-wrap: balance; }
.page-head p { color: var(--muted); max-width: 38em; margin: 0 auto; font-size: 1.08rem; }

/* contact */
.contact-page { position: relative; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; pointer-events: none; z-index: -1; }
.blob.a { width: 380px; height: 380px; background: #5b9cff; top: -140px; left: -120px; animation: drift 14s ease-in-out infinite alternate; }
.blob.b { width: 320px; height: 320px; background: #b57bff; top: 40px; right: -120px; animation: drift 17s ease-in-out infinite alternate-reverse; }
.blob.c { width: 260px; height: 260px; background: #3fd0a4; bottom: -120px; left: 30%; animation: drift 19s ease-in-out infinite alternate; }
:root[data-theme="dark"] .blob { opacity: 0.25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .blob { opacity: 0.25; } }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.08); } }
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
@media (max-width: 820px) { .channels { grid-template-columns: 1fr; } }
.channel {
  position: relative; display: grid; gap: 6px; padding: 22px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.channel:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c); }
.channel .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; margin-bottom: 6px; }
.channel .ic svg { width: 26px; height: 26px; }
.channel h3 { margin: 0; font-size: 1.1rem; }
.channel .value { font-weight: 600; color: var(--c); word-break: break-all; }
.channel p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.channel.soon-card { cursor: default; }
.channel.soon-card:hover { transform: none; box-shadow: none; border-color: var(--line); }
.channel.soon-card .ic { opacity: .75; }
.channel.soon-card .value { justify-self: start; padding: 2px 12px; border-radius: 999px; font-size: .9rem; color: #b7791f; background: rgba(183,121,31,.14); border: 1px solid rgba(183,121,31,.35); }
.channel .copy { position: absolute; top: 16px; right: 16px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 8px; padding: 4px 10px; font-size: 0.8rem; cursor: pointer; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 20px; margin-top: 22px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.panel {
  border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 4vw, 28px);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.panel h2 { margin: 0 0 4px; font-size: 1.35rem; }
.panel > p { margin: 0 0 18px; color: var(--muted); }
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .two { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.93rem; }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; min-height: 46px;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-weight: 500; font-size: 0.92rem; background: var(--bg); }
.pills input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pills input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pills label { display: inline; font-weight: 500; }
.form .sent { color: var(--good); font-weight: 600; min-height: 1.5em; margin: 0; }
.side-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.side-list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.side-list .dot svg { width: 19px; height: 19px; }
.side-list .dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.05rem; }
.side-list b { display: block; }
.side-list span { color: var(--muted); font-size: 0.92rem; }
.device { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; white-space: pre-wrap; word-break: break-word; color: var(--muted); margin: 0; }

/* long-form pages: privacy, terms, source */
.doc { width: min(760px, 100%); margin: 0 auto; padding-block: 12px 56px; }
.doc h2 { font-size: 1.3rem; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-left: 1.2em; }
.doc .card-note { border: 1px solid var(--line); background: var(--bg-soft); border-radius: 16px; padding: 18px 20px; margin-top: 24px; }
.doc .card-note p { margin: 0; color: var(--ink); }
.doc .updated { text-align: center; color: var(--muted); font-size: 0.9rem; }
.doc pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow: auto; font-size: 0.9rem; color: var(--ink); }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 36px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 0.92rem; margin-top: 0; }
.foot-top { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: flex-start; }
.foot-brand { max-width: 22em; }
.foot-brand .brand { font-size: 1.05rem; margin-bottom: 6px; }
.foot-brand .brand svg { width: 24px; height: 24px; }
.foot-brand p { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.foot-links a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.foot-links a:hover { color: var(--ink); }
.foot-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; font-size: 0.85rem; }
.foot-bottom a { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s, transform 0.6s; }
.reveal.shown { opacity: 1; transform: none; }

[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* preview of what a tool made */
.preview { margin-top: 18px; }
.preview-head { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.preview-tile { display: grid; gap: 6px; text-decoration: none; color: var(--muted); font-size: 0.78rem; }
.preview-tile img, .preview-tile canvas { width: 100%; height: auto; max-height: 220px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.preview-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-tile:hover img, .preview-tile:hover canvas { border-color: var(--accent, #1f6feb); }
.options input[type=range] { width: 100%; }

/* Excel online on the front page */
.excel-band { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.excel-copy h2 { margin: 6px 0 10px; }
.excel-copy p { color: var(--muted); margin: 0 0 14px; }
.excel-list { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; }
.excel-list li { padding-left: 26px; position: relative; }
.excel-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #e3f4ea; color: #107c41; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.excel-mock { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); overflow: hidden; }
.xm-bar { display: flex; gap: 6px; padding: 10px 12px; background: #107c41; }
.xm-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.excel-mock table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; color: #111; }
.excel-mock th { background: #f3f5f8; color: #667; font-weight: 500; font-size: 12px; padding: 6px 8px; border: 1px solid #e3e7ec; }
.excel-mock td { padding: 8px 10px; border: 1px solid #e3e7ec; }
.excel-mock td.h { background: #dbe8fb; font-weight: 700; }
.excel-mock td.n { text-align: right; font-variant-numeric: tabular-nums; }
.excel-mock td.b { font-weight: 700; }
.excel-mock td.sel { outline: 2px solid #1a73e8; outline-offset: -2px; background: #eef4ff; font-family: ui-monospace, monospace; font-size: 12px; }
@media (max-width: 820px) { .excel-band { grid-template-columns: 1fr; gap: 24px; } }

/* image tools: fields, before/after, checkerboard, size table, QR maker */
.options .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.options .two > label { min-width: 0; }
.options input[type="url"], .options input[type="email"], .options input[type="tel"], .options textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-height: 44px; font: inherit; font-weight: 400;
}
.options textarea { resize: vertical; }
.options input[type="color"] { width: 100%; height: 44px; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.options input[type="file"] { max-width: 100%; font-weight: 400; }
.options select, .options input { max-width: 100%; }
@media (max-width: 420px) { .options .two { grid-template-columns: 1fr; } }

.checker, .preview-tile img.checker {
  background-color: #fff;
  background-image: linear-gradient(45deg, #d9dde3 25%, transparent 25%), linear-gradient(-45deg, #d9dde3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9dde3 75%), linear-gradient(-45deg, transparent 75%, #d9dde3 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.ba-wrap { display: grid; gap: 10px; margin-top: 8px; min-width: 0; }
.ba-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.seg button { border: 0; background: transparent; color: var(--ink); padding: 8px 12px; min-height: 36px; cursor: pointer; font: inherit; font-size: 0.9rem; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.ba { position: relative; width: 100%; max-height: 70vh; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg-soft); touch-action: pan-y; cursor: ew-resize; user-select: none; --ba: 50%; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ba .ba-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--ba)); }
.ba.checker .ba-after { background: inherit; }
.ba .ba-line { position: absolute; top: 0; bottom: 0; left: var(--ba); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.ba .ba-tag { position: absolute; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 0.78rem; pointer-events: none; }
.ba .ba-tag.l { left: 8px; } .ba .ba-tag.r { right: 8px; }
.ba-wrap input[type="range"] { width: 100%; }
.ba-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ba-side figure { margin: 0; display: grid; gap: 4px; min-width: 0; }
.ba-side img { width: 100%; height: auto; max-height: 60vh; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
.ba-side img.checker { background-color: #fff; }
.ba-side figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; }
.size-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.size-table table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.size-table th, .size-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.size-table th { color: var(--muted); font-weight: 600; background: var(--bg-soft); }
.size-table td:first-child { max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.size-table td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.size-table tr:last-child td { border-bottom: 0; }
.size-table .good { color: var(--good); }

.options.qr { gap: 16px; }
.qr-types { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-types button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 7px 14px; min-height: 38px; cursor: pointer; font: inherit; font-size: 0.92rem; }
.qr-types button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.qr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: 18px; align-items: start; }
.qr-fields, .qr-fields [data-fields] { display: grid; gap: 12px; min-width: 0; }
.qr-more { border: 0; padding: 0; }
.qr-more > summary { padding-block: 4px; }
.qr-more[open] > summary { margin-bottom: 10px; }
.qr-more > label, .qr-more > .two, .qr-more > .row, .qr-more > .help { margin-top: 12px; }
.qr-side { display: grid; gap: 8px; position: sticky; top: 80px; min-width: 0; }
.qr-preview { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg-soft); }
.qr-preview canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; }
.qr-info { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.qr-info.bad { color: var(--bad); }
.qr-payload { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.75rem; color: var(--muted); word-break: break-all; max-height: 7.5em; overflow: auto; font-weight: 400; }
.qr-payload:empty { display: none; }
@media (max-width: 680px) {
  .qr-grid { grid-template-columns: 1fr; }
  .qr-side { position: static; order: -1; width: min(280px, 100%); margin: 0 auto; }
}
.ba.checker, .ba-side img.checker {
  background-color: #fff;
  background-image: linear-gradient(45deg, #d9dde3 25%, transparent 25%), linear-gradient(-45deg, #d9dde3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9dde3 75%), linear-gradient(-45deg, transparent 75%, #d9dde3 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.ba.checker .ba-after { background: transparent; }
.options.qr, .ba-wrap, .size-table { text-align: left; }

/* responsive fixes: keep every page inside the viewport from 320px up */
main { overflow-x: clip; }
.qr-grid > *, .qr-fields [data-fields] > * { min-width: 0; }
.options input[type="file"] { width: 100%; min-width: 0; }
@media (max-width: 680px) { .qr-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 380px) {
  .top .wrap { padding-inline: 12px; gap: 6px; }
  .brand { font-size: 1.05rem; gap: 6px; }
  .brand svg { width: 26px; height: 26px; }
  .controls { gap: 6px; }
  .icon-btn, .menu-toggle { width: 38px; min-width: 38px; height: 38px; min-height: 38px; }
}

/* find a tool (Ctrl+K) and recently used */
.find-open svg { width: 20px; height: 20px; }
.finder { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 16, 28, 0.45); display: grid; justify-items: center; align-items: start; padding: 10vh 16px 16px; }
.finder[hidden] { display: none; }
html.finder-open { overflow: hidden; }
.finder-box { width: min(620px, 100%); max-height: 76vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); overflow: hidden; }
.finder-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.finder-top svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.finder-top input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; min-height: 40px; }
.finder-x { border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); border-radius: 8px; font: inherit; font-size: 0.75rem; padding: 3px 8px; cursor: pointer; }
.finder-list { overflow: auto; padding: 6px; }
.finder-sec { font-size: 0.78rem; color: var(--muted); padding: 10px 10px 4px; font-weight: 600; }
.finder-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.finder-item.on { background: var(--accent-soft); }
.finder-item span { display: grid; min-width: 0; }
.finder-item b { font-weight: 600; }
.finder-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-none { padding: 24px 14px; color: var(--muted); text-align: center; }
.finder-hint { font-size: 0.75rem; color: var(--muted); padding: 8px 14px; border-top: 1px solid var(--line); }
@media (pointer: coarse) { .finder-hint { display: none; } .finder { padding-top: 8px; } .finder-box { max-height: calc(100vh - 16px); } }
.find-badge { flex: none; display: inline-grid; place-items: center; width: 52px; height: 40px; padding: 0 4px; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); font-weight: 700; font-size: 0.72rem; font-family: Arial, sans-serif; }
.recent { margin: 0 0 28px; }
.recent-head { font-size: 1.1rem; margin: 18px 0 12px; display: flex; align-items: center; gap: 10px; }
.recent-clear { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; cursor: pointer; text-decoration: underline; }
.recent-card { align-items: center; }

/* a thin bar along the top while a page loads, so people know something is happening */
.ps-load { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 2000; pointer-events: none; overflow: hidden; }
.ps-load::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 30%; border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, var(--accent, #1f6feb), #22c3a6); box-shadow: 0 0 8px var(--accent, #1f6feb);
  animation: ps-load 1.1s ease-in-out infinite; }
.ps-load.done { opacity: 0; transition: opacity .35s ease .1s; }
.ps-load.done::before { animation: none; width: 100%; }
@keyframes ps-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .ps-load::before { animation-duration: 2.4s; } }
