:root {
  color-scheme: dark;
  --bg: #07100f; --panel: #0e1a18; --panel-soft: #111f1d; --line: #253532;
  --line-strong: #38504b; --text: #f0f6f3; --muted: #9cafaa; --accent: #5fe0b5;
  --accent-ink: #04110d; --danger: #ef8f8f; --radius: 14px;
  --shadow: 0 24px 70px rgb(0 0 0 / 28%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 82% 0%, rgb(31 102 82 / 18%), transparent 34rem), var(--bg); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .16; background-image: linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 70%); }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 100; padding: .7rem 1rem; background: var(--accent); color: var(--accent-ink); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.site-header { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 0 5vw; border-bottom: 1px solid rgb(255 255 255 / 8%); background: rgb(7 16 15 / 90%); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 800; letter-spacing: .18em; }
.brand-mark { width: 18px; height: 18px; border: 2px solid var(--accent); box-shadow: inset 5px 0 0 var(--accent); }
nav { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.8rem); }
nav a, .button-link { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 650; }
nav a:hover, .button-link:hover { color: var(--text); }
.button-link { border: 0; padding: .5rem 0; background: none; cursor: pointer; }
.account-handle { padding-left: 1.2rem; border-left: 1px solid var(--line); color: var(--text); font-size: .84rem; }
main { position: relative; min-height: calc(100vh - 150px); }
.view { width: min(1180px, 90vw); margin: 0 auto; padding: clamp(3rem, 7vw, 7rem) 0; }
.narrow-view { width: min(570px, 90vw); }
.content-view { width: min(1080px, 90vw); }
.hero-grid { min-height: 64vh; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.hero-copy h1 { max-width: 900px; margin: .5rem 0 1.5rem; font-size: clamp(3.1rem, 7.7vw, 7.6rem); line-height: .92; letter-spacing: -.065em; }
.hero-copy h1 span { color: var(--accent); }
.hero-summary { max-width: 720px; color: #bfd0cb; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.65; }
.eyebrow, .state-kicker, .metric-label { margin: 0 0 .65rem; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: 8px; padding: .75rem 1.25rem; cursor: pointer; text-decoration: none; font-weight: 750; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover:not(:disabled) { background: #7ce9c4; }
.button-secondary { border-color: var(--line-strong); background: transparent; color: var(--text); }
.button-secondary:hover:not(:disabled) { border-color: var(--accent); background: rgb(95 224 181 / 7%); }
.button-danger, .button-danger-secondary { border-color: #7e3d3d; background: #873d3d; color: #fff; }
.button-danger-secondary { background: transparent; color: #f3b2b2; }
.button-small { min-height: 38px; padding: .52rem .9rem; font-size: .84rem; }
.button-block { width: 100%; }
.split-row { justify-content: space-between; }
.centered-row { justify-content: center; }
.scope-preview, .panel, .principle-grid article, .metric-grid article { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgb(18 34 31 / 96%), rgb(10 20 18 / 96%)); box-shadow: var(--shadow); }
.scope-preview { padding: 1.5rem; }
.status-label, .session-state, .run-status-line p { display: flex; align-items: center; gap: .55rem; color: #c7d7d2; font-size: .83rem; font-weight: 700; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgb(95 224 181 / 10%), 0 0 16px rgb(95 224 181 / 55%); }
.scope-preview dl { margin: 1.4rem 0 0; }
.scope-preview dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.scope-preview dt { color: var(--muted); }
.scope-preview dd { margin: 0; text-align: right; font-weight: 700; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-bottom: 2rem; }
.principle-grid article { min-height: 230px; padding: 1.5rem; box-shadow: none; }
.principle-grid h2 { margin-top: 3.2rem; font-size: 1.2rem; }
.principle-grid p:last-child { color: var(--muted); line-height: 1.65; }
.card-number { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.auth-panel { padding: clamp(1.5rem, 5vw, 3rem); }
.auth-panel h1, .page-heading h1 { margin: .25rem 0 .8rem; font-size: clamp(2.1rem, 5vw, 4rem); letter-spacing: -.04em; }
.muted, .page-heading > p:last-child { color: var(--muted); line-height: 1.6; }
.field { margin: 1.25rem 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label, legend { font-weight: 700; }
input, textarea { width: 100%; margin-top: .55rem; border: 1px solid var(--line-strong); border-radius: 8px; padding: .85rem 1rem; background: #081311; color: var(--text); }
input::placeholder, textarea::placeholder { color: #6e817c; }
textarea { resize: vertical; line-height: 1.5; }
small, .optional { color: var(--muted); font-size: .77rem; }
.optional { margin-left: .35rem; font-weight: 500; }
.form-message { min-height: 1.5rem; color: var(--muted); line-height: 1.5; }
.form-message.error { color: #f3a4a4; }
.form-message.success { color: var(--accent); }
.panel-footnote { margin: 1.5rem 0 0; color: var(--muted); text-align: center; font-size: .9rem; }
.step-indicator { display: flex; align-items: center; margin: 1.5rem 0 2.2rem; }
.step-indicator span:not(.step-line) { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: .78rem; font-weight: 800; }
.step-indicator span.current { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.step-line { width: 60px; height: 1px; background: var(--line-strong); }
.consent-group, .questionnaire fieldset { margin: 1.6rem 0; border: 0; padding: 0; }
.check-row { display: grid; grid-template-columns: auto 1fr; gap: .85rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: rgb(255 255 255 / 2%); cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: .15rem 0 0; accent-color: var(--accent); }
.check-row strong { display: block; margin-bottom: .25rem; }
.check-row span { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.page-heading { margin-bottom: 2.5rem; }
.boundary-statement { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; margin: 2rem 0; border: 1px solid var(--accent); border-radius: var(--radius); padding: 1.35rem; background: rgb(95 224 181 / 7%); font-size: clamp(1rem, 2vw, 1.2rem); text-transform: uppercase; letter-spacing: .035em; }
.boundary-statement span { color: var(--accent); font-size: 1.7rem; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rule-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: var(--panel); }
.rule-card h2 { margin-top: 0; }
.rule-card ul { margin: 0; padding-left: 1.2rem; color: #c3d0cc; line-height: 2; }
.rule-card li::marker { color: var(--accent); }
.rule-card.prohibited li::marker { color: var(--danger); }
.action-panel, .notice { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.25rem 1.5rem; background: var(--panel-soft); }
.action-panel h2, .action-panel p, .notice p { margin: .2rem 0; }
.notice-warning { border-color: #6b5a30; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.state-panel, .no-run-panel { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; text-align: center; }
.no-run-panel { align-items: stretch; justify-content: space-between; flex-direction: row; text-align: left; }
.no-run-panel > div { max-width: 650px; }
.no-run-panel h2, .state-panel h2, .completion-panel h2 { margin: .3rem 0; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.04em; }
.no-run-panel > .button { align-self: center; }
.benefit-list { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.5rem; margin: 2rem 0 0; padding: 0; list-style: none; color: #c6d5d0; }
.benefit-list li::before { content: "✓"; margin-right: .6rem; color: var(--accent); }
.spinner { width: 34px; height: 34px; margin-bottom: 1.5rem; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.run-status-line { display: flex; justify-content: space-between; align-items: center; }
.run-status-line p:first-child { color: var(--accent); text-transform: uppercase; letter-spacing: .13em; }
.target-card { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: .5rem; border: 1px solid var(--accent); border-radius: var(--radius); padding: clamp(1.3rem, 4vw, 2.2rem); background: linear-gradient(110deg, rgb(19 47 40), rgb(10 24 21)); box-shadow: var(--shadow); }
.target-card .button-row { margin: 0; }
.target-hostname { margin: 0; overflow-wrap: anywhere; font: 700 clamp(1.35rem, 3.5vw, 2.5rem)/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.035em; }
.authorization-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--panel); }
.authorization-card p { margin: .2rem 0; color: var(--muted); line-height: 1.55; }
.scope-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgb(95 224 181 / 13%); color: var(--accent); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0; }
.metric-grid article { padding: 1.35rem; box-shadow: none; }
.metric-value { margin: 0; font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.045em; }
.metric-note { margin: .4rem 0 0; color: var(--muted); font-size: .78rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 1rem; }
.objectives-panel, .flag-panel, .questionnaire, .table-panel { padding: 1.5rem; box-shadow: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: 0; }
.section-heading > span { color: var(--muted); font-size: .85rem; }
.objective-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: 2rem; }
.objective-groups h3 { margin: 0 0 .7rem; font-size: .9rem; }
.objective-groups h3 span { margin-left: .35rem; color: var(--muted); font-size: .72rem; font-weight: 500; }
.objective-list { display: flex; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.objective-list li { min-width: 48px; border: 1px solid var(--line-strong); border-radius: 7px; padding: .55rem; color: var(--muted); text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }
.objective-list li.complete { border-color: var(--accent); background: rgb(95 224 181 / 11%); color: var(--accent); }
.objective-list li.complete::after { content: " ✓"; }
.flag-panel h2 { margin: 0 0 2rem; }
.run-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding: 1.5rem 0; color: var(--muted); }
.completion-panel { padding: clamp(2rem, 6vw, 5rem); text-align: center; }
.completion-mark { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 1.2rem; border-radius: 50%; background: rgb(95 224 181 / 13%); color: var(--accent); font-size: 1.5rem; }
.completion-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2.5rem auto; border: 1px solid var(--line); border-radius: 10px; }
.completion-metrics div { padding: 1.3rem; }
.completion-metrics div + div { border-left: 1px solid var(--line); }
.completion-metrics span, .completion-metrics strong { display: block; }
.completion-metrics span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.completion-metrics strong { margin-top: .45rem; font-size: 1.3rem; }
.radio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-top: .8rem; }
.radio-grid label { border: 1px solid var(--line); border-radius: 8px; padding: .8rem; background: rgb(255 255 255 / 2%); cursor: pointer; }
.radio-grid input { width: auto; margin: 0 .55rem 0 0; accent-color: var(--accent); }
.compact-radios { grid-template-columns: repeat(3, 1fr); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
th:last-child, td:last-child { text-align: right; }
.empty-table { color: var(--muted); text-align: center; }
dialog { width: min(540px, 90vw); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0; background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(2 7 6 / 78%); backdrop-filter: blur(5px); }
.dialog-content { padding: 2rem; }
.dialog-content h2 { margin: .25rem 0 1rem; font-size: 2rem; }
.dialog-content p { color: var(--muted); line-height: 1.6; }
.dialog-boundary { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--text) !important; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 5vw; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer strong { color: var(--text); }
@media (max-width: 850px) {
  .site-header { align-items: flex-start; padding-top: 1rem; padding-bottom: 1rem; }
  nav { flex-wrap: wrap; justify-content: flex-end; }
  .hero-grid, .workspace-grid { grid-template-columns: 1fr; }
  .hero-grid { min-height: auto; }
  .scope-preview { max-width: 520px; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { min-height: auto; }
  .principle-grid h2 { margin-top: 1.5rem; }
  .target-card, .no-run-panel { align-items: stretch; flex-direction: column; }
  .no-run-panel > .button { align-self: flex-start; }
}
@media (max-width: 640px) {
  .site-header { position: relative; display: block; }
  .site-header nav { margin-top: 1rem; justify-content: flex-start; }
  .account-handle { order: -1; width: 100%; padding: 0; border: 0; }
  .view { width: min(92vw, 1180px); padding: 3rem 0; }
  .hero-copy h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .field-grid, .rules-grid, .metric-grid, .objective-groups, .completion-metrics { grid-template-columns: 1fr; }
  .completion-metrics div + div { border-top: 1px solid var(--line); border-left: 0; }
  .dashboard-heading, .action-panel, .target-card, .site-footer { align-items: flex-start; flex-direction: column; }
  .target-card .button-row, .target-card .button { width: 100%; }
  .benefit-list, .radio-grid, .compact-radios { grid-template-columns: 1fr; }
  .run-actions { align-items: flex-end; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
