/* Tokens */
/* Brand: "rubber-stamp violet" from Indian office stamp pads, haldi yellow for marking answers,
   cool copier-paper background, and Anek Latin (Ek Type, an Indian foundry) for all text. */
/* Variable Anek Latin: weights 100–800 and widths 100–125% (normal through the
   stretched headings). The unused condensed widths are not in the file. */
@font-face {
  font-family: 'Anek Latin';
  src: url('fonts/anek-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-stretch: 100% 125%;
  font-display: swap;
}
:root {
  --ink: #1d1838;
  --ink-2: #39334f;
  --muted: #5d5873;
  --paper: #f4f4f8;
  --surface: #ffffff;
  --line: #dddbe8;
  --line-strong: #bcb8d0;
  --blue: #4527a0;
  --blue-deep: #321a7d;
  --blue-tint: #efebfa;
  --haldi: #f5b83d;
  --haldi-tint: #fff3d1;
  --green: #127a55;
  --green-tint: #e4f4ec;
  --danger: #b42318;
  --danger-tint: #fdecea;
  --radius: 8px;
  --radius-sm: 5px;
  --font: 'Anek Latin', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; font-weight: 420; line-height: 1.55; }
strong, b { font-weight: 650; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.005em; font-stretch: 112%; }
h1 { font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.75rem); font-weight: 760; font-stretch: 118%; }
h2 { font-size: 1.3rem; font-weight: 680; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--blue-tint); padding: .05em .35em; border-radius: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { top: 8px; color: #fff; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand search" "cats cats"; gap: 8px 16px; align-items: center; padding-top: 10px; padding-bottom: 6px; }
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 740; font-stretch: 118%; font-size: 1.25rem; letter-spacing: .005em; }
.brand:hover { color: var(--ink); }
.search { grid-area: search; position: relative; justify-self: end; width: min(100%, 360px); }
.search input[type="search"] { width: 100%; font: inherit; font-size: .95rem; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--ink); }
.search input[type="search"]:focus { background: var(--surface); border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-tint); }
.search-results { position: absolute; top: calc(100% + 6px); right: 0; left: 0; min-width: 260px; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(29, 24, 56, .14); max-height: 60vh; overflow: auto; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.search-results a span { color: var(--muted); font-size: .85rem; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--blue-tint); }
.search-results .empty { padding: 8px 10px; color: var(--muted); }
.cats { grid-area: cats; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
.cats a { white-space: nowrap; padding: 6px 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; border-radius: var(--radius-sm); }
.cats a:hover { background: var(--paper); color: var(--ink); }
@media (min-width: 900px) {
  .header-row { grid-template-columns: auto auto 1fr; grid-template-areas: "brand cats search"; padding-bottom: 10px; }
  .cats { margin: 0; }
}

/* Hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 36px 0 44px; overflow-x: clip; }
.hero-grid { display: grid; gap: 34px; align-items: center; }
.hero h1 { max-width: 12ch; font-size: clamp(2.4rem, 1.5rem + 4vw, 4.1rem); font-weight: 780; font-stretch: 116%; line-height: 1; letter-spacing: -0.015em; margin-bottom: .4em; text-wrap: balance; }
.hero .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 44ch; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; color: var(--ink-2); font-weight: 600; font-size: .98rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--haldi); box-shadow: 0 0 0 3px var(--haldi-tint); }
.drop-start { position: relative; }
.hero-stamp { position: absolute; z-index: 2; width: 124px; height: 124px; right: 2px; top: -50px; color: var(--blue); opacity: .95; transform: rotate(-11deg); pointer-events: none; mix-blend-mode: multiply; }
@media (prefers-reduced-motion: no-preference) {
  .hero-stamp { animation: stamp-press .5s cubic-bezier(.2, .9, .3, 1.2) .35s both; }
  @keyframes stamp-press { from { opacity: 0; transform: rotate(-4deg) scale(1.35); } 70% { opacity: 1; } to { opacity: .95; transform: rotate(-11deg) scale(1); } }
}
@media (min-width: 860px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 64px; }
  .hero-stamp { width: 158px; height: 158px; right: -34px; top: -62px; }
}

/* Most used */
.popular { padding-top: 36px; }
.popular h2 { font-size: 1.15rem; color: var(--muted); font-weight: 620; margin-bottom: 12px; }
.popular ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); border-top: 1px solid var(--line); }
.popular a { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: start; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.popular a .cat-icon { grid-row: span 2; color: var(--blue); margin-top: 1px; }
.popular a strong { font-size: 1.08rem; font-stretch: 108%; }
.popular a span { color: var(--muted); font-size: .95rem; }
.popular a:hover strong { color: var(--blue); }

.drop-start-zone, .drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px;
  border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--paper); color: var(--ink-2);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.drop-start-zone { min-height: 280px; padding: 28px; background: var(--paper) repeating-linear-gradient(transparent 0 31px, rgba(69, 39, 160, .06) 31px 32px); }
.drop-start-zone svg, .drop-zone svg { color: var(--blue); }
.drop-start-zone strong { font-size: 1.25rem; color: var(--ink); }
.drop-start-zone span, .drop-zone span { color: var(--muted); font-size: .95rem; max-width: 34ch; }
.drop-start-zone:hover, .drop-zone:hover, .is-over .drop-start-zone, .is-over .drop-zone { border-color: var(--blue); background: var(--blue-tint); }
input:focus-visible + .drop-start-zone, input:focus-visible + .drop-zone { outline: 3px solid var(--blue); outline-offset: 3px; }
.start-result { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.start-result p { margin: 0 0 10px; font-weight: 600; }
.start-result p span { font-weight: 400; color: var(--muted); }
.start-result ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.start-result button { font: inherit; font-size: .92rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--blue); background: var(--surface); color: var(--blue); cursor: pointer; }
.start-result button:hover { background: var(--blue); color: #fff; }

/* Directory */
.directory { display: grid; gap: 8px 40px; padding-bottom: 56px; }
.dir-group { padding: 20px 0; border-top: 2px solid var(--ink); }
.dir-group h2 a { display: inline-flex; align-items: center; gap: 10px; }
.dir-group .cat-icon { color: var(--blue); flex: none; }
.dir-group h2 { font-size: 1.2rem; margin-bottom: 2px; }
.dir-group h2 a { color: var(--ink); text-decoration: none; }
.dir-group h2 a:hover { color: var(--blue); }
.dir-group > p { color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.dir-group ul { list-style: none; padding: 0; margin: 0; }
.dir-group li a { display: block; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.dir-group li a:hover { color: var(--blue); }
@media (min-width: 700px) { .directory { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .directory { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 40px; } }

/* Page scaffolding */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--muted); padding: 18px 0 10px; }
.crumbs a { color: var(--muted); }
.tool-page, .cat-page, .prose-page { padding-bottom: 56px; }
.tool-head { max-width: 760px; margin-bottom: 18px; }
.lede { font-size: 1.08rem; color: var(--ink-2); }
.privacy { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 5px 11px; border-radius: 4px; border: 1.5px solid currentColor; box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px currentColor; background: var(--surface); color: var(--blue); font-size: .9rem; font-weight: 600; }

/* Tool panel */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-width: 900px; }
@media (min-width: 640px) { .tool { padding: 24px; } }
.drop-zone { min-height: 190px; padding: 24px; }
.drop-zone strong { font-size: 1.12rem; color: var(--ink); }
.tool.has-file .drop-zone { min-height: 0; padding: 14px; flex-direction: row; gap: 12px; }
.tool.has-file .drop-zone svg { width: 24px; height: 24px; }
.tool.has-file .drop-zone span { display: none; }
.panel { margin-top: 18px; }
.panel-title { font-size: 1.05rem; }
.count { color: var(--muted); font-weight: 500; }
.file-meta { margin: 0 0 14px; padding: 10px 12px; background: var(--paper); border-radius: var(--radius-sm); font-size: .95rem; overflow-wrap: anywhere; }
.file-meta strong { color: var(--ink); }
.hint { color: var(--muted); font-size: .88rem; margin: 4px 0 0; }
.amt-words { color: var(--muted); font-size: .88rem; margin: 5px 0 0; font-variant-numeric: tabular-nums; }
.note { color: var(--muted); font-size: .9rem; margin: 14px 0 0; max-width: 70ch; }

/* Form controls */
label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 5px; color: var(--ink-2); }
label output { font-weight: 700; color: var(--blue); margin-left: 4px; }
input[type="text"], input[type="number"], input[type="date"], input[type="search"], input[type="tel"], input[type="email"], input[type="month"], input[type="url"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 11px; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
textarea { resize: vertical; line-height: 1.5; }
textarea.mono { font-family: var(--mono); font-size: .9rem; }
input[type="range"] { width: 100%; accent-color: var(--blue); min-height: 32px; }
.field { margin-bottom: 14px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; align-items: start; }
.field-row.tight { grid-template-columns: 1fr 1fr; }
.field.grow { grid-column: span 2; }
@media (max-width: 480px) { .field.grow { grid-column: 1 / -1; } }
.self-end { align-self: end; margin-bottom: 22px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin: 4px 16px 10px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.choice { border: 0; padding: 0; margin: 0 0 14px; }
.choice legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--ink-2); }
.choice label { display: flex; align-items: center; gap: 8px; font-weight: 500; padding: 6px 0; cursor: pointer; }
.choice.inline { display: flex; flex-wrap: wrap; gap: 0 18px; }
.choice.inline legend { width: 100%; }
.choice input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }
.affix { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.affix:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.affix input, .affix select { border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; }
.affix select { width: auto; flex: 0 0 auto; min-width: 104px; background: var(--paper); border-left: 1px solid var(--line); }
.affix span { display: flex; align-items: center; padding: 0 10px; background: var(--paper); color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap; }

/* Segmented control and preset chips */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; }
.seg label { margin: 0; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label { padding: 9px 14px; font-weight: 600; font-size: .92rem; color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line); }
.seg label:last-child { border-right: 0; }
.seg label:has(input:checked) { background: var(--ink); color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: -3px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets button { font: inherit; font-size: .92rem; font-weight: 600; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.presets button:hover { border-color: var(--blue); color: var(--blue); }
.presets button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .98rem; min-height: 46px; padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; margin: 0; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); color: #fff; }
.btn.primary:disabled { background: var(--line-strong); cursor: progress; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.btn.download { background: var(--green); color: #fff; }
.btn.download:hover { background: #0d5f42; color: #fff; }

/* File list */
.file-list { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.file-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.file-list li:last-child { border-bottom: 0; }
.file-list .idx { width: 26px; height: 26px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--muted); }
.file-list .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.file-list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-list .name small { display: block; color: var(--muted); font-weight: 400; }
.file-list .ctl { display: flex; gap: 4px; }
.file-list .ctl button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 1rem; line-height: 1; }
.file-list .ctl button:hover { border-color: var(--ink); }
.file-list .ctl button:disabled { opacity: .35; cursor: default; }
.thumbs li { grid-template-columns: auto auto 1fr auto; }

/* Status and result */
.status { margin: 14px 0 0; font-weight: 600; min-height: 1px; }
.status:empty { margin: 0; }
.status.error { color: var(--danger); background: var(--danger-tint); padding: 10px 12px; border-radius: var(--radius-sm); }
.status.ok { color: var(--green); }
.status.busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--line-strong); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .status.busy::before { animation: none; } }
.progress { height: 6px; background: var(--paper); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; background: var(--blue); width: 0; transition: width .2s; }
.result { margin-top: 18px; padding: 16px; border-radius: var(--radius); background: var(--green-tint); border: 1px solid #b7e1cb; }
.result h2 { font-size: 1.05rem; color: var(--green); margin-bottom: 8px; }
.result .summary { margin: 0 0 12px; }
.result-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.result-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.result-list .meta { min-width: 0; overflow-wrap: anywhere; font-size: .95rem; }
.result-list .meta small { display: block; color: var(--muted); }
.result-list .saved { color: var(--green); font-weight: 700; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.result-grid figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.result-grid img { width: 100%; height: 160px; object-fit: contain; background: var(--paper); }
.result-grid figcaption { font-size: .85rem; color: var(--muted); }
.preview-img { display: block; max-width: 100%; max-height: 340px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: repeating-conic-gradient(#eef1f4 0% 25%, #fff 0% 50%) 50%/16px 16px; }

/* Crop */
.crop-area { margin: 6px 0 14px; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; line-height: 0; }
.crop-stage img { display: block; max-width: 100%; max-height: 420px; }
.crop-box { position: absolute; border: 2px solid #fff; outline: 2px solid var(--blue); box-shadow: 0 0 0 9999px rgba(29, 24, 56, .55); cursor: move; }
.crop-box:focus-visible { outline: 3px solid #ffd43b; }
.crop-stage { overflow: hidden; border-radius: var(--radius-sm); }

/* Calculators */
.calc { display: grid; gap: 20px; }
@media (min-width: 760px) { .calc { grid-template-columns: 1fr 1fr; gap: 32px; } }
.calc-out { background: var(--paper); border-radius: var(--radius); padding: 18px; align-self: start; }
.big { margin: 0 0 14px; }
.big span { display: block; color: var(--muted); font-weight: 600; font-size: .92rem; }
.big strong { display: block; width: fit-content; max-width: 100%; font-size: clamp(2rem, 1.45rem + 2vw, 2.7rem); font-weight: 740; font-stretch: 110%; letter-spacing: -0.01em; line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; background: linear-gradient(transparent 58%, var(--haldi-tint) 58%, var(--haldi-tint) 92%, transparent 92%); padding: 0 .08em; }
.kv { margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.split-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin-top: 14px; background: var(--line); }
.split-bar .a { background: var(--blue); }
.split-bar .b { background: var(--haldi); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; font-size: .88rem; color: var(--muted); }
.legend.small { font-size: .8rem; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.a { background: var(--blue); }
.sw.b { background: var(--haldi); }
.tag { display: inline-block; margin: -6px 0 12px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .9rem; background: var(--line); }
.tag.under { background: #fff3d6; color: #8a5a00; }
.tag.normal { background: var(--green-tint); color: var(--green); }
.tag.over { background: #ffe6cc; color: #9a4a00; }
.tag.obese { background: var(--danger-tint); color: var(--danger); }
.bmi-scale { position: relative; display: grid; grid-template-columns: 18.5fr 6.5fr 5fr 10fr; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 14px; }
.bmi-scale span:nth-child(1) { background: #f4c95d; }
.bmi-scale span:nth-child(2) { background: #3fae7a; }
.bmi-scale span:nth-child(3) { background: #f29a4a; }
.bmi-scale span:nth-child(4) { background: #d9534f; }
.bmi-scale i { position: absolute; top: -3px; width: 4px; height: 16px; background: var(--ink); border-radius: 2px; transform: translateX(-2px); }
.bmi-scale { overflow: visible; }
.table-wrap { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap summary { padding: 12px 14px; font-weight: 700; cursor: pointer; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { background: var(--paper); font-weight: 700; color: var(--ink-2); }
.pct-grid { display: grid; gap: 14px; }
.pct-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.pct-card h2 { font-size: 1.05rem; font-weight: 600; line-height: 2.4; margin: 0; }
.pct-card input { display: inline-block; width: 7.5em; min-height: 40px; padding: 6px 8px; margin: 0 4px; font-weight: 700; }
.pct-card .ans { margin: 8px 0 0; font-size: 1.5rem; font-weight: 800; color: var(--blue); }

/* Text tools */
.text-tool > label:not(.btn):not(.check) { margin-top: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1px; margin: 14px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { background: var(--surface); padding: 10px 12px; }
.stats dt { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.case-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pw-out { display: flex; gap: 10px; align-items: stretch; }
.pw-out output { flex: 1; min-width: 0; display: flex; align-items: center; padding: 12px 14px; font-family: var(--mono); font-size: 1.2rem; font-weight: 600; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow-wrap: anywhere; word-break: break-all; }
.strength { margin: 8px 0 16px; font-weight: 600; color: var(--muted); }
.strength b { color: var(--green); }
.checks { display: flex; flex-wrap: wrap; }

/* Info below tool */
.tool-info { display: grid; gap: 10px 48px; margin-top: 40px; max-width: 1000px; }
@media (min-width: 900px) { .tool-info { grid-template-columns: 1fr 1fr; } .related { grid-column: 1 / -1; } }
.tool-info h2 { font-size: 1.3rem; margin-top: 8px; }
.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: .9rem; display: grid; place-items: center; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 12px 28px 12px 0; font-weight: 600; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 9px; font-size: 1.3rem; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details div { padding: 0 0 14px; color: var(--ink-2); }
.related ul, .tool-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.related a, .tool-list a { display: block; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.related a:hover, .tool-list a:hover { border-color: var(--blue); }
.related strong, .tool-list strong { display: block; }
.related span, .tool-list span { color: var(--muted); font-size: .92rem; }
.cat-page .lede { max-width: 62ch; margin-bottom: 24px; }
.prose-page { max-width: 720px; }
.prose-page h1 { margin-top: 28px; }
.prose-page h2 { margin-top: 1.6em; }
.contact-mail { font-size: 1.3rem; font-weight: 700; }
.ad-slot { margin: 24px 0; min-height: 100px; max-width: 900px; }

/* Footer */
.site-footer { background: var(--ink); color: #cfcbe0; padding: 40px 0 28px; font-size: .92rem; }
.site-footer a { color: #ece9f7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid h2 { font-size: 1rem; margin-bottom: 8px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 3px 0; }
.footer-base { margin-top: 32px; padding-top: 18px; border-top: 1px solid #3a3358; display: grid; gap: 8px; }
.footer-base p { margin: 0; }
.footer-base nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Shown only in the private backup copy */
.backup-note { margin: 0; padding: 8px 16px; background: #fff3d6; color: #6b4600; font-size: .88rem; font-weight: 600; text-align: center; }

/* ---------- Document makers ---------- */
.tool.wide { max-width: none; }
.doc-tool { display: grid; gap: 20px; }
@media (min-width: 980px) { .doc-tool { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; } .doc-side { position: sticky; top: 120px; } }
.doc-form { min-width: 0; }
.doc-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 4px; margin: 0 0 14px; min-width: 0; }
.doc-group legend { font-weight: 700; padding: 0 6px; font-size: 1rem; }
.doc-form textarea { min-height: 0; }
.doc-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.doc-side { min-width: 0; }
.doc-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.doc-preview { display: grid; gap: 12px; background: #e4e9ef; border-radius: var(--radius); padding: 10px; max-height: 80vh; overflow: auto; }
.doc-preview canvas { display: block; background: #fff; box-shadow: 0 1px 3px rgba(29, 24, 56, .2); max-width: 100%; height: auto; }
.doc-notes { margin: 0 0 10px; padding: 10px 12px 10px 28px; background: #fff3d6; color: #6b4600; border-radius: var(--radius-sm); font-size: .9rem; }
.img-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.img-row img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.rep { margin-bottom: 12px; }
.rep-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.rep-row { display: grid; grid-template-columns: var(--cols) auto; gap: 6px; align-items: end; padding: 8px; background: var(--paper); border-radius: var(--radius-sm); }
.rep-cell { min-width: 0; }
.rep-label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.rep-row input, .rep-row select, .rep-row textarea { min-height: 38px; padding: 6px 8px; font-size: .92rem; }
.rep-ctl { display: flex; gap: 4px; }
.rep-cell.full { grid-column: 1 / -2; }
.rep-ctl button { width: 34px; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-size: 1rem; color: var(--ink-2); }
.rep-ctl button:hover { border-color: var(--ink); }
@media (max-width: 640px) {
  .rep-row { grid-template-columns: 1fr 1fr; }
  .rep-cell:first-child, .rep-cell.full { grid-column: 1 / -1; }
  .rep-ctl { grid-column: 1 / -1; justify-content: flex-end; }
}
.crop-box .h { position: absolute; width: 18px; height: 18px; background: #fff; border: 2px solid var(--blue); }
.crop-box .h.nw { left: -1px; top: -1px; cursor: nwse-resize; }
.crop-box .h.ne { right: -1px; top: -1px; cursor: nesw-resize; }
.crop-box .h.sw { left: -1px; bottom: -1px; cursor: nesw-resize; }
.crop-box .h.se { right: -1px; bottom: -1px; cursor: nwse-resize; }
@media (pointer: coarse) { .crop-box .h { width: 26px; height: 26px; } }
.tool-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.canvas-preview { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin: 0 0 12px; }

/* Sign PDF */
.sig-pad { display: block; width: 100%; max-width: 600px; aspect-ratio: 3 / 1; height: auto; background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); touch-action: none; cursor: crosshair; }
.sign-stage { position: relative; display: inline-block; max-width: 100%; line-height: 0; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(29, 24, 56, .12); }
.sign-stage canvas { display: block; max-width: 100%; height: auto; }
.sig-float { position: absolute; cursor: move; outline: 2px dashed var(--blue); outline-offset: 2px; touch-action: none; user-select: none; -webkit-user-drag: none; }
.sig-float:focus-visible { outline: 3px solid #ffd43b; }
.sign-stage .placed { position: absolute; height: auto; opacity: .9; pointer-events: none; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.placed-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.placed-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: var(--paper); border-radius: var(--radius-sm); }
.step-title { font-size: 1.05rem; margin: 18px 0 8px; }

/* Organise pages */
.page-grid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.page-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; display: grid; gap: 6px; justify-items: center; cursor: grab; }
.page-card.dragging { opacity: .4; }
.page-card.over { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-tint); }
.thumb-wrap { width: 110px; height: 140px; display: grid; place-items: center; }
.thumb-wrap canvas { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 1px 3px rgba(29, 24, 56, .2); transition: transform .15s; }
@media (prefers-reduced-motion: reduce) { .thumb-wrap canvas { transition: none; } }
.page-card .pg { font-weight: 700; font-size: .9rem; }
.page-card .pg small { font-weight: 400; color: var(--muted); }
.pc-ctl { display: flex; gap: 4px; }
.pc-ctl button { width: 28px; height: 30px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); cursor: pointer; font-size: .9rem; color: var(--ink-2); }
.pc-ctl button:disabled { opacity: .35; cursor: default; }

/* Income tax and multi-part calculators */
.calc + .calc { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.regime-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.regime-cmp .big strong { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); }
.verdict { margin: 0 0 12px; padding: 10px 12px; background: var(--surface); border-left: 4px solid var(--green); border-radius: var(--radius-sm); }
.verdict strong { color: var(--green); }
table.cmp td, table.cmp th { padding: 7px 8px; white-space: normal; }
table.cmp td:first-child { color: var(--ink-2); }
table.cmp tr.total td { font-weight: 800; border-top: 2px solid var(--ink); }
details.ded { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-top: 6px; }
details.ded summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; }
details.ded .hint { margin: -8px 0 12px; }
.kv .lowest dt, .kv .lowest dd { color: var(--green); }
.kv .tag { margin: 0 0 0 6px; padding: 1px 8px; font-size: .78rem; }

/* ---------- Batch 3: text, developer and SEO tools ---------- */
.compare-grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
.compare-grid > * { min-width: 0; }
.code-out { margin: 0 0 12px; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; min-height: 44px; }
.code-out.hl mark { background: #ffe58a; color: inherit; border-radius: 2px; padding: 0 1px; }
.summary-line { font-weight: 700; margin: 12px 0 8px; }
.diff-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 520px; overflow: auto; }
table.diff { font-family: var(--mono); font-size: .85rem; }
table.diff td { text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; border-top: 0; padding: 2px 8px; vertical-align: top; }
table.diff td.n { color: var(--muted); width: 1%; text-align: right; user-select: none; }
table.diff td.sign { width: 1%; font-weight: 700; user-select: none; }
table.diff tr.del { background: #fdecea; }
table.diff tr.add { background: #e4f4ec; }
table.diff del { background: #f6b8b2; text-decoration: none; }
table.diff ins { background: #9fdcbc; text-decoration: none; }
.hashes dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; min-width: 0; }
.hashes .hash, .kv code { font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; word-break: break-all; text-align: left; }
.kv dd { min-width: 0; }
.now-line { font-size: 1.05rem; }
.now-line strong { font-family: var(--mono); }
.swatch { height: 72px; border-radius: var(--radius); border: 1px solid var(--line); margin: 4px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { width: 64px; height: 52px; border-radius: var(--radius-sm); border: 1px solid var(--line); cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 4px; }
.chip span { font-family: var(--mono); font-size: .66rem; background: rgba(255, 255, 255, .85); color: #1d1838; padding: 1px 3px; border-radius: 3px; }
.hint.warn { color: #9a4a00; font-weight: 600; }
.serp { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; font-family: Arial, sans-serif; max-width: 600px; }
.serp-site { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.serp-site strong { display: block; font-size: 14px; color: #202124; font-weight: 400; }
.serp-site small { display: block; font-size: 12px; color: #4d5156; }
.serp-icon { width: 26px; height: 26px; border-radius: 50%; background: #e8eaed; flex: none; }
.serp-title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin-bottom: 3px; overflow-wrap: anywhere; }
.serp-desc { color: #4d5156; font-size: 14px; line-height: 1.58; overflow-wrap: anywhere; }
.faq-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px 4px; margin-bottom: 10px; }
.faq-row .btn { margin-bottom: 8px; }
.qr-canvas { display: block; width: 100%; max-width: 320px; height: auto; image-rendering: pixelated; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 auto 10px; background: #fff; }
.calc-out textarea { background: var(--surface); }

/* Health tools */
.disclaimer { max-width: 80ch; margin: 18px 0 0; padding: 12px 14px; border-left: 4px solid var(--blue); background: var(--blue-tint); border-radius: var(--radius-sm); font-size: .9rem; color: var(--ink-2); }
.sources ul { margin: 0 0 8px; padding-left: 1.2em; }
.sources li { margin: 4px 0; overflow-wrap: anywhere; }
.hp-mem { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .9rem; }
.hp-mem .check { margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; font: inherit; cursor: pointer; }
.linkish:hover { color: var(--blue-deep); }
.field > .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field-row.tight.three { grid-template-columns: 1fr 1fr 1fr; }
.band-bar { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; font-size: .72rem; font-weight: 700; text-align: center; }
.band-bar span { padding: 4px 2px; color: #1d1838; }
.band-bar .b1 { background: #f4c95d; border-radius: 999px 0 0 999px; }
.band-bar .b2 { background: #3fae7a; color: #fff; }
.band-bar .b3 { background: #f29a4a; }
.band-bar .b4 { background: #d9534f; color: #fff; border-radius: 0 999px 999px 0; }
.band-bar i { position: absolute; top: -4px; bottom: -4px; width: 4px; background: var(--ink); border-radius: 2px; transform: translateX(-2px); }
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: -4px 0 14px; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.kv .ok dd { color: var(--green); }
.kv .short dd { color: #9a4a00; }
.kv dd .tag { margin: 0; }
.kv .local dt { font-weight: 700; color: var(--ink); }
.kv .local small { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-deep); font-size: .72rem; font-weight: 700; }
.alert { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-tint); color: var(--danger); border: 1px solid #f3b7b1; font-size: .92rem; }
.bp-log { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.bp-log-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.bp-log-head h2 { margin: 0; }
.bp-log-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table-scroll { overflow-x: auto; }
.bp-log table td, .bp-log table th { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); }
.bp-log td.empty { color: var(--muted); }
.market { display: inline-block; margin: 0 0 10px; padding: 2px 10px; border-radius: 999px; background: var(--haldi-tint); color: #7a4f00; font-weight: 700; font-size: .82rem; }
.site-footer .build { font-size: .8rem; color: #a49fbd; }

/* Footer brand line */
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand svg circle:first-child { fill: #fff; }
.footer-brand svg circle + circle { stroke: var(--ink); }
.footer-brand svg path { fill: var(--ink); }
.footer-brand strong { display: block; color: #fff; font-size: 1.1rem; font-stretch: 118%; }

/* Grouped settings (exam photo resizer) */
fieldset.group { border: 0; border-top: 1px solid var(--line); margin: 16px 0 0; padding: 14px 0 0; min-width: 0; }
fieldset.group legend { padding: 0 8px 0 0; font-weight: 680; font-stretch: 108%; font-size: 1.02rem; color: var(--ink); }
fieldset.group .presets { margin: 4px 0 12px; }

/* Jockey sliders under calculator fields */
.jockey-wrap { margin-top: 6px; }
.jockey { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; --fill: 50%; }
.jockey::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--blue) var(--fill), var(--line) var(--fill)); }
.jockey::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }
.jockey::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--blue); }
.jockey::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--surface); border: 3px solid var(--blue); box-shadow: 0 1px 4px rgba(29, 24, 56, .25); }
.jockey::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--blue); box-shadow: 0 1px 4px rgba(29, 24, 56, .25); }
.jockey:active::-webkit-slider-thumb { background: var(--haldi); }
.jockey:active::-moz-range-thumb { background: var(--haldi); }
.jockey-ends { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: -2px; font-variant-numeric: tabular-nums; }

/* Growth chart */
.growth { margin-top: 18px; }
.growth svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.growth text { font-size: 12px; fill: var(--muted); font-family: var(--font); }
.growth .g { stroke: var(--line); stroke-width: 1; }
.growth .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.growth .area { stroke: none; opacity: .18; }
.growth .s0.line { stroke: var(--blue); } .growth .s0.area { fill: var(--blue); }
.growth .s1.line { stroke: #d99a14; } .growth .s1.area { fill: var(--haldi); opacity: .35; }
.growth .s2.line { stroke: var(--ink-2); } .growth .s2.area { fill: var(--ink-2); }
.growth .s3.line { stroke: var(--green); } .growth .s3.area { fill: var(--green); }
.growth .dash { stroke-dasharray: 6 5; stroke-width: 2; }
.growth .cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.gc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--ink-2); margin-bottom: 4px; }
.gc-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--blue); }
.gc-legend i.s1 { background: #d99a14; } .gc-legend i.s2 { background: var(--ink-2); } .gc-legend i.s3 { background: var(--green); }
.gc-legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 9px); color: var(--ink-2); height: 3px; }
.gc-read { font-size: .88rem; color: var(--ink-2); min-height: 1.4em; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.insight { margin: 14px 0 0; padding: 10px 12px; border-left: 4px solid var(--haldi); background: var(--haldi-tint); border-radius: var(--radius-sm); font-size: .95rem; color: var(--ink); }
.calc-wide { margin-top: 8px; }
.jockey:focus { outline: none; }
/* Results stay in view while you play with the sliders */
@media (min-width: 760px) { #tool .calc-out { position: sticky; top: 118px; } }
@media (min-width: 900px) { #tool .calc-out { top: 80px; } }
.float-result { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(29, 24, 56, .3); }
.float-result span { font-size: .88rem; color: #cfcbe0; }
.float-result strong { font-size: 1.25rem; font-stretch: 110%; font-variant-numeric: tabular-nums; }
.std-compare { margin-top: 18px; max-width: 900px; }
.std-compare h2 { font-size: 1.1rem; }
.std-compare table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.std-compare th, .std-compare td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.std-compare tr.on td { background: var(--haldi-tint); font-weight: 650; }
.split-bar.macro .c { background: var(--green); }
.sw.c { background: var(--green); }
.cycles { margin: 12px 0 0; padding-left: 20px; font-size: .95rem; }
.cycles li { margin-bottom: 6px; }
.hc-people { display: grid; gap: 8px; margin: 12px 0; }
.hc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hc-row input { font: inherit; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.hc-row [data-lab] { flex: 1 1 140px; min-width: 0; }
.hc-row input[type=number] { width: 84px; }
.hc-row .hc-cm, .hc-row .hc-ft { display: inline-flex; align-items: center; gap: 6px; }
.hc-row .hc-cm[hidden], .hc-row .hc-ft[hidden] { display: none; }
.hc-stage { overflow-x: auto; margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.hc-stage svg { display: block; min-width: 100%; height: 380px; }
.hc-stage text { font-size: 12px; fill: var(--muted); font-family: var(--font); }
.hc-stage .hv { fill: var(--ink); font-weight: 650; font-size: 13px; }
.hc-stage .hl { fill: var(--ink-2); font-size: 13px; }
.hc-stage .g { stroke: var(--line); }
.hc-stage .floor { stroke: var(--ink); stroke-width: 1.5; }
.words { margin-top: 18px; max-width: 900px; }
.words h2 { font-size: 1.05rem; margin: 14px 0 6px; }
.wordbox { margin: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 1.05rem; }

/* Homepage: welcome, situations, all tools */
.hero .welcome { margin: 0 0 10px; font-size: 1.05rem; font-weight: 620; color: var(--blue); }
.situations { padding-top: 40px; }
.situations > h2, .all-tools > h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); font-weight: 760; font-stretch: 116%; margin-bottom: 18px; }
.sit-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sit { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 16px 18px 18px; }
.sit:nth-child(2) { border-top-color: var(--haldi); }
.sit:nth-child(4) { border-top-color: var(--green); }
.sit h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.12rem; font-stretch: 108%; }
.sit h3 .cat-icon { color: var(--blue); flex: none; }
.sit p { margin: 0 0 12px; color: var(--muted); font-size: .95rem; }
.sit ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sit a { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-deep); text-decoration: none; font-weight: 600; font-size: .93rem; }
.sit a:hover { background: var(--blue); color: #fff; }
.all-tools { padding-top: 44px; }
.all-tools > h2 { padding-bottom: 6px; }

/* ---------- PDF size and "make it smaller" row under PDF downloads ---------- */
.btn.download .dl-size { font-weight: 500; opacity: .8; font-size: .85em; margin-left: 4px; }
.shrink { margin-top: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.shrink > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style-position: inside; }
.shrink > summary strong { color: var(--blue); }
.shrink-body { padding: 0 14px 14px; display: grid; gap: 10px; }
.shrink-body .label { font-weight: 600; font-size: .92rem; }
.shrink-body .field-row { margin: 0; }
.hint.error { color: var(--danger); font-weight: 600; }
.hint.ok { color: var(--ink); }
.hint.busy { color: var(--blue); }

/* ---------- Document scanner ---------- */
.scan-cam, .scan-edit, [data-pages] { scroll-margin-top: 112px; }
.scan-cam { margin: 0 0 16px; background: #14102a; border-radius: var(--radius); padding: 10px; color: #fff; }
.scan-view { position: relative; overflow: hidden; border-radius: 10px; background: #000; touch-action: none; --z: 1; max-height: 72vh; display: flex; justify-content: center; }
.scan-view video, .scan-view .scan-overlay { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; transform: scale(var(--z)); transform-origin: center; }
.scan-view .scan-overlay { position: absolute; inset: 0; margin: auto; pointer-events: none; }
.scan-tip { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(20,16,42,.78); font-size: .8rem; line-height: 1.35; font-weight: 600; text-align: center; width: max-content; max-width: 92%; }
.scan-tip.ok { background: rgba(245,184,61,.95); color: #1d1838; }
.scan-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px 4px 4px; }
.scan-ic { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; justify-self: center; background: none; border: 0; color: #fff; font: inherit; font-size: .8rem; cursor: pointer; padding: 6px 10px; border-radius: 10px; min-width: 64px; }
.scan-ic[aria-pressed="true"] { background: #f5b83d; color: #1d1838; }
.scan-ic.na { opacity: .55; }
.scan-shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: none; padding: 4px; cursor: pointer; }
.scan-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.scan-shutter:active span { background: #f5b83d; }
.scan-zoom { display: flex; align-items: center; gap: 8px; padding: 8px 4px 0; }
.scan-zoom input { flex: 1; accent-color: #f5b83d; }
.scan-zoom .btn { color: #fff; background: transparent; border-color: rgba(255,255,255,.45); min-width: 40px; font-size: 1.2rem; }
.scan-zoom output { min-width: 3.2em; text-align: right; font-weight: 600; }
.scan-cam .hint { color: #d8d3ee; }
.scan-cam .hint:empty { display: none; }
.scan-stage { display: flex; justify-content: center; background: var(--paper); border-radius: 10px; padding: 6px; margin: 8px 0; }
.scan-stage canvas { touch-action: none; cursor: crosshair; border-radius: 4px; max-width: 100%; }
.scan-stage canvas:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.scan-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.scan-filter { margin: 4px 0 10px; }
.scan-preview { display: flex; justify-content: center; margin: 6px 0 10px; }
.scan-preview img { max-width: min(100%, 320px); max-height: 320px; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.08); background: #fff; }
.scan-preview img:not([src]) { display: none; }

/* ---------- Hiding details (redact kit) ---------- */
.scan-sub { font-size: 1rem; margin: 18px 0 4px; }
.rk { margin: 8px 0 12px; }
.rk-aadhaar { font-weight: 600; background: var(--haldi-tint); border: 1px solid var(--haldi); border-radius: 10px; padding: 10px 12px; margin: 4px 0 12px; display: flex; align-items: flex-start; }
.rk-aadhaar input { margin-top: 2px; flex: none; }
.rk-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.rk-tools button { font: inherit; font-size: .9rem; font-weight: 600; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.rk-tools button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rk-stage { display: flex; justify-content: center; background: var(--paper); border-radius: 10px; padding: 6px; margin: 8px 0; }
.rk-stage canvas { touch-action: none; cursor: crosshair; max-width: 100%; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.12); background: #fff; }
.rk-stage canvas:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.rk-acts { margin: 4px 0; }
.rd-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.rd-strip[hidden] { display: none; }
.rd-strip button { flex: none; min-width: 52px; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; display: grid; place-items: center; padding: 4px 8px; }
.rd-strip button small { font-weight: 500; font-size: .7rem; color: var(--muted); }
.rd-strip button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.rd-strip button[aria-selected="true"] small { color: #d8d3ee; }

/* ---------- Private feedback ---------- */
.feedback { margin: 22px 0; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); scroll-margin-top: 112px; }
.feedback h2 { font-size: 1.1rem; margin: 0 0 4px; }
.fb-lead { margin: 0 0 10px; }
.fb-stars { border: 0; margin: 0 0 6px; padding: 0; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.fb-star { cursor: pointer; position: relative; }
.fb-star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fb-star span[aria-hidden] { display: inline-block; font-size: 2.1rem; line-height: 1; padding: 4px 3px; color: var(--line-strong); transition: color .1s, transform .1s; }
.fb-stars:hover .fb-star span[aria-hidden] { color: var(--haldi); }
.fb-stars .fb-star:hover ~ .fb-star span[aria-hidden] { color: var(--line-strong); }
.fb-stars:has(input:checked) .fb-star span[aria-hidden] { color: var(--haldi); }
.fb-stars .fb-star:has(input:checked) ~ .fb-star span[aria-hidden] { color: var(--line-strong); }
.fb-star input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.fb-word { margin-left: 8px; font-weight: 700; color: var(--ink-2); }
.feedback.low .fb-word { color: var(--danger); }
.fb-more { margin-top: 6px; }
.fb-more .opt { font-weight: 400; color: var(--muted); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-status { margin: 8px 0 0; font-weight: 600; }
.fb-status:empty { display: none; }
.fb-status.ok { color: var(--green); }
.fb-status.error { color: var(--danger); }
.fb-nudge { margin: 12px 0 0; font-size: .95rem; }
.fb-nudge a { font-weight: 700; }

/* ---------- Comfortable tap targets on phones (at least 40 px tall) ---------- */
.brand { min-height: 44px; }
.check { min-height: 40px; }
.linkish { min-height: 40px; padding: 0 4px; }
input[type="color"] { min-height: 40px; min-width: 48px; }

/* ---------- Site helper (assistant.js) ---------- */
.hp-launch { position: fixed; right: 16px; bottom: 16px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font: inherit; font-weight: 700; font-size: .98rem; cursor: pointer; box-shadow: 0 8px 24px rgba(29, 24, 56, .28); }
.hp-launch:hover { background: var(--blue-deep); }
.hp-launch:focus-visible, .hp-panel button:focus-visible, .hp-panel a:focus-visible, .hp-nudge button:focus-visible, .hp-nudge a:focus-visible { outline: 3px solid var(--haldi); outline-offset: 2px; }
body:has(.float-result:not([hidden])) .hp-launch { bottom: 78px; }
.hp-panel { position: fixed; right: 16px; bottom: 80px; z-index: 60; width: 380px; max-width: calc(100vw - 32px); height: min(600px, calc(100vh - 110px)); height: min(600px, calc(100dvh - 110px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(29, 24, 56, .28); overflow: hidden; }
.hp-panel[hidden] { display: none; }
.hp-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: var(--blue); color: #fff; }
.hp-head h2 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
.hp-head p { margin: 2px 0 0; font-size: .8rem; color: #ddd6f5; line-height: 1.3; }
.hp-head > div { flex: 1; min-width: 0; }
.hp-avatar { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--blue); font-weight: 800; font-size: 1.35rem; line-height: 1; box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 4px #fff, inset 0 0 0 5px var(--blue); }
.hp-close { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.hp-close:hover { background: rgba(255, 255, 255, .14); }
.hp-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.hp-msg { margin: 0; max-width: 92%; padding: 10px 12px; border-radius: 14px; font-size: .96rem; line-height: 1.45; overflow-wrap: anywhere; }
.hp-msg p { margin: 0 0 6px; }
.hp-msg > :last-child { margin-bottom: 0; }
.hp-msg ul, .hp-msg ol { margin: 4px 0 8px; padding-left: 20px; }
.hp-msg li { margin-bottom: 4px; }
.hp-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.hp-user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.hp-note, .hp-sub { font-size: .85rem; color: var(--muted); }
.hp-tool { display: flex; flex-direction: column; gap: 1px; margin: 6px 0; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--surface); }
.hp-tool:hover { border-color: var(--blue); background: var(--blue-tint); }
.hp-tool strong { color: var(--blue); }
.hp-tool span { font-size: .86rem; color: var(--muted); }
.hp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hp-chip { font: inherit; font-size: .9rem; font-weight: 600; min-height: 40px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--blue); background: var(--surface); color: var(--blue); cursor: pointer; text-align: left; }
.hp-chip:hover:not(:disabled) { background: var(--blue-tint); }
.hp-chip:disabled { cursor: default; opacity: .55; }
.hp-chip.on:disabled { opacity: 1; background: var(--blue); color: #fff; }
.hp-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.hp-typing span:not(.sr) { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); animation: hp-dot 1s infinite ease-in-out; }
.hp-typing span:nth-child(2) { animation-delay: .15s; }
.hp-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes hp-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.hp-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.hp-form input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; min-height: 46px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--ink); }
.hp-form input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.hp-send { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--blue); color: #fff; cursor: pointer; }
.hp-send:hover { background: var(--blue-deep); }
.hp-nudge { position: fixed; right: 16px; bottom: 80px; z-index: 44; width: 320px; max-width: calc(100vw - 32px); padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(29, 24, 56, .22); font-size: .95rem; }
.hp-nudge p { margin: 0 0 4px; }
.hp-nudge-row { display: flex; justify-content: flex-end; margin-top: 6px; }
body:has(.float-result:not([hidden])) .hp-nudge, body:has(.float-result:not([hidden])) .hp-panel { bottom: 142px; }
@media (max-width: 560px) {
  .hp-launch { right: 12px; bottom: 12px; width: 54px; height: 54px; min-height: 0; padding: 0; justify-content: center; }
  .hp-launch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hp-panel { top: 8px; right: 8px; left: 8px; bottom: 8px; width: auto; max-width: none; height: auto; }
  body.hp-open .hp-launch { display: none; }
  body:has(.float-result:not([hidden])) .hp-panel { bottom: 8px; }
  .hp-nudge { right: 12px; left: 12px; width: auto; bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) { .hp-typing span:not(.sr) { animation: none; } }
@media print { .hp-launch, .hp-panel, .hp-nudge { display: none !important; } }
