:root {
  --bg: #f7f8f7;
  --surface: #ffffff;
  --text: #16201e;
  --muted: #5b6764;
  --border: #dde3e1;
  --primary: #0f766e;
  --primary-hover: #0b5e58;
  --primary-soft: #e3f3f1;
  --ok: #15803d;
  --error: #b91c1c;
  --radius: 12px;
  --answer: #c2410c;
  --answer-soft: #ffedd5;
  --shadow: 0 1px 2px rgb(0 0 0 / 5%), 0 4px 16px rgb(0 0 0 / 4%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1413;
    --answer: #fb923c;
    --answer-soft: #3b2412;
    --surface: #171e1c;
    --text: #e7eeec;
    --muted: #9aa8a4;
    --border: #2a3431;
    --primary: #2dd4bf;
    --primary-hover: #5eead4;
    --primary-soft: #133330;
    --ok: #4ade80;
    --error: #f87171;
    --shadow: none;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}

a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0.4em 0 0.3em; }
h2 { font-size: 1.3rem; margin-block: 1.6em 0.5em; }

.wrap { width: min(100% - 32px, 960px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }

.skip {
  position: absolute; inset-inline-start: 8px; top: -48px;
  background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── Header / footer ───────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 60px; flex-wrap: wrap; padding-block: 8px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none;
}
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--text); background: var(--primary-soft); }
.header-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.lang-switch {
  text-decoration: none; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px;
  color: var(--text); font-size: 0.9rem;
}

.site-footer {
  margin-top: 64px; padding-block: 32px; border-top: 1px solid var(--border);
  background: var(--surface); font-size: 0.92rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-block: 12px; align-items: center; }
.footer-note { margin: 0; }
.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline;
}

/* ── Home ──────────────────────────────────────────────────────── */
.hero { text-align: center; padding-block: 40px 16px; }
.hero .lead { max-width: 680px; margin-inline: auto; }
.lead { font-size: 1.1rem; color: var(--muted); margin-top: 0; }
.badge {
  display: inline-block; background: var(--primary-soft); color: var(--primary);
  border-radius: 999px; padding: 4px 14px; font-size: 0.9rem; font-weight: 600; margin: 0 0 16px;
}
.search { max-width: 480px; margin: 12px auto 0; }
.search input { font-size: 1.05rem; padding: 12px 16px; border-radius: 999px; }

.category h2 { font-size: 1.1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
}
.card a {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto 1fr; align-content: start; column-gap: 12px; row-gap: 2px;
  height: 100%; padding: 16px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s;
}
.card a:hover { border-color: var(--primary); transform: translateY(-1px); }
.card-icon {
  grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); border-radius: 10px;
  font-weight: 700; font-size: 1.1rem; font-family: var(--mono);
}
.card-name { font-weight: 650; }
.card-desc {
  color: var(--muted); font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere;
}

/* ── Tool pages ────────────────────────────────────────────────── */
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-top: 20px; }
.breadcrumb a { color: var(--muted); }
[dir="rtl"] .breadcrumb span { display: inline-block; transform: scaleX(-1); }

.tool {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(16px, 3vw, 28px); margin-block: 8px 24px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .checks label, label.inline { font-weight: 600; font-size: 0.95rem; }
label.inline { display: inline-flex; align-items: center; gap: 8px; }
label.inline input[type="number"] { width: 90px; }

input[type="text"], input[type="search"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 80px; }
textarea.mono, input.mono { font-size: 0.92rem; }
input.big { font-size: 1.2rem; letter-spacing: 0.02em; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
input[type="file"] { font: inherit; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }

.checks {
  border: 0; padding: 0; margin: 0 0 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px;
}
.checks label { display: flex; gap: 8px; align-items: center; font-weight: 500; }

.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }

.grid-2, .grid-3 { display: grid; gap: 0 16px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.actions { display: flex; gap: 8px; align-items: center; margin-block: 8px; }
.actions.wrap { flex-wrap: wrap; width: auto; margin-inline: 0; }

.btn {
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; display: inline-block;
}
.btn:hover { border-color: var(--primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #04201d; } }
.btn-small { padding: 5px 12px; font-size: 0.9rem; }
.icon-btn { padding: 10px 14px; align-self: end; margin-bottom: 16px; }

.status { min-height: 1.6em; margin: 4px 0 12px; font-weight: 600; }
.status.ok { color: var(--ok); }
.status.error { color: var(--error); }

.meter { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.meter-bar { display: block; height: 100%; width: 0; background: var(--error); transition: width 0.2s; }
.meter-bar[data-level="2"] { background: #d97706; }
.meter-bar[data-level="3"], .meter-bar[data-level="4"] { background: var(--ok); }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 16px;
}
.stats div {
  background: var(--primary-soft); border-radius: 10px; padding: 10px; text-align: center;
  display: flex; flex-direction: column;
}
.stats strong { font-size: 1.6rem; color: var(--primary); line-height: 1.2; }
.stats span { font-size: 0.85rem; color: var(--muted); }

.qr-preview { display: flex; justify-content: center; margin-block: 8px; }
.qr-preview canvas { width: min(100%, 280px); height: auto; border-radius: 8px; border: 1px solid var(--border); background: #fff; }

.img-compare { display: grid; gap: 16px; margin-block: 8px 16px; }
@media (min-width: 640px) { .img-compare { grid-template-columns: 1fr 1fr; } }
.img-compare figure { margin: 0; }
.img-compare figcaption { font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; }
.img-compare img { border-radius: 8px; border: 1px solid var(--border); max-height: 320px; object-fit: contain; width: 100%; background: var(--bg); }

.convert-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.result-big { font-size: 1.35rem; font-weight: 700; color: var(--primary); min-height: 1.5em; margin: 4px 0; overflow-wrap: anywhere; }

.calc-card { border-bottom: 1px solid var(--border); padding-block: 12px; }
.calc-card:last-child { border-bottom: 0; }
.calc-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.calc-line input { width: 120px; }

/* ── Articles / content pages ──────────────────────────────────── */
.content { max-width: 760px; }
.content.page { margin-inline: auto; }
.content.center { text-align: center; max-width: 560px; }
.content details {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; background: var(--surface);
}
.content summary { cursor: pointer; font-weight: 600; }
.content details p { margin-bottom: 0; }
.big-link { font-size: 1.3rem; font-weight: 700; }
.related { margin-top: 40px; }

/* ── Consent banner ────────────────────────────────────────────── */
.consent {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 20; max-width: 640px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgb(0 0 0 / 18%); padding: 16px 20px;
}
.consent p { margin-top: 0; }

@media (max-width: 520px) {
  .site-header nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .convert-row { grid-template-columns: 1fr; }
  .icon-btn { justify-self: center; margin: 0; transform: rotate(90deg); }
  .input-row { flex-direction: column; }
}

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

/* ── Color converter ───────────────────────────────────────────── */
.color-top { display: flex; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.swatch { width: 120px; min-height: 88px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.color-top .field { flex: 1; margin: 0; justify-content: center; }
input[type="color"] { width: 100%; height: 48px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer; }

/* ── BMI ───────────────────────────────────────────────────────── */
.bmi-cat { font-size: 1.2rem !important; }
.bmi-cat[data-cat="normal"] { color: var(--ok) !important; }
.bmi-cat[data-cat="under"], .bmi-cat[data-cat="over"] { color: #d97706 !important; }
.bmi-cat[data-cat^="ob"] { color: var(--error) !important; }
.bmi-scale { position: relative; display: flex; height: 10px; border-radius: 99px; overflow: visible; margin: 8px 0 16px; }
.bmi-scale span { height: 100%; }
.bmi-scale span:nth-child(1) { width: 14%; background: #60a5fa; border-start-start-radius: 99px; border-end-start-radius: 99px; }
.bmi-scale span:nth-child(2) { width: 26%; background: #22c55e; }
.bmi-scale span:nth-child(3) { width: 20%; background: #f59e0b; }
.bmi-scale span:nth-child(4) { width: 40%; background: #ef4444; border-start-end-radius: 99px; border-end-end-radius: 99px; }
.bmi-scale i { position: absolute; top: -5px; width: 4px; height: 20px; background: var(--text); border-radius: 2px; transform: translateX(-50%); }
[dir="rtl"] .bmi-scale i { transform: translateX(50%); }
.small { font-size: 0.85rem; }

/* ── Tables (loan, savings) ────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.table-wrap th, .table-wrap td { padding: 8px 10px; text-align: end; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table-wrap th:first-child, .table-wrap td:first-child { text-align: start; }
.table-wrap th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.table-wrap tr.highlight td { font-weight: 700; color: var(--primary); }
.schedule { margin-top: 8px; }
.schedule summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.growth-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--border); margin-bottom: 8px; }
#ci-bar-dep { background: var(--primary); }
#ci-bar-int { background: #f59e0b; }
.tool h3 { font-size: 1.05rem; margin: 20px 0 8px; }

/* ── File tools ────────────────────────────────────────────────── */
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.file-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg);
}
.file-list li span { display: flex; flex-direction: column; min-width: 0; }
.file-list strong { overflow-wrap: anywhere; }
.file-list small { color: var(--muted); }
.error-text { color: var(--error) !important; }
.file-table td.name { text-align: start; max-width: 220px; overflow-wrap: anywhere; }
.file-table td.good { color: var(--ok); font-weight: 700; }
.file-table td:last-child { display: flex; gap: 8px; align-items: center; justify-content: flex-end; white-space: normal; }
.file-table td small { color: var(--muted); font-size: 0.8rem; }

/* ── Sign a document ───────────────────────────────────────────── */
.sign-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin: 0 0 12px; }
.sign-box legend { font-weight: 700; padding-inline: 6px; }
.sign-pad {
  display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair;
  background: #fff linear-gradient(to top, transparent 34px, #c8d0ce 34px, #c8d0ce 35px, transparent 35px);
  border: 1px dashed var(--border); border-radius: 8px;
}
.sign-wrap { overflow: hidden; }
.sign-stage { position: relative; margin: 8px auto; max-width: 900px; box-shadow: 0 2px 12px rgb(0 0 0 / 15%); background: #fff; }
.sign-stage canvas { display: block; width: 100%; height: auto; cursor: copy; }
.sign-stamp {
  position: absolute; left: 55%; top: 78%; width: 30%; height: auto; max-width: none;
  cursor: move; touch-action: none; outline: 2px dashed var(--primary); outline-offset: 2px; user-select: none; -webkit-user-drag: none;
}
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; font-variant-numeric: tabular-nums; }
[dir="rtl"] .pager button { transform: scaleX(-1); }

/* Fill-in fields on the signing page */
.sign-fields { position: absolute; inset: 0; pointer-events: none; }
.sign-field { position: absolute; pointer-events: auto; }
.sign-field input[type="text"] {
  width: 100%; height: 100%; margin: 0; padding: 0 3px; border: 0; border-radius: 2px;
  background: rgb(255 214 10 / 28%); color: #1d3f91; outline: 1px dashed rgb(0 0 0 / 25%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", Arial, sans-serif; line-height: 1;
}
.sign-field input[type="text"]:focus { outline: 2px solid var(--primary); background: rgb(255 214 10 / 40%); }
.sign-field input::placeholder { color: rgb(0 0 0 / 38%); }
.sign-field.check input { width: 100%; height: 100%; margin: 0; accent-color: #1d3f91; }
.sign-field.manual input[type="text"] { outline-style: solid; }
.sign-field-move, .sign-field-del {
  position: absolute; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text);
  font-size: 13px; line-height: 1; cursor: pointer;
}
.sign-field-move { inset-inline-start: -26px; cursor: grab; touch-action: none; }
.sign-field-del { inset-inline-end: -26px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-wa { background: #128c4b; border-color: #128c4b; color: #fff; }
.btn-wa:hover:not(:disabled) { background: #0e733d; border-color: #0e733d; }

/* Percentage calculator: result pies and fraction clocks */
.pc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 20px; align-items: start; }
.calc-card.with-pie { display: flex; align-items: center; gap: 16px; }
.pc-main { flex: 1; min-width: 0; }
.pie { display: block; width: 100%; height: 100%; }
.pie .pie-bg { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 0.8; }
.pie .pie-fill { fill: var(--primary); }
.pie.up .pie-fill { fill: var(--ok); }
.pie.down .pie-fill { fill: var(--error); }
.pie-wrap { flex: none; width: 150px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.pie-set { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; direction: ltr; min-height: 64px; }
.pie-set .pie { width: 64px; height: 64px; }
.pie-set .pie.small { width: 40px; height: 40px; }
.pie-set .pie.tiny { width: 24px; height: 24px; }
.pie-set .pie.zoom { width: 44px; height: 44px; }
.pie.zoom .pie-bg { stroke-dasharray: 2 1.5; }
.pie .pie-tick { stroke: var(--primary); stroke-width: 1.2; }
.pie.up .pie-tick { stroke: var(--ok); }
.pie.down .pie-tick { stroke: var(--error); }
.pie-note { font-size: 0.75rem; color: var(--muted); line-height: 1.3; }
.pie-label { font-size: 0.85rem; font-weight: 700; color: var(--muted); min-height: 1.2em; font-variant-numeric: tabular-nums; }
.fractions { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface); }
.fractions h3 { margin: 0 0 10px; font-size: 1rem; text-align: center; }
.frac-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.frac-btn {
  display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; cursor: pointer;
}
.frac-btn:hover, .frac-btn:focus-visible { border-color: var(--primary); }
.frac-btn .pie { width: 46px; height: 46px; }
.frac { font-weight: 700; font-size: 1.05rem; line-height: 1; }
.frac sup, .frac sub { font-size: 0.75em; }
.frac-pct { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .pc-layout { grid-template-columns: 1fr; }
  .frac-grid { grid-template-columns: repeat(3, 1fr); }
  .pie-wrap { width: 104px; }
  .pie-set .pie { width: 52px; height: 52px; }
  .pie-set .pie.small { width: 30px; height: 30px; }
  .pie-set .pie.tiny { width: 18px; height: 18px; }
  .pie-set .pie.zoom { width: 36px; height: 36px; }
}

/* Unit converter: circle diagram */
.circle-viz { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 12px; }
.circle-svg { width: 100%; height: auto; direction: ltr; }
.circle-svg .cv-area { fill: var(--primary-soft); stroke: none; }
.circle-svg .cv-area.given { fill: color-mix(in srgb, var(--primary) 30%, transparent); }
.circle-svg .cv-area.result { fill: var(--answer-soft); }
.circle-svg .cv-circ { fill: none; stroke: var(--muted); stroke-width: 2; }
.circle-svg .cv-line { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.circle-svg .cv-circ.given, .circle-svg .cv-line.given { stroke: var(--primary); stroke-width: 4; stroke-dasharray: none; }
.circle-svg .cv-circ.result, .circle-svg .cv-line.result { stroke: var(--answer); stroke-width: 4; stroke-dasharray: none; }
.circle-svg .cv-center { fill: var(--text); }
.circle-svg .cv-label { fill: var(--muted); font: 600 13px var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.circle-svg .cv-label.given { fill: var(--primary); font-weight: 800; }
.circle-svg .cv-label.result { fill: var(--answer); font-weight: 800; }
.cv-side h3 { font-size: 1rem; margin: 12px 0 6px; }
.cv-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 0.9rem; color: var(--muted); }
.cv-key { display: inline-block; width: 18px; height: 4px; border-radius: 2px; }
.cv-key.given { background: var(--primary); }
.cv-key.result { background: var(--answer); margin-inline-start: 8px; }
.cv-steps { margin: 0; padding-inline-start: 1.4em; font-family: var(--mono); font-size: 0.92rem; text-align: left; }
.cv-steps li { margin-block: 4px; overflow-wrap: anywhere; }
.cv-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.cv-table th, .cv-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: start; }
.cv-table td[dir="ltr"] { font-family: var(--mono); }
.cv-table tr.given th, .cv-table tr.given td { color: var(--primary); font-weight: 700; }
.cv-table tr.result th, .cv-table tr.result td { color: var(--answer); font-weight: 700; }
@media (max-width: 700px) { .circle-viz { grid-template-columns: 1fr; } .circle-svg { max-width: 280px; margin-inline: auto; display: block; } }
.cv-table td { white-space: nowrap; }

/* Header search, all-tools page and "request a new tool" */
.site-header { position: relative; }
.search-btn { font-size: 1rem; line-height: 1; padding: 7px 10px; }
.search-panel {
  position: absolute; inset-inline: 0; top: 100%; z-index: 50; background: var(--surface);
  border-bottom: 1px solid var(--border); box-shadow: 0 10px 24px rgb(0 0 0 / 12%); padding-block: 12px;
}
.search-row { display: flex; gap: 8px; align-items: center; }
.search-row input { flex: 1; min-width: 0; font-size: 1.05rem; }
.search-results, .tool-index { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.search-results { max-height: min(60vh, 520px); overflow-y: auto; }
.search-results a, .tool-index a {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); text-decoration: none; background: var(--bg);
}
.search-results a:hover, .search-results a:focus-visible, .tool-index a:hover, .tool-index a:focus-visible { border-color: var(--primary); }
.search-results .card-icon, .tool-index .card-icon { flex: none; }
.ti-name { display: block; font-weight: 700; }
.ti-desc { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 2px; }
.search-empty { text-align: center; padding: 12px 0 4px; }
.search-empty p { margin: 0 0 8px; color: var(--muted); }
.tool-index-cat h2 { font-size: 1.15rem; margin: 22px 0 4px; }
.request-box { margin: 28px 0 8px; padding: 18px; border: 1px dashed var(--primary); border-radius: var(--radius); text-align: center; background: var(--primary-soft); }
.request-box p { margin: 0 0 10px; }
.request-box .small { font-size: 0.85rem; margin: 10px 0 0; }
