:root {
  color-scheme: dark;
  --canvas: #020812;
  --background: #041225;
  --surface: #081d35;
  --surface-strong: #0b294a;
  --surface-raised: #103456;
  --border: #234a70;
  --border-soft: rgba(128, 170, 216, 0.17);
  --action: #397cf0;
  --action-soft: #a8c9ff;
  --safe: #5ed6a0;
  --warning: #f2b766;
  --danger: #ef706a;
  --text: #f5f8fc;
  --text-secondary: #9aadc1;
  --text-tertiary: #758ba2;
  --font-body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-number: "DIN Alternate", "Avenir Next Condensed", "PingFang SC", sans-serif;
  --radius-control: 12px;
  --radius-card: 17px;
  --radius-feature: 23px;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --shadow-action: 0 14px 35px rgba(57, 124, 240, 0.28);
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 70% -20%, rgba(39, 92, 151, 0.22), transparent 42%),
    linear-gradient(135deg, #020812 0%, #041225 62%, #06182a 100%);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 2px solid var(--action-soft);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: -80px;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--text);
  color: var(--canvas);
}
.skip-link:focus { top: 16px; }
.sr-only, .skip-link:not(:focus) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.boot-screen, .noscript {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  color: var(--text-secondary);
}
.boot-failure {
  max-width: 520px;
  margin: 0 auto;
  padding: 32px;
  text-align: center;
}
.boot-failure h1 { margin: 0; color: var(--text); font-size: 24px; }
.boot-failure p { margin: 0; }
.boot-failure a {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--action-soft);
  text-decoration: none;
}
.boot-failure-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(239, 112, 106, 0.45);
  border-radius: 50%;
  color: var(--danger);
  font-size: 20px;
}

.brand-logo {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(91, 153, 238, 0.28);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 94, 255, 0.16);
}

.access-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 0.9fr) minmax(560px, 1.1fr);
  overflow: hidden;
}
.access-stage::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.access-stage.compact { grid-template-columns: 1fr; }
.access-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 76px) clamp(28px, 6vw, 92px) 34px;
  background: rgba(2, 8, 18, 0.78);
  border-right: 1px solid var(--border-soft);
}
.access-brand, .product-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.access-brand strong, .product-brand strong { display: block; font-size: 18px; letter-spacing: 0.04em; }
.access-brand small, .product-brand small { display: block; margin-top: 1px; color: var(--text-tertiary); font-size: 9px; letter-spacing: 0.19em; }
.invite-copy { margin: clamp(48px, 8vh, 96px) 0 34px; max-width: 620px; }
.micro-label, .eyebrow {
  color: var(--action-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.invite-copy h1, .invitation-required h1 {
  max-width: 660px;
  margin: 16px 0 20px;
  font-family: var(--font-number);
  font-size: clamp(42px, 5.1vw, 76px);
  line-height: 0.99;
  letter-spacing: -0.045em;
}
.invite-copy p, .invitation-required > p {
  max-width: 590px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}
.access-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 30px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--border-soft);
}
.access-facts div { display: grid; gap: 3px; padding: 17px 16px; background: rgba(8, 29, 53, 0.78); }
.access-facts strong { color: var(--safe); font-family: var(--font-number); font-size: 12px; }
.access-facts span { font-weight: 700; }
.access-facts small { color: var(--text-tertiary); font-size: 10px; }
.consent-form { display: grid; gap: 10px; max-width: 660px; }
.consent-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px 15px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-control);
  cursor: pointer;
  background: rgba(8, 29, 53, 0.52);
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.consent-row:hover { border-color: var(--border); background: rgba(11, 41, 74, 0.68); }
.consent-row input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--action); }
.consent-row strong { display: block; font-size: 12px; }
.consent-row small { display: block; margin-top: 2px; color: var(--text-tertiary); font-size: 10px; line-height: 1.55; }
.form-error { min-height: 20px; color: var(--danger); font-size: 11px; }
.primary-action, .secondary-action, .quiet-action {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms var(--ease), background 180ms var(--ease), opacity 180ms var(--ease);
}
.primary-action {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 18px;
  border-radius: var(--radius-control);
  background: var(--action);
  box-shadow: var(--shadow-action);
  color: white;
  font-weight: 700;
}
.primary-action:hover:not(:disabled) { transform: translateY(-2px); background: #4789fa; }
.primary-action:disabled { cursor: wait; opacity: 0.6; }
.secondary-action {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: rgba(8, 29, 53, 0.72);
}
.access-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: auto;
  padding-top: 32px;
  color: var(--text-tertiary);
  font-size: 9px;
}
.access-footer a { margin-left: auto; text-decoration: none; opacity: 0.75; }
.access-visual { position: relative; min-height: 100vh; overflow: hidden; background: #05152a; }
.signal-grid {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image: linear-gradient(rgba(75, 127, 180, 0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(75, 127, 180, 0.13) 1px, transparent 1px);
  background-size: 58px 58px;
  transform: perspective(600px) rotateX(56deg) scale(1.5) translateY(15%);
  transform-origin: center bottom;
}
.decision-orbit {
  position: absolute;
  width: min(52vw, 650px);
  aspect-ratio: 1;
  left: 50%; top: 50%;
  transform: translate(-44%, -51%);
  border: 1px solid rgba(94, 214, 160, 0.22);
  border-radius: 50%;
  box-shadow: inset 0 0 100px rgba(57, 124, 240, 0.06);
}
.decision-orbit::before, .decision-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(57, 124, 240, 0.2);
  border-radius: 50%;
}
.decision-orbit::before { inset: 15%; }
.decision-orbit::after { inset: 35%; background: rgba(57, 124, 240, 0.07); }
.decision-orbit span { position: absolute; color: var(--text-tertiary); font-size: 9px; letter-spacing: 0.2em; }
.decision-orbit span:nth-child(1) { left: 7%; top: 43%; }
.decision-orbit span:nth-child(2) { right: 4%; top: 24%; }
.decision-orbit span:nth-child(3) { right: 16%; bottom: 13%; color: var(--safe); }
.visual-card {
  position: absolute;
  z-index: 2;
  padding: 20px;
  border: 1px solid rgba(128, 170, 216, 0.22);
  border-radius: var(--radius-card);
  background: rgba(8, 29, 53, 0.91);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}
.visual-card small { color: var(--safe); font-size: 9px; letter-spacing: 0.12em; }
.visual-card strong { display: block; margin-top: 9px; font-size: 22px; }
.visual-card p { max-width: 290px; margin: 8px 0 0; color: var(--text-secondary); font-size: 12px; }
.visual-card-main { width: min(38vw, 410px); left: 17%; top: 35%; }
.visual-card-metric { right: 8%; top: 18%; width: 190px; }
.visual-card-metric strong { font-family: var(--font-number); font-size: 42px; }
.visual-card-metric em { font-size: 13px; font-style: normal; color: var(--text-secondary); }
.visual-axis { position: absolute; z-index: 2; left: 12%; right: 9%; bottom: 12%; display: flex; align-items: center; gap: 12px; color: var(--text-tertiary); font-size: 9px; letter-spacing: 0.18em; }
.visual-axis i { height: 1px; flex: 1; background: linear-gradient(90deg, var(--border), var(--action), var(--safe)); }
.invitation-required { justify-content: center; border-right: 0; }
.invitation-required .access-brand { position: absolute; left: clamp(28px, 6vw, 92px); top: clamp(32px, 5vw, 76px); }
.invitation-required .micro-label { margin-top: auto; }
.invitation-required .secondary-action { margin-top: 30px; }
.invitation-required .access-footer { margin-top: auto; }

.product-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 286px;
}
.product-shell.route-record { grid-template-columns: 248px minmax(0, 1fr); }
.side-rail, .context-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 30px 20px;
  border-color: var(--border-soft);
  background: rgba(2, 8, 18, 0.74);
  backdrop-filter: blur(20px);
}
.side-rail { display: flex; flex-direction: column; border-right: 1px solid var(--border-soft); }
.context-rail { border-left: 1px solid var(--border-soft); }
.product-brand.compact .brand-logo { width: 34px; height: 34px; border-radius: 11px; }
.desktop-nav { display: grid; gap: 8px; margin-top: 54px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: color 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), transform 180ms var(--ease);
}
.nav-icon { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--border-soft); border-radius: 12px; color: var(--text-tertiary); background: rgba(8, 29, 53, 0.44); }
.nav-icon svg { width: 19px; height: 19px; }
.nav-copy { min-width: 0; display: grid; gap: 2px; }
.nav-copy strong { color: inherit; font-size: 13px; }
.nav-copy small { color: var(--text-tertiary); font-size: 9px; font-weight: 500; }
.nav-item:hover { color: var(--text); background: rgba(8, 29, 53, 0.56); transform: translateX(2px); }
.nav-item.active { color: var(--text); border-color: rgba(72, 133, 202, 0.3); background: linear-gradient(100deg, rgba(14, 49, 83, 0.94), rgba(8, 29, 53, 0.82)); }
.nav-item.active::before { content: ""; position: absolute; left: -21px; width: 3px; height: 28px; border-radius: 0 3px 3px 0; background: var(--action); box-shadow: 0 0 18px rgba(57, 124, 240, 0.58); }
.nav-item.active .nav-icon { color: var(--action-soft); border-color: rgba(86, 151, 229, 0.45); background: rgba(57, 124, 240, 0.15); }
.nav-item.primary .nav-icon { color: white; border-color: transparent; background: var(--action); box-shadow: 0 8px 22px rgba(57, 124, 240, 0.22); }
.nav-item.primary.active .nav-icon { background: var(--action); }
.rail-context { margin-top: auto; padding: 15px; border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: rgba(8, 29, 53, 0.55); }
.demo-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--safe); font-size: 10px; font-weight: 700; }
.demo-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 4px rgba(94, 214, 160, 0.08); }
.rail-context p { margin: 9px 0 0; color: var(--text-tertiary); font-size: 10px; line-height: 1.6; }
.deerflow-mark { margin-top: 14px; color: var(--text-tertiary); font-size: 9px; text-decoration: none; opacity: 0.7; }
.deerflow-mark:hover { opacity: 1; }
.workspace { min-width: 0; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: flex-end; padding: 0 clamp(22px, 4vw, 54px); border-bottom: 1px solid var(--border-soft); }
.mobile-brand { display: none; }
.topbar-status { display: flex; align-items: center; gap: 12px; }
.ai-indicator { padding-left: 12px; border-left: 1px solid var(--border-soft); color: var(--text-tertiary); font-size: 10px; }
.main-content { width: min(1360px, 100%); margin: 0 auto; padding: 48px clamp(28px, 3.5vw, 58px) 86px; }
.route-content-record { width: 100%; max-width: none; margin: 0; padding: 42px clamp(28px, 3vw, 54px) 52px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-bottom: 28px; }
.page-head h1 { margin: 8px 0 0; font-family: var(--font-number); font-size: clamp(32px, 4.2vw, 56px); line-height: 1; letter-spacing: -0.04em; }
.quiet-action { min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); font-size: 11px; }
.quiet-action:hover { transform: translateY(-1px); background: var(--surface-strong); }
.signal-hero {
  position: relative;
  min-height: 255px;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.85fr;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-feature);
  background:
    linear-gradient(105deg, rgba(16, 52, 86, 0.72), rgba(8, 29, 53, 0.92)),
    var(--surface);
  overflow: hidden;
}
.signal-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: -120px; top: -150px; border: 1px solid rgba(94, 214, 160, 0.14); border-radius: 50%; box-shadow: 0 0 0 44px rgba(57, 124, 240, 0.035), 0 0 0 88px rgba(57, 124, 240, 0.025); }
.signal-copy { position: relative; z-index: 1; }
.status-kicker { display: inline-flex; padding: 5px 9px; border-radius: 8px; background: rgba(117, 139, 162, 0.12); font-size: 9px; font-weight: 700; }
.tone-safe, .tone-achievement { color: var(--safe); background: rgba(94, 214, 160, 0.1); }
.tone-warning { color: var(--warning); background: rgba(242, 183, 102, 0.1); }
.tone-danger { color: var(--danger); background: rgba(239, 112, 106, 0.1); }
.tone-info { color: var(--action-soft); background: rgba(57, 124, 240, 0.12); }
.signal-copy h2 { max-width: 430px; margin: 14px 0 10px; font-size: clamp(23px, 2.7vw, 36px); line-height: 1.18; letter-spacing: -0.025em; }
.signal-copy p { max-width: 510px; margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.weight-readout { position: relative; z-index: 1; padding-left: 22px; border-left: 1px solid var(--border-soft); }
.weight-readout > span, .weight-readout small { display: block; color: var(--text-tertiary); font-size: 10px; }
.weight-readout strong { display: block; margin: 8px 0; font-family: var(--font-number); font-size: 48px; line-height: 1; }
.weight-readout em { margin-left: 5px; color: var(--text-secondary); font-size: 12px; font-style: normal; }
.progress-ring { position: relative; z-index: 1; text-align: center; }
.progress-ring > div { width: 120px; aspect-ratio: 1; display: grid; place-content: center; margin: 0 auto 8px; border-radius: 50%; background: radial-gradient(circle at center, var(--surface-strong) 57%, transparent 58%), conic-gradient(var(--safe) var(--progress), rgba(128, 170, 216, 0.13) 0); }
.progress-ring strong { font-family: var(--font-number); font-size: 25px; }
.progress-ring span, .progress-ring small { display: block; color: var(--text-tertiary); font-size: 9px; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.compact-metric { position: relative; min-width: 0; padding: 19px 19px 17px; border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: linear-gradient(145deg, rgba(11, 41, 74, 0.92), rgba(8, 29, 53, 0.94)); overflow: hidden; }
.compact-metric header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.compact-metric header span { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.compact-metric header small { color: var(--action-soft); font-family: var(--font-number); font-size: 11px; }
.metric-value { display: flex; align-items: baseline; gap: 6px; margin-top: 13px; }
.compact-metric strong { font-family: var(--font-number); font-size: 32px; line-height: 1; }
.compact-metric em { color: var(--text-secondary); font-size: 11px; font-style: normal; font-weight: 600; }
.metric-target { margin-top: 7px; color: var(--text-tertiary); font-size: 10px; }
.compact-metric > i { display: block; height: 5px; margin-top: 15px; border-radius: 5px; background: rgba(128, 170, 216, 0.12); overflow: hidden; }
.compact-metric b { display: block; height: 100%; border-radius: inherit; background: var(--action); }
.compact-metric:nth-child(2) b { background: var(--safe); }
.compact-metric:nth-child(3) b { background: #58a6ff; }
.compact-metric:nth-child(4) b { background: var(--warning); }
.content-grid, .insight-grid, .profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { padding: 22px; border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: rgba(8, 29, 53, 0.78); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.panel-head h2 { margin: 5px 0 0; font-size: 17px; }
.panel-head > span { color: var(--text-tertiary); font-size: 10px; }
.coverage-chip, .confidence-chip, .source-chip, .period-label { padding: 5px 9px; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--action-soft); font-size: 9px; }
.panel-intro { margin: 9px 0 16px; color: var(--text-tertiary); font-size: 10px; }
.agenda-list { display: grid; gap: 7px; }
.agenda-item { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 53px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius-control); background: rgba(4, 18, 37, 0.6); text-align: left; }
.agenda-item[data-route] { cursor: pointer; }
.agenda-item[data-route]:hover { border-color: var(--border); }
.agenda-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-strong); color: var(--action-soft); font-size: 11px; }
.agenda-item strong, .agenda-item small { display: block; }
.agenda-item strong { font-size: 11px; }
.agenda-item small { margin-top: 2px; color: var(--text-tertiary); font-size: 9px; }
.agenda-item i { color: var(--text-tertiary); font-size: 9px; font-style: normal; }
.agenda-item.status-done i { color: var(--safe); }
.meal-list { margin-top: 14px; }
.meal-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.meal-row:first-child { border-top: 0; }
.meal-time { color: var(--action-soft); font-size: 9px; }
.meal-row strong, .meal-row small { display: block; }
.meal-row strong { font-size: 11px; }
.meal-row small { color: var(--text-tertiary); font-size: 9px; }
.meal-row em { color: var(--text-secondary); font-family: var(--font-number); font-size: 11px; font-style: normal; }
.text-link { border: 0; background: transparent; color: var(--action-soft); cursor: pointer; font-size: 9px; }
.empty-inline { padding: 20px 0; color: var(--text-tertiary); font-size: 10px; }
.context-top { padding-bottom: 22px; border-bottom: 1px solid var(--border-soft); }
.context-top strong { display: block; margin-top: 7px; font-size: 18px; }
.context-card { display: grid; gap: 5px; margin-top: 18px; padding: 15px; border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: rgba(8, 29, 53, 0.55); }
.context-card span { color: var(--text-tertiary); font-size: 9px; }
.context-card strong { font-size: 12px; }
.context-card small { color: var(--text-tertiary); font-size: 9px; line-height: 1.55; word-break: break-word; }
.model-card strong { color: var(--action-soft); }
.boundary-note { margin-top: auto; padding: 15px 4px; color: var(--text-tertiary); }
.boundary-note strong { color: var(--warning); font-size: 10px; }
.boundary-note p { font-size: 9px; line-height: 1.6; }
.context-rail { display: flex; flex-direction: column; }
.route-record .context-rail { display: none; }
.mobile-nav { display: none; }

.record-layout { min-height: calc(100vh - 168px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 360px); gap: 24px; align-items: stretch; }
.record-stage { min-width: 0; display: flex; flex-direction: column; }
.assistant-heading { display: flex; gap: 18px; align-items: start; margin-bottom: 22px; }
.assistant-heading h1 { margin: 7px 0 6px; font-family: var(--font-number); font-size: clamp(29px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -0.035em; }
.assistant-heading p { margin: 0; color: var(--text-tertiary); font-size: 11px; }
.assistant-symbol { flex: 0 0 auto; width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); overflow: hidden; }
.assistant-symbol img { width: 100%; height: 100%; object-fit: cover; }
.conversation-panel { min-height: clamp(540px, calc(100vh - 330px), 760px); flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--border-soft); border-radius: var(--radius-feature) var(--radius-feature) 0 0; background: rgba(4, 18, 37, 0.7); }
.assistant-message, .user-message { max-width: 86%; padding: 15px 17px; border-radius: var(--radius-card); }
.assistant-message { align-self: flex-start; border: 1px solid var(--border-soft); background: var(--surface); }
.assistant-message > span { color: var(--safe); font-size: 9px; font-weight: 700; }
.assistant-message p, .user-message p { margin: 6px 0 0; white-space: pre-wrap; font-size: 12px; line-height: 1.7; }
.user-message { align-self: flex-end; background: var(--action); }
.user-message p { margin: 0; color: #fff; }
.history-message { animation: reveal 260ms var(--ease) both; }
.pending-message { box-shadow: 0 10px 28px rgba(57, 124, 240, 0.2); }
.rich-text { color: var(--text-secondary); font-size: 12px; line-height: 1.75; }
.rich-text p { margin: 7px 0 0; white-space: normal; }
.rich-text p:first-child { margin-top: 6px; }
.rich-text strong { color: var(--text); font-weight: 700; }
.rich-text code { padding: 1px 5px; border-radius: 5px; background: rgba(57, 124, 240, 0.13); color: var(--action-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.rich-text ol, .rich-text ul { display: grid; gap: 7px; margin: 10px 0 0; padding-left: 21px; }
.rich-text li { padding-left: 2px; }
.thinking-message { min-width: 260px; }
.thinking-line { display: flex; align-items: center; gap: 11px; margin-top: 9px; color: var(--text-secondary); font-size: 11px; }
.thinking-dots { display: inline-flex; align-items: center; gap: 4px; }
.thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--action-soft); animation: thinking-pulse 1.1s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: 130ms; background: var(--safe); }
.thinking-dots i:nth-child(3) { animation-delay: 260ms; background: var(--warning); }
.conversation-latest { width: 1px; height: 1px; flex: 0 0 auto; }
.result-message { min-width: 70%; }
.result-head { display: flex; justify-content: space-between; gap: 12px; color: var(--text-tertiary); font-size: 9px; }
.ai-label { color: var(--action-soft) !important; }
.preview-list { display: grid; gap: 6px; margin: 13px 0 0; padding: 12px 12px 12px 28px; border-radius: var(--radius-control); background: rgba(4, 18, 37, 0.62); color: var(--text-secondary); font-size: 10px; }
.result-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.compact-action { width: max-content; min-height: 38px; padding: 0 13px; font-size: 10px; }
.result-complete { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-soft); color: var(--text-tertiary); font-size: 9px; }
.starter-block { display: grid; gap: 7px; width: min(100%, 460px); margin: auto 0 0; }
.starter-block > span { color: var(--text-tertiary); font-size: 9px; }
.starter-block button { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); background: rgba(8, 29, 53, 0.55); color: var(--text-secondary); cursor: pointer; text-align: left; font-size: 10px; }
.starter-block button:hover { border-color: var(--border); color: var(--text); }
.starter-block i { color: var(--action-soft); font-style: normal; }
.composer { position: sticky; bottom: 0; padding: 13px; border: 1px solid var(--border-soft); border-top: 0; border-radius: 0 0 var(--radius-feature) var(--radius-feature); background: rgba(8, 29, 53, 0.96); backdrop-filter: blur(18px); }
.composer-input-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: end; }
.attach-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-strong); cursor: pointer; }
.attach-button input { display: none; }
.composer textarea { width: 100%; min-height: 38px; max-height: 140px; resize: vertical; padding: 10px 12px; border: 0; border-radius: var(--radius-control); outline: 0; background: rgba(4, 18, 37, 0.82); color: var(--text); font-size: 11px; }
.composer textarea::placeholder { color: var(--text-tertiary); }
.send-button { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 13px; border: 0; border-radius: var(--radius-control); background: var(--action); cursor: pointer; font-size: 10px; font-weight: 700; }
.send-button i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.14); font-style: normal; }
.composer-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--text-tertiary); font-size: 8px; }
.selected-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.selected-files > span { width: 100%; color: var(--text-tertiary); font-size: 9px; }
.selected-files button { max-width: 180px; display: flex; gap: 8px; align-items: center; padding: 5px 7px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface); color: var(--text-secondary); font-size: 8px; }
.selected-files button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-files i { color: var(--danger); font-style: normal; }
.recent-panel { min-width: 0; height: 100%; padding: 22px; border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: rgba(8, 29, 53, 0.58); overflow: auto; }
.recent-list { margin-top: 11px; }
.recent-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 9px; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.recent-row:first-child { border-top: 0; }
.recent-row > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-strong); color: var(--action-soft); font-size: 9px; }
.recent-row strong, .recent-row p, .recent-row small { display: block; margin: 0; }
.recent-row strong { font-size: 10px; }
.recent-row p { margin-top: 2px; color: var(--text-tertiary); font-size: 8px; line-height: 1.5; }
.recent-row small { margin-top: 3px; color: #586d83; font-size: 8px; }
.recent-row em { color: var(--text-secondary); font-family: var(--font-number); font-size: 9px; font-style: normal; }

.strategy-hero { position: relative; display: grid; grid-template-columns: 70px 1fr 200px; align-items: center; gap: 25px; min-height: 225px; padding: 30px; border: 1px solid var(--border); border-radius: var(--radius-feature); background: linear-gradient(115deg, rgba(16, 52, 86, 0.75), rgba(8, 29, 53, 0.94)); overflow: hidden; }
.strategy-hero::after { content: ""; position: absolute; right: -60px; bottom: -130px; width: 280px; height: 280px; border: 1px solid rgba(57, 124, 240, 0.14); border-radius: 50%; box-shadow: 0 0 0 45px rgba(57, 124, 240, 0.025); }
.strategy-index { align-self: start; font-family: var(--font-number); font-size: 47px; color: var(--border); }
.strategy-main, .coverage-meter { position: relative; z-index: 1; }
.strategy-meta { display: flex; gap: 8px; }
.strategy-meta span { padding: 4px 7px; border-radius: 7px; background: rgba(57, 124, 240, 0.12); color: var(--action-soft); font-size: 8px; }
.strategy-main h2 { margin: 14px 0 9px; font-size: 28px; letter-spacing: -0.025em; }
.strategy-main p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.75; }
.coverage-meter { padding-left: 22px; border-left: 1px solid var(--border-soft); }
.coverage-meter span, .coverage-meter small { display: block; color: var(--text-tertiary); font-size: 8px; }
.coverage-meter strong { display: block; margin: 7px 0; font-family: var(--font-number); font-size: 31px; }
.coverage-meter i { display: block; height: 4px; margin-bottom: 7px; border-radius: 4px; background: rgba(128, 170, 216, 0.12); overflow: hidden; }
.coverage-meter b { display: block; height: 100%; background: var(--safe); }
.insight-grid { margin-top: 18px; grid-template-columns: 1.2fr 0.8fr; }
.trend-change { color: var(--safe) !important; font-family: var(--font-number); }
.trend-chart { margin-top: 14px; }
.trend-chart svg { display: block; width: 100%; overflow: visible; }
.trend-chart .grid-line { stroke: rgba(128, 170, 216, 0.12); stroke-dasharray: 4 7; }
.trend-chart .trend-line { fill: none; stroke: var(--action); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-chart circle { fill: var(--surface); stroke: var(--safe); stroke-width: 3; }
.trend-chart text { fill: var(--text-secondary); font-family: var(--font-number); font-size: 10px; text-anchor: middle; }
.trend-chart .date-label { fill: var(--text-tertiary); font-family: var(--font-body); font-size: 8px; }
.chart-foot { display: flex; justify-content: space-between; color: var(--text-tertiary); font-size: 8px; }
.chart-empty { min-height: 180px; display: grid; place-items: center; color: var(--text-tertiary); font-size: 10px; }
.evidence-list { margin-top: 14px; }
.evidence-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.evidence-row:first-child { border-top: 0; }
.evidence-row > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(117,139,162,.1); color: var(--text-tertiary); font-weight: 700; }
.evidence-row.kind-support > span { color: var(--safe); background: rgba(94,214,160,.1); }
.evidence-row.kind-counter > span { color: var(--warning); background: rgba(242,183,102,.1); }
.evidence-row small { color: var(--text-tertiary); font-size: 8px; }
.evidence-row p { margin: 3px 0 0; font-size: 10px; line-height: 1.55; }
.action-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 18px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-feature); background: var(--surface-strong); }
.action-panel h2 { margin: 8px 0; font-size: 23px; }
.action-panel p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.7; }
.action-guardrail { padding-left: 26px; border-left: 1px solid var(--border-soft); }
.action-guardrail > span { display: block; margin-top: 10px; color: var(--warning); font-size: 8px; font-weight: 700; }
.action-guardrail > span:first-child { margin-top: 0; color: var(--safe); }
.action-guardrail ul { margin: 5px 0 0; padding-left: 16px; color: var(--text-secondary); font-size: 9px; }

.profile-identity { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 15px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-feature); background: var(--surface); }
.profile-avatar { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: var(--action); font-family: var(--font-number); font-size: 22px; font-weight: 700; }
.profile-identity h2 { margin: 0; font-size: 21px; }
.profile-identity p { margin: 3px 0 0; color: var(--text-tertiary); font-size: 10px; }
.profile-identity > span { padding: 6px 9px; border-radius: 8px; background: rgba(94,214,160,.09); color: var(--safe); font-size: 9px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 18px 0; border: 1px solid var(--border-soft); border-radius: var(--radius-card); overflow: hidden; background: var(--border-soft); }
.profile-stats > div { padding: 17px; background: rgba(8, 29, 53, 0.9); }
.profile-stats strong, .profile-stats span, .profile-stats small { display: block; }
.profile-stats strong { font-family: var(--font-number); font-size: 20px; }
.profile-stats span { color: var(--text-secondary); font-size: 9px; }
.profile-stats small { margin-top: 3px; color: var(--text-tertiary); font-size: 8px; }
.profile-grid { align-items: stretch; grid-auto-rows: minmax(300px, auto); }
.profile-grid > .panel { min-height: 300px; height: 100%; display: flex; flex-direction: column; }
.body-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0; }
.body-tags span { padding: 5px 8px; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--text-secondary); font-size: 9px; }
.estimate-card { display: grid; grid-template-columns: 33px 1fr; gap: 10px; padding: 13px; border-radius: var(--radius-control); background: rgba(4,18,37,.72); }
.estimate-card > strong { color: var(--action-soft); font-family: var(--font-number); font-size: 26px; }
.estimate-card span { font-size: 10px; font-weight: 700; }
.estimate-card p { margin: 3px 0 0; color: var(--text-tertiary); font-size: 9px; line-height: 1.55; }
.updated-at { display: block; margin-top: auto; padding-top: 16px; color: var(--text-tertiary); font-size: 9px; }
.plan-target { display: grid; gap: 4px; margin: 17px 0; }
.plan-target span, .plan-target small { color: var(--text-tertiary); font-size: 9px; }
.plan-target strong { font-family: var(--font-number); font-size: 27px; }
.plan-macros { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-control); overflow: hidden; background: var(--border-soft); }
.plan-macros div { padding: 10px; background: rgba(4,18,37,.72); }
.plan-macros span, .plan-macros strong { display: block; }
.plan-macros span { color: var(--text-tertiary); font-size: 8px; }
.plan-macros strong { margin-top: 2px; font-family: var(--font-number); font-size: 12px; }
.privacy-panel p { color: var(--text-secondary); font-size: 10px; line-height: 1.7; }
.privacy-facts { display: grid; gap: 9px; margin-top: auto; color: var(--safe); font-size: 10px; }
.archive-panel > strong { display: block; margin: 17px 0; font-size: 14px; }
.archive-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: auto; padding: 13px; border-radius: var(--radius-control); background: rgba(4,18,37,.72); }
.archive-flow span { font-size: 9px; }
.archive-flow small { display: block; margin-bottom: 4px; color: var(--text-tertiary); font-size: 8px; }
.archive-flow i { color: var(--action-soft); font-style: normal; }

.page-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 13px; }
.page-subtitle { max-width: 720px; margin: 10px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.nav-icon img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.nav-item.primary .nav-icon { overflow: hidden; padding: 0; border-radius: 13px; background: transparent; box-shadow: 0 10px 28px rgba(57,124,240,.32); }
.strategy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 18px; }
.strategy-status-chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 1px solid rgba(94,214,160,.2); border-radius: var(--radius-control); background: rgba(94,214,160,.08); color: var(--safe); font-size: 9px; font-weight: 700; }
.trend-panel-head { align-items: end; }
.period-tabs, .view-tabs { display: flex; width: max-content; gap: 4px; padding: 4px; border: 1px solid var(--border-soft); border-radius: 11px; background: rgba(4,18,37,.7); }
.period-tabs { margin-top: 14px; }
.period-tabs button, .view-tabs button { min-width: 54px; padding: 7px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--text-tertiary); cursor: pointer; font-size: 9px; }
.period-tabs button.active, .view-tabs button.active { background: var(--surface-raised); color: var(--text); box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.insight-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; }
.insight-metrics button { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); background: rgba(4,18,37,.55); cursor: pointer; text-align: left; }
.insight-metrics button:hover { border-color: var(--border); }
.insight-metrics span { color: var(--text-tertiary); font-size: 8px; }
.insight-metrics strong { font-family: var(--font-number); font-size: 15px; }
.insight-metrics small { color: var(--text-secondary); font-size: 8px; }
.calibration-panel { margin-top: 18px; padding: 28px; }
.calibration-status { padding: 5px 8px; border-radius: 8px; background: rgba(94,214,160,.09); color: var(--safe); font-size: 9px; font-weight: 700; }
.calibration-status.status-not_supported, .calibration-status.status-stopped_for_safety { background: rgba(239,112,106,.09); color: var(--danger); }
.calibration-summary { max-width: 840px; color: var(--text-secondary); font-size: 11px; line-height: 1.75; }
.calibration-next { display: flex; align-items: center; gap: 12px; margin: 16px 0; padding: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); background: rgba(4,18,37,.55); }
.calibration-next span { color: var(--text-tertiary); font-size: 9px; }
.calibration-next strong { font-size: 12px; }
.calibration-evidence { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.plan-proposal { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px; margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-card); background: linear-gradient(115deg, rgba(16,52,86,.7), rgba(4,18,37,.8)); }
.plan-proposal h3 { margin: 5px 0 3px; font-size: 18px; }
.plan-proposal p, .proposal-unavailable { margin: 0; color: var(--text-tertiary); font-size: 9px; }
.proposal-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.proposal-metrics span { color: var(--text-tertiary); font-size: 8px; }
.proposal-metrics strong { display: block; color: var(--text); font-family: var(--font-number); font-size: 11px; }
.policy-footnote { display: block; margin-top: 15px; color: var(--text-tertiary); font-size: 8px; }
.decision-memory-preview { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 24px 28px; border: 1px solid var(--border-soft); border-radius: var(--radius-feature); background: rgba(8,29,53,.6); }
.decision-memory-preview h2 { margin: 7px 0 5px; font-size: 19px; }
.decision-memory-preview p { max-width: 800px; margin: 0; color: var(--text-secondary); font-size: 10px; line-height: 1.7; }

.profile-stats > button { display: block; padding: 17px; border: 0; background: rgba(8,29,53,.9); color: inherit; cursor: pointer; text-align: left; }
.profile-stats > button:hover { background: var(--surface-strong); }
.profile-stats button strong, .profile-stats button span, .profile-stats button small { display: block; }
.profile-stats button strong { font-family: var(--font-number); font-size: 20px; }
.profile-stats button span { color: var(--text-secondary); font-size: 9px; }
.profile-stats button small { margin-top: 3px; color: var(--text-tertiary); font-size: 8px; }
.provenance-panel p { color: var(--text-secondary); font-size: 10px; line-height: 1.7; }
.provenance-actions { display: grid; gap: 8px; margin-top: auto; }
.provenance-actions button { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); background: rgba(4,18,37,.55); color: var(--text-secondary); cursor: pointer; text-align: left; font-size: 9px; }
.provenance-actions button:hover { border-color: var(--border); color: var(--text); }
.provenance-actions span { color: var(--action-soft); }
.archive-link { width: max-content; margin-top: 16px; }

.evidence-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px 0; }
.evidence-period-nav { min-width: 390px; display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: rgba(8,29,53,.65); overflow: hidden; }
.evidence-period-nav > button { align-self: stretch; border: 0; background: transparent; color: var(--action-soft); cursor: pointer; font-size: 23px; }
.evidence-period-nav > button:hover { background: rgba(57,124,240,.08); }
.evidence-period-nav > label, .evidence-period-nav > div { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px; }
.evidence-period-nav strong { font-size: 12px; }
.evidence-period-nav span { color: var(--text-tertiary); font-size: 8px; }
.evidence-period-nav input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.section-loading, .inline-error { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text-secondary); font-size: 10px; }
.inline-error { color: var(--danger); }
.inline-error button { border: 0; background: transparent; color: var(--action-soft); cursor: pointer; text-decoration: underline; }
.coverage-summary { display: grid; grid-template-columns: 1fr minmax(420px, .8fr); align-items: center; gap: 30px; padding: 25px 28px; border: 1px solid var(--border); border-radius: var(--radius-feature); background: linear-gradient(115deg, rgba(16,52,86,.72), rgba(8,29,53,.88)); }
.coverage-summary h2 { margin: 6px 0; font-family: var(--font-number); font-size: 26px; }
.coverage-summary p { margin: 0; color: var(--text-secondary); font-size: 10px; }
.coverage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.coverage-grid span { display: grid; justify-items: center; gap: 5px; padding: 11px 7px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); color: var(--text-tertiary); font-size: 9px; }
.coverage-grid i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(117,139,162,.09); font-style: normal; }
.coverage-grid span.done { border-color: rgba(94,214,160,.2); color: var(--safe); background: rgba(94,214,160,.05); }
.evidence-fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.fact-panel { min-height: 190px; padding: 22px; }
.fact-panel h2 { margin: 6px 0 0; font-family: var(--font-number); font-size: 24px; }
.fact-panel > p { margin: 16px 0 0; color: var(--text-tertiary); font-size: 9px; line-height: 1.65; }
.fact-inline { display: flex; gap: 8px; margin-top: 22px; }
.fact-inline span { flex: 1; padding: 10px; border-radius: var(--radius-control); background: rgba(4,18,37,.58); color: var(--text-tertiary); font-size: 8px; }
.fact-inline strong { display: block; margin-top: 3px; color: var(--text); font-size: 11px; }
.nutrition-fact, .training-fact { min-height: 260px; }
.macro-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.macro-summary span { padding: 10px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); }
.macro-summary small, .macro-summary strong { display: block; }
.macro-summary small { color: var(--text-tertiary); font-size: 8px; }
.macro-summary strong { margin-top: 3px; font-family: var(--font-number); font-size: 12px; }
.evidence-meals, .training-list { display: grid; gap: 7px; margin-top: 14px; }
.evidence-meals button, .training-list button { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); background: rgba(4,18,37,.5); color: inherit; cursor: pointer; text-align: left; }
.evidence-meals button:hover, .training-list button:hover { border-color: var(--border); }
.evidence-meals strong, .evidence-meals small, .training-list strong, .training-list small { display: block; }
.evidence-meals strong, .training-list strong { font-size: 10px; }
.evidence-meals small, .training-list small { margin-top: 3px; color: var(--text-tertiary); font-size: 8px; }
.evidence-meals em, .training-list em { flex: 0 0 auto; color: var(--action-soft); font-size: 8px; font-style: normal; }
.revision-audit-note { margin-top: 15px; padding: 12px 14px; border-left: 2px solid var(--safe); background: rgba(94,214,160,.05); color: var(--text-secondary); font-size: 9px; }
.week-summary-panel, .evidence-matrix { padding: 25px; }
.week-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 17px; border: 1px solid var(--border-soft); border-radius: var(--radius-card); overflow: hidden; background: var(--border-soft); }
.week-summary-grid > div { padding: 15px; background: rgba(4,18,37,.75); }
.week-summary-grid span, .week-summary-grid strong, .week-summary-grid small { display: block; }
.week-summary-grid span, .week-summary-grid small { color: var(--text-tertiary); font-size: 8px; }
.week-summary-grid strong { margin: 4px 0; font-family: var(--font-number); font-size: 17px; }
.week-summary-panel > p { color: var(--text-secondary); font-size: 9px; }
.evidence-matrix { margin-top: 18px; }
.day-matrix { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 16px; }
.day-matrix button { display: grid; justify-items: center; gap: 8px; padding: 13px 7px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); background: rgba(4,18,37,.55); color: inherit; cursor: pointer; }
.day-matrix button:hover { border-color: var(--border); transform: translateY(-1px); }
.day-matrix > button > span { color: var(--text-tertiary); font-size: 8px; }
.day-matrix strong { font-family: var(--font-number); font-size: 15px; }
.day-matrix small { display: flex; gap: 3px; }
.day-matrix i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: rgba(117,139,162,.08); color: #52667c; font-size: 7px; font-style: normal; }
.day-matrix i.on { background: rgba(94,214,160,.09); color: var(--safe); }
.week-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.week-context-grid .panel { padding: 22px; }
.week-context-grid h2 { margin: 8px 0; font-size: 18px; }
.week-context-grid p { margin: 0; color: var(--text-secondary); font-size: 9px; }

body.dialog-open { overflow: hidden; }
.dialog-mask { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(1,6,14,.64); backdrop-filter: blur(6px) saturate(.9); animation: dialog-mask-in .16s ease-out both; }
.dialog-card { width: min(620px, 100%); max-height: min(820px, calc(100vh - 48px)); overflow: auto; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-feature); background: linear-gradient(145deg, #0b294a, #06172c 68%); box-shadow: 0 30px 100px rgba(0,0,0,.5); animation: dialog-card-in .2s cubic-bezier(.2,.8,.2,1) both; }
.dialog-decision-history { width: min(860px, 100%); }
.dialog-card > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--border-soft); }
.dialog-card > header h2 { margin: 7px 0 0; font-size: 22px; }
.dialog-card > header button { width: 34px; height: 34px; border: 1px solid var(--border-soft); border-radius: 10px; background: rgba(4,18,37,.6); color: var(--text-secondary); cursor: pointer; font-size: 20px; }
.dialog-card form { display: grid; gap: 14px; margin-top: 18px; }
.dialog-card label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 9px; }
.dialog-card input, .dialog-card textarea, .dialog-card select { width: 100%; padding: 11px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); outline: 0; background: rgba(4,18,37,.75); color: var(--text); }
.dialog-card input:focus, .dialog-card textarea:focus, .dialog-card select:focus { border-color: var(--action); }
.dialog-card .checkbox-field { display: flex; align-items: center; grid-auto-flow: column; justify-content: start; }
.dialog-card .checkbox-field input { width: 16px; accent-color: var(--action); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-submit { width: 100%; justify-content: center; }
.dialog-error { margin-top: 12px; color: var(--danger); font-size: 10px; }
.info-dialog-body { padding-top: 17px; }
.info-dialog-body p { color: var(--text-secondary); font-size: 12px; line-height: 1.8; }
.info-detail { margin: 15px 0; padding: 13px; border: 1px solid var(--border-soft); border-radius: var(--radius-control); background: rgba(4,18,37,.58); color: var(--action-soft); font-size: 10px; line-height: 1.7; }
.info-dialog-body small, .meal-editor-note, .dialog-intro { color: var(--text-tertiary); font-size: 9px; line-height: 1.65; }
.meal-editor-note { margin-top: 17px; }
.revision-preview { margin-top: 16px; padding: 15px; border: 1px solid var(--border); border-radius: var(--radius-card); background: rgba(4,18,37,.55); }
.revision-preview > p { color: var(--text-secondary); font-size: 9px; }
.revision-preview button { margin-top: 12px; }
.decision-history-list { display: grid; gap: 12px; margin-top: 18px; }
.decision-history-list article { padding: 17px; border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: rgba(4,18,37,.58); }
.decision-history-head { display: flex; justify-content: space-between; gap: 15px; color: var(--text-tertiary); font-size: 8px; }
.decision-history-head strong { color: var(--safe); }
.decision-history-list h3 { margin: 10px 0; font-size: 15px; }
.decision-history-list article > p { display: grid; gap: 3px; margin: 0 0 10px; color: var(--text-secondary); font-size: 10px; }
.decision-history-list article > p small { color: var(--text-tertiary); }
.decision-history-list article > div:not(.decision-history-head) { display: flex; gap: 18px; color: var(--text-tertiary); font-size: 8px; }
.decision-history-list aside { margin-top: 12px; padding: 12px; border-radius: var(--radius-control); background: rgba(16,52,86,.55); }
.decision-history-list aside strong { color: var(--action-soft); font-size: 9px; }
.decision-history-list aside p { margin: 4px 0 0; color: var(--text-secondary); font-size: 9px; }
.dialog-empty { padding: 40px 10px; color: var(--text-secondary); text-align: center; }
.notice-toast { position: fixed; z-index: 120; right: 26px; bottom: 26px; max-width: 420px; padding: 12px 16px; border: 1px solid rgba(94,214,160,.28); border-radius: var(--radius-control); background: rgba(8,41,59,.96); color: var(--safe); box-shadow: 0 18px 50px rgba(0,0,0,.35); font-size: 10px; }

.loading-state, .error-state, .empty-state { min-height: 60vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.loading-state { gap: 17px; color: var(--text-secondary); }
.loading-orbit { width: 58px; height: 58px; position: relative; border: 1px solid var(--border); border-radius: 50%; animation: spin 1.5s linear infinite; }
.loading-orbit i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--action); }
.loading-orbit i:nth-child(1) { left: 4px; top: 24px; }
.loading-orbit i:nth-child(2) { right: 7px; top: 9px; background: var(--safe); }
.loading-orbit i:nth-child(3) { right: 10px; bottom: 8px; background: var(--warning); }
.error-state > span, .empty-state > span { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 17px; color: var(--warning); font-family: var(--font-number); font-size: 24px; }
.error-state h1, .empty-state h2 { margin: 17px 0 7px; }
.error-state p, .empty-state p { max-width: 440px; margin: 0 0 17px; color: var(--text-secondary); }
.error-state small { margin-bottom: 14px; color: var(--text-tertiary); }
.reveal { animation: reveal 520ms var(--ease) both; }
.delay-1 { animation-delay: 70ms; }
.delay-2 { animation-delay: 140ms; }
.delay-3 { animation-delay: 210ms; }

@keyframes reveal { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes thinking-pulse { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 1500px) {
  .product-shell { grid-template-columns: 248px minmax(0, 1fr); }
  .context-rail { display: none; }
}

@media (max-width: 1180px) {
  .product-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .product-shell.route-record { grid-template-columns: 210px minmax(0, 1fr); }
  .context-rail { display: none; }
  .record-layout { grid-template-columns: 1fr; }
  .recent-panel { order: 2; }
}

@media (max-width: 940px) {
  .access-stage { grid-template-columns: 1fr; }
  .access-visual { display: none; }
  .access-panel { border-right: 0; }
  .product-shell { display: block; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .side-rail { display: none; }
  .topbar { position: sticky; z-index: 20; top: 0; min-height: 62px; justify-content: space-between; padding: 0 18px; background: rgba(2,8,18,.9); backdrop-filter: blur(18px); }
  .mobile-brand { display: block; }
  .mobile-brand .product-brand { gap: 10px; }
  .mobile-brand .product-brand strong { font-size: 14px; }
  .main-content { padding: 32px 20px 60px; }
  .mobile-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); min-height: calc(62px + env(safe-area-inset-bottom)); padding: 7px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--border-soft); background: rgba(2,8,18,.94); backdrop-filter: blur(20px); }
  .mobile-nav .nav-item { min-height: 48px; justify-content: center; gap: 5px; padding: 0; flex-direction: column; border: 0; background: transparent; }
  .mobile-nav .nav-item::before { display: none; }
  .mobile-nav .nav-icon { width: 27px; height: 24px; border: 0; background: transparent; box-shadow: none; }
  .mobile-nav .nav-icon svg { width: 18px; height: 18px; }
  .mobile-nav .nav-copy { display: block; }
  .mobile-nav .nav-copy small { display: none; }
  .mobile-nav .nav-item strong { font-size: 9px; }
  .mobile-nav .nav-item.primary .nav-icon { width: 34px; height: 30px; border-radius: 10px; background: var(--action); }
}

@media (max-width: 720px) {
  .access-panel { padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); }
  .invite-copy { margin: 50px 0 25px; }
  .invite-copy h1, .invitation-required h1 { font-size: clamp(39px, 12vw, 56px); }
  .access-facts { grid-template-columns: 1fr; }
  .access-facts div { grid-template-columns: 28px 1fr; align-items: center; }
  .access-facts div small { grid-column: 2; }
  .access-footer { display: grid; }
  .access-footer a { margin-left: 0; }
  .page-head { align-items: start; }
  .page-head h1 { font-size: 35px; }
  .quiet-action { font-size: 0; padding: 0; width: 40px; }
  .quiet-action::after { content: "+"; font-size: 18px; }
  .signal-hero { grid-template-columns: 1fr 1fr; padding: 23px; }
  .signal-copy { grid-column: 1 / -1; }
  .weight-readout { padding-left: 0; border-left: 0; }
  .weight-readout strong { font-size: 42px; }
  .progress-ring > div { width: 105px; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .content-grid, .insight-grid, .profile-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-auto-rows: auto; }
  .profile-grid > .panel { min-height: 0; }
  .record-layout { display: block; }
  .assistant-heading { gap: 12px; }
  .assistant-symbol { width: 42px; height: 42px; border-radius: 14px; }
  .conversation-panel { min-height: 390px; padding: 14px; }
  .assistant-message, .user-message { max-width: 94%; }
  .recent-panel { margin-top: 18px; }
  .strategy-hero { grid-template-columns: 1fr; gap: 13px; padding: 23px; }
  .strategy-index { position: absolute; right: 18px; top: 8px; opacity: .55; }
  .strategy-main h2 { padding-right: 25px; font-size: 24px; }
  .coverage-meter { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--border-soft); }
  .action-panel { grid-template-columns: 1fr; gap: 20px; padding: 23px; }
  .action-guardrail { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--border-soft); }
  .profile-identity { grid-template-columns: 48px 1fr; }
  .profile-avatar { width: 46px; height: 46px; border-radius: 14px; }
  .profile-identity > span { grid-column: 2; width: max-content; }
  .profile-stats { grid-template-columns: 1fr 1fr 1fr; }
  .profile-stats > div { padding: 13px; }
  .profile-stats small { display: none; }
  .composer-foot { display: grid; gap: 2px; }
  .page-head-actions { flex-wrap: wrap; gap: 8px; }
  .route-content-evidence .quiet-action { width: auto; padding: 0 12px; font-size: 9px; }
  .route-content-evidence .quiet-action::after { display: none; }
  .evidence-toolbar { align-items: stretch; flex-direction: column; }
  .evidence-period-nav { min-width: 0; width: 100%; }
  .coverage-summary { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .coverage-grid { grid-template-columns: 1fr 1fr; }
  .evidence-fact-grid, .week-context-grid { grid-template-columns: 1fr; }
  .week-summary-grid { grid-template-columns: 1fr 1fr; }
  .day-matrix { grid-template-columns: repeat(4, 1fr); }
  .calibration-evidence { grid-template-columns: 1fr; }
  .plan-proposal { grid-template-columns: 1fr; }
  .decision-memory-preview { align-items: flex-start; flex-direction: column; }
  .dialog-mask { align-items: end; padding: 0; }
  .dialog-card { width: 100%; max-height: 88vh; border-radius: 23px 23px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-stats > button { padding: 13px; }
  .profile-stats button small { display: none; }
  .notice-toast { right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 14px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

@keyframes dialog-mask-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-card-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
