:root {
  color-scheme: dark;
  --bg: #061014;
  --surface: #0a171b;
  --surface-strong: #102126;
  --surface-soft: #13282c;
  --border: rgba(160, 202, 205, 0.2);
  --border-strong: rgba(160, 202, 205, 0.36);
  --text: #f4f1e8;
  --muted: #aab8bb;
  --subtle: #7d9297;
  --mint: #39dec9;
  --mint-strong: #21c9bb;
  --mint-soft: rgba(57, 222, 201, 0.1);
  --violet: #8d7cf3;
  --violet-soft: rgba(141, 124, 243, 0.1);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  --radius-lg: 20px;
  --radius-md: 13px;
  --radius-sm: 9px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scrollbar-width: none; background: var(--bg); }
html::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 84% 2%, rgba(57, 222, 201, 0.095), transparent 30%),
    radial-gradient(circle at 8% 60%, rgba(141, 124, 243, 0.055), transparent 34%),
    var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(125, 243, 231, 0.55); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; transform: translateY(-180%); padding: 10px 14px; border-radius: 8px; background: var(--mint); color: #001715; font-weight: 850; }
.skip-link:focus { transform: translateY(0); }
.demo-product-return { display: none; }
.is-demo .demo-product-return {
  position: sticky;
  z-index: 55;
  top: 12px;
  width: fit-content;
  max-width: calc(100% - 24px);
  min-height: 48px;
  margin: 12px auto 0 12px;
  padding: 8px 13px;
  border: 1px solid rgba(57, 222, 201, 0.48);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  background: rgba(6, 16, 20, 0.94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.is-demo .demo-product-return:hover { border-color: var(--mint); background: #10282b; transform: translateY(-1px); }
.demo-product-return > i { color: var(--mint); font-size: 19px; }
.demo-product-return span, .demo-product-return small, .demo-product-return strong { display: block; }
.demo-product-return small { color: var(--mint); font-family: ui-monospace, Consolas, monospace; font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.demo-product-return strong { margin-top: 1px; font-size: 12px; line-height: 1.2; }

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 74px;
  padding: 12px clamp(18px, 3vw, 46px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(6, 16, 20, 0.9);
  backdrop-filter: blur(18px);
}
.is-demo .topbar { display: none; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand-mark, .purpose-mark { display: grid; place-items: center; color: #061412; background: var(--mint); box-shadow: 0 0 22px rgba(57, 222, 201, 0.24); }
.brand-mark { width: 45px; height: 45px; flex: 0 0 45px; border-radius: 12px; font-size: 23px; }
.brand-lockup small, .brand-lockup strong { display: block; }
.brand-lockup small { color: var(--mint); font-family: ui-monospace, Consolas, monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-lockup strong { margin-top: 3px; font-size: 18px; letter-spacing: -0.025em; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.price-chip { padding: 8px 12px; border: 1px solid rgba(57, 222, 201, 0.34); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.price-chip strong { color: var(--mint); font-size: 18px; }

.button, .icon-button {
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: var(--surface);
  font-weight: 780;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.button { padding: 10px 15px; }
.button:hover, .icon-button:hover { border-color: var(--mint); background: var(--surface-soft); }
.button:active { transform: translateY(1px); }
.button-primary { border-color: var(--mint); color: #001715; background: var(--mint); }
.button-primary:hover { color: #001715; background: #70ebdd; }
.button-secondary { color: var(--muted); }
.icon-button { width: 42px; padding: 0; font-size: 20px; }

.shell { width: min(1530px, calc(100% - 34px)); margin: 0 auto; padding: 22px 0 60px; }
.eyebrow { margin: 0; color: var(--mint); font-family: ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.workspace-heading {
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(57, 222, 201, 0.06), rgba(10, 23, 27, 0.92) 44%, rgba(141, 124, 243, 0.05));
  box-shadow: var(--shadow);
}
.is-demo .workspace-heading { display: none; }
.workspace-heading h1 { max-width: 25ch; margin: 7px 0 0; font-size: clamp(30px, 3.3vw, 54px); line-height: 1.03; letter-spacing: -0.05em; }
.workspace-heading > div:first-child > p:last-child { max-width: 68ch; margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.workspace-price { min-width: 240px; padding: 18px 22px; border: 1px solid rgba(57, 222, 201, 0.32); border-radius: var(--radius-md); display: grid; background: rgba(57, 222, 201, 0.05); }
.workspace-price span, .workspace-price small { color: var(--muted); }
.workspace-price span { font-family: ui-monospace, Consolas, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.workspace-price strong { margin: 2px 0; color: var(--mint); font-size: 42px; line-height: 1.1; letter-spacing: -0.05em; }
.workspace-price small { font-size: 12px; }

.product-loop {
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: rgba(8, 21, 24, 0.86);
}
.product-loop > a, .product-loop > div { min-width: 0; padding: 8px; border-radius: 11px; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.product-loop > a:hover { background: var(--mint-soft); }
.product-loop > .is-current { border: 1px solid rgba(57, 222, 201, 0.28); background: rgba(57, 222, 201, 0.05); }
.product-loop > i { color: var(--mint); font-size: 22px; }
.loop-number { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid rgba(57, 222, 201, 0.42); border-radius: 11px; display: grid; place-items: center; color: var(--mint); font-size: 20px; font-weight: 850; }
.loop-number--return { color: var(--violet); border-color: rgba(141, 124, 243, 0.42); }
.product-loop small, .product-loop strong, .product-loop em { display: block; font-style: normal; }
.product-loop small { color: var(--mint); font-family: ui-monospace, Consolas, monospace; font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.product-loop strong { margin-top: 2px; font-size: 14px; line-height: 1.25; }
.product-loop em { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.decision-grid { margin-top: 14px; display: grid; grid-template-columns: minmax(260px, 0.72fr) minmax(620px, 1.75fr) minmax(260px, 0.72fr); gap: 14px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(11, 26, 30, 0.98), rgba(7, 17, 21, 0.98)); box-shadow: var(--shadow); }
.evidence-panel, .files-panel { padding: 18px; }
.memo-panel { padding: clamp(18px, 2vw, 27px); }
.panel-heading, .memo-heading, .success-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.memo-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 19px; letter-spacing: -0.025em; }
.count-pill, .decision-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid rgba(57, 222, 201, 0.32); border-radius: 999px; color: var(--mint); font-size: 10px; white-space: nowrap; }
.panel-intro { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.evidence-list, .file-list { margin-top: 15px; display: grid; gap: 8px; }
.evidence-card, .file-list button {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: grid;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: rgba(15, 34, 39, 0.72);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.evidence-card:hover, .file-list button:hover { border-color: rgba(57, 222, 201, 0.55); transform: translateY(-1px); }
.evidence-card { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 10px; }
.evidence-card > i:first-child, .file-list button > i:first-child { display: grid; place-items: center; color: var(--mint); background: var(--mint-soft); }
.evidence-card > i:first-child { width: 34px; height: 34px; border-radius: 9px; font-size: 18px; }
.evidence-card span, .file-list button span { min-width: 0; }
.evidence-card strong, .evidence-card small, .file-list strong, .file-list small { display: block; }
.evidence-card strong { font-size: 12.5px; line-height: 1.3; }
.evidence-card small, .file-list small { margin-top: 2px; color: var(--subtle); font-size: 10.5px; line-height: 1.3; }
.status-icon { color: var(--mint); }
.evidence-card.is-selected { border-color: var(--mint); background: rgba(57, 222, 201, 0.08); }
.evidence-detail { margin-top: 12px; padding: 12px; border-left: 2px solid var(--violet); background: var(--violet-soft); }
.evidence-detail strong { font-size: 12px; }
.evidence-detail p { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.panel-link { margin-top: 13px; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--mint); font-size: 12px; text-decoration: none; }
.panel-link:hover { border-color: var(--mint); }

.memo-heading { align-items: center; }
.memo-panel > h2 { margin: 9px 0 0; font-size: clamp(25px, 2.4vw, 36px); line-height: 1.08; letter-spacing: -0.04em; }
.decision-context { max-width: 72ch; margin: 10px 0 0; color: var(--muted); font-size: 13.5px; }
.info-button { min-height: 29px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgba(11, 25, 29, 0.8); font-size: 10px; cursor: pointer; white-space: nowrap; }
.info-button:hover, .info-button[aria-expanded="true"] { border-color: var(--mint); color: var(--mint); }
.workspace-explainer { margin: 11px 0 0; padding: 11px 12px; border: 1px solid rgba(141, 124, 243, 0.32); border-radius: 10px; color: var(--muted); background: var(--violet-soft); font-size: 11.5px; line-height: 1.5; }
.workspace-explainer strong { color: var(--text); }
.option-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.option-card {
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: rgba(10, 24, 28, 0.9);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.option-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.option-card.is-selected { border-color: var(--mint); background: linear-gradient(180deg, rgba(57, 222, 201, 0.13), rgba(12, 33, 36, 0.94)); box-shadow: inset 0 0 0 1px rgba(57, 222, 201, 0.18), 0 16px 40px rgba(0, 0, 0, 0.18); }
.recommendation { position: absolute; top: -10px; left: 12px; padding: 4px 7px; border-radius: 999px; color: #001715; background: var(--mint); font-size: 8.5px; font-weight: 850; letter-spacing: 0.03em; }
.option-name { display: block; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.option-name strong, .option-name small { display: block; }
.option-name strong { font-size: 14px; }
.option-name small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.option-card dl { margin: 10px 0 0; display: grid; gap: 7px; }
.option-card dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; }
.option-card dt { color: var(--subtle); font-size: 10.5px; }
.option-card dd { margin: 0; color: var(--text); font-size: 10.5px; font-weight: 720; text-align: right; }
.decision-output { margin-top: 12px; padding: 12px 15px; border-radius: 11px; display: flex; align-items: center; gap: 11px; color: #001715; background: var(--mint); }
.decision-output > i { font-size: 24px; }
.decision-output small, .decision-output strong { display: block; }
.decision-output small { font-size: 9px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.decision-output strong { margin-top: 1px; font-size: 14px; }
.memo-delegation { margin-top: 12px; padding: 14px; border: 1px solid rgba(141, 124, 243, 0.42); border-radius: 12px; background: linear-gradient(145deg, rgba(141, 124, 243, 0.1), rgba(7, 18, 22, 0.86) 58%); }
.memo-delegation > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.memo-delegation h3 { margin: 4px 0 0; font-size: 15px; line-height: 1.3; }
.memo-delegation header p:last-child { max-width: 70ch; margin: 5px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.inspect-packets { min-height: 34px; flex: 0 0 auto; padding: 7px 10px; border: 1px solid rgba(57, 222, 201, 0.42); border-radius: 9px; display: inline-flex; align-items: center; gap: 6px; color: var(--mint); background: rgba(57, 222, 201, 0.06); font-size: 10px; font-weight: 760; cursor: pointer; }
.inspect-packets:hover { border-color: var(--mint); background: var(--mint-soft); }
.memo-delegation-grid { margin-top: 11px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(210px, 0.9fr); gap: 10px; }
.memo-task-list { display: grid; gap: 6px; }
.memo-task-list button { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid var(--border); border-radius: 9px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; color: var(--text); background: rgba(7, 18, 22, 0.78); text-align: left; cursor: pointer; }
.memo-task-list button:hover { border-color: var(--mint); background: rgba(57, 222, 201, 0.05); }
.memo-task-list button > i { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--mint); background: var(--mint-soft); font-size: 15px; }
.memo-task-list strong, .memo-task-list small { display: block; }
.memo-task-list strong { font-size: 10.5px; }
.memo-task-list small { margin-top: 1px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.memo-task-list em { padding: 4px 6px; border-radius: 999px; color: var(--mint); background: var(--mint-soft); font-size: 8px; font-style: normal; white-space: nowrap; }
.memo-cost-boundary { padding: 10px; border: 1px solid rgba(251, 191, 36, 0.34); border-radius: 10px; background: rgba(251, 191, 36, 0.045); }
.cost-boundary-heading { display: flex; align-items: center; gap: 8px; }
.cost-boundary-heading > i { color: #f9d889; font-size: 21px; }
.cost-boundary-heading small, .cost-boundary-heading strong { display: block; }
.cost-boundary-heading small { color: #f9d889; font-size: 8px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.cost-boundary-heading strong { margin-top: 1px; font-size: 10.5px; }
.memo-cost-boundary dl { margin: 8px 0 0; }
.memo-cost-boundary dl div { padding: 6px 0; border-top: 1px solid rgba(251, 191, 36, 0.16); display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 8px; }
.memo-cost-boundary dt { color: var(--subtle); font-size: 8.5px; }
.memo-cost-boundary dd { margin: 0; color: var(--text); font-size: 8.5px; font-weight: 720; text-align: right; }
.memo-cost-boundary > p { margin: 7px 0 0; padding-top: 7px; border-top: 1px solid rgba(251, 191, 36, 0.16); display: flex; gap: 6px; color: #e8d7ac; font-size: 8.5px; line-height: 1.4; }
.memo-cost-boundary > p i { flex: 0 0 auto; margin-top: 1px; color: #f9d889; }
.success-section { margin-top: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: rgba(7, 18, 22, 0.8); }
.success-heading { align-items: center; }
.success-heading h3 { margin: 0; font-size: 13px; }
.success-heading button { border: 0; color: var(--mint); background: transparent; font-size: 10.5px; cursor: pointer; }
.gate-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gate-grid article { padding: 10px; border: 1px solid rgba(57, 222, 201, 0.32); border-radius: 10px; display: flex; align-items: center; gap: 9px; background: rgba(57, 222, 201, 0.04); }
.gate-grid i { color: var(--mint); font-size: 22px; }
.gate-grid span, .gate-grid strong { display: block; }
.gate-grid span { color: var(--muted); font-size: 9.5px; }
.gate-grid strong { margin-top: 2px; color: var(--text); font-size: 12px; }
.gate-explainer { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.return-strip { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 11px; text-align: center; }
.return-strip i, .return-strip a { color: var(--mint); }
.return-strip a { font-weight: 760; }

.file-list button { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 9px; }
.file-list button > i:first-child { width: 34px; height: 34px; border-radius: 8px; font-size: 18px; }
.file-list button > i:last-child { color: var(--mint); }
.file-list strong { font-size: 12px; }
.files-action { width: 100%; margin-top: 13px; color: var(--mint); border-color: rgba(57, 222, 201, 0.38); }

.product-purpose, .harness-panel, .relationship-path { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(8, 21, 24, 0.86); }
.product-purpose { padding: 18px 20px; display: grid; grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr); align-items: center; gap: 24px; }
.purpose-title { display: flex; align-items: center; gap: 14px; }
.purpose-mark { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 13px; font-size: 23px; }
.purpose-title h2 { margin: 4px 0 0; max-width: 34ch; font-size: 19px; line-height: 1.25; letter-spacing: -0.025em; }
.product-purpose ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.product-purpose li { padding: 11px; border-left: 1px solid var(--border); display: flex; align-items: flex-start; gap: 9px; }
.product-purpose li > span { width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--mint); border-radius: 50%; display: grid; place-items: center; color: var(--mint); font-weight: 850; }
.product-purpose strong, .product-purpose small { display: block; }
.product-purpose strong { font-size: 12px; }
.product-purpose small { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.harness-panel { padding: clamp(18px, 2.2vw, 26px); }
.harness-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.harness-heading h2 { max-width: 31ch; margin: 6px 0 0; font-size: clamp(21px, 2.3vw, 31px); line-height: 1.12; letter-spacing: -0.035em; }
.harness-heading p:last-child { max-width: 70ch; margin: 9px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.harness-boundary { max-width: 280px; padding: 10px 12px; border: 1px solid rgba(251, 191, 36, 0.38); border-radius: 10px; display: flex; align-items: center; gap: 8px; color: #f9d889; background: rgba(251, 191, 36, 0.06); font-size: 11px; line-height: 1.35; }
.harness-boundary i { flex: 0 0 auto; font-size: 18px; }
.harness-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.14fr); gap: 12px; }
.harness-roles { display: grid; gap: 8px; }
.harness-role { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 11px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; color: var(--text); background: rgba(7, 18, 22, 0.76); font: inherit; text-align: left; cursor: pointer; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.harness-role:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.harness-role.is-selected { border-color: var(--mint); background: rgba(57, 222, 201, 0.08); }
.harness-role > i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--mint); background: var(--mint-soft); font-size: 20px; }
.harness-role strong, .harness-role small { display: block; }
.harness-role strong { font-size: 12.5px; }
.harness-role small { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.harness-role em { padding: 5px 7px; border-radius: 999px; color: var(--mint); background: var(--mint-soft); font-size: 9px; font-style: normal; white-space: nowrap; }
.task-packet { min-width: 0; overflow: hidden; border: 1px solid rgba(141, 124, 243, 0.4); border-radius: 12px; background: rgba(10, 18, 30, 0.88); }
.task-packet-heading { padding: 11px 13px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.task-packet-heading span { display: inline-flex; align-items: center; gap: 7px; color: var(--violet); font-family: ui-monospace, Consolas, monospace; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.task-packet-heading strong { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; text-align: right; }
.task-packet dl { margin: 0; padding: 4px 13px; }
.task-packet dl div { padding: 8px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.task-packet dt { color: var(--subtle); font-size: 10px; }
.task-packet dd { margin: 0; color: var(--text); font-size: 10.5px; font-weight: 700; }
.founder-gate { margin: 10px 13px 13px; padding: 10px 11px; border: 1px solid rgba(57, 222, 201, 0.3); border-radius: 10px; display: flex; align-items: center; gap: 10px; background: rgba(57, 222, 201, 0.05); }
.founder-gate > i { color: var(--mint); font-size: 23px; }
.founder-gate strong, .founder-gate small { display: block; }
.founder-gate strong { font-size: 11px; }
.founder-gate small { margin-top: 2px; color: var(--muted); font-size: 9.5px; line-height: 1.35; }
.harness-route { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; background: rgba(7, 18, 22, 0.72); }
.harness-route > span { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 10px; }
.harness-route > span i, .harness-route > i { color: var(--mint); font-size: 17px; }
.harness-route > i { text-align: center; }
.harness-route strong { line-height: 1.25; }
.relationship-path { padding: 20px; }
.relationship-path > div { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; }
.relationship-path > div .eyebrow { grid-column: 1 / -1; }
.relationship-path h2 { margin: 5px 0 0; font-size: 21px; }
.relationship-path > div > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.relationship-path ol { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; }
.relationship-path li { min-width: 0; }
.relationship-path li:nth-child(odd) { padding: 10px; border: 1px solid var(--border); border-radius: 11px; display: flex; align-items: center; gap: 9px; background: rgba(10, 27, 30, 0.72); }
.relationship-path li:nth-child(even) { color: var(--mint); font-size: 20px; text-align: center; }
.relationship-path li:nth-child(odd) > i { color: var(--mint); font-size: 21px; }
.relationship-path strong, .relationship-path small { display: block; }
.relationship-path strong { font-size: 11px; }
.relationship-path small { color: var(--muted); font-size: 9.5px; }

.file-dialog { width: min(780px, calc(100% - 28px)); max-height: calc(100vh - 34px); padding: 0; border: 1px solid var(--border-strong); border-radius: 18px; color: var(--text); background: #09161a; box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6); }
.file-dialog::backdrop { background: rgba(2, 8, 10, 0.78); backdrop-filter: blur(8px); }
.dialog-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100vh - 34px); }
.dialog-shell > header, .dialog-shell > footer { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dialog-shell > header { border-bottom: 1px solid var(--border); }
.dialog-shell > header h2 { margin: 4px 0 0; font-size: 22px; }
.dialog-content { overflow: auto; padding: 18px; }
.dialog-content h3 { margin: 0; font-size: 17px; }
.dialog-content > p { margin: 8px 0 0; color: var(--muted); }
.dialog-content ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.dialog-content li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; display: flex; gap: 9px; color: var(--muted); }
.dialog-content li i { margin-top: 3px; color: var(--mint); }
.dialog-shell > footer { border-top: 1px solid var(--border); }
.dialog-shell > footer > span { color: var(--muted); font-size: 11px; }
.dialog-shell > footer > span i { color: var(--mint); }
.toast { position: fixed; z-index: 90; right: 18px; bottom: 18px; max-width: min(360px, calc(100% - 36px)); padding: 11px 14px; border: 1px solid var(--mint); border-radius: 10px; color: var(--text); background: #0d2628; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1250px) {
  .decision-grid { grid-template-columns: minmax(250px, 0.72fr) minmax(560px, 1.58fr); }
  .files-panel { grid-column: 1 / -1; }
  .file-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .files-action { width: auto; }
}

@media (max-width: 930px) {
  .topbar { align-items: flex-start; }
  .header-actions { flex-wrap: wrap; }
  .header-actions .button-secondary { display: none; }
  .workspace-heading { grid-template-columns: 1fr; }
  .workspace-price { min-width: 0; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 10px; }
  .workspace-price strong { font-size: 32px; }
  .product-loop { grid-template-columns: 1fr; }
  .product-loop > i { transform: rotate(90deg); justify-self: center; }
  .decision-grid { grid-template-columns: 1fr; }
  .harness-grid { grid-template-columns: 1fr; }
  .files-panel { grid-column: auto; }
  .evidence-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .file-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-purpose { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  body { font-size: 14px; }
  .is-demo .demo-product-return { top: 8px; max-width: calc(100% - 16px); margin: 8px auto 0 8px; }
  .demo-product-return strong { font-size: 11px; }
  .topbar { position: static; flex-direction: column; }
  .header-actions { width: 100%; }
  .price-chip { flex: 1 1 auto; }
  .header-actions .button-primary { flex: 1 1 190px; }
  .shell { width: min(100% - 20px, 680px); padding-top: 10px; }
  .workspace-heading { padding: 20px; }
  .workspace-heading h1 { font-size: 34px; }
  .workspace-price { grid-template-columns: 1fr; gap: 0; }
  .product-loop { margin-top: 10px; }
  .decision-grid { margin-top: 10px; gap: 10px; }
  .evidence-panel, .files-panel, .memo-panel { padding: 15px; }
  .evidence-list, .file-list { grid-template-columns: 1fr; }
  .memo-panel > h2 { font-size: 27px; }
  .memo-heading { align-items: flex-start; flex-direction: column; }
  .memo-actions { justify-content: flex-start; flex-wrap: wrap; }
  .option-grid { grid-template-columns: 1fr; gap: 11px; }
  .option-card { padding: 14px; }
  .option-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .option-card dl > div { display: block; }
  .option-card dd { margin-top: 2px; text-align: left; }
  .gate-grid { grid-template-columns: 1fr; }
  .memo-delegation > header { flex-direction: column; }
  .memo-delegation-grid { grid-template-columns: 1fr; }
  .inspect-packets { width: 100%; justify-content: center; }
  .memo-task-list button { grid-template-columns: 28px minmax(0, 1fr); }
  .memo-task-list em { grid-column: 2; justify-self: start; }
  .product-purpose { padding: 16px; }
  .product-purpose ol { grid-template-columns: 1fr; }
  .product-purpose li { border-left: 0; border-top: 1px solid var(--border); }
  .relationship-path > div { display: block; }
  .relationship-path ol { grid-template-columns: 1fr; }
  .relationship-path li:nth-child(even) { transform: rotate(90deg); }
  .harness-heading { display: block; }
  .harness-boundary { max-width: none; margin-top: 12px; }
  .harness-role { grid-template-columns: 36px minmax(0, 1fr); }
  .harness-role em { grid-column: 2; justify-self: start; }
  .task-packet-heading { align-items: flex-start; flex-direction: column; }
  .task-packet-heading strong { text-align: left; }
  .task-packet dl div { grid-template-columns: 1fr; gap: 3px; }
  .harness-route { grid-template-columns: 1fr; }
  .harness-route > i { transform: rotate(90deg); }
  .dialog-shell > footer { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
