:root {
  color-scheme: dark;
  --bg: #090f16;
  --surface: #101923;
  --surface-raised: #14212c;
  --terminal: #0c141d;
  --line: #23323e;
  --line-soft: #1b2935;
  --text: #e0e9ed;
  --muted: #8297a6;
  --quiet: #617987;
  --mint: #a6ead2;
  --mint-dark: #182f2e;
  --amber: #e3b97b;
  --red: #f0a1a3;
  --blue: #9ac4e8;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  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.55; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; outline-offset: 4px; }
button { color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--mint); }
a { color: inherit; text-decoration: none; }
svg { display: block; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; }
pre, code, kbd { font-family: var(--mono); }
pre { margin: 0; }
code { font-size: .9em; color: var(--mint); }
::selection { color: #effff9; background: #347668; }
[hidden], .hidden { display: none !important; }
.icon { width: 19px; height: 19px; }
.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: 20px; padding: 12px 18px; color: #102620; background: var(--mint); border-radius: 9px; z-index: 200; }
.skip-link:focus { top: 12px; }
.loading { min-height: 70vh; display: grid; place-items: center; font-family: var(--mono); color: var(--muted); font-size: .875rem; }

.app-header { min-height: 88px; border-bottom: 1px solid var(--line-soft); padding: 20px 32px; display: flex; align-items: center; gap: 27px; background: #0d151ee8; position: relative; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; color: #edf6f4; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; color: var(--mint); }
.brand-word { font-size: 1.35rem; font-weight: 800; letter-spacing: .15em; line-height: 1; }
.brand-sub { display: block; margin: 0 0 0 3px; color: var(--muted); font-family: var(--mono); font-size: .625rem; font-weight: 500; letter-spacing: .12em; }
.header-divider { height: 31px; width: 1px; background: #2a3a46; }
.header-title { font-size: .8125rem; color: #99aeba; display: flex; align-items: center; gap: 11px; letter-spacing: .01em; }
.header-title strong { color: #d5e3e6; font-weight: 550; }
.header-title span { color: var(--quiet); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 21px; }
.header-stats { display: flex; gap: 28px; align-items: center; }
.stat { font-family: var(--mono); font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.stat strong { display: block; color: #dbe7e8; font-size: .9375rem; font-weight: 500; letter-spacing: .03em; line-height: 1.4; }
.stat span { display: block; margin-top: 3px; font-size: .625rem; letter-spacing: .07em; text-transform: uppercase; color: var(--quiet); }
.status-badge { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #30483f; background: #152923; color: #a7d5bd; padding: 5px 9px; border-radius: 5px; font-family: var(--mono); font-size: .6875rem; line-height: 1.4; white-space: nowrap; }
.status-badge .icon { width: 12px; height: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; border: 1px solid #2b3f49; background: #15232d; color: #9cbdc9; font-size: .6875rem; font-family: var(--mono); letter-spacing: .015em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 15px; border-radius: 8px; font-size: .8125rem; font-weight: 650; line-height: 1.35; text-align: center; transition: background .15s, border-color .15s; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--mint); color: #122b25; border: 1px solid var(--mint); }
.btn-primary:hover { background: #c2f8e6; border-color: #c2f8e6; }
.btn-secondary { background: #182733; color: #bfd0d9; border: 1px solid #304350; }
.btn-secondary:hover { background: #203442; border-color: #48616e; }
.btn-ghost { color: #a4b8c4; border: 1px solid #2c3c49; background: transparent; }
.btn-ghost:hover { background: #17242e; color: #deebed; }
.icon-button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 6px; color: var(--muted); }
.icon-button:hover { background: #1c2d38; color: #d5e7e7; }
.icon-button .icon { width: 17px; height: 17px; }
.text-link { padding: 0; display: inline-flex; gap: 7px; align-items: center; font-size: .8125rem; font-weight: 550; color: #a4d9cb; }
.text-link:hover { color: #daf9ee; }
.text-link .icon { width: 15px; height: 15px; }
.kbd, kbd { display: inline-block; border: 1px solid #344653; border-bottom: 2px solid #344653; border-radius: 4px; padding: 1px 5px; font-size: .6875rem; color: #a5bac5; background: #101e28; font-weight: 400; }

.workspace { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 28px; padding: 29px 32px 36px; max-width: 1920px; margin: 0 auto; align-items: start; }
.sidebar { min-width: 0; display: flex; flex-direction: column; gap: 19px; }
.mission-card { border: 1px solid #2b424b; border-radius: 13px; padding: 23px 21px; background: linear-gradient(145deg, #162a32, #111e29 72%); position: relative; overflow: hidden; }
.mission-card::before { content: ""; position: absolute; top: 0; left: 21px; width: 39px; height: 2px; background: var(--mint); }
.mission-card::after { content: ""; position: absolute; top: 27px; right: -35px; width: 90px; height: 90px; border: 1px solid #92bca712; border-radius: 50%; box-shadow: 0 0 0 15px #92bca705; pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--mint); font-family: var(--mono); font-size: .6875rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 500; }
.eyebrow .icon { width: 13px; height: 13px; }
.mission-title { font-size: 1.55rem; letter-spacing: -.04em; color: #e6f0f0; line-height: 1.18; margin-top: 18px; font-weight: 650; max-width: none; overflow-wrap: normal; word-break: normal; }
.mission-copy { font-size: .875rem; line-height: 1.8; color: #9cb2bd; margin-top: 15px; }
.mission-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 19px; margin-top: 21px; border-top: 1px solid #2b3e49; font-family: var(--mono); font-size: .6875rem; color: #7b97a7; }
.mission-meta .icon { width: 13px; height: 13px; }
.steps { display: flex; flex-direction: column; gap: 0; margin: 23px 0 0; padding: 0; list-style: none; }
.step { display: flex; gap: 12px; padding: 0 0 23px; align-items: flex-start; position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; height: calc(100% - 31px); width: 1px; top: 31px; left: 13px; background: #2a404a; }
.step:last-child { padding-bottom: 0; }
.step-icon { display: flex; width: 27px; height: 27px; border-radius: 7px; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid #3b555b; color: #9fbbb9; background: #1b2e36; font-family: var(--mono); font-size: .75rem; }
.step-icon .icon { width: 14px; height: 14px; }
.step-copy { color: #c0d0d5; padding-top: 2px; font-size: .8125rem; font-weight: 550; line-height: 1.5; }
.step-copy strong { display: block; font-size: .8125rem; font-weight: 550; }
.step-copy span, .step-copy small, .step-copy p { display: block; color: #76919e; font-size: .75rem; line-height: 1.65; font-weight: 400; margin-top: 4px; }
.step[data-state="current"] .step-icon, .step.current .step-icon { background: #284a43; border-color: #649a86; color: #c4f4df; }
.step[data-state="current"] .step-copy, .step.current .step-copy { color: #def5ed; }
.step[data-state="complete"] .step-icon, .step.complete .step-icon { color: #a4e0c5; border-color: #3c6d59; background: #1b382e; }
.step[data-state="locked"] .step-icon, .step.locked .step-icon { border-color: #2a3b46; color: #5d7686; background: #16232c; }
.step[data-state="locked"] .step-copy, .step.locked .step-copy { color: #748c99; }
.side-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px 21px; background: #101c26; }
.side-card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.side-card-header h2, .side-card-header h3 { font-size: .875rem; letter-spacing: -.015em; font-weight: 600; }
.side-card-header .icon { width: 17px; height: 17px; color: #6c959f; }
.side-card > p { color: #829eac; font-size: .875rem; line-height: 1.7; }
.command-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.command-chip { padding: 5px 9px; border: 1px solid #2c414d; border-radius: 5px; font-family: var(--mono); font-size: .875rem; line-height: 1.5; background: #162730; color: #acd8cc; }
.command-chip:hover { color: #d7f4e8; background: #203d3c; border-color: #48736a; }
.side-card .text-link { margin-top: 17px; }
.sidebar-footer { color: #627d8b; font-size: .75rem; line-height: 1.8; padding: 0 7px; }
.sidebar-footer strong { color: #8da6b1; font-weight: 500; }
.sidebar-footer .icon { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; margin-right: 4px; }
.progress-meter { margin-top: 20px; }
.progress-label { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: .6875rem; color: #859da8; margin-bottom: 9px; }
.progress-track { height: 4px; overflow: hidden; border-radius: 6px; background: #253641; }
.progress-fill { display: block; height: 100%; background: #83c8ad; transition: width .25s; border-radius: 6px; }

.content-area { min-width: 0; }
.case-banner { display: flex; justify-content: space-between; gap: 25px; align-items: center; padding: 3px 1px 24px; }
.banner-copy { min-width: 0; }
.banner-title { display: flex; gap: 12px; align-items: center; font-size: 1.35rem; letter-spacing: -.035em; font-weight: 600; }
.banner-title .icon { color: #9ad9c6; width: 23px; height: 23px; }
.banner-description { color: #849ca9; font-size: .8125rem; margin-top: 7px; line-height: 1.7; }
.banner-code { display: flex; flex-direction: column; align-items: end; font-family: var(--mono); font-size: .6875rem; line-height: 1.8; color: #567583; white-space: nowrap; }
.banner-code strong { color: #8baab5; font-weight: 500; letter-spacing: .07em; }
.terminal-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
.terminal-window { display: flex; flex-direction: column; min-width: 0; border: 1px solid #31444f; border-radius: 12px; background: var(--terminal); box-shadow: 0 12px 38px #0000001f; overflow: hidden; }
.terminal-window:focus-within { border-color: #527e78; box-shadow: 0 0 0 1px #3d766220, 0 12px 38px #0000001f; }
.terminal-titlebar { display: flex; align-items: center; gap: 14px; min-height: 53px; padding: 11px 16px; border-bottom: 1px solid #263946; background: #17242e; }
.window-dots { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.window-dots span, .window-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #b17b70; }
.window-dots span:nth-child(2), .window-dots i:nth-child(2) { background: #a29160; }
.window-dots span:nth-child(3), .window-dots i:nth-child(3) { background: #6c9d84; }
.terminal-title { font-family: var(--mono); font-size: .75rem; color: #c2d1d8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminal-title strong { color: #dbe7e9; font-weight: 500; }
.terminal-state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .625rem; color: #7f9b9c; margin-left: auto; white-space: nowrap; }
.terminal-state .icon { width: 12px; height: 12px; }
.terminal-state.connected, .terminal-state[data-connected="true"] { color: #9dd9be; }
.terminal-state.locked, .terminal-state[data-connected="false"] { color: #c1a471; }
.terminal-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.terminal-actions .icon-button { width: 27px; height: 27px; }
.terminal-actions .icon { width: 14px; height: 14px; }
.terminal-body { min-height: 430px; height: 530px; max-height: 75vh; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #334b56 transparent; padding: 23px 23px 18px; font-family: var(--mono); font-size: .875rem; line-height: 1.75; color: #bdd0d5; background: #0d161f; cursor: text; }
.terminal-body::-webkit-scrollbar { width: 7px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: #334b56; border-radius: 8px; }
.terminal-output { min-width: 0; }
.terminal-entry { margin-bottom: 15px; }
.terminal-command { color: #e4eef0; margin: 0 0 5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.terminal-command .terminal-prompt { color: #92d5b9; padding-right: 9px; }
.terminal-command-prompt { color: #93d8bc; overflow-wrap: anywhere; white-space: pre-wrap; }
.terminal-line { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.75em; tab-size: 4; color: #b7cbd1; }
.terminal-line:empty { height: .7em; min-height: .7em; }
.kind-normal { color: #b7cbd1; }
.kind-muted { color: #6f8b9b; }
.kind-error { color: var(--red); }
.kind-success { color: #9ee2bb; }
.kind-heading { color: #e3bd7c; font-weight: 550; }
.terminal-input-form { margin: 0; padding: 13px 21px 10px; background: #101e28; border-top: 1px solid #263c48; }
.terminal-input-row { display: flex; gap: 9px; align-items: flex-start; min-width: 0; padding: 1px 0; }
.terminal-prompt { color: #93d8bc; font-family: var(--mono); font-size: .875rem; line-height: 1.75; flex: 0 1 auto; max-width: 65%; white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal-input { display: block; min-width: 0; width: 100%; padding: 0 0 3px; margin: 0; border: 0; outline: none !important; background: transparent; color: #e0eded; font-family: var(--mono); font-size: .875rem; line-height: 1.75; caret-color: var(--mint); border-radius: 0; }
.terminal-input::placeholder { color: #4e6b7b; opacity: 1; }
.terminal-input:disabled { opacity: .45; }
.terminal-input-row:focus-within .terminal-prompt { color: #c1f2d9; }
.terminal-lock-screen { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 44px 25px; text-align: center; cursor: default; position: relative; overflow: hidden; }
.terminal-lock-screen::before { content: ""; position: absolute; width: 195px; height: 195px; border: 1px solid #3b526420; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%,-60%); box-shadow: 0 0 0 38px #3b526408, 0 0 0 77px #3b526404; pointer-events: none; }
.lock-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; color: #c4ad81; background: #292a24; border: 1px solid #5c5238; border-radius: 14px; margin-bottom: 23px; position: relative; }
.lock-icon .icon { width: 23px; height: 23px; }
.lock-title { font-family: var(--sans); color: #cfdbdf; font-size: 1.08rem; letter-spacing: -.02em; margin-bottom: 12px; font-weight: 550; position: relative; }
.lock-copy { font-family: var(--sans); color: #708c9c; font-size: .875rem; line-height: 1.8; max-width: 31ch; position: relative; }
.lock-command { margin-top: 24px; padding: 9px 13px; border: 1px solid #2d414c; border-radius: 6px; color: #8ca6b0; background: #111f29; font-size: .75rem; position: relative; overflow-wrap: anywhere; max-width: 100%; }
.terminal-footer { border-top: 1px solid #223440; padding: 9px 16px; background: #111e28; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: .625rem; color: #5f7e8b; min-height: 34px; }
.terminal-footer span { display: inline-flex; align-items: center; gap: 5px; }
.terminal-footer .icon { width: 12px; height: 12px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 2px 0; color: #6e8998; font-size: .75rem; }
.toolbar .context-status { margin-left: auto; }
.context-status { font-family: var(--mono); font-size: .6875rem; color: #7a97a2; line-height: 1.6; }
.mobile-tabs { display: none; }

.helper-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; margin-top: 22px; }
.helper-card { padding: 21px 23px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #101b25; }
.helper-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.helper-card-head h2, .helper-card-head h3 { font-size: .875rem; font-weight: 550; letter-spacing: -.01em; display: flex; gap: 9px; align-items: center; }
.helper-card-head .icon { color: #92b7bb; width: 17px; height: 17px; }
.helper-description { font-size: .875rem; color: #7f9ba9; line-height: 1.8; }
.helper-card .command-chips { margin-top: 13px; }
.notepad textarea { width: 100%; height: 130px; min-height: 105px; display: block; border: 1px solid #2a3e4b; background: #0c1822; color: #bcd4d8; resize: vertical; padding: 12px 13px; border-radius: 7px; font-family: var(--mono); font-size: .875rem; line-height: 1.8; margin-top: 14px; }
.notepad textarea::placeholder { color: #506f7d; }
.notes-status { font-size: .6875rem; color: #627e8c; margin-top: 8px; line-height: 1.65; }
.hint-list { display: flex; flex-direction: column; gap: 12px; margin-top: 23px; }
.hint-item { padding: 17px 19px; background: #17252e; border: 1px solid #30434e; border-radius: 10px; }
.hint-item h3 { font-size: .875rem; font-weight: 550; color: #c7dce0; margin-bottom: 7px; }
.hint-item p { font-size: .875rem; line-height: 1.8; color: #93acb7; }
.hint-meta { font-family: var(--mono); font-size: .6875rem; color: #798f9d; }
.hint-actions { display: flex; align-items: center; gap: 18px; justify-content: space-between; margin-top: 24px; }
.error-panel { padding: 23px; max-width: 650px; margin: 40px auto; border: 1px solid #624345; border-radius: 12px; background: #261e25; color: #e6b9b6; }
.error-panel h1, .error-panel h2 { font-size: 1.25rem; margin-bottom: 13px; }
.error-panel p { font-size: .9375rem; line-height: 1.85; }
.error-panel .btn { margin-top: 20px; }

dialog#modal { width: min(860px, calc(100vw - 32px)); max-height: 90dvh; border: 1px solid #36505d; border-radius: 16px; padding: 0; color: var(--text); background: #111e28; box-shadow: 0 25px 120px #000a; overflow: auto; scrollbar-width: thin; scrollbar-color: #3b5361 transparent; }
dialog#modal::backdrop { background: #040a12bf; backdrop-filter: blur(7px); }
.modal-content { padding: 36px 38px; position: relative; }
.modal-close { position: absolute; right: 15px; top: 15px; z-index: 2; color: #8ba7b2; background: #182b36; }
.dialog-header { display: flex; align-items: center; gap: 13px; margin-bottom: 15px; padding-right: 25px; }
.dialog-header .icon { width: 25px; height: 25px; color: var(--mint); }
.dialog-header h1, .dialog-header h2 { font-size: 1.55rem; letter-spacing: -.035em; font-weight: 600; }
.modal-content > h1, .modal-content > h2 { font-size: 1.55rem; letter-spacing: -.035em; padding-right: 27px; margin-bottom: 16px; font-weight: 600; }
.modal-content > .eyebrow { margin-bottom: 16px; }
.modal-intro { color: #95adb9; font-size: .9375rem; line-height: 1.85; max-width: 68ch; }
.modal-intro strong { color: #d2e5e7; font-weight: 550; }
.modal-content > p { color: #95adb9; font-size: .9375rem; line-height: 1.85; }
.modal-content ul, .modal-content ol { color: #96afbc; padding-left: 23px; font-size: .9375rem; line-height: 1.85; }
.modal-content li + li { margin-top: 8px; }
.reference-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 13px; margin-top: 25px; }
.reference-card { padding: 17px 18px; border: 1px solid #2b424e; border-radius: 9px; background: #13242e; min-width: 0; }
.reference-card { text-align: left; }
.reference-card:hover { background: #1a3039; border-color: #3f625f; }
.reference-card h3 { color: #a9e0cd; font-family: var(--mono); font-size: .875rem; font-weight: 500; margin-bottom: 8px; }
.reference-card p { color: #8da7b5; font-size: .875rem; line-height: 1.75; }
.reference-card code { display: block; font-size: .875rem; color: #b8cbd4; margin-top: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reference-card > code:first-child { margin-top: 0; color: var(--mint); }
.reference-card > span { display: block; font-size: .875rem; color: #8da7b5; line-height: 1.65; margin-top: 7px; }
.manual-code { padding: 17px 19px; margin-top: 20px; border: 1px solid #2d4450; border-radius: 9px; background: #0b1720; color: #a5c8c3; font-family: var(--mono); font-size: .875rem; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.helper-card-head > h2, .helper-card-head > h3 { margin-right: auto; }
.connect-form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 19px 17px; margin-top: 25px; }
.connect-form-grid label { display: block; font-size: .875rem; line-height: 1.5; font-weight: 550; color: #c2d6de; min-width: 0; }
.connect-form-grid input { display: block; width: 100%; min-width: 0; min-height: 46px; margin-top: 8px; padding: 11px 13px; background: #0c1822; border: 1px solid #35515e; border-radius: 8px; font-family: var(--mono); font-size: .875rem; line-height: 1.5; color: #dcebed; caret-color: var(--mint); }
.connect-form-grid input:focus { border-color: #84b9a6; }
.connect-form-grid input::placeholder { color: #607e8d; }
.dialog-feedback { min-height: 1.5em; margin-top: 16px; font-size: .875rem; line-height: 1.75; color: var(--red); }
.dialog-feedback:empty { min-height: 0; margin-top: 0; }
.copy-source { display: block; margin-top: 23px; width: 100%; min-height: 105px; resize: vertical; padding: 16px; font-family: var(--mono); font-size: 1rem; line-height: 1.8; color: #cff1dc; background: #0b211c; border: 1px solid #4b7666; border-radius: 9px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 11px; margin-top: 28px; flex-wrap: wrap; }
.completion-card { position: relative; padding: 36px; border: 1px solid #3a665a; border-radius: 14px; background: linear-gradient(135deg,#17332f,#101e29 74%); margin: 22px 0; }
.completion-card h2 { font-size: 1.65rem; letter-spacing: -.04em; font-weight: 600; color: #e1f3e9; }
.completion-card p { font-size: .9375rem; color: #92b4ab; line-height: 1.85; margin-top: 12px; }
.completion-icon { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border: 1px solid #598b72; background: #244a3c; color: #bbeccf; border-radius: 13px; margin-bottom: 23px; }
.completion-icon .icon { width: 25px; height: 25px; }
.completion-label { font-family: var(--mono); color: #91c6b4; font-size: .6875rem; letter-spacing: .13em; text-transform: uppercase; margin-top: 27px; }
.completion-code { font-family: var(--mono); color: #d4f6d9; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 550; letter-spacing: .06em; line-height: 1.6; margin-top: 10px; padding: 20px; border-radius: 9px; border: 1px dashed #4b7565; background: #0b241d; text-align: center; user-select: all; overflow-wrap: anywhere; }
.completion-meta { font-family: var(--mono); color: #789b90; font-size: .75rem; margin-top: 13px; display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.completion-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 25px; }
#toast, .toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%,12px); padding: 12px 20px; max-width: calc(100vw - 32px); border: 1px solid #49766a; background: #18392f; color: #d2efdf; box-shadow: 0 12px 35px #0005; border-radius: 9px; font-size: .8125rem; line-height: 1.6; opacity: 0; pointer-events: none; z-index: 250; transition: opacity .15s, transform .15s; text-align: center; }
#toast.visible, #toast.active, #toast.toast-active, .toast.visible, .toast.active { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 1350px) {
  .terminal-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .terminal-body { min-height: 520px; height: clamp(520px, calc(100vh - 320px), 760px); max-height: 760px; padding: 23px 21px 18px; }
}
@media (min-width: 1750px) {
  .workspace { grid-template-columns: 280px minmax(0,1fr); gap: 33px; padding-left: 40px; padding-right: 40px; }
  .app-header { padding-left: 40px; padding-right: 40px; }
  .mission-card { padding: 25px; }
  .side-card { padding: 23px 25px; }
  .terminal-body { padding: 27px; }
}
@media (max-width: 1150px) {
  .app-header { padding: 19px 24px; gap: 20px; }
  .header-title { font-size: .75rem; }
  .header-stats { gap: 18px; }
  .header-actions { gap: 15px; }
  .header-actions .status-badge { display: none; }
  .workspace { padding: 25px 24px 32px; gap: 23px; grid-template-columns: 240px minmax(0,1fr); }
  .mission-card, .side-card { padding: 21px 19px; }
  .banner-code { display: none; }
  .helper-grid { gap: 16px; }
  .helper-card { padding: 19px; }
}
@media (max-width: 900px) {
  .app-header { min-height: 77px; padding: 17px 22px; gap: 19px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-word { font-size: 1.2rem; }
  .brand-sub { font-size: .625rem; }
  .header-divider { height: 28px; }
  .header-title { font-size: .75rem; }
  .header-title span { display: none; }
  .header-stats { gap: 17px; }
  .stat strong { font-size: .8125rem; }
  .stat span { font-size: .5625rem; }
  .workspace { display: flex; flex-direction: column; gap: 23px; padding: 23px 22px 35px; }
  .sidebar { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 16px; width: 100%; }
  .mission-card { grid-row: span 2; }
  .mission-title { max-width: none; font-size: 1.35rem; margin-top: 13px; }
  .mission-copy { margin-top: 10px; font-size: .8125rem; }
  .mission-meta { padding-top: 14px; margin-top: 15px; }
  .steps { margin-top: 19px; }
  .step { padding-bottom: 16px; }
  .side-card { padding: 18px; }
  .sidebar-footer { grid-column: 1 / -1; padding: 0 3px; }
  .content-area { width: 100%; }
  .case-banner { padding-bottom: 19px; }
  .banner-title { font-size: 1.25rem; }
  .banner-description { font-size: .8125rem; }
  .terminal-body { min-height: 420px; height: 480px; max-height: 70vh; }
  .terminal-grid { gap: 18px; }
  .helper-grid { margin-top: 18px; }
}
@media (max-width: 650px) {
  body { min-width: 320px; }
  .app-header { min-height: 72px; padding: 15px 16px; gap: 13px; flex-wrap: wrap; }
  .brand { gap: 8px; }
  .brand-mark { width: 29px; height: 29px; }
  .brand-word { font-size: 1.1rem; }
  .brand-sub { display: none; }
  .header-divider, .header-title, .header-stats .stat:not(:first-child) { display: none; }
  .header-actions { gap: 12px; }
  .header-stats { gap: 0; }
  .stat strong { font-size: .875rem; }
  .stat span { font-size: .5rem; }
  .header-actions .btn { padding: 8px 10px; min-height: 35px; font-size: .75rem; }
  .header-actions .btn .icon { width: 14px; height: 14px; }
  .workspace { padding: 18px 13px 30px; gap: 21px; }
  .sidebar { display: grid; grid-template-columns: 1fr; gap: 13px; }
  .mission-card { padding: 20px; grid-row: auto; }
  .mission-title { font-size: 1.4rem; max-width: none; }
  .mission-copy { font-size: .875rem; line-height: 1.75; }
  .mission-meta { margin-top: 16px; }
  .steps { gap: 13px; flex-direction: row; margin-top: 21px; }
  .step { flex: 1; flex-direction: column; gap: 8px; padding: 0; min-width: 0; }
  .step::after { display: none; }
  .step-copy, .step-copy strong { font-size: .75rem; }
  .step-copy span, .step-copy small, .step-copy p { font-size: .6875rem; line-height: 1.55; }
  .step-icon { width: 26px; height: 26px; }
  .sidebar > .side-card { display: none; }
  .sidebar-footer { font-size: .6875rem; line-height: 1.7; }
  .case-banner { padding: 0 3px 16px; }
  .banner-title { font-size: 1.1rem; gap: 9px; }
  .banner-title .icon { width: 20px; height: 20px; }
  .banner-description { font-size: .75rem; line-height: 1.7; }
  .mobile-tabs { display: flex; gap: 7px; padding: 5px; border: 1px solid #293e4c; border-radius: 9px; background: #111f2a; margin-bottom: 13px; }
  .mobile-tab { flex: 1; display: flex; gap: 7px; align-items: center; justify-content: center; padding: 10px 8px; border-radius: 6px; color: #7d9aa9; font-family: var(--mono); font-size: .75rem; min-height: 37px; }
  .mobile-tab .icon { width: 14px; height: 14px; }
  .mobile-tab.active, .mobile-tab[aria-selected="true"], .mobile-tab[data-active="true"] { background: #213b42; color: #b5e7d7; }
  .terminal-window[data-active="false"] { display: none; }
  .terminal-window { border-radius: 10px; }
  .terminal-titlebar { padding: 10px 12px; gap: 10px; min-height: 49px; }
  .window-dots { gap: 4px; }
  .window-dots span, .window-dots i { width: 5px; height: 5px; }
  .terminal-title { font-size: .6875rem; }
  .terminal-state { font-size: .5625rem; }
  .terminal-actions { gap: 2px; }
  .terminal-actions .icon-button { width: 24px; height: 25px; }
  .terminal-body { min-height: 430px; height: 62vh; max-height: 650px; padding: 18px 13px; font-size: .875rem; line-height: 1.8; }
  .terminal-prompt { font-size: .875rem; line-height: 1.8; }
  .terminal-command .terminal-prompt { padding-right: 5px; }
  .terminal-input { font-size: 16px; line-height: 1.55; padding: 1px 0 5px; }
  .terminal-input-row { gap: 6px; }
  .terminal-input-form { padding: 12px 13px 9px; }
  .terminal-entry { margin-bottom: 14px; }
  .terminal-line { min-height: 1.8em; }
  .terminal-footer { padding: 9px 12px; font-size: .5625rem; gap: 8px; }
  .terminal-footer > span:last-child { text-align: right; justify-content: flex-end; }
  .terminal-lock-screen { padding: 30px 15px; }
  .lock-title { font-size: 1rem; }
  .lock-copy { font-size: .8125rem; }
  .lock-command { font-size: .6875rem; padding: 8px 10px; }
  .toolbar { font-size: .6875rem; gap: 9px; padding: 12px 3px 0; }
  .toolbar .context-status { width: 100%; margin-left: 0; font-size: .625rem; }
  .helper-grid { grid-template-columns: 1fr; gap: 13px; margin-top: 19px; }
  .helper-card { padding: 19px; }
  .helper-card-head h2, .helper-card-head h3 { font-size: .875rem; }
  .helper-description { font-size: .875rem; }
  .notepad textarea { min-height: 130px; height: 150px; font-size: 16px; line-height: 1.7; }
  .notes-status { font-size: .6875rem; }
  dialog#modal { border-radius: 13px; width: calc(100vw - 24px); max-height: 92dvh; }
  .modal-content { padding: 29px 23px; }
  .modal-close { top: 11px; right: 11px; }
  .dialog-header { gap: 10px; padding-right: 22px; margin-bottom: 13px; }
  .dialog-header h1, .dialog-header h2, .modal-content > h1, .modal-content > h2 { font-size: 1.35rem; letter-spacing: -.035em; }
  .dialog-header .icon { width: 22px; height: 22px; }
  .modal-intro, .modal-content > p, .modal-content li { font-size: .875rem; }
  .reference-grid { grid-template-columns: 1fr; margin-top: 21px; gap: 11px; }
  .reference-card { padding: 16px; }
  .reference-card p, .reference-card code, .reference-card > span { font-size: .875rem; }
  .manual-code { padding: 15px; font-size: .875rem; }
  .connect-form-grid { grid-template-columns: minmax(0,1fr); gap: 16px; margin-top: 22px; }
  .connect-form-grid input { font-size: 16px; }
  .modal-actions { gap: 9px; margin-top: 23px; }
  .hint-item { padding: 15px 16px; }
  .hint-item p { font-size: .875rem; }
  .hint-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .hint-actions .btn { width: 100%; }
  .completion-card { padding: 25px 22px; margin-top: 18px; }
  .completion-card h2 { font-size: 1.4rem; }
  .completion-card p { font-size: .875rem; }
  .completion-code { padding: 16px 10px; font-size: 1.35rem; letter-spacing: .025em; }
  .completion-meta { font-size: .6875rem; }
  .completion-actions { gap: 9px; }
  .completion-actions .btn { flex: 1; white-space: nowrap; font-size: .75rem; }
  .error-panel { margin: 22px 14px; padding: 22px; }
  .error-panel p { font-size: .875rem; }
}
.mobile-tools { display:none; }
@media (max-width:650px) { .mobile-tools { display:flex; gap:9px; margin:16px 0 12px; flex-wrap:wrap; } .mobile-tools .btn { font-size:.875rem; flex:1; } .terminal-lock-screen .lock-command { font-size:.8125rem; } }
@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}}
