:root {
  color-scheme: light;
  --canvas: #f5f5f7; --surface: #ffffff; --subtle: #fafafc; --ink: #1d1d1f;
  --muted: #6e6e73; --faint: #6e6e73; --line: #e0e0e0; --accent: #0066cc;
  --primary: #0066cc; --primary-ink: #ffffff; --tint: #edf5ff; --danger: #b42318; --success: #1a7f37;
  --overlay: rgba(29,29,31,.22);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px; line-height: 1.47; color: var(--ink); background: var(--canvas);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101012; --surface: #1d1d1f; --subtle: #252527; --ink: #f5f5f7;
  --muted: #a1a1a6; --faint: #86868b; --line: #333336; --accent: #2997ff;
  --tint: rgba(41,151,255,.12); --danger: #ff8b82; --success: #70d39b;
  --overlay: rgba(0,0,0,.42);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, output { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .5; }
button, input, a { outline-offset: 4px; }
:focus-visible { outline: 2px solid #0071e3; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 600; }
h1, h2, h3 { font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
.topbar { height: 76px; position: sticky; top: 0; z-index: 5; background: var(--canvas); border-bottom: 1px solid transparent; }
body:has(#workspace:not([hidden])) .topbar { border-bottom-color: var(--line); }
.topbar-inner { max-width: 1280px; height: 100%; margin: auto; padding: 0 48px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; min-height: 44px; padding: 0; font-size: 24px; font-weight: 600; letter-spacing: -.9px; }
.brand-icon { color: var(--accent); width: 30px; height: 30px; stroke-width: 1.8; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.connection { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; color: var(--ink); }
.icon-button .icon { width: 18px; height: 18px; }
.welcome { min-height: calc(100dvh - 76px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 48px 24px; }
.welcome-icon { width: 64px; height: 64px; color: var(--accent); margin-bottom: 24px; stroke-width: 1; }
.welcome h1 { font-size: clamp(28px,4vw,40px); line-height: 1.1; letter-spacing: -1px; margin-bottom: 16px; }
.welcome p { color: var(--muted); margin-bottom: 32px; }
.workspace { max-width: 1440px; padding: 0 36px; margin: auto; display: grid; grid-template-columns: 208px minmax(0,1fr); }
.sidebar { border-right: 1px solid var(--line); padding: 40px 24px 28px 0; height: calc(100dvh - 76px); position: sticky; top: 76px; display: flex; flex-direction: column; }
.sidebar-label { font-size: 10px; letter-spacing: 1.4px; color: var(--faint); padding-left: 14px; margin-bottom: 18px; }
.navigation { display: flex; flex-direction: column; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 11px; background: none; color: var(--muted); font-size: 14px; text-align: left; }
.nav-item.active { color: var(--accent); background: var(--tint); font-weight: 600; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-count { margin-left: auto; font-size: 11px; min-width: 20px; height: 20px; text-align: center; line-height: 20px; background: var(--surface); border-radius: 6px; }
.sidebar-bottom { margin-top: auto; padding: 32px 14px 0; color: var(--faint); }
.sidebar-bottom .icon { width: 27px; height: 27px; margin-bottom: 12px; }
.sidebar-bottom p { font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.sidebar-bottom span { font-size: 10px; letter-spacing: .2px; }
.content { padding: 48px 0 24px 48px; min-width: 0; width: 100%; max-width: 1100px; margin: 0 auto; }
.page-heading { margin-bottom: 32px; }
.eyebrow { display: block; font-size: 10px; font-weight: 600; letter-spacing: 1.7px; color: var(--faint); }
.page-heading h1 { font-size: 40px; letter-spacing: -1.4px; line-height: 1.12; margin: 12px 0 14px; }
.page-heading p { font-size: 15px; color: var(--muted); line-height: 1.6; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 40px; display: flex; align-items: center; gap: 24px; overflow: hidden; }
.hero-copy { flex: 1 1 390px; }
.badge { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 9px; font-weight: 600; letter-spacing: 1.1px; }
.hero-copy h2 { font-size: 34px; line-height: 1.14; letter-spacing: -.9px; margin-top: 22px; }
.hero-copy p { color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 350px; margin: 16px 0 20px; }
.breeze-art { width: 245px; flex: 0 1 245px; min-width: 150px; color: var(--line); }
.art-circle { fill: var(--tint); stroke: var(--accent); stroke-width: 1.5; }
.art-play { fill: var(--accent); }
.text-button { border: 0; padding: 4px 0; background: none; color: var(--accent); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.text-button .icon { width: 16px; height: 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.summary-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: left; display: flex; flex-direction: column; gap: 14px; }
.summary-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.summary-label .icon { width: 16px; height: 16px; }
.summary-card strong { font-size: 32px; letter-spacing: -1px; line-height: 1.2; }
.summary-card small { color: var(--faint); font-weight: 400; font-size: 13px; letter-spacing: 0; }
.summary-card .summary-word { font-size: 26px; letter-spacing: -.7px; }
.caption { color: var(--muted); font-size: 12px; line-height: 1.5; }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 28px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-heading h2, .settings-card h2 { font-size: 21px; line-height: 1.24; letter-spacing: -.4px; }
.section-heading p, .settings-card p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.section-icon { color: var(--faint); margin-top: 4px; }
.field-label { display: block; font-size: 12px; margin-bottom: 10px; color: var(--muted); }
input[type="password"], input[type="text"] { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 11px; background: var(--subtle); padding: 12px 16px; color: var(--ink); font-size: 15px; }
input::placeholder { color: var(--faint); }
.copy-field { display: flex; align-items: center; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--subtle); }
.copy-field input { min-width: 0; flex: 1; width: 100%; height: 44px; border: 0; padding: 0 12px; background: none; color: var(--muted); font: 12px ui-monospace, SFMono-Regular, monospace; }
.copy-field .icon-button { border: 0; border-radius: 8px; background: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid transparent; border-radius: 9999px; padding: 10px 20px; font-size: 14px; font-weight: 400; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.primary { color: var(--primary-ink); background: var(--primary); }
.secondary { background: var(--subtle); color: var(--ink); border-color: var(--line); }
.button:active:not(:disabled), .icon-button:active { transform: scale(.97); }
.install-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.fine-print { font-size: 12px; line-height: 1.6; color: var(--faint); }
.install-card > .fine-print { margin-top: 18px; }
.source-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.source-group legend { padding: 0; font-size: 17px; font-weight: 600; }
.sources-toolbar { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.sources-toolbar .text-button { font-size: 12px; }
.source-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 40px; }
.source-option { min-width: 0; min-height: 64px; padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; cursor: pointer; }
.source-text { min-width: 0; }
.source-text strong { display: block; font-size: 14px; font-weight: 500; }
.source-text small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.resolution-group { margin-top: 30px; }
.resolution-group .caption { margin-top: 8px; line-height: 1.6; }
.resolution-options { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.resolution-option { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; }
.resolution-option:has(input:checked) { border-color: var(--accent); background: var(--tint); }
.resolution-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--primary); }
.switch { margin-left: auto; position: relative; width: 38px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track { display: block; border-radius: 20px; width: 38px; height: 24px; background: var(--line); pointer-events: none; }
.switch-track::after { content: ""; display: block; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #ffffff; transition: transform .18s ease; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 2px solid #0071e3; outline-offset: 4px; }
.info-note { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 13px; line-height: 1.65; margin-top: 24px; }
.info-note .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.lookup-card { margin-bottom: 20px; }
.range-value { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 36px 0 24px; }
.range-value label { font-size: 14px; color: var(--muted); }
.range-value output { font-size: 32px; font-weight: 600; letter-spacing: -1px; }
.range-value output span { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
input[type="range"] { width: 100%; margin: 0; accent-color: var(--primary); cursor: pointer; height: 44px; }
.range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 8px; }
.preset-options { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 9999px; font-size: 12px; background: var(--surface); }
.chip span { color: var(--muted); margin-left: 6px; }
.chip.active { color: var(--accent); border-color: var(--accent); background: var(--tint); }
.lookup-note { padding: 16px; border-radius: 11px; background: var(--tint); margin-bottom: 14px; }
.settings-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 20px; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); background: var(--canvas); border-radius: 11px; flex: 0 0 auto; }
.segmented button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 14px; background: none; border: 0; border-radius: 8px; color: var(--muted); font-size: 12px; }
.segmented button.active { background: var(--surface); color: var(--ink); }
.segmented .icon { width: 16px; height: 16px; }
.heading-with-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.heading-with-action .button { flex: 0 0 auto; }
.status-card { padding: 0 28px; }
.status-columns, .status-row { display: grid; grid-template-columns: 1.3fr 1fr .8fr 1.2fr; gap: 16px; align-items: center; }
.status-columns { font-size: 11px; color: var(--faint); padding: 22px 0 16px; }
.status-row { border-top: 1px solid var(--line); min-height: 88px; padding: 20px 0; font-size: 12px; }
.status-name strong { display: block; font-size: 15px; }
.source-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; }
.source-status.up, .status-up { color: var(--success); }
.up .status-dot { background: var(--success); }
.source-status.down, .status-down { color: var(--danger); }
.down .status-dot { background: var(--danger); }
.source-status.pending { color: var(--faint); }
.pending .status-dot { background: var(--faint); }
.response-time { font-variant-numeric: tabular-nums; }
.last-checked { color: var(--muted); font-size: 11px; }
.status-footnote { margin-top: 20px; }
.save-bar { position: sticky; bottom: 20px; margin-top: 28px; padding: 16px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 3; }
#view-sources:not([hidden]) ~ .save-bar { position: static; }
.save-bar strong { display: block; font-size: 13px; }
.save-bar span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.save-actions { display: flex; gap: 8px; }
.page-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; color: var(--faint); font-size: 11px; }
.page-footer .text-button { color: var(--muted); font-size: 11px; }
.modal { padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); margin: auto; }
.modal::backdrop { background: var(--overlay); }
body:has(.modal[open]) .welcome { visibility: hidden; }
.key-open .workspace { opacity: .25; }
.notice-modal { width: 660px; }
.notice-modal[open] { display: flex; flex-direction: column; }
.modal-heading { padding: 32px 32px 20px; }
.modal-heading h2 { font-size: 28px; letter-spacing: -.8px; margin-top: 12px; }
.notice-copy { overflow-y: auto; padding: 0 32px 12px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.modal-footer { padding: 20px 32px 28px; display: flex; justify-content: flex-end; flex: 0 0 auto; }
.key-modal { position: fixed; inset: 76px 0 0; z-index: 10; width: 480px; height: fit-content; max-height: calc(100dvh - 108px); padding: 32px; }
.key-modal-top { display: flex; align-items: center; margin-bottom: 24px; }
.key-brand { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 600; letter-spacing: -.8px; }
.key-mark { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: var(--tint); color: var(--accent); }
.key-mark .icon { width: 32px; height: 32px; stroke-width: 1.4; }
.key-modal h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.9px; margin: 12px 0 16px; }
.key-modal > p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 28px; }
.key-modal input { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 13px; }
#key-help { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; }
#key-help .icon { width: 13px; height: 13px; }
.key-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.key-actions .primary { flex: 1; }
.key-link { margin-top: 24px; text-align: center; color: var(--muted); font-size: 12px; }
.key-link .icon { width: 12px; height: 12px; margin-left: 2px; }
.form-error { color: var(--danger); font-size: 12px; line-height: 1.6; margin-top: 16px; }
.toast { position: fixed; z-index: 12; bottom: 28px; left: 50%; transform: translateX(-50%); padding: 12px 20px; max-width: calc(100vw - 32px); border-radius: 9999px; background: var(--ink); color: var(--canvas); font-size: 13px; text-align: center; }
.noscript { padding: 24px; text-align: center; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 184px minmax(0,1fr); padding: 0 28px; }
  .content { padding-left: 32px; }
  .hero-card { padding: 28px; gap: 12px; }
  .hero-copy h2 { font-size: 28px; }
  .breeze-art { width: 180px; flex-basis: 180px; }
  .summary-card { padding: 20px; }
  .summary-card .caption { font-size: 11px; }
}
@media (max-width: 833px) {
  .topbar-inner { padding: 0 32px; }
  .workspace { display: block; padding: 0 24px; }
  .sidebar { height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 0; top: 76px; z-index: 4; background: var(--canvas); }
  .sidebar-label, .sidebar-bottom, .nav-count { display: none; }
  .navigation { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
  .nav-item { justify-content: center; padding: 10px 8px; gap: 7px; font-size: 12px; }
  .content { padding: 32px 0 20px; }
  .page-heading h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .topbar, .topbar-inner { height: 68px; }
  .topbar-inner { padding: 0 28px; }
  .connection { font-size: 0; gap: 0; }
  .topbar-actions { gap: 16px; }
  .workspace { padding: 0 20px; }
  .sidebar { top: 68px; }
  .navigation { gap: 4px; }
  .nav-item { flex-direction: column; gap: 6px; font-size: 10px; min-height: 60px; }
  .nav-item .icon { width: 18px; height: 18px; }
  .page-heading { margin-bottom: 24px; }
  .page-heading h1 { font-size: 30px; letter-spacing: -1px; }
  .page-heading p { font-size: 13px; }
  .hero-card { padding: 28px 24px; }
  .hero-copy h2 { font-size: 28px; }
  .hero-copy p { font-size: 13px; }
  .breeze-art { display: none; }
  .summary-grid { grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
  .summary-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 20px; padding: 20px; }
  .summary-card strong { grid-column: 2; grid-row: 1 / 3; font-size: 28px; }
  .summary-card .summary-word { font-size: 23px; }
  .summary-card .caption { grid-column: 1; }
  .card { padding: 24px 20px; }
  .section-heading h2, .settings-card h2 { font-size: 19px; }
  .source-grid { grid-template-columns: 1fr; }
  .resolution-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .resolution-option:last-child { grid-column: 1 / -1; }
  .settings-card { flex-direction: column; align-items: flex-start; gap: 20px; }
  .range-value output { font-size: 28px; }
  .range-value label { font-size: 12px; }
  .chip { padding: 9px 12px; font-size: 11px; }
  .heading-with-action { flex-direction: column; align-items: flex-start; }
  .status-card { padding: 0 20px; }
  .status-columns { display: none; }
  .status-row { grid-template-columns: 1fr 1fr; gap: 12px; border-top: 0; border-bottom: 1px solid var(--line); padding: 22px 0; }
  .status-row:last-child { border-bottom: 0; }
  .status-row .source-status { justify-self: end; }
  .response-time { font-size: 11px; color: var(--muted); }
  .response-time::before { content: "Response: "; }
  .last-checked { text-align: right; font-size: 10px; }
  .save-bar { flex-direction: column; align-items: stretch; padding: 16px; bottom: 12px; }
  .save-actions { justify-content: flex-end; }
  .save-actions .button { flex: 1; }
  .page-footer { margin-top: 24px; }
  .key-modal { top: 68px; max-height: calc(100dvh - 100px); padding: 28px 24px; }
  .key-modal h2 { font-size: 28px; }
  .modal-heading { padding: 28px 24px 16px; }
  .notice-copy { padding: 0 24px 8px; font-size: 13px; }
  .modal-footer { padding: 16px 24px 24px; }
  .modal-footer .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
