:root {
  color: #1f2633;
  background: #fbf2e4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  font-synthesis: none;
  --ink: #1f2633;
  --muted: #5e6877;
  --rose: #e897a7;
  --rose-deep: #b94f68;
  --cream: #fff8ec;
  --sapphire: #1f4f82;
  --sapphire-dark: #143f73;
  --sky: #b8d8ef;
  --mint: #b8d9c3;
  --paper: rgba(255, 252, 246, 0.9);
  --line: rgba(31, 38, 51, 0.14);
  --danger: #a9362a;
  --shadow: 0 18px 48px rgba(77, 54, 61, 0.12);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(232, 151, 167, 0.3) 0 86px, transparent 87px),
    radial-gradient(circle at 8% 72%, rgba(184, 217, 195, 0.32) 0 110px, transparent 111px),
    linear-gradient(rgba(31, 79, 130, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 79, 130, 0.035) 1px, transparent 1px),
    #fbf2e4;
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
  color: var(--ink);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(31, 79, 130, 0.2); outline-offset: 2px; }
img { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(31, 79, 130, 0.14);
  background: rgba(255, 248, 236, 0.9);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--sapphire-dark); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid var(--sapphire); border-radius: 50%; background: var(--cream); color: var(--rose-deep); font: 900 18px Georgia, serif; }
.brand strong, .brand small { display: block; letter-spacing: 0; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 2px; color: var(--muted); font: 600 11px ui-monospace, monospace; }
.topbar-actions { min-width: 0; display: flex; align-items: center; gap: 12px; }
.header-link { border-bottom: 2px solid transparent; padding: 9px 2px 7px; color: var(--sapphire-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.header-link:hover, .header-link.is-active { border-bottom-color: var(--rose-deep); color: var(--rose-deep); }
.language-picker { position: relative; display: block; }
.language-picker select { height: 38px; border: 1px solid rgba(31, 79, 130, 0.2); border-radius: 6px; padding: 0 30px 0 10px; background: rgba(255, 255, 255, 0.72); color: var(--sapphire-dark); font-size: 11px; font-weight: 750; }
.access-state, .account-menu { display: flex; align-items: center; gap: 10px; color: var(--sapphire-dark); font-size: 12px; font-weight: 750; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f8c67; box-shadow: 0 0 0 4px rgba(47, 140, 103, 0.12); }
.account-menu > span { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }

main { min-height: calc(100vh - 136px); }
.section-kicker { color: var(--rose-deep); font-size: 11px; font-weight: 850; text-transform: uppercase; }
h1, h2, p { overflow-wrap: anywhere; }
h1, h2 { color: var(--sapphire-dark); letter-spacing: 0; }

.auth-layout {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 136px);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 88px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: clamp(38px, 7vw, 96px);
  align-items: center;
}
.auth-copy h1 { max-width: 690px; margin: 16px 0 20px; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(3.2rem, 7vw, 6.5rem); line-height: 0.98; font-weight: 700; }
.auth-copy > p { max-width: 610px; margin: 0; color: #465465; font-size: 17px; line-height: 1.8; }
.feature-strip { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-strip article { min-width: 0; padding: 18px 12px; display: flex; align-items: center; gap: 10px; color: var(--sapphire-dark); font-size: 12px; font-weight: 800; }
.feature-strip article + article { border-left: 1px solid var(--line); }
.feature-strip img, button img, .nav-button img { width: 18px; height: 18px; }
.feature-strip img { filter: invert(28%) sepia(74%) saturate(723%) hue-rotate(176deg) brightness(85%); }

.login-panel { min-width: 0; align-self: center; border: 2px solid rgba(31, 79, 130, 0.14); border-radius: 8px; padding: clamp(20px, 3vw, 30px); background: var(--paper); box-shadow: var(--shadow); }
.login-visual { height: 210px; margin-bottom: 26px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(31, 79, 130, 0.13); border-radius: 6px; background: linear-gradient(145deg, rgba(235, 246, 255, 0.86), rgba(255, 248, 236, 0.78)); }
.login-visual img { width: 100%; max-width: 380px; max-height: 200px; object-fit: contain; }
.flow-form { display: grid; gap: 14px; }
.flow-form h2 { margin: 5px 0 4px; font-size: 25px; }
label { color: #3c4858; font-size: 13px; font-weight: 750; }
input { width: 100%; height: 50px; border: 1px solid rgba(31, 79, 130, 0.22); border-radius: 6px; padding: 0 14px; background: rgba(255, 255, 255, 0.82); color: var(--ink); }
input::placeholder { color: #8a929d; }
textarea { width: 100%; min-height: 100px; resize: vertical; border: 1px solid rgba(31, 79, 130, 0.22); border-radius: 6px; padding: 12px 14px; background: rgba(255, 255, 255, 0.82); color: var(--ink); line-height: 1.5; }
.code-input { font: 800 26px ui-monospace, monospace; letter-spacing: 0; text-align: center; }
.sent-to { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.sent-to strong { color: var(--sapphire-dark); }
.text-button { border: 0; padding: 4px 8px; background: transparent; color: var(--sapphire); font-size: 12px; font-weight: 800; }
.terms-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.55; }
.terms-row input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--sapphire); }

.primary-button, .secondary-button, .danger-button, .icon-button {
  min-height: 44px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
}
.primary-button { border: 1px solid var(--sapphire); padding: 0 18px; background: var(--sapphire); color: white; }
.primary-button:hover { background: var(--sapphire-dark); }
.primary-button img, .danger-button img { filter: brightness(0) invert(1); }
.secondary-button { border: 1px solid rgba(31, 79, 130, 0.22); padding: 0 16px; background: rgba(255, 255, 255, 0.72); color: var(--sapphire-dark); }
.secondary-button:hover { background: rgba(184, 216, 239, 0.25); }
.danger-button { border: 1px solid var(--danger); padding: 0 18px; background: var(--danger); color: white; }
.compact { min-height: 40px; }
.full-width { width: 100%; }
.icon-button { width: 42px; min-height: 42px; border: 1px solid rgba(31, 79, 130, 0.18); padding: 0; background: rgba(255, 255, 255, 0.72); color: var(--sapphire-dark); }
.icon-button:hover { background: rgba(184, 216, 239, 0.3); }

.alert { margin-bottom: 16px; border: 1px solid rgba(169, 54, 42, 0.28); border-left: 4px solid var(--danger); border-radius: 4px; padding: 11px 13px; background: #fff0ed; color: #7e2e25; font-size: 13px; line-height: 1.5; }
.access-banner { margin-bottom: 22px; border: 1px solid rgba(185, 79, 104, 0.3); border-radius: 6px; padding: 12px 15px; background: rgba(232, 151, 167, 0.18); color: #7c3043; font-size: 12px; font-weight: 750; line-height: 1.55; }

.console-layout { width: min(1460px, 100%); min-height: calc(100vh - 136px); margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { min-width: 0; padding: 30px 20px; display: flex; flex-direction: column; border-right: 1px solid rgba(31, 79, 130, 0.14); background: rgba(255, 248, 236, 0.62); }
.sidebar nav { display: grid; gap: 7px; }
.nav-button { width: 100%; min-height: 44px; border: 0; border-radius: 6px; padding: 0 13px; display: flex; align-items: center; gap: 11px; background: transparent; color: #536070; font-size: 13px; font-weight: 750; text-align: left; }
.nav-button:hover { background: rgba(184, 216, 239, 0.22); }
.nav-button.is-active { background: var(--sapphire); color: white; }
.nav-button.is-active img { filter: brightness(0) invert(1); }
.endpoint-note { margin-top: auto; border-top: 1px solid var(--line); padding-top: 18px; }
.endpoint-note span { display: block; margin-bottom: 7px; color: var(--rose-deep); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.endpoint-note code { color: var(--sapphire-dark); font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
.console-content { min-width: 0; padding: clamp(30px, 5vw, 64px); }
.console-section { width: 100%; min-width: 0; max-width: 1120px; margin: 0 auto; }

.page-heading, .section-heading { min-width: 0; display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.page-heading > div, .section-heading > div { min-width: 0; max-width: 100%; }
.page-heading { margin-bottom: 32px; }
.page-heading h1 { margin: 8px 0 8px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; }
.page-heading p, .section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.section-heading { margin: 38px 0 16px; align-items: center; }
.section-heading h2 { margin: 0 0 5px; font-size: 20px; }
.refresh-button { flex: 0 0 auto; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-width: 0; min-height: 150px; border: 1px solid var(--line); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; background: rgba(255, 252, 246, 0.82); }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.metric-card strong { margin: auto 0 3px; color: var(--sapphire-dark); font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-mint { border-top: 5px solid var(--mint); }
.metric-sky { border-top: 5px solid var(--sky); }
.metric-rose { border-top: 5px solid var(--rose); }

.table-header, .key-row { display: grid; grid-template-columns: minmax(210px, 1.4fr) minmax(170px, 1fr) minmax(150px, 0.8fr) 44px; gap: 18px; align-items: center; }
.table-header { padding: 0 16px 10px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.key-list { display: grid; gap: 9px; }
.key-row { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 15px 16px; background: rgba(255, 252, 246, 0.86); box-shadow: 0 8px 20px rgba(31, 79, 130, 0.04); }
.key-row.compact-row { grid-template-columns: minmax(0, 1fr) 44px; }
.key-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.key-icon { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 6px; background: rgba(184, 217, 195, 0.42); }
.key-icon img { width: 19px; height: 19px; filter: invert(28%) sepia(74%) saturate(723%) hue-rotate(176deg) brightness(85%); }
.key-identity div, .key-meta { min-width: 0; }
.key-identity strong, .key-identity small, .key-meta span, .key-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-identity strong { color: var(--sapphire-dark); font-size: 13px; }
.key-identity small, .key-meta small { margin-top: 4px; color: var(--muted); font: 11px ui-monospace, monospace; }
.key-meta span { color: #465465; font-size: 12px; font-weight: 700; }
.status-badge { width: fit-content; border-radius: 999px; padding: 4px 8px; background: rgba(184, 217, 195, 0.48); color: #286348; font-size: 10px !important; font-weight: 850; }
.status-badge.blocked { background: rgba(232, 151, 167, 0.28); color: var(--danger); }
.revoke-button { color: var(--danger); }
.revoke-button img { filter: invert(25%) sepia(38%) saturate(2694%) hue-rotate(342deg) brightness(87%); }
.empty-state { border: 1px dashed rgba(31, 79, 130, 0.24); border-radius: 8px; padding: 28px 18px; color: var(--muted); font-size: 13px; text-align: center; }

.segmented-control { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(31, 79, 130, 0.2); border-radius: 6px; overflow: hidden; }
.segmented-control button { min-width: 62px; min-height: 38px; border: 0; border-right: 1px solid rgba(31, 79, 130, 0.16); background: rgba(255, 255, 255, 0.68); color: var(--muted); font-size: 12px; font-weight: 750; }
.segmented-control button:last-child { border-right: 0; }
.segmented-control button.is-active { background: var(--sapphire); color: white; }
.decisions-panel { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.decisions-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.decisions-heading h2 { margin: 0; font-size: 1.1rem; }
.decisions-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.decisions-account { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: rgba(184, 217, 195, 0.35); color: #286348; font-size: 11px; font-weight: 750; }
.decisions-notice { margin: 16px 0 0; padding: 11px 13px; border-radius: 6px; color: #775418; background: rgba(246, 218, 158, 0.3); font-size: 12px; line-height: 1.6; }
.decisions-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; margin: 22px 0 0; }
.decisions-metrics > div { min-width: 0; }
.decisions-metrics dt { color: var(--muted); font-size: 12px; font-weight: 750; }
.decisions-metrics dd { margin: 8px 0 5px; color: var(--sapphire-dark); font-size: clamp(1.05rem, 2.2vw, 1.45rem); font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.decisions-metrics dd strong { display: block; font: inherit; }
.decisions-metrics small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; }

.usage-grid { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 34px; }
.usage-grid .section-heading { margin-top: 0; }
.usage-bars, .model-list { display: grid; gap: 10px; }
.usage-bar-row { display: grid; grid-template-columns: 42px minmax(80px, 1fr) 125px; gap: 12px; align-items: center; color: var(--muted); font-size: 11px; }
.usage-bar-row strong { color: #465465; font-size: 11px; text-align: right; }
progress { width: 100%; height: 10px; border: 0; border-radius: 3px; overflow: hidden; background: rgba(31, 79, 130, 0.1); }
progress::-webkit-progress-bar { background: rgba(31, 79, 130, 0.1); }
progress::-webkit-progress-value { background: var(--sapphire); }
progress::-moz-progress-bar { background: var(--sapphire); }
.model-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.model-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--sapphire-dark); font-size: 12px; white-space: nowrap; }
.model-row span { color: var(--muted); font-size: 10px; }
.model-row b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--rose-deep); font-size: 13px; }
.history-heading { margin-top: 46px; }
.history-table { min-width: 0; overflow-x: auto; }
.history-header, .history-row { min-width: 760px; display: grid; grid-template-columns: 150px minmax(220px, 1fr) minmax(130px, 0.7fr) 90px 70px; gap: 14px; align-items: center; }
.history-header { border-bottom: 1px solid var(--line); padding: 10px 12px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.history-row { border-bottom: 1px solid rgba(31, 38, 51, 0.08); padding: 13px 12px; color: #465465; font-size: 11px; }
.history-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-status { font-weight: 800; }
.history-status.success { color: #28704f; }
.history-status.failed { color: var(--danger); }
.history-status.pending { color: #89601d; }

.admin-heading-actions { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 10px; }
.emergency-panel { margin-bottom: 18px; border: 1px solid rgba(31, 79, 130, 0.16); border-left: 5px solid var(--mint); border-radius: 8px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(255, 252, 246, 0.88); }
.emergency-panel.is-paused { border-left-color: var(--danger); background: rgba(255, 240, 237, 0.86); }
.emergency-panel > div { display: flex; align-items: center; gap: 14px; }
.emergency-panel .emergency-actions { flex: 0 0 auto; gap: 8px; }
.emergency-panel h2 { margin: 4px 0 3px; font-size: 18px; }
.emergency-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.service-status-dot { width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; background: #2f8c67; box-shadow: 0 0 0 5px rgba(47, 140, 103, 0.12); }
.emergency-panel.is-paused .service-status-dot, .service-status-dot.is-down { background: var(--danger); box-shadow: 0 0 0 5px rgba(169, 54, 42, 0.12); }
.admin-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-metric-grid .metric-card { min-height: 130px; }
.source-health { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.source-chip { border: 1px solid rgba(31, 79, 130, 0.14); border-radius: 999px; padding: 6px 9px; background: rgba(184, 217, 195, 0.3); color: #286348; font-size: 10px; font-weight: 800; }
.source-chip.is-down { background: rgba(232, 151, 167, 0.22); color: var(--danger); }
.admin-table-scroll { min-width: 0; overflow-x: auto; }
.admin-user-header, .admin-user-row { min-width: 820px; display: grid; grid-template-columns: minmax(240px, 1.4fr) 130px 110px 130px 100px; gap: 14px; align-items: center; }
.admin-key-header, .admin-key-row { min-width: 900px; display: grid; grid-template-columns: minmax(280px, 1.5fr) 150px 150px 100px 100px; gap: 14px; align-items: center; }
.audit-header, .audit-row { min-width: 960px; display: grid; grid-template-columns: 150px minmax(210px, 1fr) 170px minmax(220px, 1.2fr) 90px; gap: 14px; align-items: center; }
.admin-user-header, .admin-key-header, .audit-header { border-bottom: 1px solid var(--line); padding: 0 12px 9px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.admin-list { display: grid; }
.admin-user-row, .admin-key-row, .audit-row { border-bottom: 1px solid rgba(31, 38, 51, 0.09); padding: 13px 12px; color: #465465; font-size: 11px; }
.admin-user-row strong, .admin-key-row strong, .audit-row strong { display: block; color: var(--sapphire-dark); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-row small, .admin-key-row small, .audit-row small { display: block; margin-top: 3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row-usage b { display: block; color: var(--sapphire-dark); font-size: 12px; }
.admin-row-usage small { margin-top: 3px; }
.admin-control-button { min-height: 34px; border: 1px solid rgba(31, 79, 130, 0.2); border-radius: 5px; padding: 0 10px; background: rgba(255, 255, 255, 0.72); color: var(--sapphire-dark); font-size: 10px; font-weight: 800; }
.admin-control-button.is-danger { border-color: rgba(169, 54, 42, 0.28); color: var(--danger); }
.admin-control-button:disabled { opacity: 0.45; }
.admin-model-list { max-width: 720px; }
.audit-outcome { font-weight: 850; text-transform: capitalize; }
.audit-outcome.success { color: #28704f; }
.audit-outcome.partial, .audit-outcome.failed { color: var(--danger); }

.modal { width: min(500px, calc(100% - 28px)); max-height: calc(100vh - 28px); border: 1px solid rgba(31, 79, 130, 0.18); border-radius: 8px; padding: 26px; background: var(--cream); color: var(--ink); box-shadow: 0 28px 90px rgba(31, 38, 51, 0.28); }
.modal::backdrop { background: rgba(20, 33, 48, 0.48); backdrop-filter: blur(4px); }
.modal form, .modal[open] { gap: 18px; }
.modal form { display: grid; }
.modal h2 { margin: 5px 0 6px; font-size: 24px; }
.modal p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.modal-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: rgba(184, 216, 239, 0.38); }
.modal-icon img { width: 22px; height: 22px; filter: invert(28%) sepia(74%) saturate(723%) hue-rotate(176deg) brightness(85%); }
.modal-icon.success { background: rgba(184, 217, 195, 0.46); }
.modal-icon.danger { background: rgba(232, 151, 167, 0.28); }
.modal-icon.danger img { filter: invert(25%) sepia(38%) saturate(2694%) hue-rotate(342deg) brightness(87%); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reveal-modal[open], .danger-modal[open] { display: grid; }
.key-output-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px 42px; gap: 7px; }
.key-output-row input { min-width: 0; font: 12px ui-monospace, monospace; }
.access-details { margin: 0; border-top: 1px solid var(--line); }
.access-details div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); padding: 11px 0; }
.access-details dt { color: var(--muted); font-size: 11px; }
.access-details dd { margin: 0; color: var(--sapphire-dark); font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }

.about-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.about-hero { min-height: 560px; padding: clamp(64px, 10vw, 118px) 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr); gap: clamp(44px, 8vw, 100px); align-items: center; }
.about-hero h1 { max-width: 760px; margin: 16px 0 22px; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(3.4rem, 7vw, 6.4rem); line-height: 0.98; }
.about-hero-copy > p { max-width: 700px; margin: 0; color: #465465; font-size: 17px; line-height: 1.8; }
.service-path { border: 2px solid rgba(31, 79, 130, 0.14); border-radius: 8px; padding: 26px; background: var(--paper); box-shadow: var(--shadow); }
.service-path-steps { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center; }
.service-path-steps span { border: 1px solid rgba(31, 79, 130, 0.16); border-radius: 6px; padding: 13px 15px; background: rgba(184, 216, 239, 0.16); color: var(--sapphire-dark); font-size: 12px; font-weight: 800; }
.service-path-steps b { color: var(--rose-deep); }
.service-path-steps span:last-child { grid-column: 1; }
.service-endpoint { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.service-endpoint span { display: block; margin-bottom: 7px; color: var(--rose-deep); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.service-endpoint code { color: var(--sapphire-dark); font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.about-section { padding: clamp(72px, 9vw, 108px) 0; border-top: 1px solid var(--line); }
.about-section-heading { max-width: 720px; }
.about-section-heading h2, .commitments-panel h2 { margin: 9px 0 12px; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.05; }
.about-section-heading > p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.purpose-grid { margin-top: 42px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.purpose-grid article { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 26px; background: rgba(255, 252, 246, 0.82); }
.purpose-grid article:nth-child(1) { border-top: 5px solid var(--mint); }
.purpose-grid article:nth-child(2) { border-top: 5px solid var(--sky); }
.purpose-grid article:nth-child(3) { border-top: 5px solid var(--rose); }
.purpose-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; background: rgba(184, 216, 239, 0.3); }
.purpose-icon img { width: 22px; height: 22px; filter: invert(28%) sepia(74%) saturate(723%) hue-rotate(176deg) brightness(85%); }
.purpose-grid h3, .timeline h3 { color: var(--sapphire-dark); }
.purpose-grid h3 { margin: 23px 0 10px; font-size: 18px; }
.purpose-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.commitments-panel { margin: 0 0 clamp(72px, 9vw, 108px); border-radius: 10px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr); gap: clamp(40px, 8vw, 90px); background: var(--sapphire-dark); }
.commitments-panel .section-kicker { color: var(--rose); }
.commitments-panel h2 { margin-bottom: 0; color: white; }
.commitment-list { margin: 0; padding: 0; list-style: none; }
.commitment-list li { border-top: 1px solid rgba(255, 255, 255, 0.2); padding: 17px 0; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.commitment-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.commitment-list span { color: var(--rose); font: 800 11px ui-monospace, monospace; }
.commitment-list p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 13px; line-height: 1.65; }
.updates-section { padding-top: 0; border-top: 0; }
.timeline { max-width: 900px; margin: 44px 0 38px; }
.timeline article { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px; padding: 0 0 34px 24px; }
.timeline article::before { content: ""; position: absolute; top: 5px; left: 0; width: 9px; height: 9px; border: 3px solid var(--cream); border-radius: 50%; background: var(--rose-deep); box-shadow: 0 0 0 1px var(--rose-deep); }
.timeline article::after { content: ""; position: absolute; top: 19px; bottom: 0; left: 5px; width: 1px; background: rgba(31, 79, 130, 0.2); }
.timeline article:last-child::after { display: none; }
.timeline time { padding-top: 1px; color: var(--rose-deep); font: 800 11px ui-monospace, monospace; }
.timeline h3 { margin: 0 0 7px; font-size: 17px; }
.timeline p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.about-cta { width: fit-content; text-decoration: none; }

footer { min-height: 64px; padding: 0 clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(31, 79, 130, 0.14); background: rgba(255, 248, 236, 0.72); color: var(--muted); font-size: 11px; font-weight: 650; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; width: min(680px, calc(100% - 32px)); }
  .auth-copy h1 { font-size: clamp(3.2rem, 13vw, 5.6rem); }
  .console-layout { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 72px; z-index: 15; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(255, 248, 236, 0.94); }
  .sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .sidebar nav.admin-mode { grid-template-columns: repeat(4, 1fr); }
  .nav-button { justify-content: center; }
  .endpoint-note { display: none; }
  .usage-grid { grid-template-columns: 1fr; }
  .admin-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-header { display: none; }
  .key-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .key-row > .key-meta { grid-column: 1; padding-left: 52px; }
  .key-row > .revoke-button { grid-column: 2; grid-row: 1; }
  .about-hero { grid-template-columns: 1fr; }
  .service-path { max-width: 560px; }
  .commitments-panel { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .decisions-panel { padding: 18px; }
  .decisions-heading { flex-wrap: wrap; gap: 10px; }
  .decisions-metrics { grid-template-columns: 1fr; gap: 18px; }
  body { overflow-x: hidden; }
  .topbar { padding: 0 12px; gap: 8px; }
  .brand { min-width: 0; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; font-size: 16px; }
  .brand strong { font-size: 12px; white-space: nowrap; }
  .topbar-actions { flex: 0 1 auto; gap: 6px; }
  .language-picker select { width: 88px; padding-right: 20px; }
  .account-menu { gap: 4px; }
  .brand small, .access-state { display: none; }
  .account-menu > span { display: none; }
  .header-link { font-size: 11px; }
  .auth-layout { padding: 34px 0 48px; }
  .auth-copy h1 { font-size: 3.35rem; }
  .auth-copy > p { font-size: 15px; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature-strip article + article { border-top: 1px solid var(--line); border-left: 0; }
  .login-visual { height: 170px; }
  .console-layout, .console-content, .console-section { width: 100%; max-width: 100%; min-width: 0; }
  .console-content { padding: 28px 16px 46px; }
  .nav-button { padding: 0 7px; font-size: 11px; }
  .nav-button img { width: 16px; height: 16px; }
  .page-heading { width: 100%; max-width: 100%; align-self: stretch; flex-direction: column; }
  .page-heading h1 { max-width: 100%; font-size: 2rem; }
  .page-heading > button, .page-heading .segmented-control { width: 100%; }
  .admin-heading-actions { width: 100%; max-width: 100%; align-self: stretch; flex-direction: column; }
  .admin-heading-actions > * { width: 100%; }
  .admin-heading-actions .segmented-control { min-width: 0; max-width: 100%; flex: 1 1 auto; }
  .admin-heading-actions .segmented-control button { min-width: 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 118px; }
  .metric-card strong { font-size: 2.5rem; }
  .section-heading { align-items: flex-end; }
  .key-row > .key-meta { display: none; }
  .usage-bar-row { grid-template-columns: 36px minmax(70px, 1fr) 104px; gap: 8px; }
  .usage-bar-row strong { font-size: 10px; }
  .sidebar nav.admin-mode { grid-template-columns: repeat(2, 1fr); }
  .emergency-panel { align-items: stretch; flex-direction: column; }
  .emergency-panel > button { width: 100%; }
  .emergency-panel .emergency-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .admin-metric-grid { grid-template-columns: 1fr; }
  .about-main { width: min(calc(100% - 32px), 680px); }
  .about-hero { min-height: 0; padding: 54px 0 68px; gap: 36px; }
  .about-hero h1 { font-size: 3.25rem; }
  .about-hero-copy > p { font-size: 15px; }
  .purpose-grid { grid-template-columns: 1fr; }
  .commitments-panel { margin-right: -8px; margin-left: -8px; }
  .timeline article { grid-template-columns: 1fr; gap: 8px; padding-left: 22px; }
  footer { padding: 18px; flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
