:root {
  color-scheme: light;
  /* palette: mint (brand) + mist/dusk blue, rose, clay, plum */
  --mist: #a9c7e8;
  --dusk: #769fc9;
  --dusk-deep: #46688c;
  --rose: #dfbdc8;
  --clay: #be7868;
  --plum: #482e37;
  --ink: #482e37;
  --muted: #83707a;
  --soft: #f5f3f4;
  --line: rgba(72, 46, 55, .12);
  --card: rgba(255, 255, 255, .94);
  --accent: #157052;
  --accent-soft: #dff4e8;
  --navy: #482e37;
  --shadow: 6px 6px 0 rgba(72,46,55,.18);
  font-family: "Avenir Next", "SF Pro Display", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; }
body { margin: 0; min-height: 100dvh; color: var(--ink); background: #f9f9fb; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:active { transform: translateY(1px) scale(.99); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, label:focus-visible { outline: 3px solid var(--dusk); outline-offset: 2px; }
img { -webkit-user-drag: none; user-select: none; }

.beta-access-page { min-height: 100vh; overflow-x: hidden; background: linear-gradient(180deg, #fdf9f0 0 62%, #dce8f5 62% 84%, #a9c7e8 84%); }
.beta-access-page::before { content: ""; position: fixed; right: -80px; top: 8vh; width: 320px; height: 320px; border: 2px solid var(--ink); border-radius: 50%; background: var(--rose); box-shadow: inset -52px -38px 0 var(--mist); opacity: .82; }
.beta-access-page::after { content: ""; position: fixed; left: -48px; bottom: 8vh; width: 170px; height: 170px; border: 2px solid var(--ink); background: repeating-linear-gradient(135deg, #fff 0 9px, var(--accent-soft) 9px 18px); transform: rotate(8deg); }
.beta-access-shell { position: relative; z-index: 1; width: min(1120px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; padding: 28px 0 52px; }
.beta-access-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.beta-access-badge { border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 11px; color: var(--accent); background: var(--accent-soft); box-shadow: 3px 3px 0 var(--ink); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.beta-access-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr); gap: clamp(42px, 8vw, 100px); align-items: center; min-height: calc(100vh - 120px); padding: 70px 0; }
.beta-access-copy h1 { max-width: 700px; margin-top: 20px; font-size: clamp(50px, 7vw, 88px); line-height: .96; }
.beta-access-copy > p { width: min(540px, 100%); margin: 28px 0 0; color: rgba(72,46,55,.68); font-size: 16px; line-height: 1.8; }
.beta-access-card { position: relative; display: grid; gap: 24px; border: 2px solid var(--ink); border-radius: 18px; padding: clamp(24px, 4vw, 36px); background: #fff; box-shadow: 10px 10px 0 rgba(72,46,55,.92); }
.beta-access-card-mark { display: flex; align-items: end; gap: 6px; width: 70px; height: 54px; border: 2px solid var(--ink); border-radius: 14px; padding: 10px; background: #fdf3f6; box-shadow: 4px 4px 0 var(--mist); }
.beta-access-card-mark i { display: block; flex: 1; border: 1.5px solid var(--ink); border-radius: 6px 6px 2px 2px; background: var(--accent); }
.beta-access-card-mark i:nth-child(1) { height: 38%; background: var(--rose); }
.beta-access-card-mark i:nth-child(2) { height: 72%; background: var(--mist); }
.beta-access-card-mark i:nth-child(3) { height: 100%; background: #86efac; }
.beta-access-card > div:nth-child(2) > span { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.beta-access-card h2 { margin: 7px 0 0; font-size: 28px; letter-spacing: -.04em; }
.beta-access-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.beta-access-form { display: grid; gap: 10px; }
.beta-access-form label { color: var(--ink); font-size: 12px; font-weight: 850; }
.beta-access-form input { width: 100%; min-width: 0; border: 2px solid var(--ink); border-radius: 12px; padding: 15px 16px; color: var(--ink); background: #fff; box-shadow: 4px 4px 0 var(--mist); outline: none; font-family: "Cascadia Code", Consolas, monospace; font-size: 16px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; transition: box-shadow .2s ease, transform .2s ease; }
.beta-access-form input:focus { box-shadow: 5px 5px 0 var(--accent-soft); transform: translate(-1px, -1px); }
.beta-access-form input::placeholder { color: #b4a4ac; letter-spacing: .025em; }
.beta-access-form button { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border: 2px solid var(--ink); border-radius: 12px; padding: 0 16px; color: #fff; background: var(--ink); box-shadow: 4px 4px 0 var(--clay); font-weight: 850; }
.beta-access-form button:hover { background: var(--accent); }
.beta-access-form button:disabled { cursor: wait; opacity: .62; }
.beta-access-form button span { font-size: 20px; }
.beta-access-message { min-height: 22px; margin: -10px 0 0 !important; }
.beta-access-message.error { color: #b91c1c; }

.admin-login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: linear-gradient(180deg, #fdf9f0 0 58%, #dce8f5 58% 88%, #a9c7e8 88%); }
.admin-login-shell { width: min(440px, 100%); }
.admin-login-panel { display: grid; gap: 24px; border: 2px solid var(--ink); border-radius: 16px; padding: 30px; background: #fff; box-shadow: 8px 8px 0 rgba(72,46,55,.85); }
.admin-login-brand { pointer-events: none; }
.admin-login-kicker { color: var(--dusk-deep); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.admin-login-panel h1 { margin: 6px 0 0; color: var(--ink); font-size: 28px; letter-spacing: 0; }
.admin-login-panel p { margin: 8px 0 0; color: #64748b; line-height: 1.6; }
.admin-login-form { display: grid; gap: 12px; }
.admin-login-form label { color: #334155; font-size: 13px; font-weight: 800; }
.admin-password-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; }
.admin-password-row input { min-width: 0; border: 2px solid var(--ink); border-radius: 10px; padding: 12px; outline: none; background: #fff; transition: box-shadow .2s ease, border-color .2s ease; }
.admin-password-row input:focus { border-color: var(--dusk-deep); box-shadow: 3px 3px 0 var(--mist); }
.admin-login-message { min-height: 22px; font-size: 13px; }
.admin-login-message.error { color: #b91c1c; }

.page-scroll-indicator { position: fixed; left: 0; top: 0; z-index: 120; width: 4px; height: 100vh; pointer-events: none; background: rgba(45, 212, 191, .12); }
.page-scroll-indicator span { display: block; width: 100%; height: 100%; border-radius: 0; background: #2dd4bf; transform: scaleY(0); transform-origin: top; transition: transform .08s linear; }

.llm-log-panel { position: fixed; top: 84px; right: 18px; z-index: 50; display: grid; justify-items: end; pointer-events: none; }
.llm-log-panel[hidden] { display: none; }
.report-id-badge { pointer-events: auto; margin-bottom: 6px; border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 11px; color: var(--ink); background: #fff; box-shadow: 3px 3px 0 rgba(72,46,55,.85); font-size: 12px; font-weight: 850; }
.report-identity { margin: 8px 0 18px; padding: 14px 16px; border: 1px solid rgba(72,46,55,.24); border-radius: 14px; background: #ffffffdc; scroll-margin-top: 110px; }
.report-identity[hidden] { display: none; }
.report-identity-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.report-identity .report-id-badge { margin: 0; max-width: 100%; overflow-wrap: anywhere; text-align: left; cursor: pointer; }
#reportSaveStatus { color: #466052; font-size: 13px; overflow-wrap: anywhere; }
.report-storage-note { color: #5c5357; font-size: 13px; line-height: 1.7; }
.report-identity .report-storage-note { margin-top: 12px; }
.report-storage-note summary { cursor: pointer; width: fit-content; color: var(--ink); }
.report-storage-note p { margin: 8px 0; }
.report-storage-note a { color: #17634e; text-underline-offset: 3px; }
.report-history-dialog { box-sizing: border-box; width: min(760px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); margin: auto; padding: 24px; border: 2px solid var(--ink); border-radius: 20px; background: #fdfbf6; color: var(--ink); overflow-y: auto; box-shadow: 8px 8px 0 rgba(72,46,55,.18); }
.report-history-dialog::backdrop { background: rgba(29,28,37,.5); }
.report-history-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.report-history-head span { color: #23795b; font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.report-history-head h2 { margin: 4px 0 0; font-size: 26px; }
.report-history-source:not([hidden]) { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 13px; }
.report-history-source select { min-width: 160px; min-height: 40px; font: inherit; }
.report-history-intro { font-size: 14px; line-height: 1.65; color: #5c5357; margin: 16px 0 8px; }
.report-history-search { display: flex; gap: 8px; margin-top: 20px; }
.report-history-search input { min-width: 0; flex: 1; border: 1.5px solid rgba(72,46,55,.38); border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.report-history-dialog :focus-visible, .report-identity :focus-visible { outline: 3px solid #2b876a; outline-offset: 3px; }
#reportHistoryMessage { min-height: 20px; color: #5c5357; font-size: 13px; line-height: 1.6; }
.report-history-list { display: grid; gap: 12px; }
.local-report-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px; border: 1px solid rgba(72,46,55,.2); border-radius: 12px; background: #fff; }
.local-report-row h3 { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.local-report-row p { margin: 6px 0; color: #665f63; font-size: 12px; }
.local-report-id { display: block; color: #665f63; font-size: 11px; overflow-wrap: anywhere; }
.local-report-actions { display: flex; flex-direction: column; gap: 8px; }
.report-history-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(72,46,55,.18); }
.report-history-pages { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.report-history-dialog button { min-height: 40px; }
.report-history-dialog button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) {
  .top-nav { flex-wrap: wrap; }
  .top-nav .nav-links { flex-wrap: wrap; gap: 12px 18px; }
  .top-nav .nav-links::after { display: none; }
  .report-history-dialog { padding: 18px; }
  .report-history-search { flex-wrap: wrap; }
  .report-history-search input { flex-basis: 100%; }
  .local-report-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; }
  .local-report-actions { flex-direction: row; flex-wrap: wrap; }
  .report-history-footer { align-items: stretch; }
  .report-identity { padding: 12px; }
}
.llm-log-toggle { pointer-events: auto; border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 12px; color: var(--ink); background: #fff; box-shadow: 3px 3px 0 rgba(72,46,55,.85); font-size: 12px; font-weight: 850; }
.llm-log-body { pointer-events: auto; display: none; width: min(520px, calc(100vw - 36px)); max-height: calc(100vh - 76px); margin-top: 8px; border: 2px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); overflow: hidden; }
.llm-log-panel.open .llm-log-body { display: block; }
.llm-log-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1.5px solid rgba(72,46,55,.55); }
.llm-log-head strong { font-size: 14px; }
.llm-log-head button { border: 0; background: transparent; color: #6b7280; font-size: 20px; line-height: 1; }
.llm-log-content { max-height: calc(100vh - 130px); overflow: auto; padding: 12px 14px 16px; color: #374151; font-size: 12px; line-height: 1.55; }
.llm-log-content h3 { margin: 8px 0; color: #111827; font-size: 13px; }
.llm-log-content p { margin: 5px 0; }
.llm-log-content details { margin-top: 10px; }
.llm-log-content summary { color: #111827; font-weight: 800; cursor: pointer; }
.llm-log-content pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; padding: 10px; border-radius: 12px; background: #f3f4f6; color: #111827; font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; line-height: 1.5; }

.app { position: relative; min-height: 100dvh; overflow-x: hidden; background: linear-gradient(180deg, #fdf9f0 0 46%, #dce8f5 46% 72%, #a9c7e8 72% 90%, #769fc9 90% 97%, var(--navy) 97%); transition: background .55s ease; }
.app::before { content: none; }
.hero-panel, .workspace { position: relative; z-index: 1; }
.hero-panel { position: sticky; top: 0; z-index: 20; width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 28px 0 52px; transition: margin .42s ease, padding .42s ease, background .42s ease, border .42s ease, border-radius .42s ease, box-shadow .42s ease, transform .42s ease; }
.hero-panel::before { content: ""; position: absolute; right: clamp(8px, 7vw, 96px); top: clamp(96px, 14vh, 170px); z-index: -1; width: 118px; height: 118px; border: 2px solid var(--ink); border-radius: 50%; background: var(--rose); box-shadow: inset -20px -16px 0 var(--mist); }
.app.active .hero-panel::before { content: none; }
.app.idle .hero-panel { min-height: 100dvh; display: block; }
.app.active .hero-panel { margin-top: 12px; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.85); }

.top-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-mark { display: inline-flex; align-items: center; gap: 9px; border: 0; padding: 0; color: var(--ink); background: transparent; font-size: 19px; font-weight: 800; letter-spacing: -.045em; }
.brand-mark:hover { opacity: .78; }
.brand-mark span { width: 24px; height: 24px; border-radius: 8px 5px 10px 6px; background: var(--ink); box-shadow: inset 0 -6px 0 #86efac; transform: rotate(-8deg); }
.nav-links { display: flex; align-items: center; flex-shrink: 0; gap: 28px; font-weight: 650; }
.nav-links a, .nav-button { color: var(--ink); text-decoration: none; font-size: 14px; }
.nav-button { border: 0; background: transparent; padding: 0; }
.nav-links::after { content: ""; width: 28px; height: 2px; background: var(--ink); order: 2; }
.nav-button { order: 3; }

.hero-copy { width: min(900px, 100%); max-height: 380px; margin: 0 auto; overflow: hidden; padding-top: clamp(84px, 12vh, 126px); transition: opacity .34s ease, transform .34s ease, max-height .42s ease, padding .42s ease; }
.app.active .hero-copy { max-height: 0; padding: 0; opacity: 0; transform: translateY(-8px); pointer-events: none; }
h1 { max-width: 780px; margin: 10px 0 0; font-size: clamp(42px, 5.6vw, 76px); line-height: .98; letter-spacing: -.072em; font-weight: 720; text-wrap: balance; }
.hero-eyebrow { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 12px; color: var(--accent); background: var(--accent-soft); box-shadow: 3px 3px 0 rgba(72,46,55,.85); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.subtitle { width: min(590px, 100%); margin: 22px 0 0; color: rgba(72,46,55,.6); font-size: 15px; line-height: 1.72; text-wrap: pretty; }

.analysis-dock { width: min(900px, 100%); margin: 42px auto 0; border: 2px solid var(--ink); border-radius: 22px; padding: 18px; background: #fff; box-shadow: 8px 8px 0 rgba(72,46,55,.9); transition: width .35s ease, margin .35s ease, padding .35s ease, background .35s ease, box-shadow .35s ease; }
.analysis-dock-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 2px 2px 16px; }
.analysis-dock-head > div:first-child { display: grid; gap: 3px; }
.analysis-dock-head > div:first-child span { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.analysis-dock-head > div:first-child strong { font-size: 18px; letter-spacing: -.025em; }
.link-console { position: relative; display: grid; gap: 12px; width: 100%; margin: 0; transition: opacity .28s ease, transform .35s ease; }
.input-wrap { display: grid; grid-template-columns: auto 1fr auto 44px; gap: 6px; align-items: center; min-height: 66px; padding: 9px 10px 9px 14px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 4px 4px 0 var(--mist); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent-soft); transform: translate(-1px, -1px); }
.app.active .input-wrap { min-height: 62px; grid-template-columns: auto 1fr auto 42px; padding: 8px 10px 8px 12px; border-color: var(--line); box-shadow: none; }
#pasteButton, #clearButton { border: 0; border-radius: 8px; padding: 7px 10px; color: #8a7380; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; transition: color .18s ease, background .18s ease; }
#pasteButton:hover, #clearButton:hover { color: var(--ink); background: #f3ecef; }
#clearButton { padding: 5px 9px; font-size: 16px; line-height: 1; }
#clearButton[hidden] { display: none; }
#linkInput { width: 100%; min-width: 0; border: 0; outline: 0; padding: 8px 0; color: var(--ink); background: transparent; font-size: 14px; }
#linkInput::placeholder { color: #a6959e; }
#analyzeButton { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 12px; color: white; background: var(--clay); box-shadow: 3px 3px 0 rgba(72,46,55,.9); font-size: 18px; line-height: 1; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
#analyzeButton { grid-column: 4; }
#pasteButton:disabled, #clearButton:disabled { opacity: .5; cursor: default; }
#analyzeButton:hover { background: var(--accent); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(72,46,55,.9); }
.app.active #analyzeButton { width: 36px; height: 36px; }
#analyzeButton:disabled { opacity: .6; cursor: wait; }
.back-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 46px; height: 46px; border: 2px solid var(--ink); border-radius: 14px; color: #fff; background: var(--clay); box-shadow: 4px 4px 0 rgba(72,46,55,.35); font-size: 19px; cursor: pointer; transition: transform .2s ease, opacity .2s ease; }
.back-to-top:hover { transform: translate(-1px, -1px); background: var(--accent); }
.back-to-top[hidden] { display: none; }
.toast-region { position: fixed; left: 50%; bottom: 28px; z-index: 80; display: grid; gap: 10px; transform: translateX(-50%); pointer-events: none; }
.toast { max-width: min(88vw, 420px); padding: 12px 18px; border: 1.5px solid var(--ink); border-radius: 12px; color: #fff; background: #482e37; box-shadow: 4px 4px 0 rgba(72,46,55,.3); font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .22s ease, transform .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.analysis-panel-note { margin: -2px 2px 0; color: #8b7680; font-size: 11px; font-weight: 650; }
.platform-pills { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 7px; color: #6f5d66; }
.platform-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; border: 1.5px solid var(--ink); border-radius: 10px; padding: 4px 9px 4px 4px; color: #5d4a53; background: #fff; font-size: 11px; font-weight: 760; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.platform-pill:hover, .platform-pill:focus-visible { transform: translate(-1px, -1px); background: #fff; box-shadow: 3px 3px 0 rgba(72,46,55,.85); outline: none; }
.platform-pill-icon { display: grid; place-items: center; width: 23px; height: 23px; border: 1.5px solid var(--ink); border-radius: 7px; color: #06210f; background: #4ade80; font-size: 11px; font-weight: 900; }
.platform-pill.limited .platform-pill-icon { color: #fff; background: var(--clay); }
.platform-pill.severe .platform-pill-icon { color: #fff; background: #ef4444; }
.platform-capability-popover { position: fixed; z-index: 80; width: min(560px, calc(100vw - 32px)); transform: translateX(-50%); pointer-events: none; }
.platform-capability-popover[hidden] { display: none; }
.platform-capability-card { width: 100%; box-sizing: border-box; border: 1px solid rgba(34,197,94,.34); border-radius: 18px; padding: 12px 14px; color: #d1fae5; background: rgba(6,78,59,.96); box-shadow: 6px 6px 0 rgba(72,46,55,.18); text-align: left; }
.platform-capability-card.limited { border-color: rgba(190,120,104,.5); color: #f7ded6; background: rgba(84,44,36,.97); }
.platform-capability-card.severe { border-color: rgba(248,113,113,.44); color: #ffe4e6; background: rgba(105,25,25,.97); }
.platform-capability-card span { display: block; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; opacity: .82; }
.platform-capability-card strong { display: block; margin-top: 3px; color: white; font-size: 14px; }
.platform-capability-card p { margin: 5px 0 0; font-size: 12px; line-height: 1.58; }
.app.active .platform-pills { display: none; }
.app.active .platform-capability-popover { display: none; }
.app.active .analysis-dock { width: min(860px, 100%); margin-top: 12px; border-color: transparent; padding: 0; background: transparent; box-shadow: none; }
.app.active .analysis-dock-head, .app.active .analysis-panel-note { display: none; }

.workspace { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 18px 0 44px; transition: padding .4s ease, transform .4s ease, opacity .3s ease; }
.app.idle .workspace { display: none; }
.app:not(.idle) ~ #homeBulbs, .app.advanced-mode ~ #homeBulbs { display: none; }
.app.active .workspace { animation: workspaceEnter .42s cubic-bezier(.2,.8,.2,1) both; }
.tabs-card { margin-bottom: 16px; border: 2px solid rgba(255,255,255,.4); border-radius: 18px; padding: 12px; color: rgba(255,255,255,.85); background: rgba(56,32,42,.5); transition: background .4s ease, border-color .4s ease, box-shadow .4s ease, transform .4s ease; }
.app.active .tabs-card { border-color: var(--ink); color: #4a3540; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.85); }
.app.is-tab-transitioning .tabs-card { transform: translateY(2px); }
.tabs-nav { display: flex; align-items: center; gap: 4px; }
.tab-button { border: 0; border-radius: 999px; padding: 7px 12px; color: rgba(255,255,255,.62); background: transparent; font-size: 13px; font-weight: 750; transition: color .22s ease, background .22s ease, transform .22s ease; }
.app.active .tab-button { color: #64748b; }
.tab-button.active { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.app.active .tab-button.active { color: var(--ink); background: var(--rose); box-shadow: inset 0 0 0 1.5px var(--ink); }
.tab-button:hover { transform: translateY(-1px); }
.tab-panel { display: none; padding: 12px 2px 2px; font-size: 13px; line-height: 1.65; }
.tab-panel.active { display: block; animation: panelEnter .38s cubic-bezier(.2,.8,.2,1); }
@keyframes panelEnter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes workspaceEnter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.plain-button { display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--ink); border-radius: 999px; padding: 10px 14px; color: var(--ink); background: #fff; box-shadow: 3px 3px 0 rgba(72,46,55,.85); font-weight: 800; text-decoration: none; transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease; }
.plain-button:hover:not(:disabled) { transform: translate(-1px, -1px); background: #fdf3f6; box-shadow: 4px 4px 0 rgba(72,46,55,.85); }
.plain-button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(72,46,55,.85); }
.plain-button:disabled { opacity: .45; cursor: not-allowed; }
.process-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 12px; }
.process-item { display: flex; align-items: flex-start; gap: 9px; min-height: 28px; padding: 4px 2px; color: rgba(255,255,255,.76); }
.app.active .process-item { color: #475569; }
.process-item strong { font-size: 13px; font-weight: 650; line-height: 1.55; }
.status-dot { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 7px; border: 1px solid rgba(72,46,55,.75); border-radius: 2px; background: #d6e3f1; }
.app.active .status-dot { background: #a9c7e8; }
.process-item.running .status-dot { background: rgba(214,227,241,.9); }
.app.active .process-item.running .status-dot { background: #769fc9; }
.process-item.done .status-dot { background: rgba(214,227,241,.9); }
.app.active .process-item.done .status-dot { background: #22c55e; }
.process-item.warn .status-dot { background: #f3b63f; }
.process-item.error .status-dot { background: #ef6f7c; }

.advanced-workbench { display: grid; gap: 16px; }
.app.advanced-mode .advanced-hero-card, .app.advanced-mode .workbench-status-card, .app.advanced-mode .workbench-console-card, .app.advanced-mode .workbench-card { animation: workbenchItemEnter .42s cubic-bezier(.2,.8,.2,1) both; }
.app.advanced-mode .workbench-status-card:nth-child(1) { animation-delay: .04s; }
.app.advanced-mode .workbench-status-card:nth-child(2) { animation-delay: .08s; }
.app.advanced-mode .workbench-status-card:nth-child(3) { animation-delay: .12s; }
.app.advanced-mode .workbench-console-card { animation-delay: .16s; }
.app.advanced-mode .workbench-card:nth-child(1) { animation-delay: .2s; }
.app.advanced-mode .workbench-card:nth-child(2) { animation-delay: .24s; }
.app.advanced-mode .workbench-card:nth-child(3) { animation-delay: .28s; }
.app.advanced-mode .workbench-card:nth-child(4) { animation-delay: .32s; }
.app.advanced-mode .workbench-card:nth-child(5) { animation-delay: .36s; }
@keyframes workbenchItemEnter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.advanced-hero-card { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; padding: 22px 24px; border: 2px solid var(--ink); border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 7px 7px 0 var(--mist); }
.advanced-hero-card::before, .advanced-hero-card::after { display: none; }
.advanced-kicker { color: #64748b; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.advanced-hero-card h2 { max-width: 760px; margin: 4px 0 0; color: #482e37; font-size: clamp(24px, 3vw, 36px); line-height: 1.08; letter-spacing: -.045em; }
.advanced-hero-card p { width: min(640px, 100%); margin: 8px 0 0; color: #64748b; font-size: 14px; line-height: 1.65; }
.advanced-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 280px; }
.plain-button.primary { color: white; background: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--mist); }
.plain-button.primary:hover:not(:disabled) { color: white; border-color: var(--ink); background: var(--accent); box-shadow: 4px 4px 0 var(--mist); }
.plain-button.ghost { color: #475569; background: #f8fafc; border-color: rgba(15,23,42,.1); }
.plain-button.compact { padding: 7px 10px; font-size: 12px; }
.workbench-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.workbench-status-card, .workbench-console-card, .workbench-card { border: 2px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 5px 5px 0 rgba(72,46,55,.85); transition: transform .24s ease, box-shadow .24s ease; }
.workbench-status-card { display: grid; gap: 5px; padding: 16px; color: #475569; }
.workbench-status-card span, .workbench-console-head span, .workbench-card-head span { color: #64748b; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.workbench-status-card strong { color: #0f172a; font-size: 18px; }
.workbench-status-card em { color: #64748b; font-size: 12px; font-style: normal; line-height: 1.45; }
.workbench-status-card.ok { border-color: rgba(15,23,42,.08); }
.workbench-status-card.warn { border-color: rgba(245,158,11,.32); background: #fffbeb; }
.workbench-console-card { display: grid; gap: 14px; padding: 20px; }
.workbench-console-head, .workbench-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #0f172a; }
.workbench-console-head strong, .workbench-card-head strong { display: block; margin-top: 3px; color: #0f172a; font-size: 17px; }
.workbench-console-card textarea { width: 100%; border: 1.5px solid rgba(72,46,55,.55); border-radius: 18px; padding: 15px; color: #0f172a; background: #f8fafc; outline: none; resize: vertical; transition: border-color .24s ease, box-shadow .24s ease, background .24s ease; }
.workbench-console-card textarea:focus { border-color: rgba(72,46,55,.42); background: #fff; box-shadow: 0 0 0 4px rgba(72,46,55,.08); }
.workbench-console-card textarea::placeholder { color: #94a3b8; }
.workbench-run-row { display: flex; flex-wrap: wrap; gap: 8px; }
.workbench-message { min-height: 22px; color: #64748b; font-size: 12px; font-weight: 700; }
.workbench-message.ok { color: #15803d; }
.workbench-message.warn { color: #b45309; }
.workbench-message.error { color: #be123c; }
.workbench-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.workbench-card { min-height: 220px; padding: 18px; color: #475569; }
.workbench-card:hover, .workbench-status-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(72,46,55,.85); }
.workbench-card-wide { grid-column: span 2; }
.workbench-summary.empty, .workbench-downloads.empty, .workbench-comments.empty, .workbench-transcript.empty { display: grid; place-items: center; min-height: 120px; border: 1.5px dashed rgba(72,46,55,.45); border-radius: 14px; color: #8d7a83; background: #faf8f9; text-align: center; }
.workbench-material-head { display: grid; grid-template-columns: 180px 1fr; gap: 14px; margin-top: 12px; }
.workbench-material-head img, .workbench-cover-placeholder { width: 100%; aspect-ratio: 16/9; border-radius: 18px; object-fit: cover; background: #dce8f5; }
.workbench-material-head strong { display: block; color: #0f172a; font-size: 20px; line-height: 1.35; }
.workbench-material-head p { margin: 7px 0 0; color: #64748b; }
.workbench-limit-notes { display: grid; gap: 6px; margin-top: 12px; }
.workbench-limit-notes p { margin: 0; border: 1px solid rgba(245,158,11,.22); border-radius: 14px; padding: 9px 10px; color: #92400e; background: #fffbeb; font-size: 12px; line-height: 1.55; }
.workbench-meta-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.workbench-meta-grid div, .workbench-metrics div { min-width: 0; padding: 10px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 14px; background: #f8fafc; }
.workbench-meta-grid span, .workbench-metrics span { display: block; color: #64748b; font-size: 11px; font-weight: 850; }
.workbench-meta-grid strong, .workbench-metrics strong { display: block; overflow-wrap: anywhere; color: #0f172a; font-size: 12px; }
.workbench-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 8px; }
.workbench-metrics strong { font-size: 18px; }
.workbench-raw-data { margin-top: 12px; }
.workbench-raw-data summary { width: fit-content; color: #64748b; font-size: 12px; font-weight: 800; cursor: pointer; }
.workbench-raw-data summary:hover { color: var(--accent); }
.workbench-json { max-height: 260px; margin: 10px 0 0; overflow: auto; padding: 12px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 16px; color: #334155; background: #f8fafc; font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; line-height: 1.5; }
.workbench-downloads { display: grid; gap: 8px; margin-top: 12px; }
.workbench-downloads a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 15px; color: #0f172a; background: #f8fafc; text-decoration: none; transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.workbench-downloads a:hover { transform: translateX(2px); border-color: rgba(15,23,42,.18); background: #fff; }
.workbench-downloads span { color: #64748b; font-size: 12px; }
.workbench-comments { display: grid; gap: 8px; max-height: 380px; margin-top: 12px; overflow: auto; }
.workbench-comment-item { padding: 12px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 16px; background: #f8fafc; }
.workbench-comment-item strong { color: #0f172a; }
.workbench-comment-item p { margin: 5px 0; color: #475569; line-height: 1.6; }
.workbench-comment-item span { color: #64748b; font-size: 12px; }
.workbench-transcript { display: grid; gap: 8px; margin-top: 12px; }
.workbench-note { padding: 10px; border-radius: 14px; color: #ffe7a8; background: rgba(243,182,63,.12); }
.workbench-transcript pre { max-height: 360px; margin: 0; overflow: auto; white-space: pre-wrap; padding: 12px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 16px; color: #334155; background: #f8fafc; font-family: inherit; line-height: 1.7; }
.report-canvas { --canvas-gap: 14px; --canvas-pad: 0px; --design-card-bg: #fff; --design-card-border: var(--ink); --design-card-radius: 20px; --design-accent: #769fc9; --design-ink: #0f172a; --design-muted: #64748b; position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--canvas-gap); align-items: start; padding: var(--canvas-pad); border-radius: calc(var(--design-card-radius) + 10px); background: var(--report-wallpaper, transparent); transition: opacity .28s ease, transform .28s ease, padding .28s ease, gap .28s ease, background .28s ease; }
.app.is-tab-transitioning .report-canvas { opacity: .97; transform: translateY(2px); }
.report-canvas[data-background="pattern-bubbles"] { --report-wallpaper: radial-gradient(circle at 12px 12px, rgba(118,159,201,.16) 0 2px, transparent 2.5px), radial-gradient(circle at 34px 30px, rgba(223,189,200,.12) 0 3px, transparent 3.5px), radial-gradient(circle at 42px 8px, rgba(45,212,191,.12) 0 1.8px, transparent 2.4px), #edf3fa; background-size: 56px 56px, 56px 56px, 56px 56px, auto; --canvas-pad: 16px; }
.report-canvas[data-background="pattern-paper"] { --report-wallpaper: linear-gradient(135deg, rgba(15,23,42,.055) 25%, transparent 25%), linear-gradient(225deg, rgba(15,23,42,.045) 25%, transparent 25%), linear-gradient(45deg, transparent 47%, rgba(223,189,200,.28) 48% 52%, transparent 53%), #fdf6ec; background-size: 32px 32px, 32px 32px, 64px 64px, auto; --canvas-pad: 16px; }
.report-canvas[data-roundness="slight"] { --design-card-radius: 16px; }
.report-canvas[data-roundness="full"] { --design-card-radius: 34px; }
.report-canvas[data-density="compact"] { --canvas-gap: 10px; --canvas-pad: 10px; }
.report-canvas[data-density="roomy"] { --canvas-gap: 18px; --canvas-pad: 22px; }
.report-canvas.empty { display: block; }
.app[data-active-tab="advanced"] .report-canvas, .app[data-active-tab="parse"] .report-canvas { display: none; }
.empty-report, .error-card, .pending-report-card { display: grid; gap: 8px; place-items: center; min-height: 260px; padding: 22px; border: 2px solid var(--ink); border-radius: 20px; color: #6d5a63; text-align: center; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.85); }
.product-empty { place-items: stretch; gap: 14px; min-height: 0; text-align: left; }
.empty-report-hero { display: grid; gap: 8px; padding: 4px; }
.empty-report-hero span { color: #64748b; font-size: 12px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.empty-report-hero strong { max-width: 760px; color: #0f172a; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -.035em; }
.empty-report-hero p { max-width: 720px; margin: 0; color: #64748b; line-height: 1.7; }
.compact-empty { align-content: center; min-height: 112px; }
.quick-start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick-start-grid button { display: grid; gap: 5px; min-height: 86px; border: 1.5px solid var(--ink); border-radius: 14px; padding: 14px; color: var(--ink); background: #fff; box-shadow: 4px 4px 0 var(--mist); text-align: left; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.quick-start-grid span { color: #64748b; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.quick-start-grid strong { font-size: 16px; }
.capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.capability-grid article { padding: 16px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 20px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); }
.capability-grid span { display: block; color: #64748b; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.capability-grid strong { display: block; margin-top: 6px; color: #0f172a; font-size: 16px; }
.capability-grid p { margin: 7px 0 0; color: #64748b; line-height: 1.62; }
.loading-stage { display: grid; gap: 10px; place-items: center; min-height: 300px; padding: 28px; text-align: center; }
.empty-report strong, .loading-stage h2 { color: #0f172a; }
.loading-stage h2 { margin: 4px 0 0; font-size: clamp(22px, 4vw, 32px); }
.loading-stage p { max-width: 560px; margin: 0; color: #6d5a63; line-height: 1.65; }
.orb { width: 42px; height: 42px; border: 2px solid rgba(72,46,55,.18); border-top-color: #482e37; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-card { grid-column: 1 / -1; width: 100%; border: 2px solid var(--clay); color: #6b4f3a; background: #fff7ed; box-shadow: 6px 6px 0 rgba(190,120,104,.5); }
.error-card span { color: #b45309; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.error-card h2 { max-width: 680px; margin: 2px 0; color: var(--ink); font-size: clamp(24px, 4vw, 38px); line-height: 1.12; overflow-wrap: anywhere; }
.error-card > p { max-width: 560px; margin: 0 0 8px; line-height: 1.65; }
.error-card details { max-width: min(620px, 100%); color: #8a6b54; font-size: 12px; }
.error-card summary { cursor: pointer; font-weight: 800; }
.error-card details p { margin: 8px 0 0; overflow-wrap: anywhere; }
.pending-report-card { grid-column: 1 / -1; width: 100%; border-color: #769fc9; background: #f1f7fd; box-shadow: 6px 6px 0 rgba(118,159,201,.4); }
.pending-report-card span { color: #46688c; font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.pending-report-card h2 { max-width: 680px; margin: 2px 0; color: var(--ink); font-size: clamp(24px, 4vw, 38px); line-height: 1.12; }
.pending-report-card p { max-width: 560px; margin: 0 0 8px; line-height: 1.65; }
.pending-report-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.report-designer-toolbar { position: sticky; bottom: 18px; z-index: 12; grid-column: span 12; justify-self: center; align-self: end; order: 999; display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin-top: 4px; border: 2px solid var(--ink); border-radius: 999px; padding: 6px; background: #fff; box-shadow: 4px 4px 0 rgba(72,46,55,.85); }
.report-designer-toolbar button, .appearance-group button, .card-layout-controls button { border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 11px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 850; }
.report-designer-toolbar button:hover, .appearance-group button:hover, .card-layout-controls button:hover { border-color: rgba(118,159,201,.34); color: #46688c; background: #eaf1f9; }
.report-designer-toolbar button:disabled { opacity: .6; cursor: wait; }
.report-appearance-panel { position: fixed; right: max(18px, calc((100vw - 1180px) / 2)); bottom: 76px; z-index: 40; width: min(420px, calc(100vw - 36px)); max-height: min(620px, calc(100vh - 120px)); overflow: auto; border: 2px solid var(--ink); border-radius: 20px; padding: 16px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.85); }
.appearance-head span { display: block; color: #64748b; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.appearance-head strong { display: block; margin-top: 3px; color: #0f172a; }
.appearance-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.appearance-head button { border: 0; color: #64748b; background: transparent; font-size: 24px; line-height: 1; }
.appearance-group { display: grid; gap: 9px; margin-top: 14px; }
.appearance-group h3 { margin: 0; color: var(--plum); font-size: 15px; }
.appearance-group div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.appearance-group button { min-height: 54px; border-radius: 18px; text-align: left; }
.appearance-group button.is-active { border-color: rgba(190,120,104,.55); color: #8e4a3c; background: #f9eeeb; }
.meta-strip, .report-card-shell { position: relative; border: 2px solid var(--design-card-border); border-radius: var(--design-card-radius); background: var(--design-card-bg); box-shadow: 6px 6px 0 rgba(72,46,55,.85); color: var(--design-ink); }
.card-drag-handle { position: absolute; top: 12px; right: 12px; z-index: 3; display: none; width: 34px; height: 28px; border: 1.5px solid rgba(72,46,55,.45); border-radius: 999px; color: #64748b; background: #fff; font-weight: 900; letter-spacing: -3px; cursor: grab; }
.is-editing-layout .report-design-card { outline: 2px dashed var(--dusk); outline-offset: 4px; }
.is-editing-layout .card-drag-handle, .is-editing-layout .card-layout-controls { display: flex; }
.report-design-card.is-dragging { opacity: .58; transform: scale(.99); }
.card-layout-controls { display: none; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.card-order-controls, .card-width-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.card-layout-controls button { padding: 6px 8px; font-size: 11px; }
.card-layout-controls button.is-active { border-color: rgba(118,159,201,.38); color: #46688c; background: #eaf1f9; }
.meta-strip { grid-column: span 12; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--mist); }
.meta-strip span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.meta-strip strong { display: block; margin-top: 3px; font-size: 18px; letter-spacing: -.025em; }
.meta-strip p { margin: 0; color: var(--muted); }
.report-card-shell { padding: 18px; }
.card-label { display: inline-flex; margin-bottom: 14px; padding: 6px 11px; border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink); background: var(--rose); font-size: 12px; font-weight: 900; }
.overview-card { grid-column: span 8; }
.comments-card { grid-column: span 4; }
.source-article-card { grid-column: span 12; }
.report-card { grid-column: span 12; }
.dynamic-card { grid-column: span 4; }
.report-card-shell h2 { margin: 0 0 8px; color: #0f172a; font-size: 22px; line-height: 1.22; letter-spacing: -.04em; }
.report-card-shell h3 { margin: 0 0 8px; font-size: 15px; }
.report-card-shell p, li { color: #4b5563; line-height: 1.74; }
.expandable-text { display: grid; gap: 6px; }
.expandable-text button { width: fit-content; border: 0; padding: 0; color: #46688c; background: transparent; font-size: 12px; font-weight: 850; cursor: pointer; }
.expandable-text.is-expanded .show-more, .expandable-text:not(.is-expanded) .show-less { display: none; }
.expandable-content { overflow: hidden; display: -webkit-box; -webkit-line-clamp: var(--preview-lines, 3); -webkit-box-orient: vertical; margin: 0; }
.expandable-text.is-expanded .expandable-content { display: block; overflow: visible; -webkit-line-clamp: unset; }
.comment-insight .expandable-content { color: #334155; }
.comment-insight .expandable-content strong, .comment-insight .expandable-content { font-size: 14px; line-height: 1.6; }
.overview-layout { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: start; }
.cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 2px solid var(--ink); border-radius: 16px; background: #cfdff0; box-shadow: 4px 4px 0 var(--mist); }
.cover.placeholder { display: grid; place-items: center; color: #94a3b8; background: #dce8f5; box-shadow: none; }
.cover.placeholder span { font-size: 12px; font-weight: 850; letter-spacing: .04em; }
.author-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.author-line img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.media-avatar-fallback { width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; background: #dce8f5; }
.metrics-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; margin: 18px 0 12px; }
.metrics-row div, .meta-grid div { padding: 13px; border: 1.5px solid rgba(72,46,55,.8); border-radius: 14px; background: #eaf1f9; }
.metrics-row strong { display: block; color: #0f172a; font-size: 23px; letter-spacing: -.035em; }
.metrics-row span, .meta-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 850; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.meta-grid strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 13px; }
.overview-confidence { display: grid; gap: 10px; margin-top: 12px; padding: 13px; border: 1.5px solid var(--ink); border-radius: calc(var(--design-card-radius) - 8px); background: #eaf1f9; color: var(--ink); }
.overview-confidence div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.overview-confidence span { color: #64748b; font-size: 12px; font-weight: 900; }
.overview-confidence strong { font-size: 28px; font-weight: 950; line-height: 1; }
.overview-confidence em { color: var(--design-accent); font-size: 12px; font-style: normal; font-weight: 900; }
.score-line { height: 10px; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; }
.score-line i { display: block; width: var(--score); height: 100%; border-radius: inherit; background: var(--design-accent); }
ul { margin: 8px 0 0; padding-left: 20px; }
code { padding: 2px 5px; border-radius: 7px; background: #eaf1f9; color: #3b5673; font-family: "Cascadia Code", Consolas, monospace; font-size: .92em; }
.comment-list { display: grid; gap: 10px; }
.comment-insight { display: grid; gap: 8px; margin-bottom: 14px; padding: 13px; border: 1.5px solid rgba(72,46,55,.45); border-radius: 18px; background: rgba(248,250,252,.84); color: #334155; }
.comment-insight strong { font-size: 14px; line-height: 1.6; }
.comment-insight ul { margin: 0; padding-left: 18px; }
.comment-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 9px; }
.comment-list-head strong { color: #0f172a; font-size: 13px; }
.comment-list-head span { color: #8a93a3; font-size: 11px; text-align: right; }
.comment-item { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 12px; border: 1.5px solid rgba(72,46,55,.8); border-radius: 14px; background: #fbf8f9; }
.avatar, .avatar img, .avatar span { width: 40px; height: 40px; border-radius: 12px; display: block; object-fit: cover; }
.avatar { border: 1.5px solid var(--ink); border-radius: 13px; }
.avatar img, .avatar span { border-radius: 11px; }
.avatar span { background: #dce8f5; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.comment-meta strong { color: var(--ink); }
.comment-body { min-width: 0; }
.comment-item p { margin: 5px 0 0; overflow-wrap: anywhere; }
.comment-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 9px; }
.comment-images img { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: #e5e7eb; }
.comment-replies { display: grid; gap: 7px; margin-top: 9px; border-radius: 13px; padding: 9px; background: rgba(226,232,240,.55); }
.comment-replies header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 7px; border-bottom: 1.5px solid rgba(72,46,55,.45); }
.comment-replies header strong { color: #475569; font-size: 11px; letter-spacing: .06em; }
.comment-replies header span { white-space: nowrap; }
.comment-replies div { font-size: 12px; line-height: 1.55; }
.comment-replies strong { margin-right: 5px; color: #334155; }
.comment-replies span, .comment-replies small { color: #94a3b8; font-size: 11px; }
.comment-replies p { margin-top: 2px; color: #64748b; font-size: 12px; line-height: 1.55; }
.comment-reply-count { margin-top: 8px; color: #64748b; font-size: 11px; font-weight: 850; }
.comment-item.is-extra-comment { display: none; }
.comments-card.is-comments-expanded .comment-item.is-extra-comment { display: grid; }
.comments-card.is-comments-expanded .comment-list { max-height: 960px; overflow: auto; padding-right: 3px; scrollbar-width: thin; }
.comment-list-toggle { width: 100%; margin-top: 10px; border: 1px solid rgba(118,159,201,.16); border-radius: 14px; padding: 10px; color: #46688c; background: #eaf1f9; font-size: 12px; font-weight: 900; }
.comment-list-toggle:hover { border-color: rgba(118,159,201,.32); background: #dce8f5; }
.empty-comments { padding: 16px; border: 1.5px dashed rgba(72,46,55,.45); border-radius: 14px; color: var(--muted); }
.source-article-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: -2px 0 16px; }
.source-article-head > div > span { display: block; margin-bottom: 5px; color: #64748b; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.source-article-head h2 { max-width: 780px; margin: 0; font-size: clamp(24px, 3vw, 36px); }
.source-article-head > p { flex: 0 0 auto; margin: 0; color: #64748b; font-size: 12px; font-weight: 800; }
.source-article-reader { --article-progress: 0%; position: relative; max-height: 760px; overflow: auto; border: 2px solid var(--ink); border-radius: calc(var(--design-card-radius) - 6px); background: #f4f0e7; scrollbar-width: thin; scroll-behavior: smooth; }
.source-reader-toolbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; min-height: 58px; padding: 10px 16px 11px; color: #fff; background: rgba(46,28,36,.96); }
.source-reader-toolbar > div { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.source-reader-toolbar span { color: #94a3b8; font-size: 11px; font-weight: 850; }
.source-reader-toolbar strong { font-size: 13px; }
.source-reader-toolbar nav { display: flex; justify-content: flex-end; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.source-reader-toolbar nav::-webkit-scrollbar { display: none; }
.source-reader-toolbar nav button { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; padding: 0; color: #dce8f5; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 900; }
.source-reader-toolbar nav button:hover { border-color: #dfbdc8; color: #111827; background: #dfbdc8; }
.source-reader-toolbar > i { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; background: rgba(255,255,255,.1); }
.source-reader-toolbar > i::after { content: ""; display: block; width: var(--article-progress); height: 100%; background: var(--clay); transition: width .12s linear; }
.source-article-body { width: min(780px, calc(100% - 48px)); margin: 0 auto; padding: clamp(34px, 6vw, 72px) 0 clamp(54px, 8vw, 90px); }
.source-article-body p { margin: 0 0 1.35em; color: #292b2f; font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: clamp(16px, 1.65vw, 19px); line-height: 1.95; letter-spacing: .015em; }
.source-article-body .article-lead { color: #111827; font-size: clamp(19px, 2vw, 24px); font-weight: 650; line-height: 1.75; }
.source-article-body h3 { position: relative; margin: 2.8em 0 1em; color: #111827; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.3; letter-spacing: -.035em; }
.source-article-body h3::before { content: ""; position: absolute; left: -20px; top: .15em; width: 6px; height: 1em; border-radius: 999px; background: #be7868; }
.source-article-body aside { margin: 1.8em 0; border-left: 4px solid #be7868; border-radius: 0 16px 16px 0; padding: 15px 18px; color: #6b4048; background: rgba(223,189,200,.28); font-size: 15px; font-weight: 750; line-height: 1.75; }
.source-article-body a { color: #46688c; text-decoration-color: rgba(118,159,201,.3); text-underline-offset: 3px; overflow-wrap: anywhere; }
.article-figure { margin: clamp(34px, 6vw, 62px) calc(clamp(0px, 2vw, 28px) * -1); }
.article-figure > button { position: relative; display: block; width: 100%; overflow: hidden; border: 2px solid var(--ink); border-radius: 18px; padding: 0; background: #241419; box-shadow: 6px 6px 0 rgba(72,46,55,.35); }
.article-figure img { display: block; width: 100%; max-height: 620px; object-fit: contain; transition: transform .38s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.article-figure.is-image-error button { display: grid; min-height: 220px; place-items: center; cursor: default; box-shadow: none; }
.article-figure.is-image-error button::before { content: "图片暂不可用"; color: #94a3b8; font-size: 13px; font-weight: 800; }
.article-figure.is-image-error img, .article-figure.is-image-error button > span { display: none; }
.article-figure button > span { position: absolute; right: 14px; bottom: 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 7px 10px; color: #fff; background: rgba(46,28,36,.72); font-size: 11px; font-weight: 900; opacity: 0; transform: translateY(5px); transition: opacity .2s ease, transform .2s ease; }
.article-figure button:hover img { transform: scale(1.012); opacity: .92; }
.article-figure button:hover > span { opacity: 1; transform: translateY(0); }
.article-figure figcaption { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: baseline; margin-top: 11px; color: #6b7280; font-size: 12px; }
.article-figure figcaption b { color: #111827; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.article-lightbox:not([open]) { display: none; }
.article-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; border: 0; box-sizing: border-box; padding: 48px 84px; color: #fff; background: rgba(22,13,18,.96); }
.article-lightbox::backdrop { background: rgba(22,13,18,.72); }
.article-lightbox-stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; width: min(1180px, 100%); height: min(860px, calc(100vh - 96px)); }
.article-lightbox-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.article-lightbox-stage footer { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding-top: 14px; color: #cbd5e1; font-size: 13px; }
.article-lightbox-stage footer strong { color: #dfbdc8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.article-lightbox-close, .article-lightbox-step { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; padding: 0; color: #fff; background: rgba(255,255,255,.08); font-size: 22px; }
.article-lightbox-close { top: 22px; right: 22px; }
.article-lightbox-prev { left: 22px; top: 50%; }
.article-lightbox-next { right: 22px; top: 50%; }
.article-lightbox-close:hover, .article-lightbox-step:hover { color: #111827; background: #dfbdc8; }
body.article-lightbox-open { overflow: hidden; }
.ai-report-map-pane { min-width: 0; }
.memo-table-wrap { max-width: 100%; overflow-x: auto; margin: 10px 0 14px; border: 1.5px solid rgba(72,46,55,.45); border-radius: 16px; }
.memo-table-wrap table { width: 100%; min-width: 420px; border-collapse: collapse; background: #fff; }
.memo-table-wrap th, .memo-table-wrap td { padding: 9px 10px; border-bottom: 1.5px solid rgba(72,46,55,.45); color: #475569; font-size: 13px; line-height: 1.55; text-align: left; vertical-align: top; }
.memo-table-wrap th { color: #0f172a; background: rgba(241,245,249,.86); font-weight: 900; }
.memo-table-wrap tr:last-child td { border-bottom: 0; }
.mindmap-report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mindmap-report-head span { display: block; color: #64748b; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.mindmap-report-head h2 { margin: 3px 0 0; }
.mindmap-report { display: block; }
.mindmap-canvas-wrap { position: relative; min-height: 560px; overflow: hidden; border: 1.5px solid rgba(72,46,55,.45); border-radius: 22px; background: #f2f7fd; }
.mindmap-canvas { width: 100%; height: 560px; display: block; }
.mindmap-controls { position: absolute; right: 14px; bottom: 14px; z-index: 5; display: grid; place-items: center; width: 88px; height: 44px; pointer-events: none; }
.mindmap-control { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--ink); border-radius: 50%; color: #0f172a; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); font-size: 18px; font-weight: 900; line-height: 1; pointer-events: auto; transition: transform .2s ease, opacity .18s ease, color .18s ease, background .18s ease; }
.mindmap-control:hover { color: #46688c; background: #eaf1f9; }
.mindmap-reset { opacity: 0; transform: translateX(0) scale(.82); pointer-events: none; }
.mindmap-canvas-wrap.is-unlocked .mindmap-reset { opacity: 1; transform: translateX(-48px) scale(1); pointer-events: auto; }
.mindmap-canvas-wrap.is-unlocked .mindmap-lock { color: #46688c; background: #eaf1f9; }
.mindmap-canvas-wrap.is-frozen .mindmap-canvas { cursor: default; }
.mindmap-canvas-wrap.is-unlocked .mindmap-canvas { cursor: grab; }
.mindmap-canvas-wrap.is-unlocked .mindmap-canvas:active { cursor: grabbing; }
.mindmap-canvas .markmap-node .mindmap-node-wrap { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; }
.mindmap-canvas .markmap-node .mindmap-node-card { display: inline-grid; gap: 2px; max-width: 230px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 999px; padding: 5px 9px; color: #0f172a; background: #fff; box-shadow: 2px 2px 0 rgba(72,46,55,.7); cursor: pointer; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.mindmap-canvas .markmap-node .mindmap-node-card b { font-size: 12px; font-weight: 900; }
.mindmap-canvas .markmap-node .mindmap-node-card:hover { border-color: rgba(118,159,201,.32); color: #46688c; background: #eaf1f9; }
.mindmap-fallback { display: none; position: absolute; inset: 0; place-items: center; padding: 18px; color: #64748b; text-align: center; }
.mindmap-canvas-wrap.is-failed .mindmap-fallback { display: grid; }
.mindmap-canvas-wrap.is-failed .mindmap-canvas { opacity: 0; }
.mindmap-detail { position: absolute; left: 24px; top: 24px; z-index: 4; display: grid; align-content: start; gap: 8px; width: min(360px, calc(100% - 48px)); max-height: 260px; overflow: auto; border: 2px solid var(--ink); border-radius: 18px; padding: 16px 42px 16px 16px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); opacity: 0; transform: translateY(8px) scale(.98); transform-origin: top left; pointer-events: none; transition: left .26s cubic-bezier(.2,.8,.2,1), top .26s cubic-bezier(.2,.8,.2,1), opacity .2s ease, transform .22s ease; }
.mindmap-detail.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.mindmap-detail.is-switching { transform: translateY(-2px) scale(1.015); }
.mindmap-detail.is-root-report { width: min(460px, calc(100% - 48px)); max-height: 420px; }
.mindmap-detail button { display: block; position: absolute; top: 10px; right: 12px; border: 0; color: #64748b; background: transparent; font-size: 22px; line-height: 1; }
.mindmap-detail span { color: #64748b; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.mindmap-detail strong { color: #0f172a; font-size: 18px; line-height: 1.35; }
.mindmap-detail p, .mindmap-detail li { color: #475569; line-height: 1.75; }
.mindmap-detail p { margin: 0 0 8px; white-space: normal; }
.mindmap-detail ul { margin: 6px 0 0; padding-left: 18px; }
.mindmap-detail-body { display: grid; gap: 4px; }
.source-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.source-row span { padding: 6px 9px; border-radius: 999px; color: #46688c; background: #edf3fa; font-size: 12px; font-weight: 900; }
.source-row em { color: var(--muted); font-size: 12px; font-style: normal; }
.dynamic-card { min-height: 100%; background: #fff; }
.dynamic-card p { margin: 0; }
.dynamic-card ul { display: grid; gap: 8px; margin-top: 12px; padding-left: 0; list-style: none; }
.dynamic-card li { position: relative; padding-left: 16px; color: #475569; }
.dynamic-card li::before { content: ""; position: absolute; left: 0; top: .78em; width: 6px; height: 6px; border-radius: 50%; background: #769fc9; }

/* ---- 格式卡（特种输出格式） ---- */
.dynamic-card-title { margin: 0 0 10px; color: var(--ink); font-size: 17px; line-height: 1.35; letter-spacing: -.02em; }
.dynamic-card .memo-table-wrap { margin: 4px 0 0; border: 1.5px solid var(--ink); border-radius: 12px; }
.dynamic-card .memo-table-wrap th { color: #fff; background: var(--ink); }
.dynamic-card .memo-table-wrap th, .dynamic-card .memo-table-wrap td { border-bottom: 1px solid rgba(72,46,55,.25); }
.dynamic-card .memo-table-wrap tr:nth-child(even) td { background: #f4f8fc; }

.format-steps { counter-reset: fstep; display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.format-steps li { counter-increment: fstep; position: relative; padding: 0 0 14px 40px; }
.format-steps li::before { content: counter(fstep); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid var(--ink); border-radius: 50%; color: #fff; background: var(--ink); font-size: 13px; font-weight: 900; }
.format-steps li::after { content: ""; position: absolute; left: 12.5px; top: 28px; bottom: 2px; width: 1.5px; background: rgba(72,46,55,.35); }
.format-steps li:last-child { padding-bottom: 0; }
.format-steps li:last-child::after { display: none; }
.format-steps li strong { display: block; padding-top: 3px; color: var(--ink); font-size: 14px; }
.format-steps li p { margin: 4px 0 0; color: #5d5058; font-size: 13px; line-height: 1.62; }
.format-steps li em { display: inline-flex; margin-top: 6px; border: 1.5px solid rgba(190,120,104,.6); border-radius: 8px; padding: 3px 8px; color: #8e4a3c; background: #f9eeeb; font-size: 11px; font-style: normal; font-weight: 750; }

.format-timeline { display: grid; gap: 0; margin-top: 4px; }
.format-timeline-item { position: relative; display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 0 0 14px 18px; }
.format-timeline-item::before { content: ""; position: absolute; left: 0; top: .42em; width: 9px; height: 9px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--clay); }
.format-timeline-item::after { content: ""; position: absolute; left: 3.5px; top: calc(.42em + 11px); bottom: 0; width: 1.5px; background: rgba(72,46,55,.35); }
.format-timeline-item:last-child { padding-bottom: 0; }
.format-timeline-item:last-child::after { display: none; }
.format-timeline-item > span { color: #8d7a83; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 800; line-height: 1.7; }
.format-timeline-item strong { color: var(--ink); font-size: 13px; }
.format-timeline-item p { margin: 3px 0 0; color: #5d5058; font-size: 12px; line-height: 1.6; }

.format-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin-top: 4px; }
.format-stats > div { border: 1.5px solid rgba(72,46,55,.8); border-radius: 12px; padding: 11px 12px; background: #eaf1f9; }
.format-stats strong { display: block; color: var(--ink); font-size: 22px; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.format-stats strong i { margin-left: 2px; font-size: 12px; font-style: normal; font-weight: 800; }
.format-stats span { display: block; margin-top: 4px; color: #6d5a63; font-size: 11px; font-weight: 850; }
.format-stats em { display: block; margin-top: 3px; color: #8d7a83; font-size: 11px; font-style: normal; line-height: 1.45; }

.format-bars, .format-rating { display: grid; gap: 8px; margin-top: 6px; }
.format-bars-unit { margin: 2px 0 0; color: #8d7a83; font-size: 11px; font-weight: 750; }
.format-bar-row, .format-rating-row { display: grid; grid-template-columns: minmax(58px, auto) 1fr minmax(40px, auto); gap: 9px; align-items: center; }
.format-bar-row > span, .format-rating-row > span { color: #5d5058; font-size: 12px; font-weight: 750; }
.format-bar-track { height: 14px; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; }
.format-bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--dusk); }
.format-rating-row .format-bar-track i { background: var(--clay); }
.format-bar-row strong, .format-rating-row strong { color: var(--ink); font-size: 13px; text-align: right; white-space: nowrap; }
.format-rating-row strong i { color: #8d7a83; font-size: 11px; font-style: normal; }
.format-bar-note { margin: -3px 0 0; color: #8d7a83; font-size: 11px; font-style: normal; }

.format-pros-cons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.format-pros-cons > div { border: 1.5px solid var(--ink); border-radius: 12px; padding: 11px 12px; }
.format-pros { background: #eefaf3; }
.format-cons { background: #fdf3f6; }
.format-pros-cons > div > span { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 9px; background: #fff; font-size: 11px; font-weight: 900; }
.format-pros > span { color: var(--accent); }
.format-cons > span { color: #8e4a3c; }
.format-pros-cons ul { display: grid; gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.format-pros-cons li { position: relative; padding-left: 14px; color: #4a3540; font-size: 12px; line-height: 1.58; }
.format-pros li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }
.format-cons li::before { content: "−"; position: absolute; left: 0; color: #8e4a3c; font-weight: 900; }

.format-checklist { display: grid; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.format-checklist li { position: relative; padding-left: 26px; }
.format-checklist li::before { content: "✓"; position: absolute; left: 0; top: .06em; display: grid; place-items: center; width: 17px; height: 17px; border: 1.5px solid var(--ink); border-radius: 5px; color: #06210f; background: #4ade80; font-size: 11px; font-weight: 900; }
.format-checklist strong { color: var(--ink); font-size: 13px; font-weight: 750; }
.format-checklist em { display: block; margin-top: 2px; color: #8d7a83; font-size: 11px; font-style: normal; line-height: 1.5; }

.format-flow { display: grid; justify-items: stretch; gap: 4px; margin-top: 6px; }
.format-flow-node { border: 1.5px solid var(--ink); border-radius: 12px; padding: 10px 12px; background: #f7fafd; box-shadow: 2px 2px 0 var(--mist); }
.format-flow-node strong { color: var(--ink); font-size: 13px; }
.format-flow-node p { margin: 3px 0 0; color: #5d5058; font-size: 12px; line-height: 1.55; }
.format-flow-node em { display: inline-flex; margin-top: 5px; color: #46688c; font-size: 11px; font-style: normal; font-weight: 800; }
.format-flow-arrow { justify-self: center; color: var(--ink); font-size: 14px; font-weight: 900; line-height: 1; }

.format-quotes { display: grid; gap: 8px; margin-top: 6px; }
.format-quotes blockquote { margin: 0; border-left: 4px solid var(--clay); border-radius: 0 12px 12px 0; padding: 10px 12px; background: #fdf3f6; }
.format-quotes blockquote p { margin: 0; color: #4a3540; font-size: 13px; line-height: 1.68; }
.format-quotes footer { margin-top: 5px; color: #8d7a83; font-size: 11px; font-weight: 750; }

.katex-display { overflow-x: auto; overflow-y: hidden; }

.admin-page { min-height: 100vh; background: #f4f6fb; }
.admin-dark { color: #e5e7eb; background: #150e13; }
.admin-dark.admin-page { background: #150e13; }
.admin-shell { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: 18px 0 48px; }
.admin-topbar, .admin-topbar-actions, .admin-actions, .admin-filter-actions, .admin-pagination, .admin-pagination div, .admin-drawer-actions, .admin-json-tabs { display: flex; align-items: center; gap: 10px; }
.admin-topbar { justify-content: space-between; min-height: 60px; margin-bottom: 14px; border: 2px solid var(--ink); border-radius: 8px; padding: 12px 14px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(15,23,42,.1); border-radius: 50%; color: #0f172a; background: #fff; font-weight: 900; }
.danger-action { color: #b91c1c; background: #fff1f2; border-color: rgba(225,29,72,.18); }
.admin-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.admin-overview article, .admin-sidebar, .admin-workspace, .admin-drawer-panel { border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); }
.admin-overview article { display: grid; gap: 4px; padding: 14px; }
.admin-overview span, .admin-filters span { color: #64748b; font-size: 11px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
.admin-overview strong { color: #0f172a; font-size: 24px; line-height: 1.1; }
.admin-overview em { color: #64748b; font-size: 12px; font-style: normal; }
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 12px; align-items: start; }
.admin-sidebar { position: sticky; top: 14px; display: grid; gap: 8px; padding: 12px; }
.admin-side-group { padding: 10px 12px 2px; color: #94a3b8; font-size: 11px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
.admin-side-item { display: grid; gap: 3px; border: 1px solid transparent; border-radius: 6px; padding: 12px; color: #334155; background: transparent; text-align: left; }
.admin-side-item strong { color: #0f172a; font-size: 14px; }
.admin-side-item span, .admin-sidebar p { margin: 0; color: #64748b; font-size: 12px; line-height: 1.55; }
.admin-side-item.is-active { border-color: rgba(72,46,55,.12); background: #f3f5fa; }
.admin-main { min-width: 0; }
.admin-view-panel[hidden] { display: none; }
.admin-view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.admin-view-head h1, .operations-section h2 { margin: 0; color: #0f172a; letter-spacing: 0; }
.admin-view-head h1 { font-size: 24px; }
.admin-view-head p, .operations-section header p { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.admin-segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; border: 1px solid rgba(15,23,42,.1); border-radius: 7px; padding: 3px; background: #fff; }
.admin-segmented button { min-height: 32px; border: 0; border-radius: 4px; padding: 0 10px; color: #64748b; background: transparent; font-weight: 800; }
.admin-segmented button.is-active { color: #fff; background: #482e37; }
.operations-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.operations-metrics article { min-width: 0; border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; padding: 13px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); }
.operations-metrics span, .operations-capability-card dt { display: block; color: #64748b; font-size: 11px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
.operations-metrics strong { display: block; margin-top: 7px; color: #0f172a; font-size: 23px; line-height: 1.05; }
.operations-metrics em { display: block; overflow: hidden; margin-top: 5px; color: #64748b; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.operations-health { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin-top: 10px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; background: rgba(15,23,42,.08); }
.operations-health article { min-width: 0; padding: 10px 12px; background: #fff; }
.operations-health span { display: block; color: #64748b; font-size: 11px; }
.operations-health strong { display: block; margin-top: 3px; color: #0f172a; font-size: 13px; overflow-wrap: anywhere; }
.operations-health .health-healthy, .operations-health .health-ok { color: #047857; }
.operations-health .health-degraded { color: #b45309; }
.operations-health .health-disabled { color: #64748b; }
.operations-two-column { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.4fr); gap: 18px; margin-top: 20px; }
.operations-failures-section { margin-top: 20px; }
.operations-section { min-width: 0; border-top: 1px solid rgba(15,23,42,.1); padding-top: 14px; }
.operations-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.operations-section h2 { font-size: 17px; }
.operations-audit-section { margin-top: 20px; }
.operations-distributions { display: grid; gap: 14px; }
.operations-distributions section h3 { margin: 0 0 7px; color: #334155; font-size: 12px; }
.operations-distribution-row { display: grid; grid-template-columns: minmax(72px, 1fr) minmax(100px, 2fr) 42px; gap: 8px; align-items: center; margin-top: 6px; color: #475569; font-size: 12px; }
.operations-distribution-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operations-distribution-row > div { height: 6px; overflow: hidden; border-radius: 3px; background: #e2e8f0; }
.operations-distribution-row i { display: block; height: 100%; border-radius: inherit; background: #46688c; }
.operations-distribution-row strong { color: #0f172a; text-align: right; }
.operations-empty-inline, .operations-loading { color: #94a3b8; font-size: 13px; }
.operations-table { min-width: 760px; }
.operations-table td { max-width: 280px; vertical-align: top; white-space: normal; }
.operations-table code, .operations-evidence { display: block; max-width: 240px; color: inherit; font: 11px/1.45 "Cascadia Code", Consolas, monospace; white-space: normal; overflow-wrap: anywhere; }
.operations-row-actions { display: flex; gap: 6px; }
.operations-row-actions .plain-button { min-height: 30px; padding: 6px 8px; }
.status-badge.severity-critical { color: #fff; background: #991b1b; }
.status-badge.severity-high { color: #991b1b; background: #fee2e2; }
.status-badge.severity-medium { color: #92400e; background: #fef3c7; }
.status-badge.severity-low { color: #46688c; background: #dce8f5; }
.operations-notice { max-width: 460px; border-left: 3px solid #d97706; padding: 8px 10px; color: #92400e; background: #fffbeb; font-size: 12px; line-height: 1.5; }
.invite-summary { display: flex; gap: 8px; }
.invite-summary > span { min-width: 108px; border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; padding: 10px 12px; color: #64748b; background: #fff; font-size: 12px; }
.invite-summary strong { display: block; margin-top: 3px; color: #0f172a; font-size: 21px; }
.invite-admin-grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 12px; }
.invite-generate-card, .invite-generated-card { min-width: 0; border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; padding: 18px; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); }
.invite-generate-card header > span, .invite-generated-card header span { color: #157052; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.invite-generate-card h2, .invite-generated-card h2 { margin: 4px 0 0; color: #0f172a; font-size: 18px; letter-spacing: -.02em; }
.invite-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 16px 0; }
.invite-form-grid label { display: grid; align-content: start; gap: 6px; color: #64748b; font-size: 11px; font-weight: 850; }
.invite-form-grid input { width: 100%; min-width: 0; height: 40px; border: 1px solid rgba(15,23,42,.14); border-radius: 7px; padding: 0 10px; color: #0f172a; background: #f8fafc; outline: none; }
.invite-form-grid em { color: #94a3b8; font-size: 10px; font-style: normal; font-weight: 600; }
.invite-label-wide { grid-column: 1 / -1; }
.invite-generated-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.invite-generated-card > p { margin: 8px 0 14px; color: #64748b; font-size: 12px; }
.invite-generated-list { display: grid; gap: 7px; max-height: 260px; overflow: auto; }
.invite-generated-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid rgba(15,23,42,.1); border-radius: 7px; padding: 8px 9px 8px 12px; background: #f8fafc; }
.invite-generated-list code, .invite-code-hint { color: #0f172a; font: 750 13px/1.4 "Cascadia Code", Consolas, monospace; letter-spacing: .025em; }
.invite-generated-list .plain-button, .invite-table .plain-button { min-height: 30px; padding: 6px 9px; box-shadow: none; font-size: 11px; }
.invite-list-section { margin-top: 24px; }
.invite-table { min-width: 940px; }
.invite-table tbody tr { cursor: default; }
.invite-row-actions { display: flex; align-items: center; gap: 6px; }
.status-badge.invite-active { color: #047857; background: #dcfce7; }
.status-badge.invite-used, .status-badge.invite-expired { color: #92400e; background: #fef3c7; }
.status-badge.invite-revoked { color: #64748b; background: #e2e8f0; }
.compliance-requests-table { min-width: 1120px; }
.compliance-status-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.compliance-status-summary article { min-width: 0; border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; padding: 13px; background: #fff; }
.compliance-status-summary span { display: block; color: #64748b; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.compliance-status-summary strong { display: block; margin-top: 6px; color: #0f172a; font-size: 17px; overflow-wrap: anywhere; }
.compliance-status-summary em { display: block; margin-top: 5px; color: #64748b; font-size: 12px; font-style: normal; line-height: 1.45; overflow-wrap: anywhere; }
.compliance-status-table { min-width: 760px; }
.compliance-status-table td { vertical-align: top; white-space: normal; line-height: 1.55; }
.compliance-switch-table { min-width: 880px; }
.compliance-switch-table td { vertical-align: top; white-space: normal; line-height: 1.5; }
.compliance-switch-table code { color: #46688c; font: 700 11px/1.4 "Cascadia Code", Consolas, monospace; overflow-wrap: anywhere; }
.compliance-switch-table small { display: block; margin-top: 4px; color: #7b8493; font-size: 10px; line-height: 1.45; }
.status-badge.compliance-readiness-ready { color: #047857; background: #dcfce7; }
.status-badge.compliance-readiness-pending { color: #92400e; background: #fef3c7; }
.status-badge.compliance-readiness-not_applicable { color: #475569; background: #e2e8f0; }
.status-badge.compliance-switch-enabled { color: #047857; background: #dcfce7; }
.status-badge.compliance-switch-disabled { color: #475569; background: #e2e8f0; }
.status-badge.compliance-switch-locked { color: #991b1b; background: #fee2e2; }
.status-badge.compliance-switch-dependency { color: #92400e; background: #fef3c7; }
.compliance-requests-table td { vertical-align: top; white-space: normal; }
.compliance-request-contact, .compliance-request-reference { display: block; max-width: 190px; overflow-wrap: anywhere; }
.compliance-request-description { display: block; min-width: 220px; max-width: 340px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.compliance-request-time { display: block; min-width: 146px; color: #64748b; font-size: 12px; line-height: 1.55; white-space: nowrap; }
.compliance-request-actions { display: flex; align-items: center; gap: 6px; min-width: 170px; }
.compliance-request-actions select { min-width: 92px; height: 32px; border: 1px solid rgba(15,23,42,.14); border-radius: 6px; padding: 0 7px; color: #0f172a; background: #f8fafc; font: 800 12px/1 inherit; }
.compliance-request-actions .plain-button { min-height: 32px; padding: 6px 9px; box-shadow: none; font-size: 11px; }
.status-badge.compliance-received { color: #46688c; background: #dce8f5; }
.status-badge.compliance-reviewing { color: #92400e; background: #fef3c7; }
.status-badge.compliance-resolved { color: #047857; background: #dcfce7; }
.status-badge.compliance-rejected { color: #b91c1c; background: #fee2e2; }
.operations-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.operations-capability-card { min-width: 0; border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; padding: 13px; background: #fff; }
.operations-capability-card header strong { color: #0f172a; font-size: 17px; }
.operations-capability-card dl { margin: 12px 0 0; }
.operations-capability-card dl div { min-width: 0; border-left: 2px solid #e2e8f0; padding-left: 7px; }
.operations-capability-card dd { overflow: hidden; margin: 4px 0 0; color: #0f172a; font-size: 13px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.operations-link-button { max-width: 220px; overflow: hidden; border: 0; padding: 0; color: #46688c; background: transparent; font: 12px/1.4 "Cascadia Code", Consolas, monospace; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.admin-history-hint { margin: -4px 0 12px !important; font-size: 12px; }
.admin-action-dialog { width: min(520px, calc(100vw - 24px)); border: 0; border-radius: 8px; padding: 0; color: #0f172a; background: #fff; box-shadow: 6px 6px 0 rgba(72,46,55,.18); }
.admin-action-dialog::backdrop { background: rgba(15,23,42,.46); }
.invite-edit-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; }
.invite-edit-dialog .invite-form-grid { margin: 0; }
.invite-edit-dialog .invite-form-grid .plain-button { justify-self: start; }
.invite-scheduled { color: #92400e; background: #fef3c7; }
.admin-action-dialog form { display: grid; gap: 14px; padding: 18px; }
.admin-action-dialog header, .admin-action-dialog footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-action-dialog h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
.admin-action-dialog p { margin: 4px 0 0; color: #64748b; line-height: 1.5; }
.admin-action-dialog label { display: grid; gap: 6px; color: #334155; font-size: 12px; font-weight: 850; }
.admin-action-dialog textarea { width: 100%; border: 1.5px solid rgba(72,46,55,.55); border-radius: 6px; padding: 10px; color: #0f172a; background: #f8fafc; outline: none; }
.admin-action-dialog textarea { min-height: 100px; resize: vertical; }
.admin-action-dialog footer { justify-content: flex-end; }
.admin-action-error { border-left: 3px solid #dc2626; padding: 8px 10px; color: #991b1b !important; background: #fef2f2; font-size: 12px; overflow-wrap: anywhere; }
.plain-button:disabled, button:disabled { cursor: not-allowed; opacity: .48; }
.is-restricted { opacity: .7; }
.workbench-availability { margin: 0 0 12px; border-left: 3px solid #46688c; padding: 8px 10px; color: #475569; background: #edf4fb; font-size: 12px; line-height: 1.55; }
.workbench-availability[data-state="restricted"], .workbench-availability[data-state="waiting"] { border-left-color: #d97706; color: #92400e; background: #fffbeb; }
.admin-workspace { min-width: 0; padding: 14px; }
.admin-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-workspace h1 { margin: 0; font-size: 24px; letter-spacing: 0; }
.admin-workspace p { margin: 4px 0 0; color: #64748b; }
.admin-filters { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(110px, .75fr)) auto; gap: 8px; margin-bottom: 12px; }
button[hidden], .admin-filters[hidden], .admin-filters label[hidden], .admin-resource-panel[hidden], .admin-drawer-actions[hidden], .admin-json-section[hidden] { display: none; }
.admin-filters label { display: grid; gap: 5px; min-width: 0; }
.admin-filters input, .admin-filters select { min-width: 0; height: 38px; border: 1px solid rgba(15,23,42,.1); border-radius: 12px; padding: 0 10px; color: #0f172a; background: #f8fafc; outline: none; }
.admin-filter-actions { align-self: end; }
.admin-resource-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.admin-resource-panel article { min-width: 0; border: 1.5px solid rgba(72,46,55,.55); border-radius: 16px; padding: 12px; background: #f8fafc; }
.admin-resource-panel span { display: block; color: #64748b; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.admin-resource-panel strong { display: block; overflow: hidden; margin-top: 6px; color: #0f172a; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.admin-resource-panel em { display: block; overflow: hidden; margin-top: 4px; color: #64748b; font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.admin-table-shell { overflow: auto; border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.admin-table th, .admin-table td { border-bottom: 1.5px solid rgba(72,46,55,.55); padding: 11px 12px; color: #334155; font-size: 13px; text-align: left; white-space: nowrap; }
.admin-table th { position: sticky; top: 0; z-index: 1; color: #64748b; background: #f8fafc; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.admin-table tbody tr { cursor: pointer; transition: background .18s ease; }
.admin-table tbody tr:hover { background: #f8fafc; }
.admin-empty { height: 160px; color: #94a3b8 !important; text-align: center !important; }
.status-badge { display: inline-flex; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 850; }
.status-badge.success { color: #047857; background: #dff8ea; }
.status-badge.failed { color: #b91c1c; background: #fee2e2; }
.admin-pagination { justify-content: space-between; margin-top: 12px; color: #64748b; font-size: 13px; }
.admin-drawer { position: fixed; inset: 0; z-index: 80; display: grid; justify-items: end; background: rgba(15,23,42,.28); }
.admin-drawer[hidden] { display: none; }
.admin-drawer-panel { width: min(680px, calc(100vw - 24px)); height: calc(100vh - 24px); margin: 12px; overflow: auto; padding: 18px; animation: drawerIn .22s ease both; }
@keyframes drawerIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
.admin-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-drawer-head h2 { margin: 0; font-size: 22px; }
.admin-drawer-head p { margin: 4px 0 0; color: #64748b; }
.admin-drawer-actions { flex-wrap: wrap; margin-bottom: 12px; }
.admin-detail-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.admin-detail-summary article, .admin-detail-row { border: 1.5px solid rgba(72,46,55,.55); border-radius: 14px; padding: 10px; background: #f8fafc; }
.admin-detail-summary span, .admin-detail-row span { display: block; color: #64748b; font-size: 11px; font-weight: 850; }
.admin-detail-summary strong, .admin-detail-row strong { display: block; margin-top: 4px; color: #0f172a; overflow-wrap: anywhere; }
.admin-detail-empty { grid-column: 1 / -1; margin: 0; padding: 14px; color: #64748b; text-align: center; border: 1px dashed rgba(100,116,139,.3); border-radius: 7px; }
.admin-row-affordance { color: #64748b; font-size: 12px; font-weight: 800; white-space: nowrap; }
.admin-detail-grid { display: grid; gap: 8px; }
.admin-json-section { margin-top: 12px; }
.admin-json-tabs { flex-wrap: wrap; margin-bottom: 8px; }
.admin-json-tab { border: 1.5px solid rgba(72,46,55,.55); border-radius: 999px; padding: 7px 10px; color: #64748b; background: #fff; font-weight: 800; }
.admin-json-tab.is-active { color: #fff; background: #482e37; }
.admin-json { max-height: 360px; overflow: auto; white-space: pre-wrap; border: 1.5px solid rgba(72,46,55,.55); border-radius: 8px; padding: 12px; color: #334155; background: #f8fafc; font: 12px/1.55 "Cascadia Code", Consolas, monospace; }
.admin-toast { position: fixed; right: 18px; bottom: 18px; z-index: 90; border-radius: 999px; padding: 11px 14px; color: #fff; background: #482e37; box-shadow: 6px 6px 0 rgba(72,46,55,.18); font-weight: 850; }
.admin-dark .admin-topbar, .admin-dark .admin-overview article, .admin-dark .admin-sidebar, .admin-dark .admin-workspace, .admin-dark .admin-drawer-panel { border-color: rgba(148,163,184,.18); background: #261a21; box-shadow: 6px 6px 0 rgba(72,46,55,.18); }
.admin-dark .admin-topbar { background: rgba(18,26,44,.94); }
.admin-dark .brand-mark, .admin-dark .brand-mark:visited, .admin-dark .admin-side-item strong, .admin-dark .admin-workspace h1, .admin-dark .admin-overview strong, .admin-dark .admin-resource-panel strong, .admin-dark .admin-detail-summary strong, .admin-dark .admin-detail-row strong, .admin-dark .admin-drawer-head h2 { color: #f8fafc; }
.admin-dark .brand-mark span { background: #f8fafc; }
.admin-dark .admin-overview span, .admin-dark .admin-overview em, .admin-dark .admin-filters span, .admin-dark .admin-side-item span, .admin-dark .admin-sidebar p, .admin-dark .admin-workspace p, .admin-dark .admin-resource-panel span, .admin-dark .admin-resource-panel em, .admin-dark .admin-pagination, .admin-dark .admin-drawer-head p, .admin-dark .admin-detail-summary span, .admin-dark .admin-detail-row span { color: #94a3b8; }
.admin-dark .admin-side-item { color: #cbd5e1; }
.admin-dark .admin-side-item.is-active { border-color: rgba(118,159,201,.36); background: #3a2830; }
.admin-dark .plain-button, .admin-dark .icon-button, .admin-dark .admin-json-tab { border-color: rgba(148,163,184,.2); color: #e2e8f0; background: #34232b; }
.admin-dark .plain-button.primary, .admin-dark .admin-json-tab.is-active { color: #fff; background: #46688c; border-color: #46688c; }
.admin-dark .danger-action { color: #fecdd3; background: rgba(190,18,60,.16); border-color: rgba(244,63,94,.3); }
.admin-dark .admin-filters input, .admin-dark .admin-filters select { border-color: rgba(148,163,184,.2); color: #f8fafc; background: #1e1319; }
.admin-dark .admin-filters input::placeholder { color: #64748b; }
.admin-dark .admin-resource-panel article, .admin-dark .admin-detail-summary article, .admin-dark .admin-detail-row { border-color: rgba(148,163,184,.16); background: #1e1319; }
.admin-dark .admin-table-shell, .admin-dark .admin-json { border-color: rgba(148,163,184,.16); background: #1e1319; }
.admin-dark .admin-table th { color: #94a3b8; background: #221720; }
.admin-dark .admin-table th, .admin-dark .admin-table td { border-bottom-color: rgba(148,163,184,.12); color: #dce8f5; }
.admin-dark .admin-table tbody tr:hover { background: rgba(118,159,201,.12); }
.admin-dark .admin-empty { color: #64748b !important; }
.admin-dark .admin-json { color: #dce8f5; }
.admin-dark .admin-drawer { background: rgba(24,12,18,.66); }
.admin-dark .status-badge.success { color: #bbf7d0; background: rgba(22,163,74,.22); }
.admin-dark .status-badge.failed { color: #fecaca; background: rgba(220,38,38,.22); }
.admin-dark .admin-view-head h1, .admin-dark .operations-section h2, .admin-dark .operations-metrics strong, .admin-dark .operations-health strong, .admin-dark .operations-distribution-row strong, .admin-dark .operations-capability-card header strong, .admin-dark .operations-capability-card dd { color: #f8fafc; }
.admin-dark .admin-side-group, .admin-dark .operations-metrics span, .admin-dark .operations-metrics em, .admin-dark .operations-health span, .admin-dark .operations-capability-card dt { color: #94a3b8; }
.admin-dark .operations-metrics article, .admin-dark .operations-health article, .admin-dark .operations-capability-card, .admin-dark .admin-segmented { border-color: rgba(148,163,184,.18); background: #261a21; }
.admin-dark .operations-health { border-color: rgba(148,163,184,.18); background: rgba(148,163,184,.18); }
.admin-dark .operations-section { border-top-color: rgba(148,163,184,.2); }
.admin-dark .operations-distribution-row, .admin-dark .operations-distributions section h3 { color: #cbd5e1; }
.admin-dark .operations-distribution-row > div { background: #334155; }
.admin-dark .admin-segmented button { color: #94a3b8; }
.admin-dark .admin-segmented button.is-active { color: #fff; background: #46688c; }
.admin-dark .operations-notice { color: #fde68a; background: rgba(146,64,14,.24); }
.admin-dark .admin-action-dialog { color: #f8fafc; background: #261a21; }
.admin-dark .admin-action-dialog h2 { color: #f8fafc; }
.admin-dark .admin-action-dialog label { color: #cbd5e1; }
.admin-dark .admin-action-dialog textarea { border-color: rgba(148,163,184,.24); color: #f8fafc; background: #1e1319; }
.admin-dark .admin-action-error { color: #fecaca !important; background: rgba(153,27,27,.24); }
.admin-dark .invite-summary > span, .admin-dark .invite-generate-card, .admin-dark .invite-generated-card { border-color: rgba(148,163,184,.18); background: #261a21; }
.admin-dark .invite-summary strong, .admin-dark .invite-generate-card h2, .admin-dark .invite-generated-card h2, .admin-dark .invite-generated-list code, .admin-dark .invite-code-hint { color: #f8fafc; }
.admin-dark .invite-form-grid label, .admin-dark .invite-generated-card > p { color: #94a3b8; }
.admin-dark .invite-form-grid input, .admin-dark .invite-generated-list > div { border-color: rgba(148,163,184,.18); color: #f8fafc; background: #1e1319; }
.admin-dark .compliance-request-actions select { border-color: rgba(148,163,184,.2); color: #f8fafc; background: #1e1319; }
.admin-dark .compliance-status-summary article { border-color: rgba(148,163,184,.18); background: #261a21; }
.admin-dark .compliance-status-summary strong { color: #f8fafc; }
.admin-dark .compliance-status-summary span, .admin-dark .compliance-status-summary em { color: #94a3b8; }
.admin-dark .compliance-request-time { color: #94a3b8; }
.admin-dark .status-badge.compliance-received { color: #bfdbfe; background: rgba(59,130,246,.22); }
.admin-dark .status-badge.compliance-reviewing { color: #fde68a; background: rgba(146,64,14,.24); }
.admin-dark .status-badge.compliance-resolved { color: #bbf7d0; background: rgba(22,163,74,.22); }
.admin-dark .status-badge.compliance-rejected { color: #fecaca; background: rgba(220,38,38,.22); }

.improvement-page { width: min(940px, calc(100% - 36px)); margin: 0 auto; padding: 42px 0 64px; }
.improvement-page header { margin: 22px 0; border: 2px solid var(--ink); padding: 28px; border-radius: 22px; color: white; background: linear-gradient(118deg, #482e37 0 58%, #769fc9 58% 82%, #a9c7e8 82%); box-shadow: 8px 8px 0 rgba(72,46,55,.85); }
.improvement-page header span, .improvement-card span { display: inline-flex; margin-bottom: 10px; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.improvement-page header p { max-width: 660px; color: rgba(255,255,255,.76); line-height: 1.7; }
.back-link { color: #111827; font-weight: 850; text-decoration: none; }
.improvement-card { margin-top: 16px; border: 1.5px solid rgba(72,46,55,.6); border-radius: 24px; padding: 24px; background: var(--card); box-shadow: 6px 6px 0 rgba(72,46,55,.18); }
.improvement-card span { color: var(--muted); }
.improvement-card h2 { margin: 0 0 12px; }
.improvement-card p { color: #4b5563; line-height: 1.75; }

.analysis-consent-note { margin: 1px 2px 0; color: #8b7680; font-size: 11px; line-height: 1.55; }
.workbench-downloads .workbench-download-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 1.5px solid rgba(72,46,55,.55); border-radius: 15px; padding: 11px 12px; color: #0f172a; background: #f8fafc; text-align: left; transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.workbench-downloads .workbench-download-link:hover { transform: translateX(2px); border-color: rgba(15,23,42,.18); background: #fff; }
.ai-content-notice { display: block; max-width: 440px; color: #67535d; font-size: 11px; line-height: 1.55; }

.site-footer { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.35fr) minmax(220px, 1fr); gap: 22px; padding: 30px max(28px, calc((100vw - 1180px) / 2)); color: rgba(255,255,255,.75); background: var(--navy); }
.site-footer strong { color: #fff; font-size: 15px; }
.site-footer p { max-width: 320px; margin: 7px 0 0; font-size: 12px; line-height: 1.65; }
.site-footer nav { display: flex; align-content: flex-start; flex-wrap: wrap; gap: 10px 16px; }
.site-footer a { color: #e3f3ff; font-size: 12px; line-height: 1.6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer-meta { display: grid; align-content: start; justify-items: start; gap: 6px; font-size: 12px; line-height: 1.6; }
.site-footer-meta b { color: #fff; font-weight: 750; }
.site-registration-links, .legal-registration-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.site-registration-links a, .legal-registration-links a { display: inline-flex; align-items: center; gap: 5px; }
.site-registration-links img, .legal-registration-links img { width: 16px; height: 16px; object-fit: contain; }
.legal-registration-links { justify-content: flex-end; margin: 0; }

.service-availability-notice { position: fixed; inset: 8px 14px auto; z-index: 130; width: fit-content; max-width: calc(100vw - 28px); margin: 0 auto; border: 1.5px solid var(--ink); border-radius: 999px; padding: 9px 14px; color: var(--ink); background: #fff5d6; box-shadow: 4px 4px 0 rgba(72,46,55,.85); font-size: 12px; font-weight: 800; }

.compliance-dialog { width: min(590px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 28px)); overflow: auto; border: 2px solid var(--ink); border-radius: 20px; padding: 0; color: var(--ink); background: #fff; box-shadow: 9px 9px 0 rgba(72,46,55,.88); }
.compliance-dialog::backdrop { background: rgba(33, 21, 26, .54); backdrop-filter: blur(2px); }
.compliance-dialog-card { display: grid; gap: 14px; padding: clamp(20px, 4vw, 30px); }
.compliance-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.compliance-dialog-head span { display: block; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.compliance-dialog-head h2 { margin: 6px 0 0; font-size: clamp(22px, 4vw, 29px); letter-spacing: -.04em; }
.compliance-dialog-close { flex: 0 0 auto; width: 34px; height: 34px; border: 1.5px solid rgba(72,46,55,.35); border-radius: 50%; color: var(--ink); background: #fff; font-size: 22px; line-height: 1; }
.compliance-dialog-intro { margin: -3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.consent-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; border: 1.5px solid rgba(72,46,55,.16); border-radius: 14px; padding: 12px; color: #534049; background: #fcfafb; font-size: 13px; line-height: 1.68; cursor: pointer; }
.consent-check:hover { border-color: rgba(21,112,82,.38); background: #f3fbf6; }
.consent-check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); }
.consent-check a { color: var(--accent); font-weight: 800; }
.consent-message { min-height: 20px; margin: -2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.consent-message.error { color: #b91c1c; }
.compliance-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.compliance-dialog-actions .plain-button:disabled { cursor: wait; opacity: .62; }

.source-article-summary-card { display: grid; gap: 16px; }
.source-article-summary-card .card-label { justify-self: start; margin-bottom: 0; }
.source-article-summary { margin: 0; max-width: 720px; color: #5d4a53; font-size: 14px; line-height: 1.8; }
.source-article-origin-link { display: inline-flex; align-items: center; gap: 7px; width: fit-content; border: 1.5px solid var(--ink); border-radius: 999px; padding: 9px 13px; color: var(--ink); background: #f5fbf7; box-shadow: 3px 3px 0 var(--mist); font-size: 12px; font-weight: 850; text-decoration: none; }
.source-article-origin-link:hover { background: var(--accent-soft); transform: translate(-1px, -1px); }

.legal-page { min-height: 100vh; background: linear-gradient(180deg, #fdf9f0 0 46%, #dce8f5 46% 79%, #a9c7e8 79%); }
.mcp-page { min-height: 100vh; color: var(--ink); background: linear-gradient(180deg, #fdf9f0 0 39%, #dce8f5 39% 79%, #a9c7e8 79%); }
.mcp-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 64px; }
.mcp-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.mcp-header .brand-mark { color: var(--ink); text-decoration: none; }
.mcp-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(24px, 5vw, 68px); align-items: end; margin-top: clamp(48px, 9vw, 108px); border: 2px solid var(--ink); border-radius: 28px; padding: clamp(28px, 5vw, 58px); color: #fff; background: linear-gradient(118deg, #482e37 0 57%, #769fc9 57% 80%, #a9c7e8 80%); box-shadow: 9px 9px 0 rgba(72,46,55,.85); }
.mcp-kicker, .mcp-section-head > span { display: inline-flex; color: #dfbdc8; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mcp-hero h1 { margin: 14px 0 0; max-width: 680px; color: #fff; font-size: clamp(42px, 7vw, 76px); line-height: .98; letter-spacing: -.07em; }
.mcp-hero p { max-width: 640px; margin: 20px 0 0; color: rgba(255,255,255,.78); font-size: 15px; line-height: 1.8; }
.mcp-hero-note { border: 1.5px solid rgba(255,255,255,.38); border-radius: 18px; padding: 19px; background: rgba(255,255,255,.10); backdrop-filter: blur(8px); }
.mcp-hero-note strong { display: block; color: #fff; font-size: 16px; }
.mcp-hero-note p { margin-top: 9px; font-size: 13px; }
.mcp-section { margin-top: 38px; }
.mcp-section-head { margin-bottom: 17px; }
.mcp-section-head > span { color: var(--accent); }
.mcp-section-head h2 { margin: 7px 0 0; font-size: clamp(27px, 4vw, 39px); letter-spacing: -.055em; }
.mcp-section-head p { max-width: 650px; margin: 9px 0 0; color: #64515b; font-size: 14px; line-height: 1.75; }
.mcp-connect-grid { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 18px; }
.mcp-code-card, .mcp-tool-card { border: 1.5px solid rgba(72,46,55,.46); border-radius: 21px; background: rgba(255,255,255,.94); box-shadow: 5px 5px 0 rgba(72,46,55,.15); }
.mcp-code-card { min-width: 0; padding: 20px; }
.mcp-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ink); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.mcp-copy-button { border: 1px solid rgba(72,46,55,.42); border-radius: 999px; padding: 5px 9px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 850; cursor: pointer; }
.mcp-copy-button:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.mcp-code-line, .mcp-config-code { overflow: auto; color: #24303b; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; line-height: 1.7; }
.mcp-code-line { display: block; margin-top: 18px; border-radius: 12px; padding: 12px; background: #edf5fb; overflow-wrap: anywhere; white-space: pre-wrap; }
.mcp-config-code { min-height: 156px; margin: 18px 0 0; border-radius: 12px; padding: 12px; background: #edf5fb; white-space: pre; }
.mcp-code-card p { margin: 14px 0 0; color: #6d5963; font-size: 12px; line-height: 1.65; }
.mcp-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mcp-tool-card { min-width: 0; padding: 21px; transition: transform .2s ease, box-shadow .2s ease; }
.mcp-tool-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(72,46,55,.18); }
.mcp-tool-card > span { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.mcp-tool-card h3 { margin: 12px 0 0; color: #27303a; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: clamp(14px, 2vw, 17px); line-height: 1.4; overflow-wrap: anywhere; }
.mcp-tool-card p { margin: 12px 0 0; color: #6d5963; font-size: 13px; line-height: 1.75; }
.legal-shell { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 58px; }
.legal-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.legal-header .brand-mark { color: var(--ink); text-decoration: none; }
.legal-nav, .legal-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.legal-nav a, .legal-footer a { color: var(--ink); font-size: 12px; font-weight: 780; text-decoration: none; }
.legal-nav a:hover, .legal-footer a:hover { color: var(--accent); text-decoration: underline; }
.legal-hero { margin-top: clamp(44px, 9vw, 94px); border: 2px solid var(--ink); border-radius: 25px; padding: clamp(25px, 6vw, 54px); background: #fff; box-shadow: 9px 9px 0 rgba(72,46,55,.85); }
.legal-hero h1 { margin-top: 18px; font-size: clamp(38px, 7vw, 66px); }
.legal-hero p { max-width: 620px; margin: 19px 0 0; color: #6f5d66; font-size: 14px; line-height: 1.75; }
.legal-content { display: grid; gap: 18px; margin-top: 26px; }
.legal-content > section { border: 1.5px solid rgba(72,46,55,.42); border-radius: 20px; padding: clamp(20px, 4vw, 32px); background: rgba(255,255,255,.92); box-shadow: 5px 5px 0 rgba(72,46,55,.14); }
.legal-content h2 { margin: 0; font-size: clamp(19px, 3vw, 25px); letter-spacing: -.035em; }
.legal-content p, .legal-content li { color: #5d4a53; font-size: 14px; line-height: 1.82; }
.legal-content p { margin: 14px 0 0; }
.legal-content ul { display: grid; gap: 7px; margin: 14px 0 0; padding-left: 22px; }
.legal-content a { color: var(--accent); font-weight: 780; }
.legal-processor-list { list-style: none; padding-left: 0 !important; }
.legal-processor-list li { border-top: 1px solid var(--line); padding: 10px 0; }
.legal-processor-list li:first-child { border-top: 0; padding-top: 0; }
.legal-processor-list strong { color: var(--ink); }
.legal-processor-list span { color: var(--muted); font-size: 12px; }
.legal-processor-list a { margin-left: 4px; font-size: 12px; }
.legal-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 30px; padding: 19px 0 0; border-top: 1.5px solid rgba(72,46,55,.42); }
.legal-footer p { margin: 0; }
.legal-footer p a { color: #5d4a53; }
.legal-footer [aria-disabled="true"] { pointer-events: none; opacity: .55; }
.legal-request-layout { grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr); align-items: start; gap: 18px; }
.legal-request-layout > div, .legal-request-help { border: 1.5px solid rgba(72,46,55,.42); border-radius: 20px; padding: clamp(20px, 4vw, 32px); background: rgba(255,255,255,.92); box-shadow: 5px 5px 0 rgba(72,46,55,.14); }
.legal-request-form { display: grid; gap: 9px; margin-top: 18px; }
.legal-request-form label { color: var(--ink); font-size: 12px; font-weight: 850; }
.legal-request-form input, .legal-request-form select, .legal-request-form textarea { width: 100%; min-width: 0; border: 1.5px solid rgba(72,46,55,.46); border-radius: 12px; padding: 11px 12px; color: var(--ink); background: #fff; outline: none; }
.legal-request-form textarea { min-height: 142px; resize: vertical; line-height: 1.65; }
.legal-request-form input:focus, .legal-request-form select:focus, .legal-request-form textarea:focus { border-color: var(--accent); box-shadow: 3px 3px 0 var(--accent-soft); }
.legal-request-form .plain-button { justify-self: start; margin-top: 4px; }
.legal-request-message { min-height: 22px; margin: 2px 0 0 !important; font-size: 12px !important; }
.legal-request-message.is-success { color: var(--accent); }
.legal-request-message.is-error { color: #b91c1c; }
.legal-request-help h2 { margin-top: 0; }
.legal-request-help p { margin: 10px 0 0; }

.beta-access-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-top: 22px; border-top: 1.5px solid rgba(72,46,55,.42); color: #5d4a53; }
.beta-access-footer nav { display: flex; flex-wrap: wrap; gap: 8px 15px; }
.beta-access-footer a, .beta-access-footer span { color: #5d4a53; font-size: 12px; line-height: 1.65; text-decoration: none; }
.beta-access-footer a:hover { color: var(--accent); text-decoration: underline; }
.beta-access-footer > div { display: grid; justify-items: end; gap: 3px; text-align: right; }

@media (max-width: 980px) {
  .mcp-hero, .mcp-connect-grid { grid-template-columns: 1fr; }
  .beta-access-layout { grid-template-columns: 1fr; gap: 42px; align-content: center; padding: 72px 0; }
  .beta-access-copy { width: min(720px, 100%); }
  .beta-access-card { width: min(540px, 100%); }
  .hero-panel, .workspace { width: min(100% - 28px, 1180px); }
  .overview-card, .comments-card, .source-article-card, .report-card, .dynamic-card, .meta-strip { grid-column: span 12 !important; }
  .is-editing-layout .card-drag-handle, .card-width-controls { display: none; }
  .report-designer-toolbar { bottom: 14px; }
  .report-appearance-panel { right: 18px; bottom: 72px; width: min(420px, calc(100vw - 36px)); }
  .appearance-group div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-strip { align-items: flex-start; flex-direction: column; }
  .advanced-hero-card, .workbench-status-grid, .workbench-grid { grid-template-columns: 1fr; }
  .admin-layout, .quick-start-grid { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; display: flex; overflow-x: auto; align-items: stretch; }
  .admin-side-group { display: none; }
  .admin-side-item { flex: 0 0 180px; }
  .admin-overview, .operations-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-two-column { grid-template-columns: 1fr; }
  .operations-capability-grid { grid-template-columns: 1fr; }
  .invite-admin-grid { grid-template-columns: 1fr; }
  .admin-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-workspace-head { flex-direction: column; }
  .advanced-actions { justify-content: flex-start; min-width: 0; }
  .workbench-card-wide { grid-column: span 1; }
  .workbench-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; gap: 16px; }
  body > .mindmap-detail.is-viewport-sheet { position: fixed; left: 12px !important; right: 12px; top: max(12px, env(safe-area-inset-top)) !important; bottom: auto; z-index: 220; width: auto; max-height: min(58vh, calc(100dvh - 24px - env(safe-area-inset-top))); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; transform: translateY(calc(-100% - 24px)); opacity: 1; box-shadow: 0 14px 36px rgba(46,28,36,.28); transition: transform .24s ease; }
  body > .mindmap-detail.is-viewport-sheet.is-open { transform: translateY(0); }
  body.mindmap-detail-open { overflow: hidden; }
}

@media (max-width: 680px) {
  .mcp-shell { width: min(100% - 28px, 1120px); padding-top: 20px; padding-bottom: 44px; }
  .mcp-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .mcp-hero { margin-top: 42px; border-radius: 22px; padding: 24px; box-shadow: 7px 7px 0 rgba(72,46,55,.85); }
  .mcp-hero h1 { font-size: clamp(39px, 13vw, 55px); }
  .mcp-hero p { font-size: 13px; }
  .mcp-section { margin-top: 30px; }
  .mcp-tool-grid { grid-template-columns: 1fr; }
  .mcp-code-card, .mcp-tool-card { border-radius: 17px; padding: 18px; }
  .mcp-config-code { min-height: 0; }
  .app.active .workspace { animation: none; transform: none; }
  .beta-access-page::before { right: -120px; top: 12vh; width: 240px; height: 240px; }
  .beta-access-page::after { left: -80px; bottom: 3vh; }
  .beta-access-shell { width: min(100% - 28px, 1120px); padding-top: 20px; }
  .beta-access-layout { min-height: auto; padding: 64px 0 80px; }
  .beta-access-copy h1 { font-size: clamp(44px, 15vw, 64px); }
  .beta-access-copy > p { margin-top: 20px; font-size: 14px; }
  .beta-access-card { gap: 20px; padding: 22px; box-shadow: 7px 7px 0 rgba(72,46,55,.92); }
  .hero-panel { padding-top: 18px; }
  .llm-log-panel { top: 104px; right: 14px; }
  .top-nav { align-items: center; flex-direction: row; }
  .nav-links { width: auto; justify-content: flex-end; gap: 16px; }
  .nav-links::after { display: none; }
  .hero-copy { padding-top: 64px; }
  h1 { font-size: clamp(40px, 13vw, 54px); letter-spacing: -.065em; }
  .subtitle { margin-top: 18px; font-size: 14px; }
  .analysis-dock { margin-top: 30px; border-radius: 22px; padding: 12px; }
  .analysis-dock-head { align-items: stretch; flex-direction: column; gap: 12px; padding: 3px 2px 12px; }
  .input-wrap { min-height: 62px; border-radius: 17px; padding-left: 14px; }
  .platform-pills { flex-wrap: nowrap; justify-content: flex-start; margin: 0 -2px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
  .platform-pills::-webkit-scrollbar { display: none; }
  .platform-pill { flex: 0 0 auto; }
  .report-canvas[data-background] { --canvas-pad: 10px; }
  .report-designer-toolbar { bottom: max(10px, env(safe-area-inset-bottom)); flex-wrap: wrap; justify-content: center; max-width: 100%; border-radius: 18px; }
  .report-designer-toolbar button { padding: 7px 9px; font-size: 11px; }
  .report-appearance-panel { left: 10px; right: 10px; bottom: 112px; width: auto; max-height: min(560px, calc(100vh - 140px)); }
  .appearance-group div { grid-template-columns: 1fr; }
  .overview-layout, .meta-grid, .workbench-material-head, .workbench-meta-grid { grid-template-columns: 1fr; }
  .format-pros-cons { grid-template-columns: 1fr; }
  .format-timeline-item { grid-template-columns: 1fr; gap: 2px; }
  .source-article-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .source-article-reader { max-height: 680px; }
  .source-reader-toolbar { grid-template-columns: 1fr; gap: 6px; }
  .source-reader-toolbar nav { justify-content: flex-start; }
  .source-article-body { width: min(100% - 28px, 780px); padding-top: 34px; }
  .source-article-body h3::before { left: -10px; width: 4px; }
  .article-figure { margin-left: 0; margin-right: 0; }
  .article-figure > button { border-radius: 16px; }
  .article-lightbox { padding: 62px 12px 72px; }
  .article-lightbox-stage { height: calc(100vh - 134px); }
  .article-lightbox-close { top: 10px; right: 10px; }
  .article-lightbox-prev { left: 12px; top: auto; bottom: 14px; }
  .article-lightbox-next { right: 12px; top: auto; bottom: 14px; }
  .mindmap-canvas-wrap, .mindmap-canvas { min-height: 420px; height: 420px; }
  .workbench-console-head, .workbench-card-head, .admin-topbar, .admin-overview { align-items: flex-start; flex-direction: column; }
  .admin-shell { width: min(100% - 24px, 1240px); }
  .admin-detail-summary { grid-template-columns: 1fr; }
  .admin-view-head { flex-direction: column; }
  .invite-summary { width: 100%; }
  .invite-summary > span { flex: 1; }
  .invite-form-grid { grid-template-columns: 1fr; }
  .invite-label-wide { grid-column: auto; }
  .admin-segmented { width: 100%; }
  .admin-segmented button { flex: 1; }
  .operations-metrics, .operations-health, .admin-overview, .admin-filters, .compliance-status-summary { grid-template-columns: 1fr; }
  .admin-action-dialog footer { flex-direction: column; }
  .admin-action-dialog footer .plain-button { width: 100%; }
  .admin-action-dialog { max-height: calc(100vh - 24px); overflow: auto; }
  .admin-drawer-panel { width: calc(100vw - 16px); height: calc(100vh - 16px); margin: 8px; }
  .operations-evidence, .operations-table code, .operations-link-button { max-width: none; overflow-wrap: anywhere; white-space: normal; }
  .site-footer { padding: 26px 14px; }
  .compliance-dialog-actions { flex-direction: column-reverse; }
  .compliance-dialog-actions .plain-button { width: 100%; }
  .pending-report-actions { width: 100%; }
  .pending-report-actions .plain-button { width: 100%; }
}

/* Admin console — quiet operations workspace */
.admin-page {
  --admin-bg: #f5f7fa;
  --admin-surface: #fff;
  --admin-surface-soft: #f8fafc;
  --admin-ink: #1c1820;
  --admin-muted: #667085;
  --admin-line: #dfe4ec;
  --admin-wine: #4b2d3a;
  --admin-mint: #e3f5ec;
  --admin-blue: #eaf2fb;
  --admin-success: #138a5b;
  --admin-warning: #b86f08;
  --admin-danger: #c93b4b;
  min-height: 100vh;
  color: var(--admin-ink);
  background: var(--admin-bg);
}
.admin-page button, .admin-page input, .admin-page select, .admin-page textarea { font-family: inherit; }
.admin-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.admin-shell { width: min(1500px, 100%); min-height: 100vh; margin: 0 auto; padding: 0; background: var(--admin-bg); }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  justify-content: space-between;
  min-height: 64px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
  padding: 0 22px;
  background: rgba(255,255,255,.96);
  box-shadow: none;
  backdrop-filter: blur(14px);
}
.admin-topbar-leading, .admin-topbar-actions { display: flex; align-items: center; gap: 12px; }
.admin-topbar .brand-mark { min-width: 176px; color: var(--admin-wine); font-size: 15px; text-decoration: none; }
.admin-topbar .brand-mark > span { width: 23px; height: 23px; border: 1px solid var(--admin-wine); border-radius: 5px; background: var(--admin-wine); box-shadow: inset 0 0 0 5px #fff; transform: none; }
.admin-topbar-context { display: flex; align-items: baseline; gap: 8px; padding-left: 15px; border-left: 1px solid var(--admin-line); }
.admin-topbar-context span { color: var(--admin-muted); font-size: 11px; }
.admin-topbar-context strong { color: var(--admin-ink); font-size: 14px; font-weight: 750; }
.admin-live-state { display: inline-flex; align-items: center; gap: 6px; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.admin-live-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--admin-success); box-shadow: 0 0 0 3px rgba(19,138,91,.11); }
.admin-page .icon-button { width: 34px; height: 34px; border: 1px solid var(--admin-line); border-radius: 7px; color: var(--admin-wine); background: var(--admin-surface); box-shadow: none; }
.admin-page .plain-button { min-height: 34px; border-color: var(--admin-line); border-radius: 7px; padding: 7px 12px; box-shadow: none; font-size: 12px; }
.admin-page .plain-button.primary { border-color: var(--admin-wine); color: #fff; background: var(--admin-wine); }
.admin-page .plain-button:hover { border-color: #c9d0db; transform: none; }
.admin-page .plain-button.primary:hover { border-color: #3e2530; background: #3e2530; }
.admin-menu-toggle { display: none !important; }
.admin-sidebar-backdrop { display: none; }
.admin-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 0; align-items: start; }
.admin-sidebar {
  position: sticky;
  top: 64px;
  z-index: 45;
  display: grid;
  align-content: start;
  gap: 3px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  border: 0;
  border-right: 1px solid var(--admin-line);
  border-radius: 0;
  padding: 20px 13px 28px;
  background: #f8f9fb;
  box-shadow: none;
}
.admin-side-group { padding: 14px 10px 5px; color: #8b93a1; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.admin-side-group:first-child { padding-top: 2px; }
.admin-side-item {
  position: relative;
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  color: #596273;
  background: transparent;
  text-align: left;
}
.admin-side-item::before { content: ""; position: absolute; left: -13px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.admin-side-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.admin-side-item strong { color: inherit; font-size: 12px; font-weight: 720; }
.admin-side-item > span { display: none; }
.admin-side-item:hover { color: var(--admin-wine); background: rgba(75,45,58,.045); }
.admin-side-item.is-active { border: 0; color: var(--admin-wine); background: var(--admin-mint); }
.admin-side-item.is-active::before { background: var(--admin-wine); }
.admin-main { min-width: 0; padding: 28px 30px 52px; }
.admin-view-panel { width: 100%; }
.admin-view-head { align-items: center; gap: 20px; margin-bottom: 20px; }
.admin-view-head h1 { color: var(--admin-ink); font-size: 25px; font-weight: 760; letter-spacing: -.035em; }
.admin-view-head p, .operations-section header p { margin-top: 5px; color: var(--admin-muted); font-size: 12px; line-height: 1.55; }
.admin-segmented { flex-wrap: nowrap; border-color: var(--admin-line); border-radius: 7px; padding: 3px; box-shadow: none; }
.admin-segmented button { min-height: 30px; border-radius: 5px; padding: 0 10px; color: var(--admin-muted); font-size: 11px; }
.admin-segmented button.is-active { color: #fff; background: var(--admin-wine); }
.operations-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: hidden; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface); }
.operations-metrics article { min-width: 0; border: 0; border-right: 1px solid var(--admin-line); border-radius: 0; padding: 17px 19px; background: transparent; box-shadow: none; }
.operations-metrics article:last-child { border-right: 0; }
.operations-metrics span, .operations-capability-card dt { color: var(--admin-muted); font-size: 10px; font-weight: 780; letter-spacing: .04em; }
.operations-metrics strong { margin-top: 8px; color: var(--admin-ink); font-size: 25px; font-weight: 760; letter-spacing: -.04em; }
.operations-metrics em { margin-top: 7px; color: #8a93a2; font-size: 10px; }
.operations-metrics em b { color: #596273; font-style: normal; font-weight: 800; }
.operations-metrics em i { font-style: normal; }
.operations-health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: hidden; margin-top: 14px; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface); }
.operations-health > article { position: relative; min-height: 68px; border-right: 1px solid var(--admin-line); padding: 14px 16px 14px 38px; background: transparent; }
.operations-health > article:nth-child(3) { border-right: 0; }
.operations-health > article::before { content: ""; position: absolute; left: 17px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: #9aa3b2; box-shadow: 0 0 0 4px rgba(154,163,178,.12); }
.operations-health > article:has(.health-healthy)::before, .operations-health > article:has(.health-ok)::before { background: var(--admin-success); box-shadow: 0 0 0 4px rgba(19,138,91,.11); }
.operations-health > article:has(.health-degraded)::before { background: var(--admin-warning); box-shadow: 0 0 0 4px rgba(184,111,8,.12); }
.operations-health span { color: var(--admin-muted); font-size: 10px; }
.operations-health strong { margin-top: 5px; color: var(--admin-ink); font-size: 13px; font-weight: 730; }
.operations-health .health-healthy, .operations-health .health-ok { color: var(--admin-success); }
.operations-health .health-degraded { color: var(--admin-warning); }
.operations-health .health-disabled { color: var(--admin-muted); }
.operations-system-health { grid-column: 1 / -1; border-top: 1px solid var(--admin-line); background: var(--admin-surface-soft); }
.operations-system-health summary { padding: 10px 16px; color: var(--admin-muted); font-size: 11px; font-weight: 720; cursor: pointer; }
.operations-system-health-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; border-top: 1px solid var(--admin-line); background: var(--admin-line); }
.operations-system-health-grid div { padding: 10px 13px; background: var(--admin-surface); }
.operations-system-health-grid span { display: block; }
.operations-system-health-grid strong { display: block; margin-top: 3px; font-size: 11px; }
.operations-failures-section { margin-top: 16px; }
.operations-section { min-width: 0; border: 1px solid var(--admin-line); border-radius: 8px; padding: 16px; background: var(--admin-surface); }
.admin-view-panel > .operations-section + .operations-section { margin-top: 14px; }
.operations-section > header { align-items: center; margin-bottom: 12px; }
.operations-section h2 { color: var(--admin-ink); font-size: 15px; font-weight: 750; letter-spacing: -.015em; }
.operations-two-column { grid-template-columns: minmax(280px, .82fr) minmax(0, 1.3fr); gap: 14px; margin-top: 14px; }
.operations-audit-section, .invite-list-section { margin-top: 14px; }
.operations-distributions { gap: 13px; }
.operations-distributions section h3 { color: #596273; font-size: 11px; }
.operations-distribution-row { color: var(--admin-muted); }
.operations-distribution-row > div { height: 5px; background: #edf0f5; }
.operations-distribution-row i { background: #6b8ead; }
.operations-distribution-row strong { color: var(--admin-ink); }
.admin-table-shell { overflow: auto; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface); }
.admin-table th, .admin-table td { border-bottom: 1px solid #e8ebf0; padding: 10px 11px; color: #4e5868; font-size: 12px; }
.admin-table th { color: #7b8493; background: var(--admin-surface-soft); font-size: 10px; font-weight: 780; letter-spacing: .04em; }
.admin-table tbody tr:hover { background: #f8fbfd; }
.admin-empty { height: 118px; }
.status-badge { border-radius: 5px; font-size: 10px; }
.operations-table code, .operations-evidence { font-size: 10px; }
.invite-admin-grid { gap: 14px; }
.invite-generate-card, .invite-generated-card, .invite-summary > span, .compliance-status-summary article, .operations-capability-card, .admin-overview article, .admin-workspace, .admin-drawer-panel {
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: 0 8px 24px rgba(31,39,51,.045);
}
.invite-generate-card, .invite-generated-card { padding: 17px; }
.invite-form-grid input, .admin-filters input, .admin-filters select, .admin-action-dialog textarea, .compliance-request-actions select { border-color: var(--admin-line); border-radius: 7px; background: var(--admin-surface-soft); }
.admin-overview { gap: 0; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--admin-line); border-radius: 8px; }
.admin-overview article { border: 0; border-right: 1px solid var(--admin-line); border-radius: 0; box-shadow: none; }
.admin-overview article:last-child { border-right: 0; }
.admin-overview strong { color: var(--admin-ink); }
.admin-workspace { padding: 18px; }
.admin-workspace h1 { color: var(--admin-ink); font-size: 22px; }
.admin-filters { padding: 12px; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface-soft); }
.admin-resource-panel article { border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface-soft); }
.admin-action-dialog { border: 1px solid var(--admin-line); box-shadow: 0 20px 60px rgba(31,39,51,.18); }
.admin-action-dialog::backdrop, .admin-drawer { background: rgba(27,30,38,.36); backdrop-filter: blur(2px); }
.admin-drawer-panel { border-radius: 10px; box-shadow: 0 20px 70px rgba(31,39,51,.18); }
.admin-detail-summary article, .admin-detail-row, .admin-json { border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface-soft); }
.admin-toast { border-radius: 7px; background: var(--admin-wine); box-shadow: 0 10px 30px rgba(75,45,58,.2); }

.admin-dark.admin-page { --admin-bg: #171116; --admin-surface: #241a21; --admin-surface-soft: #20171d; --admin-ink: #f2edf0; --admin-muted: #aaa0a7; --admin-line: rgba(221,210,217,.13); --admin-mint: #263b34; --admin-blue: #20303e; background: var(--admin-bg); }
.admin-dark .admin-topbar { border-color: var(--admin-line); background: rgba(30,21,27,.95); box-shadow: none; }
.admin-dark .admin-sidebar { border-color: var(--admin-line); background: #1c1419; box-shadow: none; }
.admin-dark .admin-topbar .brand-mark, .admin-dark .admin-topbar-context strong, .admin-dark .admin-view-head h1, .admin-dark .operations-section h2, .admin-dark .operations-metrics strong, .admin-dark .operations-health strong, .admin-dark .admin-workspace h1, .admin-dark .admin-overview strong { color: var(--admin-ink); }
.admin-dark .admin-topbar .brand-mark > span { border-color: #e8dfe4; background: #e8dfe4; box-shadow: inset 0 0 0 5px #1e151b; }
.admin-dark .admin-page .icon-button, .admin-dark .icon-button, .admin-dark .plain-button, .admin-dark .admin-segmented, .admin-dark .operations-metrics, .admin-dark .operations-health, .admin-dark .operations-health > article, .admin-dark .operations-system-health-grid div, .admin-dark .operations-section, .admin-dark .admin-table-shell, .admin-dark .invite-generate-card, .admin-dark .invite-generated-card, .admin-dark .invite-summary > span, .admin-dark .compliance-status-summary article, .admin-dark .operations-capability-card, .admin-dark .admin-overview article, .admin-dark .admin-workspace, .admin-dark .admin-drawer-panel { border-color: var(--admin-line); background: var(--admin-surface); box-shadow: none; }
.admin-dark .admin-table th, .admin-dark .admin-filters, .admin-dark .admin-resource-panel article, .admin-dark .admin-detail-summary article, .admin-dark .admin-detail-row, .admin-dark .admin-json { border-color: var(--admin-line); background: var(--admin-surface-soft); }
.admin-dark .admin-table th, .admin-dark .admin-table td { border-bottom-color: var(--admin-line); color: #d6ced3; }
.admin-dark .admin-side-item { color: #b8aeb5; }
.admin-dark .admin-side-item.is-active { color: #f0e7ec; background: var(--admin-mint); }
.admin-dark .operations-system-health { background: var(--admin-surface-soft); }
.admin-dark .operations-system-health-grid { background: var(--admin-line); }

@media (max-width: 900px) {
  .admin-topbar { padding: 0 15px; }
  .admin-topbar .brand-mark { min-width: 0; }
  .admin-menu-toggle { display: flex !important; flex-direction: column; justify-content: center; gap: 3px; }
  .admin-menu-toggle span { width: 14px; height: 1.5px; border-radius: 2px; background: currentColor; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    z-index: 55;
    width: min(272px, calc(100vw - 52px));
    height: calc(100dvh - 64px);
    border-right: 1px solid var(--admin-line);
    transform: translateX(-102%);
    transition: transform .2s ease;
  }
  .admin-nav-open .admin-sidebar { transform: translateX(0); }
  .admin-sidebar-backdrop { position: fixed; inset: 64px 0 0; z-index: 50; display: block; border: 0; background: rgba(24,27,34,.36); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .admin-nav-open .admin-sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .admin-nav-open { overflow: hidden; }
  .admin-main { padding: 24px 20px 44px; }
  .admin-side-group { display: block; }
  .admin-side-item { flex: initial; }
  .operations-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-metrics article:nth-child(2) { border-right: 0; }
  .operations-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--admin-line); }
  .operations-health { grid-template-columns: 1fr; }
  .operations-health > article { border-right: 0; border-bottom: 1px solid var(--admin-line); }
  .operations-health > article:nth-child(3) { border-bottom: 0; }
  .operations-system-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-two-column, .invite-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .admin-topbar { align-items: center; flex-direction: row; min-height: 58px; }
  .admin-sidebar { top: 58px; height: calc(100dvh - 58px); }
  .admin-sidebar-backdrop { top: 58px; }
  .admin-topbar-context, .admin-live-state { display: none; }
  .admin-topbar-actions { gap: 6px; }
  .admin-topbar-actions .plain-button { padding: 7px 9px; }
  .admin-main { padding: 20px 14px 38px; }
  .admin-view-head { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
  .admin-view-head h1 { font-size: 22px; }
  .admin-segmented { width: 100%; overflow-x: auto; }
  .admin-segmented button { flex: 1 0 auto; }
  .operations-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-metrics article { padding: 14px; }
  .operations-metrics strong { font-size: 22px; }
  .operations-health { grid-template-columns: 1fr; }
  .operations-section { padding: 14px; }
  .admin-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-overview article:nth-child(2) { border-right: 0; }
  .admin-overview article:nth-child(-n+2) { border-bottom: 1px solid var(--admin-line); }
  .admin-filters { grid-template-columns: 1fr; }
  .compliance-status-summary { grid-template-columns: 1fr; }
  #opsRecentFailuresTable { display: block; }
  #opsRecentFailuresTable tr:not(:has(.admin-empty)) { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 4px 10px; border-bottom: 1px solid var(--admin-line); padding: 12px 4px; }
  #opsRecentFailuresTable tr:not(:has(.admin-empty)) td { border: 0; padding: 0; white-space: normal; }
  #opsRecentFailuresTable tr:not(:has(.admin-empty)) td:nth-child(1) { grid-column: 2; grid-row: 2; color: var(--admin-muted); font-size: 10px; }
  #opsRecentFailuresTable tr:not(:has(.admin-empty)) td:nth-child(2) { grid-column: 2; grid-row: 1; color: var(--admin-ink); font-weight: 750; }
  #opsRecentFailuresTable tr:not(:has(.admin-empty)) td:nth-child(3) { grid-column: 3; grid-row: 1; }
  #opsRecentFailuresTable tr:not(:has(.admin-empty)) td:nth-child(4) { grid-column: 2 / 4; grid-row: 3; }
  #opsRecentFailuresTable tr:not(:has(.admin-empty)) td:nth-child(5), #opsRecentFailuresTable tr:not(:has(.admin-empty)) td:nth-child(6) { grid-column: 2 / 4; color: var(--admin-muted); font-size: 10px; }
  #opsRecentFailuresTable tr:not(:has(.admin-empty))::before { content: ""; grid-column: 1; grid-row: 1 / 5; width: 5px; height: 5px; margin-top: 5px; border-radius: 50%; background: var(--admin-danger); }
  .operations-failures-section .admin-table-shell { overflow: visible; }
  .operations-failures-section .admin-table { min-width: 0; }
  .operations-failures-section thead { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .app.is-tab-transitioning .tabs-card, .app.is-tab-transitioning .report-canvas { transform: none; opacity: 1; }
}

/* MCP access-key management stays visually aligned with the existing admin console. */
.mcp-key-summary { display: flex; gap: 8px; }
.mcp-key-summary > span {
  min-width: 108px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--admin-muted);
  background: var(--admin-surface);
  font-size: 12px;
}
.mcp-key-summary strong { display: block; margin-top: 3px; color: var(--admin-ink); font-size: 18px; font-weight: 760; }
.mcp-key-service-notice {
  margin: -6px 0 14px;
  border-left: 3px solid var(--admin-warning);
  padding: 8px 10px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  line-height: 1.5;
}
.mcp-key-service-notice[data-state="ready"] { border-left-color: var(--admin-success); color: var(--admin-success); background: #ecfdf5; }
.mcp-key-admin-grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 14px; }
.mcp-key-create-card, .mcp-key-generated-card {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  padding: 17px;
  background: var(--admin-surface);
  box-shadow: 0 8px 24px rgba(31,39,51,.045);
}
.mcp-key-create-card header > span, .mcp-key-generated-card header span { color: var(--admin-success); font-size: 10px; font-weight: 780; letter-spacing: .05em; }
.mcp-key-create-card h2, .mcp-key-generated-card h2 { margin: 4px 0 0; color: var(--admin-ink); font-size: 18px; letter-spacing: -.02em; }
.mcp-key-form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 16px 0; }
.mcp-key-form-grid label { display: grid; align-content: start; gap: 6px; color: var(--admin-muted); font-size: 11px; font-weight: 760; }
.mcp-key-form-grid input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--admin-line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--admin-ink);
  background: var(--admin-surface-soft);
  outline: none;
}
.mcp-key-form-grid em { color: var(--admin-muted); font-size: 10px; font-style: normal; font-weight: 600; }
.mcp-key-generated-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mcp-key-generated-card > p { margin: 8px 0 14px; color: var(--admin-muted); font-size: 12px; line-height: 1.5; }
.mcp-key-generated-value {
  display: block;
  overflow: auto;
  border: 1px solid var(--admin-line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--admin-ink);
  background: var(--admin-surface-soft);
  font: 700 12px/1.6 "Cascadia Code", Consolas, monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.mcp-key-list-section { margin-top: 14px; }
.mcp-key-table { min-width: 1000px; }
.mcp-key-table tbody tr { cursor: default; }
.mcp-key-hint { color: var(--admin-ink); font: 700 12px/1.4 "Cascadia Code", Consolas, monospace; }
.mcp-key-row-actions { display: flex; align-items: center; gap: 6px; }
.mcp-key-row-actions .plain-button { min-height: 30px; padding: 6px 9px; box-shadow: none; font-size: 11px; }
.mcp-key-no-action { color: var(--admin-muted); }
.status-badge.mcp-key-active { color: #047857; background: #dcfce7; }
.status-badge.mcp-key-expired { color: #92400e; background: #fef3c7; }
.status-badge.mcp-key-revoked { color: #64748b; background: #e2e8f0; }
.admin-dark .mcp-key-service-notice { color: #fcd58b; background: rgba(146,64,14,.2); }
.admin-dark .mcp-key-service-notice[data-state="ready"] { color: #99e6c3; background: rgba(4,120,87,.2); }
.admin-dark .mcp-key-summary > span, .admin-dark .mcp-key-create-card, .admin-dark .mcp-key-generated-card, .admin-dark .mcp-key-generated-value { border-color: var(--admin-line); background: var(--admin-surface); box-shadow: none; }
.admin-dark .mcp-key-generated-value, .admin-dark .mcp-key-form-grid input { color: var(--admin-ink); background: var(--admin-surface-soft); }
@media (max-width: 900px) {
  .mcp-key-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .mcp-key-summary { width: 100%; }
  .mcp-key-summary > span { flex: 1; min-width: 0; }
  .mcp-key-summary strong { font-size: 15px; }
}
