:root {
  color-scheme: dark;
  --ink: #eaf7f3;
  --muted: #8ca6ab;
  --line: #24434a;
  --panel: rgba(10, 31, 40, .82);
  --mint: #91f6ca;
  --yellow: #edff4f;
  --coral: #ff896f;
  --blue: #79c8ff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #06131d;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  background: #06131d;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 82% 0, #173f43 0, transparent 28rem),
    linear-gradient(145deg, #06131d, #081c27 70%, #0e2830);
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
}
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(145,246,202,.16);
  background: rgba(6,19,29,.88);
  backdrop-filter: blur(18px);
}
.brand {
  display: grid;
  grid-template-columns: 26px auto;
  column-gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .07em;
}
.brand small {
  grid-column: 2;
  color: var(--mint);
  font-size: 10px;
  letter-spacing: .24em;
}
.brand-mark {
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  align-self: center;
  border: 7px solid var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(145,246,202,.35);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.operator {
  color: var(--muted);
  font-size: 12px;
}
.quiet,
.presets button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  background: #0a202b;
  cursor: pointer;
}
.quiet:hover,
.presets button:hover {
  border-color: var(--mint);
}
main {
  width: min(1440px, 100%);
  margin: auto;
  padding: 0 clamp(18px, 4vw, 64px) 64px;
}
.hero {
  min-height: 330px;
  display: grid;
  grid-template-columns: 1.3fr minmax(280px, .7fr);
  gap: 42px;
  align-items: end;
  padding: 58px 0 42px;
}
.eyebrow {
  margin: 0 0 13px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .22em;
}
h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 96px);
  line-height: .91;
  letter-spacing: -.065em;
}
h1 em {
  color: var(--yellow);
  font-style: normal;
}
.hero-copy {
  max-width: 580px;
  color: #adc2c5;
  font-size: 16px;
  line-height: 1.8;
}
.period-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0,0,0,.25);
}
.period-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.period-card input {
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #061722;
  color: var(--ink);
}
.presets {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.presets button {
  min-height: 34px;
  font-size: 12px;
}
.primary {
  grid-column: 1 / -1;
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  color: #081b22;
  background: var(--mint);
  font-weight: 900;
  cursor: pointer;
}
.notice {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--mint);
  background: rgba(145,246,202,.07);
  color: #bcd4d3;
  font-size: 13px;
}
.notice.error {
  border-color: var(--coral);
  background: rgba(255,137,111,.08);
}
.tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin-bottom: 22px;
  padding-bottom: 4px;
}
.tabs button {
  min-width: 86px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tabs button.active {
  border-color: rgba(145,246,202,.35);
  background: rgba(145,246,202,.11);
  color: var(--mint);
  font-weight: 900;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
  animation: enter .28s ease-out;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.metric-grid.compact {
  grid-template-columns: repeat(3, minmax(0,1fr));
  margin-top: 14px;
}
.metric {
  min-height: 156px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--panel);
  overflow: hidden;
  position: relative;
}
.metric::after {
  content: "";
  position: absolute;
  inset: auto -35px -48px auto;
  width: 100px;
  height: 100px;
  border: 18px solid rgba(145,246,202,.045);
  border-radius: 50%;
}
.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}
.metric-value {
  display: block;
  margin: 14px 0 7px;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.05em;
}
.metric-value.accent {
  color: var(--yellow);
}
.metric-detail {
  color: var(--muted);
  font-size: 12px;
}
.split-grid {
  display: grid;
  grid-template-columns: 1.55fr .85fr;
  gap: 14px;
}
.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.card h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}
.card-head > span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.bar-chart {
  min-height: 260px;
  display: flex;
  align-items: stretch;
  gap: 7px;
  overflow-x: auto;
}
.bar-day {
  flex: 1;
  min-width: 48px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 9px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}
.bar-stack {
  align-self: end;
  height: 100%;
  min-height: 170px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  border-bottom: 1px solid var(--line);
}
.bar {
  width: min(15px, 30%);
  min-height: 2px;
  border-radius: 5px 5px 1px 1px;
  background: var(--mint);
}
.bar.secondary {
  background: var(--yellow);
}
.bar.tertiary {
  background: var(--blue);
}
.status-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 18px;
  margin: 0;
  font-size: 13px;
}
.status-list dt {
  color: var(--muted);
}
.status-list dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.method-note {
  color: #829a9e;
  font-size: 11px;
  line-height: 1.7;
}
.funnel {
  display: grid;
  gap: 7px;
}
.funnel-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.funnel-track {
  height: 30px;
  border-radius: 8px;
  background: #071923;
  overflow: hidden;
}
.funnel-fill {
  height: 100%;
  min-width: 2px;
  border-radius: 8px;
  background: linear-gradient(90deg, #65d9b0, var(--yellow));
}
.funnel-value {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  padding: 13px 11px;
  border-bottom: 1px solid rgba(36,67,74,.72);
  text-align: left;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
}
td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.feedback-list {
  display: grid;
  gap: 10px;
}
.feedback-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(5,22,30,.72);
}
.feedback-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
}
.tag {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(121,200,255,.09);
  color: var(--blue);
}
.feedback-item p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
}
.feedback-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.danger {
  min-height: 36px;
  border: 1px solid rgba(255,137,111,.45);
  border-radius: 999px;
  padding: 6px 11px;
  background: transparent;
  color: var(--coral);
  cursor: pointer;
}
.decision-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(121,200,255,.12), var(--panel));
}
.decision-hero.stop,
.decision-hero.fix {
  border-left-color: var(--coral);
  background: linear-gradient(120deg, rgba(255,137,111,.14), var(--panel));
}
.decision-hero.expand {
  border-left-color: var(--yellow);
  background: linear-gradient(120deg, rgba(237,255,79,.13), var(--panel));
}
.decision-hero h2 {
  margin: 5px 0 8px;
  font-size: clamp(28px, 4vw, 50px);
  letter-spacing: -.045em;
}
.decision-hero p {
  margin: 0;
  color: var(--muted);
}
.decision-kicker {
  color: var(--mint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2em;
}
.decision-count {
  flex: 0 0 auto;
  color: var(--yellow);
  font-size: clamp(28px, 5vw, 58px);
  font-weight: 950;
  letter-spacing: -.05em;
}
.criteria td:first-child {
  min-width: 220px;
  white-space: normal;
}
.criteria td:first-child strong,
.criteria td:first-child small,
.sample-basis {
  display: block;
}
.criteria td:first-child small,
.sample-basis {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  white-space: normal;
}
.area-label {
  display: block;
  margin-bottom: 4px;
  color: var(--mint);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}
.status-badge,
.sample-state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(121,200,255,.08);
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.status-badge.pass,
.sample-state.direction_ready,
.sample-state.confirmed {
  border-color: rgba(145,246,202,.35);
  background: rgba(145,246,202,.1);
  color: var(--mint);
}
.status-badge.fail {
  border-color: rgba(255,137,111,.42);
  background: rgba(255,137,111,.1);
  color: var(--coral);
}
.status-badge.reference,
.sample-state.reference {
  color: var(--yellow);
}
.status-badge.accumulating,
.sample-state.accumulating,
.status-badge.unknown,
.sample-state.unknown {
  color: var(--muted);
}
.judgment-grid,
.judgment-card {
  margin-top: 14px;
}
.readiness-list {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 12px 18px;
  margin: 0;
  font-size: 12px;
}
.readiness-list dt {
  color: var(--muted);
}
.readiness-list dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}
.campaign-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.campaign-samples span {
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(121,200,255,.07);
  color: var(--muted);
  font-size: 10px;
}
.observation-row {
  display: grid;
  grid-template-columns: 88px 1fr 60px auto;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(36,67,74,.72);
  font-size: 12px;
}
.locale-chip {
  color: var(--muted);
  font-weight: 800;
}
.gate-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 9px;
}
.gate {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(5,22,30,.72);
  font-size: 11px;
  line-height: 1.5;
}
.gate small {
  color: var(--muted);
}
.evidence-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
.evidence-form label:not(.check) {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.evidence-form input[type="number"],
.evidence-form input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #061722;
  color: var(--ink);
}
.evidence-form .wide {
  grid-column: 1 / -1;
}
.evidence-form .check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c4d4d5;
  font-size: 12px;
}
.evidence-form .check input {
  width: 18px;
  height: 18px;
  accent-color: var(--coral);
}
.evidence-form button:disabled {
  opacity: .55;
  cursor: wait;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 4vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.login-page {
  overflow: hidden;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 24px;
}
.login-card {
  z-index: 1;
  width: min(510px, 100%);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(6,23,33,.9);
  box-shadow: 0 40px 100px rgba(0,0,0,.42);
}
.login-card h1 {
  font-size: clamp(54px, 11vw, 90px);
}
.login-card > p:not(.eyebrow) {
  margin: 24px 0;
  color: var(--muted);
  line-height: 1.7;
}
.login-card small {
  display: block;
  margin-top: 16px;
  color: #6f898e;
}
body[data-access-auth="false"] [data-access-only],
body[data-google-auth="false"] [data-google-only] {
  display: none;
}
.access-form {
  display: grid;
  gap: 10px;
}
.access-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.access-form input {
  min-height: 54px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(1,13,20,.8);
  font: inherit;
}
.access-form input:focus {
  outline: 3px solid rgba(145,246,202,.25);
  border-color: var(--mint);
}
.access-form button {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  color: #071722;
  background: var(--mint);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  border-radius: 14px;
  color: #071722;
  background: var(--mint);
  text-decoration: none;
  font-weight: 900;
  margin-top: 12px;
}
.google-button span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #3173ea;
}
.login-orbit {
  position: absolute;
  width: min(88vw, 900px);
  aspect-ratio: 1;
  border: 1px solid rgba(145,246,202,.12);
  border-radius: 50%;
  animation: orbit 32s linear infinite;
}
.login-orbit::before,
.login-orbit::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(237,255,79,.08);
  border-radius: 50%;
}
.login-orbit::after {
  inset: 28%;
}
.login-orbit i,
.login-orbit b {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 35px var(--yellow);
}
.login-orbit i:nth-child(1) {
  left: 8%;
  top: 25%;
}
.login-orbit i:nth-child(2) {
  right: 5%;
  top: 52%;
  background: var(--mint);
}
.login-orbit i:nth-child(3) {
  left: 32%;
  bottom: 4%;
  background: var(--blue);
}
.login-orbit b {
  right: 23%;
  top: 13%;
  width: 9px;
  height: 9px;
  background: var(--coral);
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 42px;
  }
  .metric-grid,
  .metric-grid.compact {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .split-grid {
    grid-template-columns: 1fr;
  }
  .gate-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}
@media (max-width: 560px) {
  .topbar {
    padding: 11px 14px;
  }
  .brand {
    font-size: 12px;
  }
  .operator {
    display: none;
  }
  main {
    padding-inline: 14px;
  }
  .hero {
    gap: 24px;
    padding-top: 35px;
  }
  .hero h1 {
    font-size: 51px;
  }
  .metric-grid,
  .metric-grid.compact {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .metric {
    min-height: 128px;
    padding: 15px;
  }
  .metric-value {
    font-size: 34px;
  }
  .card {
    padding: 16px;
  }
  .decision-hero {
    align-items: flex-start;
    padding: 22px;
  }
  .decision-count {
    font-size: 28px;
  }
  .gate-grid,
  .evidence-form {
    grid-template-columns: 1fr;
  }
  .observation-row {
    grid-template-columns: 72px 1fr auto;
  }
  .observation-row .status-badge {
    grid-column: 1 / -1;
  }
  .funnel-row {
    grid-template-columns: 88px 1fr 62px;
  }
  .tabs {
    margin-inline: -14px;
    padding-inline: 14px;
  }
  footer {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}
