/* ==========================================================================
   Main stylesheet (hand-written, no framework)
   Edit the colour tokens in :root and [data-theme="dark"] to re-theme the site.
   ========================================================================== */

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Truck-art inspired palette */
  --indigo: #2b2f8f;
  --indigo-deep: #1e2270;
  --marigold: #ffb81c;
  --poppy: #e8452c;
  --peacock: #0e9594;
  --magenta: #d62e79;
  --leaf: #14935a;

  /* Surfaces & text (light) */
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #eef0f9;
  --line: #dde0f0;
  --ink: #15183f;
  --ink-2: #464a7a;
  --muted: #5f6490;

  --brand: #2b2f8f;
  --brand-hover: #1e2270;
  --brand-ink: #ffffff;
  --accent: #ffb81c;
  --accent-ink: #2a1d00;
  --focus: #2b6bea;

  --panel-bg: #2b2f8f;
  --panel-ink: #ffffff;
  --panel-soft: rgba(255, 255, 255, .72);
  --panel-line: rgba(255, 255, 255, .18);
  --panel-accent: #ffc947;

  --hero-bg:
    radial-gradient(620px 320px at 92% -6%, rgba(255, 184, 28, .30), transparent 62%),
    radial-gradient(520px 320px at -4% 108%, rgba(14, 149, 148, .38), transparent 62%),
    linear-gradient(160deg, #2b2f8f 0%, #1e2270 62%, #171a58 100%);

  --trim: conic-gradient(from 45deg, var(--poppy) 0 25%, var(--marigold) 0 50%, var(--peacock) 0 75%, var(--magenta) 0) 0 0 / 14px 14px;

  --shadow: 0 1px 2px rgba(21, 24, 63, .06), 0 10px 28px -10px rgba(21, 24, 63, .16);
  --r: 18px;
  --r-sm: 12px;
  --maxw: 1160px;
  --header-h: 64px;
}

[data-theme="dark"] {
  --bg: #0d0f2b;
  --surface: #161941;
  --surface-2: #1e2256;
  --line: #2b3070;
  --ink: #edeeff;
  --ink-2: #b9bce6;
  --muted: #959ad0;

  --brand: #8d93ff;
  --brand-hover: #aab0ff;
  --brand-ink: #0d0f2b;
  --focus: #8db4ff;

  --panel-bg: #232870;
  --panel-line: rgba(255, 255, 255, .14);

  --hero-bg:
    radial-gradient(620px 320px at 92% -6%, rgba(255, 184, 28, .18), transparent 62%),
    radial-gradient(520px 320px at -4% 108%, rgba(14, 149, 148, .28), transparent 62%),
    linear-gradient(160deg, #1b1f66 0%, #131650 62%, #0d0f2b 100%);

  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -10px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* Category colours */
.c-islamic { --c: #14935a; }
.c-money { --c: #d98f00; }
.c-converters { --c: #0e9594; }
.c-datetime { --c: #2b6bea; }
.c-health { --c: #e8452c; }
.c-student { --c: #d62e79; }
.c-files { --c: #5a4fd6; }
.c-pdf { --c: #c8321e; }
.c-fun { --c: #f26b1d; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg, canvas { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(28px, 4.6vw, 42px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--marigold); color: #2a1d00; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.center { text-align: center; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); }
}
.header-in { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 21px/1 var(--font-display); letter-spacing: -.02em; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand small { font-weight: 600; color: var(--muted); font-size: inherit; }
.nav { display: none; align-items: center; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; flex: none;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  cursor: pointer; font-size: 18px; line-height: 1;
}
.icon-btn:hover { border-color: var(--brand); }
.icon-btn svg { width: 20px; height: 20px; }
.search-pill {
  display: none; align-items: center; gap: 10px; height: 42px; padding: 0 14px; min-width: 230px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--muted);
  font: 500 14.5px var(--font); cursor: pointer; text-align: left;
}
.search-pill:hover { border-color: var(--brand); }
.search-pill kbd { margin-left: auto; font: 600 12px var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--surface); }
@media (min-width: 1100px) { .nav { display: flex; } .search-pill { display: inline-flex; } .search-btn, .menu-btn { display: none; } }

.drawer { position: fixed; inset: var(--header-h) 0 0 0; background: var(--surface); z-index: 49; padding: 12px 16px 40px; overflow-y: auto; }
.drawer a { display: flex; align-items: center; gap: 12px; padding: 14px 10px; text-decoration: none; color: var(--ink); font-weight: 700; border-bottom: 1px solid var(--line); }
.drawer a span.d-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 18px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 13px; border: 1.5px solid transparent;
  font: 700 15.5px var(--font); cursor: pointer; text-decoration: none; text-align: center;
  background: var(--surface-2); color: var(--ink);
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #ffc94d; color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-wa { background: #14803f; color: #fff; }
.btn-wa:hover { background: #0f6b36; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.field { margin: 0 0 16px; min-width: 0; }
.field > label, .label { display: block; font-weight: 700; font-size: 13.5px; color: var(--ink-2); margin: 0 0 6px; }
.field-row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-row.one-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
@media (max-width: 460px) { .field-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
input[type="text"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="search"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; min-height: 48px; padding: 0 14px; font: 500 16px var(--font); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
textarea { padding: 12px 14px; min-height: 140px; line-height: 1.5; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #b9bde0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a7fb0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type="range"] { min-height: 32px; padding: 0; border: 0; background: transparent; accent-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 18px; height: 18px; }
input[type="file"] { padding: 10px; min-height: 0; background: var(--surface-2); }
input[type="color"] { padding: 4px; min-height: 48px; }
.input-wrap { position: relative; display: flex; align-items: stretch; }
.input-wrap input, .input-wrap select { flex: 1; min-width: 0; }
.addon {
  display: inline-flex; align-items: center; padding: 0 12px; font-weight: 700; font-size: 14px; color: var(--ink-2);
  background: var(--surface-2); border: 1.5px solid var(--line);
}
.addon.pre { border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.addon.pre + input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.addon.post { border-left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
input:has(+ .addon.post) { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; min-height: 1em; }
.hint b { color: var(--brand); }
.check { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; font-weight: 500; cursor: pointer; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; max-width: 100%; }
.seg label { position: relative; margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink-2); user-select: none; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 24, 80, .2); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg.block { display: flex; }
.seg.block label { flex: 1; text-align: center; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 18px; padding-bottom: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; font: 700 14px var(--font); cursor: pointer; }
.tab:hover { border-color: var(--brand); }
.tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* ---------- Hero (home) ---------- */
.hero { background: var(--hero-bg); color: #fff; position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--trim); }
.hero-in { display: grid; gap: 34px; padding: clamp(30px, 6vw, 70px) 0 clamp(44px, 7vw, 86px); }
@media (min-width: 960px) { .hero-in { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; gap: 56px; } }
.hero h1 { color: #fff; font-size: clamp(36px, 6.4vw, 64px); line-height: 1.02; letter-spacing: -.025em; margin: 0 0 16px; }
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: rgba(255, 255, 255, .84); max-width: 34em; margin: 0 0 26px; }
.search-hero { position: relative; max-width: 620px; }
.search-hero input {
  min-height: 60px; border-radius: 18px; padding: 0 20px 0 54px; font-size: 17px; border: 2px solid transparent;
  background-color: #fff; color: #15183f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%232b2f8f' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 18px center;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .55);
}
.search-hero input::placeholder { color: #6a6f9a; }
.search-hero input:focus { border-color: var(--marigold); box-shadow: 0 0 0 4px rgba(255, 184, 28, .35), 0 14px 34px -14px rgba(0, 0, 0, .55); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); z-index: 20; padding: 6px; max-height: 360px; overflow-y: auto; }
.suggest a, .results a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.suggest a[aria-selected="true"], .suggest a:hover, .results a[aria-selected="true"], .results a:hover { background: var(--surface-2); }
.s-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; flex: none; background: color-mix(in srgb, var(--c, var(--brand)) 15%, var(--surface)); }
.s-name { font-weight: 700; line-height: 1.25; }
.s-cat { font-size: 12.5px; color: var(--muted); }
.suggest .none, .results .none { padding: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; font: 600 14px var(--font); text-decoration: none; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--ink); }
.hero .chip { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.hero .chip:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.quick { background: var(--surface); color: var(--ink); border-radius: 22px; padding: 20px; box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .6); }
.quick h2 { font-size: 17px; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quick .tabs { margin-bottom: 14px; }
.quick-out { margin-top: 12px; padding: 16px; border-radius: 14px; background: var(--panel-bg); color: var(--panel-ink); }
.quick-out .big { font: 800 clamp(26px, 4.5vw, 34px)/1.1 var(--font-display); color: var(--panel-accent); word-break: break-word; }
.quick-out .small { font-size: 13.5px; color: var(--panel-soft); margin-top: 4px; }
.quick-foot { margin-top: 12px; font-size: 13.5px; }

/* ---------- Sections & tiles ---------- */
.section { padding: clamp(28px, 5vw, 52px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.tile {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tile:hover { color: inherit; border-color: var(--c, var(--brand)); transform: translateY(-2px); box-shadow: 0 12px 26px -16px var(--c, var(--brand)); }
.tile-ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 25px; background: color-mix(in srgb, var(--c, var(--brand)) 15%, var(--surface)); }
.tile-name { font: 800 16.5px/1.25 var(--font-display); letter-spacing: -.005em; }
.tile-short { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); margin-top: 3px; }
.cat-block { margin-top: 38px; scroll-margin-top: 80px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cat-head .s-ico { width: 46px; height: 46px; font-size: 24px; }
.cat-head h2 { margin: 0; font-size: 24px; }
.cat-head p { margin: 0; font-size: 14px; color: var(--muted); }
.cat-head a { margin-left: auto; font-weight: 700; font-size: 14px; white-space: nowrap; }
.cat-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cat-card { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1.5px solid var(--line); border-top: 6px solid var(--c); border-radius: var(--r); padding: 16px 16px 18px; }
.cat-card:hover { color: inherit; box-shadow: 0 12px 26px -16px var(--c); }
.cat-card .big-ico { font-size: 30px; margin-bottom: 6px; }
.cat-card h3 { margin: 0 0 4px; }
.cat-card p { margin: 0; font-size: 14px; color: var(--ink-2); }
.cat-card .count { margin-top: 10px; font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--c) 55%, var(--ink)); }

.trust { background: var(--surface); border-block: 1px solid var(--line); }
.trust-in { display: grid; gap: 18px; padding: 26px 0; }
@media (min-width: 800px) { .trust-in { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item .s-ico { --c: var(--brand); }
.trust-item b { display: block; font: 800 16px var(--font-display); margin-bottom: 2px; }
.trust-item span.t { font-size: 14px; color: var(--ink-2); }

.cta-band { background: var(--indigo); color: #fff; border-radius: 26px; padding: clamp(24px, 5vw, 44px); display: grid; gap: 16px; align-items: center; position: relative; overflow: hidden; }
[data-theme="dark"] .cta-band { background: var(--surface-2); }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .82); }
@media (min-width: 760px) { .cta-band { grid-template-columns: 1fr auto; } }

/* ---------- Tool pages ---------- */
.crumbs { font-size: 13.5px; color: var(--muted); padding: 18px 0 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs span.sep { margin: 0 6px; }
.tool-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin: 6px 0 20px; }
.tool-title { display: flex; gap: 14px; align-items: center; min-width: 0; }
.tool-title .s-ico { width: 56px; height: 56px; font-size: 29px; border-radius: 16px; }
.tool-title h1 { margin: 0; }
.tool-lead { margin: 6px 0 0; color: var(--ink-2); max-width: none; }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fav-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tool-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 24px; padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow); }
.calc { display: grid; gap: 22px; }
@media (min-width: 860px) { .calc { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; gap: 28px; } .calc .panel-out { position: sticky; top: calc(var(--header-h) + 16px); } }
.calc.wide { grid-template-columns: minmax(0, 1fr); }
.panel-out { background: var(--panel-bg); color: var(--panel-ink); border-radius: 20px; padding: 22px; min-width: 0; }
.panel-out .out-label { font-size: 13.5px; font-weight: 700; color: var(--panel-soft); margin: 0 0 4px; }
.panel-out .out-main { font: 800 clamp(30px, 5.2vw, 42px)/1.08 var(--font-display); color: var(--panel-accent); letter-spacing: -.02em; word-break: break-word; }
.panel-out .out-sub { color: var(--panel-soft); font-size: 14.5px; margin-top: 4px; }
.panel-out hr { border: 0; border-top: 1px solid var(--panel-line); margin: 16px 0; }
.panel-out a { color: var(--panel-accent); }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--panel-line); font-size: 15px; }
.kv > div:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--panel-soft); }
.kv span:last-child { font-weight: 700; text-align: right; word-break: break-word; }
.panel-light .kv > div { border-color: var(--line); }
.panel-light .kv span:first-child { color: var(--muted); }
.panel-out .btn-ghost { color: #fff; border-color: var(--panel-line); }
.panel-out .btn-ghost:hover { border-color: #fff; color: #fff; }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 14px; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font: 800 22px/1.15 var(--font-display); word-break: break-word; }
.stat span { font-size: 13px; color: var(--muted); }
.panel-out .stat { background: rgba(255, 255, 255, .1); }
.panel-out .stat span { color: var(--panel-soft); }
.donut { width: 132px; height: 132px; border-radius: 50%; position: relative; flex: none; }
.donut::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: var(--panel-bg); }
.legend { display: grid; gap: 6px; font-size: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 8px; vertical-align: -1px; }
.split { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

.note { background: color-mix(in srgb, var(--focus) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--focus) 30%, var(--line)); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; margin: 14px 0 0; }
.note-warn { background: color-mix(in srgb, var(--marigold) 16%, var(--surface)); border-color: color-mix(in srgb, var(--marigold) 55%, var(--line)); }
.note-bad { background: color-mix(in srgb, var(--poppy) 12%, var(--surface)); border-color: color-mix(in srgb, var(--poppy) 45%, var(--line)); }
.note-ok { background: color-mix(in srgb, var(--leaf) 12%, var(--surface)); border-color: color-mix(in srgb, var(--leaf) 40%, var(--line)); }
.panel-out .note { background: rgba(255, 255, 255, .1); border-color: var(--panel-line); color: #fff; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { background: var(--surface-2); font-weight: 800; font-size: 13px; color: var(--ink-2); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.tbl-scroll { max-height: 380px; overflow: auto; }
.row-actions { display: flex; gap: 8px; align-items: center; }

.item-row { display: grid; gap: 8px; grid-template-columns: 1fr; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--surface); }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 8px; background: var(--surface); }
.file-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-item .size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.file-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.dropzone { border: 2.5px dashed var(--line); border-radius: 18px; padding: 28px 16px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface-2)); }
.dropzone b { display: block; font: 800 18px var(--font-display); margin-bottom: 4px; }

/* ---------- Content (about / FAQ / related) ---------- */
.content { padding: 8px 0 40px; }
.prose { max-width: none; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface-2); }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.faq { max-width: none; margin-top: 8px; }
.faq details { border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 22px/1 var(--font); color: var(--brand); flex: none; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--ink-2); }
.disclaimer { max-width: none; font-size: 14px; color: var(--ink-2); border-left: 5px solid var(--marigold); background: var(--surface); padding: 12px 16px; border-radius: 0 12px 12px 0; margin: 22px 0 0; }
.related { margin-top: 36px; }

/* ---------- Ads ---------- */
.ad-slot { margin: 26px auto; text-align: center; min-height: 0; max-width: 100%; overflow: hidden; }
.ad-slot.is-placeholder { min-height: 96px; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 13.5px; background: repeating-linear-gradient(135deg, transparent 0 12px, color-mix(in srgb, var(--surface-2) 70%, transparent) 12px 24px); }
.ad-slot.is-live::before { content: "Advertisement"; display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; background: #14165a; color: #d7daf7; position: relative; padding-top: 14px; }
[data-theme="dark"] .site-footer { background: #090b22; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--trim); }
.foot-in { display: grid; gap: 28px; padding: 40px 0 28px; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: 15px; margin: 0 0 10px; }
.site-footer a { color: #d7daf7; text-decoration: none; display: block; padding: 4px 0; font-size: 14.5px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { color: #fff; margin: 0 0 10px; }
.site-footer .brand small { color: #c3c7f0; }
.site-footer .region-pick { color: #d7daf7; }
.site-footer p { font-size: 14.5px; margin: 0 0 12px; max-width: 34ch; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding: 16px 0 24px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
.foot-bottom a { display: inline; }

/* ---------- Search overlay & toast ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(13, 15, 43, .6); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 14px 14px; }
.search-box { width: 100%; max-width: 640px; background: var(--surface); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); padding: 12px; }
.search-box input { min-height: 54px; font-size: 17px; }
.results { margin-top: 8px; max-height: 56vh; overflow-y: auto; }
.search-hint { font-size: 12.5px; color: var(--muted); padding: 8px 8px 2px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); opacity: 0; background: #15183f; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; z-index: 90; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Tool-specific bits ---------- */
.tap-btn { width: min(260px, 70vw); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; background: radial-gradient(circle at 30% 25%, #ffd361, var(--marigold) 55%, #e59a00); color: #2a1d00; font: 800 clamp(56px, 16vw, 84px)/1 var(--font-display); box-shadow: 0 18px 0 -4px #b97800, 0 26px 40px -10px rgba(0, 0, 0, .45); user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tap-btn:active { transform: translateY(8px); box-shadow: 0 10px 0 -4px #b97800, 0 14px 24px -10px rgba(0, 0, 0, .45); }
.big-num { font: 800 clamp(40px, 9vw, 64px)/1 var(--font-display); color: var(--panel-accent); }
.compass { width: min(300px, 80vw); aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--surface-2); position: relative; margin: 0 auto; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); }
.compass .needle { position: absolute; left: 50%; top: 8%; width: 0; height: 84%; transform-origin: 50% 50%; transition: transform .15s linear; }
.compass .needle::before { content: ""; position: absolute; left: -12px; top: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 80px solid var(--leaf); }
.compass .needle::after { content: "🕋"; position: absolute; left: -14px; top: -26px; font-size: 26px; }
.compass .n { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); font-weight: 800; color: color-mix(in srgb, var(--poppy) 72%, var(--ink)); }
.wheel-wrap { position: relative; width: min(380px, 92vw); margin: 0 auto; }
.wheel-wrap canvas { width: 100%; height: auto; display: block; }
.wheel-pin { position: absolute; right: -4px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-top: 14px solid transparent; border-bottom: 14px solid transparent; border-right: 28px solid var(--poppy); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.type-text { font: 500 20px/1.8 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 16px; background: var(--surface-2); border-radius: 14px; user-select: none; word-break: break-word; }
.type-text .ok { color: var(--leaf); }
.type-text .bad { color: var(--poppy); background: color-mix(in srgb, var(--poppy) 16%, transparent); }
.type-text .cur { background: var(--marigold); color: #2a1d00; border-radius: 3px; }
.coin { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font: 800 26px var(--font-display); color: #2a1d00; background: radial-gradient(circle at 30% 25%, #ffe08a, var(--marigold) 60%, #d98f00); box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .35), 0 12px 24px -10px rgba(0, 0, 0, .5); }
.coin.flip { animation: coin .8s ease-in-out; }
@keyframes coin { 0% { transform: rotateY(0); } 100% { transform: rotateY(1440deg); } }
.dice { display: inline-grid; place-items: center; width: 74px; height: 74px; border-radius: 16px; background: #fff; color: #15183f; font: 800 40px var(--font-display); box-shadow: 0 6px 0 #c9cde8, 0 10px 18px -6px rgba(0, 0, 0, .4); margin: 6px; }
.timer-big { font: 800 clamp(64px, 18vw, 110px)/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--peacock), var(--marigold)); transition: width .3s; }
.meter { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; width: 0; background: var(--panel-accent); transition: width .25s, background .25s; }
.qr-out { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 16px; min-height: 200px; }
.qr-out canvas { image-rendering: pixelated; max-width: 100%; height: auto; }
.preview-img { max-height: 120px; border-radius: 10px; }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .ad-slot, .tool-actions, .related, .faq, .crumbs, .btn-row, .hero, .search-overlay, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .tool-card { box-shadow: none; border: 1px solid #999; }
  .panel-out { background: #fff; color: #000; border: 1px solid #999; }
  .panel-out .out-main, .panel-out .out-sub, .panel-out .out-label, .kv span { color: #000 !important; }
}

/* ---- Light animations (all switched off for people who prefer reduced motion) ---- */
@keyframes fx-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fx-pop { 0% { transform: scale(1); } 40% { transform: scale(1.045); } 100% { transform: scale(1); } }
@keyframes fx-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 35%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
main { animation: fx-up .45s ease-out both; }
.fx-on .fx-r { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; transition-delay: var(--fx-d, 0ms); }
.fx-on .fx-r.fx-in { opacity: 1; transform: none; }
.fx-pop { animation: fx-pop .35s ease-out; }
.btn { transition: transform .12s ease, box-shadow .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.tile:active { transform: scale(.985); }
.tile-ico { transition: transform .2s ease; }
.tile:hover .tile-ico { transform: scale(1.12) rotate(-4deg); }
.chip, .tab { transition: background .15s, transform .12s, border-color .15s; }
.chip:hover { transform: translateY(-1px); }
.btn-accent:focus-visible { animation: fx-glow .8s ease-out; }
@media (prefers-reduced-motion: reduce) {
  main, .fx-pop { animation: none !important; }
  .fx-on .fx-r { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn:hover, .btn:active, .tile:hover .tile-ico, .chip:hover { transform: none !important; }
}

/* region labels */
.tile-region { display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 99px; font: 700 11.5px/1.5 var(--font); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.region-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.region-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.region-pick select { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; }

/* PDF tools */
.pk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px;margin-top:12px;max-height:520px;overflow:auto;padding:4px}
.pk-th{position:relative;border:2px solid var(--line);border-radius:10px;background:var(--surface);padding:6px;text-align:center;cursor:pointer;user-select:none}
.pk-th canvas{display:block;width:100%;height:auto;border-radius:4px;background:#fff}
.pk-th span{display:block;font-size:.8rem;color:var(--muted);margin-top:4px}
.pk-th.sel{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand) inset}
.pk-th.del{border-color:var(--poppy);opacity:.55}
.pk-th.del::after{content:"✕";position:absolute;top:4px;right:8px;color:var(--poppy);font-weight:700}
.pk-pv{position:relative;display:inline-block;max-width:100%;touch-action:none}
.pk-pv canvas{display:block;max-width:100%;height:auto;border:1px solid var(--line);background:#fff}

/* Currency picker with flags (assets/js/lib/fx-picker.js) */
.fxp{position:relative}
.fxp-btn{width:100%;min-height:48px;display:flex;align-items:center;gap:8px;padding:8px 12px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-size:16px;cursor:pointer;text-align:left}
.fxp-btn:hover{border-color:var(--brand)}
.fxp-btn:focus-visible,.fxp-search:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 45%,transparent);outline-offset:1px}
.fxp-flag{width:24px;height:18px;object-fit:contain;flex:none}
.fxp-code{font-weight:700}
.fxp-country{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.9em}
.fxp-caret{color:var(--muted);flex:none}
.fxp-pop{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 6px);background:var(--surface);border:1.5px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:8px;min-width:min(320px,calc(100vw - 32px))}
.fxp-search{width:100%;min-height:44px;border:1.5px solid var(--line);border-radius:10px;padding:8px 12px;font:inherit;font-size:16px;background:var(--surface);color:var(--ink)}
.fxp-list{list-style:none;margin:8px 0 0;padding:0;max-height:min(340px,50vh);overflow:auto;overscroll-behavior:contain}
.fxp-opt{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;cursor:pointer;min-height:48px}
.fxp-opt:hover,.fxp-opt.on{background:var(--surface-2)}
.fxp-opt[aria-selected="true"]{box-shadow:inset 3px 0 0 var(--brand)}
.fxp-txt{display:flex;flex-direction:column;min-width:0}
.fxp-r1{font-size:.95rem}
.fxp-r2{font-size:.8rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fxp-group{font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:10px 10px 4px;font-weight:700}
.fxp-none{padding:14px;color:var(--muted)}

/* Exchange-rate history & average (fx-history-ui.js) */
.fxh-ctl{display:grid;gap:12px}
.fxh-pair{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end}
.fxh-dates{grid-template-columns:repeat(2,minmax(0,1fr))}
.fxh-lab{font-weight:700;font-size:14px;color:var(--ink-2,var(--ink))}
.fxh-chips{display:flex;flex-wrap:wrap;gap:8px}
.fxh-chip{min-height:44px;padding:8px 16px;border-radius:999px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-weight:700;cursor:pointer}
.fxh-chip[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.fxh input[type=date]{width:100%;min-height:48px;padding:8px 12px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-size:16px}
.fxh-prog,.fxh-msg{margin-top:14px}
.fxh-msg.warn{border-color:var(--poppy)}
.fxh-out{margin-top:18px}
.fxh-sum{background:linear-gradient(135deg,color-mix(in srgb,var(--brand) 14%,var(--surface)),var(--surface));border:2px solid var(--brand);border-radius:18px;padding:20px;box-shadow:var(--shadow)}
.fxh-sum-l{margin:0;font-size:.85rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.fxh-avg{margin:6px 0;line-height:1.1;overflow-wrap:anywhere}
.fxh-num{font-size:clamp(2rem,8vw,3rem);font-weight:800;color:var(--brand)}
.fxh-eq{font-size:1.1rem;font-weight:700}
.fxh-sum-s{margin:0 0 14px;color:var(--muted)}
.fxh-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
.fxh-stat{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;min-width:0}
.fxh-stat span,.fxh-stat small{font-size:.78rem;color:var(--muted)}
.fxh-stat b{font-size:1.05rem;overflow-wrap:anywhere}
.fxh-chart{position:relative;margin-top:16px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:8px}
.fxh-chart svg{display:block;width:100%;height:auto;touch-action:pan-y}
.fxh-line{fill:none;stroke:var(--brand);stroke-width:2.5;stroke-linejoin:round}
.fxh-area{fill:color-mix(in srgb,var(--brand) 12%,transparent);stroke:none}
.fxh-avgline{stroke:var(--poppy);stroke-width:1.5;stroke-dasharray:6 5}
.fxh-ax{font-size:12px;fill:var(--muted)}
.fxh-axa{fill:var(--poppy);font-weight:700}
.fxh-cur{stroke:var(--muted);stroke-width:1}
.fxh-dot{fill:var(--brand);stroke:var(--surface);stroke-width:2}
.fxh-tip{position:absolute;top:6px;background:var(--ink);color:var(--surface);padding:4px 8px;border-radius:8px;font-size:.8rem;pointer-events:none;white-space:nowrap}
.fxh-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:18px 0 10px}
.fxh-grow{flex:1}
.fxh-tbl{max-height:460px;overflow:auto}
.fxh-tbl thead th{position:sticky;top:0;background:var(--surface-2)}
.seg button{padding:9px 14px;border:0;border-radius:10px;background:transparent;font:inherit;font-weight:700;font-size:14px;cursor:pointer;color:var(--ink-2,var(--ink));min-height:40px}
.seg button[aria-pressed="true"]{background:var(--brand);color:var(--brand-ink)}
.fxc-tabs{margin-bottom:18px}
@media (max-width:480px){.fxh-pair{grid-template-columns:1fr}.fxh-pair .icon-btn{justify-self:center}.fxh-dates{grid-template-columns:1fr}}
.quick .field-row .field:last-child .fxp-pop{left:auto;right:0}
.quick .fxp-btn{min-height:44px;padding:6px 10px}

/* Small phones (320 to 400px): keep the header on one line, let long words and tables wrap or scroll */
@media (max-width: 400px) {
  .header-in { gap: 6px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-in .icon-btn { width: 38px; height: 38px; }
  .header-in .eng-chip { height: 38px; padding: 0 8px; }
}
.prose { overflow-wrap: break-word; }
.prose table { display: block; max-width: 100%; overflow-x: auto; }
.section-head a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; }
.cat-head a { display: inline-flex; align-items: center; min-height: 40px; }
.calc { grid-template-columns: minmax(0, 1fr); }
.calc > * { min-width: 0; }
@media (min-width: 860px) { .calc { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
/* dropdown popups: never wider than the screen; the last column's popup opens towards the left */
.fxp-pop { max-width: calc(100vw - 32px); }
.tzp-ctl .field:last-child .fxp-pop, .tz2 .field-row .field:last-child .fxp-pop { left: auto; right: 0; }

/* footer: region picker and install button on their own lines with space between */
.foot-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 6px; }
.site-footer .region-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; max-width: 320px; font-size: 14px; }
.site-footer .rp-label { font-weight: 700; color: #fff; }
.site-footer .region-pick > div { width: 100%; }
.site-footer .fxp-btn { color: var(--ink); }
.site-footer .fxp-pop { color: var(--ink); }
.fxp-pop.up { top: auto; bottom: calc(100% + 6px); }
.site-footer .btn[data-install] { align-self: flex-start; }
.site-footer .foot-actions a { display: inline; padding: 0; }
.site-footer .fxp-opt, .site-footer .fxp-opt b { color: var(--ink); }

/* long forms: fill the wide column with two columns of fields instead of one long stack */
@media (min-width: 1000px) {
  .calc.cols2 { grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr); }
  .calc.cols2 > :first-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; align-content: start; }
  .calc.cols2 > :first-child > :not(.field) { grid-column: 1 / -1; }
}

/* compact home page */
.cat-minis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cat-mini { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 12px; box-shadow: var(--shadow); }
.cat-mini-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cat-mini-head .s-ico { width: 36px; height: 36px; font-size: 19px; }
.cat-mini-head h3 { margin: 0; font-size: 17px; }
.cat-mini-head h3 a { color: var(--ink); text-decoration: none; }
.cat-mini ul { list-style: none; margin: 0; padding: 0; }
.cat-mini li a { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 2px 0; font-size: 14.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; border-top: 1px solid var(--line); }
.cat-mini li:first-child a { border-top: 0; }
.cat-mini li a:hover { color: var(--brand); }
.cat-mini .cat-more { display: inline-flex; align-items: center; min-height: 36px; font-size: 13.5px; font-weight: 700; }
@media (min-width: 900px) { .tiles-cap { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .tiles-cap > :nth-child(n+7) { display: none; } }
.section { padding: clamp(22px, 4vw, 38px) 0; }
@media (max-width: 599px) {
  .cat-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-mini { padding: 10px 12px 8px; }
  .cat-mini li:nth-child(n+4) { display: none; }
  .cat-mini li a { font-size: 13.5px; min-height: 40px; gap: 6px; line-height: 1.25; }
  .cat-mini-head .s-ico { width: 30px; height: 30px; font-size: 16px; }
  .cat-mini-head h3 { font-size: 15px; line-height: 1.2; }
  .tiles-cap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiles-cap .tile { flex-direction: column; align-items: flex-start; padding: 12px; gap: 8px; }
  .tiles-cap .tile-short { display: none !important; }
  .tiles-cap > :nth-child(n+7) { display: none; }
}

/* ---------- support chat ---------- */
.sp-launch { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: 800 15px var(--font-display, inherit); cursor: pointer; box-shadow: 0 10px 28px -8px rgba(27, 31, 120, .6); }
.sp-launch:hover { filter: brightness(1.08); }
.sp-launch:focus-visible { outline: 3px solid var(--marigold, #ffb81c); outline-offset: 3px; }
.sp-launch .sp-ico { font-size: 22px; line-height: 1; }
:root[data-theme="dark"] .sp-launch { background: var(--brand); color: var(--brand-ink, #fff); }
.sp-open .sp-launch { display: none; }
.sp-panel { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70; width: min(396px, calc(100vw - 32px)); height: min(600px, calc(100dvh - 96px)); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 70px -20px rgba(13, 15, 43, .55); overflow: hidden; }
.sp-panel[hidden] { display: none; }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--brand); color: #fff; }
:root[data-theme="dark"] .sp-head { color: var(--brand-ink, #fff); }
.sp-head div { flex: 1; min-width: 0; line-height: 1.25; }
.sp-head b { display: block; font-size: 15.5px; }
.sp-head small { opacity: .85; font-size: 12px; }
.sp-x { width: 40px; height: 40px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .16); color: inherit; font-size: 17px; cursor: pointer; }
.sp-x:hover { background: rgba(255, 255, 255, .28); }
.sp-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-size: 15px; }
.sp-av-lg { width: 38px; height: 38px; font-size: 20px; background: rgba(255, 255, 255, .2); }
.sp-log { flex: 1; overflow-y: auto; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; background: var(--surface); }
.sp-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.sp-user { justify-content: flex-end; }
.sp-bubble { max-width: 84%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.sp-bot .sp-bubble { background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 5px; }
.sp-user .sp-bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
:root[data-theme="dark"] .sp-user .sp-bubble { color: var(--brand-ink, #fff); }
.sp-link { display: block; margin-top: 8px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--brand); color: var(--brand); background: var(--surface); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.sp-link:hover { background: var(--brand); color: #fff; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 8px; max-height: 150px; overflow-y: auto; }
.sp-chips:empty { display: none; }
.sp-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font: 600 13px inherit; font-family: inherit; cursor: pointer; text-align: left; }
.sp-chip:hover { border-color: var(--brand); color: var(--brand); }
.sp-form { display: flex; gap: 8px; padding: 8px 12px 10px; border-top: 1px solid var(--line); }
.sp-form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-size: 16px; }
.sp-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(60, 70, 200, .2); }
.sp-send { width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--brand); color: #fff; font-size: 18px; cursor: pointer; }
:root[data-theme="dark"] .sp-send { color: var(--brand-ink, #fff); }
.sp-note { margin: 0; padding: 0 14px 10px; font-size: 11.5px; color: var(--muted); }
.sp-note a { display: inline; padding: 0; }
.sp-typing .sp-bubble { display: inline-flex; gap: 4px; align-items: center; padding: 14px; }
.sp-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: sp-b 1s infinite ease-in-out; }
.sp-typing i:nth-child(2) { animation-delay: .15s; } .sp-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sp-b { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .sp-typing i { animation: none; opacity: .6; } }
@media (max-width: 520px) {
  .sp-launch { min-height: 48px; padding: 0 14px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .sp-launch .sp-lbl { display: none; }
  .sp-panel { inset: 0; width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .sp-open body { overflow: hidden; }
}
