:root {
  color-scheme: dark;
  --bg: #0a1020;
  --surface: #111d30;
  --surface-raised: #17273e;
  --terminal: #0b1425;
  --line: #2a3d58;
  --line-soft: #20324a;
  --text: #e1edf5;
  --muted: #9eafc6;
  --quiet: #8195b2;
  --mint: #9ddff2;
  --mint-strong: #c5effa;
  --mint-dim: #19394c;
  --lime: #c9b7f4;
  --amber: #e8c98f;
  --red: #f4aaab;
  --blue: #b0c9f8;
  --radius: 13px;
  --shadow: 0 12px 35px #00000012;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; font-size: 16px; line-height: 1.6; background: radial-gradient(ellipse at 70% -10%, #18382e24, transparent 48%), var(--bg); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; outline-offset: 4px; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--mint); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.28; }
svg { display: block; flex-shrink: 0; }
code, pre, kbd { font-family: var(--mono); }
code { color: #b8e8d5; font-size: .9em; overflow-wrap: anywhere; }
pre { margin: 0; }
::selection { color: #f1fff9; background: #347665; }
[hidden], .hidden { display: none !important; }
.icon { height: 20px; width: 20px; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 18px; padding: 12px 17px; color: #102820; background: var(--mint); border-radius: 8px; z-index: 250; }
.skip-link:focus { top: 12px; }
.loading, .loading-state { min-height: 45vh; display: grid; place-items: center; color: var(--muted); font-family: var(--mono); padding: 36px; }

.app-header { min-height: 88px; padding: 18px 30px; display: flex; align-items: center; gap: 27px; border-bottom: 1px solid var(--line-soft); background: #0d1822f2; position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 35px; height: 35px; color: var(--mint); }
.brand-name { color: #eaf4f3; font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -.075em; }
.brand-name span { color: var(--lime); }
.brand-sub { font-family: var(--mono); color: #88a29e; font-size: .6875rem; line-height: 1.4; letter-spacing: .11em; border-left: 1px solid #2b414a; margin-left: 5px; padding-left: 17px; }
.header-title { color: #c1d2d9; border-left: 1px solid #2b414a; padding-left: 25px; display: flex; align-items: center; gap: 12px; font-size: .875rem; font-weight: 550; letter-spacing: .025em; }
.header-title .eyebrow { color: #7e9aab; font-size: .6875rem; }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.stats-strip { display: flex; align-items: center; gap: 27px; margin-right: 7px; }
.stat { font-family: var(--mono); color: #cadbe1; font-variant-numeric: tabular-nums; font-size: .875rem; line-height: 1.4; white-space: nowrap; }
.stat strong { display: block; color: #d8e7e9; font-weight: 500; font-size: 1rem; }
.stat span, .stat small { display: block; font-family: var(--sans); font-size: .6875rem; color: #87a0ad; margin-top: 4px; letter-spacing: .04em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 15px; border-radius: 8px; font-size: .875rem; font-weight: 650; line-height: 1.4; text-align: center; transition: background .15s, color .15s, border-color .15s; }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--mint); border: 1px solid var(--mint); color: #14332a; }
.btn-primary:hover { background: #c2f5e0; border-color: #c2f5e0; }
.btn-secondary { background: #182c3a; border: 1px solid #34505e; color: #c4dbe0; }
.btn-secondary:hover { background: #213b49; border-color: #527987; }
.btn-ghost { background: transparent; border: 1px solid #2d4553; color: #afc7d0; }
.btn-ghost:hover { background: #142733; border-color: #466474; color: #e1efef; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 7px; color: #92adb8; }
.icon-button:hover { background: #213744; color: #d6eeea; }
.icon-button .icon { width: 18px; height: 18px; }
.kbd, kbd { border: 1px solid #3a5360; border-bottom-width: 2px; color: #adc4cf; background: #14232e; border-radius: 4px; font-family: var(--mono); font-size: .6875rem; padding: 1px 5px; white-space: nowrap; }

.workspace { max-width: 1920px; margin: 0 auto; padding: 28px 30px 40px; display: grid; grid-template-columns: 240px minmax(0,1fr) 310px; grid-template-areas: "mission content right"; gap: 23px; align-items: start; }
.mission-column { grid-area: mission; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.content-column { grid-area: content; min-width: 0; }
.right-column { grid-area: right; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.mission-card { border: 1px solid #2d494e; background: linear-gradient(145deg, #17302f, #12222e 68%); border-radius: var(--radius); padding: 23px 21px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.mission-card::before { content: ""; position: absolute; left: 21px; top: 0; height: 2px; width: 38px; background: var(--mint); }
.mission-card::after { content: ""; position: absolute; right: -40px; top: 30px; width: 100px; height: 100px; border-radius: 50%; border: 1px solid #a7d5bb12; box-shadow: 0 0 0 16px #a7d5bb05; pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: .6875rem; line-height: 1.6; font-family: var(--mono); letter-spacing: .11em; text-transform: uppercase; font-weight: 500; color: #a6d6c7; }
.eyebrow .icon { width: 13px; height: 13px; }
.mission-title { font-size: 1.6rem; line-height: 1.17; letter-spacing: -.045em; font-weight: 650; color: #edf6f1; margin: 19px 0 14px; overflow-wrap: anywhere; }
.mission-text { font-size: .875rem; line-height: 1.85; color: #adbfca; }
.scope-chip { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; border: 1px solid #38584f; border-radius: 7px; padding: 10px 11px; margin-top: 20px; color: #9fc3b4; background: #112723; font-size: .75rem; }
.scope-chip .icon { height: 16px; width: 16px; }
.scope-value { color: #c7edda; font-family: var(--mono); font-size: .875rem; letter-spacing: .01em; white-space: nowrap; }
.stage-list { padding: 0; margin: 25px 0 0; list-style: none; display: flex; flex-direction: column; }
.stage-item { display: flex; align-items: flex-start; gap: 10px; padding: 0 0 24px; position: relative; color: #a9bec6; }
.stage-item:not(:last-child)::after { content: ""; height: calc(100% - 32px); width: 1px; position: absolute; left: 13px; top: 32px; background: #35504f; }
.stage-item:last-child { padding-bottom: 0; }
.stage-number { display: inline-flex; height: 27px; width: 27px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 7px; border: 1px solid #46615f; background: #1b3437; color: #9dbfb6; font-family: var(--mono); font-size: .75rem; }
.stage-number .icon { width: 14px; height: 14px; }
.stage-copy { padding-top: 2px; min-width: 0; font-size: .875rem; line-height: 1.5; }
.stage-copy strong { font-size: .875rem; display: block; font-weight: 600; color: #c9dad9; }
.stage-copy span, .stage-copy small, .stage-copy p { display: block; color: #89a6ae; margin-top: 5px; font-size: .8125rem; line-height: 1.6; }
.stage-item.active .stage-number { background: #35584a; border-color: #6e9b7c; color: #d1f2c6; }
.stage-item.active .stage-copy strong { color: #d4e8af; }
.stage-item.done .stage-number { color: #ace2ca; border-color: #4f7a68; background: #1c4439; }
.stage-item.done .stage-copy strong { color: #a7d4c2; }
.stage-item.locked .stage-number { color: #758f9d; border-color: #344b56; background: #182b36; }
.stage-item.locked .stage-copy strong { color: #90a8b5; }
.mission-footer { color: #8caaa8; margin-top: 25px; border-top: 1px solid #324d4b; padding-top: 18px; font-size: .75rem; line-height: 1.85; }
.mission-footer .icon { width: 14px; height: 14px; display: inline-block; margin: 0 5px -2px 0; }
.mini-card { background: #101f2b; border: 1px solid #263e4b; padding: 20px; border-radius: var(--radius); color: #9bb3c0; font-size: .875rem; line-height: 1.8; }
.mini-card h2, .mini-card h3 { color: #c9dce1; font-size: .9375rem; font-weight: 600; margin-bottom: 9px; }
.mini-card > .icon { color: var(--amber); margin-bottom: 13px; width: 21px; height: 21px; }
.mini-card .btn { width: 100%; margin-top: 16px; }
.mini-card p + p { margin-top: 10px; }

.hero-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 79px; padding: 2px 2px 22px; }
.hero-title { font-size: 1.45rem; line-height: 1.25; color: #dce8ec; letter-spacing: -.035em; font-weight: 650; margin-top: 5px; }
.hero-subtitle { color: #91a9b8; font-size: .875rem; line-height: 1.75; margin-top: 8px; max-width: 650px; }
.session-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; font-family: var(--mono); font-size: .6875rem; line-height: 1.5; border-radius: 5px; border: 1px solid #416653; background: #1c352b; color: #b4d4a3; white-space: nowrap; }
.session-badge .icon { height: 12px; width: 12px; }
.terminal-panel { border: 1px solid #324b5c; border-radius: var(--radius); background: var(--terminal); overflow: hidden; box-shadow: 0 15px 50px #00000020; }
.terminal-tabs { display: flex; align-items: center; gap: 5px; border-bottom: 1px solid #2a414e; padding: 9px 11px 0; background: #152531; overflow-x: auto; scrollbar-width: thin; }
.terminal-tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; padding: 11px 17px 13px; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; color: #91aebd; font-family: var(--mono); font-size: .8125rem; line-height: 1.4; }
.terminal-tab .icon { width: 16px; height: 16px; }
.terminal-tab:hover { background: #203746; color: #d1e5e5; }
.terminal-tab.active, .terminal-tab[aria-selected="true"], .terminal-tab[aria-pressed="true"] { border-color: var(--mint); background: #1d353c; color: #c4efdc; }
.tab-count { background: #2a424c; color: #a8c9ce; border-radius: 4px; padding: 0 5px; font-size: .6875rem; font-variant-numeric: tabular-nums; }
.terminal-toolbar { display: flex; align-items: center; gap: 11px; min-height: 45px; padding: 9px 15px; border-bottom: 1px solid #1d3443; background: #101e29; }
.window-dots { display: flex; align-items: center; gap: 5px; margin-right: 1px; }
.window-dots i, .window-dots span { width: 6px; height: 6px; border-radius: 50%; background: #ad7a70; }
.window-dots i:nth-child(2), .window-dots span:nth-child(2) { background: #a89a6a; }
.window-dots i:nth-child(3), .window-dots span:nth-child(3) { background: #71a68c; }
.terminal-title { font-family: var(--mono); font-size: .75rem; color: #88a6b6; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.terminal-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.terminal-actions .icon-button { width: 29px; height: 28px; }
.terminal-actions .icon { width: 15px; height: 15px; }
.terminal-body { min-height: 430px; height: 550px; max-height: 78vh; overflow: auto; padding: 23px 22px 18px; color: #bfd2d9; background: radial-gradient(circle at 1px 1px, #80b4aa04 1px, transparent 1px) 0 0 / 18px 18px, #0b151f; font-family: var(--mono); font-size: .875rem; line-height: 1.75; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #385767 #0b151f; tab-size: 4; }
.terminal-body::-webkit-scrollbar { width: 7px; }
.terminal-body::-webkit-scrollbar-thumb { background: #385767; border-radius: 8px; }
.terminal-output { min-height: 100%; }
.term-entry { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin: 14px 0 11px; line-height: 1.75; }
.term-entry:first-child { margin-top: 0; }
.term-prompt { color: #9ed9b1; font-family: var(--mono); font-weight: 500; flex-shrink: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.term-command { color: #e3eceb; font-family: var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.term-line { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.75em; color: #bbd0d9; }
.term-line:empty { min-height: .6em; height: .6em; }
.term-line.normal { color: #bdd1d9; }
.term-line.muted { color: #849eae; }
.term-line.error { color: #f0a2a5; }
.term-line.success { color: #a7ddb8; }
.term-line.heading { color: #e0c08d; font-weight: 500; }
.terminal-form { padding: 13px 18px; border-top: 1px solid #253e4d; background: #10212d; }
.terminal-input-row { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.terminal-input-row .term-prompt { padding-top: 7px; font-size: .875rem; line-height: 1.6; max-width: 46%; }
.terminal-input { display: block; flex: 1; min-width: 0; width: 100%; min-height: 36px; height: 36px; padding: 6px 0 5px; resize: none; border: 0; background: transparent; border-radius: 0; color: #e1efed; font-family: var(--mono); font-size: .875rem; line-height: 1.6; caret-color: #bdecc6; outline: none !important; box-shadow: none; }
.terminal-input::placeholder { color: #688491; opacity: 1; }
.terminal-input-row:focus-within .term-prompt { color: #c0e9b5; }
.terminal-input:disabled { opacity: .5; cursor: wait; }
.terminal-send { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 7px; color: #b9dacc; background: #213e3c; border: 1px solid #365a51; flex-shrink: 0; }
.terminal-send:hover { background: #30564d; color: #ddf6e8; }
.terminal-send .icon { width: 17px; height: 17px; }
.terminal-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 34px; padding: 8px 16px; border-top: 1px solid #223a49; background: #10202b; color: #7f9bab; font-size: .6875rem; font-family: var(--mono); line-height: 1.6; }
.terminal-foot > span { min-width: 0; overflow-wrap: anywhere; }
.quick-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 1px 0; }
.quick-command { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #2d4653; padding: 6px 10px; background: #11232d; border-radius: 6px; color: #a6c2c9; font-family: var(--mono); font-size: .8125rem; line-height: 1.5; }
.quick-command:hover { color: #d0efdc; background: #1b3639; border-color: #4e7266; }
.notice-bar { border-left: 2px solid #ac9b6b; border-radius: 0 7px 7px 0; background: #3b33251f; color: #baa983; font-size: .8125rem; line-height: 1.8; margin-top: 17px; padding: 12px 15px; }
.notice-bar .icon { display: inline-block; width: 15px; height: 15px; margin: 0 5px -3px 0; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 19px 20px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2, .panel-head h3 { font-size: .9375rem; line-height: 1.35; font-weight: 600; color: #c9dce2; }
.panel-head > .icon { width: 17px; height: 17px; color: #8fb6b1; }
.report-card { border-color: #3c5349; background: #12242c; }
.report-phase { display: block; color: #b7d19a; font-size: .6875rem; font-family: var(--mono); letter-spacing: .1em; margin-bottom: 9px; }
.report-title { color: #e1e9d8; font-size: 1.18rem; line-height: 1.3; letter-spacing: -.025em; font-weight: 650; }
.report-intro { color: #a2b7b7; font-size: .875rem; line-height: 1.8; margin-top: 12px; }
.report-card > .panel-head { display: block; border-bottom-color: #2d4544; padding: 22px 21px 20px; background: linear-gradient(140deg, #263e3029, transparent); }
.report-form { padding: 20px 21px 21px; }
.form-field { min-width: 0; margin-bottom: 19px; }
.form-field label { display: block; font-size: .875rem; color: #c3d7d9; font-weight: 600; line-height: 1.6; margin-bottom: 7px; }
.form-field input, .form-field select, .report-form input, .report-form select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #3a5662; background: #0d1d27; color: #d8e8e7; border-radius: 7px; padding: 9px 11px; font-size: .875rem; line-height: 1.5; }
.form-field input:focus, .form-field select:focus { border-color: #7fae9a; }
.form-field input::placeholder { color: #71909e; }
.form-field select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, #9ab3b9 50%), linear-gradient(135deg, #9ab3b9 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 13px) 19px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.form-help { color: #9db3bc; margin-top: 7px; font-size: .875rem; line-height: 1.7; }
.form-feedback { margin: 0 0 17px; padding: 11px 13px; border-radius: 7px; font-size: .875rem; line-height: 1.7; background: #1a303c; border: 1px solid #35515d; color: #b5cbd2; overflow-wrap: anywhere; }
.form-feedback:empty { display: none; }
.form-feedback.bad { color: #e8b7b4; border-color: #704e50; background: #412729; }
.form-feedback.good { color: #b5e3c6; border-color: #426d59; background: #1a392e; }
.report-submit { width: 100%; margin-top: 4px; }
.report-summary { padding: 18px 20px; border-top: 1px solid #2c454c; background: #0d1e29; }
.report-summary h3 { font-size: .875rem; color: #b8d3cd; margin-bottom: 12px; }
.report-summary > strong { color: #c5ddd0; display: block; margin-top: 10px; font-size: .875rem; }
.summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; font-size: .8125rem; line-height: 1.7; padding: 5px 0; color: #9eb8c1; }
.summary-row > :last-child { max-width: 65%; color: #c7dfd9; text-align: right; overflow-wrap: anywhere; }
.summary-row code { font-size: .8125rem; }
.findings-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); padding: 8px 10px; flex-wrap: wrap; }
.findings-tab { display: inline-flex; align-items: center; gap: 6px; color: #8ea8b6; padding: 6px 9px; font-size: .8125rem; border-radius: 5px; }
.findings-tab:hover { background: #1b3340; color: #d4e4e5; }
.findings-tab.active, .findings-tab[aria-pressed="true"] { background: #223d40; color: #b9e8d4; }
.finding-list { padding: 0 15px; max-height: 390px; overflow: auto; scrollbar-width: thin; scrollbar-color: #35505e transparent; }
.finding-item { padding: 14px 4px; border-bottom: 1px solid #203847; min-width: 0; }
.finding-item:last-child { border-bottom: 0; }
.finding-ip { font-family: var(--mono); font-size: .875rem; color: #bad9d8; font-weight: 550; display: block; overflow-wrap: anywhere; }
.finding-meta { margin-top: 5px; color: #8fa8b6; font-size: .8125rem; line-height: 1.75; overflow-wrap: anywhere; }
.finding-service { display: inline-flex; align-items: center; gap: 6px; color: #afcda1; background: #21382b; border: 1px solid #3a5340; border-radius: 4px; padding: 2px 6px; margin-top: 6px; font-family: var(--mono); font-size: .75rem; line-height: 1.4; max-width: 100%; overflow-wrap: anywhere; }
.finding-empty { color: #8ca4b3; padding: 26px 19px; font-size: .875rem; line-height: 1.9; text-align: center; }
.finding-empty > .icon { width: 27px; height: 27px; margin: 0 auto 13px; color: #5b7e8c; }
.finding-count { font-family: var(--mono); font-size: .75rem; line-height: 1.5; border-radius: 5px; color: #acd7c4; background: #1a3731; padding: 2px 7px; }

.bottom-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 18px; margin-top: 23px; }
.bottom-grid > * { min-width: 0; }
.notes-card textarea { display: block; width: calc(100% - 36px); min-height: 166px; height: 180px; resize: vertical; border: 1px solid #2e4a59; border-radius: 7px; background: #0b1b26; color: #bed6dd; padding: 12px 13px; margin: 17px 18px 0; font-size: .875rem; font-family: var(--mono); line-height: 1.8; }
.notes-card textarea::placeholder { color: #678694; }
.notes-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 13px 18px 17px; color: #8ea8b7; font-size: .75rem; line-height: 1.7; }
.notes-footer .btn { font-size: .8125rem; padding: 7px 10px; min-height: 34px; }
.file-list { max-height: 235px; overflow: auto; scrollbar-width: thin; scrollbar-color: #38525e transparent; }
.file-item { display: flex; align-items: flex-start; gap: 9px; text-align: left; width: 100%; padding: 13px 17px; border-bottom: 1px solid var(--line-soft); font-size: .875rem; color: #b1c8d0; min-width: 0; }
.file-item:last-child { border-bottom: 0; }
.file-item:hover { background: #192e3b; color: #d5ece6; }
.file-item.active, .file-item.selected { background: #1c383c; }
.file-item > .icon { width: 16px; height: 16px; color: #80ada9; margin-top: 3px; }
.file-item > span, .file-item > div { min-width: 0; flex: 1; }
.file-path { font-family: var(--mono); font-size: .8125rem; color: #adcbd0; display: block; overflow-wrap: anywhere; }
.file-size { color: #829dac; font-size: .75rem; line-height: 1.5; margin-top: 4px; display: block; }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 13px 17px; border-top: 1px solid var(--line-soft); }
.file-actions .btn { font-size: .8125rem; padding: 8px 11px; min-height: 35px; }
.file-preview { padding: 0; min-width: 0; }
.file-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; font-family: var(--mono); font-size: .875rem; line-height: 1.8; color: #c0d6dc; background: #0b1822; padding: 19px; max-height: 55vh; overflow: auto; border: 1px solid #2d4857; border-radius: 8px; }
.decoder-card { margin-top: 18px; padding: 20px; }
.decoder-card h2, .decoder-card h3 { font-size: .9375rem; color: #c3d9df; margin-bottom: 12px; }
.decoder-card label { font-size: .875rem; display: block; color: #a9c1cd; margin-bottom: 8px; }
.decoder-input { min-height: 78px; display: block; width: 100%; border: 1px solid #345160; background: #0b1b26; border-radius: 7px; padding: 10px 12px; color: #d1e7e5; font-size: .875rem; font-family: var(--mono); line-height: 1.7; resize: vertical; }
.decoder-card > .btn, .decoder-card .decoder-actions { margin-top: 12px; }
.decoder-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.decoder-output { display: block; background: #132f2b; color: #b9e5ca; border: 1px solid #355d4e; border-radius: 7px; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; margin-top: 14px; font-family: var(--mono); font-size: .875rem; line-height: 1.7; }
.decoder-output.error { background: #3b2529; border-color: #6b464b; color: #e9aeb4; }

.completion-panel { margin-top: 24px; padding: 29px; border: 1px solid #5b7657; border-radius: var(--radius); background: linear-gradient(135deg, #273b2a, #12292b 75%); position: relative; overflow: hidden; }
.completion-panel h2 { color: #e0edd6; font-size: 1.5rem; letter-spacing: -.04em; margin-top: 10px; }
.completion-panel p { color: #b7cdbd; font-size: .9375rem; line-height: 1.85; margin-top: 12px; max-width: 660px; }
.completion-icon { width: 48px; height: 48px; background: #c9e5aa; color: #29432c; display: flex; align-items: center; justify-content: center; border-radius: 50%; margin-bottom: 18px; }
.completion-icon .icon { width: 25px; height: 25px; }
.completion-code { color: #d6edb5; border: 1px dashed #6a8a58; background: #122c2073; border-radius: 9px; font-family: var(--mono); font-size: clamp(1.35rem,2.2vw,2rem); letter-spacing: .04em; font-weight: 650; text-align: center; padding: 20px 15px; margin: 22px 0 12px; overflow-wrap: anywhere; user-select: all; }
.completion-meta { color: #a4c2aa; font-size: .8125rem; line-height: 1.8; font-variant-numeric: tabular-nums; }
.completion-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.completion-actions .btn-secondary { color: #c6ddcd; background: #263f34; border-color: #50745b; }

dialog#modal { border: 1px solid #395461; padding: 0; color: var(--text); background: #101f2b; border-radius: 16px; max-width: min(1040px,calc(100vw - 36px)); width: 100%; max-height: 90dvh; box-shadow: 0 24px 100px #0009; overflow: auto; scrollbar-width: thin; scrollbar-color: #476371 #101f2b; }
dialog#modal::backdrop { background: #030c14c4; backdrop-filter: blur(5px); }
.modal-content { padding: 35px 36px; position: relative; min-width: 0; }
.modal-close { position: absolute; top: 15px; right: 15px; z-index: 2; background: #223643; color: #adc5ce; }
.modal-title, .modal-content > h2 { color: #e0edee; font-size: 1.8rem; line-height: 1.25; font-weight: 650; letter-spacing: -.04em; padding-right: 28px; margin: 10px 0 14px; overflow-wrap: anywhere; }
.modal-intro { color: #a6bdc9; font-size: .9375rem; line-height: 1.85; margin: 0 0 23px; max-width: 850px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 25px; }
.modal-actions .hint-counter { margin-right: auto; }
.reference-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.reference-search { display: block; flex: 1; min-width: 170px; border: 1px solid #3d5867; background: #0b1b25; color: #d4e6e8; font-size: .875rem; border-radius: 7px; padding: 10px 12px; min-height: 42px; }
.reference-search::placeholder { color: #829fac; }
.reference-tabs { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; padding: 4px; background: #0c1924; border: 1px solid #294452; border-radius: 8px; }
.reference-tab { color: #94afbd; border-radius: 5px; padding: 7px 12px; font-size: .8125rem; font-family: var(--mono); }
.reference-tab.active, .reference-tab[aria-pressed="true"] { color: #c8efdb; background: #23403f; }
.capability-table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.75; table-layout: fixed; }
.capability-table th { color: #90b0b9; text-transform: uppercase; letter-spacing: .07em; font-size: .6875rem; text-align: left; padding: 11px 13px; border-bottom: 1px solid #3c5863; background: #142934; }
.capability-table td { padding: 13px; vertical-align: top; border-bottom: 1px solid #273f4d; color: #b3cbd4; overflow-wrap: anywhere; }
.capability-table th:first-child { width: 25%; }
.capability-table th:nth-child(2) { width: 22%; }
.capability-table tr:nth-child(even) td { background: #14253050; }
.capability-table td code { font-size: .875rem; color: #bde4d2; }
.capability-status { display: inline-block; max-width: 100%; padding: 3px 7px; border-radius: 4px; border: 1px solid #3d5b6c; background: #213644; color: #b0cadd; font-size: .75rem; line-height: 1.5; }
.capability-status.simulated { color: #b0dbbb; border-color: #42684d; background: #1b3829; }
.capability-status.metadata { color: #dfc58f; border-color: #6b5935; background: #3c321f; }
.capability-status.unsupported { color: #d5afbc; border-color: #604653; background: #35252f; }
.capability-description { line-height: 1.8; color: #b4cbd3; }
.reference-note { padding: 13px 15px; border-left: 2px solid #748e66; color: #adc2a8; background: #22302073; margin: 16px 0 20px; font-size: .875rem; line-height: 1.8; }
.hint-item { border: 1px solid #304b59; border-radius: 9px; background: #142733; padding: 18px 20px; margin-top: 14px; }
.hint-item h3 { color: #cee1d6; font-size: 1rem; font-weight: 600; margin: 7px 0 8px; }
.hint-item p { color: #abc0cc; font-size: .9375rem; line-height: 1.8; white-space: pre-line; }
.hint-counter { color: #95adad; font-family: var(--mono); font-size: .75rem; line-height: 1.8; }
.copy-source { display: block; width: 100%; min-height: 130px; resize: vertical; background: #0d1c27; color: #d2e6db; border: 1px solid #3a5a61; border-radius: 8px; padding: 16px; font-family: var(--mono); font-size: 1rem; line-height: 1.8; }
.help-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.help-card { border: 1px solid #304957; border-radius: 9px; background: #142632; padding: 20px; min-width: 0; }
.help-card > .icon { color: #aacd9d; margin-bottom: 13px; }
.help-card h3 { font-size: 1rem; color: #d1e4dc; margin-bottom: 9px; }
.help-card p { font-size: .9375rem; line-height: 1.8; color: #a9bfcc; }
.help-card code { font-size: .875rem; }
.error-banner { display: flex; align-items: flex-start; gap: 13px; padding: 18px 20px; border: 1px solid #775958; background: #3c2729; color: #e8babc; border-radius: 10px; margin: 0 0 20px; font-size: .875rem; line-height: 1.8; }
.error-banner > .icon { color: #e9ad9f; margin-top: 3px; }
.error-banner strong { display: block; color: #f2d7cd; margin-bottom: 5px; }
.error-banner .btn { margin-top: 12px; }
#toast { position: fixed; left: 50%; bottom: 25px; max-width: calc(100vw - 32px); transform: translate(-50%,12px); padding: 12px 21px; border: 1px solid #4c7b65; border-radius: 9px; background: #193e2f; color: #d6f1d9; box-shadow: 0 12px 40px #0005; font-size: .875rem; line-height: 1.7; text-align: center; pointer-events: none; opacity: 0; z-index: 250; transition: opacity .15s, transform .15s; }
#toast.visible { opacity: 1; transform: translate(-50%,0); }

.right-column { position: sticky; top: 22px; }
.header-title > span { color: #88a3b0; font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; }
.header-title > strong { color: #c8dce0; font-weight: 550; }
.panel-head h2, .panel-head h3 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.panel-head h2 .icon, .panel-head h3 .icon { width: 17px; height: 17px; color: #91b7b2; }
.report-header { padding: 22px 21px 20px; border-bottom: 1px solid #2d4544; background: linear-gradient(140deg, #263e3029, transparent); }
.report-done { padding: 23px 21px; }
.report-done h2 { font-size: 1.2rem; line-height: 1.35; letter-spacing: -.025em; color: #e0ead8; }
.report-done p { color: #adc6b9; font-size: .875rem; line-height: 1.85; margin: 12px 0 19px; }
.report-done .btn { width: 100%; }
.report-done .completion-icon { width: 42px; height: 42px; margin-bottom: 16px; }
.summary-block { padding-top: 12px; margin-top: 12px; border-top: 1px solid #29424b; }
.summary-block:first-of-type { padding-top: 0; margin-top: 0; border: 0; }
.summary-block > strong { display: block; font-size: .875rem; font-weight: 600; color: #bed8cf; margin-bottom: 6px; line-height: 1.65; }
.summary-row { flex-direction: column; gap: 1px; padding: 6px 0; }
.summary-row > :last-child { max-width: 100%; text-align: left; }
.status-legend p { color: #9fb7c4; line-height: 1.85; }
.status-legend .capability-status { margin-right: 4px; margin-bottom: 3px; }
.session-badge.training { color: #dfc28d; background: #352c1f; border-color: #6c5838; }
.notice-bar { display: flex; align-items: flex-start; gap: 10px; }
.notice-bar > .icon { display: block; margin: 3px 0 0; flex-shrink: 0; }
.notice-bar > div { min-width: 0; }
.notice-bar strong { color: #dac18e; display: block; margin-bottom: 5px; font-size: .875rem; }
.notice-bar .btn { margin-top: 12px; font-size: .8125rem; }
.term-entry .term-prompt { max-width: 100%; min-width: 0; flex-shrink: 1; }
.finding-item { display: block; width: 100%; text-align: left; }
button.finding-item { border-radius: 0; }
button.finding-item:hover { background: #1a343c; }
.finding-item > strong { display: block; color: #c5ded9; font-family: var(--mono); font-size: .875rem; overflow-wrap: anywhere; }
.finding-item > code { display: block; color: #b7d5d2; font-size: .8125rem; line-height: 1.8; margin-top: 6px; white-space: normal; overflow-wrap: anywhere; }
.finding-item > .finding-meta { display: block; }
.findings-card > .btn { width: calc(100% - 30px); margin: 10px 15px 15px; }
.file-item { justify-content: space-between; align-items: center; }
.file-item > .file-path { flex: 1; min-width: 0; }
.file-item > .file-size { flex: 0 0 auto; margin: 0 0 0 8px; white-space: nowrap; font-family: var(--mono); }
.file-note { color: #8da8b8; font-size: .8125rem; line-height: 1.8; padding: 13px 18px 17px; border-top: 1px solid var(--line-soft); }
.files-card { display: flex; flex-direction: column; }
.files-card .file-list { flex: 1; }
.decoder-card { padding: 0; }
.decoder-card h2, .decoder-card h3 { margin-bottom: 0; }
.decoder-body { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 17px 20px 20px; }
.decoder-body .decoder-input { flex: 1; min-width: 170px; min-height: 42px; height: 42px; padding: 9px 11px; }
.decoder-card > .decoder-output { margin: 0 20px 20px; }
.decoder-card .panel-head { flex-wrap: wrap; gap: 7px 12px; }
.decoder-card .panel-head > .small { font-size: .75rem; }
.reference-search { display: flex; align-items: center; gap: 9px; padding: 0 12px; }
.reference-dialog { padding-bottom: 28px; }
.reference-search > .icon { width: 16px; height: 16px; color: #83a5b2; }
.reference-search input { display: block; width: 100%; min-width: 0; min-height: 40px; border: 0; outline: none; border-radius: 0; padding: 8px 0; color: #d4e6e8; background: transparent; font-size: .875rem; }
.reference-search input::placeholder { color: #829fac; }
.reference-search:focus-within { border-color: #77ac93; box-shadow: 0 0 0 2px #77ac9318; }
.reference-controls > label:last-child { display: block; min-width: 160px; max-width: 100%; }
.reference-controls select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #3d5867; background: #0b1b25; color: #c1d5df; border-radius: 7px; padding: 9px 31px 9px 11px; font-size: .875rem; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9ab3b9 50%), linear-gradient(135deg, #9ab3b9 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 13px) 19px; background-size: 4px 4px; background-repeat: no-repeat; }
.reference-tab span { display: inline-block; color: #8eafa8; font-size: .75rem; margin-left: 5px; }
.capability-scroll { max-height: 55vh; overflow: auto; border: 1px solid #2e4755; border-radius: 8px; scrollbar-width: thin; scrollbar-color: #3c5a68 #10212c; }
.capability-table th { position: sticky; top: 0; z-index: 1; }
.capability-table td > small { display: block; color: #84a3b1; font-size: .75rem; line-height: 1.7; margin-top: 6px; }
.capability-table td:nth-child(3) > code { display: block; color: #a0c4bc; font-size: .8125rem; line-height: 1.8; border-left: 2px solid #3b6055; padding-left: 9px; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.map-operator { position: relative; display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; column-gap: 12px; margin: 27px auto 20px; padding: 18px 21px; max-width: 330px; border: 1px solid #65846a; border-radius: 10px; background: #233e31; color: #cce6c9; }
.map-operator > .icon { grid-row: span 2; color: #c7e3ac; width: 27px; height: 27px; }
.map-operator > strong { font-family: var(--mono); font-size: .9375rem; font-weight: 550; overflow-wrap: anywhere; }
.map-operator > code { color: #a2c0a7; font-size: .8125rem; margin-top: 3px; }
.map-operator::after { content: ""; position: absolute; bottom: -21px; left: 50%; width: 1px; height: 20px; border-left: 1px dashed #69836b; }
.map-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; align-items: stretch; padding-top: 20px; border-top: 1px dashed #405a58; }
.map-node { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 7px; min-width: 0; padding: 20px 18px; border: 1px solid #35545f; background: #152d38; border-radius: 9px; transition: border-color .15s, background .15s; }
.map-node:hover { background: #1b3a40; border-color: #678f7f; }
.map-node > .icon { color: #8ebdb2; width: 22px; height: 22px; margin-bottom: 4px; }
.map-node > strong { color: #c7dfdb; font-family: var(--mono); font-size: .9375rem; font-weight: 550; overflow-wrap: anywhere; }
.map-node > span { color: #9bb6c1; font-size: .8125rem; line-height: 1.8; }
.map-node > code { color: #a5c99b; font-size: .8125rem; line-height: 1.7; overflow-wrap: anywhere; }
.map-grid > .finding-empty { grid-column: 1/-1; }
@media (min-width: 1650px) {
  .app-header { padding-left: max(30px,calc((100vw - 1860px)/2)); padding-right: max(30px,calc((100vw - 1860px)/2)); }
  .workspace { grid-template-columns: 250px minmax(0,1fr) 330px; gap: 26px; }
  .terminal-body { height: 640px; max-height: 78vh; padding: 25px; }
  .terminal-toolbar { padding: 10px 19px; }
}
@media (max-width: 1350px) {
  .app-header { padding: 17px 24px; gap: 21px; }
  .brand-sub { display: none; }
  .header-title { padding-left: 20px; }
  .header-actions { gap: 9px; }
  .stats-strip { gap: 20px; margin-right: 2px; }
  .workspace { padding: 25px 24px 36px; grid-template-columns: 220px minmax(0,1fr) 280px; gap: 18px; }
  .mission-card { padding: 21px 18px; }
  .mission-title { font-size: 1.45rem; }
  .mission-text { font-size: .875rem; line-height: 1.8; }
  .report-form { padding: 19px 18px; }
  .report-card > .panel-head { padding: 20px 18px 18px; }
  .panel-head { padding: 17px 18px; }
  .terminal-body { padding: 21px 17px; }
  .terminal-tabs { padding-left: 8px; padding-right: 8px; }
  .terminal-tab { padding-left: 13px; padding-right: 13px; }
  .terminal-input-row .term-prompt { max-width: 42%; }
  .bottom-grid { grid-template-columns: minmax(0,1fr); }
  .hero-strip { align-items: flex-start; }
  .hero-title { font-size: 1.3rem; }
  .session-badge { margin-top: 4px; font-size: .625rem; }
}
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 220px minmax(0,1fr); grid-template-areas: "mission content" "mission right"; align-items: start; }
  .right-column { display: grid; position: static; top: auto; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; align-items: start; }
  .right-column > :only-child { grid-column: 1/-1; }
  .report-card { grid-row: span 2; }
  .bottom-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .hero-title { font-size: 1.45rem; }
  .hero-subtitle { max-width: 560px; }
  .terminal-body { height: 520px; }
  .terminal-input-row .term-prompt { max-width: 50%; }
  .header-title { font-size: .8125rem; gap: 9px; }
  .header-title .eyebrow { display: none; }
  .stats-strip { gap: 16px; }
  .header-actions .btn { font-size: .8125rem; padding: 9px 11px; }
}
@media (max-width: 900px) {
  .app-header { min-height: 77px; padding: 16px 21px; gap: 16px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand-name { font-size: 1.5rem; }
  .header-title { border: 0; padding: 0; }
  .stats-strip { gap: 14px; }
  .stat strong { font-size: .875rem; }
  .stat span { font-size: .625rem; }
  .workspace { grid-template-columns: minmax(0,1fr); grid-template-areas: "mission" "content" "right"; padding: 23px 21px 35px; gap: 21px; }
  .mission-column { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); align-items: start; gap: 15px; }
  .mission-card { grid-row: span 2; padding: 23px; }
  .mission-title { font-size: 1.55rem; max-width: 360px; margin-top: 13px; }
  .mission-text { max-width: 500px; }
  .scope-chip { margin-top: 16px; }
  .stage-list { margin-top: 19px; }
  .stage-item { padding-bottom: 17px; }
  .stage-copy span { margin-top: 3px; }
  .mission-footer { margin-top: 18px; padding-top: 14px; }
  .mini-card { padding: 19px; }
  .hero-strip { min-height: 0; padding-bottom: 19px; }
  .hero-title { font-size: 1.5rem; }
  .terminal-body { min-height: 430px; height: 540px; max-height: 78vh; }
  .right-column { gap: 18px; }
  .finding-list { max-height: 440px; }
  .bottom-grid { margin-top: 20px; }
}
@media (max-width: 650px) {
  body { font-size: 16px; }
  .app-header { min-height: 72px; padding: 15px 14px; gap: 12px; flex-wrap: wrap; }
  .brand { gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 1.5rem; }
  .header-title { font-size: .6875rem; letter-spacing: .025em; margin-right: auto; }
  .header-actions { gap: 7px; margin-left: 0; }
  .header-actions .btn { min-height: 35px; padding: 8px; }
  .header-actions .btn .icon { width: 17px; height: 17px; }
  .header-actions .icon-button { width: 30px; height: 33px; }
  .hide-mobile { display: none !important; }
  .stats-strip { display: none; }
  .workspace { display: grid; grid-template-columns: minmax(0,1fr); padding: 18px 13px 30px; gap: 20px; }
  .mission-column { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .mission-card { grid-row: auto; padding: 21px 19px; }
  .mission-title { font-size: 1.45rem; margin: 12px 0; max-width: none; }
  .mission-text { font-size: .875rem; line-height: 1.8; }
  .scope-chip { margin-top: 15px; padding: 9px 11px; }
  .scope-value { font-size: .875rem; }
  .stage-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 19px; }
  .stage-item { display: block; padding: 0; }
  .stage-item::after { display: none; }
  .stage-number { height: 24px; width: 24px; border-radius: 6px; font-size: .6875rem; margin-bottom: 6px; }
  .stage-copy { font-size: .875rem; line-height: 1.45; }
  .stage-copy strong { font-size: .875rem; line-height: 1.5; font-weight: 550; }
  .stage-copy span, .stage-copy small, .stage-copy p { display: none; }
  .mission-footer { margin-top: 18px; font-size: .75rem; padding-top: 13px; }
  .mini-card { padding: 17px 19px; font-size: .875rem; }
  .mini-card h2, .mini-card h3 { margin-bottom: 6px; }
  .mini-card > .icon { float: left; margin: 3px 11px 8px 0; width: 18px; height: 18px; }
  .mini-card .btn { margin-top: 13px; }
  .hero-strip { display: block; padding: 0 2px 17px; }
  .hero-title { font-size: 1.4rem; margin-top: 5px; }
  .hero-subtitle { font-size: .875rem; line-height: 1.8; margin-top: 8px; }
  .hero-strip .session-badge { margin-top: 12px; font-size: .6875rem; }
  .terminal-panel { border-radius: 10px; }
  .terminal-tabs { padding: 7px 6px 0; gap: 2px; }
  .terminal-tab { gap: 6px; padding: 10px 11px 12px; font-size: .8125rem; }
  .terminal-tab .icon { height: 15px; width: 15px; }
  .tab-count { font-size: .625rem; padding: 0 4px; }
  .terminal-toolbar { min-height: 41px; padding: 8px 11px; gap: 9px; }
  .window-dots { gap: 4px; }
  .window-dots i, .window-dots span { height: 5px; width: 5px; }
  .terminal-title { font-size: .6875rem; }
  .terminal-actions { gap: 2px; }
  .terminal-actions .icon-button { width: 25px; height: 25px; }
  .terminal-actions .icon { height: 14px; width: 14px; }
  .terminal-body { min-height: 430px; height: 62vh; max-height: 680px; padding: 18px 13px; font-size: .875rem; line-height: 1.8; }
  .term-entry { margin: 13px 0 11px; line-height: 1.8; gap: 6px; }
  .term-line { min-height: 1.8em; }
  .terminal-form { padding: 12px 12px 10px; }
  .terminal-input-row { gap: 7px; flex-wrap: wrap; }
  .terminal-input-row .term-prompt { max-width: 100%; flex-basis: 100%; font-size: .875rem; line-height: 1.7; padding-top: 0; }
  .terminal-input { font-size: 16px; line-height: 1.6; height: 36px; min-height: 36px; padding: 4px 0; }
  .terminal-send { height: 34px; width: 34px; }
  .terminal-foot { padding: 9px 12px; font-size: .625rem; gap: 7px; }
  .terminal-foot > span:last-child { text-align: right; }
  .quick-actions { gap: 7px; margin-top: 12px; }
  .quick-command { font-size: .8125rem; padding: 6px 9px; }
  .notice-bar { margin-top: 15px; font-size: .8125rem; line-height: 1.8; padding: 11px 12px; }
  .bottom-grid { grid-template-columns: minmax(0,1fr); gap: 15px; margin-top: 20px; }
  .right-column { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .report-card { grid-row: auto; }
  .panel { border-radius: 10px; }
  .panel-head { padding: 18px; }
  .report-card > .panel-head { padding: 21px 20px 18px; }
  .report-header { padding: 21px 20px 18px; }
  .report-title { font-size: 1.2rem; }
  .report-intro { font-size: .875rem; }
  .report-form { padding: 20px; }
  .form-field { margin-bottom: 18px; }
  .form-field input, .form-field select, .report-form input, .report-form select { font-size: 16px; min-height: 44px; }
  .form-help { font-size: .875rem; }
  .summary-row { font-size: .875rem; }
  .finding-list { max-height: 400px; padding: 0 16px; }
  .finding-ip { font-size: .875rem; }
  .finding-meta { font-size: .875rem; }
  .finding-service { font-size: .8125rem; }
  .notes-card textarea { min-height: 150px; font-size: 16px; line-height: 1.7; }
  .notes-footer { font-size: .75rem; }
  .file-list { max-height: 260px; }
  .file-path { font-size: .875rem; }
  .file-size { font-size: .75rem; }
  .decoder-card { padding: 19px; }
  .decoder-card { padding: 0; }
  .decoder-body { padding: 17px 18px 19px; }
  .decoder-body .decoder-input { min-width: 100%; flex-basis: 100%; font-size: 16px; min-height: 44px; height: 44px; }
  .decoder-card > .decoder-output { margin: 0 18px 19px; }
  .decoder-input { font-size: 16px; min-height: 85px; }
  .decoder-output { font-size: .875rem; }
  .completion-panel { padding: 25px 21px; margin-top: 20px; }
  .completion-panel h2 { font-size: 1.45rem; }
  .completion-panel p { font-size: .9375rem; }
  .completion-code { font-size: 1.35rem; letter-spacing: .025em; padding: 17px 10px; }
  .completion-meta { font-size: .8125rem; }
  .completion-actions { gap: 9px; }
  .completion-actions .btn { width: 100%; }
  dialog#modal { width: calc(100vw - 24px); max-width: calc(100vw - 24px); border-radius: 13px; max-height: 92dvh; }
  .modal-content { padding: 29px 23px; }
  .modal-close { top: 11px; right: 11px; }
  .modal-title, .modal-content > h2 { font-size: 1.45rem; margin-top: 8px; }
  .modal-intro { font-size: .9375rem; line-height: 1.8; margin-bottom: 19px; }
  .reference-controls { gap: 10px; align-items: stretch; }
  .reference-search { width: 100%; flex-basis: 100%; font-size: 16px; }
  .reference-search input { font-size: 16px; }
  .reference-controls > label:last-child { min-width: 100%; width: 100%; }
  .reference-controls select { font-size: 16px; min-height: 44px; }
  .reference-tabs { width: 100%; }
  .reference-tab { flex: 1; font-size: .8125rem; padding: 8px 10px; }
  .capability-table { font-size: .875rem; table-layout: auto; }
  .capability-table thead { display: none; }
  .capability-table, .capability-table tbody, .capability-table tr, .capability-table td { display: block; width: 100%; }
  .capability-table tr { border: 1px solid #2f4a57; border-radius: 8px; margin-bottom: 11px; overflow: hidden; background: #132733; }
  .capability-table td { padding: 9px 13px; border: 0; }
  .capability-table td:first-child { padding-top: 14px; padding-bottom: 4px; }
  .capability-table td:last-child { padding-bottom: 15px; }
  .capability-scroll { border: 0; border-radius: 0; max-height: 60vh; }
  .capability-table td > small { font-size: .75rem; }
  .capability-table td:nth-child(3) > code { font-size: .875rem; }
  .capability-status { font-size: .8125rem; }
  .reference-note { font-size: .875rem; padding: 12px 13px; }
  .modal-actions { gap: 9px; margin-top: 22px; }
  .hint-item { padding: 16px 17px; }
  .hint-item p { font-size: .9375rem; }
  .hint-counter { font-size: .75rem; }
  .copy-source { font-size: 16px; }
  .help-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .help-card { padding: 19px; }
  .help-card p { font-size: .9375rem; }
  .file-preview pre { font-size: .875rem; padding: 16px; }
  .file-item { align-items: flex-start; gap: 8px; }
  .file-item > .file-size { font-size: .6875rem; margin-top: 2px; margin-left: 3px; }
  .file-note { font-size: .8125rem; }
  .map-operator { padding: 17px 18px; margin-top: 22px; }
  .map-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .map-node { padding: 17px 14px; }
  .map-node > strong { font-size: .875rem; }
  .map-node > span, .map-node > code { font-size: .8125rem; }
  .error-banner { padding: 16px; font-size: .875rem; }
  #toast { bottom: 17px; padding: 11px 16px; font-size: .875rem; }
}
@media (max-width: 380px) {
  .header-title { display: none; }
  .header-actions { margin-left: auto; }
  .terminal-tab { padding-left: 9px; padding-right: 9px; }
  .terminal-tab .icon { display: none; }
  .stage-copy strong { font-size: .875rem; }
}
/* Case 05: DNS and certificate analysis, with its own ice-cyan / violet identity. */
body { background: radial-gradient(ellipse at 77% -15%, #55529024, transparent 46%), radial-gradient(ellipse at 8% 38%, #23788c0c, transparent 36%), var(--bg); }
code { color: #c3e9f7; }
::selection { color: #f5fbff; background: #355d80; }
.app-header { background: #0d1729f2; border-bottom-color: #283a55; box-shadow: 0 1px 0 #080e19; }
.brand-name { color: #edf4fb; }
.brand-sub { color: #94a6c4; border-color: #34415c; }
.header-title { color: #c8d5eb; border-color: #34415c; }
.stat strong { color: #e1edf7; }
.stat small, .stat span { color: #93a4c0; }
.btn-primary { color: #102d41; background: var(--mint); border-color: var(--mint); }
.btn-primary:hover { background: #c5effa; border-color: #c5effa; }
.btn-secondary { background: #1a2a42; border-color: #344b6a; color: #c8d8ee; }
.btn-secondary:hover { background: #223752; border-color: #536e92; }
.btn-ghost { color: #b2c4de; border-color: #30445f; }
.btn-ghost:hover { color: #e4effa; background: #1b2a42; }
.icon-button:hover { background: #20324b; color: #d2ecf9; }
.mission-card { border-color: #354760; background: linear-gradient(145deg, #1c2c46, #132238 67%); }
.mission-card::before { width: 55px; background: linear-gradient(90deg, var(--mint), var(--lime)); }
.mission-card::after { top: 32px; right: -31px; width: 96px; height: 96px; border: 1px solid #bfc7f31a; border-radius: 18px; transform: rotate(32deg); box-shadow: 0 0 0 14px #a9c2f306, 0 0 0 28px #a9c2f303; }
.mission-title { color: #edf3fc; }
.mission-text { color: #abbcd3; }
.scope-chip { border-color: #37576c; background: #112a3b; color: #a8cfdf; align-items: flex-start; }
.scope-value { color: #d0edf6; width: 100%; font-size: .875rem; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.stage-item.active .stage-number { background: #21465b; border-color: #72b6ce; color: #d2f3fb; }
.stage-item.done .stage-number { background: #213b57; border-color: #6383ba; color: #d8e9ff; }
.stage-item.active .stage-copy strong { color: #d4edf8; }
.stage-item.done .stage-copy strong { color: #bed2ed; }
.stage-item::after { background: #35425e; }
.mini-card { background: #111f33; border-color: #2a3e58; }
.quick-command { color: #c1def4; background: #12283e; border-color: #314c68; }
.quick-command:hover { color: #e7f6ff; border-color: #6892b8; background: #1b3550; }
.hero-title { color: #e0ebfa; }
.hero-subtitle { color: #98aec9; }
.session-badge { color: #b6e7f4; background: #163446; border-color: #365f76; }
.session-badge.training { color: #e7c996; background: #352d23; border-color: #6e5c3e; }
.terminal-panel { border-color: #34506b; box-shadow: 0 14px 45px #02071225; }
.terminal-tabs { background: #14253b; border-color: #2e4563; }
.terminal-tab { color: #9db5d1; }
.terminal-tab:hover { color: #e2effb; background: #203a55; }
.terminal-tab.active, .terminal-tab[aria-selected="true"], .terminal-tab[aria-pressed="true"] { border-color: var(--mint); color: #d2f2fb; background: #1b3a50; }
.tab-count { background: #0d2134; color: #93b5d2; }
.terminal-tab.active .tab-count { color: #d2edfa; background: #25485e; }
.terminal-toolbar { background: #102036; border-color: #253e59; }
.terminal-title { color: #92adc9; overflow-wrap: anywhere; }
.terminal-body { background: #0c1628; color: #c6d8ec; }
.term-prompt { color: #a5d8ec; }
.term-command { color: #eef5fc; }
.term-line.normal { color: #c3d5e9; }
.term-line.muted { color: #8ba6c3; }
.term-line.heading { color: #bfd4fb; }
.term-line.success { color: #b7eaf4; }
.term-line.error { color: #f0b5c5; }
.terminal-form { background: #101e32; border-color: #2d4562; }
.terminal-input { color: #eef6fd; caret-color: var(--mint); }
.terminal-input::placeholder { color: #6e8bab; }
.terminal-foot { color: #819ab8; background: #101d30; border-color: #273c56; }
.kbd, kbd { color: #adc8e5; background: #14263c; border-color: #38516f; }
.panel { background: #111e31; border-color: #2b405b; }
.panel-head { border-color: #263a54; }
.panel-head h2, .panel-head h3 { color: #d0dff1; }
.panel-head > .icon, .panel-head h2 .icon, .panel-head h3 .icon { color: #a0cee8; }
.report-header { background: linear-gradient(140deg, #20314d, #172941); border-color: #344766; }
.report-phase { color: #b8b2ed; }
.report-title { color: #e0e9f8; }
.report-intro { color: #a6bad6; }
.form-field label { color: #c4d5eb; }
.form-field input, .form-field select { color: #deecfa; background: #0e1b2d; border-color: #37506f; }
.form-field input:focus, .form-field select:focus { border-color: #8dbedb; }
.form-field input::placeholder { color: #6985a6; }
.form-help { color: #8ca5c4; }
.report-summary { background: #0e1b2d; border-color: #2a3d57; }
.summary-row code, .summary-row strong { color: #bcddf0; }
.report-done { background: linear-gradient(145deg, #1c3e4e, #17263f); border-color: #40657a; }
.report-done .completion-icon { background: #2c5770; color: #d1f1fa; }
.findings-tabs { border-color: #2b405b; }
.findings-tab { color: #8faac9; }
.findings-tab.active, .findings-tab[aria-pressed="true"] { color: #cff1fb; border-color: #8acfe7; }
.finding-item { border-bottom-color: #283d58; }
button.finding-item:hover { background: #1a2d46; }
.finding-item > strong, .finding-ip { color: #c6e3f5; }
.finding-meta { color: #8fa9c8; }
.finding-item > code { color: #b7d8ef; }
.notes-card textarea, .decoder-input { color: #c7dff1; background: #0b192c; border-color: #2d4766; }
.notes-card textarea::placeholder, .decoder-input::placeholder { color: #6b87a6; }
.file-item { border-color: #263d59; }
.file-item:hover { background: #1b3049; }
.file-path { color: #b3cfe9; overflow-wrap: anywhere; }
.file-preview pre { color: #c2d9ee; background: #0c182b; border-color: #2b4561; }
.decoder-output { color: #c7ecfb; background: #102c40; border-color: #2c556b; }
.completion-panel { background: linear-gradient(135deg, #17364c, #252b4e); border-color: #487087; }
.completion-icon { color: #c7eff9; background: #2a566d; }
.completion-code { color: #d8f5ff; background: #10273b; border-color: #527b91; }
.completion-meta { color: #a0bfd4; }
dialog#modal { color: #dfebf6; background: #132239; border-color: #3b5376; }
dialog#modal::backdrop { background: #040a17c2; }
.modal-title { color: #e8f0fb; }
.modal-intro { color: #9fb6d2; }
.modal-close:hover { background: #2b3d5c; }
.reference-controls input, .reference-controls select { background: #0f1e33; border-color: #395372; color: #caddf0; }
.reference-tab { color: #9eb2ce; }
.reference-tab.active { color: #d3effa; background: #23405a; border-color: #77b8d3; }
.capability-table th { color: #9eb6d1; background: #152a42; border-color: #35516e; }
.capability-table td { border-color: #2a415d; }
.capability-table td code { color: #c5dff5; }
.capability-description { color: #afc3dc; }
.capability-status.simulated { color: #c1edfa; border-color: #48758c; background: #1a3b50; }
.capability-status.metadata { color: #e7cb9b; border-color: #6d5c3d; background: #3c3223; }
.capability-status.unsupported { color: #d3bee7; border-color: #625173; background: #30273f; }
.hint-item { background: #172b45; border-color: #334d6d; }
.hint-item h3 { color: #ceddf3; }
.hint-item p { color: #afc3dd; }
.copy-source { background: #0d1d31; border-color: #3f5c7a; color: #c9e6f7; }
.map-operator { background: #19384e; border-color: #496c89; color: #d1eaf7; }
.map-operator code { color: #bedff0; overflow-wrap: anywhere; }
.map-grid { align-items: stretch; }
.map-node { background: #182e48; border-color: #3b5578; }
.map-node:hover { background: #203d58; border-color: #79abc9; }
.map-node > .icon { color: #9dd7eb; }
.map-node > strong { color: #cfe6f6; }
.map-node > span { color: #a3bbd7; }
.map-node > code { color: #c3bbef; }
.certificate-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-top: 22px; }
.certificate-item { display: flex; flex-direction: column; gap: 9px; padding: 16px 15px; min-width: 0; border: 1px solid #364e70; border-radius: 9px; background: linear-gradient(145deg,#1a2e49,#14253d); text-align: left; overflow: hidden; }
button.certificate-item { width: 100%; cursor: pointer; }
button.certificate-item:hover { background: #203b57; border-color: #79a8ca; }
.certificate-item .icon { width: 21px; height: 21px; color: #a8d9ee; }
.certificate-item > header, .certificate-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.cert-name { display: block; color: #d6eafb; font-family: var(--mono); font-size: .875rem; font-weight: 550; line-height: 1.65; overflow-wrap: anywhere; word-break: normal; }
.cert-status { display: inline-flex; align-items: center; width: max-content; max-width: 100%; padding: 3px 7px; border: 1px solid #42637f; border-radius: 4px; background: #21364d; color: #b6cee7; font-size: .75rem; line-height: 1.5; white-space: normal; }
.cert-status.current, .cert-status.valid { color: #bcebf7; background: #183d50; border-color: #47758a; }
.cert-status.expired { color: #e9c98e; background: #3a3022; border-color: #6d5b3a; }
.cert-status.default { color: #d2c2ef; background: #302c49; border-color: #62577e; }
.cert-meta { display: block; color: #91aac7; font-family: var(--mono); font-size: .75rem; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.certificate-item .cert-meta + .cert-meta { margin-top: 1px; }
.finding-list > .certificate-item { margin: 12px 0; }
.certificate-item code { color: #b6d5eb; white-space: normal; overflow-wrap: anywhere; font-size: .8125rem; line-height: 1.75; }
.certificate-details { margin: 23px 0 0; }
.certificate-details > div { display: grid; grid-template-columns: minmax(120px,.7fr) minmax(0,1.6fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid #2b425f; }
.certificate-details dt { color: #8faac9; font-size: .8125rem; line-height: 1.7; }
.certificate-details dd { margin: 0; color: #cce2f5; font-family: var(--mono); font-size: .875rem; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.certificate-san-title { margin: 25px 0 10px; color: #a9c4df; font-size: .875rem; font-weight: 550; }
.cert-sans { padding: 14px 16px; margin: 0; border: 1px solid #2f4c69; border-radius: 7px; background: #0e1b2e; color: #c1def0; font-size: .875rem; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.dns-record { padding: 14px 2px; border-bottom: 1px solid #2a405d; min-width: 0; }
.dns-record:last-child { border-bottom: 0; }
.dns-record > header, .record-head { display: flex; align-items: flex-start; gap: 8px; min-width: 0; margin-bottom: 6px; }
.record-type { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 39px; padding: 2px 6px; border: 1px solid #426585; background: #1c3c58; border-radius: 4px; color: #bedff3; font-family: var(--mono); font-size: .75rem; line-height: 1.6; font-weight: 550; }
.record-name { display: block; min-width: 0; color: #c5ddf2; font-family: var(--mono); font-size: .875rem; line-height: 1.65; overflow-wrap: anywhere; }
.record-value { display: block; color: #a4c5df; font-family: var(--mono); font-size: .875rem; line-height: 1.8; margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.record-server { display: block; color: #7f99b8; font-family: var(--mono); font-size: .75rem; line-height: 1.75; margin-top: 5px; }
.notice-bar { background: #242a3c; border-color: #555579; color: #c6c6e3; }
.notice-bar strong { color: #ded8f2; }
#toast { color: #d7f0fa; background: #18364c; border-color: #527f99; }
@media (max-width: 1100px) {
  .right-column { position: static; }
  .certificate-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .scope-value { width: auto; flex-basis: 100%; font-size: .875rem; }
  .terminal-body { font-size: .875rem; }
  .terminal-input, .reference-controls input, .reference-controls select { font-size: 16px; }
  .map-grid, .certificate-grid { grid-template-columns: minmax(0,1fr); }
  .certificate-item { padding: 17px 15px; }
  .certificate-details > div { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .cert-name, .record-name, .record-value { font-size: .875rem; }
  .cert-status, .record-type { font-size: .75rem; }
  .capability-table td { background: #15273f; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Dexaris Security Labs wordmark and narrow-header layout. */
.brand-name,.brand-word{font-size:1.65rem;letter-spacing:-.055em;white-space:nowrap}
.brand strong{font-size:1.65rem;letter-spacing:-.055em;white-space:nowrap}
.mobile-brand{letter-spacing:-.045em;white-space:nowrap}
.brand-sub{font-size:12px;letter-spacing:.075em}
@media(max-width:900px){.app-header{flex-wrap:wrap;row-gap:12px}.header-actions{flex-wrap:wrap}}
@media(max-width:540px){.brand-name,.brand-word,.brand strong{font-size:1.4rem}.mobile-brand{font-size:1.25rem}.header-actions{margin-left:0}}
