@font-face { font-family:"Plus Jakarta Sans"; font-style:normal; font-weight:200 800; font-display:swap;
             src:url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2"); }
/* A Tools: shared styles for the tools, login and admin pages. */
/* Colours. Day is the default set; Night replaces it when <html data-theme="dark">.
   The small script in _head.html sets data-theme before the page is drawn. Every rule below uses these variables. */
:root {
  --paper:#ffffff;   /* the white sheet behind a photo or a JPG result, the same in Day and Night */
  --bg:#f5f6f8; --surface:#ffffff; --card:#ffffff; --line:#e3e6eb; --text:#1d2330; --muted:#5b6577;
  --accent:#2563eb; --accent-fg:#ffffff; --input-bg:#f5f6f8; --hover:#eceff4;
  --ok:#0f6b4d; --ok-bg:#e7f5ee; --err:#b42318; --err-bg:#fbeceb; --warn:#8a4f00; --warn-bg:#fdf3e3;
  --shadow:rgba(20,30,60,.08); --shadow-strong:rgba(20,30,60,.18); --scrim:rgba(0,0,0,.55); --on-scrim:#ffffff; --paper:#ffffff;
  --foot-bg:#e9edf2; --foot-text:#3d4657; --foot-head:#1d2330; --foot-muted:#565f70; --foot-line:#d3d9e2;
  --spot:#0f766e; --spot-fg:#ffffff;
  --t-fix:#0b7a55; --t-pages:#2563eb; --t-topdf:#b45309; --t-frompdf:#c2410c; --t-protect:#6d28d9; --t-photos:#0e7490; --t-business:#be185d;
  color-scheme:light;
}
:root[data-theme="dark"] {
  --bg:#14171c; --surface:#1a1e25; --card:#1d2128; --line:#2c323c; --text:#e7e9ee; --muted:#9aa3b2;
  --accent:#5b8ef5; --accent-fg:#0d1626; --input-bg:#14171c; --hover:#262b34;
  --ok:#3fbf8f; --ok-bg:#15302a; --err:#f0776c; --err-bg:#3a1f1d; --warn:#f0b35a; --warn-bg:#3a2c15;
  --shadow:rgba(0,0,0,.30); --shadow-strong:rgba(0,0,0,.50); --scrim:rgba(0,0,0,.60); --on-scrim:#ffffff; --paper:#ffffff;
  --foot-bg:#0f1216; --foot-text:#c9ced8; --foot-head:#ffffff; --foot-muted:#9aa3b2; --foot-line:#2c323c;
  --spot:#2dd4bf; --spot-fg:#06201d;
  --t-fix:#34d399; --t-pages:#7aa7ff; --t-topdf:#fbbf24; --t-frompdf:#fb923c; --t-protect:#b197fc; --t-photos:#22d3ee; --t-business:#f472b6;
  color-scheme:dark;
}
/* If scripts are switched off, still follow the device setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
  --bg:#14171c; --surface:#1a1e25; --card:#1d2128; --line:#2c323c; --text:#e7e9ee; --muted:#9aa3b2;
  --accent:#5b8ef5; --accent-fg:#0d1626; --input-bg:#14171c; --hover:#262b34;
  --ok:#3fbf8f; --ok-bg:#15302a; --err:#f0776c; --err-bg:#3a1f1d; --warn:#f0b35a; --warn-bg:#3a2c15;
  --shadow:rgba(0,0,0,.30); --shadow-strong:rgba(0,0,0,.50); --scrim:rgba(0,0,0,.60); --on-scrim:#ffffff; --paper:#ffffff;
  --foot-bg:#0f1216; --foot-text:#c9ced8; --foot-head:#ffffff; --foot-muted:#9aa3b2; --foot-line:#2c323c;
  --spot:#2dd4bf; --spot-fg:#06201d;
  --t-fix:#34d399; --t-pages:#7aa7ff; --t-topdf:#fbbf24; --t-frompdf:#fb923c; --t-protect:#b197fc; --t-photos:#22d3ee; --t-business:#f472b6;
  color-scheme:dark;
  }
}
/* Smooth change when the switch is pressed (the class is added for a moment by the switch). */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition:background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, fill .2s ease, stroke .2s ease !important; }
* { box-sizing:border-box; }
body { margin:0; font:15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background:var(--bg); color:var(--text); }
a { color:var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline:2px solid var(--accent); outline-offset:2px; }

/* Top bar: name on the left, account on the right */
.brand { display:inline-flex; align-items:center; gap:8px; font-weight:700; font-size:17px; color:var(--text); text-decoration:none; }
.brand img { display:block; width:28px; height:28px; border-radius:6px; }
.btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:6px;
       border:1px solid var(--line); background:var(--card); color:var(--text); font:inherit;
       font-size:14px; font-weight:500; cursor:pointer; text-decoration:none; }
.btn:hover { border-color:var(--accent); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-fg); }
.btn.danger { color:var(--err); }
.btn.small { padding:4px 10px; font-size:13px; }
.btn:disabled { opacity:.55; cursor:not-allowed; }
.badge { font-size:11px; font-weight:600; letter-spacing:.04em; text-transform:uppercase;
         padding:2px 7px; border-radius:999px; background:var(--warn-bg); color:var(--warn); }
.badge.ok { background:var(--ok-bg); color:var(--ok); }
.badge.err { background:var(--err-bg); color:var(--err); }
.badge.muted { background:var(--bg); color:var(--muted); }

/* Account dropdown */
details.menu { position:relative; }
details.menu summary { list-style:none; cursor:pointer; }
details.menu summary::-webkit-details-marker { display:none; }
details.menu .panel { position:absolute; right:0; top:calc(100% + 6px); z-index:20; width:260px;
  background:var(--card); border:1px solid var(--line); border-radius:8px; padding:12px;
  box-shadow:0 8px 24px var(--shadow-strong); display:grid; gap:8px; }
.panel hr { border:0; border-top:1px solid var(--line); margin:4px 0; width:100%; }
.panel .who { font-size:13px; color:var(--muted); }

/* Tools page */
main { max-width:720px; margin:0 auto; padding:24px 16px 48px; }
p.sub { color:var(--muted); margin:0 0 20px; }
.banner { padding:10px 14px; border-radius:8px; margin-bottom:16px; font-size:14px;
          background:var(--warn-bg); color:var(--warn); }
.tabs { display:flex; flex-wrap:wrap; gap:4px; border-bottom:1px solid var(--line); margin-bottom:16px; }
.tabs button { background:none; border:0; padding:10px 14px; font:inherit; color:var(--muted);
               cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; }
.tabs button.on { color:var(--text); border-color:var(--accent); font-weight:600; }
section.tool { display:none; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:20px; }
section.tool.on { display:block; }
label { display:block; font-weight:600; font-size:13px; margin:14px 0 6px; }
input, select { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:6px;
                background:var(--input-bg); color:var(--text); font:inherit; }
input[type=checkbox] { width:auto; }
.row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.hint { color:var(--muted); font-size:12px; margin-top:4px; }
button.go { margin-top:18px; width:100%; padding:11px; border:0; border-radius:6px;
            background:var(--accent); color:var(--accent-fg); font:inherit; font-weight:600; cursor:pointer; }
button.go:disabled { opacity:.6; cursor:not-allowed; }
.msg { margin-top:12px; font-size:14px; min-height:1.5em; }
.msg.ok { color:var(--ok); } .msg.err { color:var(--err); } .msg.warn { color:var(--warn); }
/* Tools that work in the browser: shared pieces (file lists, page grids, option rows) */
.lt-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:6px 0 10px; font-size:14px; }
.lt-bar .grow { flex:1; }
.lt-files { list-style:none; margin:0 0 6px; padding:0; display:grid; gap:8px; }
.lt-file { display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:var(--card); }
.lt-file.dragging, .lt-page.dragging { opacity:.55; border-color:var(--accent); }
.lt-handle { flex:none; border:0; background:none; color:var(--muted); font-size:16px; line-height:1; padding:8px 4px; cursor:grab;
             touch-action:none; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
.lt-dragging, .lt-dragging * { cursor:grabbing !important; -webkit-user-select:none; user-select:none; }
.lt-dragging { overscroll-behavior:contain; }
.lt-num { flex:none; min-width:22px; text-align:center; font-size:13px; font-weight:700; color:var(--muted); }
.lt-name { flex:1; min-width:0; }
.lt-name b { display:block; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lt-name span { font-size:12px; color:var(--muted); }
.lt-file .btn.small { flex:none; }
.field-err { margin-top:6px; padding:8px 12px; border-radius:8px; font-size:14px; background:var(--err-bg); color:var(--err); }
input[aria-invalid="true"] { border-color:var(--err); outline-color:var(--err); }
.lt-problems { margin:4px 0 0; padding-left:20px; } .lt-problems li { margin:2px 0; }
.lt-name .lt-warn { display:block; color:var(--warn); }
.lt-name span + span { display:block; }
.lt-thumb { flex:none; width:44px; height:44px; display:grid; place-items:center; border:1px solid var(--line); border-radius:6px; background:var(--paper); overflow:hidden; }
.lt-thumb img, .lt-thumb canvas { max-width:100%; max-height:100%; display:block; }
.lt-pages { list-style:none; margin:10px 0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(118px, 1fr)); gap:10px; }
.lt-page { position:relative; border:2px solid var(--line); border-radius:10px; background:var(--card); padding:6px; display:grid; gap:6px; justify-items:center; }
.lt-page.on { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 10%, var(--card)); }
.lt-page.gone { border-color:var(--err); }
.lt-page.gone .lt-shot { opacity:.35; }
.lt-shot { width:100%; aspect-ratio:3 / 4; display:grid; place-items:center; background:var(--bg); border-radius:6px; overflow:hidden; font-size:11px; color:var(--muted); }
.lt-shot canvas { max-width:100%; max-height:100%; display:block; background:var(--paper); box-shadow:0 0 0 1px var(--line); transition:transform .15s; }
.lt-page label { display:flex; align-items:center; gap:6px; margin:0; font-size:13px; font-weight:600; cursor:pointer; }
.lt-page input[type=checkbox] { width:17px; height:17px; min-height:0; padding:0; margin:0; }
.lt-page .lt-tools { display:flex; flex-wrap:wrap; justify-content:center; gap:4px; }
.lt-page .lt-tools .btn { padding:3px 7px; font-size:13px; min-width:30px; }
.lt-page .lt-handle { position:absolute; top:2px; right:2px; z-index:2; background:var(--card); border:1px solid var(--line); border-radius:8px;
                      min-width:40px; min-height:36px; padding:6px 8px; }
@media (pointer:coarse) { .lt-page .lt-handle { min-width:44px; min-height:44px; } .lt-file .lt-handle { min-width:40px; min-height:44px; } }
.lt-page.dragging { box-shadow:0 6px 18px color-mix(in srgb, var(--text) 22%, transparent); transform:scale(1.03); z-index:3; }
.lt-choice { border:1px solid var(--line); border-radius:10px; margin:12px 0 0; padding:8px 12px 10px; min-width:0; }
.lt-choice legend { font-size:13px; font-weight:700; padding:0 6px; }
.lt-choice label { display:flex; align-items:center; gap:8px; margin:6px 0 0; font-weight:500; }
.lt-choice input[type=radio], .lt-choice input[type=checkbox] { width:17px; height:17px; min-height:0; padding:0; margin:0; flex:none; }
.lt-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.lt-chips label { margin:0; }
.lt-chips input { position:absolute; opacity:0; width:1px; height:1px; }
.lt-chips span { display:inline-block; padding:8px 14px; border:1px solid var(--line); border-radius:999px; background:var(--card); font-size:14px; font-weight:600; cursor:pointer; }
.lt-chips input:checked + span { background:var(--accent); border-color:var(--accent); color:var(--accent-fg); }
.lt-chips input:focus-visible + span { outline:3px solid var(--accent); outline-offset:2px; }
.lt-result { margin-top:14px; padding:14px; border-radius:12px; border:1px solid var(--line); background:var(--card); display:grid; gap:10px; }
.lt-result.warn { background:var(--warn-bg); border-color:var(--warn); color:var(--warn); }
.lt-result.ok { border-color:var(--ok); }
.lt-result h3 { margin:0; font-size:16px; }
.lt-result p { margin:0; font-size:14px; }
.lt-stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(110px, 1fr)); gap:8px; }
.lt-stats div { padding:10px 12px; border-radius:10px; background:var(--card); color:var(--text); border:1px solid var(--line); }
.lt-stats span { display:block; font-size:12px; color:var(--muted); }
.lt-stats b { font-size:18px; font-variant-numeric:tabular-nums; }
.lt-preview { color:var(--text); font-size:13px; }
.lt-preview canvas { display:block; max-width:100%; max-height:420px; height:auto; border:1px solid var(--line); border-radius:8px; }
.lt-actions { display:flex; flex-wrap:wrap; gap:8px; }
.lt-actions .btn { background:var(--card); color:var(--text); }
.lt-actions .btn.primary { background:var(--accent); color:var(--accent-fg); }
.lt-note { margin:14px 0 0; padding:10px 14px; border-radius:8px; font-size:13px; background:var(--warn-bg); color:var(--warn); }
@media (max-width:560px) { .lt-pages { grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); } .lt-file { flex-wrap:wrap; } .lt-name { flex-basis:60%; } }
.lt-check { display:flex; align-items:center; gap:8px; margin:10px 0 0; font-weight:500; }
.lt-check input { width:17px; height:17px; min-height:0; padding:0; margin:0; flex:none; }
.qr-out { margin-top:12px; display:grid; gap:10px; justify-items:start; }
.qr-frame { padding:10px; border:1px solid var(--line); border-radius:12px; background:var(--paper); max-width:100%; }
.qr-frame canvas { display:block; width:min(300px, 100%); height:auto; image-rendering:pixelated; }
.qr-frame.wide { overflow-x:auto; } .qr-frame.wide canvas { max-width:none; }
input[type=color] { width:72px; height:40px; padding:2px; cursor:pointer; }
.lk-row { display:flex; gap:8px; align-items:center; }
.lk-row input { flex:1; min-width:0; }
.lk-meter { height:6px; margin-top:8px; border-radius:999px; background:var(--line); overflow:hidden; }
.lk-meter span { display:block; height:100%; width:0; border-radius:999px; background:var(--err); transition:width .2s; }
.lk-meter span[data-score="1"] { background:var(--warn); } .lk-meter span[data-score="2"] { background:var(--warn); }
.lk-meter span[data-score="3"], .lk-meter span[data-score="4"] { background:var(--ok); }
/* Invoice generator */
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.inv-h { font-size:16px; margin:20px 0 8px; }
.inv-more { margin-top:10px; } .inv-more summary { cursor:pointer; font-weight:600; font-size:14px; }
.inv-items { border-collapse:collapse; width:100%; min-width:720px; font-size:14px; }
.inv-items th { text-align:left; font-size:12px; color:var(--muted); padding:4px 6px; white-space:nowrap; position:relative; }
.inv-items td { padding:3px 4px; vertical-align:top; }
.inv-items input { padding:7px 8px; font-size:14px; border-radius:6px; min-width:0; width:100%; }
.inv-items td:nth-child(1) { width:38%; } .inv-items td:nth-child(2) { width:11%; } .inv-items td:nth-child(3) { width:9%; }
.inv-items td:nth-child(4) { width:13%; } .inv-items td:nth-child(5), .inv-items td:nth-child(6) { width:9%; }
.inv-items .iv-amount { text-align:right; padding:10px 6px 0; font-variant-numeric:tabular-nums; white-space:nowrap; }
.inv-out { margin-top:16px; }
.inv-totals { display:grid; gap:4px; max-width:360px; margin-left:auto; font-size:14px; }
.inv-totals div { display:flex; justify-content:space-between; gap:16px; } .inv-totals b { font-variant-numeric:tabular-nums; }
.inv-totals .grand { border-top:2px solid var(--text); margin-top:4px; padding-top:6px; font-size:18px; }
.inv-totals p { margin:4px 0 0; text-align:right; }
.inv-preview { background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:12px; display:grid; gap:12px; justify-items:center; }
.inv-preview canvas { display:block; width:100%; max-width:820px; height:auto; background:var(--paper); box-shadow:0 1px 8px color-mix(in srgb, var(--text) 18%, transparent); }
.inv-list { border-collapse:collapse; width:100%; font-size:14px; }
.inv-list th { text-align:left; font-size:12px; color:var(--muted); padding:8px; border-bottom:1px solid var(--line); }
.inv-list td { padding:8px; border-bottom:1px solid var(--line); vertical-align:middle; }
.inv-list td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.inv-list td.empty { text-align:center; color:var(--muted); padding:22px; }
.inv-acts { display:flex; flex-wrap:wrap; gap:4px; } .inv-acts .btn { text-decoration:none; }
.badge.inv-draft { background:var(--bg); color:var(--muted); } .badge.inv-sent { background:var(--warn-bg); color:var(--warn); }
.badge.inv-paid { background:var(--ok-bg); color:var(--ok); } .badge.inv-cancelled { background:var(--err-bg); color:var(--err); }
#invLock .btn { margin:4px 4px 0 0; }
.inv-login { padding:24px; text-align:center; border:1px dashed var(--line); border-radius:12px; }
/* Asset label maker */
main.toolpage.wide { max-width:1100px; }
.al-step { display:flex; align-items:center; gap:10px; font-size:18px; margin:26px 0 10px; }
.al-step:first-child { margin-top:4px; }
.al-step span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--accent); color:var(--accent-fg); font-size:14px; }
.al-hidden-file { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; min-height:0; padding:0; border:0; }
.al-box { margin:10px 0; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--bg); }
.al-box h3 { margin:0 0 6px; font-size:15px; }
.row3 { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; }
.al-fields { list-style:none; margin:6px 0 10px; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:6px 14px; }
.al-fields li { display:flex; align-items:center; gap:8px; min-width:0; }
.al-fields li .lt-check { margin:0; flex:none; }
.al-fields li input[type=text] { flex:1; min-width:0; padding:5px 8px; font-size:13px; }
.al-ticks { display:flex; flex-wrap:wrap; gap:4px 18px; margin-top:6px; }
.al-ticks label { display:flex; align-items:center; gap:8px; margin:4px 0 0; font-weight:500; }
.al-ticks input { width:17px; height:17px; min-height:0; padding:0; margin:0; flex:none; }
.al-errors, .al-warn { margin:10px 0; padding:10px 14px; border-radius:10px; font-size:14px; }
.al-errors { background:var(--err-bg); color:var(--err); } .al-warn { background:var(--warn-bg); color:var(--warn); }
.al-errors ul { margin:6px 0; padding-left:20px; } .al-errors li { margin:2px 0; } .al-warn p, .al-errors p { margin:4px 0; }
.al-link { border:0; background:none; padding:0; color:inherit; font:inherit; font-weight:700; text-decoration:underline; cursor:pointer; }
.al-link[disabled] { opacity:.5; cursor:default; }
.al-tablewrap { max-height:520px; overflow:auto; border:1px solid var(--line); border-radius:10px; }
.al-table { border-collapse:collapse; width:max-content; min-width:100%; font-size:13px; }
.al-table th { position:sticky; top:0; z-index:1; background:var(--card); text-align:left; padding:8px; border-bottom:1px solid var(--line); white-space:nowrap; }
.al-table td { padding:3px 4px; border-bottom:1px solid var(--line); }
.al-table td input { width:140px; min-width:0; padding:6px 8px; font-size:13px; border-radius:6px; }
.al-table td.al-n { color:var(--muted); text-align:right; padding:0 8px; font-variant-numeric:tabular-nums; }
.al-table td.al-act { white-space:nowrap; } .al-table td.al-act .btn { margin-right:4px; }
.al-table td.empty { padding:22px; text-align:center; color:var(--muted); }
.al-map td { padding:6px 8px; font-size:13px; } .al-map select { padding:5px 8px; font-size:13px; min-width:200px; }
.al-preview { display:flex; flex-wrap:wrap; gap:12px; margin:10px 0; }
.al-label { margin:0; }
.al-pic { background:var(--paper); box-shadow:0 0 0 1px var(--line); line-height:0; font-size:12px; color:var(--err); }
.al-pic svg { display:block; max-width:100%; height:auto; }
.al-label figcaption { display:flex; gap:10px; margin-top:4px; font-size:12px; color:var(--muted); }
.al-sheetview { margin:10px 0; max-width:100%; overflow:hidden; }
.al-sheetframe { position:relative; overflow:hidden; background:var(--paper); box-shadow:0 0 0 1px var(--line); }
.al-sheet { position:relative; background:var(--paper); overflow:hidden; }
.al-cell { position:absolute; line-height:0; }
.al-cell svg { display:block; width:100%; height:100%; }
#alPrintArea { display:none; }
@media (max-width:640px) { .row3 { grid-template-columns:1fr; } .al-table td input { width:120px; } }
/* Printing labels: only the label pages are printed, at their true size, with no site header, menus or margins. */
@media print {
  html.al-printing, html.al-printing body { margin:0 !important; padding:0 !important; background:#fff !important; }
  html.al-printing body > *:not(#alPrintArea) { display:none !important; }
  html.al-printing #alPrintArea { display:block; }
  html.al-printing .al-sheet { break-after:page; page-break-after:always; break-inside:avoid; }
  html.al-printing .al-sheet:last-child { break-after:auto; page-break-after:auto; }
  html.al-printing * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
/* Signature Cleaner (works in the browser) */
.sig-views { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:8px; }
.sig-views figure { margin:0; min-width:0; }
.sig-views figcaption { font-size:13px; font-weight:700; margin-bottom:6px; }
.sig-frame { display:grid; place-items:center; min-height:150px; padding:10px; border:1px solid var(--line); border-radius:10px; overflow:hidden;
             /* a checked pattern shows where the picture is see-through */
             background-color:var(--card);
             background-image:linear-gradient(45deg, var(--line) 25%, transparent 25%, transparent 75%, var(--line) 75%),
                              linear-gradient(45deg, var(--line) 25%, transparent 25%, transparent 75%, var(--line) 75%);
             background-size:16px 16px; background-position:0 0, 8px 8px; }
.sig-frame.paper { background:var(--paper); }
.sig-frame canvas { display:block; max-width:100%; max-height:240px; height:auto; }
.sig-status { margin-top:10px; padding:9px 12px; border-radius:8px; font-size:14px; }
.sig-status.ok { background:var(--ok-bg); color:var(--ok); }
.sig-status.warn { background:var(--warn-bg); color:var(--warn); }
.sig-status.busy { color:var(--muted); padding-left:0; }
.sig-status:empty { display:none; }
.sig-slider { display:flex; align-items:center; gap:10px; }
.sig-slider input[type=range] { flex:1; min-width:0; padding:0; accent-color:var(--accent); }
#sigLevelOut { font-weight:500; color:var(--muted); margin-left:6px; }
.sig-choice { border:1px solid var(--line); border-radius:10px; margin:12px 0 0; padding:8px 12px 10px; min-width:0; }
.sig-choice legend { font-size:13px; font-weight:700; padding:0 6px; }
.sig-choice label { display:flex; align-items:center; gap:8px; margin:6px 0 0; font-weight:500; }
.sig-choice input { width:17px; height:17px; min-height:0; padding:0; margin:0; flex:none; }
.sig-own { margin:16px 0 0; padding:10px 14px; border-radius:8px; font-size:13px; background:var(--warn-bg); color:var(--warn); }
.privacy.local a { color:inherit; }
@media (max-width:560px) { .sig-views { grid-template-columns:1fr; } }
/* Compress PDF: the target-size result panel (a warning when the target was missed, never a success tick) */
.cmp-panel { margin-top:14px; padding:16px; border-radius:12px; border:1px solid var(--line); background:var(--card); display:grid; gap:12px; }
.cmp-panel.warn { background:var(--warn-bg); border-color:var(--warn); color:var(--warn); }
.cmp-panel.info { border-color:var(--accent); }
.cmp-panel:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.cmp-head { display:flex; gap:12px; align-items:flex-start; }
.cmp-head b { display:block; font-size:16px; }
.cmp-head p { margin:4px 0 0; font-size:14px; }
.cmp-icon { flex:none; display:grid; place-items:center; width:28px; height:28px; border-radius:50%; font-weight:800;
            background:var(--warn); color:var(--warn-bg); }
.cmp-panel.info .cmp-icon { background:var(--accent); color:var(--accent-fg); font-style:italic; font-family:Georgia, serif; }
.cmp-stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(110px, 1fr)); gap:8px; }
.cmp-stat { padding:10px 12px; border-radius:10px; background:var(--card); color:var(--text); border:1px solid var(--line); }
.cmp-stat span { display:block; font-size:12px; color:var(--muted); }
.cmp-stat b { font-size:18px; font-variant-numeric:tabular-nums; }
.cmp-panel .hint { margin:0; color:inherit; }
.cmp-actions { display:flex; flex-wrap:wrap; gap:8px; }
.cmp-actions .btn { background:var(--card); color:var(--text); }
.cmp-actions .btn.primary { background:var(--accent); color:var(--accent-fg); }
.cmp-preview { color:var(--text); font-size:14px; }
.cmp-preview img { display:block; max-width:100%; max-height:420px; border:1px solid var(--line); border-radius:8px; }
.cmp-preview .hint { margin-top:6px; color:var(--muted); }
.note { font-size:12px; color:var(--muted); margin-top:16px; }
ul.files { list-style:none; margin:10px 0 0; padding:0; }
ul.files li { display:flex; align-items:center; gap:6px; padding:6px 8px; border:1px solid var(--line);
              border-radius:6px; margin-bottom:6px; font-size:14px; background:var(--bg); }
ul.files li span { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
ul.files li small { color:var(--muted); }
ul.files button { background:none; border:1px solid var(--line); border-radius:4px; color:var(--text);
                  width:28px; height:28px; cursor:pointer; font:inherit; }

/* Login page */
.login { max-width:400px; margin:48px auto; padding:0 16px; }
.login .card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:24px; }
.login h1 { font-size:20px; margin:0 0 4px; }
.seg { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; background:var(--bg);
       border-radius:8px; margin:16px 0 4px; }
.seg a { text-align:center; padding:8px; border-radius:6px; color:var(--muted); text-decoration:none; font-weight:500; }
.seg a.on { background:var(--card); color:var(--text); box-shadow:0 1px 3px var(--shadow-strong); }
.alert { padding:9px 12px; border-radius:6px; font-size:14px; margin-top:14px; background:var(--err-bg); color:var(--err); }
.alert.ok { background:var(--ok-bg); color:var(--ok); }
.alert.warn { background:var(--warn-bg); color:var(--warn); }

/* Admin page */
.admin { max-width:1100px; margin:0 auto; padding:24px 16px 48px; display:grid; gap:20px; }
.admin h1 { font-size:22px; margin:0; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:18px; min-width:0; }
.card h2 { font-size:15px; margin:0 0 12px; }
.stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px; }
.stat b { display:block; font-size:24px; font-variant-numeric:tabular-nums; }
.stat span { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.grid2 { display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:16px; }
.bars { display:grid; gap:8px; }
.bar { display:grid; grid-template-columns:130px minmax(0,1fr) 40px; gap:8px; align-items:center; font-size:13px; }
.bar .track { height:10px; background:var(--bg); border-radius:5px; overflow:hidden; }
.bar .fill { height:100%; background:var(--accent); border-radius:5px; }
.bar .n { text-align:right; font-variant-numeric:tabular-nums; color:var(--muted); }
.tablewrap { overflow-x:auto; }
.tablewrap.tall { max-height:520px; overflow:auto; }
.tablewrap.tall thead th { position:sticky; top:0; background:var(--card); z-index:1; }
table { border-collapse:collapse; width:100%; font-size:13px; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
th { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:600; }
td.num { text-align:right; font-variant-numeric:tabular-nums; }
td.wrap { white-space:normal; min-width:200px; }
dl.kv { display:grid; grid-template-columns:max-content 1fr; gap:6px 16px; margin:0; font-size:14px; }
dl.kv dt { color:var(--muted); } dl.kv dd { margin:0; overflow-wrap:anywhere; }
.toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.toolbar input, .toolbar select { width:auto; min-width:140px; padding:6px 8px; font-size:13px; }
.toolbar .grow { flex:1; }
pre.log { margin:0; max-height:480px; overflow:auto; background:var(--bg); padding:12px; border-radius:6px;
          font:12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.inline-form { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:8px; align-items:end; }
.inline-form label { margin:0 0 4px; }
.switch { display:flex; gap:12px; align-items:flex-start; padding:12px 0; border-bottom:1px solid var(--line); }
.switch:last-child { border-bottom:0; }
.switch input { margin-top:4px; width:18px; height:18px; }
.switch label { margin:0; font-size:14px; }
.switch p { margin:2px 0 0; font-size:13px; color:var(--muted); }
.switch > div { flex:1; min-width:0; }
.switch .eff, .setcard > .eff { margin:4px 0 0; font-size:13px; color:var(--text); }
.switch .rec, .setcard > .rec { margin:5px 0 0; font-size:13px; color:var(--ok); }
.sethead { display:flex; align-items:center; gap:8px; }
.infobtn { flex:none; width:20px; height:20px; padding:0; border-radius:50%; border:1.5px solid var(--muted); background:none; color:var(--muted);
           font:italic 700 12px/1 Georgia, serif; cursor:pointer; }
.infobtn:hover, .infobtn:focus-visible, .infobtn[aria-expanded="true"] { border-color:var(--accent); background:var(--accent); color:var(--accent-fg); }
.setinfo { margin:8px 0 4px; padding:10px 14px; border-radius:10px; background:var(--bg); border:1px solid var(--line); max-width:760px; }
.setinfo p:first-child { margin-top:0; }
.switch.flash { outline:3px solid var(--accent); outline-offset:6px; border-radius:8px; }
.setsearch { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.setsearch input { flex:1; min-width:220px; max-width:520px; padding:10px 14px; border-radius:999px; }
.switch-pad { flex:none; width:18px; }
.setline { display:flex; gap:8px; margin-top:8px; max-width:560px; }
.setline input { flex:1; min-width:0; }
.todo { list-style:none; margin:0; padding:0; }
.todo + .todo { border-top:1px solid var(--line); margin-top:6px; padding-top:6px; }
.todo li { display:flex; gap:10px; align-items:flex-start; padding:7px 0; font-size:14px; }
.todo li p { margin:2px 0 0; font-size:13px; color:var(--muted); }
.todo li label { margin:0; font-size:14px; font-weight:700; }
.todo li.ok label, .todo li.ok b { font-weight:500; }
.todo input { flex:none; width:18px; height:18px; margin:2px 2px 0; }
.todo .mark { flex:none; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; font-size:13px; font-weight:700;
              background:var(--ok-bg); color:var(--ok); }
.todo li.open .mark { background:var(--warn-bg); color:var(--warn); }
.toolgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:12px; }
.toolgrid fieldset { border:1px solid var(--line); border-radius:10px; margin:0; padding:8px 12px 10px; min-width:0; }
.toolgrid legend { font-size:12px; font-weight:700; color:var(--muted); padding:0 6px; }
.toolgrid label { display:flex; align-items:center; gap:8px; margin:6px 0 0; font-size:14px; font-weight:500; }
.toolgrid input { width:17px; height:17px; flex:none; }
.empty { color:var(--muted); font-size:14px; padding:12px 0; }

@media (max-width:520px) {
  .row { grid-template-columns:1fr; }
  .bar { grid-template-columns:100px minmax(0,1fr) 32px; }
}

/* Ads: side rails on wide screens; on narrow screens the side ads move below the tools. */
.ads { display:grid; gap:12px; margin-top:20px; align-content:start; }
.ad { position:relative; background:var(--card); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.ad img, .ad video { display:block; width:100%; height:auto; }
.ad-tag { position:absolute; top:6px; right:6px; z-index:1; padding:1px 6px; border-radius:4px;
          font-size:10px; font-weight:600; letter-spacing:.04em; background:var(--scrim); color:var(--on-scrim); }
.ad-body { padding:10px 12px; display:grid; gap:6px; justify-items:start; }
.ad-body b { font-size:14px; padding-right:28px; overflow-wrap:anywhere; }
.ad-body p { margin:0; font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.ads-bottom .ad { display:flex; align-items:center; }
.ads-bottom .ad > a:first-of-type:not(.btn), .ads-bottom .ad > img, .ads-bottom .ad > video { flex:0 0 40%; max-width:260px; }
.ads-bottom .ad-body { flex:1; min-width:0; }
[hidden] { display:none !important; }
.checks { display:flex; flex-wrap:wrap; gap:6px 18px; padding:6px 0; }
.checks label { display:inline-flex; align-items:center; gap:6px; margin:0; font-weight:400; }
.checks input { width:16px; height:16px; margin:0; }
.adform { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:10px 14px; }
.adform .wide { grid-column:1 / -1; }
.adform label { margin:0 0 4px; }
.adform textarea { width:100%; min-height:64px; padding:8px; border:1px solid var(--line); border-radius:6px;
                   background:var(--card); color:var(--text); font:inherit; resize:vertical; }
.thumb { width:72px; height:48px; object-fit:cover; border-radius:6px; border:1px solid var(--line); display:block; background:var(--bg); }

/* Privacy notice on the tools page: highlighted, and it flashes a few times when the page opens. */
.privacy { display:flex; align-items:center; gap:10px; padding:12px 14px; margin-bottom:16px; border-radius:8px;
           background:var(--ok-bg); color:var(--ok); border:1px solid currentColor; font-size:15px;
           animation:privacy-flash 1.1s ease-in-out 0.4s 4; }
.privacy svg { flex:none; }
.privacy b { font-weight:700; }
.privacy a { color:inherit; font-weight:600; white-space:nowrap; }
@keyframes privacy-flash {
  0%, 100% { box-shadow:0 0 0 0 transparent; transform:scale(1); }
  50% { box-shadow:0 0 0 6px color-mix(in srgb, currentColor 30%, transparent); transform:scale(1.015); }
}
@media (prefers-reduced-motion: reduce) { .privacy { animation:none; } }

/* Feedback box for returning visitors: a card in the corner, a bottom sheet on phones. */
.fb { position:fixed; right:16px; bottom:16px; z-index:30; width:340px; max-width:calc(100vw - 32px); padding:16px 18px;
      background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:0 10px 30px var(--shadow-strong);
      animation:fb-in .3s ease-out; }
.fb b { display:block; padding-right:24px; font-size:15px; }
.fb-x { position:absolute; top:6px; right:8px; width:32px; height:32px; border:0; background:none; color:var(--muted);
        font-size:22px; line-height:1; cursor:pointer; }
.fb-choice { display:flex; gap:8px; margin-top:12px; }
.fb-choice .btn { flex:1; justify-content:center; padding:10px 8px; }
.fb label { font-weight:400; color:var(--muted); margin:8px 0 4px; }
.fb input { padding:8px 10px; }
.fb .msg { margin-top:8px; min-height:0; }
.fb { max-height:calc(100vh - 32px); overflow-y:auto; }
.fb textarea { width:100%; padding:8px; border:1px solid var(--line); border-radius:8px; background:var(--bg);
               color:var(--text); font:inherit; resize:vertical; }
@keyframes fb-in { from { transform:translateY(20px); opacity:0; } to { transform:none; opacity:1; } }
@media (prefers-reduced-motion: reduce) { .fb { animation:none; } }


/* Phones: app-style layout. A sticky top bar, a grid of tool tiles, then one tool per screen. */
@media (max-width:640px) {
  html { -webkit-text-size-adjust:100%; }
  body { -webkit-tap-highlight-color:transparent; overscroll-behavior-y:none; }
  .top { position:sticky; top:0; z-index:20; padding:calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
         10px max(14px, env(safe-area-inset-left)); }
  main { padding:14px 12px 20px; }
  input, select, textarea { font-size:16px; }            /* stops iPhones zooming in on focus */
  input, select { min-height:48px; border-radius:10px; }
  input[type=checkbox] { min-height:0; }
  button.go { padding:15px; border-radius:12px; font-size:16px; }
  section.tool { border-radius:16px; padding:16px; }
  .btn { min-height:36px; }
    .privacy { font-size:14px; border-radius:12px; }


  .fb { left:0; right:0; bottom:0; width:auto; max-width:none; border-radius:18px 18px 0 0; border-width:1px 0 0;
        padding:18px 16px calc(18px + env(safe-area-inset-bottom)); }
}

/* "How your files are handled" page */
.how { max-width:820px; }
.how h1 { font-size:26px; margin:8px 0 6px; text-wrap:balance; }
.how h2 { font-size:17px; margin:32px 0 12px; }
.how .lede { color:var(--muted); margin:0 0 22px; max-width:62ch; }
/* Privacy policy and Terms of use */
.legal h2 { scroll-margin-top:80px; }
.legal h3 { font-size:14px; margin:16px 0 4px; }
.legal p, .legal li { max-width:70ch; line-height:1.6; }
.legal ul { margin:6px 0 12px; padding-left:20px; }
.legal li { margin:4px 0; }
.legal .updated { font-size:13px; color:var(--muted); margin:-12px 0 18px; }
.legal-nav { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 8px; }
.legal-nav a { padding:6px 12px; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--text);
               font-size:13px; text-decoration:none; }
.legal-nav a:hover, .legal-nav a:focus-visible { border-color:var(--accent); color:var(--accent); }
.flow { display:grid; grid-template-columns:minmax(0,1fr) 170px minmax(0,1.150fr); gap:0; align-items:stretch; }
.node { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; display:grid; gap:10px; align-content:start; }
.node.server { border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.node-head { display:flex; align-items:center; gap:8px; font-size:16px; color:var(--accent); }
.node-head b { color:var(--text); }
.mini { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; background:var(--bg); font-size:14px; }
.mini svg { flex:none; color:var(--muted); width:22px; height:22px; }
.mini.gone, .steps li.gone .dot { background:var(--ok-bg); color:var(--ok); }
.mini.gone svg { color:var(--ok); }
.flow .num { display:inline-grid; place-items:center; flex:none; width:22px; height:22px; margin-right:8px; border-radius:50%;
       background:var(--accent); color:var(--accent-fg); font-size:12px; font-weight:700; }
.links { display:grid; align-content:center; gap:34px; padding:0 6px; }
.trip { position:relative; display:grid; justify-items:center; gap:6px; }
.trip .arrow { display:block; width:100%; height:2px; background:var(--accent); position:relative; }
.trip .arrow::after { content:""; position:absolute; top:-5px; border:6px solid transparent; }
.trip.go .arrow::after { right:-2px; border-left-color:var(--accent); border-right-width:0; }
.trip.back .arrow::after { left:-2px; border-right-color:var(--accent); border-left-width:0; }
.trip .tag { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; color:var(--ok); white-space:nowrap; }
.trip .tag svg { width:15px; height:15px; }
/* a small dot runs along each arrow to show the direction of travel */
.trip .arrow::before { content:""; position:absolute; top:-4px; width:10px; height:10px; border-radius:50%; background:var(--accent);
                       animation:trip-go 2.400s linear infinite; }
.trip.back .arrow::before { animation-name:trip-back; animation-delay:1.200s; }
@keyframes trip-go { from { left:0; opacity:0; } 15%, 85% { opacity:1; } to { left:calc(100% - 10px); opacity:0; } }
@keyframes trip-back { from { left:calc(100% - 10px); opacity:0; } 15%, 85% { opacity:1; } to { left:0; opacity:0; } }
@media (prefers-reduced-motion: reduce) { .trip .arrow::before { display:none; } }
.steps { list-style:none; margin:0; padding:0; display:grid; gap:0; }
.steps li { display:grid; grid-template-columns:44px minmax(0,1fr); gap:14px; padding-bottom:18px; position:relative; }
.steps li:not(:last-child)::before { content:""; position:absolute; left:21px; top:44px; bottom:0; width:2px; background:var(--line); }
.steps .dot { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--card);
              border:1px solid var(--line); color:var(--accent); }
.steps .dot svg { width:22px; height:22px; }
.steps b { display:block; margin-top:2px; }
.steps p { margin:4px 0 0; color:var(--muted); font-size:14px; max-width:62ch; }
.kept { display:grid; grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); gap:14px; margin-top:14px; }
.kept h2 { margin:0 0 8px; font-size:15px; }
.kept ul { margin:0; padding-left:18px; font-size:14px; display:grid; gap:4px; }
.kept .never { border-color:var(--ok); }
.kept .never h2 { color:var(--ok); }
@media (max-width:640px) {
  .how h1 { font-size:22px; }
  .flow { grid-template-columns:1fr; }
  .links { grid-template-columns:1fr 1fr; gap:10px; padding:4px 0; }
  .trip { grid-template-rows:auto 56px; }
  .trip .tag { order:-1; white-space:normal; text-align:center; }
  .trip .arrow { width:2px; height:100%; }
  .trip .arrow::after { top:auto; left:-5px !important; right:auto !important; border:6px solid transparent !important; }
  .trip.go .arrow::after { bottom:-2px; border-top-color:var(--accent) !important; border-bottom-width:0 !important; }
  .trip.back .arrow::after { top:-2px; border-bottom-color:var(--accent) !important; border-top-width:0 !important; }
  .trip .arrow::before { left:-4px !important; animation-name:trip-down; }
  .trip.back .arrow::before { animation-name:trip-up; }
}
@keyframes trip-down { from { top:0; opacity:0; } 15%, 85% { opacity:1; } to { top:calc(100% - 10px); opacity:0; } }
@keyframes trip-up { from { top:calc(100% - 10px); opacity:0; } 15%, 85% { opacity:1; } to { top:0; opacity:0; } }

/* Home page highlight: photo resizing for Indian government forms */
.spot { display:flex; align-items:center; gap:18px; margin:8px 0 26px; padding:20px 24px; border-radius:16px;
        border:1px solid color-mix(in srgb, var(--spot) 45%, var(--line)); background:color-mix(in srgb, var(--spot) 9%, var(--card)); }
.spot-ico { display:grid; place-items:center; flex:none; width:56px; height:56px; border-radius:14px; background:var(--spot); color:var(--spot-fg); }
.spot-ico svg { width:32px; height:32px; }
.spot-text { flex:1; min-width:0; }
.spot h2 { margin:0 0 4px; font-size:20px; text-wrap:balance; }
.spot p { margin:0; color:var(--muted); font-size:15px; }
.spot-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.spot-links a { padding:5px 13px; border-radius:999px; border:1px solid var(--line); background:var(--card); color:var(--text);
        text-decoration:none; font-weight:600; font-size:14px; }
.spot-links a:hover { border-color:var(--spot); color:var(--spot); }
.spot-go { flex:none; padding:12px 22px; font-size:15px; font-weight:700; }
@media (max-width:760px) {
  .spot { flex-direction:column; align-items:flex-start; gap:12px; padding:16px; }
  .spot-ico { width:44px; height:44px; border-radius:12px; } .spot-ico svg { width:26px; height:26px; }
  .spot h2 { font-size:18px; }
  .spot-go { width:100%; justify-content:center; }
  }

/* extra form pieces for the newer tools */
section.tool textarea { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:6px; background:var(--bg);
                        color:var(--text); font:inherit; resize:vertical; }
.sigpad { position:relative; border:2px dashed var(--line); border-radius:12px; background:var(--paper); overflow:hidden; }
.sigpad canvas { display:block; width:100%; height:auto; aspect-ratio:3 / 1; touch-action:none; cursor:crosshair; }
.sigpad .btn { position:absolute; top:8px; right:8px; }


/* ------------------------------------------------------------------ task-first design */
.top { position:sticky; top:0; z-index:40; display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:58px;
       padding:8px max(20px, env(safe-area-inset-right)) 8px max(20px, env(safe-area-inset-left));
       background:color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.brand { font-size:19px; font-weight:800; letter-spacing:-.02em; flex:none; }
.brand img { width:30px; height:30px; border-radius:8px; }
.nav-account { display:flex; align-items:center; gap:6px; flex:none; }
/* Coming soon page */
.soon-page { min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }
.soon { flex:1; display:grid; place-content:center; justify-items:center; text-align:center; gap:6px; padding:32px 20px; max-width:none; }
.soon img { border-radius:18px; }
.soon-brand { margin:8px 0 0; font-size:20px; font-weight:800; letter-spacing:-.02em; }
.soon h1 { margin:6px 0 0; font-size:clamp(38px, 9vw, 64px); line-height:1.05; letter-spacing:-.03em; }
.soon-text { margin:12px 0 0; max-width:46ch; font-size:17px; color:var(--muted); text-wrap:balance; }
.soon-contact { margin:22px 0 0; font-size:15px; }
.soon-preview { margin:18px 0 0; padding:8px 14px; border-radius:10px; font-size:14px; background:var(--warn-bg); color:var(--warn); }
.soon-preview a { color:inherit; font-weight:700; }
.soon-foot { padding:18px; text-align:center; font-size:13px; color:var(--muted); }
.soon-foot a { color:inherit; }
/* Announcement or maintenance strip under the top bar (text set in the admin page). */
.site-notice { padding:9px 16px; text-align:center; font-size:14px; background:var(--accent); color:var(--accent-fg); }
.site-notice.warn { background:var(--warn-bg, var(--ok-bg)); color:var(--warn, var(--text)); border-bottom:1px solid var(--line); }
.site-notice a { color:inherit; font-weight:700; }
.banner.paused { margin-top:6px; }
/* The privacy notice sits in the middle of the top bar on wide screens; on smaller ones it stays in the page. */
.top-note { display:none; }
@media (min-width:1100px) {
  .top { display:grid; grid-template-columns:minmax(max-content, 1fr) minmax(0, 600px) minmax(max-content, 1fr); }
  .top > .nav-account { white-space:nowrap; }
  .top > .brand { justify-self:start; } .top > .nav-account { justify-self:end; }
  .top-note { display:flex; align-items:center; gap:9px; min-width:0; padding:6px 14px; border-radius:10px;
              background:var(--ok-bg); color:var(--ok); font-size:12.5px; line-height:1.35; text-wrap:balance;
              animation:privacy-flash 1.1s ease-in-out 0.4s 4; }
  .top-note svg { flex:none; }
  .top-note b { font-weight:700; }
  .top-note a { color:inherit; font-weight:600; white-space:nowrap; }
  body:has(.top-note) main.home .ask .privacy, body:has(.top-note) main.toolpage > .privacy { display:none; }
}
@media (prefers-reduced-motion: reduce) { .top-note { animation:none; } }
.nav-link { display:inline-flex; align-items:center; gap:7px; padding:8px 12px; border-radius:999px; color:var(--text);
            text-decoration:none; font-weight:600; font-size:14px; }
.nav-link:hover { background:var(--hover); color:var(--accent); }
.nav-link.on { background:var(--text); color:var(--card); }
.nav-account .btn.primary { border-radius:999px; padding:8px 18px; font-weight:700; }
.ico { flex:none; }

/* tool icons: a Lucide icon on a soft circle tinted by section */
.tico { --tint:var(--accent); display:inline-grid; place-items:center; flex:none; width:40px; height:40px; border-radius:50%;
        color:var(--tint); background:color-mix(in srgb, var(--tint) 14%, var(--card)); }
.tico.small { width:30px; height:30px; }
.sec-fix { --tint:var(--t-fix); } .sec-pages { --tint:var(--t-pages); } .sec-topdf { --tint:var(--t-topdf); }
.sec-frompdf { --tint:var(--t-frompdf); } .sec-protect { --tint:var(--t-protect); } .sec-photos { --tint:var(--t-photos); } .sec-business { --tint:var(--t-business); }

/* home */
main.home { max-width:1080px; padding-top:0; }
.ask { text-align:center; padding:52px 0 26px; }
.ask h1 { margin:0 0 22px; font-size:clamp(30px, 5vw, 46px); font-weight:800; letter-spacing:-.03em; line-height:1.100; text-wrap:balance; }
.ask-box { position:relative; max-width:640px; margin:0 auto; }
.ask-box .ico { position:absolute; left:20px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.ask-box input { padding:18px 20px 18px 56px; border-radius:18px; border:2px solid var(--line); background:var(--card); font-size:18px;
                 box-shadow:0 8px 30px var(--shadow); }
.ask-box input:focus { border-color:var(--accent); outline:4px solid color-mix(in srgb, var(--accent) 20%, transparent); outline-offset:0; }
.ask-popular { display:flex; flex-wrap:wrap; justify-content:center; gap:2px 16px; margin:16px auto 0; max-width:720px; color:var(--muted); font-size:14px; line-height:2; }
.ask-popular a { color:var(--text); font-weight:600; text-decoration:underline; text-decoration-color:var(--line);
                 text-underline-offset:4px; white-space:nowrap; }
.ask-popular a:hover { color:var(--accent); text-decoration-color:var(--accent); }
.ask .privacy { display:inline-flex; text-align:left; margin:24px auto 0; max-width:640px; }
.tasks { columns:3 280px; column-gap:28px; margin-top:8px; scroll-margin-top:80px; }
.tsec { break-inside:avoid; margin:0 0 28px; padding:0; }
.tsec h2 { margin:0; font-size:19px; font-weight:800; letter-spacing:-.01em; display:flex; align-items:center; gap:10px; }
.tsec h2::before { content:""; width:10px; height:10px; border-radius:50%; background:var(--tint, var(--accent)); }
.tsec-blurb { margin:2px 0 10px 20px; font-size:13px; color:var(--muted); }
.tsec ul { list-style:none; margin:0; padding:6px; border:1px solid var(--line); border-radius:18px; background:var(--card); }
.tsec li a { display:flex; align-items:center; gap:12px; padding:9px 10px; border-radius:12px; color:var(--text); text-decoration:none;
             font-weight:600; font-size:15px; }
.tsec li a span:not(.tico) { flex:1; min-width:0; }
.tsec li a > .ico { color:var(--line); transition:transform .15s, color .15s; }
.tsec li a:hover { background:color-mix(in srgb, var(--tint, var(--accent)) 8%, var(--card)); }
.tsec li a:hover > .ico { color:var(--tint, var(--accent)); transform:translateX(3px); }
.why { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:24px; margin:28px 0 8px; padding-top:28px; border-top:1px solid var(--line); }
.why b { font-size:15px; } .why p { margin:4px 0 0; font-size:14px; color:var(--muted); }

/* tool pages */
main.toolpage { max-width:720px; }
.crumbs { display:flex; align-items:center; gap:6px; margin:4px 0 18px; font-size:13px; color:var(--muted); }
.crumbs a { color:var(--muted); text-decoration:none; font-weight:600; } .crumbs a:hover { color:var(--accent); }
.thead { display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.thead .tico { width:56px; height:56px; } .thead .tico .ico { width:28px; height:28px; }
.thead h1 { margin:0; font-size:clamp(24px, 4vw, 32px); font-weight:800; letter-spacing:-.02em; line-height:1.150; }
.thead p { margin:4px 0 0; color:var(--muted); font-size:16px; }
main.toolpage section.tool { border-radius:20px; padding:22px; }
main.toolpage > .privacy { margin-top:18px; }
.drop { position:relative; display:grid; justify-items:center; gap:8px; padding:30px 16px 24px; margin-bottom:6px;
        border:2px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius:16px;
        background:color-mix(in srgb, var(--accent) 5%, var(--card)); text-align:center; transition:border-color .15s, background .15s; }
.drop.over { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 14%, var(--card)); }
.drop input[type=file] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; min-height:0; padding:0; border:0; }
.drop-btn { position:relative; pointer-events:none; margin:0; padding:13px 28px; border-radius:999px; background:var(--text); color:var(--card);
            font-size:17px; font-weight:700; }
.drop:hover .drop-btn { background:var(--accent); color:var(--accent-fg); }
.drop input:focus-visible + .drop-btn { outline:3px solid var(--accent); outline-offset:3px; }
.drop-hint { font-size:13px; color:var(--muted); }
.drop-name { font-weight:600; font-size:14px; overflow-wrap:anywhere; color:var(--ok); }
.drop.has-file { border-style:solid; border-color:var(--ok); }
button.go { border-radius:999px; padding:13px; font-weight:700; font-size:16px; }
.more { margin-top:36px; }
.more h2 { font-size:16px; margin:0 0 10px; }
.more-list { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.more-list a { display:inline-flex; align-items:center; gap:8px; padding:6px 14px 6px 6px; border:1px solid var(--line); border-radius:999px;
               background:var(--card); color:var(--text); text-decoration:none; font-weight:600; font-size:14px; }
.more-list li:last-child a { padding-left:12px; color:var(--muted); }
.more-list a:hover { border-color:var(--accent); color:var(--accent); }

/* log in / sign up */
.login { margin-top:56px; }
.login .card { border-radius:20px; box-shadow:0 10px 34px var(--shadow); }
.login button.go { border-radius:999px; }

/* footer: dark, with every tool listed by section */
.site-foot { margin-top:48px; padding:40px max(20px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
             background:var(--foot-bg); color:var(--foot-text); font-size:14px; }
.foot-cols { display:grid; grid-template-columns:repeat(auto-fit, minmax(138px, 1fr)); gap:28px 22px; max-width:1180px; margin:0 auto; }
.foot-cols > div { display:grid; gap:8px; align-content:start; }
.foot-cols h4 { margin:0 0 4px; font-size:12px; letter-spacing:.07em; text-transform:uppercase; color:var(--foot-head); }
.foot-cols h4.foot-gap { margin-top:14px; }
.foot-cols a { color:var(--foot-text); text-decoration:none; overflow-wrap:anywhere; } .foot-cols a:hover { color:var(--foot-head); text-decoration:underline; }
.foot-line { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 24px; max-width:1180px;
             margin:30px auto 0; padding-top:18px; border-top:1px solid var(--foot-line); color:var(--foot-muted); font-size:13px; }
.site-foot .brand { font-size:16px; color:var(--foot-head); } .site-foot .brand img { width:24px; height:24px; border-radius:6px; }

@media (max-width:640px) {
  .top { min-height:52px; padding-top:calc(6px + env(safe-area-inset-top)); padding-bottom:6px; padding-left:max(14px, env(safe-area-inset-left)); padding-right:max(8px, env(safe-area-inset-right)); }
  .brand { font-size:17px; } .brand img { width:28px; height:28px; }
  .nav-link { padding:8px 9px; } .nav-link span { display:none; } .nav-link[href="/login"] { font-size:14px; }
  .top .menu summary .badge { display:none; } .top .menu summary { max-width:110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .nav-account { gap:2px; min-width:0; }
  .ask { padding:28px 0 18px; }
  .ask-box input { padding:15px 16px 15px 50px; font-size:16px; border-radius:16px; }
  .ask-box .ico { left:16px; }
  .tasks { columns:1; }
  .tsec li a { padding:11px 10px; font-size:16px; }
  .thead { gap:12px; } .thead .tico { width:46px; height:46px; }
  .thead p { font-size:14px; }
  main.toolpage section.tool { padding:16px; }
  .drop { padding:24px 12px 20px; }
  .login { margin-top:28px; }
  .site-foot { margin-top:32px; padding-top:28px; } .foot-cols { grid-template-columns:1fr 1fr; }
}

/* Page shell: on wide screens the left ad sits at the left edge, the content in the middle and the right ad at the
   right edge. The ads stay in view while scrolling and stop where the content ends, above the footer.
   On narrower screens there is no room, so the two side ads sit side by side under the content. */
.shell { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); column-gap:12px; }
.shell > main { grid-column:1 / -1; width:100%; }
.shell > .ads { margin:0 0 24px; }
.shell > .ads-left { justify-self:end; width:min(calc(100% - 12px), 300px); }
.shell > .ads-right { justify-self:start; width:min(calc(100% - 12px), 300px); }
.shell > .ads:only-of-type { grid-column:1 / -1; justify-self:center; }
@media (min-width:1200px) {
  .shell.has-rails { grid-template-columns:232px minmax(0, 1fr) 232px; column-gap:0; }
  .shell.has-rails > main { grid-column:2; grid-row:1; }
  .shell.has-rails > .ads { grid-row:1; position:sticky; top:76px; align-self:start; width:200px; margin:18px 0 24px;
                            max-height:calc(100vh - 96px); overflow-y:auto; }
  .shell.has-rails > .ads-left { grid-column:1; justify-self:start; margin-left:16px; }
  .shell.has-rails > .ads-right { grid-column:3; justify-self:end; margin-right:16px; }
}

/* Home page search results: shown right under the search box; the rest of the home page is hidden meanwhile. */
.results { max-width:640px; margin:18px auto 0; text-align:left; }
.results-count { margin:0 0 10px 4px; font-size:14px; font-weight:700; color:var(--muted); }
.results-list { list-style:none; margin:0; padding:6px; border:1px solid var(--line); border-radius:18px; background:var(--card);
                box-shadow:0 8px 30px var(--shadow); }
.results-list:empty { display:none; }
.results-list li a { display:flex; align-items:center; gap:12px; padding:10px; border-radius:12px; color:var(--text); text-decoration:none;
                     font-weight:600; font-size:15px; }
.results-list li a span:not(.tico) { flex:1; min-width:0; }
.results-list li a > .ico { color:var(--line); transition:transform .15s, color .15s; }
.results-list li a:hover, .results-list li:first-child a { background:color-mix(in srgb, var(--tint, var(--accent)) 8%, var(--card)); }
.results-list li a:hover > .ico, .results-list li:first-child a > .ico { color:var(--tint, var(--accent)); transform:translateX(3px); }
.results-none { margin:4px 4px 0; color:var(--muted); font-size:14px; }
main.home.searching .ask-popular, main.home.searching .ask .privacy, main.home.searching .spot, main.home.searching .tasks,
main.home.searching .why, main.home.searching .ads-bottom { display:none; }
main.home.searching.no-match .ask-popular { display:flex; margin-top:22px; }
main.home.searching { min-height:70vh; }
@media (max-width:640px) {
  main.home.searching .ask { padding-top:14px; }
  main.home.searching .ask h1 { font-size:22px; margin-bottom:12px; }
  .results-list li a { padding:12px 10px; font-size:16px; }
}

/* Day / Night switch in the top bar */
.theme-toggle { border:0; background:none; cursor:pointer; font:inherit; padding:8px 10px; }
.theme-toggle span { display:inline-grid; }
.theme-toggle .when-night, :root[data-theme="dark"] .theme-toggle .when-day { display:none; }
:root[data-theme="dark"] .theme-toggle .when-night { display:inline-grid; }

/* Short notices under a tool and in the photo card */
.rights { margin:10px 4px 0; font-size:13px; color:var(--muted); }
.spot-note { margin:10px 0 0 !important; font-size:12.500px !important; }

/* Extract Text (browser tool) */
.opt { font-weight:400; color:var(--muted); font-size:13px; }
.xt-langs { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:2px 14px; }
.xt-lockwrap { list-style:none; }
.xt-lockwrap .lt-file { margin-bottom:0; border-bottom-left-radius:0; border-bottom-right-radius:0; }
.xt-pass { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 12px; margin-bottom:8px; border:1px solid var(--line); border-top:0; border-radius:0 0 10px 10px; background:var(--warn-bg); }
.xt-pass input { flex:1 1 180px; min-width:0; margin:0; }
.xt-passnote { flex:1 1 100%; font-size:13px; color:var(--warn); }
.xt-passnote.err, .hint.err { color:var(--err); }
.xt-progress { margin-top:12px; }
.xt-progress progress { width:100%; height:10px; accent-color:var(--accent); }
.xt-step { display:flex; align-items:center; gap:10px; margin-top:6px; font-size:14px; }
.xt-step span { flex:1; min-width:0; }
.xt-page { margin-top:14px; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--card); }
.xt-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; padding:8px 12px; background:var(--bg); border-bottom:1px solid var(--line); font-size:14px; }
.xt-head b { overflow-wrap:anywhere; }
.xt-tag { font-size:12px; color:var(--muted); }
.xt-page.xt-none .xt-head { border-bottom:0; }
.xt-text { padding:12px; min-height:60px; max-height:420px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font-size:15px; line-height:1.6; color:var(--text); outline:none;
           font-family:system-ui, "Noto Sans", "Noto Sans Devanagari", "Noto Sans Gujarati", "Noto Sans Tamil", "Noto Sans Bengali", "Nirmala UI", sans-serif; }
.xt-text:focus-visible { box-shadow:inset 0 0 0 3px var(--accent); }
mark.xt-low { background:var(--warn-bg); color:inherit; border-bottom:2px dotted var(--warn); border-radius:2px; padding:0 1px; }
#xtOut .lt-actions { margin-top:14px; }

/* Services page and contact form */
.svc { max-width:980px; }
.svc h2 { font-size:20px; margin:40px 0 14px; }
.svc-hero { padding:28px 0 6px; }
.svc-hero h1 { font-size:clamp(28px, 5vw, 42px); line-height:1.15; margin:0 0 12px; text-wrap:balance; }
.svc-hero .lede { color:var(--muted); font-size:17px; max-width:60ch; margin:0 0 20px; }
.svc-cta { display:inline-block; padding:12px 26px; border-radius:999px; font-weight:700; font-size:16px; text-decoration:none; }
.svc-cards { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:14px; }
.svc-cards h3, .svc-steps h3 { font-size:16px; margin:0 0 6px; }
.svc-cards p, .svc-steps p { margin:0; color:var(--muted); font-size:14.5px; line-height:1.55; }
.svc-ico { display:inline-grid; place-items:center; width:46px; height:46px; margin-bottom:12px; border-radius:12px; background:var(--hover); color:var(--accent); }
.svc-steps { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:14px; }
.svc-steps li { display:flex; gap:12px; align-items:flex-start; }
.svc-num { flex:none; display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:var(--accent); color:#fff; font-weight:700; }
.svc-more { margin:26px 0 0; font-size:16px; }
.svc-contact { margin-top:40px; padding:24px; scroll-margin-top:90px; }
.svc-contact h2 { margin:0 0 14px; font-size:20px; }
.ct-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:0 16px; }
.ct-field { margin-bottom:12px; min-width:0; }
.ct-field label { display:block; font-weight:600; font-size:14px; margin-bottom:5px; }
.ct-field input[type=text], .ct-field input[type=email], .ct-field input[type=tel], .ct-field select, .ct-field textarea { width:100%; margin:0; }
.ct-field textarea { resize:vertical; min-height:130px; font:inherit; padding:9px 10px; border:1px solid var(--line); border-radius:6px;
                background:var(--input-bg); color:var(--text); font:inherit; }
.ct-field textarea:focus-visible { outline:3px solid var(--accent); outline-offset:1px; }
.ct-field [aria-invalid=true] { border-color:var(--err); box-shadow:0 0 0 1px var(--err); }
.ct-err { color:var(--err); font-size:13px; min-height:0; margin-top:4px; }
.ct-err:empty { display:none; }
.ct-under { display:flex; gap:12px; align-items:flex-start; }
.ct-under .ct-err { flex:1; }
.ct-count { margin-left:auto; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; margin-top:4px; }
.ct-count.err { color:var(--err); font-weight:700; }
.req { color:var(--err); }
.ct-consent { align-items:flex-start; font-weight:400 !important; }
.ct-consent input { margin-top:3px; flex:none; }
.ct-trap { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.ct-done { padding:18px; border-radius:10px; background:var(--ok-bg); color:var(--ok); font-weight:600; font-size:16px; }
@media (max-width:600px) { .svc-contact { padding:16px; } .svc h2 { margin-top:30px; } }

/* Sharpen and Clean (browser tool) */
.en-h { font-size:15px; margin:18px 0 8px; }
.en-pdf { margin-bottom:10px; }
.en-pdf > .hint { margin:4px 0 0; }
.en-shot { border:0; padding:0; cursor:zoom-in; font:inherit; }
.en-shot:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.en-kind { font-size:11px; color:var(--muted); text-align:center; line-height:1.3; min-height:0; }
.en-kind:empty { display:none; }
.lt-page.en-cur { box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.en-viewbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:6px; }
.en-viewbar .grow { flex:1; }
.en-which { font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.en-zoom { display:inline-flex; gap:4px; }
.en-zoom button[aria-pressed=true] { background:var(--text); color:var(--card); border-color:var(--text); }
.en-view { overflow:auto; max-height:min(72vh, 760px); border:1px solid var(--line); border-radius:10px; background:var(--bg); overscroll-behavior:contain; }
.en-view:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.en-stage { position:relative; width:100%; --split:50%; min-height:80px; }
.en-stage canvas { display:block; width:100%; height:100%; background:#fff; }
#enAfter { position:absolute; inset:0; object-fit:contain; object-position:left top; clip-path:inset(0 0 0 var(--split)); }
.en-line { position:absolute; top:0; bottom:0; left:var(--split); width:44px; margin-left:-22px; cursor:ew-resize; touch-action:none; display:grid; place-items:center; }
.en-line::before { content:""; position:absolute; top:0; bottom:0; left:50%; width:2px; margin-left:-1px; background:#fff; box-shadow:0 0 0 1px rgba(0,0,0,.45); }
.en-line span { position:sticky; top:45%; width:30px; height:30px; border-radius:50%; background:#fff; box-shadow:0 1px 5px rgba(0,0,0,.45); }
.en-line span::before { content:"↔"; display:grid; place-items:center; height:100%; font-size:15px; color:#222; }
.en-tag { position:absolute; top:8px; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; background:rgba(0,0,0,.6); color:#fff; pointer-events:none; }
.en-tag.l { left:8px; } .en-tag.r { right:8px; }
.en-split { width:100%; margin:8px 0 2px; padding:0; border:0; background:none; accent-color:var(--accent); }
.en-opts { display:grid; gap:2px; margin-top:6px; }
.en-opt { display:grid; grid-template-columns:minmax(120px, 190px) 1fr 3ch; align-items:center; gap:10px; }
.en-opt label { margin:0; }
.en-opt input[type=range] { padding:0; border:0; background:none; accent-color:var(--accent); min-width:0; }
.en-opt output { font-size:13px; font-variant-numeric:tabular-nums; text-align:right; color:var(--muted); }
.en-save { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:12px; }
.en-kb { display:flex; align-items:center; gap:8px; }
.en-kb input { flex:1; min-width:0; margin:0; }
.en-rows, .en-notes { margin:0; padding:0; list-style:none; display:grid; gap:8px; }
.en-notes { padding-left:18px; list-style:disc; font-size:13px; gap:4px; margin-top:8px; }
.en-row { display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--text); }
.en-row > div { flex:1; min-width:0; display:grid; gap:2px; }
.en-row b { overflow-wrap:anywhere; font-size:14px; }
.en-row span { font-size:12px; color:var(--muted); }
.en-row .lt-warn { color:var(--warn); font-weight:600; }
.en-link { border:0; background:none; padding:0; font:inherit; color:var(--accent); text-decoration:underline; cursor:pointer; }
@media (max-width:520px) { .en-opt { grid-template-columns:1fr 3ch; } .en-opt label { grid-column:1 / -1; } }

.en-warn { margin:0 0 10px; font-weight:600; font-size:14px; }
.en-status { margin-top:8px; font-weight:700; font-size:15px; }
.en-status:empty { display:none; }
.en-detailbox { margin-top:6px; font-size:13px; }
.en-detailbox summary { cursor:pointer; color:var(--muted); }
.en-details { margin:6px 0 0; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--text); font:12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
#enReset { margin:2px 0 6px; }

/* Admin: sections in a left-hand menu */
.admin-shell { display:grid; grid-template-columns:232px minmax(0, 1fr); gap:0 8px; max-width:1400px; margin:0 auto; align-items:start; }
.admin-shell > .admin { max-width:none; margin:0; min-width:0; width:100%; }
.adm-side { position:sticky; top:72px; align-self:start; padding:24px 0 24px 16px; max-height:calc(100vh - 72px); overflow:auto; }
.adm-nav.tabs { display:grid; gap:2px; border:0; margin:0; }
.adm-group { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:14px 10px 6px; }
.adm-group:first-child { padding-top:0; }
.adm-nav.tabs button { display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:9px 10px; border:0; border-radius:8px; color:var(--text); font-size:14px; font-weight:500; }
.adm-nav.tabs button svg { flex:none; color:var(--muted); }
.adm-nav.tabs button:hover { background:var(--hover); }
.adm-nav.tabs button.on { background:color-mix(in srgb, var(--accent) 13%, var(--card)); color:var(--accent); font-weight:700; }
.adm-nav.tabs button.on svg { color:var(--accent); }
.bars.wide .bar { grid-template-columns:minmax(120px, 46%) minmax(0, 1fr) 40px; }
.bars.wide .bar > span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:900px) {
  .admin-shell { grid-template-columns:minmax(0, 1fr); }
  .adm-side { position:sticky; top:56px; z-index:5; padding:8px 12px; max-height:none; background:var(--bg); border-bottom:1px solid var(--line); }
  .adm-nav.tabs { display:flex; flex-wrap:nowrap; overflow-x:auto; gap:4px; scrollbar-width:none; }
  .adm-group { display:none; }
  .adm-nav.tabs button { width:auto; white-space:nowrap; padding:8px 12px; border:1px solid var(--line); border-radius:999px; }
}
.admin-shell > .admin > * { min-width:0; }
.admin-shell section.tool > div > * { min-width:0; }
#sources code { overflow-wrap:anywhere; word-break:break-all; }

/* Admin menu: wide, or small with icons only */
.admin-shell { transition:grid-template-columns .18s ease; }
.adm-fold { display:flex; align-items:center; gap:10px; width:100%; margin:0 0 12px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--muted); font:inherit; font-size:13px; cursor:pointer; }
.adm-fold:hover { color:var(--text); background:var(--hover); }
.adm-fold svg { flex:none; transition:transform .18s ease; }
.admin-shell.mini { grid-template-columns:68px minmax(0, 1fr); }
.admin-shell.mini .adm-side { padding-left:10px; padding-right:2px; }
.admin-shell.mini .adm-fold { justify-content:center; padding:8px 0; }
.admin-shell.mini .adm-fold svg { transform:scaleX(-1); }
.admin-shell.mini .adm-fold span, .admin-shell.mini .adm-nav button span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.admin-shell.mini .adm-nav button { justify-content:center; padding:10px 0; }
.admin-shell.mini .adm-group { font-size:0; padding:6px 0; margin:6px 10px; border-top:1px solid var(--line); }
.admin-shell.mini .adm-group:first-child { display:none; }
@media (max-width:900px) {
  .adm-fold { display:none; }
  .admin-shell.mini { grid-template-columns:minmax(0, 1fr); }
  .admin-shell.mini .adm-side { padding:8px 12px; }
  .admin-shell.mini .adm-nav button { padding:8px 12px; }
  .admin-shell.mini .adm-nav button span { position:static; width:auto; height:auto; clip-path:none; }
}
@media (prefers-reduced-motion: reduce) { .admin-shell, .adm-fold svg { transition:none; } }

.bigfile { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.bigfile-go { display:inline-flex; gap:8px; flex-wrap:wrap; }

/* Admin, Users: details row and the "new sign-ups" count in the menu */
.u-more td { background:var(--bg); padding:12px 16px; }
.u-more .kv { margin:0; }
.adm-count { margin-left:auto; min-width:20px; padding:1px 6px; border-radius:999px; background:var(--accent); color:#fff; font-size:11px; font-weight:700; font-style:normal; text-align:center; }
.admin-shell.mini .adm-nav button { position:relative; }
.admin-shell.mini .adm-count { position:absolute; top:2px; right:6px; margin:0; }

/* Admin: the page uses the whole window, with the menu against the left edge and the content filling the rest. */
.admin-shell { max-width:none; }
.admin-shell > .admin { padding-right:20px; }
