/* hesap-content base styles. Layout is shared; brand themes override CSS variables in theme.css */

:root {
  --color-bg: #ffffff;
  --color-surface: #f7f8fb;
  --color-text: #1a1f2e;
  --color-text-muted: #5a6377;
  --color-border: #e3e7ef;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-soft: #eef2ff;
  --color-accent: #f59e0b;
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);
  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-base);
  --container-max: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* HTML hidden attribute must beat explicit display: rules below (.lang-panel-menu / .lang-option use display: flex) */
[hidden] { display: none !important; }
body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { text-align: right; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner {
  display: flex; align-items: center;
  padding: 14px 20px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--color-text); font-family: var(--font-display); flex-shrink: 0; }
.brand:hover { color: var(--color-primary); }
.brand-logo { height: 36px; width: auto; display: block; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }

.primary-nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.primary-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.primary-nav a:hover { background: var(--color-surface); color: var(--color-text); }
.primary-nav a.active { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.nav-icon { font-size: 16px; line-height: 1; }

.header-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Hamburger button — hidden on desktop, visible <768px */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  padding: 0;
  cursor: pointer;
  align-items: center; justify-content: center;
  margin-left: auto;
}
.nav-toggle:hover { background: var(--color-surface); border-color: var(--color-primary); }
.nav-toggle-icon { position: relative; display: inline-block; width: 18px; height: 14px; }
.nav-toggle-icon span {
  position: absolute; left: 0; right: 0; height: 2px; background: var(--color-text); border-radius: 1px;
  transition: transform .2s ease, opacity .15s ease;
}
.nav-toggle-icon span:nth-child(1) { top: 0; }
.nav-toggle-icon span:nth-child(2) { top: 6px; }
.nav-toggle-icon span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile layout: hamburger swaps in for inline calc nav.
   Primary-nav is anchored to .site-header (full viewport width) so the drop-down
   isn't constrained to the .container's inner padding. */
.site-header { position: relative; }
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; order: 2; margin-left: 0; }
  .header-tools { order: 3; }
  .brand { order: 1; margin-right: auto; }
  .primary-nav {
    order: 4;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 20px;
    gap: 2px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
  }
  .primary-nav a { padding: 12px 14px; font-size: 15px; }
  .primary-nav:not(.is-open) { display: none; }
  .brand-name { font-size: 16px; }
}
/* Language panel — dropdown listing all 53 languages by native name */
.lang-panel { position: relative; margin-left: 8px; }
.lang-panel-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}
.lang-panel-toggle:hover { background: var(--color-surface); border-color: var(--color-primary); }
.lang-current { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-arrow { font-size: 10px; opacity: .6; }

.lang-panel-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(380px, 92vw);
  max-height: 70vh;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
[dir="rtl"] .lang-panel-menu { right: auto; left: 0; }
.lang-search-wrap { padding: 8px; border-bottom: 1px solid var(--color-border); }
.lang-search {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--color-surface);
}
.lang-search:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.lang-panel-list {
  overflow-y: auto;
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.lang-empty { padding: 24px 16px; text-align: center; color: var(--color-text-muted); font-size: 13px; margin: 0; }
.lang-option {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.25;
}
.lang-option:hover, .lang-option:focus-visible { background: var(--color-surface); color: var(--color-text); outline: none; }
.lang-option.is-current { background: var(--color-primary-soft); color: var(--color-primary-dark); font-weight: 600; }
.lang-native { font-weight: 600; }
.lang-english { font-size: 11px; color: var(--color-text-muted); }
.lang-option.is-current .lang-english { color: var(--color-primary-dark); opacity: .75; }

/* Calculator search — dropdown to find any calculator by name as you type */
.calc-search { position: relative; }
.calc-search-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
}
.calc-search-toggle:hover { background: var(--color-surface); border-color: var(--color-primary); color: var(--color-text); }
.calc-search-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(360px, 92vw);
  max-height: 70vh;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
[dir="rtl"] .calc-search-menu { right: auto; left: 0; }
.calc-search-wrap { padding: 8px; border-bottom: 1px solid var(--color-border); }
.calc-search-input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--color-surface);
}
.calc-search-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.calc-search-list { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.calc-empty { padding: 24px 16px; text-align: center; color: var(--color-text-muted); font-size: 13px; margin: 0; }
.calc-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.25;
}
.calc-option:hover, .calc-option:focus-visible { background: var(--color-surface); outline: none; }
.calc-option.is-current { background: var(--color-primary-soft); color: var(--color-primary-dark); font-weight: 600; }
.calc-option-icon { font-size: 18px; width: 1.5em; text-align: center; flex-shrink: 0; }
.calc-option-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 768px) { .calc-search-label { display: none; } }
/* On mobile the toggles sit mid-header, so a toggle-anchored dropdown overflows
   the viewport. Pin both dropdown menus to the viewport so they always fit. */
@media (max-width: 768px) {
  .calc-search-menu,
  .lang-panel-menu {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 80px);
  }
  [dir="rtl"] .calc-search-menu,
  [dir="rtl"] .lang-panel-menu { left: 12px; right: 12px; }
}

/* Footer language directory — full-width horizontal region boxes that wrap as needed */
.lang-directory {
  border-top: 1px solid var(--color-border);
  margin-top: 24px;
  padding: 24px 0 8px;
  font-size: 13px;
}
.lang-directory .container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.lang-region {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px 16px;
}
.lang-region-title {
  margin: 0 0 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  font-weight: 700;
}
.lang-region-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-content: flex-start;
}
.lang-strip-link {
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
}
.lang-strip-link:hover { color: var(--color-primary); background: var(--color-bg); }
.lang-strip-link.is-current { color: var(--color-primary); font-weight: 600; background: var(--color-bg); }

/* Main */
.site-main { padding: 40px 0 64px; min-height: 60vh; }

/* Hero */
.hero {
  text-align: center;
  padding: 56px 16px 24px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-surface); color: var(--color-text); }

/* Calc grid */
.calc-grid-section { margin-top: 32px; }
.calc-grid-section.other-calcs {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.calc-grid-section.other-calcs h2 {
  font-size: 22px;
  text-align: left;
  color: var(--color-text-muted);
}
.calc-grid-section h2 {
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 28px;
  letter-spacing: -.015em;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.calc-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  color: var(--color-text);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  display: block;
}
.calc-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
}
.calc-card-icon { font-size: 40px; margin-bottom: 10px; }
.calc-card-title { font-family: var(--font-display); margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.calc-card-desc { color: var(--color-text-muted); margin: 0; font-size: 14px; }

/* Breadcrumbs */
.breadcrumbs { font-size: 13px; color: var(--color-text-muted); margin-bottom: 12px; }
.breadcrumbs .sep { margin: 0 8px; opacity: .5; }
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }

/* Calculator page */
.calc-page { margin-top: 16px; }
.calc-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.calc-icon-lg {
  font-size: 48px;
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft);
  border-radius: var(--radius-lg);
}
.calc-header h1 { margin: 0 0 4px; font-family: var(--font-display); font-size: 30px; letter-spacing: -.015em; }
.calc-desc { color: var(--color-text-muted); margin: 0; }
.calc-shell {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 800px) {
  .calc-shell { grid-template-columns: 1fr; gap: 20px; }
}

/* Form */
.calc-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.calc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--color-text-muted); font-weight: 500; }
.calc-form input, .calc-form select {
  font: inherit;
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.calc-form input:focus, .calc-form select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.time-inputs { display: flex; gap: 8px; }
.time-inputs input { flex: 1; min-width: 0; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.form-actions .btn { flex: 1; }
.note { font-size: 12px; color: var(--color-text-muted); margin: 4px 0 0; }

/* Result */
.calc-result { min-width: 0; }
.result-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px;
}
.calc-result h2 { font-family: var(--font-display); font-size: 22px; margin: 0; letter-spacing: -.01em; }
.btn-share {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
}
.btn-share:hover { background: var(--color-surface); color: var(--color-primary); border-color: var(--color-primary); }
.btn-share.is-copied { background: var(--color-primary-soft); color: var(--color-primary-dark); border-color: var(--color-primary); }
.btn-share .share-label { white-space: nowrap; }
.result-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.result-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.result-card label { display: block; font-size: 12px; color: var(--color-text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.result-card strong { display: block; font-size: 20px; font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.result-card.primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.result-card.primary label { color: rgba(255,255,255,.85); }
.result-card.primary strong { color: #fff; }
.result-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--color-text-muted); font-weight: 500; }
.result-card.primary .result-sub { color: rgba(255,255,255,.75); }

/* Code / text tool output: preserve newlines + spaces, monospace, copyable.
   Used by JSON formatter, encoders/decoders, pretty-printers and text tools
   (any result-card <strong class="tool-output">). The .btn-copy is injected by
   common.js (enhanceToolOutputs) for each such card. */
.result-card .tool-output {
  display: block;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace);
  font-size: 13.5px; font-weight: 500; line-height: 1.5; letter-spacing: 0;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  margin-top: 6px; padding: 11px 12px; border-radius: var(--radius-sm);
  background: rgba(15,23,42,.05); border: 1px solid var(--color-border);
  max-height: 360px; overflow: auto;
}
.result-card.primary .tool-output { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; }
.result-card.has-copy { position: relative; }
.btn-copy {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; line-height: 1;
  color: var(--color-text-muted); opacity: .8;
}
.btn-copy:hover { opacity: 1; color: var(--color-primary); border-color: var(--color-primary); }
.btn-copy.is-copied { opacity: 1; color: var(--color-primary-dark); border-color: var(--color-primary); background: var(--color-primary-soft); }
.result-card.primary .btn-copy { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff; }

/* Table */
.schedule-title { font-family: var(--font-display); font-size: 17px; margin: 0 0 10px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.schedule-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
.schedule-table th, .schedule-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--color-border); }
.schedule-table th { background: var(--color-surface); font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: .03em; }
.schedule-table th:first-child, .schedule-table td:first-child { text-align: left; }
.schedule-table tr:last-child td { border-bottom: none; }
[dir="rtl"] .schedule-table th, [dir="rtl"] .schedule-table td { text-align: left; }
[dir="rtl"] .schedule-table th:first-child, [dir="rtl"] .schedule-table td:first-child { text-align: right; }

/* 404 not-found */
.not-found { text-align: center; padding: 48px 16px 24px; }
.not-found-code {
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 160px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 8px;
}
.not-found-slug { color: var(--color-text-muted); font-size: 14px; margin: 0 0 32px; }
.not-found-slug code {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.not-found-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 0 auto 32px;
}
.not-found-suggestions .calc-card { padding: 18px 18px; }
.not-found-suggestions .calc-card-icon { font-size: 32px; margin-bottom: 6px; }
.not-found-suggestions .calc-card-title { font-size: 16px; margin: 0; }

/* Legal pages */
.legal-page { max-width: 760px; margin: 0 auto; padding: 8px 0 40px; }
.legal-page h1 { font-family: var(--font-display); font-size: 32px; letter-spacing: -.015em; margin: 0 0 24px; }
.legal-body h2 { font-family: var(--font-display); font-size: 20px; margin: 28px 0 10px; letter-spacing: -.01em; }
.legal-body p, .legal-body ul { font-size: 15px; line-height: 1.7; color: var(--color-text); }
.legal-body ul { padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--color-primary); text-decoration: underline; }
.legal-body a:hover { color: var(--color-primary-dark); }

/* Footer */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); margin-top: 60px; padding: 32px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; }
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-brand strong { font-family: var(--font-display); font-size: 16px; }
.footer-brand span { color: var(--color-text-muted); font-size: 13px; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--color-text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--color-primary); }
.footer-copy { color: var(--color-text-muted); font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-links { justify-content: center; }
}

/* Calculator browse/search list (shown on calculator sub-pages; distinct from the
   header .calc-search dropdown — different class prefix to avoid style collision) */
.other-calcs .calc-browse-heading { margin-top: 36px; }
.calc-browse-wrap { margin: 0 0 14px; }
.calc-browse-input {
  width: 100%; box-sizing: border-box; padding: 12px 16px; font-size: 16px;
  font-family: var(--font-base); color: var(--color-text); background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.calc-browse-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.calc-browse-list {
  list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px;
}
.csr { margin: 0; }
.csr[hidden] { display: none; }
.csr > a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius-sm); color: var(--color-text); font-size: 14px; line-height: 1.25;
}
.csr > a:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.csr-ic { font-size: 18px; flex-shrink: 0; }
.csr-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-browse-empty { color: var(--color-text-muted); padding: 14px 4px; margin: 8px 0 0; text-align: center; }
