/* SautiLink's shared iOS shell, with directory-specific layout and theme tokens. */
:root {
  --proxy-blue-soft: #edf4ff;
  --proxy-green: #137347;
  --proxy-green-soft: #eaf6ef;
  --proxy-orange: #805300;
  --proxy-orange-soft: #fff4dc;
  --proxy-red: #ae3535;
  --proxy-red-soft: #fff0ef;
  --proxy-header: rgb(250 250 252 / 92%);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101114;
  --bg-elevated: #1a1c21;
  --bg-card: #1c1e24;
  --bg-card-hover: #23262e;
  --surface: #1c1e24;
  --surface-strong: #242730;
  --border: #3b3e48;
  --border-subtle: #30333c;
  --text: #f3f4f7;
  --text-muted: #b0b3bf;
  --text-dim: #a1a6b3;
  --accent: #568eff;
  --accent-hover: #8ab2ff;
  --accent-soft: #1b2e4a;
  --brand-light-blue: #8ab2ff;
  --shadow: 0 8px 30px rgb(0 0 0 / 12%);
  --proxy-blue-soft: #1b2a44;
  --proxy-green: #7cdbab;
  --proxy-green-soft: #182e24;
  --proxy-orange: #ecc16a;
  --proxy-orange-soft: #332b1c;
  --proxy-red: #ffaaaa;
  --proxy-red-soft: #362123;
  --proxy-header: rgb(20 21 25 / 92%);
}
html[data-theme="dark"] body[data-proxy-page] {
  --panel: var(--surface);
  --panel-strong: var(--surface);
  --panel-soft: var(--surface-strong);
  --line: var(--border-subtle);
}
body[data-proxy-page] .site-header { background: var(--proxy-header); }
body[data-proxy-page] .nav { background-color: transparent; }
body[data-proxy-page] .brand-mark { box-shadow: none; border-radius: 0; }
body[data-proxy-page] .proxy-icon-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.proxy-icon-button > .public-icon { width: 20px; height: 20px; }
.proxy-language { font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.proxy-icon-button:hover { border-color: var(--accent); }
.proxy-page { padding: 64px 0 0; }
.proxy-layout { display: grid; gap: 36px; }
.proxy-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .8fr); align-items: center; gap: 72px; }
.proxy-kicker { margin: 0; color: var(--text-muted); font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.proxy-hero-copy > .proxy-kicker { margin-bottom: 20px; }
.proxy-title-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-hover); font-weight: 650; font-size: 13px; }
.proxy-title-mark > .public-icon { width: 30px; height: 30px; }
.proxy-hero h1 { margin: 15px 0 20px; font-size: clamp(36px, 4.7vw, 60px); font-weight: 650; line-height: 1.07; letter-spacing: -.055em; white-space: pre-line; }
.proxy-lead { max-width: 490px; margin: 0 0 20px; color: var(--text-muted); font-size: 19px; line-height: 1.6; }
.proxy-inline-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-hover); font-size: 14px; font-weight: 550; min-height: 44px; }
.proxy-inline-link > .public-icon { width: 18px; height: 18px; }
.proxy-hero-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.proxy-monitor { min-width: 0; padding: 28px; border: 1px solid var(--border-subtle); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: 90px; }
.proxy-monitor-heading { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.proxy-monitor-heading .proxy-kicker { font-size: 10px; letter-spacing: .04em; }
.proxy-monitor-icon { display: flex; color: var(--accent); }
.proxy-monitor-icon .public-icon { width: 19px; height: 19px; }
.proxy-monitor-badge { margin-left: auto; padding: 4px 9px; background: var(--bg-elevated); border-radius: 8px; font-size: 11px; font-weight: 650; }
.proxy-monitor-badge[data-state="ready"] { background: var(--proxy-green-soft); color: var(--proxy-green); }
.proxy-monitor-badge:is([data-state="warming"], [data-state="stale"]) { background: var(--proxy-orange-soft); color: var(--proxy-orange); }
.proxy-monitor-badge:is([data-state="unavailable"], [data-state="error"]) { background: var(--proxy-red-soft); color: var(--proxy-red); }
.proxy-monitor h2 { margin: 20px 0 9px; font-size: 25px; line-height: 1.2; letter-spacing: -.035em; }
.proxy-monitor > p:not(.proxy-refresh-note) { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; line-height: 1.65; }
.proxy-snapshot-line { display: flex; align-items: flex-start; gap: 7px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.proxy-snapshot-line .public-icon { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; }
body[data-proxy-page] .proxy-refresh { margin-top: 20px; width: 100%; gap: 8px; font-size: 14px; }
.proxy-refresh .public-icon { width: 19px; height: 19px; }
.proxy-refresh-note { color: var(--text-muted); font-size: 11px; line-height: 1.6; margin: 12px 0 0; }
.proxy-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; padding: 1px; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 22px; background: var(--border-subtle); }
.proxy-metric { display: flex; flex-direction: column; padding: 22px 26px; min-width: 0; background: var(--bg-elevated); }
.proxy-metric-label { color: var(--text-muted); font-size: 12px; font-weight: 550; }
.proxy-metric > strong { color: var(--text); font-size: 36px; font-weight: 600; line-height: 1.4; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.proxy-metric:first-child > strong { color: var(--proxy-green); }
.proxy-metric-note { font-size: 11px; color: var(--text-muted); }
.proxy-directory { padding-top: 26px; scroll-margin-top: 90px; }
.proxy-directory-heading { display: flex; gap: 20px; align-items: end; justify-content: space-between; margin-bottom: 26px; }
.proxy-directory-heading h2 { margin: 7px 0 0; font-size: clamp(26px, 3vw, 34px); font-weight: 600; line-height: 1.2; letter-spacing: -.045em; }
.proxy-readonly-note { display: inline-flex; flex: 0 0 auto; gap: 6px; align-items: center; font-size: 12px; color: var(--text-muted); }
.proxy-readonly-note .public-icon { width: 17px; height: 17px; color: var(--proxy-green); }
.proxy-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
.proxy-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.proxy-filter { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface); color: var(--text-muted); font-size: 12px; font-weight: 550; cursor: pointer; }
.proxy-filter:hover { background: var(--bg-elevated); color: var(--text); }
.proxy-filter[aria-pressed="true"] { color: var(--accent-hover); background: var(--proxy-blue-soft); border-color: var(--accent); }
.proxy-filter-count { font-size: 10px; line-height: 1.3; font-variant-numeric: tabular-nums; padding: 2px 4px; border-radius: 4px; background: var(--bg-elevated); }
.proxy-filter > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.proxy-sort { display: flex; flex-direction: column; gap: 4px; flex: 0 1 200px; min-width: 0; }
.proxy-sort label { color: var(--text-muted); font-size: 11px; }
.proxy-sort select { max-width: 100%; min-height: 44px; padding: 9px 29px 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 12px; }
.proxy-results-caption { margin: 18px 0; color: var(--text-muted); font-size: 12px; min-height: 1.6em; }
.proxy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.proxy-card { min-width: 0; padding: 23px; border: 1px solid var(--border-subtle); border-radius: 22px; background: var(--surface); }
.proxy-card-header { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.proxy-card-header > div { min-width: 0; }
.proxy-card-title { font-size: 16px; line-height: 1.4; letter-spacing: -.02em; font-weight: 650; margin: 0 0 4px; overflow-wrap: anywhere; }
.proxy-endpoint { display: block; color: var(--text-muted); font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; line-height: 1.6; }
.proxy-state { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; border-radius: 7px; padding: 5px 7px; font-size: 10px; font-weight: 600; background: var(--bg-elevated); color: var(--text-muted); }
.proxy-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.proxy-state[data-state="active"] { background: var(--proxy-green-soft); color: var(--proxy-green); }
.proxy-state[data-state="offline"] { background: var(--proxy-red-soft); color: var(--proxy-red); }
.proxy-state:is([data-state="unstable"], [data-state="stale"]) { background: var(--proxy-orange-soft); color: var(--proxy-orange); }
.proxy-card-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 19px 0 17px; margin: 0; }
.proxy-card-metrics dt { color: var(--text-muted); font-size: 10px; margin-bottom: 3px; }
.proxy-card-metrics dd { margin: 0; font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.proxy-card-metrics abbr { text-decoration: none; }
.proxy-location { display: flex; align-items: flex-start; gap: 6px; color: var(--text-muted); font-size: 11px; line-height: 1.6; margin: 0 0 17px; }
.proxy-location .public-icon { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }
.proxy-location span { overflow-wrap: anywhere; }
.proxy-card-footer { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.proxy-details { flex: 1 1 125px; min-width: 0; }
.proxy-details summary { min-height: 44px; display: flex; align-items: center; width: fit-content; gap: 6px; font-size: 12px; cursor: pointer; color: var(--text-muted); list-style: none; }
.proxy-details summary::-webkit-details-marker, .proxy-status-guide summary::-webkit-details-marker { display: none; }
.proxy-details summary > .public-icon { width: 14px; height: 14px; flex: 0 0 14px; }
.proxy-details[open] summary > .public-icon { transform: rotate(180deg); }
.proxy-details dl { margin: 8px 0 0; display: grid; gap: 10px; }
.proxy-details dt { font-size: 10px; color: var(--text-muted); }
.proxy-details dd { margin: 2px 0 0; font-size: 11px; overflow-wrap: anywhere; }
body[data-proxy-page] .proxy-connect { flex: 0 0 auto; font-size: 12px; min-height: 44px; padding: 10px 17px; gap: 7px; border-radius: 12px; }
.proxy-connect .public-icon { width: 16px; height: 16px; }
.proxy-connect:disabled { background: var(--bg-elevated) !important; border-color: var(--border-subtle); color: var(--text-muted) !important; opacity: 1; cursor: not-allowed; }
.proxy-notice { margin-bottom: 18px; padding: 15px 17px; border: 1px solid var(--border-subtle); border-radius: 14px; font-size: 13px; line-height: 1.65; color: var(--proxy-orange); background: var(--proxy-orange-soft); }
#proxy-error { color: var(--proxy-red); background: var(--proxy-red-soft); }
.proxy-empty { padding: 48px 24px; border: 1px dashed var(--border); border-radius: 22px; text-align: center; }
.proxy-empty-icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; color: var(--text-muted); background: var(--bg-elevated); border-radius: 16px; }
.proxy-empty-icon .public-icon { width: 27px; height: 27px; }
.proxy-empty h3 { font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.03em; margin: 18px 0 10px; }
.proxy-empty p { color: var(--text-muted); font-size: 14px; max-width: 460px; margin: 0 auto 20px; line-height: 1.65; }
.proxy-pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 28px; }
.proxy-pagination .btn { font-size: 12px; gap: 7px; }
.proxy-pagination .public-icon { width: 17px; height: 17px; }
.proxy-pagination > span { text-align: center; font-size: 12px; color: var(--text-muted); }
body[data-proxy-page] button:disabled { cursor: not-allowed; opacity: .6; }
body[data-proxy-page] .proxy-connect:disabled { opacity: 1; }
.proxy-guide { padding: 52px 0 72px; margin-top: 12px; border-top: 1px solid var(--border-subtle); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 70px; scroll-margin-top: 90px; }
.proxy-guide-intro h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -.045em; line-height: 1.14; margin: 13px 0 17px; white-space: pre-line; }
.proxy-guide-intro > p:last-child { color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.proxy-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 27px; }
.proxy-steps li { display: flex; gap: 14px; align-items: flex-start; }
.proxy-step-number { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-hover); background: var(--proxy-blue-soft); font-size: 12px; font-weight: 650; }
.proxy-steps h3 { font-size: 15px; font-weight: 600; margin: 3px 0 7px; line-height: 1.4; }
.proxy-steps p { font-size: 13px; line-height: 1.7; color: var(--text-muted); margin: 0; }
.proxy-status-guide { margin-top: 28px; padding: 5px 17px; background: var(--bg-elevated); border-radius: 14px; }
.proxy-status-guide summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 550; }
.proxy-status-guide summary .public-icon { flex: 0 0 17px; width: 17px; height: 17px; }
.proxy-status-guide summary .public-icon:last-child { margin-left: auto; }
.proxy-status-guide[open] summary .public-icon:last-child { transform: rotate(180deg); }
.proxy-status-guide dl { display: grid; gap: 14px; margin: 10px 0 14px; }
.proxy-status-guide dt { font-size: 12px; font-weight: 650; }
.proxy-status-guide dd { color: var(--text-muted); font-size: 12px; line-height: 1.65; margin: 3px 0 0; }
.proxy-community-note { color: var(--text-muted); font-size: 11px; line-height: 1.75; margin: 20px 0 0; }
.proxy-footer-main { display: flex; gap: 24px; align-items: start; justify-content: space-between; }
.proxy-footer-links { display: flex; gap: 8px 28px; flex-wrap: wrap; justify-content: end; max-width: 440px; }
.proxy-footer-links a { font-size: 12px; color: var(--text-muted); min-height: 44px; display: inline-flex; align-items: center; }
.proxy-corporation { color: var(--accent-hover); display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 550; }
html[data-theme="dark"] body[data-proxy-page] .btn-primary { background: #2563eb; color: #fff; }
html[data-theme="dark"] body[data-proxy-page] .btn-primary:hover { background: #1d4ed8; }
html[data-theme="dark"] body[data-proxy-page] ::selection { background: #335e9c; color: #fff; }
@media (max-width: 1060px) {
  body[data-proxy-page] .nav { background: var(--surface); }
  .proxy-hero { gap: 34px; }
  .proxy-monitor { padding: 23px; }
}
@media (max-width: 760px) {
  .proxy-page { padding-top: 42px; }
  .proxy-hero { grid-template-columns: 1fr; gap: 29px; }
  .proxy-hero-copy { max-width: 550px; }
  .proxy-hero h1 { font-size: clamp(38px, 8vw, 56px); }
  .proxy-monitor { display: block; }
  .proxy-monitor h2 { margin-top: 17px; }
  .proxy-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proxy-metric { padding: 18px 21px; }
  .proxy-directory-heading { align-items: start; flex-direction: column; gap: 12px; }
  .proxy-grid { grid-template-columns: 1fr; }
  .proxy-sort { flex-basis: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .proxy-sort select { flex: 0 1 225px; min-width: 0; }
  .proxy-guide { grid-template-columns: 1fr; gap: 30px; padding: 38px 0 48px; }
  .proxy-guide-intro { max-width: 460px; }
  .proxy-footer-main { flex-direction: column; }
  .proxy-footer-links { justify-content: start; gap: 4px 20px; }
}
@media (max-width: 420px) {
  body[data-proxy-page] .container { width: calc(100% - 32px); }
  body[data-proxy-page] .brand-text { display: none; }
  .proxy-layout { gap: 28px; }
  .proxy-hero h1 { font-size: 37px; }
  .proxy-lead { font-size: 17px; }
  .proxy-monitor { padding: 21px; border-radius: 22px; }
  .proxy-metric { padding: 16px; }
  .proxy-metric-label { font-size: 11px; }
  .proxy-metric-note { font-size: 10px; }
  .proxy-directory { padding-top: 15px; }
  .proxy-directory-heading h2 { font-size: 27px; }
  .proxy-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .proxy-filter { min-width: 0; font-size: 11px; gap: 3px; padding: 9px 6px; }
  .proxy-filter-count { padding-inline: 3px; font-size: 9px; }
  .proxy-sort { gap: 10px; }
  .proxy-sort label { flex: 0 0 auto; }
  .proxy-sort select { font-size: 11px; }
  .proxy-card { padding: 19px 17px; border-radius: 19px; }
  .proxy-card-header { gap: 8px; }
  .proxy-card-title { font-size: 15px; }
  .proxy-state { padding: 5px; font-size: 9px; }
  .proxy-card-metrics { gap: 8px; }
  .proxy-card-metrics dt { font-size: 9px; }
  .proxy-card-metrics dd { font-size: 12px; }
  .proxy-pagination { gap: 8px; justify-content: space-between; }
  body[data-proxy-page] .proxy-pagination .btn { padding: 10px; font-size: 11px; }
  .proxy-pagination > span { font-size: 10px; }
  .proxy-empty { padding: 35px 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body[data-proxy-page] *, body[data-proxy-page] *::before { transition: none !important; animation: none !important; }
}
