@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --surface: #fff;
  --canvas: #fdfdfc;
  --ink: #494441;
  --muted: #696460;
  --line: #e9e8e4;
  --accent: #ba492a;
  --accent-hover: #9f3b23;
  --soft: #fff4ef;
  --subtle: #f2f2f0;
  --rail: #f6f6f4;
  --rail-muted: #625f5c;
  --control-line: #deddd9;
  --selection-line: #d7aaa0;
  --hover-line: #cbc8c3;
  --focus: var(--accent);
  --error-text: #922e33;
  --panel-shadow: 0 1px 2px #6b665f0a, 0 4px 14px #6b665f05;
  --radius: 12px;
  --brand-ink: #4936bc;
  font-family: "Inter", "PingFang SC", "Microsoft Yahei", system-ui, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea, select { accent-color: var(--accent); }
input, textarea { caret-color: var(--accent); }
option { color: var(--ink); background: var(--surface); }
::selection { color: var(--ink); background: #f8dfcb; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
svg { width: 20px; height: 20px; display: block; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--rail); color: var(--ink); border-right: 1px solid var(--line); padding: 19px 13px 17px; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; }
.brand { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; padding: 4px 9px; color: inherit; font-size: 1rem; text-decoration: none; }
.brand img { display: block; flex: none; }
.brand-text { font-family: "Geist", system-ui, sans-serif; font-weight: 680; line-height: 1.15; letter-spacing: -.035em; white-space: nowrap; }
.brand-suffix { color: var(--brand-ink); }
.rail-search { display: flex; align-items: center; gap: 7px; flex: none; width: 100%; min-height: 38px; margin-top: 18px; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--surface); color: var(--rail-muted); text-align: left; font-size: 13px; }
.rail-search:hover { border-color: var(--hover-line); color: var(--ink); }
.rail-search:focus-visible { outline-offset: -2px; }
.rail-search > span { flex: 1; min-width: 0; }
.rail-search svg, .workbench-search svg { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.rail-search svg { width: 17px; height: 17px; }
.rail-search kbd, .workbench-search kbd { display: inline-block; padding: 1px 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--subtle); color: var(--muted); font-size: 11px; line-height: 1.4; white-space: nowrap; }
.rail-nav { display: grid; gap: 4px; margin-top: 13px; }
.rail-nav-group { display: grid; gap: 4px; margin-block: 9px 5px; }
.rail-nav-group > span { padding: 0 10px 2px; color: var(--rail-muted); font-size: 12px; font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 7px; text-decoration: none; color: var(--rail-muted); font-size: 14px; font-weight: 550; white-space: nowrap; }
.nav-link svg { fill: none; stroke: currentColor; stroke-width: 1.65; width: 18px; height: 18px; }
.nav-link:hover { background: var(--subtle); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--accent-hover); }
.nav-link[aria-current="page"] svg { color: var(--accent); }
.rail-body { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.rail-mobile, .rail-drawer-top, .rail-backdrop { display: none; }
.rail-menu-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--control-line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.rail-menu-button:hover { border-color: var(--hover-line); background: var(--subtle); }
.rail-menu-button svg { width: 19px; height: 19px; }
.rail-footer { display: grid; gap: 10px; margin-top: auto; padding-top: 20px; }
.environment { padding: 0 7px 2px; display: flex; align-items: flex-start; gap: 8px; }
.environment strong, .environment span:not(.environment-dot) { display: block; }
.environment strong { font-weight: 600; color: var(--ink); font-size: 14px; }
.environment span:not(.environment-dot) { margin-top: 4px; color: var(--rail-muted); font-size: 12px; }
.environment-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 8px; background: #9d9993; flex: none; }
.environment-dot.connected { background: var(--accent); }

body:has(.workbench-search[open]) { overflow: hidden; }
.workbench-search { width: min(580px, calc(100% - 32px)); max-width: none; max-height: none; padding: 0; overflow: hidden; border: 1px solid var(--control-line); border-radius: 15px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 64px #30282430; }
.workbench-search::backdrop { background: #372f2b51; }
.workbench-search-content { display: flex; flex-direction: column; max-height: min(625px, calc(100dvh - 32px)); }
.workbench-search-header { display: flex; align-items: center; gap: 12px; padding: 10px 13px 10px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.workbench-search-header input { width: 100%; min-width: 0; min-height: 37px; padding: 4px 0; border: 0; border-radius: 3px; background: transparent; color: var(--ink); font-size: 16px; }
.workbench-search-header input::placeholder { color: var(--muted); opacity: 1; }
.workbench-search-header input:focus { outline: 0; }
.workbench-search-close { display: grid; place-items: center; width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 7px; background: var(--subtle); color: var(--muted); }
.workbench-search-close:hover { color: var(--ink); }
.workbench-search-close svg { width: 17px; height: 17px; }
.workbench-search-results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 9px; }
.workbench-search-group { margin: 4px 0 9px; }
.workbench-search-group-label { padding: 7px 8px 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.workbench-search-option { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 4px 7px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.workbench-search-option:hover { background: var(--subtle); }
.workbench-search-option[aria-selected="true"] { border-color: var(--selection-line); background: var(--soft); }
.workbench-search-icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 6px; background: var(--subtle); color: var(--muted); }
.workbench-search-icon .platform-icon { width: 28px; height: 28px; border-radius: 6px; }
.workbench-search-icon svg, .workbench-search-icon .platform-icon svg { width: 16px; height: 16px; }
.workbench-search-option-text { display: flex; align-items: baseline; gap: 9px; flex: 1; min-width: 0; }
.workbench-search-option strong { flex: none; font-size: 14px; font-weight: 650; }
.workbench-search-option small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workbench-search-detail { flex: none; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workbench-search-empty { padding: 25px 18px 29px; color: var(--muted); font-size: 14px; text-align: center; }
.workbench-search-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 12px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.workbench-search-footer > div { display: flex; gap: 12px; }
.rail-credits { display: grid; gap: 8px; padding: 10px; }
.rail-credits-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.rail-credits-heading h2 { color: var(--muted); font-size: 13px; font-weight: 600; }
.rail-credits-heading > span { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rail-credits p { color: var(--muted); font-size: 12px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.rail-credits progress { width: 100%; height: 5px; display: block; overflow: hidden; border: 0; border-radius: 100px; background: var(--subtle); }
.rail-credits progress::-webkit-progress-bar { background: var(--subtle); border-radius: 100px; }
.rail-credits progress::-webkit-progress-value { background: var(--accent); border-radius: 100px; }
.rail-credits progress::-moz-progress-bar { background: var(--accent); border-radius: 100px; }
.rail-footer .rail-footer-button { min-height: 34px; padding: 5px 7px; font-size: 13px; }
.rail-account { display: grid; gap: 3px; }
.rail-account-link { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 6px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 13px; }
.rail-account-link:hover { background: var(--subtle); }
.rail-account-link > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-account .rail-footer-button { justify-content: flex-start; border-color: transparent; background: transparent; color: var(--muted); }
.rail-account .rail-footer-button:hover:not(:disabled) { border-color: transparent; color: var(--ink); }
.rail-account .rail-account-error { margin: 0 6px; font-size: 12px; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 57px; padding: 7px clamp(20px, 3.5vw, 46px); border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-title { font-size: 14px; font-weight: 650; color: var(--muted); }
.mode-control { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--subtle); }
.mode-control button { color: var(--muted); border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 5px 13px; min-height: 33px; font-size: 14px; font-weight: 650; }
.mode-control button { position: relative; isolation: isolate; }
.mode-control button > span:not(.mode-active-tab) { position: relative; }
.mode-control button[aria-pressed="true"] { color: var(--accent-hover); }
.mode-active-tab { position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: var(--surface); border: 1px solid var(--control-line); box-shadow: var(--panel-shadow); }
.mode-control button:disabled { color: var(--muted); }

.content { max-width: 1450px; margin: 0 auto; padding: 33px clamp(20px, 3.5vw, 46px) 56px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(27px, 3.1vw, 35px); line-height: 1.23; letter-spacing: -.041em; font-weight: 750; }
.page-heading p { margin-top: 6px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.platform { display: flex; align-items: center; justify-content: flex-start; gap: 12px; text-align: left; min-width: 0; min-height: 66px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); transition: background .16s, border-color .16s; }
.platform:hover { border-color: var(--hover-line); }
.platform[aria-selected="true"] { background: var(--soft); border-color: var(--selection-line); }
.platform-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; flex: none; }
.platform-icon svg { width: 23px; height: 23px; }
.rednote-icon { background: var(--soft); color: var(--accent-hover); font-size: 10px; font-weight: 750; letter-spacing: -.08em; }
.douyin-icon { background: var(--soft); color: var(--accent-hover); }
.channels-icon { background: var(--soft); color: var(--accent-hover); }
.platform strong, .platform small { display: block; }
.platform strong { font-size: 15px; font-weight: 680; }
.platform small { font-size: 12px; margin-top: 3px; color: var(--muted); line-height: 1.35; }

.console-grid { display: grid; grid-template-columns: minmax(286px, .72fr) minmax(0, 1.6fr); gap: 15px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; box-shadow: var(--panel-shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 19px 14px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .guide-panel h2 { font-size: 18px; line-height: 1.36; font-weight: 700; letter-spacing: -.025em; }
.panel-heading p { margin-top: 4px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.task-form { padding: 16px 19px 19px; }
.task-fields { min-width: 0; display: grid; gap: 15px; margin: 0; border: 0; padding: 0; }
.field { display: grid; min-width: 0; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 620; }
.field input, .field select, .field textarea { appearance: none; min-width: 0; max-width: 100%; width: 100%; min-height: 41px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--control-line); border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 480; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field textarea { resize: vertical; min-height: 72px; }
.field select { padding-right: 29px; background: linear-gradient(45deg,transparent 50%,var(--muted) 50%) calc(100% - 14px) 50% / 5px 5px no-repeat, linear-gradient(135deg,var(--muted) 50%,transparent 50%) calc(100% - 9px) 50% / 5px 5px no-repeat, var(--surface); }
.field input[type="date"] { color-scheme: light; padding-inline: 8px; }
.field input[type="date"]::-webkit-calendar-picker-indicator { margin: 0; }
.field input[type="date"]::-webkit-calendar-picker-indicator,
.field input[type="number"]::-webkit-inner-spin-button,
.result-filter input::-webkit-search-cancel-button {
  filter: invert(39%) sepia(25%) saturate(724%) hue-rotate(335deg) brightness(91%);
}
.fields-pair { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
.field-hint { font-weight: 470; font-size: 12px; color: var(--muted); line-height: 1.35; }
.mode-note { margin-top: 15px; border-radius: 8px; padding: 9px 10px; background: var(--subtle); color: var(--muted); font-size: 13px; line-height: 1.45; }
.mode-note.live { background: var(--soft); color: var(--accent-hover); }
.mode-note.unavailable { background: var(--subtle); color: var(--muted); }
.form-error { margin-top: 12px; color: var(--error-text); font-size: 14px; line-height: 1.5; }
.form-actions { margin-top: 17px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 13px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { background: var(--accent); color: white; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button.secondary { border-color: var(--control-line); color: var(--ink); background: var(--surface); }
.button.secondary:hover:not(:disabled) { border-color: var(--hover-line, #d5a38d); background: var(--subtle, #fff6ed); }
.button.ghost { background: transparent; color: var(--accent); }
.button.ghost:hover:not(:disabled) { background: var(--soft); }
.button:disabled { opacity: .55; }
.form-actions .primary { flex: 1 1 115px; }

.result-panel { min-height: 412px; overflow: hidden; display: flex; flex-direction: column; }
.result-heading { align-items: center; }
.result-heading p { color: var(--muted); }
.result-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 19px; min-height: 51px; }
.result-tools > span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.result-filter { display: flex; align-items: center; gap: 8px; max-width: 210px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; color: var(--muted); min-width: 0; }
.result-filter svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.result-filter input { min-width: 0; width: 100%; border: none; background: transparent; min-height: 32px; color: var(--ink); font-size: 13px; }
.result-filter:focus-within { border-color: var(--selection-line); outline: 2px solid var(--focus); outline-offset: 2px; }
.result-filter .aceternity-field-control { width: 100%; min-width: 0; }
.result-filter input:focus-visible { outline: none; }
.result-body { flex: 1; min-width: 0; }
.empty-state { min-height: 290px; padding: 30px 20px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; }
.empty-state strong { font-weight: 680; }
.empty-state p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.empty-art { display: grid; width: 51px; height: 51px; align-content: center; gap: 4px; padding: 11px; border: 1px solid var(--line); background: var(--soft); border-radius: 13px; color: var(--accent); }
.empty-art i { display: block; height: 2px; border-radius: 5px; background: #cf8e69; }
.empty-art i:first-child { width: 85%; }
.empty-art i:nth-child(2) { width: 70%; }
.empty-art i:last-child { width: 45%; }
.result-warnings { margin: 0; padding: 13px 22px 13px 41px; border-top: 1px solid var(--line); background: var(--rail); color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.result-warnings li + li { margin-top: 4px; }
.table-wrap { overflow: auto; max-height: 475px; width: 100%; }
.result-pager { display: flex; justify-content: flex-end; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding: 8px 14px; }
.result-pager span { color: var(--muted); font-size: 13px; }
.result-pager .button { min-height: 31px; padding: 4px 9px; font-size: 13px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { min-width: 88px; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.48; }
th:first-child, td:first-child { padding-left: 21px; }
th:last-child, td:last-child { padding-right: 21px; }
th { position: sticky; top: 0; background: var(--subtle, #f8eee5); color: var(--muted); font-weight: 650; white-space: nowrap; z-index: 1; }
td { max-width: 350px; overflow-wrap: anywhere; color: var(--ink); }
td a { text-underline-offset: 2px; }
td.data-text { min-width: 156px; white-space: pre-wrap; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-panel [data-column="title"] { min-width: 164px; }
.result-panel [data-column="snippet"], .result-panel [data-column="commentText"] { min-width: 185px; }
.result-panel [data-column="date"], .result-panel [data-column="publishedAt"],
.result-panel [data-column="commentPublishedAt"] { min-width: 116px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-panel [data-column="likes"], .result-panel [data-column="comments"],
.result-panel [data-column="commentCount"] { min-width: 62px; }
tbody tr:nth-child(even) { background: var(--canvas); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--subtle, #fff2e6); }
.result-panel td.empty-row { text-align: center; color: var(--muted); padding: 27px 13px; }
.history-panel { overflow: hidden; }
.history-empty-icon { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 12px; color: var(--accent); background: var(--soft); font-size: 28px; }
.history-panel .empty-state { min-height: 220px; }
.history-panel .empty-state .button { margin-top: 4px; }
.history-query { max-width: 300px; }
.mode-tag { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--soft); color: var(--accent); white-space: nowrap; font-size: 12px; font-weight: 650; }
.mode-tag.live { background: var(--soft); color: var(--accent-hover); }
.guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0, 1fr)); gap: 15px; }
.guide-panel { padding: 21px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.guide-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: var(--accent); background: var(--soft); font-weight: 700; }
.guide-panel p { color: var(--muted); line-height: 1.6; margin-bottom: 3px; }
.guide-panel .button { margin-top: auto; }

@media (max-width: 1070px) {
  .layout { grid-template-columns: 180px minmax(0, 1fr); }
  .rail { padding-inline: 13px; }
  .content { padding-inline: 22px; }
  .topbar { padding-inline: 22px; }
  .console-grid { grid-template-columns: minmax(268px, .8fr) minmax(0, 1.35fr); gap: 13px; }
  .panel-heading, .task-form { padding-inline: 15px; }
  .result-tools { padding-inline: 15px; }
  th:first-child,td:first-child { padding-left: 15px; }
}
@media (max-width: 865px) {
  .console-grid { grid-template-columns: minmax(0, 1fr); }
  .result-panel { min-height: 320px; }
  .result-panel .empty-state { min-height: 225px; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .layout { display: block; }
  .rail { position: static; height: auto; padding: 9px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-mobile { display: flex; align-items: center; justify-content: space-between; }
  .rail-desktop-brand { display: none; }
  .rail-drawer-top { display: flex; align-items: center; justify-content: space-between; }
  .rail-body { position: fixed; inset: 0 auto 0 0; width: min(82vw, 280px); z-index: 101; background: var(--rail); border-right: 1px solid var(--line); padding: 16px; overflow: auto; transform: translateX(-100%); }
  .rail-backdrop { display: block; position: fixed; inset: 0; z-index: 100; background: #726b5c42; }
  .brand { padding: 3px 5px; }
  .rail-nav { margin: 13px 0 0; }
  .workbench-search-option-text { display: grid; gap: 2px; }
  .topbar { min-height: 54px; padding: 6px 14px; }
  .content { padding: 23px 14px 44px; }
  .page-heading { margin-bottom: 16px; }
  .page-heading p { margin-top: 6px; font-size: 14px; }
  .platforms { gap: 5px; margin-bottom: 12px; }
  .platform { padding: 8px 6px; min-height: 64px; border-radius: 9px; gap: 5px; }
  .platform-icon { width: 23px; height: 23px; border-radius: 6px; }
  .platform-icon svg { width: 17px; height: 17px; }
  .rednote-icon { font-size: 8px; }
  .platform strong { font-size: 12px; }
  .platform small { font-size: 10px; }
  .panel-heading { padding-top: 17px; padding-bottom: 14px; }
  .panel-heading p { font-size: 13px; }
}
@media (max-width: 340px) {
  .platform strong { font-size: 11px; }
  .platform small { font-size: 9px; }
  .platform { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}

.aceternity-platforms .platform { position: relative; isolation: isolate; }
.aceternity-platforms .platform[aria-selected="true"] { background: var(--surface); }
.aceternity-platforms .platform-icon, .platform-label { position: relative; z-index: 1; }
.aceternity-active-tab { position: absolute; inset: 0; border-radius: inherit; background: var(--soft); pointer-events: none; }
.aceternity-run-button .loader, .aceternity-run-button .check { flex: none; }
.aceternity-run-button:disabled[aria-busy="true"] { opacity: .8; }

.aceternity-surface-spotlight { background: var(--soft); opacity: 0; transition: opacity .2s; }
.aceternity-surface:hover > .aceternity-surface-spotlight { opacity: .35; }
.aceternity-field-control { --aceternity-input-glow: #e3ac91; }
.aceternity-field-control .aceternity-input { display: block; }
.aceternity-action { --aceternity-action-glow: #e1a58a; }
.aceternity-action:disabled .aceternity-action-gradient { visibility: hidden; }

.topbar-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-chip { min-height: 36px; max-width: min(210px, 42vw); }
.account-chip .aceternity-action-content { min-width: 0; }
.account-chip .aceternity-action-content > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.account-avatar { display: grid; place-items: center; width: 21px; height: 21px; flex: none; border-radius: 50%; background: var(--soft); color: var(--accent); font-size: 11px; font-weight: 700; }
#run-budget { margin-top: 14px; }
.auth-loading { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }

.settings-view { max-width: 960px; }
.settings-view .page-heading { margin-bottom: 17px; }
.settings-tabs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; gap: 4px; padding: 3px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.settings-tab { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; min-height: 33px; padding: 5px 14px; border-radius: 6px; font-size: 14px; font-weight: 650; white-space: nowrap; color: var(--muted); text-decoration: none; }
.settings-tab[aria-selected="true"] { color: var(--accent-hover); }
.settings-tab[aria-selected="false"]:hover { color: var(--ink); background: var(--rail); }
.settings-tab-active { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--soft); }
.settings-content { display: grid; gap: 14px; }
.settings-webhooks-view { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: start; }
.settings-webhooks-view > .settings-message, .settings-webhook-endpoints { grid-column: 1 / -1; }
.settings-card-heading { padding: 15px 18px 13px; }
.settings-card-heading h2 { font-size: 16px; }
.settings-card-body { padding-inline: 18px; }
.settings-card-body > :first-child:not(.settings-row) { margin-top: 16px; }
.settings-card-body > :last-child { margin-bottom: 13px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-width: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.settings-card-body > .settings-row:last-child { border: 0; margin-bottom: 2px; }
.settings-row-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.settings-row-copy > strong, .settings-row-copy > p { display: block; }
.settings-row-copy > strong, .webhook-event strong { font-size: 14px; font-weight: 700; }
.settings-row-copy > p, .settings-inset p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.settings-row-copy > p { margin-top: 4px; }
.settings-input { width: min(100%, 420px); }
.settings-inline-form { align-items: end; justify-content: flex-start; gap: 12px; }
.settings-inline-form .settings-input { flex: 0 1 310px; }
.settings-inline-form > .button { margin-bottom: 1px; }
.settings-inline-form:has(.field-hint) > .button { margin-bottom: 20px; }
.settings-actions, .settings-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.settings-tags { margin-top: 8px; }
.settings-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; color: var(--muted); background: var(--rail); font-size: 12px; font-weight: 650; white-space: nowrap; }
.settings-status.good { background: var(--soft); color: var(--accent); }
.settings-feedback, .settings-empty { font-size: 14px; line-height: 1.55; color: var(--muted); }
.settings-feedback:not(.settings-message) { padding: 9px 0; }
.settings-message { margin: 0 0 10px; }
.settings-inset { display: grid; justify-items: start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); margin: 10px 0; }
.settings-danger { border-color: #efe3e0; }
.settings-danger h2, .danger-text, .button.ghost.danger-text { color: #903c35; }
.button.danger { color: #903c35; background: #fff7f5; border-color: #e8d1cb; }
.button.danger:hover:not(:disabled) { background: #f9eae5; }
.settings-metric { display: grid; gap: 3px; color: var(--muted); font-size: 14px; padding-bottom: 9px; }
.settings-metric strong { font-size: 27px; color: var(--ink); margin-right: 9px; font-variant-numeric: tabular-nums; }
.settings-metric progress { width: min(100%, 420px); height: 7px; margin-top: 6px; accent-color: var(--accent); }
.settings-metric progress::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.settings-metric progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.settings-switch { position: relative; flex: none; width: 40px; height: 23px; }
.settings-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.settings-switch span { display: block; width: 100%; height: 100%; border-radius: 30px; background: #e3e1dd; transition: background .18s; pointer-events: none; }
.settings-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px #6b665f20; transition: transform .18s; }
.settings-switch input:checked + span { background: var(--accent); }
.settings-switch input:checked + span::after { transform: translateX(17px); }
.settings-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.settings-switch input:disabled + span { opacity: .58; }
.settings-threshold { display: flex; align-items: end; gap: 7px; margin-top: 9px; }
.settings-threshold .settings-input { max-width: 105px; }
.webhook-form { justify-items: stretch; }
.webhook-event-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.webhook-event-fields legend { font-size: 14px; font-weight: 650; margin-bottom: 7px; }
.webhook-select-all.button { min-height: 30px; padding-inline: 5px; margin-bottom: 7px; font-size: 13px; }
.webhook-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.webhook-event { display: flex; gap: 7px; align-items: flex-start; min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 8px; border-radius: 8px; }
.webhook-event input { margin: 3px 0 0; accent-color: var(--accent); }
.webhook-event small, .webhook-endpoint small { display: block; overflow-wrap: anywhere; color: var(--muted); margin-top: 3px; font-size: 11px; }
.webhook-endpoint { padding-bottom: 12px; }
.webhook-endpoint + .webhook-endpoint { border-top: 1px solid var(--line); }
.webhook-endpoint .settings-row { border: 0; padding-bottom: 8px; }
.endpoint-url { overflow-wrap: anywhere; }
.webhook-secret code { overflow-wrap: anywhere; font-size: 13px; max-width: 100%; }
.settings-code { overflow: auto; padding: 12px; margin: 9px 0; border: 1px solid var(--line); background: var(--canvas); color: var(--ink); border-radius: 8px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.settings-actions [aria-pressed="true"] { background: var(--soft); border-color: var(--selection-line); color: var(--accent-hover); }
.delivery-filter { margin-block: 8px 14px; }
.settings-empty { padding-block: 11px; }

.billing-layout .topbar { min-height: 62px; }
.billing-layout .content { max-width: 1560px; }
.billing-breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.billing-breadcrumb a { color: inherit; text-decoration: none; }
.billing-breadcrumb a:hover { text-decoration: underline; }
.billing-breadcrumb [aria-current] { color: var(--ink); font-weight: 650; }
.billing-account-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--soft); color: var(--accent-hover); font-weight: 700; text-decoration: none; }
.billing-rail-balance { display: block; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.billing-settings { container: billing / inline-size; display: grid; gap: 18px; min-width: 0; }
.billing-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-bottom: 6px; }
.billing-heading h1 { margin: 0; color: var(--ink); font-size: clamp(1.85rem, 3.3cqi, 2.65rem); line-height: 1.12; letter-spacing: -.045em; }
.billing-heading p { max-width: 48rem; margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
.billing-price-link { flex: none; }
.billing-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.billing-summary-panel, .billing-top-up { overflow: hidden; }
.billing-overview { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .89fr) minmax(0, 1fr) minmax(0, 1.45fr); margin: 0; }
.billing-metric { display: flex; min-width: 0; min-height: 149px; flex-direction: column; padding: clamp(15px, 2.1cqi, 26px); }
.billing-metric:not(:first-child) { border-inline-start: 1px solid var(--line); }
.billing-metric dt { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.billing-metric dd { margin-inline-start: 0; }
.billing-metric-value { margin-block: 10px 10px; color: var(--ink); font-size: clamp(1.2rem, 2.75cqi, 2rem); font-weight: 720; line-height: 1.08; letter-spacing: -.045em; overflow-wrap: anywhere; }
.billing-metric-primary .billing-metric-value { font-size: clamp(1.95rem, 4.45cqi, 3.45rem); }
.billing-metric-note { margin-block: auto 0; color: var(--muted); font-size: .805rem; line-height: 1.45; }
.billing-link { display: inline-block; color: var(--accent-hover); font-weight: 620; text-decoration: none; }
.billing-link:hover { text-decoration: underline; }
.billing-chart, .billing-chart-empty { height: 59px; margin: 8px 0; }
.billing-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: end; gap: clamp(1px, .25cqi, 4px); }
.billing-chart > span { height: max(2px, var(--bar-height)); border-radius: 2px 2px 0 0; background: var(--selection-line); }
.billing-chart > span[data-used="true"] { background: var(--accent); }
.billing-chart-empty { border-bottom: 1px dashed var(--control-line); }
.billing-quota-alert, .billing-load-error { margin: 0; padding: 13px clamp(15px, 2.1cqi, 26px); background: var(--rail); }
.billing-summary-panel > :is(.billing-quota-alert, .billing-load-error) { border-top: 1px solid var(--line); }
.billing-load-error { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.billing-load-error p { margin: 0; }
.billing-alert-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .89rem; }
.billing-alert-controls > svg { color: var(--muted); }
.billing-alert-controls .settings-switch { margin: 0; }
.billing-alert-controls .settings-switch:has(:disabled) { opacity: .58; }
.billing-alert-controls > input { width: 7.5rem; min-height: 36px; padding: 5px 9px; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface); }
.billing-alert-controls .button { min-height: 36px; padding-block: 5px; }
.billing-alert-note { margin: 7px 0 0 29px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.billing-payment-note { margin: 0; color: var(--muted); font-size: .81rem; line-height: 1.55; }
.billing-metric-value, .billing-checkout-plan strong, .billing-checkout-summary dd, .billing-summary-value { font-variant-numeric: tabular-nums; }
.billing-purchase-form { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(230px, 1fr); }
.billing-purchase-options, .billing-checkout-summary { display: grid; align-content: start; gap: 17px; min-width: 0; padding: clamp(15px, 2.1cqi, 26px); }
.billing-purchase-options h2 { margin: 0; font-size: 1.23rem; line-height: 1.3; scroll-margin-top: 18px; }
.billing-purchase-state, .billing-history { display: grid; gap: 13px; min-width: 0; }
.billing-purchase-state > p, .billing-history p { margin: 0; }
.billing-purchase-state > .button { justify-self: start; }
.billing-purchase-state h3 { margin: 0; font-size: .9rem; font-weight: 650; }
.billing-pack-picker { margin: 0; min-width: 0; padding: 0; border: 0; }
.billing-pack-picker legend, .billing-payment-methods h3 { margin: 0 0 9px; padding: 0; font-size: .9rem; font-weight: 650; }
.billing-checkout-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.billing-checkout-plan { position: relative; display: grid; align-content: start; min-width: 0; min-height: 76px; gap: 3px; padding: 12px 30px 12px 13px; border: 1px solid var(--control-line); border-radius: 9px; background: var(--surface); cursor: pointer; }
.billing-checkout-plan:hover { border-color: var(--selection-line); }
.billing-checkout-plan[data-selected="true"] { border-color: var(--accent); background: var(--soft); }
.billing-checkout-plan:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.billing-pack-picker:disabled .billing-checkout-plan { cursor: default; }
.billing-checkout-plan input { position: absolute; inset-block-start: 13px; inset-inline-end: 10px; width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.billing-checkout-plan strong { color: var(--ink); font-size: clamp(1.1rem, 2.5cqi, 1.6rem); line-height: 1.15; overflow-wrap: anywhere; }
.billing-checkout-plan span { color: var(--accent-hover); font-size: .79rem; font-weight: 650; overflow-wrap: anywhere; }
.billing-checkout-plan small { color: var(--muted); font-size: .76rem; line-height: 1.35; overflow-wrap: anywhere; }
.billing-payment-methods ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0 0 9px; padding: 0; list-style: none; }
.billing-payment-methods li { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 47px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: .85rem; font-weight: 620; overflow-wrap: anywhere; }
.billing-payment-methods svg { flex: none; color: var(--accent-hover); }
.billing-method-alipay { display: grid; flex: none; width: 20px; height: 20px; place-items: center; border-radius: 5px; background: #0b5ce6; color: #fff; font-size: .74rem; }
.billing-payment-methods p { margin: 0; color: var(--muted); font-size: .81rem; line-height: 1.55; }
.billing-checkout-summary { gap: 10px; border-inline-start: 1px solid var(--line); background: var(--rail); }
.billing-checkout-summary h3 { margin: 0; color: var(--muted); font-size: .875rem; font-weight: 550; }
.billing-summary-value { margin: 4px 0 14px; color: var(--ink); font-size: clamp(1.9rem, 4cqi, 3rem); font-weight: 730; line-height: 1.1; letter-spacing: -.035em; overflow-wrap: anywhere; }
.billing-checkout-summary dl { margin: 0; border-bottom: 1px solid var(--line); }
.billing-checkout-summary dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.billing-checkout-summary dt { color: var(--muted); font-size: .82rem; }
.billing-checkout-summary dd { margin: 0; color: var(--ink); font-size: .93rem; font-weight: 670; overflow-wrap: anywhere; }
.billing-checkout-summary .button { width: 100%; min-height: 44px; gap: 8px; }
.billing-checkout-summary .form-error { margin: 0; }
.billing-refund-consent { display: flex; align-items: flex-start; gap: 8px; padding-block: 4px; font-size: .8rem; line-height: 1.45; cursor: pointer; }
.billing-refund-consent input { flex: none; width: 1rem; height: 1rem; margin: 2px 0 0; accent-color: var(--accent); }

@container billing (max-width: 780px) {
  .billing-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-metric:nth-child(odd) { border-inline-start: 0; }
  .billing-metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .billing-metric { min-height: 123px; }
  .billing-metric-chart { min-height: 139px; }
  .billing-purchase-form { grid-template-columns: minmax(0, 1fr); }
  .billing-checkout-summary { border-inline-start: 0; border-top: 1px solid var(--line); }
}
@container billing (max-width: 430px) {
  .billing-heading { align-items: flex-start; flex-direction: column; }
  .billing-checkout-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-metric { padding: 12px; }
  .billing-metric dt, .billing-metric-note { font-size: .75rem; }
  .billing-alert-controls label[for] { order: -1; width: 100%; }
  .billing-alert-note { margin-inline-start: 0; }
}
@media (max-width: 650px) {
  .billing-layout .topbar { min-height: 52px; gap: 8px; }
  .billing-layout .topbar-actions, .billing-layout .asin-top-actions { gap: 7px; }
  .billing-layout .account-chip { max-width: 100px; }
}

.billing-payment-status { margin: 0; padding: 9px 12px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--rail); color: var(--ink); font-size: 13px; line-height: 1.5; }
.billing-payment-status-paid { border-color: #cfe0cb; background: #edf4e9; color: #386147; }
.billing-payment-status-failed { border-color: var(--selection-line); background: var(--soft); color: var(--error-text); }
.billing-history-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.billing-history-scroll { overflow-x: auto; min-width: 0; border: 1px solid var(--line); border-radius: 8px; }
.billing-history-table { font-size: 13px; }
.billing-history-table :is(th, td) { padding: 9px 11px; min-width: 0; }
.billing-history-table time, .billing-history-table td:nth-child(2) { white-space: nowrap; }
.billing-history-table code { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.billing-order-status { display: inline-block; padding: 2px 7px; border-radius: 999px; background: var(--rail); color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.billing-order-status.paid { background: #edf4e9; color: #386147; }
.billing-order-status.failed { background: #fbece8; color: #903c35; }

.usage-dashboard { display: grid; gap: 14px; min-width: 0; }
.usage-dashboard-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.usage-dashboard-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.usage-controls { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 12px 20px; padding: 14px 17px; }
.usage-controls > .settings-actions { padding-bottom: 1px; }
.usage-controls > .form-error { grid-column: 1 / -1; margin: 0; }
.usage-controls .button, .usage-dashboard-heading .button { min-height: 34px; padding-inline: 10px; font-size: 13px; }
.usage-date-form { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto; align-items: end; gap: 8px; justify-self: end; }
.usage-date-form .button { margin-bottom: 1px; }
.usage-date-form input { min-height: 34px; padding-block: 5px; width: 100%; }
.usage-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.usage-totals > div { padding: 14px 18px 13px; }
.usage-totals > div + div { border-left: 1px solid var(--line); }
.usage-totals dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.usage-totals dd { margin: 5px 0 0; color: var(--ink); font-size: clamp(18px, 2.4vw, 29px); line-height: 1.2; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.usage-totals small, .usage-billing-coverage { color: var(--muted); font-size: 12px; line-height: 1.5; }
.usage-totals small { display: block; margin-top: 4px; }
.usage-billing-coverage { padding-inline: 2px; }
.usage-billing-coverage span { white-space: nowrap; }
.usage-overview { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.usage-chart-metrics { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.usage-chart-metrics .button, .usage-platform-filters .button { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.usage-chart-metrics .button[aria-pressed="true"], .usage-platform-filters .button[aria-pressed="true"] { color: var(--accent-hover); background: var(--soft); border-color: var(--selection-line); }
.usage-chart { margin: 0; padding: 0 0 5px; }
.usage-chart figcaption { color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 9px; min-height: 18px; }
.usage-chart-main { display: flex; gap: 8px; height: 96px; }
.usage-chart-scale { display: flex; flex-direction: column; justify-content: space-between; align-items: end; color: var(--muted); font-size: 11px; line-height: 1; }
.usage-chart-bars { display: flex; flex: 1; min-width: 0; border-block: 1px solid var(--line); background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; }
.usage-chart-day { position: relative; display: grid; align-items: end; justify-items: center; flex: 1 1 0; min-width: 0; padding: 0; border: 0; background: transparent; border-radius: 3px; }
.usage-chart-day span { display: block; width: 76%; max-width: 24px; height: var(--bar-height); min-height: 1px; border-radius: 3px 3px 0 0; background: var(--accent); opacity: .72; }
.usage-chart-day:is(:hover, :focus-visible) { background: var(--soft); z-index: 1; }
.usage-chart-day:is(:hover, :focus-visible) span { opacity: 1; }
.usage-chart-dates { display: flex; justify-content: space-between; gap: 4px; color: var(--muted); padding: 7px 0 0 14px; font-size: 11px; }
.usage-breakdown-scroll { max-height: 300px; overflow: auto; }
.usage-breakdown td, .usage-breakdown th:not(:first-child) { white-space: nowrap; }
.usage-breakdown tr th[scope="row"] { text-align: left; }
.usage-breakdown progress { width: 100%; min-width: 38px; height: 4px; display: block; margin-top: 5px; border: 0; background: var(--soft); border-radius: 100px; }
.usage-breakdown progress::-webkit-progress-bar { background: var(--soft); border-radius: 100px; }
.usage-breakdown progress::-webkit-progress-value { background: var(--accent); border-radius: 100px; }
.usage-breakdown progress::-moz-progress-bar { background: var(--accent); border-radius: 100px; }
.usage-history-card .settings-card-body { min-width: 0; }
.usage-history-controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.usage-platform-filters { min-width: 0; margin: 0; padding: 0; border: 0; }
.usage-platform-filters legend { margin: 0 0 5px; padding: 0; color: var(--muted); font-size: 13px; font-weight: 650; }
.usage-platform-filters > div { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.usage-platform-filters label { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); font-size: 12px; cursor: pointer; }
.usage-platform-filters label:has(input:checked) { background: var(--soft); border-color: var(--selection-line); }
.usage-platform-filters label input { margin: 0; }
.usage-platform-filters .platform-icon { width: 18px; height: 18px; border-radius: 4px; font-size: 8px; }
.usage-platform-filters .platform-icon svg { width: 14px; height: 14px; }
.usage-export { display: flex; align-items: end; gap: 7px; }
.usage-export .settings-input { min-width: 122px; }
.usage-export .button, .usage-filter-reset { margin-bottom: 1px; }
.usage-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.usage-filters .settings-input { width: min(100%, 158px); min-width: 0; }
.usage-id-filter { display: flex; align-items: end; gap: 8px; width: min(100%, 300px); }
.usage-id-filter .settings-input { flex: 1; }
.usage-id-filter .button { margin-bottom: 1px; }
.usage-filter-reset { align-self: end; }
.usage-coverage { margin: 11px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.usage-table-scroll { overflow-x: auto; margin-top: 13px; border: 1px solid var(--line); border-radius: 8px; }
.usage-table { font-size: 13px; }
.usage-table :is(th, td) { padding: 9px 10px; min-width: 0; }
.usage-table-scroll td:first-child { min-width: 99px; font-variant-numeric: tabular-nums; }
.usage-table-scroll td.num { white-space: nowrap; }
.usage-time-button { padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--accent-hover); text-align: left; text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.usage-time-button:hover { color: var(--accent); }
.usage-key-name { min-width: 72px; max-width: 135px; overflow-wrap: anywhere; }
.usage-table small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.usage-table code { font-size: .92em; overflow-wrap: anywhere; }
.usage-request-status { display: inline-block; white-space: nowrap; border-radius: 999px; background: var(--rail); color: var(--muted); padding: 2px 7px; font-weight: 650; font-size: 11px; }
.usage-request-status.succeeded { color: #386147; background: #edf4e9; }
.usage-request-status.failed { color: #903c35; background: #fbece8; }
.usage-pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 13px; }
.usage-pagination .button { min-height: 32px; padding: 4px 8px; font-size: 13px; }
.usage-request-detail { width: min(530px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--control-line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.usage-request-detail::backdrop { background: #29221b5c; }
.usage-request-detail-body { display: grid; gap: 13px; padding: 15px; }
.usage-request-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.usage-request-detail-header h2 { font-size: 19px; }
.usage-request-detail dl { display: grid; gap: 0; margin: 0; }
.usage-request-detail dl > div { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.usage-request-detail dt { color: var(--muted); }
.usage-request-detail dd { margin: 0; overflow-wrap: anywhere; }
.usage-request-detail .button { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.usage-request-detail-body > .button { justify-self: start; }
.usage-copy-field { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.usage-copy-field code { min-width: 0; }

@media (max-width: 1090px) {
  .usage-controls { grid-template-columns: minmax(0, 1fr); }
  .usage-date-form { justify-self: start; }
}

@media (max-width: 1130px) {
  .settings-webhooks-view { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 650px) {
  .topbar-actions { gap: 7px; }
  .settings-tab { padding-inline: 7px; font-size: 12px; }
  .settings-card-heading { padding-inline: 15px; }
  .settings-card-body { padding-inline: 15px; }
  .webhook-events { grid-template-columns: 1fr; }
  .account-chip { max-width: 120px; padding-inline: 8px; font-size: 13px; }
  .usage-overview { grid-template-columns: minmax(0, 1fr); }
  .usage-date-form { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-self: stretch; }
  .usage-date-form .button { justify-self: start; }
  .usage-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-totals > div { padding-inline: 11px; }
  .usage-totals > div:nth-child(3) { border-left: 0; }
  .usage-totals > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .usage-filters > .settings-input { width: calc(50% - 5px); }
}

.fallback-dashboard { display: grid; gap: 14px; min-width: 0; }
.fallback-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.fallback-heading h2 { font-size: 23px; line-height: 1.25; }
.fallback-dashboard > .form-error { margin: 0; }
.settings-card-body > :is(.fallback-providers, .fallback-events):first-child { margin: 0; padding: 0; list-style: none; }
.fallback-providers { counter-reset: fallback-priority; }
.fallback-providers > li { counter-increment: fallback-priority; }
.fallback-providers > li::before { content: counter(fallback-priority); display: grid; place-items: center; flex: none; width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 50%; font-size: 12px; font-weight: 650; color: var(--muted); }
:is(.fallback-providers, .fallback-events) > li:last-child { border-bottom: 0; }
.fallback-health.healthy { color: #386147; background: #edf4e9; }
.fallback-health.cooldown { color: #903c35; background: #fbece8; }
.fallback-events time { flex: none; color: var(--muted); font-size: 12px; }

@media (max-width: 440px) {
  .fallback-events > li { flex-wrap: wrap; gap: 6px 12px; }
  .fallback-events .settings-row-copy { flex-basis: 100%; }
}

.settings-view.settings-api-keys-view { max-width: none; }
.api-key-dashboard { display: grid; gap: 18px; min-width: 0; }
.api-key-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px; }
.api-key-heading-copy { flex: 1 1 420px; min-width: 0; }
.api-key-heading-copy p { max-width: 64ch; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.api-key-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-inline-start: auto; }
.api-key-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.api-key-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 6px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}
.api-key-refresh svg { width: 16px; height: 16px; }
.api-key-refresh:hover:not(:disabled) { border-color: var(--hover-line); background: var(--subtle); color: var(--ink); }
.api-key-refresh:disabled { opacity: .55; }
.api-key-dashboard > .settings-feedback { margin: 0; padding: 0; }
.api-key-table-message { margin: 0; padding: 20px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.api-key-table-message.form-error { color: var(--error-text); }
.api-key-list > .button { margin: 0 20px 16px; }

.api-key-table-scroll {
  max-height: none;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}
.api-key-table { min-width: 752px; table-layout: fixed; font-size: 13px; }
.api-key-table :is(th, td) { min-width: 0; padding: 12px 8px; vertical-align: middle; }
.api-key-table tr > :where(:first-child) { padding-inline-start: 15px; }
.api-key-table tr > :where(:last-child) { padding-inline-end: 15px; }
.api-key-table thead th { position: static; z-index: auto; background: var(--rail); color: var(--muted); font-size: 12px; white-space: normal; }
.api-key-table thead th:nth-child(1) { width: 13%; }
.api-key-table thead th:nth-child(2) { width: 17%; }
.api-key-table thead th:nth-child(3),
.api-key-table thead th:nth-child(4),
.api-key-table thead th:nth-child(5) { width: 10%; }
.api-key-table thead th:nth-child(6) { width: 14%; }
.api-key-table thead th:nth-child(7) { width: 11%; }
.api-key-table thead th:nth-child(8) { width: 15%; }
.api-key-table tbody th { position: static; z-index: auto; background: transparent; color: var(--ink); font-weight: 680; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.api-key-table tbody tr:last-child > * { border-bottom: 0; }
.api-key-table time { font-variant-numeric: tabular-nums; }
.api-key-unused { color: var(--muted); }
.api-key-credential { color: var(--muted); }
.api-key-mask { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 30px; padding: 4px 5px; border: 0; border-radius: 6px; background: var(--rail); color: var(--muted); text-align: left; }
.api-key-mask code, .api-key-application-id code { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
.api-key-mask code { user-select: text; }
.api-key-mask svg { width: 13px; height: 13px; }
.api-key-mask:hover { background: var(--soft); color: var(--accent-hover); }
.api-key-application-id { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; font-size: 11px; }
.api-key-application-id span { padding: 1px 5px; border-radius: 5px; background: var(--rail); font-weight: 650; }
.api-key-usage-values { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.api-key-usage-values strong { color: var(--ink); font-size: 13px; }
.api-key-usage progress { appearance: none; display: block; width: 100%; height: 4px; margin-top: 5px; border: 0; border-radius: 999px; background: var(--line); accent-color: var(--accent); }
.api-key-usage progress::-webkit-progress-bar { border-radius: 999px; background: var(--line); }
.api-key-usage progress::-webkit-progress-value { border-radius: 999px; background: var(--accent); }
.api-key-usage progress::-moz-progress-bar { border-radius: 999px; background: var(--accent); }
.api-key-status.active { color: #386147; background: #edf4e9; }
.api-key-status.expired { color: #835521; background: #fbf2e5; }
.api-key-expiration { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.api-key-row-actions { display: flex; flex-wrap: wrap; gap: 3px 8px; }
.api-key-row-actions > :is(a, button) { display: inline-flex; align-items: center; min-height: 28px; border: 0; padding: 1px 0; background: transparent; color: var(--accent-hover); font: inherit; font-weight: 650; line-height: inherit; text-decoration: none; white-space: nowrap; }
.api-key-row-actions > :is(a, button):hover:not(:disabled) { text-decoration: underline; }
.api-key-row-actions > button.danger-text { color: #903c35; }
.api-key-row-actions > button:disabled { opacity: .56; }

.api-key-resources { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 16px; }
.api-key-resources .settings-card-heading { padding-block: 13px; }
.api-key-rules { display: flex; flex-direction: column; }
.api-key-rules .settings-card-body { display: grid; flex: 1; padding: 0; }
.api-key-rules .settings-card-body > .api-key-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--line);
}
.api-key-rule { min-width: 0; padding: 15px 18px; background: var(--surface); }
.api-key-rule:last-child:nth-child(odd) { grid-column: 1 / -1; }
.api-key-rule h3, .api-key-guide-section-heading h3 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: -.01em; line-height: 1.45; }
.api-key-rule p, .api-key-guide-note { color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.api-key-rule p { margin-top: 4px; }
.api-key-docs-link { display: inline-block; margin-top: 6px; color: var(--accent-hover); font-size: 13px; font-weight: 650; text-underline-offset: 3px; }
.api-key-guide-section { min-width: 0; }
.api-key-guide-section + .api-key-guide-section { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.api-key-guide-section-heading, .api-key-guide-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.api-key-guide-section-heading { justify-content: space-between; }
.api-key-guide-controls { margin-top: 7px; }
.api-key-guide :is(.api-key-guide-section-heading, .api-key-guide-controls) .button { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.api-key-guide-controls .button[aria-pressed="true"] { border-color: var(--selection-line); background: var(--soft); color: var(--accent-hover); }
.api-key-guide .api-key-guide-code { margin-block: 8px; background: var(--rail); }
.api-key-guide-note + .api-key-guide-note { margin-top: 4px; }
.api-key-guide-details { margin-top: 7px; }
.api-key-guide-details summary { width: fit-content; color: var(--accent-hover); font-size: 13px; font-weight: 650; cursor: pointer; }
.api-key-guide-details[open] .api-key-guide-section-heading { justify-content: flex-end; }

body:has(.api-key-dialog[open]) { overflow: hidden; }
.api-key-dialog { width: min(540px, calc(100% - 30px)); max-height: calc(100dvh - 30px); padding: 0; border: 1px solid var(--control-line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 64px #30282430; }
.api-key-dialog::backdrop { background: #372f2b51; }
.api-key-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.api-key-dialog-header h2 { font-size: 18px; }
.api-key-dialog-body { padding: 16px 18px 18px; }
.api-key-dialog-body p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.api-key-dialog-body .api-key-revoke-name { margin-top: 7px; color: var(--ink); overflow-wrap: anywhere; }
.api-key-dialog-body .form-error { color: var(--error-text); margin: 0 0 12px; }
.api-key-editor fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.api-key-editor > fieldset { display: grid; gap: 14px; }
.api-key-editor .settings-input { width: 100%; min-width: 0; }
.api-key-editor .api-key-option-group { padding-top: 4px; }
.api-key-option-group legend { font-size: 14px; font-weight: 650; }
.api-key-presets { gap: 5px; }
.api-key-presets .button { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.api-key-name-presets { margin-top: -8px; }
.api-key-option-group > :is(.settings-input, .field-hint) { display: block; margin-top: 7px; }
.api-key-option-group > .settings-input { display: grid; }
.api-key-permissions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.api-key-permissions label { display: flex; align-items: center; gap: 6px; min-height: 31px; color: var(--muted); font-size: 13px; }
.api-key-permissions label input { margin: 0; }
.api-key-permissions p { flex-basis: 100%; }
.api-key-editor > .form-error { margin-top: 10px; }
.api-key-dialog-actions { justify-content: flex-end; margin-top: 16px; }
.api-key-secret { display: grid; gap: 10px; }
.api-key-secret input { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--canvas); font: 13px ui-monospace, monospace; }
.api-key-secret .api-key-dialog-actions { margin-top: 0; }

@media (max-width: 980px) {
  .api-key-resources { grid-template-columns: minmax(0, 1fr); }
  .api-key-table-scroll { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .api-key-table { display: block; min-width: 0; }
  .api-key-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .api-key-table tbody { display: grid; gap: 10px; }
  .api-key-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 13px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--panel-shadow); }
  .api-key-table tbody :is(td, th) { display: block; max-width: none; border: 0; padding: 0; }
  .api-key-table tbody :is(th, .api-key-credential, td:last-child) { grid-column: 1 / -1; }
  .api-key-table td[data-label]:not(:last-child)::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }
  .api-key-table tbody th { font-size: 15px; }
  .api-key-row-actions { padding-top: 7px; border-top: 1px solid var(--line); }
  .api-key-row-actions > :is(a, button) { min-height: 38px; padding-inline: 7px; }
}

@media (max-width: 520px) {
  .api-key-heading-actions { justify-content: flex-start; margin-inline-start: 0; }
  .api-key-rules .settings-card-body > .api-key-rules-grid { grid-template-columns: minmax(0, 1fr); }
}
.calls-view {
  --calls-tint: color-mix(in srgb, var(--accent, #1267ed) 8%, var(--surface, white));
  --calls-border: var(--line, #dedfe3);
  --calls-ink: var(--ink, #16181c);
  --calls-muted: var(--muted, #60636b);
  width: 100%;
  min-width: 0;
  color: var(--calls-ink);
}
.calls-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 2px 0 23px;
}
.calls-heading h1 { margin: 0; line-height: 1.1; font-size: clamp(27px, 3vw, 40px); letter-spacing: -.035em; }
.calls-heading p, .calls-card-heading p { margin: 9px 0 0; color: var(--calls-muted); font-size: 14px; line-height: 1.55; }
.calls-actions, .calls-actions .button { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.calls-actions .button { flex-wrap: nowrap; white-space: nowrap; }
.calls-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--calls-border);
  border-radius: 14px;
  background: var(--surface, white);
}
.calls-controls button, .calls-controls select, .calls-controls input { font: inherit; color: inherit; }
.calls-ranges { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--subtle, #f4f5f7); }
.calls-ranges button {
  padding: 6px 11px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.calls-ranges button[aria-pressed="true"] { color: var(--accent-hover, #115ac7); background: var(--surface, white); border-color: var(--calls-border); font-weight: 680; }
.calls-select {
  min-width: 120px;
  min-height: 38px;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 8px;
  border: 1px solid var(--calls-border);
  padding-inline-start: 9px;
}
.calls-select span { color: var(--calls-muted); font-size: 12px; white-space: nowrap; }
.calls-select select { width: 100%; min-width: 65px; padding: 5px; border: 0; background: transparent; cursor: pointer; }
.calls-search { display: flex; flex: 2 1 195px; min-width: 0; min-height: 38px; border-radius: 8px; border: 1px solid var(--calls-border); }
.calls-search input { width: 100%; min-width: 0; padding: 5px 0 5px 10px; border: 0; border-radius: inherit; background: transparent; }
.calls-search button { display: grid; width: 37px; border: 0; place-items: center; background: transparent; cursor: pointer; flex: none; }
.calls-timezone { min-height: 32px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--calls-muted); font-size: 12px; }
.calls-timezone a { color: var(--accent-hover, #115ac7); }
.calls-card { border: 1px solid var(--calls-border); border-radius: 14px; background: var(--surface, white); overflow: hidden; }
.calls-table-scroll { overflow: auto; max-height: min(56vh, 560px); }
.calls-table { width: 100%; min-width: 825px; border-collapse: collapse; text-align: left; font-size: 13px; font-variant-numeric: tabular-nums; }
.calls-table th, .calls-table td { padding: 11px 13px; }
.calls-table th { position: sticky; top: 0; z-index: 1; color: var(--calls-muted); background: var(--subtle, #f4f5f7); font-weight: 650; white-space: nowrap; }
.calls-table td { border-top: 1px solid var(--calls-border); white-space: nowrap; }
.calls-table tbody tr:focus-within, .calls-table tbody tr:hover { background: var(--calls-tint); }
.calls-table td small { display: block; color: var(--calls-muted); margin-top: 3px; font-size: 12px; }
.calls-table td:last-child > code { display: inline-block; max-width: 13ch; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.calls-table td:nth-child(2) { width: 33%; }
.calls-endpoint { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 650; cursor: pointer; text-align: left; }
.calls-endpoint:hover { text-decoration: underline; }
.calls-endpoint svg { width: 13px; flex: none; color: var(--accent, #1267ed); }
.calls-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 6px; color: #5c6574; background: #f0f3f8; font-weight: 650; }
.calls-status::before { content: ""; border-radius: 50%; width: 5px; height: 5px; background: currentColor; }
.calls-status[data-status="succeeded"] { color: #187249; background: #eaf7ee; }
.calls-status[data-status="failed"] { color: #a12e2a; background: #fff0ef; }
.calls-status[data-status="refused"] { color: #8a500f; background: #fff4e4; }
.calls-refused { margin-top: 20px; }
.calls-refused .calls-table { min-width: 690px; }
.calls-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding: 15px 17px; }
.calls-card-heading h2, .calls-card-heading h3 { margin: 0; font-size: 16px; font-weight: 700; }
.calls-card-heading p { margin: 0; font-size: 12px; }
.calls-empty { display: grid; place-content: center; justify-items: center; min-height: 190px; gap: 10px; padding: 22px 16px; text-align: center; }
.calls-empty-compact { min-height: 88px; color: var(--calls-muted); }
.calls-empty a { font-size: 13px; color: var(--accent-hover, #115ac7); }
.calls-empty-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 10px; color: var(--accent-hover, #115ac7); background: var(--calls-tint); }
.calls-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--calls-muted); border-top: 1px solid var(--calls-border); padding: 10px 13px; font-size: 12px; }
.calls-pager div { display: flex; gap: 6px; }
.calls-pager .button { min-height: 31px; padding: 4px 8px; }
.calls-local { margin-top: 17px; }
.calls-local > summary { cursor: pointer; padding: 8px 0; font-size: 14px; }
.calls-dialog { width: min(720px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 24px); margin: auto; padding: 0; border: 1px solid var(--calls-border); border-radius: 16px; background: var(--surface, white); color: var(--calls-ink); }
.calls-dialog::backdrop { background: #141b326b; }
.calls-dialog .calls-card-heading { border-bottom: 1px solid var(--calls-border); overflow-wrap: anywhere; }
.calls-dialog dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 16px; gap: 12px; }
.calls-dialog dt { font-size: 12px; color: var(--calls-muted); }
.calls-dialog dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 13px; }
.calls-dialog-response { padding: 0 16px 16px; }
.calls-dialog-response .calls-card-heading { padding-inline: 0; }
.calls-dialog-response pre { max-height: 44vh; overflow: auto; padding: 12px; border-radius: 8px; background: var(--subtle, #f4f5f7); font-size: 12px; }
.calls-dialog-response p { margin: 12px 0 0; color: var(--calls-muted); font-size: 13px; }
@media (max-width: 560px) {
  .calls-heading { gap: 13px; padding-bottom: 16px; }
  .calls-controls { padding: 8px; }
  .calls-ranges, .calls-search, .calls-select { flex: 1 1 100%; }
  .calls-ranges button { flex: 1; }
}
