:root {
  color-scheme: light;
  --page: #f3f5f0;
  --ink: #182725;
  --muted: #4e6662;
  --line: #dce6df;
  --panel: #fff;
  --rail: #112c29;
  --accent: #afe4bd;
  --action: #195842;
  --action-hover: #124333;
  --radius: 19px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 1rem;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); line-height: 1.6; }
[hidden] { display: none !important; }
a { color: var(--action); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #307657; outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.19; letter-spacing: -.045em; }
h2 { font-size: 1.3rem; line-height: 1.35; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }
p + p { margin-top: .7rem; }
.muted { color: var(--muted); }
.mono, code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9rem; overflow-wrap: anywhere; }
.skip { position: fixed; top: .5rem; left: .5rem; transform: translateY(-180%); z-index: 5; background: var(--panel); padding: .5rem 1rem; }
.skip:focus { transform: none; }
.signed-in { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; padding: 1.75rem 1rem 1rem; background: var(--rail); color: #eef7ef; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; font-size: 1.17rem; font-weight: 720; }
.sidebar .brand { padding: 0 .55rem; margin-bottom: 2.3rem; }
.brand-mark { position: relative; flex: none; width: 2rem; height: 2rem; border-radius: 8px; background: var(--accent); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 26% 35%; border: 2px solid #234b3b; border-radius: 50%; transform: rotate(40deg); }
.brand-mark::after { inset: 35% 26%; }
.sidebar nav { display: grid; gap: .24rem; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; border-radius: 8px; min-height: 2.7rem; padding: .4rem .6rem; color: #d8e9df; text-decoration: none; font-size: .94rem; }
.sidebar nav a span { width: 1.3rem; color: #b4d7c2; text-align: center; font-size: 1.18rem; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #294840; color: #fff; }
.sidebar nav a[aria-current] { box-shadow: inset 3px 0 var(--accent); }
.sidebar :focus-visible { outline-color: var(--accent); }
.admin-nav { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid #34504b; }
.admin-nav p { color: #c1d7ca; font-size: .875rem; margin-left: .65rem; }
.sidebar-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: auto; padding: 1.2rem .25rem .3rem; }
.sidebar-footer > div { min-width: 0; }
.sidebar-footer small { display: block; color: #c1d7ca; font-size: .79rem; overflow-wrap: anywhere; }
.sidebar-footer form { flex-basis: 100%; }
.avatar { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; background: #34584d; border-radius: 50%; font-weight: 650; }
.signout { color: #edf7f0; border-color: #537568; background: transparent; min-height: 2.1rem; }
.signout:hover { background: #34584d; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem clamp(1.1rem, 4vw, 3rem); min-height: 4.1rem; border-bottom: 1px solid var(--line); background: #fafbf8; color: var(--muted); font-size: .92rem; }
.environment { display: inline-flex; width: fit-content; white-space: nowrap; border-radius: 6px; padding: .15rem .55rem; background: #e6eee3; color: #315443; font-size: .875rem; font-weight: 650; }
.content { max-width: 1270px; margin: 0 auto; padding: 2.25rem clamp(1rem, 4vw, 3rem) 3rem; }
.page-title { margin: 0 0 1.65rem; }
.page-title p { margin-top: .55rem; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.body-panel { margin-bottom: 1rem; padding: clamp(1.1rem, 3vw, 1.7rem); }
.body-panel h2 + p, .body-panel h2 + form { margin-top: .6rem; }
.body-panel p + .button, .body-panel p + a { margin-top: .8rem; display: inline-flex; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
.dashboard { display: grid; grid-template-columns: 1.45fr 1fr; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.gateway-panel { overflow: hidden; margin-bottom: 1rem; }
.gateway-head { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 9.9rem; padding: 1.35rem clamp(1rem, 3vw, 1.65rem); background: radial-gradient(ellipse at 87% 10%, #326c54 0, #1c4539 40%, #183a33 75%); color: #eff9f1; }
.gateway-head p { color: #d4eece; font-size: .875rem; }
.gateway-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.85rem); line-height: 1.1; margin: .15rem 0 .3rem; }
.gateway-head .mono { color: #c3e3d0; }
.relay { width: 14rem; aspect-ratio: 1; position: absolute; top: 50%; right: 0; transform: translateY(-50%); z-index: -1; }
.relay i, .relay b { position: absolute; border-radius: 50%; }
.relay i { inset: 7%; border: 1px solid #a9e9bb38; }
.relay i:nth-child(2) { inset: 19%; }
.relay i:nth-child(3) { inset: 32%; }
.relay b { inset: 43%; background: #b7f1c7; box-shadow: 0 0 1.9rem #afe4bd8a; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem .85rem; padding: 1.15rem clamp(1rem, 3vw, 1.65rem); margin: 0; }
.facts dt { font-size: .875rem; color: var(--muted); margin-bottom: .15rem; }
.facts dd { margin: 0; font-size: .93rem; font-weight: 590; overflow-wrap: anywhere; }
.panel-note { padding: 0 1.6rem 1rem; color: #843e25; }
.text-link { display: inline-block; margin-top: -.4rem; font-weight: 650; }
.status { white-space: nowrap; vertical-align: baseline; display: inline-block; padding: .12rem .55rem; border-radius: 999px; background: #edf0ef; color: #384f49; font-size: .875rem; font-weight: 650; }
.status-ready, .status-RUNNING, .status-connected, .status-applied { background: #d9f0df; color: #24553c; }
.status-pending, .status-STARTING, .status-STOPPING, .status-revoking { background: #f9edca; color: #684b11; }
.status-failed, .status-timeout, .status-revoked { background: #f7e6e2; color: #773a30; }
.count { display: inline-grid; place-items: center; min-width: 2rem; min-height: 2rem; border-radius: 50%; color: #264e3a; background: #e1f0e5; font-weight: 650; }
.device-summary > .button { margin-top: .8rem; }
.device-preview { padding: 0; list-style: none; margin: 0; }
.device-preview li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.device-preview .mono { display: block; }
.quick-links, .sop-grid, .downloads-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.downloads-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; }
.downloads-grid .body-panel, .sop-grid .body-panel { margin: 0; }
.downloads-grid h2 { margin-top: .65rem; }
.quick-links a { display: flex; gap: .8rem; align-items: center; text-decoration: none; color: var(--ink); }
.quick-links p { color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.quick-links a:hover { border-color: #73a588; }
.shortcut { display: grid; place-items: center; background: #e9f3e8; color: #346044; font-size: 1.3rem; border-radius: 11px; width: 2.45rem; aspect-ratio: 1; flex: none; }
button, .button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 2.55rem; padding: .4rem .82rem; border-radius: 8px; border: 1px solid #c9dad0; color: var(--action); background: white; font: inherit; font-size: .91rem; font-weight: 680; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: #eef6ef; }
.primary { color: #fff; background: var(--action); border-color: var(--action); }
.primary:hover { background: var(--action-hover); }
.danger { color: #903d2b; border-color: #e4c6bf; }
.danger:hover { background: #fff2ec; }
button:disabled { cursor: default; opacity: .55; }
.actions, .inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; }
.gateway-actions, .demo-actions { margin-top: 1rem; }
.inline-form label { flex: 0 1 23rem; }
label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 650; }
input, select { min-height: 2.55rem; padding: .4rem .65rem; border: 1px solid #c4d6cb; border-radius: 8px; color: var(--ink); background-color: white; font: inherit; width: 100%; }
select { appearance: none; padding-right: 1.7rem; background: linear-gradient(45deg, transparent 50%, #37594b 50%) calc(100% - 13px) center / 5px 5px no-repeat, linear-gradient(135deg, #37594b 50%, transparent 50%) calc(100% - 8px) center / 5px 5px no-repeat, white; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .91rem; }
th, td { padding: .62rem .6rem .62rem 0; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); }
th:first-child { min-width: 7rem; overflow-wrap: anywhere; }
td:has(button) { min-width: 9rem; }
td small, th small { display: block; color: var(--muted); margin-top: .2rem; font-size: .81rem; font-weight: 480; }
td button { margin: .1rem .1rem .1rem 0; }
summary { cursor: pointer; }
.notice, .error-inline { border: 1px solid #add3ba; border-radius: 9px; color: #184832; background: #e5f3e7; padding: .7rem 1rem; margin-bottom: 1rem; }
.notice[data-type="error"], .error-inline { border-color: #f0cec3; background: #fff0eb; color: #843e25; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.45rem; color: var(--ink); width: min(31rem, calc(100% - 2rem)); }
dialog::backdrop { background: #112c29a8; }
dialog p { margin: .65rem 0 1rem; }
dialog .actions { justify-content: end; }
#new-config .muted, #operation-label { margin-top: .7rem; }
.download-facts { padding-left: 0; grid-template-columns: minmax(6rem, 1fr) minmax(7rem, 1fr) minmax(10rem, 3fr); }
.outbox { display: grid; gap: 1rem; }
.outbox article { padding: .85rem 0 0; border-top: 1px solid var(--line); }
.preserve-lines { white-space: pre-line; }
.entrance { display: grid; padding: 2rem 1rem; min-height: 100dvh; place-content: center; }
.entrance > .notice { max-width: 44rem; }
.login-card { display: grid; width: min(55rem, 92vw); grid-template-columns: 1.2fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: 0 24px 80px #1f483017; }
.login-main { padding: clamp(1.35rem, 5vw, 3.15rem); }
.login-main h1 { margin-top: 1.65rem; max-width: 18ch; }
.login-main p { margin-top: .85rem; }
.login-main .environment { margin-top: 1.05rem; }
.login-button { margin-top: 1.35rem; }
.login-visual { display: flex; position: relative; isolation: isolate; overflow: hidden; align-items: end; color: #e4f2e5; background: radial-gradient(ellipse at 48% 42%, #326c54, #173631 66%, #112a27); }
.login-visual .relay { width: 96%; top: 44%; right: 2%; }
.visual-caption { padding: 1.55rem; font-size: 1.35rem; font-weight: 680; }
.visual-caption span { display: block; color: #bbd8c3; font-size: .88rem; font-weight: 500; }
.identity { width: min(36rem, 92vw); }
.identity-options { display: grid; gap: .55rem; margin: .9rem 0; }
.identity-options button { display: flex; text-align: left; width: 100%; align-items: start; justify-content: center; flex-flow: column; padding: .55rem .8rem; }
.identity-options button span { color: var(--muted); font-size: .85rem; font-weight: 500; }
.standalone { padding: 1.8rem; }
.standalone p { margin: .6rem 0 1.1rem; }
@media (max-width: 960px) {
  .dashboard { grid-template-columns: 1fr; }
  .downloads-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .signed-in { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; padding: .9rem 1rem; }
  .sidebar .brand { padding: 0; margin-bottom: .5rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar nav a { min-height: 2.15rem; }
  .sidebar nav a[aria-current] { box-shadow: inset 0 -2px var(--accent); }
  .sidebar nav a span { display: none; }
  .admin-nav { margin-top: .55rem; padding-top: .5rem; align-items: center; }
  .sidebar-footer { padding-top: .7rem; }
  .sidebar-footer form { margin-left: auto; flex-basis: auto; }
  .top { min-height: 3rem; padding-top: .55rem; padding-bottom: .55rem; }
  .content { padding-top: 1.4rem; }
  .login-card { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}
@media (max-width: 440px) {
  .quick-links, .sop-grid { grid-template-columns: 1fr; gap: .6rem; }
  .quick-links .body-panel { margin-bottom: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-facts { grid-template-columns: 1fr; }
  .relay { width: 11rem; right: -1.5rem; }
}
