:root {
  --trust-blue: #124159;
  --thought-night: #294855;
  --growth-green: #69c3c0;
  --mature-green: #56aea8;
  --horizon-blue: #457eb8;
  --spark: #f6cd5d;
  --coral: #e9625b;
  --coral-deep: #bc5e3d;
  --sunlight: #fcf2ce;
  --quiet: #efeded;
  --context-gray: #898a89;
  --paper: #ffffff;
  --canvas: #f7faf9;
  --ink: #152e3b;
  --muted-ink: #5e7079;
  --line: #dce5e4;
  --line-strong: #c5d4d2;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-active: 0 14px 38px rgba(18, 65, 89, 0.13);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: Aptos, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); background: var(--paper); color: var(--trust-blue); padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-active); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--growth-green) 76%, white); outline-offset: 3px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.side-rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 18px 20px; color: #f4fbfb; background: var(--trust-blue); overflow: hidden; }
.nav-scrim { display: none; }
.side-rail::after { content: ""; position: absolute; right: -52px; bottom: 9%; width: 124px; height: 124px; border: 1px solid rgba(105, 195, 192, .28); border-radius: 43% 57% 55% 45% / 51% 42% 58% 49%; pointer-events: none; }
.brand-lockup { display: block; width: 166px; height: 60px; overflow: hidden; position: relative; margin: 0 0 38px 2px; background: white; border-radius: 12px; }
.brand-crop { position: absolute; width: 158px; height: 54px; overflow: hidden; inset: 0; }
.brand-crop img { position: absolute; width: 212px; height: 212px; max-width: none; left: -23px; top: -78px; }
.side-nav { display: grid; gap: 8px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); color: rgba(255,255,255,.78); text-decoration: none; background: transparent; cursor: pointer; text-align: left; transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease); }
.nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.is-active { background: var(--growth-green); color: var(--trust-blue); font-weight: 700; }
.nav-item.is-active::after { content: ""; position: absolute; right: 12px; width: 7px; height: 7px; background: var(--trust-blue); border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%; }
.rail-footer { margin-top: auto; display: grid; gap: 14px; position: relative; z-index: 1; }
.service-state { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; color: white; }
.service-state span:last-child { display: grid; }
.service-state strong { font-size: 13px; }
.service-state small { color: rgba(255,255,255,.62); font-size: 11px; }
.organic-dot { display: inline-block; width: 15px; height: 15px; flex: 0 0 auto; background: var(--growth-green); border-radius: 44% 56% 48% 52% / 59% 42% 58% 41%; transform: rotate(-12deg); }
.logout-button { font-size: 13px; }

.main-canvas { min-width: 0; padding: 38px clamp(24px, 4vw, 68px) 72px; background: var(--canvas); }
.mobile-bar { display: none; }
.page-heading { display: flex; justify-content: space-between; gap: 28px; align-items: flex-end; margin: 0 0 32px; }
.page-heading h1 { margin: 3px 0 8px; color: var(--trust-blue); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.06; letter-spacing: -.035em; }
.context-line, .panel-kicker { margin: 0; color: var(--mature-green); font-weight: 750; font-size: 12px; letter-spacing: .08em; }
.page-lede { max-width: 66ch; margin: 0; color: var(--muted-ink); font-size: 15px; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--horizon-blue); font-weight: 650; text-decoration: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 720; text-decoration: none; cursor: pointer; transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--trust-blue); color: white; }
.button-primary:hover { background: var(--thought-night); }
.button-secondary { background: white; color: var(--trust-blue); border-color: var(--line-strong); }
.button-secondary:hover { border-color: var(--growth-green); background: #f5fbfa; }
.button-ghost { color: var(--trust-blue); background: transparent; }
.button-ghost:hover { background: var(--quiet); }

.flash { display: flex; align-items: center; gap: 11px; max-width: 760px; margin: 0 0 24px; padding: 13px 16px; border-radius: 12px; background: #e8f7f5; color: var(--trust-blue); }
.flash-mark { width: 14px; height: 14px; background: var(--growth-green); border-radius: 44% 56% 46% 54% / 55% 44% 56% 45%; }
.flash-error { background: #fff0ed; color: #7b3029; }
.flash-error .flash-mark { background: var(--coral); }

.truth-strip { display: flex; align-items: stretch; min-height: 88px; margin-bottom: 42px; background: var(--trust-blue); color: white; border-radius: var(--radius-md); overflow: hidden; }
.truth-item { display: grid; align-content: center; min-width: 135px; padding: 18px 24px; }
.truth-item span { color: rgba(255,255,255,.7); font-size: 12px; }
.truth-item strong { font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.truth-item small { color: rgba(255,255,255,.68); }
.truth-wide { min-width: 190px; }
.truth-divider { align-self: center; width: 1px; height: 44px; background: rgba(255,255,255,.16); }
.truth-note { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 0 24px; background: rgba(0,0,0,.08); color: rgba(255,255,255,.76); font-size: 12px; }

.section-bar { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.section-bar h2, .panel-heading h2, .route-preview h2, .qr-panel h2, .history-panel h2 { margin: 0; color: var(--trust-blue); font-size: 20px; line-height: 1.25; }
.section-bar p { margin: 4px 0 0; color: var(--muted-ink); }
.search-field { display: flex; align-items: center; width: min(310px, 100%); height: 42px; padding: 0 13px; gap: 9px; background: white; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.search-field:focus-within { border-color: var(--mature-green); box-shadow: 0 0 0 3px rgba(105,195,192,.2); }
.search-field svg { width: 18px; color: var(--muted-ink); }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.route-list { display: grid; gap: 10px; }
.route-row { position: relative; display: grid; grid-template-columns: minmax(220px, 1.05fr) minmax(185px, .7fr) minmax(250px, 1.12fr) auto; align-items: center; min-height: 132px; padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius-md); transition: box-shadow .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease); }
.route-row:hover { border-color: var(--line-strong); box-shadow: 0 10px 28px rgba(18,65,89,.08); transform: translateY(-1px); }
.route-row.is-muted { background: #fafafa; }
.route-source, .route-target { min-width: 0; }
.route-source h3 { margin: 7px 0 8px; color: var(--trust-blue); font-size: 17px; line-height: 1.35; }
.status-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted-ink); font-size: 12px; font-weight: 700; }
.status-large { padding: 8px 12px; background: white; border-radius: 10px; }
.status-symbol { width: 9px; height: 9px; border-radius: 50%; background: var(--context-gray); }
.status-symbol.is-live { background: #19a874; box-shadow: 0 0 0 4px rgba(25,168,116,.1); }
.copy-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.copy-line a { overflow-wrap: anywhere; color: var(--horizon-blue); font-size: 13px; text-decoration: none; }
.icon-button { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 8px; background: transparent; color: var(--trust-blue); cursor: pointer; }
.icon-button:hover, .icon-button.is-copied { background: #e8f7f5; color: var(--mature-green); }
.icon-button svg { width: 16px; height: 16px; }
.route-bridge { position: relative; display: grid; place-items: center; align-self: stretch; min-height: 88px; }
.route-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--growth-green); transform-origin: left; animation: route-in .65s var(--ease) both; }
.route-node { position: relative; display: grid; place-items: center; width: 88px; height: 76px; z-index: 1; }
.node-shape { position: absolute; inset: 0; background: var(--growth-green); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; transform: rotate(-7deg); }
.node-content { position: relative; display: grid; place-items: center; gap: 1px; color: var(--trust-blue); font-size: 11px; }
.node-content svg { width: 20px; height: 20px; }
.route-bridge.is-broken .route-line { background: repeating-linear-gradient(90deg, var(--context-gray) 0 8px, transparent 8px 14px); animation: none; }
.route-bridge.is-broken .node-shape { background: var(--quiet); }
.route-target { padding-left: 22px; }
.field-label { display: block; margin-bottom: 6px; color: var(--muted-ink); font-size: 11px; }
.route-target > a { display: block; overflow-wrap: anywhere; color: var(--trust-blue); font-weight: 720; text-decoration: none; }
.route-target p { margin: 4px 0; color: var(--muted-ink); font-size: 12px; }
.route-target small { color: var(--context-gray); font-variant-numeric: tabular-nums; }
.route-actions { display: flex; align-items: center; gap: 10px; padding-left: 18px; }
.qr-button { display: grid; justify-items: center; gap: 2px; width: 62px; padding: 8px 4px; color: var(--trust-blue); text-decoration: none; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 10px; }
.qr-button:hover { border-color: var(--growth-green); }
.qr-button svg { width: 25px; height: 25px; }
.empty-route { display: grid; justify-items: center; padding: 70px 24px; text-align: center; background: white; border-radius: var(--radius-lg); }
.empty-route h3 { margin: 20px 0 5px; color: var(--trust-blue); font-size: 22px; }
.empty-route p { max-width: 52ch; margin: 0 0 24px; color: var(--muted-ink); }
.empty-route-visual, .broken-route { display: flex; align-items: center; width: 220px; }
.empty-route-visual span, .broken-route span { width: 28px; height: 28px; background: var(--growth-green); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; }
.empty-route-visual i, .broken-route i { height: 2px; flex: 1; background: var(--growth-green); }
.empty-route-visual span:last-child { background: var(--trust-blue); }
.no-results { padding: 28px; text-align: center; background: white; border-radius: var(--radius-md); color: var(--muted-ink); }

.workbench { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 22px; align-items: start; }
.editor-panel, .route-preview, .qr-panel, .history-panel, .first-qr-note, .audit-surface { background: white; border-radius: var(--radius-md); }
.editor-panel { padding: clamp(22px, 4vw, 40px); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.panel-heading.compact { margin-bottom: 20px; }
.panel-heading.compact a { color: var(--horizon-blue); font-size: 12px; text-decoration: none; }
.step-mark { display: inline-flex; align-items: center; color: var(--trust-blue); font-size: 18px; font-weight: 800; letter-spacing: -.04em; }
.step-mark span, .mini-blob { display: inline-block; width: .85em; height: .85em; margin: 0 .05em; background: var(--growth-green); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; transform: rotate(-8deg); }
.link-form { display: grid; gap: 24px; }
.field-group { display: grid; gap: 8px; }
.field-title { color: var(--trust-blue); font-size: 13px; font-weight: 760; }
.field-title small { margin-left: 5px; color: var(--context-gray); font-weight: 500; }
.field-group input:not([type="radio"]):not([type="checkbox"]), .field-group textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: white; color: var(--ink); padding: 11px 13px; outline: 0; transition: border-color .18s, box-shadow .18s; }
.field-group input:focus, .field-group textarea:focus { border-color: var(--mature-green); box-shadow: 0 0 0 3px rgba(105,195,192,.2); }
.field-group textarea { resize: vertical; min-height: 84px; }
.field-help { color: var(--muted-ink); font-size: 11px; }
.field-help code { padding: 2px 5px; background: var(--quiet); border-radius: 4px; color: var(--trust-blue); }
.field-error { color: #9a3931; font-size: 12px; font-weight: 650; }
.form-error-summary { margin-bottom: 24px; padding: 14px 16px; background: #fff0ed; border-left: 4px solid var(--coral); border-radius: 10px; color: #7a2d27; }
.form-error-summary strong { color: #7a2d27; }
.form-error-summary p { margin: 3px 0 0; font-size: 12px; }
.field-group input[readonly] { background: var(--quiet) !important; color: var(--muted-ink); cursor: not-allowed; }
.field-group [aria-invalid="true"] { border-color: var(--coral); }
.url-input { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.url-input:focus-within { border-color: var(--mature-green); box-shadow: 0 0 0 3px rgba(105,195,192,.2); }
.url-input > span { display: flex; align-items: center; padding: 0 10px; background: var(--quiet); color: var(--muted-ink); font-size: 12px; }
.url-input input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.mode-fieldset { margin: 0; padding: 0; border: 0; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-option { cursor: pointer; }
.mode-option > input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card { display: flex; gap: 11px; min-height: 82px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .18s, background .18s; }
.mode-option > input:checked + .mode-card { border-color: var(--growth-green); background: #f0faf9; }
.mode-option > input:focus-visible + .mode-card { outline: 3px solid rgba(105,195,192,.45); outline-offset: 2px; }
.mode-card > span:last-child { display: grid; gap: 4px; }
.mode-card strong { color: var(--trust-blue); }
.mode-card small { color: var(--muted-ink); line-height: 1.45; }
.mode-radio { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 3px; border: 2px solid var(--line-strong); border-radius: 50%; box-shadow: inset 0 0 0 3px white; }
.mode-option > input:checked + .mode-card .mode-radio { background: var(--trust-blue); border-color: var(--trust-blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.state-switch-group { align-content: start; }
.switch-line { display: flex; align-items: center; gap: 10px; min-height: 45px; }
.switch-input { position: absolute; opacity: 0; }
.switch-track { display: flex; align-items: center; width: 44px; height: 25px; padding: 3px; border-radius: 999px; background: var(--context-gray); transition: background .18s; }
.switch-track span { width: 19px; height: 19px; border-radius: 50%; background: white; transition: transform .22s var(--ease); }
.switch-input:checked + .switch-track { background: var(--mature-green); }
.switch-input:checked + .switch-track span { transform: translateX(19px); }
.switch-input:focus-visible + .switch-track { outline: 3px solid rgba(105,195,192,.45); outline-offset: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.preview-column { display: grid; gap: 16px; position: sticky; top: 24px; }
.route-preview, .qr-panel, .history-panel { padding: 24px; }
.route-preview h2, .qr-panel h2 { margin-top: 4px; }
.preview-anatomy { margin-top: 24px; display: grid; gap: 14px; }
.preview-end { padding: 14px; background: var(--canvas); border-radius: 12px; }
.preview-end span { display: block; margin-bottom: 5px; color: var(--muted-ink); font-size: 11px; }
.preview-end strong { display: block; color: var(--trust-blue); font-size: 12px; overflow-wrap: anywhere; }
.preview-bridge { display: flex; align-items: center; padding: 0 20px; }
.preview-bridge i { flex: 1; height: 2px; background: var(--growth-green); }
.preview-node { display: grid; place-items: center; width: 64px; height: 58px; background: var(--growth-green); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; transform: rotate(-7deg); }
.preview-node b { transform: rotate(7deg); color: var(--trust-blue); font-size: 11px; }
.qr-panel { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.qr-panel p, .first-qr-note p, .quiet-copy { margin: 5px 0 0; color: var(--muted-ink); font-size: 12px; }
.qr-panel img { width: 130px; height: 130px; padding: 8px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.qr-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-list li { position: relative; display: grid; grid-template-columns: 15px 1fr; gap: 10px; padding: 0 0 20px; }
.history-list li:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 13px; bottom: 0; width: 1px; background: var(--line-strong); }
.history-dot { width: 13px; height: 13px; margin-top: 4px; background: var(--growth-green); border: 3px solid white; box-shadow: 0 0 0 1px var(--growth-green); border-radius: 50%; z-index: 1; }
.history-list strong { color: var(--trust-blue); font-size: 12px; }
.history-list p { margin: 2px 0; color: var(--muted-ink); font-size: 11px; overflow-wrap: anywhere; }
.history-list small { color: var(--context-gray); font-size: 10px; }
.first-qr-note { display: flex; gap: 15px; align-items: center; padding: 20px; }
.organic-illustration { display: inline-block; width: 54px; height: 50px; flex: 0 0 auto; background: var(--growth-green); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; transform: rotate(-8deg); }

.audit-surface { padding: 16px 28px; }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-list li { position: relative; display: grid; grid-template-columns: 18px 150px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.audit-list li:last-child { border-bottom: 0; }
.audit-list li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 40px; bottom: -14px; width: 1px; background: var(--line-strong); }
.audit-node { width: 15px; height: 15px; margin-top: 4px; background: var(--growth-green); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; z-index: 1; }
.audit-node.is-alert { background: var(--coral); }
.audit-list time, .audit-user { color: var(--context-gray); font-size: 12px; font-variant-numeric: tabular-nums; }
.audit-content strong { color: var(--trust-blue); }
.audit-content p { margin: 3px 0 0; color: var(--muted-ink); overflow-wrap: anywhere; }
.compact-empty { padding: 46px 20px; }

.login-body { min-height: 100vh; background: var(--paper); }
.login-stage { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); }
.login-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(34px, 6vw, 76px); overflow: hidden; background: var(--trust-blue); color: white; }
.login-brand-panel::after { content: ""; position: absolute; right: -90px; bottom: 8%; width: 300px; height: 270px; border: 1px solid rgba(105,195,192,.25); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; transform: rotate(-8deg); }
.login-logo-crop { position: relative; width: 230px; height: 80px; overflow: hidden; z-index: 1; background: white; border-radius: 14px; }
.login-logo-crop img { position: absolute; width: 292px; height: 292px; max-width: none; left: -31px; top: -109px; }
.login-brand-panel h1 { position: relative; z-index: 1; margin: 8px 0 0; max-width: 9ch; font-size: clamp(2.5rem, 5vw, 4.6rem); line-height: 1.02; letter-spacing: -.04em; }
.login-brand-panel p { position: relative; z-index: 1; color: var(--growth-green); font-weight: 700; }
.login-brand-panel small { position: relative; z-index: 1; color: rgba(255,255,255,.6); }
.login-route { position: absolute; left: 45%; right: -4%; top: 30%; display: flex; align-items: center; transform: rotate(-9deg); }
.login-route i { flex: 1; height: 2px; background: rgba(105,195,192,.65); }
.login-route span, .login-route b { width: 24px; height: 24px; background: var(--growth-green); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; }
.login-route b { width: 72px; height: 67px; }
.login-form-panel { display: grid; place-items: center; padding: 32px; background: var(--canvas); }
.login-form { width: min(430px, 100%); display: grid; gap: 24px; padding: clamp(28px, 5vw, 52px); background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-active); }
.login-form h2 { margin: 4px 0; color: var(--trust-blue); font-size: 30px; }
.login-form > div > p:last-child { margin: 0; color: var(--muted-ink); }
.login-submit { width: 100%; }
.login-security { margin: -8px 0 0; color: var(--context-gray); font-size: 11px; text-align: center; }

.public-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--canvas); }
.public-card { width: min(440px, 100%); padding: 34px; text-align: center; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-active); }
.public-logo-crop { position: relative; display: block; width: 174px; height: 58px; overflow: hidden; margin: 0 auto 34px; }
.public-logo-crop img { position: absolute; width: 220px; height: 220px; max-width: none; left: -23px; top: -84px; }
.public-node { position: relative; display: grid; place-items: center; width: 88px; height: 82px; margin: 0 auto 24px; }
.public-node span { position: absolute; inset: 0; background: var(--growth-green); border-radius: 43% 57% 50% 50% / 58% 44% 56% 42%; transform: rotate(-8deg); }
.public-node svg { position: relative; width: 32px; color: var(--trust-blue); stroke-width: 2.5; }
.public-context { margin: 0; color: var(--mature-green); font-size: 12px; font-weight: 750; }
.public-card h1 { margin: 6px 0 10px; color: var(--trust-blue); font-size: 26px; line-height: 1.28; }
.public-card > p:not(.public-context) { margin: 0 auto 24px; color: var(--muted-ink); }
.public-open { width: 100%; }
.public-qr { display: block; width: 220px; height: 220px; margin: 0 auto 20px; }
.public-foot { display: block; margin-top: 28px; color: var(--context-gray); }
.broken-route { margin: 10px auto 28px; }
.broken-route span { background: var(--context-gray); }
.broken-route i { margin: 0 9px; background: repeating-linear-gradient(90deg, var(--context-gray) 0 7px, transparent 7px 12px); }
.service-card .organic-illustration { width: 84px; height: 78px; margin-bottom: 18px; }

@keyframes route-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .side-rail { padding-inline: 14px; }
  .brand-lockup { margin-left: -4px; }
  .route-row { grid-template-columns: minmax(210px, 1fr) 150px minmax(220px, 1fr); }
  .route-actions { grid-column: 1 / -1; justify-content: flex-end; padding: 14px 0 0; border-top: 1px solid var(--line); }
  .truth-note { display: none; }
  .workbench { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .side-rail { position: fixed; inset: 0 auto 0 0; z-index: 30; width: min(300px, 88vw); height: 100dvh; transform: translateX(-105%); transition: transform .28s var(--ease); box-shadow: 12px 0 36px rgba(18,65,89,.2); }
  .nav-open .side-rail { transform: translateX(0); }
  .nav-scrim { position: fixed; inset: 0; z-index: 20; display: block; border: 0; border-radius: 0; background: rgba(18,65,89,.42); cursor: default; }
  .main-canvas { padding: 0 20px 54px; }
  .mobile-bar { height: 68px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
  .mobile-brand { display: inline-flex; align-items: center; color: var(--trust-blue); font-size: 25px; font-weight: 850; text-decoration: none; }
  .mobile-menu { display: grid; place-items: center; gap: 5px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .mobile-menu span { width: 18px; height: 2px; background: var(--trust-blue); }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 2.35rem; }
  .truth-strip { flex-wrap: wrap; }
  .truth-item { flex: 1; }
  .truth-wide { flex-basis: 100%; background: rgba(0,0,0,.07); }
  .truth-divider { display: none; }
  .route-row { grid-template-columns: 1fr; gap: 14px; }
  .route-bridge { min-height: 90px; }
  .route-bridge .route-line { top: 50%; }
  .route-target { padding: 14px 0 0; border-top: 1px solid var(--line); }
  .route-actions { justify-content: flex-start; }
  .workbench { grid-template-columns: 1fr; }
  .preview-column { position: static; }
  .history-panel { display: none; }
  .login-stage { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 300px; padding: 34px; }
  .login-brand-panel h1 { font-size: 2.8rem; }
  .login-brand-panel small { display: none; }
  .login-route { top: 38%; }
}

@media (max-width: 560px) {
  .main-canvas { padding-inline: 14px; }
  .page-heading { display: grid; gap: 18px; margin-bottom: 26px; }
  .page-heading .button { width: 100%; }
  .truth-strip { margin-bottom: 32px; }
  .truth-item { min-width: 50%; padding: 14px 16px; }
  .section-bar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .route-row { padding: 18px; }
  .route-source h3 { font-size: 16px; }
  .route-actions { display: grid; grid-template-columns: 62px 1fr; }
  .mode-options, .field-row { grid-template-columns: 1fr; }
  .editor-panel { padding: 22px 18px; }
  .preview-column { margin-inline: -4px; }
  .qr-panel { grid-template-columns: 1fr; text-align: center; }
  .qr-panel img { margin: 0 auto; }
  .qr-actions { justify-content: center; }
  .audit-surface { padding: 8px 18px; }
  .audit-list li { grid-template-columns: 16px 1fr; gap: 10px; }
  .audit-list time, .audit-user { grid-column: 2; }
  .audit-content { grid-column: 2; }
  .login-form-panel { padding: 18px; }
  .login-form { padding: 28px 22px; }
  .public-card { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
