:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --ink: #0e1116;
  --ink-2: #5b6270;
  --ink-3: #8a909c;
  --line: #e5e7eb;
  --line-2: #d4d8de;
  --accent: #3046ff;
  --accent-hover: #2236e0;
  --accent-ink: #ffffff;
  --accent-soft: #eef0ff;
  --ok: #0a7a4f;
  --ok-soft: #e7f6ef;
  --warn: #9a5b00;
  --warn-soft: #fdf3e2;
  --danger: #c4320a;
  --danger-soft: #fdece7;
  --focus: #3046ff;
  --shadow: 0 1px 2px rgba(14, 17, 22, .04), 0 8px 24px -12px rgba(14, 17, 22, .12);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12;
    --surface: #12151c;
    --surface-2: #181c25;
    --ink: #e8eaf0;
    --ink-2: #a0a7b4;
    --ink-3: #6f7686;
    --line: #232733;
    --line-2: #2f3442;
    --accent: #7c8bff;
    --accent-hover: #98a4ff;
    --accent-ink: #0b0d12;
    --accent-soft: #1b2040;
    --ok: #4fd39a;
    --ok-soft: #10261d;
    --warn: #f0b45a;
    --warn-soft: #2a2010;
    --danger: #ff8a6b;
    --danger-soft: #2c1612;
    --focus: #98a4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.05rem; letter-spacing: -.01em; }
h3 { font-size: .95rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- üst çubuk */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  padding: 0 28px; height: 60px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink); color: var(--bg); font: 600 10.5px/1 var(--mono); letter-spacing: -.02em;
}
.brand-name { font-weight: 600; letter-spacing: -.01em; }
.nav { display: flex; gap: 2px; flex: 1; height: 100%; }
.nav a {
  display: flex; align-items: center; height: 100%; padding: 0 12px;
  color: var(--ink-2); font-weight: 500; font-size: 14px; position: relative;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--accent);
}
.who { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.who-name { color: var(--ink); font-weight: 500; }
.who form { margin: 0; }
.linklike { background: none; border: 0; color: var(--ink-2); font: inherit; cursor: pointer; padding: 0; }
.linklike:hover { color: var(--ink); }
.subnav { display: flex; gap: 6px; padding: 14px 28px 0; max-width: 1240px; margin: 0 auto; }
.subnav a {
  padding: 6px 12px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; border-radius: 999px;
  border: 1px solid transparent;
}
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a[aria-current="page"] { color: var(--ink); background: var(--surface); border-color: var(--line); }

.page { max-width: 1240px; margin: 0 auto; padding: 40px 28px 72px; }

/* ---------- formlar */
label { display: block; font-weight: 500; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=search], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background-color: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-s);
  padding: 9px 12px; transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238a909c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center; background-size: 12px; background-repeat: no-repeat;
}
input[type=text], input[type=password], input[type=search], input[type=date], select { height: 40px; padding-top: 0; padding-bottom: 0; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 500 14px/1 var(--sans); height: 40px; padding: 0 16px; border-radius: var(--r-s);
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer;
  transition: background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { border-color: var(--ink-3); }
.btn.small { height: 30px; padding: 0 11px; font-size: 13px; }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--line-2); }
.btn.danger:hover { border-color: var(--danger); }
.field { margin-bottom: 16px; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
kbd {
  font: 500 11.5px/1 var(--mono); padding: 3px 6px; border-radius: 5px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink-2);
}

.alert { padding: 11px 14px; border-radius: var(--r-s); margin-bottom: 18px; font-size: 14px; border: 1px solid; }
.alert.error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); }
.alert.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.alert.info { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--warn); }

/* ---------- giriş */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.login-side {
  position: relative; overflow: hidden;
  background-color: #0b0d12; color: #e8eaf0; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.login-side::before {
  content: ""; position: absolute; width: 640px; height: 640px; right: -240px; top: -200px;
  background: radial-gradient(closest-side, rgba(48, 70, 255, .38), transparent);
  pointer-events: none;
}
.login-side > * { position: relative; }
.login-side .brand-mark { background: #e8eaf0; color: #0b0d12; }
.login-side h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 600;
  color: #fff; max-width: 13ch; margin: 56px 0 22px;
}
.login-side p { max-width: 44ch; color: #a0a7b4; font-size: 16px; line-height: 1.6; }
.code-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.code-strip .code { background: rgba(255, 255, 255, .04); color: #c9cdd6; border-color: rgba(255, 255, 255, .12); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.login-form form { width: 100%; max-width: 340px; }
.login-form h2 { font-size: 1.5rem; letter-spacing: -.03em; margin-bottom: 26px; }
.login-form .btn { height: 42px; width: 100%; }

/* ---------- referans kodu */
.code {
  display: inline-flex; align-items: center; font: 500 12px/1 var(--mono); letter-spacing: -.01em;
  color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 7px; white-space: nowrap;
}
a.code:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- soru sor */
.ask-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.ask-head h1 { font-size: 2.1rem; letter-spacing: -.035em; margin-bottom: 10px; }
.ask-head p { color: var(--ink-2); max-width: 60ch; margin-bottom: 26px; }
.ask-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.ask-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.ask-form textarea {
  display: block; border: 0; background: transparent; min-height: 120px; padding: 20px 22px 8px;
  font-size: 17px; line-height: 1.55; resize: none;
}
.ask-form textarea:focus { box-shadow: none; }
.ask-form textarea::placeholder { color: var(--ink-3); }
.ask-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px 12px 14px; flex-wrap: wrap; }
.ask-row .scope { flex: 1; min-width: 200px; }
.ask-row .scope select, .ask-row .model select { height: 40px; border-color: var(--line); background-color: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.ask-row .model { flex: 0 1 260px; min-width: 180px; }
.kbd-hint { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 4px; align-items: center; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.examples button {
  font: 13px var(--sans); background: transparent; border: 1px solid var(--line-2); color: var(--ink-2);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: color .15s, border-color .15s;
}
.examples button:hover { border-color: var(--accent); color: var(--accent); }

.answer { margin-top: 36px; }
.answer-q { font-weight: 600; font-size: 17px; letter-spacing: -.01em; margin-bottom: 14px; }
.answer-body {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 26px 30px; font-size: 16px; line-height: 1.7;
}
.answer-body > :first-child { margin-top: 0; }
.answer-body > :last-child { margin-bottom: 0; }
.answer-body p, .answer-body li { max-width: 74ch; }
.answer-body li + li { margin-top: 4px; }
.answer-body h1, .answer-body h2, .answer-body h3 { margin-top: 1.4em; }
.answer-body h1 { font-size: 1.3rem; }
.answer-body h2 { font-size: 1.12rem; }
.answer-body h3 { font-size: 1rem; }
.answer-body strong { font-weight: 600; }
.answer-body table { border-collapse: collapse; margin: 1.2em 0; font-size: 14px; display: block; overflow-x: auto; }
.answer-body th, .answer-body td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.answer-body th { font-weight: 600; color: var(--ink-2); border-bottom-color: var(--line-2); }
.answer-body code { font: .88em var(--mono); background: var(--surface-2); padding: 2px 5px; border-radius: 4px; }
.answer-body blockquote { margin: 1em 0; padding-left: 14px; border-left: 2px solid var(--accent); color: var(--ink-2); }

.thinking { display: flex; gap: 14px; align-items: center; color: var(--ink-2); padding: 18px 2px; font-size: 14px; }
.thinking .bar { width: 96px; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; position: relative; flex: none; }
.thinking .bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); animation: slide 1.1s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .thinking .bar::after { animation: none; width: 100%; opacity: .5; } }

/* kullanım dökümü */
.receipt {
  margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline;
  padding: 10px 2px; font-size: 13px; color: var(--ink-3);
}
.receipt b { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 500; }
.receipt .total { margin-left: auto; color: var(--ink-2); }
.receipt .total b { color: var(--ink); font-weight: 600; }
.sources { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 13px; color: var(--ink-3); }

/* yan sütun */
.side { padding-top: 6px; }
.side h2 { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-bottom: 10px; }
.history { list-style: none; margin: 0; padding: 0; }
.history li + li { border-top: 1px solid var(--line); }
.history a { display: block; padding: 12px 0; color: var(--ink); }
.history a:hover { text-decoration: none; }
.history a:hover .hq { color: var(--accent); }
.hq { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.45; }
.hmeta { font-size: 12px; color: var(--ink-3); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---------- tablolar */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data .num { text-align: right; }
table.data th { font-weight: 500; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
.qcell { max-width: 480px; }
.qcell a { color: var(--ink); }
.qcell a:hover { color: var(--accent); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap;
  padding: 3px 8px 3px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); }
.badge.error { color: var(--danger); }
.badge.refusal { color: var(--warn); }
.badge.pending { color: var(--accent); }
.badge.admin { color: var(--accent); }
.badge.passive { color: var(--ink-3); }

/* ---------- yönetim özeti */
.ledger {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin: 8px 0 40px;
}
.ledger div { padding: 18px 20px; border-right: 1px solid var(--line); }
.ledger div:last-child { border-right: 0; }
.ledger dt { font-size: 12.5px; color: var(--ink-3); }
.ledger dd { margin: 6px 0 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ledger .cost dd { color: var(--accent); }
.section { margin-bottom: 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head > a { font-size: 14px; }

.bars {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 140px;
  padding: 18px 18px 0; background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--r-m) var(--r-m) 0 0;
}
.bars .b { flex: 1; min-width: 4px; max-width: 30px; background: var(--accent); border-radius: 3px 3px 0 0; }
.bars .b:hover { background: var(--accent-hover); }
.bars .b.zero { background: var(--line); }
.bars-axis {
  display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); padding: 8px 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0 0 var(--r-m) var(--r-m); font-variant-numeric: tabular-nums;
}

.filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.filters.filters-short { grid-template-columns: 2fr 1fr auto; max-width: 820px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 16px; font-size: 14px; color: var(--ink-2); }

/* ---------- soru detayı */
.back { display: inline-block; font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.facts { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts div:first-child { padding-top: 0; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.question-text { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; white-space: pre-wrap; margin-bottom: 22px; }
.qid { font: 500 13px var(--mono); color: var(--ink-3); margin-bottom: 8px; }

/* ---------- standartlar */
.std-search { max-width: 420px; margin-bottom: 20px; }
.doc-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--ink-3); font-size: 13.5px; margin-bottom: 20px; }
.doc-text {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 30px 34px;
  font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 96ch; color: var(--ink);
}

.user-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.user-actions form { margin: 0; display: flex; gap: 6px; }
.user-actions input[type=password] { width: 150px; height: 30px; padding: 4px 9px; font-size: 13px; }
.create-user {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; margin-bottom: 30px;
}
.create-user .field { margin: 0; }

@media (max-width: 960px) {
  .ask-layout, .detail-grid { grid-template-columns: 1fr; gap: 36px; }
  .filters, .filters.filters-short { grid-template-columns: 1fr 1fr; }
  .create-user { grid-template-columns: 1fr 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { padding: 32px 24px; }
  .login-side h1 { margin-top: 32px; }
}
@media (max-width: 640px) {
  .topbar { height: auto; flex-wrap: wrap; gap: 0 16px; padding: 10px 16px 0; }
  .brand-name { display: none; }
  .who { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; height: 44px; overflow-x: auto; margin: 0 -4px; }
  .nav a { padding: 0 10px; white-space: nowrap; }
  .subnav { padding: 12px 16px 0; overflow-x: auto; }
  .page { padding: 26px 16px 56px; }
  .ask-head h1 { font-size: 1.7rem; }
  .kbd-hint { display: none; }
  .answer-body { padding: 20px 18px; }
  .receipt .total { margin-left: 0; }
  .filters, .filters.filters-short, .create-user { grid-template-columns: 1fr; }
  .doc-text { padding: 20px 18px; }
}

/* indeksleme ilerleme çubuğu */
.progress { margin-top: 10px; max-width: 520px; }
.progress-track { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .6s ease; }
.progress-text { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.progress-text b { color: var(--ink); font-variant-numeric: tabular-nums; }
.alert .progress-text { color: inherit; }
.alert .progress-text b { color: inherit; }

/* ---------- açılır listeler (select)
   Kapalı kontrol her tarayıcıda özelleştirilir. Açık liste, "customizable select" destekleyen
   tarayıcılarda (Chromium 135+) uygulamanın temasıyla çizilir; diğerlerinde sistem listesi kalır. */
select { cursor: pointer; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
select:hover { border-color: var(--ink-3); }
select:disabled { opacity: .55; cursor: not-allowed; }

@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select {
    display: flex; align-items: center; gap: 8px;
    background-image: none; padding-right: 12px;
  }
  select::picker-icon {
    content: ""; flex: none; width: 12px; height: 12px; margin-left: auto;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238a909c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
    transition: rotate .15s ease;
  }
  select:open::picker-icon { rotate: 180deg; }
  select:open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  /* Kapalı kontrolün içeriği: <button><selectedcontent> ile seçili metin kırpılabilir (ellipsis) */
  select > button { all: unset; display: block; flex: 1 1 auto; min-width: 0; }
  select selectedcontent { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  ::picker(select) {
    margin: 6px 0 0; padding: 6px;
    min-width: anchor-size(width); width: max-content; max-width: min(720px, calc(100vw - 32px));
    max-height: min(440px, 60vh); overflow: auto; overscroll-behavior: contain;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-2); border-radius: var(--r-m);
    box-shadow: 0 12px 32px -8px rgba(14, 17, 22, .28), 0 1px 2px rgba(14, 17, 22, .06);
    scrollbar-width: thin;
    opacity: 0; translate: 0 -4px; transition: opacity .12s ease, translate .12s ease, display .12s allow-discrete, overlay .12s allow-discrete;
  }
  ::picker(select):popover-open { opacity: 1; translate: 0 0; }
  @starting-style { ::picker(select):popover-open { opacity: 0; translate: 0 -4px; } }

  option {
    position: relative; display: block;
    padding: 8px 12px 8px 30px; border-radius: var(--r-s);
    font-size: 14px; line-height: 1.35; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default;
  }
  option:hover, option:focus-visible { background: var(--surface-2); outline: none; }
  option:checked { color: var(--accent); font-weight: 500; }
  option:checked:hover, option:checked:focus-visible { background: var(--accent-soft); }
  option:disabled { color: var(--ink-3); opacity: .6; cursor: not-allowed; }
  option:disabled:hover { background: transparent; }
  option::checkmark {
    content: "✓"; position: absolute; left: 11px; top: 50%; translate: 0 -50%;
    font-size: 12px; color: var(--accent);
  }
  option:not(:checked)::checkmark { visibility: hidden; }
  optgroup { padding: 0; }
  optgroup > legend, optgroup > label {
    display: block; padding: 10px 12px 4px; font-size: 11px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
  }
}
