/* Legacy Go templates are embedded without a CSS bundler. Keep these semantic
   token values aligned with web/shared/design-tokens.css (2026-09 redesign). */
:root {
  color-scheme: light dark;
  --canvas: #f5f6f8; --surface: #ffffff; --surface-sunken: #f2f4f7;
  --text: #1b2636; --text-muted: #526176; --text-subtle: #627086;
  --border: #e6eaf0; --border-strong: #d0d5dd;
  --accent: #315fcd; --accent-hover: #284fae; --accent-weak: #edf2ff; --on-accent: #ffffff;
  --nav-bg: #182333; --nav-text: #e5ebf4; --nav-muted: #a4b2c7; --nav-hover: #24344b;
  --danger: #b42318; --danger-bg: #fef3f2; --success: #067647;
  --font-sans: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-family: var(--font-sans); color: var(--text); background: var(--canvas); font-size: 14px; line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button,input,select,textarea { font: inherit; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1 { font-size: 28px; letter-spacing: -.035em; line-height: 1.3; margin: 4px 0 8px; }
h2 { font-size: 17px; line-height: 1.4; margin: 0 0 14px; }
h3 { font-size: 15px; }
.shell { display: grid; grid-template-columns: 220px minmax(0,1fr); min-height: 100vh; }
.nav { background: var(--nav-bg); color: var(--nav-text); padding: 28px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.nav a { display: block; color: var(--nav-text); padding: 10px 12px; border-radius: 7px; margin: 3px 0; font-size: 13px; }
.nav a:hover { background: var(--nav-hover); text-decoration: none; }
.nav .nav-brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 650; line-height: 1.2; padding: 0 8px 24px; }
.nav-brand small { display: block; color: var(--nav-muted); font-size: 11px; font-weight: 400; margin-top: 5px; }
.brand-mark { display: inline-grid; flex: 0 0 auto; place-items: center; background: var(--accent); color: var(--on-accent); width: 38px; height: 38px; border-radius: 10px; font-size: 25px; font-weight: 650; }
.nav-caption { color: var(--nav-muted); font-size: 11px; letter-spacing: .12em; padding: 0 12px; }
.nav-session { padding: 22px 8px 0; margin-top: 24px; border-top: 1px solid var(--nav-hover); }
.nav-session button { width: 100%; background: var(--nav-hover); color: var(--nav-text); }
.main { padding: 36px 40px 64px; max-width: 1400px; width: 100%; min-width: 0; margin: 0 auto; }
.page-head { margin-bottom: 28px; }
.page-head .muted { margin: 0; }
.eyebrow { color: var(--text-subtle); font-size: 11px; letter-spacing: .14em; margin: 0 0 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin: 20px 0; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(260px,100%),1fr)); gap: 20px; align-items: start; }
.grid > .card { margin: 0; }
.muted { color: var(--text-subtle); }
.empty { padding: 32px 24px; text-align: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin: 24px 0; }
.empty .muted { max-width: 640px; margin: 0 auto; }
.ok { color: var(--success); }
.bad,.error { color: var(--danger); }
.error { padding: 12px 16px; border-radius: 8px; background: var(--danger-bg); }
.notice { color: var(--accent); background: var(--accent-weak); overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 13px; }
th,td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--surface-sunken); color: var(--text-subtle); font-size: 12px; font-weight: 550; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td { min-width: 90px; overflow-wrap: anywhere; }
td form { min-width: 210px; }
.card > form { max-width: 840px; }
label { display: block; color: var(--text-muted); font-size: 13px; }
input,select,textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 7px; margin: 6px 0 16px; background: var(--surface); color: var(--text); }
textarea { min-height: 100px; resize: vertical; }
select[multiple] { min-height: 112px; }
button { border: 1px solid transparent; border-radius: 7px; padding: 10px 17px; min-height: 42px; background: var(--accent); color: var(--on-accent); cursor: pointer; font-weight: 550; }
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .55; cursor: not-allowed; }
.danger,.danger:hover { background: var(--danger); }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline > * { width: auto; }
code { overflow-wrap: anywhere; font-size: 12px; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 36px; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; width: min(980px,100%); min-height: 560px; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); }
.auth-story { background: var(--nav-bg); color: var(--nav-text); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand { color: var(--nav-text); font-size: 30px; font-weight: 650; }
.auth-story h2 { font-size: 38px; letter-spacing: -.04em; line-height: 1.4; }
.auth-story .eyebrow,.auth-story-note,.auth-story > div > p:last-child { color: var(--nav-muted); }
.auth-story-note { font-size: 12px; }
.login { width: 100%; max-width: 460px; margin: auto; padding: 44px; border: 0; border-radius: 0; }
.login form { margin-top: 30px; }
.login button { width: 100%; }
.auth-back { text-align: center; font-size: 12px; margin: 24px 0 0; }
.error-page .login { margin: 12vh auto; border: 1px solid var(--border); border-radius: 12px; }
.entry-grid .card { padding: 28px; }
.entry-grid h2 { font-size: 22px; margin-top: 18px; }
.entry-kicker { font-size: 11px; color: var(--text-subtle); letter-spacing: .1em; }
.entry-link { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; margin-top: 22px; border-top: 1px solid var(--border); font-weight: 550; }
.integration-notes summary { cursor: pointer; font-weight: 550; }
.integration-notes .table-scroll { margin-top: 20px; }
.build-info { padding-top: 12px; font-size: 11px; overflow-wrap: anywhere; }
@media(prefers-color-scheme:dark) {
  :root { --nav-bg: #131b28; --nav-hover: #1e2b40; --canvas: #0b0f16; --surface: #141a23; --surface-sunken: #1b222c; --text: #e8edf4; --text-muted: #a3adbd; --text-subtle: #8b95a6; --border: #242c38; --border-strong: #333d4c; --accent: #8b92f8; --accent-hover: #a5abfa; --accent-weak: #1e2138; --on-accent: #10112a; --danger: #fda29b; --danger-bg: #2e1514; --success: #6ce9a6; }
  .danger,.danger:hover { color: #301012; }
}
@media(max-width:760px) {
  .shell { display: block; }
  .nav { position: static; height: auto; padding: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
  .nav .nav-brand { width: 100%; padding: 0 4px 14px; }
  .nav-caption { display: none; }
  .nav a { margin: 0; padding: 8px 10px; }
  .nav-session { padding: 0; margin: 0 0 0 auto; border: 0; }
  .main { padding: 24px 18px 40px; }
  h1 { font-size: 24px; }
  .card { padding: 20px; }
  .auth-page { padding: 16px; }
  .auth-layout { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .auth-story { padding: 24px; }
  .auth-story > div,.auth-story-note { display: none; }
  .login { padding: 30px 24px; }
  .entry-grid { grid-template-columns: 1fr; }
  .entry-grid .card { padding: 24px; }
}
