/* Image Compressor styles. Design tokens first; the full site moves these into @site/ui.
   Layout: one working column — drop zone, settings panel, summary, result list. */
:root {
  --ic-bg: #f5f7f8;
  --ic-surface: #ffffff;
  --ic-sunken: #eaeff1;
  --ic-ink: #12232b;
  --ic-muted: #556770;
  --ic-line: #d3dde1;
  --ic-accent: #0f6e6a;        /* deep teal: actions */
  --ic-accent-ink: #ffffff;
  --ic-marigold: #e9a01c;       /* highlight: savings */
  --ic-good: #1d7a45;
  --ic-warn: #a86400;
  --ic-bad: #b3261e;
  --ic-focus: #2b7bd6;
  --ic-font-display: "Bricolage Grotesque", "Noto Sans", system-ui, sans-serif;
  --ic-font-body: "Noto Sans", "Noto Sans Tamil", "Noto Sans Devanagari", system-ui, sans-serif;
  --ic-font-data: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ic-radius: 10px;
  --viz-1: #008f86;  /* validated pair (dataviz validator, light) */
  --viz-2: #c27c00;
  --viz-grid: #e3e9eb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ic-bg: #0e1619; --ic-surface: #152126; --ic-sunken: #0b1215; --ic-ink: #e4eef1;
    --ic-muted: #93a7af; --ic-line: #29393f; --ic-accent: #3fb6ae; --ic-accent-ink: #062321;
    --ic-marigold: #f2b544; --ic-good: #5cc98b; --ic-warn: #e6a64a; --ic-bad: #f07a72; --ic-focus: #7fb4ff;
    --viz-1: #26a39b; --viz-2: #c08520; --viz-grid: #24343a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ic-bg: #0e1619; --ic-surface: #152126; --ic-sunken: #0b1215; --ic-ink: #e4eef1;
  --ic-muted: #93a7af; --ic-line: #29393f; --ic-accent: #3fb6ae; --ic-accent-ink: #062321;
  --ic-marigold: #f2b544; --ic-good: #5cc98b; --ic-warn: #e6a64a; --ic-bad: #f07a72; --ic-focus: #7fb4ff;
  --viz-1: #26a39b; --viz-2: #c08520; --viz-grid: #24343a;
  color-scheme: dark;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic-app { display: grid; gap: 16px; font-family: var(--ic-font-body); color: var(--ic-ink); font-size: 15px; line-height: 1.5; }
.ic-app :focus-visible { outline: 2px solid var(--ic-focus); outline-offset: 2px; }

.ic-topbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.ic-privacy { font-size: 13px; color: var(--ic-good); font-weight: 600; }
.ic-lang select { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--ic-line); background: var(--ic-surface); color: var(--ic-ink); }

/* Drop zone */
.ic-drop {
  display: grid; justify-items: center; gap: 10px; padding: 32px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--ic-line); border-radius: 14px; background: var(--ic-surface);
  transition: border-color .15s, background .15s;
}
.ic-drop:hover, .ic-drop.is-over { border-color: var(--ic-accent); background: color-mix(in srgb, var(--ic-accent) 6%, var(--ic-surface)); }
.ic-drop.is-compact { grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; padding: 14px 16px; text-align: left; }
.ic-drop-icon { width: 34px; height: 34px; color: var(--ic-accent); }
.ic-drop.is-compact .ic-drop-icon { width: 24px; height: 24px; }
.ic-drop-title { margin: 0; font-family: var(--ic-font-display); font-weight: 600; font-size: 19px; }
.ic-drop.is-compact .ic-drop-title { font-size: 15px; }
.ic-drop-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ic-drop-hint { margin: 0; font-size: 13px; color: var(--ic-muted); }
@media (max-width: 520px) { .ic-drop.is-compact { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* Buttons */
.ic-btn {
  font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--ic-line); background: var(--ic-surface); color: var(--ic-ink); white-space: nowrap;
}
.ic-btn:hover { border-color: var(--ic-accent); }
.ic-btn-primary { background: var(--ic-accent); border-color: var(--ic-accent); color: var(--ic-accent-ink); }
.ic-btn-primary:hover { filter: brightness(1.08); }
.ic-btn-ghost { background: transparent; border-color: transparent; color: var(--ic-muted); }
.ic-btn-ghost:hover { color: var(--ic-ink); border-color: var(--ic-line); }

/* Settings panel */
.ic-panel { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--ic-line); border-radius: 14px; background: var(--ic-surface); }
.ic-tabs { display: flex; gap: 4px; padding: 4px; background: var(--ic-sunken); border-radius: 10px; flex-wrap: wrap; }
.ic-tab { flex: 1 0 auto; font: inherit; font-weight: 600; font-size: 14px; padding: 8px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--ic-muted); cursor: pointer; }
.ic-tab.is-on { background: var(--ic-surface); color: var(--ic-ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.ic-settings { display: grid; gap: 12px; }
.ic-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ic-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ic-muted); margin-right: 4px; }
.ic-chip { font: inherit; font-size: 13px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--ic-line); background: transparent; color: var(--ic-ink); cursor: pointer; }
.ic-chip.is-on { background: var(--ic-ink); color: var(--ic-surface); border-color: var(--ic-ink); }
.ic-help { margin: 0; font-size: 13.5px; color: var(--ic-muted); }
.ic-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.ic-field { display: grid; gap: 4px; font-size: 13px; color: var(--ic-muted); min-width: 0; }
.ic-field > span { font-weight: 600; }
.ic-field input[type="number"], .ic-field input[type="text"], .ic-field select {
  font: inherit; font-size: 15px; color: var(--ic-ink); padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--ic-line); background: var(--ic-bg); width: 150px; max-width: 100%;
}
.ic-field input[type="number"] { font-family: var(--ic-font-data); font-variant-numeric: tabular-nums; }
.ic-field-wide { flex: 1 1 240px; }
.ic-field-wide input[type="text"] { width: 100%; }
.ic-field input[type="range"] { width: 100%; accent-color: var(--ic-accent); }
.ic-field small { font-size: 12px; }
.ic-check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.ic-check input { accent-color: var(--ic-accent); width: 16px; height: 16px; }
.ic-advanced summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ic-accent); }
.ic-advanced[open] summary { margin-bottom: 12px; }

/* Summary */
.ic-summary { display: grid; gap: 12px; }
.ic-banner { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--ic-warn) 14%, var(--ic-surface)); color: var(--ic-ink); font-weight: 600; font-size: 14px; }
.ic-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--ic-line); border: 1px solid var(--ic-line); border-radius: 12px; overflow: hidden; }
.ic-summary-grid > div { display: grid; gap: 2px; padding: 12px 14px; background: var(--ic-surface); }
.ic-summary-grid span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ic-muted); }
.ic-summary-grid b { font-family: var(--ic-font-data); font-size: 20px; font-variant-numeric: tabular-nums; }
.ic-summary-grid small { font-family: var(--ic-font-data); color: var(--ic-muted); font-size: 12px; }
.ic-summary-grid .is-accent b { color: var(--ic-marigold); }
.ic-summary-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Result list */
.ic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ic-card { border: 1px solid var(--ic-line); border-radius: var(--ic-radius); background: var(--ic-surface); padding: 10px; display: grid; gap: 8px; }
.ic-card.is-error { border-color: color-mix(in srgb, var(--ic-bad) 50%, var(--ic-line)); }
.ic-card-main { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ic-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--ic-sunken); }
.ic-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ic-card-body { min-width: 0; display: grid; gap: 4px; }
.ic-card-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13.5px; }
.ic-size { font-family: var(--ic-font-data); font-variant-numeric: tabular-nums; }
.ic-saved { font-family: var(--ic-font-data); font-weight: 700; color: var(--ic-good); }
.ic-saved.is-neg { color: var(--ic-warn); }
.ic-score { padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--ic-sunken); }
.ic-score.is-identical, .ic-score.is-excellent { color: var(--ic-good); }
.ic-score.is-good { color: var(--ic-accent); }
.ic-score.is-fair { color: var(--ic-warn); }
.ic-score.is-poor { color: var(--ic-bad); }
.ic-target { font-size: 12.5px; font-weight: 700; }
.ic-target.is-hit, .ic-target.is-padded { color: var(--ic-good); }
.ic-target.is-miss { color: var(--ic-bad); }
.ic-gps { font-size: 12.5px; color: var(--ic-muted); }
.ic-card-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ic-x { padding: 7px 10px; }
.ic-muted { color: var(--ic-muted); font-size: 13px; }
.ic-error { color: var(--ic-bad); font-size: 13.5px; font-weight: 600; }
.ic-progress-wrap { display: grid; gap: 4px; }
.ic-progress { height: 4px; border-radius: 4px; background: var(--ic-sunken); overflow: hidden; }
.ic-progress > div { height: 100%; background: var(--ic-accent); transition: width .2s; }
.ic-notes { margin: 0; padding: 8px 12px 8px 28px; background: var(--ic-sunken); border-radius: 8px; font-size: 13px; color: var(--ic-muted); display: grid; gap: 2px; }
.ic-details { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; font-size: 13px; padding: 4px 6px; }
.ic-details dt { color: var(--ic-muted); font-weight: 600; }
.ic-details dd { margin: 0; font-family: var(--ic-font-data); overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .ic-card-main { grid-template-columns: 48px minmax(0, 1fr); }
  .ic-thumb { width: 48px; height: 48px; }
  .ic-card-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.ic-engine { margin: 0; font-size: 12px; color: var(--ic-muted); }

/* Compare */
.ic-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(5 12 14 / .72); }
.ic-modal-box { width: min(1100px, 100%); max-height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; padding: 14px; border-radius: 14px; background: var(--ic-surface); color: var(--ic-ink); }
.ic-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.ic-modal-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-compare { overflow: auto; max-height: 68vh; border-radius: 10px;
  background: repeating-conic-gradient(var(--ic-sunken) 0 25%, var(--ic-surface) 0 50%) 0 0 / 16px 16px; }
.ic-compare-stage { position: relative; max-width: none; margin: 0 auto; }
.ic-compare-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; max-width: none; user-select: none; }
.ic-compare-orig { position: absolute; inset: 0; }
.ic-heat { mix-blend-mode: normal; pointer-events: none; }
.ic-compare-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ic-marigold); pointer-events: none; }
.ic-tag { position: absolute; top: 8px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: rgb(0 0 0 / .6); color: #fff; }
.ic-tag-l { left: 8px; } .ic-tag-r { right: 8px; }
.ic-compare-controls { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }

@media (prefers-reduced-motion: reduce) { .ic-app * { transition: none !important; } }

/* Site shell: header, navigation, page sections. Uses the --ic-* tokens from compressor.css
   (they become the shared @site/ui tokens). */
.st-page { max-width: 1040px; margin: 0 auto; padding-inline: 16px; padding-block: 0 40px; display: grid; gap: 20px; font-family: var(--ic-font-body); color: var(--ic-ink); }
.st-page h1, .st-page h2, .st-page h3 { font-family: var(--ic-font-display); text-wrap: balance; }

/* Header */
.st-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; margin-inline: -16px; padding-inline: 16px;
  background: color-mix(in srgb, var(--ic-bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ic-line); }
.st-header-row { display: flex; gap: 10px 14px; align-items: center; padding-block: 10px; flex-wrap: wrap; }
.st-logo { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--ic-ink); }
.st-logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ic-accent); color: var(--ic-accent-ink); font-family: var(--ic-font-data); font-weight: 700; font-size: 13px; }
.st-logo b { display: block; font-family: var(--ic-font-display); font-size: 17px; line-height: 1.1; }
.st-logo small { display: block; font-size: 11.5px; color: var(--ic-muted); }
.st-menu-btn { display: inline-flex; gap: 6px; align-items: center; font: inherit; font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--ic-line); background: var(--ic-surface); color: var(--ic-ink); cursor: pointer; }
.st-menu-btn svg { width: 18px; height: 18px; }
.st-menu-btn[aria-expanded="true"] { border-color: var(--ic-accent); color: var(--ic-accent); }
.st-search { position: relative; flex: 1 1 220px; min-width: 0; }
.st-search input { width: 100%; font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--ic-line); background: var(--ic-surface); color: var(--ic-ink); }
.st-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--ic-surface); border: 1px solid var(--ic-line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .16); max-height: 60vh; overflow: auto; }
.st-results li { display: grid; padding: 7px 10px; border-radius: 7px; }
.st-results li.is-active { background: var(--ic-sunken); }
.st-results a { color: var(--ic-accent); font-weight: 600; text-decoration: none; }
.st-results span { font-weight: 600; color: var(--ic-muted); }
.st-results small { color: var(--ic-muted); font-size: 12px; }
.st-empty { color: var(--ic-muted); font-size: 14px; }
.st-lang select { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--ic-line); background: var(--ic-surface); color: var(--ic-ink); }
.st-menu { padding-block: 4px 16px; max-height: 70vh; overflow: auto; }
.st-menu-head { display: flex; justify-content: space-between; align-items: center; padding-block: 6px; }
.st-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 24px; }
.st-menu h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ic-muted); font-family: var(--ic-font-body); }
.st-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.st-menu a { color: var(--ic-ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.st-menu a:hover { color: var(--ic-accent); text-decoration: underline; }
.st-menu a[aria-current="page"] { color: var(--ic-accent); }
.st-soon { color: var(--ic-muted); font-size: 14px; }
.st-soon small { font-size: 11px; border: 1px solid var(--ic-line); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
@media (max-width: 640px) {
  .st-logo small { display: none; }
  .st-search { order: 5; flex-basis: 100%; }
}

/* Breadcrumbs */
.st-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--ic-muted); }
.st-crumbs li + li::before { content: "›"; margin-right: 4px; }
.st-crumbs a { color: var(--ic-muted); }
.st-crumbs [aria-current] { color: var(--ic-ink); font-weight: 600; }

/* Hero */
.st-hero { display: grid; gap: 6px; }
.st-hero h1 { margin: 0; font-weight: 700; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.12; letter-spacing: -0.01em; max-width: 22ch; }
.st-hero p { margin: 0; color: var(--ic-muted); max-width: 62ch; font-size: 16px; }

/* On this page */
.st-otp { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 58px); z-index: 30; display: flex; gap: 10px; align-items: center;
  margin-inline: -16px; padding: 8px 16px; background: color-mix(in srgb, var(--ic-bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ic-line); overflow-x: auto; }
.st-otp-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ic-muted); white-space: nowrap; }
.st-otp ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.st-otp a { display: block; white-space: nowrap; padding: 4px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ic-muted); text-decoration: none; }
.st-otp a:hover { color: var(--ic-ink); }
.st-otp a.is-on { background: var(--ic-ink); color: var(--ic-surface); }
@media (max-width: 640px) { .st-otp { top: calc(env(safe-area-inset-top, 0px) + 100px); } }
.st-section, #tool { scroll-margin-top: 130px; }

/* Sections */
.st-section { display: grid; gap: 10px; padding-top: 12px; }
.st-section h2 { margin: 0; font-size: clamp(21px, 3vw, 27px); }
.st-lede { margin: 0; color: var(--ic-muted); max-width: 65ch; }

/* Guide */
.st-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 28px; counter-reset: none; }
.st-step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: center; }
.st-step:nth-child(even) .st-step-text { order: 2; }
.st-step-text { display: grid; gap: 6px; align-content: start; }
.st-step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ic-marigold); color: #1b1300; font-family: var(--ic-font-data); font-weight: 700; }
.st-step h3 { margin: 0; font-size: 19px; }
.st-step p { margin: 0; max-width: 46ch; }
.st-shot { margin: 0; display: grid; gap: 6px; }
.st-shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--ic-line); box-shadow: 0 6px 24px rgb(16 40 48 / .10); background: var(--ic-surface); }
.st-shot figcaption { font-size: 12.5px; color: var(--ic-muted); }
@media (max-width: 720px) {
  .st-step { grid-template-columns: 1fr; }
  .st-step:nth-child(even) .st-step-text { order: 0; }
}

/* Real example */
.st-ex-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.st-ex-view { display: grid; gap: 8px; min-width: 0; }
.st-ex-scroll { overflow: auto; border-radius: 12px; border: 1px solid var(--ic-line); max-height: 70vh; }
.st-ex-stage { position: relative; aspect-ratio: 640 / 427; max-width: none; }
.st-ex-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; user-select: none; }
.st-ex-before { position: absolute; inset: 0; }
.st-ex-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ic-marigold); }
.st-ex-controls { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.st-ex-controls input[type="range"] { flex: 1 1 180px; accent-color: var(--ic-accent); }
.st-zoom { display: flex; gap: 4px; }
.st-credit { margin: 0; font-size: 12px; color: var(--ic-muted); }
.st-ex-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--ic-surface); border: 1px solid var(--ic-line); border-radius: 12px; overflow: hidden; }
.st-ex-table th, .st-ex-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--ic-line); }
.st-ex-table thead th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ic-muted); }
.st-ex-table tbody th { font-weight: 600; color: var(--ic-muted); }
.st-ex-table td { font-family: var(--ic-font-data); font-variant-numeric: tabular-nums; }
.st-ex-table tr:last-child > * { border-bottom: 0; }
@media (max-width: 760px) { .st-ex-grid { grid-template-columns: 1fr; } }

/* FAQ */
.st-faq-list { display: grid; gap: 8px; }
.st-faq details { border: 1px solid var(--ic-line); border-radius: 10px; background: var(--ic-surface); padding: 12px 14px; }
.st-faq summary { cursor: pointer; font-weight: 600; }
.st-faq details p { margin: 8px 0 0; color: var(--ic-muted); max-width: 70ch; }

/* Related */
.st-related { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.st-related li { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border: 1px solid var(--ic-line); border-radius: 10px; background: var(--ic-surface); }
.st-related span { font-size: 13.5px; color: var(--ic-muted); }
.st-related small { font-size: 11.5px; color: var(--ic-muted); justify-self: start; border: 1px solid var(--ic-line); border-radius: 999px; padding: 0 7px; }

/* Footer */
.st-footer { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ic-line); font-size: 13px; color: var(--ic-muted); }
.st-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.st-footer a { color: var(--ic-ink); }
.st-footer p { margin: 0; }

/* Shared tool UI kit styles (uses --ic-* tokens) */
.ui-tool { display: grid; gap: 16px; font-family: var(--ic-font-body); color: var(--ic-ink); font-size: 15px; line-height: 1.5; }
.ui-tool :focus-visible { outline: 2px solid var(--ic-focus); outline-offset: 2px; }
.ui-panel { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--ic-line); border-radius: 14px; background: var(--ic-surface); min-width: 0; }
.ui-panel-title { margin: 0; font-family: var(--ic-font-display); font-size: 17px; }
.ui-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.ui-row.is-top { align-items: start; }
.ui-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .ui-grid2 { grid-template-columns: 1fr; } }
.ui-field { display: grid; gap: 4px; font-size: 13px; color: var(--ic-muted); min-width: 0; flex: 0 1 180px; }
.ui-field.is-wide { flex: 1 1 260px; }
.ui-field > label { font-weight: 600; }
.ui-field small { font-size: 12px; }
.ui-input, .ui-num { font: inherit; font-size: 15px; color: var(--ic-ink); border-radius: 8px; border: 1px solid var(--ic-line); background: var(--ic-bg); width: 100%; min-width: 0; }
.ui-input { padding: 8px 10px; }
select.ui-input { padding: 7px 8px; }
.ui-num { display: flex; align-items: center; overflow: hidden; }
.ui-num:focus-within { outline: 2px solid var(--ic-focus); outline-offset: 1px; }
.ui-num input { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; font: inherit; font-family: var(--ic-font-data); font-variant-numeric: tabular-nums; padding: 8px 10px; outline: none; }
.ui-affix { padding: 0 10px; color: var(--ic-muted); font-size: 13px; background: var(--ic-sunken); align-self: stretch; display: grid; place-items: center; }
.ui-textarea { resize: vertical; line-height: 1.45; }
.ui-textarea.is-mono { font-family: var(--ic-font-data); font-size: 13.5px; }
.ui-output { display: grid; gap: 8px; }
.ui-note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: var(--ic-sunken); }
.ui-note > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; font-size: 12px; color: var(--ic-surface); background: var(--ic-muted); }
.ui-note.is-pass > span { background: var(--ic-good); }
.ui-note.is-warn > span { background: var(--ic-warn); }
.ui-note.is-fail > span { background: var(--ic-bad); }
.ui-note.is-pass { background: color-mix(in srgb, var(--ic-good) 10%, var(--ic-surface)); }
.ui-note.is-warn { background: color-mix(in srgb, var(--ic-warn) 12%, var(--ic-surface)); }
.ui-note.is-fail { background: color-mix(in srgb, var(--ic-bad) 10%, var(--ic-surface)); }
.ui-note p { margin: 0; }
.ui-stats { display: flex; flex-wrap: wrap; }
.ui-stats b { font-size: 20px; white-space: nowrap; overflow-wrap: normal; }
.ui-stats > div { flex: 1 1 150px; min-width: 0; }
.ui-table-wrap { overflow-x: auto; border: 1px solid var(--ic-line); border-radius: 12px; }
.ui-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--ic-surface); }
.ui-table caption { text-align: left; padding: 10px 12px; font-weight: 600; }
.ui-table th, .ui-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--ic-line); vertical-align: top; }
.ui-table thead th { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ic-muted); background: var(--ic-sunken); }
.ui-table tbody th { font-weight: 600; }
.ui-table td { font-variant-numeric: tabular-nums; }
.ui-table tr:last-child > * { border-bottom: 0; }
.ui-mono { font-family: var(--ic-font-data); font-variant-numeric: tabular-nums; }
.ui-big { font-family: var(--ic-font-data); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ui-muted { color: var(--ic-muted); font-size: 13px; }
.ui-preview { display: grid; place-items: center; padding: 16px; border-radius: 12px; border: 1px solid var(--ic-line);
  background: repeating-conic-gradient(var(--ic-sunken) 0 25%, var(--ic-surface) 0 50%) 0 0 / 16px 16px; min-height: 160px; }
.ui-preview img, .ui-preview canvas { max-width: 100%; height: auto; display: block; }
.ui-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ui-guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ui-guides section { border: 1px solid var(--ic-line); border-radius: 12px; background: var(--ic-surface); padding: 14px 16px; }
.ui-guides h3 { margin: 0 0 6px; font-size: 16px; }
.ui-guides ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }
.ui-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ui-home-grid section { border: 1px solid var(--ic-line); border-radius: 12px; background: var(--ic-surface); padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.ui-home-grid h2 { margin: 0; font-size: 15px; }
.ui-home-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.ui-home-grid a { color: var(--ic-accent); font-weight: 600; text-decoration: none; font-size: 14px; }
.ui-home-grid a:hover { text-decoration: underline; }
.ui-home-grid .st-soon { font-size: 14px; }
.ui-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--ic-line); color: var(--ic-muted); }
.ui-badge.is-server { color: var(--ic-warn); border-color: currentColor; }
.ui-chipcheck { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.ui-chipcheck input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ui-chipcheck:focus-within { outline: 2px solid var(--ic-focus); outline-offset: 2px; }
.ui-color { width: 64px; height: 38px; padding: 2px; border: 1px solid var(--ic-line); border-radius: 8px; background: var(--ic-bg); }
/* Govt photo tool */
.gp-card { display: grid; gap: 10px; }
.gp-rules { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 2px; }
.gp-stage { position: relative; width: min(100%, 320px); margin: 0 auto; border-radius: 8px; overflow: hidden; border: 1px solid var(--ic-line); cursor: grab; touch-action: none; background: #fff; }
.gp-stage:active { cursor: grabbing; }
.gp-stage canvas { display: block; width: 100%; height: 100%; }
.gp-face { position: absolute; left: 22%; right: 22%; top: 12%; bottom: 22%; border: 2px dashed rgb(255 255 255 / .85); border-radius: 50%; box-shadow: 0 0 0 1px rgb(0 0 0 / .35); pointer-events: none; }
.gp-out { display: grid; place-items: center; padding: 12px; background: var(--ic-sunken); border-radius: 10px; }
.gp-out img { max-width: 100%; max-height: 320px; border: 1px solid var(--ic-line); }
.gp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.gp-checks .is-ok { color: var(--ic-good); }
.gp-checks .is-bad { color: var(--ic-bad); }
.gp-cam { cursor: pointer; align-self: center; }
/* Ad resizer */
.ad-group { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.ad-group legend { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ic-muted); margin-bottom: 4px; }
.ad-focus { position: relative; cursor: crosshair; border-radius: 8px; overflow: hidden; border: 1px solid var(--ic-line); }
.ad-focus img { display: block; width: 100%; }
.ad-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ic-accent); }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; align-items: end; }
.ad-item { margin: 0; display: grid; gap: 6px; }
.ad-frame { position: relative; max-height: 280px; width: 100%; max-width: 100%; margin: 0 auto; border: 1px solid var(--ic-line); border-radius: 6px; overflow: hidden; background: var(--ic-sunken); }
.ad-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ad-safe { position: absolute; border: 2px dashed #ffd84d; box-shadow: 0 0 0 9999px rgb(0 0 0 / .28); display: grid; place-items: start; }
.ad-safe span { font-size: 10px; font-weight: 700; background: #ffd84d; color: #222; padding: 1px 4px; }
.ad-item figcaption { display: grid; gap: 3px; font-size: 13px; }
.ad-ok { color: var(--ic-good); font-weight: 600; } .ad-bad { color: var(--ic-bad); font-weight: 600; } .ad-warn { color: var(--ic-warn); font-weight: 600; }
/* Background remover */
.bg-compare { position: relative; width: 100%; max-width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid var(--ic-line);
  background: repeating-conic-gradient(#d9dde0 0 25%, #ffffff 0 50%) 0 0 / 18px 18px; }
.bg-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; max-width: none; }
.bg-before { position: absolute; inset: 0; }
/* Invoice */
.inv-items td { padding: 4px 6px; vertical-align: middle; }
.inv-items .ui-input { padding: 6px 8px; font-size: 14px; min-width: 60px; }
.inv-items td:nth-child(2) .ui-input { min-width: 180px; }
.inv-n { width: 84px; font-family: var(--ic-font-data); }
.inv-logo { height: 40px; width: auto; border: 1px solid var(--ic-line); border-radius: 6px; }
/* Charts */
.viz-donut { margin: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; }
.viz-donut svg { width: 150px; height: 150px; }
.viz-center { font-family: var(--ic-font-data); font-size: 12px; font-weight: 700; fill: var(--ic-ink); }
.viz-donut figcaption { display: grid; gap: 6px; }
.viz-key { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ic-ink); }
.viz-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-key b { font-family: var(--ic-font-data); }
.viz-key small { color: var(--ic-muted); }
.viz-bars { margin: 0; position: relative; display: grid; gap: 6px; }
.viz-bars svg { width: 100%; height: auto; }
.viz-tick { font-size: 11px; fill: var(--ic-muted); font-family: var(--ic-font-data); }
.viz-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.viz-tip { position: absolute; top: 4px; transform: translateX(-50%); display: grid; gap: 2px; padding: 6px 10px; border-radius: 8px; background: var(--ic-surface); border: 1px solid var(--ic-line); box-shadow: 0 4px 16px rgb(0 0 0 / .15); font-size: 12.5px; pointer-events: none; white-space: nowrap; color: var(--ic-ink); }
.viz-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
@media (max-width: 520px) { .viz-donut { grid-template-columns: 1fr; justify-items: center; } }
/* EMI */
.emi-slider { width: 100%; accent-color: var(--ic-accent); margin-top: 4px; }
.emi-hero { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ic-accent) 8%, var(--ic-surface)); }
.emi-hero span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ic-muted); }
.emi-hero small { color: var(--ic-muted); }
.emi-table { max-height: 420px; overflow: auto; }

/* WhatsApp link generator (wa-) */
.wa-chat { border: 1px solid var(--ic-line); border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--ic-good) 7%, var(--ic-sunken)); }
.wa-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: color-mix(in srgb, var(--ic-good) 22%, var(--ic-surface)); }
.wa-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ic-surface); font-size: 16px; }
.wa-body { min-height: 150px; padding: 16px; display: flex; justify-content: flex-end; align-items: flex-start; }
.wa-bubble { max-width: 85%; padding: 8px 12px; border-radius: 10px 0 10px 10px; background: color-mix(in srgb, var(--ic-good) 20%, var(--ic-surface)); color: var(--ic-ink); overflow-wrap: anywhere; box-shadow: 0 1px 1px rgb(0 0 0 / .08); }
.wa-bubble code { font-family: var(--ic-font-data); font-size: 13px; }
.wa-qrbox { display: grid; place-items: center; min-height: 200px; }
.wa-qr { width: min(240px, 100%); height: auto; image-rendering: pixelated; border-radius: 8px; }
.wa-site { position: relative; height: 130px; border: 1px solid var(--ic-line); border-radius: 12px; background: var(--ic-surface); overflow: hidden; }
.wa-site-lines { position: absolute; inset: 16px 16px auto 16px; display: grid; gap: 8px; }
.wa-site-lines i { display: block; height: 10px; border-radius: 4px; background: var(--ic-sunken); }
.wa-site-lines i:nth-child(2) { width: 70%; } .wa-site-lines i:nth-child(3) { width: 45%; }
.wa-fab { position: absolute; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgb(0 0 0 / .25); }
.wa-site.is-right .wa-fab { right: 14px; } .wa-site.is-left .wa-fab { left: 14px; }

/* Salary and income tax (tax-) */
.tax-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tax-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--ic-line); border-radius: 12px; background: var(--ic-surface); min-width: 0; }
.tax-card.is-best { border-color: var(--ic-accent); box-shadow: inset 0 0 0 1px var(--ic-accent); background: color-mix(in srgb, var(--ic-accent) 6%, var(--ic-surface)); }
.tax-card span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ic-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tax-card em { font-style: normal; text-transform: none; letter-spacing: 0; padding: 2px 8px; border-radius: 999px; background: var(--ic-accent); color: var(--ic-accent-ink); }
.tax-card b { font-family: var(--ic-font-data); font-size: 24px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tax-card small { color: var(--ic-muted); font-size: 13px; }
.tax-ded { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; align-items: start; }
.tax-h3 { font-size: 16px; margin: 8px 0 0; }

/* Google review link (rv-) */
.rv-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.rv-steps a { color: var(--ic-accent); font-weight: 600; }
.rv-prev { display: grid; place-items: center; padding: 12px; border-radius: 12px; background: var(--ic-sunken); }
.rv-card { width: min(260px, 100%); height: auto; box-shadow: 0 2px 10px rgb(0 0 0 / .15); border-radius: 4px; }
a.ic-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* QR scanner (qs-) */
.qs-cam { position: relative; aspect-ratio: 4 / 3; max-height: 60vh; width: 100%; border-radius: 12px; overflow: hidden; background: #0b1215; display: grid; place-items: center; }
.qs-cam video { width: 100%; height: 100%; object-fit: cover; }
.qs-cam.is-off video, .qs-cam.is-found video { display: none; }
.qs-cam-idle { color: #e4eef1; padding: 24px; text-align: center; }
.qs-frame { position: absolute; inset: 18% 22%; border: 3px solid rgb(255 255 255 / .85); border-radius: 14px; box-shadow: 0 0 0 999px rgb(0 0 0 / .25); }
.qs-list { display: grid; gap: 14px; }
.qs-card { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 16px; padding: 14px; border: 1px solid var(--ic-line); border-radius: 12px; background: var(--ic-surface); }
@media (max-width: 640px) { .qs-card { grid-template-columns: 1fr; } }
.qs-thumb { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--ic-line); }
.qs-body { display: grid; gap: 10px; min-width: 0; }
.qs-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.qs-kind { font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--ic-sunken); }
.qs-kind.is-upi, .qs-kind.is-url { background: color-mix(in srgb, var(--ic-accent) 15%, var(--ic-surface)); color: var(--ic-accent); }
.qs-val { overflow-wrap: anywhere; }
.qs-host { font-size: 16px; overflow-wrap: anywhere; }
.qs-pass { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* JSON formatter (js-) */
.js-grid > .ui-panel { min-width: 0; }
.js-inline { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; }
.js-ed { display: grid; grid-template-columns: auto minmax(0, 1fr); height: 420px; border: 1px solid var(--ic-line); border-radius: 10px; overflow: hidden; background: var(--ic-surface); font: 13px/20px var(--ic-font-data); }
.js-gutter { margin: 0; padding: 10px 8px; overflow: hidden; text-align: right; color: var(--ic-muted); background: var(--ic-sunken); user-select: none; min-width: 3.2em; }
.js-gutter b { color: var(--ic-bad); background: color-mix(in srgb, var(--ic-bad) 15%, transparent); display: inline; }
.js-ed textarea { border: 0; resize: none; padding: 10px; font: inherit; color: var(--ic-ink); background: transparent; white-space: pre; overflow: auto; tab-size: 2; }
.js-ed textarea:focus { outline: 2px solid var(--ic-focus); outline-offset: -2px; }
.js-out { margin: 0; max-height: 420px; overflow: auto; padding: 10px; border: 1px solid var(--ic-line); border-radius: 10px; background: var(--ic-sunken); font: 13px/20px var(--ic-font-data); white-space: pre; }
.js-tree { max-height: 420px; overflow: auto; padding: 8px 10px; border: 1px solid var(--ic-line); border-radius: 10px; font: 13px/22px var(--ic-font-data); }
.js-node > summary { cursor: pointer; }
.js-kids { padding-left: 18px; border-left: 1px dashed var(--ic-line); margin-left: 5px; }
.js-leaf { padding-left: 14px; overflow-wrap: anywhere; }
.js-k { color: var(--ic-accent); font-weight: 600; }
.js-sum { color: var(--ic-muted); }
.js-v.is-str { color: var(--ic-good); } .js-v.is-num { color: var(--ic-warn); } .js-v.is-bool, .js-v.is-null { color: var(--ic-bad); }
.js-path { border: 0; background: none; color: var(--ic-muted); cursor: pointer; margin-left: 6px; padding: 0 4px; font-size: 12px; opacity: .5; }
.js-path:hover, .js-path:focus-visible { opacity: 1; }
.js-table { max-height: 420px; overflow: auto; }
.js-tok { font-family: var(--ic-font-data); background: var(--ic-sunken); padding: 1px 6px; border-radius: 4px; }
.js-erract { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* Colour converter (co-) */
.co-hero { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 140px; padding: 16px; border-radius: 12px; border: 1px solid var(--ic-line); }
.co-hero b { font: 700 28px var(--ic-font-data); }
.co-native { width: 64px; height: 44px; }
.co-code { font-family: var(--ic-font-data); font-size: 13px; overflow-wrap: anywhere; }
.co-img { width: 100%; height: auto; cursor: crosshair; border-radius: 8px; border: 1px solid var(--ic-line); }
.co-slider { display: grid; gap: 4px; }
.co-slider span { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; }
.co-slider b { font-family: var(--ic-font-data); font-weight: 500; }
.co-slider input { width: 100%; accent-color: var(--ic-accent); }
.co-preview { display: grid; gap: 6px; padding: 16px; border-radius: 10px; border: 1px solid var(--ic-line); }
.co-preview b { font-size: 24px; }
.co-preview.is-small { padding: 10px; text-align: center; }
.co-preview.is-small b { font-size: 22px; }
.co-ratio { margin: 0; } .co-ratio b { font: 700 30px var(--ic-font-data); }
.co-passes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.co-pass { padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.co-pass small { font-weight: 400; }
.co-pass.is-ok { background: color-mix(in srgb, var(--ic-good) 14%, var(--ic-surface)); color: var(--ic-good); }
.co-pass.is-no { background: color-mix(in srgb, var(--ic-bad) 12%, var(--ic-surface)); color: var(--ic-bad); }
.co-fix { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.co-sw { display: grid; align-content: end; gap: 2px; min-height: 64px; min-width: 0; padding: 8px; border-radius: 8px; border: 1px solid rgb(0 0 0 / .08); font: inherit; text-align: left; }
button.co-sw { cursor: pointer; } button.co-sw:hover { outline: 2px solid var(--ic-focus); outline-offset: 1px; }
.co-sw span { font-size: 12px; opacity: .9; } .co-sw b { font: 600 12px var(--ic-font-data); }
.co-fix .co-sw { min-width: 120px; }
.co-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
@media (max-width: 720px) { .co-scale { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.co-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.co-cvd { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.co-cvd-item { display: grid; gap: 6px; font-size: 13px; }

/* Legal tools (lg-) */
.lg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; align-items: start; }
.lg-set { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.lg-set legend { font-weight: 700; margin-bottom: 6px; }
.lg-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 16px; }
.lg-procs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 16px; }
.lg-proc { display: grid; gap: 6px; align-content: start; }
.lg-doc { max-height: 560px; overflow: auto; padding: 18px 22px; border: 1px solid var(--ic-line); border-radius: 12px; background: var(--ic-surface); line-height: 1.6; }
.lg-doc h1 { font-size: 24px; margin: 0 0 4px; } .lg-doc h2 { font-size: 18px; margin: 22px 0 6px; }
.lg-doc .meta { color: var(--ic-muted); font-size: 14px; }
.lg-doc table { border-collapse: collapse; width: 100%; font-size: 14px; } .lg-doc td, .lg-doc th { border: 1px solid var(--ic-line); padding: 6px 8px; text-align: left; vertical-align: top; }
.lg-doc .note { background: var(--ic-sunken); padding: 10px; border-radius: 8px; }
.lg-doc a { color: var(--ic-accent); }
.lg-code { max-height: 560px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lg-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lg-check li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--ic-line); border-radius: 10px; }
@media (max-width: 560px) { .lg-check li { grid-template-columns: 1fr; } }
.lg-badge { font-weight: 700; font-size: 13px; }
.lg-check .is-ok .lg-badge, .lg-check li.is-ok .lg-badge { color: var(--ic-good); } .lg-check li.is-todo .lg-badge { color: var(--ic-bad); } .lg-check li.is-you .lg-badge { color: var(--ic-warn); }

/* Cookie banner preview (ck-) */
.ck-mock { position: relative; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--ic-line); border-radius: 12px; overflow: hidden; background: #f3f5f6; }
.ck-page { display: grid; gap: 10px; padding: 18px; }
.ck-page i { display: block; height: 12px; border-radius: 6px; background: #dfe5e8; }
.ck-page i:nth-child(1) { width: 50%; height: 18px; } .ck-page i:nth-child(3) { width: 80%; } .ck-page i:nth-child(4) { width: 65%; }

/* Word / character counters (wc-, cc-) */
.wc-area { width: 100%; min-height: 260px; resize: vertical; padding: 14px; border: 1px solid var(--ic-line); border-radius: 12px; font: 16px/1.6 var(--ic-font-body); color: var(--ic-ink); background: var(--ic-surface); }
.wc-area.is-short { min-height: 150px; }
.wc-area:focus { outline: 2px solid var(--ic-focus); outline-offset: 1px; }
.wc-bar, .cc-bar { height: 10px; border-radius: 999px; background: var(--ic-sunken); overflow: hidden; }
.wc-bar span, .cc-bar span { display: block; height: 100%; background: var(--ic-accent); border-radius: inherit; }
.wc-bar.is-over span, .cc-card.is-over .cc-bar span { background: var(--ic-bad); } .wc-bar.is-under span { background: var(--ic-warn); }
.wc-long { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.cc-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--ic-line); border-radius: 10px; background: var(--ic-surface); min-width: 0; }
.cc-card.is-over { border-color: var(--ic-bad); }
.cc-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cc-num { font-family: var(--ic-font-data); font-variant-numeric: tabular-nums; }
.cc-card a { color: var(--ic-accent); }
.cc-over { margin: 0; font-size: 13px; overflow-wrap: anywhere; max-height: 90px; overflow: auto; }
.cc-over mark { background: color-mix(in srgb, var(--ic-bad) 25%, transparent); color: inherit; }
.cc-serp { display: grid; gap: 2px; padding: 14px; overflow-x: auto; max-width: 100%; border: 1px solid var(--ic-line); border-radius: 10px; background: #fff; color: #202124; font-family: Arial, sans-serif; }
.cc-serp-url { font-size: 12px; color: #4d5156; }
.cc-serp-title { font-size: 20px; line-height: 1.3; color: #1a0dab; white-space: nowrap; }
.cc-serp-desc { font-size: 14px; line-height: 1.58; color: #4d5156; max-width: 600px; }

/* Ad budget (ab-) and ROAS (ro-) */
.ab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ab-card { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--ic-line); border-radius: 12px; background: var(--ic-surface); }
.ab-card.is-off { opacity: .6; }
.ro-hero.is-good b { color: var(--ic-good); } .ro-hero.is-bad b { color: var(--ic-bad); }
.ro-wf { display: grid; gap: 6px; }
.ro-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(0, 2fr) minmax(90px, auto); gap: 10px; align-items: center; font-size: 14px; }
.ro-row b { font-family: var(--ic-font-data); text-align: right; font-variant-numeric: tabular-nums; }
.ro-row.is-total { border-top: 1px solid var(--ic-line); padding-top: 6px; font-weight: 700; }
.ro-track { height: 14px; background: var(--ic-sunken); border-radius: 4px; overflow: hidden; }
.ro-track i { display: block; height: 100%; border-radius: 4px; }
.ro-track i.is-pos { background: var(--viz-1); } .ro-track i.is-neg { background: var(--viz-2); }
.ro-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.ro-chip.is-scale { background: color-mix(in srgb, var(--ic-good) 15%, var(--ic-surface)); color: var(--ic-good); }
.ro-chip.is-watch { background: color-mix(in srgb, var(--ic-warn) 15%, var(--ic-surface)); color: var(--ic-warn); }
.ro-chip.is-fix { background: color-mix(in srgb, var(--ic-bad) 13%, var(--ic-surface)); color: var(--ic-bad); }

/* Tool 46: email signature preview */
.es-mail{border:1px solid var(--line,#dadce0);border-radius:8px;padding:16px;margin:12px 0;overflow-x:auto}
.es-mail.is-light{background:#ffffff;color:#202124}
.es-mail.is-dark{background:#202124;color:#e8eaed}
.es-body{margin:0 0 14px;font:14px Arial,Helvetica,sans-serif}
.es-sig{min-width:0}
/* Dark preview simulates the colour inversion Outlook, Apple Mail and Gmail apps apply to light-coloured emails */
.es-mail.is-dark .es-sig{filter:invert(1) hue-rotate(180deg)}

/* Tool 39: robots.txt and AI crawlers */
.rb-kinds{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:16px 20px;align-items:start}
.rb-kind{min-width:0}
.rb-kind .tax-h3{margin-top:0}
.rb-kind .ui-muted{margin:0 0 6px}
.rb-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.rb-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border:1px solid var(--line,#dadce0);border-radius:8px;min-width:0}
.rb-list li>div{min-width:0;overflow-wrap:anywhere}
.rb-list li.is-blocked{background:color-mix(in srgb,#c5221f 6%,transparent)}
.rb-toggle{flex:none;min-width:84px;padding:6px 10px;border-radius:999px;border:1px solid #1e8e3e;background:transparent;color:#137333;font:inherit;font-weight:600;cursor:pointer}
.rb-toggle.is-on{border-color:#c5221f;color:#a50e0e}
.rb-badge{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:4px;font-size:.75em;background:#fef7e0;color:#7a4b00}
.rb-ok{color:#137333;font-weight:600}.rb-no{color:#a50e0e;font-weight:600}
.rb-issues{margin:8px 0;padding-left:20px;display:grid;gap:4px}
.rb-issues li.is-fail{color:#a50e0e}
.rb-st.is-blocked{color:#a50e0e;font-weight:600}.rb-st.is-allowed{color:#137333;font-weight:600}.rb-st.is-partial{color:#7a4b00;font-weight:600}

/* Tool 37: sitemap */
.sm-ex{display:flex;flex-direction:column;gap:2px;margin-top:2px;min-width:0}
.sm-ex code{font-size:.85em;overflow-wrap:anywhere;color:var(--muted,#5f6368)}
.sm-robots{display:block;padding:10px 12px;border-radius:8px;background:var(--surface-2,#f1f3f4);overflow-wrap:anywhere}
.sm-children{margin:6px 0;padding-left:20px;font-size:.9em}
#tool>.ic-tabs{margin-bottom:12px}

/* Tool 38: schema */
.sc-issues li{overflow-wrap:anywhere}
.sc-issues li.is-warn{color:#7a4b00}
.sc-path{display:inline-block;margin-left:6px;font-size:.85em;opacity:.8}
.sc-more{margin:12px 0;border:1px solid var(--line,#dadce0);border-radius:8px;padding:8px 12px}
.sc-more>summary{cursor:pointer;font-weight:600}
.sc-more[open]>summary{margin-bottom:8px}
.sc-found{border-top:1px solid var(--line,#dadce0);padding-top:8px;margin-top:8px}

/* Tool 41: Open Graph previews (approximate app layouts; fixed colours on purpose so each looks like its app) */
.og-stage{margin:12px 0;padding:16px;border-radius:10px;background:#eef1f4;overflow:hidden}
.og-stage img{display:block;width:100%;aspect-ratio:1.91/1;object-fit:cover;background:#ccd}
.og-noimg{display:grid;place-items:center;width:100%;aspect-ratio:1.91/1;background:#d9dde3;color:#5f6368;font-size:13px}
.og-wa{background:#efeae2;margin:-16px;padding:16px}
.og-wa-bubble{max-width:340px;margin-left:auto;background:#d9fdd3;border-radius:8px;padding:4px 4px 6px;color:#111b21;font:14px/1.35 Arial,sans-serif;box-shadow:0 1px .5px rgba(0,0,0,.13)}
.og-wa-card{background:#d1f4cc;border-radius:6px;overflow:hidden}
.og-wa-text{display:grid;gap:2px;padding:6px 8px}
.og-wa-text b,.og-wa-text span{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
.og-wa-text b{-webkit-line-clamp:2}.og-wa-text span{-webkit-line-clamp:2;color:#3b4a54;font-size:13px}.og-wa-text small{color:#667781}
.og-wa-link{padding:4px 6px 0;color:#027eb5;overflow-wrap:anywhere}
.og-wa time{display:block;text-align:right;font-size:11px;color:#667781;padding-right:6px}
.og-tg{background:#a7c69a;margin:-16px;padding:16px}
.og-tg-bubble{max-width:340px;background:#fff;border-radius:12px;padding:8px 10px;font:14px/1.35 Arial,sans-serif;color:#000}
.og-tg-bubble>a{color:#3390ec;overflow-wrap:anywhere}
.og-tg-card{margin-top:6px;border-left:3px solid #3390ec;padding-left:8px;display:grid;gap:2px}
.og-tg-card b{color:#3390ec}.og-tg-card span{color:#333;font-size:13px}.og-tg-card img,.og-tg-card .og-noimg{border-radius:6px;margin-top:4px}
.og-card{background:#fff;border:1px solid #dadde1;color:#050505;font:14px/1.3 Arial,sans-serif;max-width:500px}
.og-card-text{display:grid;gap:3px;padding:10px 12px;background:#f0f2f5}
.og-card-text b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px}
.og-card-text small{color:#65676b;font-size:12px}.og-card-text span{color:#65676b;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.og-linkedin .og-card-text{background:#fff}
.og-x{position:relative;max-width:500px;border:1px solid #cfd9de;border-radius:16px;overflow:hidden;background:#fff;font:15px/1.3 Arial,sans-serif;color:#0f1419}
.og-x-over{position:absolute;left:12px;bottom:34px;max-width:85%;background:rgba(0,0,0,.77);color:#fff;font-size:13px;padding:2px 6px;border-radius:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.og-x-from{display:block;padding:6px 12px;color:#536471;font-size:13px}
.og-x.is-small{display:grid;grid-template-columns:130px 1fr}
.og-x.is-small img,.og-x.is-small .og-noimg{aspect-ratio:1/1;height:100%}
.og-x-text{display:grid;gap:2px;padding:10px 12px;min-width:0;align-content:center}
.og-x-text small,.og-x-text span{color:#536471}.og-x-text b,.og-x-text span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.og-google{background:#fff;padding:12px;border-radius:8px;font:14px/1.45 Arial,sans-serif;color:#202124;max-width:600px}
.og-g-site{display:flex;gap:10px;align-items:center}
.og-g-site div{display:grid;min-width:0}.og-g-site small{color:#4d5156;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.og-fav{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#e8eaed;font-weight:700;font-size:12px}
.og-g-title{color:#1a0dab;font-size:20px;margin-top:4px;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.og-g-desc{color:#4d5156;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.og-val{overflow-wrap:anywhere}
.og-made{display:block;width:100%;max-width:600px;border-radius:8px;margin:12px 0;border:1px solid var(--line,#dadce0)}

/* Tool 48: YouTube thumbnails */
.yt-sizes{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin:12px 0}
.yt-size{border:1px solid var(--line,#dadce0);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:6px;min-width:0}
.yt-size img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:6px;background:#eee}
.yt-size.is-off img{opacity:.35}
.yt-var{border-top:1px solid var(--line,#dadce0);padding-top:10px;margin-top:10px}
.yt-feed{border-radius:8px;padding:14px;display:grid;gap:16px}
.yt-feed.is-light{background:#fff;color:#0f0f0f}
.yt-feed.is-dark{background:#0f0f0f;color:#f1f1f1}
.yt-feed.is-home{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.yt-card{display:flex;flex-direction:column;gap:8px;min-width:0}
.yt-feed.is-search .yt-card{flex-direction:row}
.yt-feed.is-search .yt-thumb{width:min(360px,55%);flex:none}
.yt-feed.is-phone{max-width:360px}
.yt-feed.is-phone .yt-card{flex-direction:row}
.yt-feed.is-phone .yt-thumb{width:168px;flex:none}
.yt-thumb{position:relative}
.yt-thumb img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:10px;display:block}
.yt-time{position:absolute;right:6px;bottom:6px;background:rgba(0,0,0,.8);color:#fff;font:600 12px Roboto,Arial,sans-serif;padding:1px 4px;border-radius:4px}
.yt-meta{display:flex;flex-direction:column;gap:2px;min-width:0;font-family:Roboto,Arial,sans-serif}
.yt-title{font-size:15px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.yt-meta small{opacity:.7}
/* Tool 52: translator */
.tr-list{list-style:none;padding:0;margin:12px 0;display:grid;gap:8px}
.tr-list li{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:center;border-bottom:1px solid var(--line,#dadce0);padding:8px 0}
.tr-list li > *{min-width:0}
@media (max-width:640px){.tr-list li{grid-template-columns:1fr}}
.tr-keys{max-height:420px;overflow:auto}

/* Domain and email tools (29, 30, 32, 34, 36) */
.dn-types{display:flex;flex-wrap:wrap;gap:4px 16px;margin:10px 0}
.dn-sec{margin-bottom:12px}
.dn-val,.ea-rec{word-break:break-all;white-space:pre-wrap;font-size:13px}
.ea-rec{display:block;background:var(--soft,#f1f3f4);padding:8px;border-radius:6px;margin:6px 0}
.ea-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin:12px 0}
.ea-card{border:1px solid var(--line,#dadce0);border-left-width:4px;border-radius:8px;padding:12px;min-width:0}
.ea-card.is-pass{border-left-color:#188038}.ea-card.is-warn{border-left-color:#b06000}.ea-card.is-fail{border-left-color:#c5221f}
.ea-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}
.ea-badge{font-size:12px;font-weight:600;padding:2px 8px;border-radius:99px}
.ea-badge.is-pass{background:#e6f4ea;color:#137333}.ea-badge.is-warn{background:#fef7e0;color:#8a4b00}.ea-badge.is-fail{background:#fce8e6;color:#a50e0e}
.rb-issues li.is-pass{color:#137333}
/* Tool 57: scam risk banner */
.sc-risk{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:10px;margin-bottom:12px}
.sc-risk b{font-size:20px}
.sc-risk.is-high{background:#fce8e6;color:#a50e0e}.sc-risk.is-medium{background:#fef7e0;color:#8a4b00}.sc-risk.is-low{background:#e6f4ea;color:#137333}
/* Server tools: screenshot frame, phone mock, keyword links */
.ss-frame{border:1px solid var(--line,#dadce0);border-radius:12px;overflow:hidden;background:#fff;margin:12px auto;max-width:100%}
.ss-frame.is-phone{width:260px}.ss-frame.is-tablet{width:420px}.ss-frame.is-desktop{width:100%}
.ss-bar{display:flex;align-items:center;gap:6px;padding:8px 10px;background:#f1f3f4;font-size:12px;color:#5f6368}
.ss-bar span{width:9px;height:9px;border-radius:50%;background:#dadce0}.ss-bar em{margin-left:8px;font-style:normal}
.ss-page{padding:16px;display:flex;flex-direction:column;gap:10px;color:#202124}
.ss-page i{display:block;height:10px;border-radius:5px;background:#e8eaed}.ss-page i.is-short{width:60%}
.ss-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.ss-grid i{height:60px}
.mt-phone{width:200px;margin:12px auto;border:8px solid #202124;border-radius:28px;aspect-ratio:9/19;overflow:hidden;background:#fff}
.mt-screen{padding:14px;display:flex;flex-direction:column;gap:6px;color:#202124;font-size:12px}
.ui-details{margin:8px 0}.ui-details summary{cursor:pointer}
.yk-az{display:flex;flex-wrap:wrap;gap:6px 10px;margin:8px 0}.yk-az a{font-size:13px}
.yk-thumb{width:100%;aspect-ratio:16/9;border-radius:10px;background:linear-gradient(135deg,#c5221f,#f29900)}

/* Digigosticx theme for the tool pages: maps the tool tokens to the site's tokens (light by default, dark only by the moon button). */
:root {
  --ic-bg: var(--dgx-surface); --ic-surface: var(--dgx-surface-2); --ic-sunken: var(--dgx-ground);
  --ic-ink: var(--dgx-ink); --ic-muted: var(--dgx-muted); --ic-line: var(--dgx-line);
  --ic-accent: var(--dgx-violet-ink); --ic-accent-ink: var(--dgx-on-solid);
  --ic-font-display: "Bricolage Grotesque", "Figtree", "Noto Sans Tamil", "Noto Sans Devanagari", system-ui, sans-serif;
  --ic-font-body: "Figtree", "Noto Sans Tamil", "Noto Sans Devanagari", "Noto Sans", system-ui, sans-serif;
}
:root[data-theme="dark"] { --ic-bg: var(--dgx-surface); --ic-surface: var(--dgx-surface-2); --ic-sunken: var(--dgx-ground); --ic-ink: var(--dgx-ink); --ic-muted: var(--dgx-muted); --ic-line: var(--dgx-line); --ic-accent: var(--dgx-violet-ink); --ic-accent-ink: var(--dgx-on-solid); }
body { background: var(--dgx-surface); color: var(--dgx-ink); margin: 0; }
.st-page.dgx-toolpage { max-width: 1180px; padding-inline: 20px; padding-block: 0 56px; }
.dgx-langbar { display: flex; justify-content: flex-end; padding-top: 14px; }
.st-otp { top: var(--dgx-bar-h, 76px); }
@media (max-width: 640px) { .st-otp { top: var(--dgx-bar-h, 64px); } .st-page.dgx-toolpage { padding-inline: 16px; } }
.st-section, #tool { scroll-margin-top: 150px; }
.st-hero h1 { font-weight: 800; }
