:root {
  --ink: #15212b;
  --muted: #64717d;
  --line: #dfe5e9;
  --line-strong: #c9d1d7;
  --canvas: #eef2f4;
  --surface: #ffffff;
  --surface-soft: #f6f8f9;
  --navy: #154f70;
  --navy-strong: #103d57;
  --teal: #16766f;
  --teal-soft: #e6f4f1;
  --amber: #9b6500;
  --amber-soft: #fff3d8;
  --red: #b33c36;
  --red-soft: #fcebea;
  --green: #317657;
  --green-soft: #e9f5ee;
  --blue-soft: #e7f1f6;
  --shadow: 0 18px 50px rgba(24, 38, 50, 0.15);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #dde3e6;
}

body {
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(21, 79, 112, 0.25);
  outline-offset: 2px;
}

svg {
  width: 1em;
  height: 1em;
  stroke-width: 2;
}

.review-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.route-panel {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 16px 18px;
  overflow-y: auto;
  color: #eaf0f3;
  background: #1d282f;
  border-right: 1px solid #35434c;
}

.route-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px;
  border-bottom: 1px solid #3a4750;
}

.route-brand__mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  font-size: 22px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 6px;
}

.route-brand div {
  min-width: 0;
}

.route-brand strong,
.route-brand span {
  display: block;
}

.route-brand strong {
  font-size: 18px;
}

.route-brand span {
  margin-top: 4px;
  overflow: hidden;
  font-size: 11px;
  color: #aebbc3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-nav {
  padding-top: 8px;
}

.route-nav__label {
  margin: 18px 10px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #83939d;
}

.route-link {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  margin-bottom: 3px;
  color: #cbd5da;
  text-align: left;
  background: transparent;
  border-radius: 6px;
}

.route-link svg {
  flex: 0 0 auto;
  font-size: 17px;
}

.route-link:hover {
  color: #ffffff;
  background: #2a3942;
}

.route-link.is-active {
  color: #ffffff;
  background: #164e69;
}

.review-state {
  display: grid;
  gap: 7px;
  padding: 16px 8px 0;
  margin-top: auto;
  border-top: 1px solid #3a4750;
}

.review-state label {
  font-size: 11px;
  font-weight: 700;
  color: #9eabb3;
}

.review-state select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  color: #eaf0f3;
  background: #2b3942;
  border: 1px solid #45545d;
  border-radius: 5px;
}

.device-stage {
  display: grid;
  min-width: 0;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background-color: #e4e9eb;
  background-image:
    linear-gradient(#d6dcdf 1px, transparent 1px),
    linear-gradient(90deg, #d6dcdf 1px, transparent 1px);
  background-size: 36px 36px;
}

.device-frame {
  position: relative;
  width: min(430px, calc(100vw - 304px));
  min-width: 340px;
  height: min(900px, calc(100vh - 56px));
  min-height: 660px;
  overflow: hidden;
  background: var(--canvas);
  border: 10px solid #11181d;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.device-status {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  pointer-events: none;
}

.device-status div {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.app {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
}

.app-header {
  position: relative;
  z-index: 4;
  display: flex;
  min-height: 116px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 42px 18px 17px;
  color: #ffffff;
  background: var(--navy-strong);
  border-bottom: 4px solid var(--teal);
}

.app-header.is-detail {
  min-height: 82px;
  align-items: flex-end;
  padding-bottom: 13px;
  background: #24343e;
  border-bottom-color: #82919a;
}

.app-header__context {
  min-width: 0;
}

.app-header__eyebrow {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  color: #b9d0dc;
}

.app-header__project {
  display: flex;
  max-width: 310px;
  align-items: center;
  gap: 5px;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  background: transparent;
}

.app-header__project span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  font-size: 19px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.icon-button--inverse {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.screen {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #aab6bd transparent;
}

.screen::-webkit-scrollbar {
  width: 5px;
}

.screen::-webkit-scrollbar-thumb {
  background: #aab6bd;
}

.screen-content {
  min-height: 100%;
  padding-bottom: 90px;
}

.screen-content--detail {
  padding-bottom: 30px;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 17px 11px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.page-title-row h1,
.section-heading h2,
.detail-title h1,
.sheet-header h2 {
  margin: 0;
}

.page-title-row h1 {
  font-size: 20px;
  line-height: 1.25;
}

.page-title-row p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.freshness {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  font-size: 11px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 4px;
  white-space: nowrap;
}

.freshness::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--green);
  border-radius: 50%;
}

.section {
  padding: 15px 17px;
  background: var(--surface);
  border-bottom: 7px solid var(--canvas);
}

.section--flush {
  padding-right: 0;
  padding-left: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: 15px;
  line-height: 1.35;
}

.section-heading span,
.section-heading button {
  font-size: 12px;
  color: var(--muted);
}

.section-heading button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  color: var(--navy);
  background: transparent;
}

.section-note {
  margin: -4px 0 12px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}

.chip-row {
  display: flex;
  gap: 7px;
  padding: 2px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  color: #43515b;
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  white-space: nowrap;
}

.chip.is-active {
  font-weight: 700;
  color: #ffffff;
  background: var(--navy);
  border-color: var(--navy);
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  width: 100%;
  padding: 3px;
  background: #e8edef;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.segmented button {
  min-height: 36px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border-radius: 4px;
}

.segmented button.is-active {
  font-weight: 700;
  color: var(--navy-strong);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(25, 42, 52, 0.14);
}

.filter-stack {
  display: grid;
  gap: 10px;
}

.filter-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.filter-line__label {
  padding-top: 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.filter-selection {
  margin: -2px 0 0 66px;
  font-size: 11px;
  color: var(--teal);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric-button,
.metric-cell {
  display: flex;
  min-width: 0;
  min-height: 82px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  text-align: left;
  background: var(--surface);
}

.metric-button:hover {
  background: var(--surface-soft);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}

.metric-value {
  font-variant-numeric: tabular-nums;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
}

.metric-value--danger {
  color: var(--red);
}

.metric-value--warning {
  color: var(--amber);
}

.metric-value--teal {
  color: var(--teal);
}

.metric-grid--four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid--four .metric-cell {
  min-height: 78px;
}

.resource-switch {
  margin-bottom: 11px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.resource-button {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 11px;
  padding: 12px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.resource-button__icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  font-size: 18px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 5px;
}

.resource-button span,
.resource-button strong {
  display: block;
}

.resource-button span {
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--muted);
}

.resource-button strong {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.card-list {
  display: grid;
  gap: 9px;
}

.record-card {
  width: 100%;
  overflow: hidden;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

button.record-card:hover {
  border-color: #8ea3af;
}

.record-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 13px 10px;
}

.record-card__title {
  min-width: 0;
}

.record-card__title strong,
.record-card__title span {
  display: block;
}

.record-card__title strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.4;
}

.record-card__title span {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.status-row {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  background: var(--blue-soft);
  border-radius: 4px;
}

.status-pill--danger {
  color: var(--red);
  background: var(--red-soft);
}

.status-pill--warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-pill--success {
  color: var(--green);
  background: var(--green-soft);
}

.record-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.record-stat {
  min-width: 0;
  padding: 10px 9px;
  border-right: 1px solid var(--line);
}

.record-stat:last-child {
  border-right: 0;
}

.record-stat span,
.record-stat strong {
  display: block;
}

.record-stat span {
  margin-bottom: 5px;
  font-size: 10px;
  color: var(--muted);
}

.record-stat strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.record-actions {
  display: flex;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.record-actions button {
  display: inline-flex;
  min-height: 40px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  color: var(--navy);
  background: var(--surface-soft);
}

.record-actions button:hover {
  background: #eaf0f3;
}

.cycle-progress {
  padding: 0 13px 12px;
}

.cycle-progress__track {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

.cycle-progress__step {
  position: relative;
  min-width: 0;
  padding: 9px 7px;
  text-align: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.cycle-progress__step span,
.cycle-progress__step strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cycle-progress__step span {
  margin-bottom: 3px;
  font-size: 9px;
  color: var(--muted);
}

.cycle-progress__step strong {
  font-size: 11px;
}

.cycle-progress__step.is-current {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.cycle-progress__step.is-current span {
  color: #d7f1ed;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filter-button {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 10px;
  color: #34434d;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.filter-button span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-button svg {
  flex: 0 0 auto;
}

.cycle-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  padding: 0 13px 11px;
}

.cycle-card__meta div {
  min-width: 0;
}

.cycle-card__meta span,
.cycle-card__meta strong {
  display: block;
}

.cycle-card__meta span {
  margin-bottom: 3px;
  font-size: 10px;
  color: var(--muted);
}

.cycle-card__meta strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.analysis-summary {
  padding: 13px 17px;
  color: #dfeff4;
  background: #203a49;
  border-bottom: 1px solid #405664;
}

.analysis-summary strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
  color: #ffffff;
}

.analysis-summary span {
  font-size: 11px;
}

.bar-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 11px;
  align-items: center;
}

.bar-row__label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 11px;
}

.bar-row__label span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row__track {
  position: relative;
  height: 8px;
  overflow: hidden;
  background: #edf1f3;
  border-radius: 3px;
}

.bar-row__fill {
  height: 100%;
  background: var(--teal);
  border-radius: 3px;
}

.bar-row__value {
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.comparison-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px 72px;
  align-items: center;
  min-height: 48px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
}

.comparison-row:last-child {
  border-bottom: 0;
}

.comparison-row--head {
  min-height: 35px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-soft);
}

.comparison-row strong,
.comparison-row span {
  min-width: 0;
}

.comparison-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-row span {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.comparison-row .comparison-primary {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy-strong);
}

.trend-chart {
  position: relative;
  height: 150px;
  padding: 10px 4px 24px;
  border-bottom: 1px solid var(--line);
}

.trend-chart__plot {
  position: relative;
  width: 100%;
  height: 100%;
  border-bottom: 1px solid var(--line-strong);
}

.trend-chart__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, transparent 32%, #eef1f3 33%, transparent 34%, transparent 65%, #eef1f3 66%, transparent 67%);
}

.trend-line {
  position: absolute;
  left: 5%;
  width: 90%;
  height: 3px;
  transform-origin: left center;
  background: var(--navy);
}

.trend-line--1 { top: 66%; transform: rotate(-20deg); width: 18%; }
.trend-line--2 { top: 49%; left: 22%; transform: rotate(7deg); width: 19%; }
.trend-line--3 { top: 51%; left: 40%; transform: rotate(-14deg); width: 20%; }
.trend-line--4 { top: 45%; left: 59%; transform: rotate(13deg); width: 18%; }
.trend-line--5 { top: 49%; left: 76%; transform: rotate(-17deg); width: 17%; }

.trend-point {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border: 3px solid var(--navy);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.trend-point:nth-of-type(1) { left: 5%; top: 66%; }
.trend-point:nth-of-type(2) { left: 22%; top: 43%; }
.trend-point:nth-of-type(3) { left: 40%; top: 49%; }
.trend-point:nth-of-type(4) { left: 59%; top: 37%; }
.trend-point:nth-of-type(5) { left: 76%; top: 48%; }
.trend-point:nth-of-type(6) { left: 93%; top: 34%; }

.trend-labels {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
}

.narrative-link {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.narrative-link:last-child {
  border-bottom: 0;
}

.narrative-link strong,
.narrative-link span {
  display: block;
}

.narrative-link strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.narrative-link span {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}

.narrative-link svg {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--navy);
}

.report-card {
  padding: 13px;
}

.report-card__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0 0 11px;
}

.report-card__facts div:last-child {
  grid-column: 1 / -1;
}

.report-card__facts span,
.report-card__facts strong {
  display: block;
}

.report-card__facts span {
  margin-bottom: 3px;
  font-size: 10px;
  color: var(--muted);
}

.report-card__facts strong {
  font-size: 12px;
}

.report-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--navy-strong);
  background: var(--blue-soft);
  border-left: 3px solid var(--navy);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.back-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  font-size: 20px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
}

.detail-header strong,
.detail-header span {
  display: block;
}

.detail-header strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-header span {
  margin-top: 3px;
  font-size: 10px;
  color: #b9c7cf;
}

.detail-title {
  padding: 17px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.detail-title__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.detail-title h1 {
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.3;
}

.detail-title p {
  margin: 7px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.detail-list {
  margin: 0;
}

.detail-list__row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list__row:last-child {
  border-bottom: 0;
}

.detail-list dt,
.detail-list dd {
  margin: 0;
}

.detail-list dt {
  font-size: 11px;
  color: var(--muted);
}

.detail-list dd {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.evidence-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.evidence-thumb {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  font-size: 20px;
  color: #5c6d77;
  background: #dfe7eb;
  border: 1px solid #cbd5da;
  border-radius: 5px;
}

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  padding: 0 0 16px 26px;
}

.timeline-item::before {
  position: absolute;
  top: 6px;
  left: 5px;
  width: 8px;
  height: 8px;
  content: "";
  background: #ffffff;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.timeline-item::after {
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 9px;
  width: 1px;
  content: "";
  background: var(--line-strong);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.timeline-item__head strong {
  font-size: 13px;
}

.timeline-item__head span {
  font-size: 10px;
  color: var(--muted);
}

.timeline-item__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.timeline-item__facts div {
  min-width: 0;
  font-size: 10px;
  color: var(--muted);
}

.timeline-item__facts strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: var(--ink);
}

.timeline-resource {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.55;
  color: var(--muted);
}

.transition-alert {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  margin: 8px 0 0;
  text-align: left;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f1c5c2;
  border-radius: 5px;
}

.transition-alert span {
  font-size: 10px;
  line-height: 1.45;
}

.rule-note {
  padding: 11px;
  font-size: 11px;
  line-height: 1.65;
  color: #4f5d66;
  background: var(--surface-soft);
  border-left: 3px solid #8496a0;
}

.sheet-preview {
  margin: 0 17px 18px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.sheet-preview__paper {
  min-width: 650px;
  padding: 18px;
}

.sheet-preview__title {
  margin-bottom: 16px;
  text-align: center;
}

.sheet-preview__title strong,
.sheet-preview__title span {
  display: block;
}

.sheet-preview__title strong {
  font-size: 18px;
}

.sheet-preview__title span {
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.sheet-table th,
.sheet-table td {
  padding: 7px;
  border: 1px solid #84929b;
  text-align: center;
  white-space: nowrap;
}

.sheet-table th {
  background: #e9edef;
}

.sheet-table td:first-child {
  text-align: left;
}

.page-actions {
  display: flex;
  gap: 8px;
  padding: 0 17px 18px;
}

.command-button {
  display: inline-flex;
  min-height: 42px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  font-weight: 700;
  color: #ffffff;
  background: var(--navy);
  border-radius: 6px;
}

.command-button--secondary {
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--navy);
}

.settings-list {
  background: var(--surface);
}

.settings-row {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  gap: 11px;
  padding: 0 17px;
  text-align: left;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.settings-row__icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: var(--navy);
  background: var(--blue-soft);
  border-radius: 5px;
}

.settings-row__copy {
  min-width: 0;
  flex: 1;
}

.settings-row__copy strong,
.settings-row__copy span {
  display: block;
}

.settings-row__copy strong {
  font-size: 13px;
}

.settings-row__copy span {
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-list {
  background: var(--surface);
}

.organization-row {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 0 17px;
  text-align: left;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.organization-row.is-current {
  background: var(--teal-soft);
}

.organization-row__indent-1 {
  padding-left: 35px;
}

.organization-row__indent-2 {
  padding-left: 53px;
}

.organization-row__copy {
  min-width: 0;
  flex: 1;
}

.organization-row__copy strong,
.organization-row__copy span {
  display: block;
}

.organization-row__copy strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.organization-row__copy span {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

.data-state {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 40px 24px;
  background: var(--surface);
}

.data-state__inner {
  max-width: 270px;
  text-align: center;
}

.data-state__icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 25px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.data-state h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.data-state p {
  margin: 0 0 17px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.tabbar {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 66px;
  padding: 6px 4px 8px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line-strong);
}

.tabbar[hidden] {
  display: none;
}

.tabbar__item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  font-size: 10px;
  color: #687681;
  background: transparent;
}

.tabbar__item svg {
  font-size: 21px;
}

.tabbar__item.is-active {
  font-weight: 700;
  color: var(--navy);
}

.sheet-backdrop {
  position: absolute;
  z-index: 30;
  inset: 0;
  background: rgba(19, 29, 35, 0.54);
}

.sheet-backdrop[hidden],
.bottom-sheet[hidden],
.toast[hidden] {
  display: none;
}

.bottom-sheet {
  position: absolute;
  z-index: 31;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 72%;
  padding: 12px 17px 22px;
  overflow-y: auto;
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -10px 30px rgba(25, 37, 46, 0.18);
}

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  background: #b7c0c5;
  border-radius: 3px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sheet-header h2 {
  font-size: 16px;
}

.sheet-close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 5px;
}

.sheet-content {
  padding-top: 12px;
}

.sheet-list {
  display: grid;
}

.sheet-list__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.sheet-list__row:last-child {
  border-bottom: 0;
}

.sheet-list__row strong,
.sheet-list__row span {
  display: block;
}

.sheet-list__row strong {
  font-size: 12px;
}

.sheet-list__row span {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

.sheet-list__value {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.toast {
  position: absolute;
  z-index: 50;
  bottom: 88px;
  left: 50%;
  max-width: calc(100% - 36px);
  padding: 10px 13px;
  font-size: 12px;
  color: #ffffff;
  text-align: center;
  background: #26343d;
  border-radius: 5px;
  transform: translateX(-50%);
  box-shadow: 0 8px 22px rgba(20, 31, 39, 0.24);
}

@media (max-width: 820px) {
  .review-shell {
    display: block;
  }

  .route-panel {
    display: none;
  }

  .device-stage {
    display: block;
    min-height: 100vh;
    padding: 0;
    background: var(--canvas);
  }

  .device-frame {
    width: 100%;
    min-width: 0;
    height: 100vh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .device-home {
    display: none;
  }
}

@media (max-width: 360px) {
  .app-header {
    padding-right: 13px;
    padding-left: 13px;
  }

  .page-title-row,
  .section,
  .detail-title {
    padding-right: 13px;
    padding-left: 13px;
  }

  .metric-button,
  .metric-cell {
    min-height: 76px;
    padding: 10px 8px;
  }

  .metric-value {
    font-size: 20px;
  }

  .record-card__head,
  .cycle-progress,
  .cycle-card__meta {
    padding-right: 10px;
    padding-left: 10px;
  }
}

/* ===== 微信小程序页面等比交互稿 ===== */
:root {
  --hz-primary: #155d92;
  --hz-primary-strong: #0b4670;
  --hz-primary-bright: #2a86c9;
  --hz-primary-soft: #e6f0f8;
  --hz-primary-pale: #f2f7fb;
  --hz-bg: #eef2f6;
  --hz-surface: #ffffff;
  --hz-surface-muted: #eef2f5;
  --hz-border: #d9e3ea;
  --hz-border-light: #e7eef3;
  --hz-ink: #152431;
  --hz-ink-secondary: #54687a;
  --hz-ink-muted: #8a98a5;
  --hz-success: #1f7a5c;
  --hz-success-soft: #e7f4ef;
  --hz-warning: #c66b17;
  --hz-warning-soft: #f7ecdd;
  --hz-error: #c1372e;
  --hz-error-soft: #f6ded9;
  --hz-shadow-sm: 0 1px 2px rgba(16, 42, 67, 0.05);
  --hz-shadow: 0 4px 14px rgba(16, 42, 67, 0.07);
  --hz-shadow-lg: 0 12px 32px rgba(16, 42, 67, 0.12);
  --hz-radius: 12px;
  --hz-radius-sm: 10px;
  --hz-radius-control: 10px;
  --hz-radius-compact: 7px;
  --hz-grad-hero: linear-gradient(150deg, #0c4a79 0%, #155d92 55%, #1a6aa8 100%);

  --ink: var(--hz-ink);
  --muted: var(--hz-ink-muted);
  --line: var(--hz-border-light);
  --line-strong: var(--hz-border);
  --canvas: var(--hz-bg);
  --surface: var(--hz-surface);
  --surface-soft: var(--hz-surface-muted);
  --navy: var(--hz-primary);
  --navy-strong: var(--hz-primary-strong);
  --teal: var(--hz-primary);
  --teal-soft: var(--hz-primary-pale);
  --amber: var(--hz-warning);
  --amber-soft: var(--hz-warning-soft);
  --red: var(--hz-error);
  --red-soft: var(--hz-error-soft);
  --green: var(--hz-success);
  --green-soft: var(--hz-success-soft);
  --blue-soft: var(--hz-primary-pale);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #dfe5ea;
}

body {
  min-width: 320px;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:active {
  opacity: 0.76;
}

.prototype-stage {
  display: grid;
  width: 100%;
  min-height: 100%;
  place-items: center;
  padding: 0;
  background: #dfe5ea;
}

.device-frame {
  position: relative;
  width: min(430px, 100vw);
  min-width: 320px;
  height: min(920px, 100dvh);
  min-height: min(680px, 100dvh);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--hz-bg);
  box-shadow: 0 20px 60px rgba(28, 49, 66, 0.18);
}

.device-status {
  position: absolute;
  z-index: 60;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #ffffff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  pointer-events: none;
}

.device-status div {
  gap: 5px;
  font-size: 12px;
}

.device-status svg {
  width: 12px;
  height: 12px;
}

.app {
  width: 100%;
  height: 100%;
  background: var(--hz-bg);
}

.app-header {
  position: relative;
  z-index: 4;
  display: flex;
  min-height: 164px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 70px 16px 16px;
  color: #ffffff;
  background: var(--hz-grad-hero);
  border: 0;
}

.app-header__context {
  min-width: 0;
  flex: 1;
}

.app-header__eyebrow,
.app-header__meta {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header__project {
  display: block;
  width: 100%;
  max-width: none;
  margin-top: 3px;
  overflow: hidden;
  color: #ffffff;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header__meta {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.app-header__actions {
  display: flex;
  flex: none;
  gap: 8px;
  margin-top: 4px;
}

.icon-button,
.icon-button--inverse {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  font-size: 20px;
}

.app-header.is-detail {
  min-height: 132px;
  align-items: flex-start;
  padding: 68px 16px 16px;
  color: var(--hz-ink);
  background: var(--hz-bg);
  border: 0;
}

.device-frame:has(.app-header.is-detail) .device-status {
  color: var(--hz-ink);
}

.detail-header {
  width: 100%;
  align-items: flex-start;
}

.back-button {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  margin-left: -8px;
  color: var(--hz-ink);
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.detail-header strong {
  color: var(--hz-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.detail-header span {
  margin-top: 4px;
  color: var(--hz-ink-muted);
  font-size: 12px;
}

.screen {
  flex: 1;
  min-height: 0;
  background: var(--hz-bg);
  scrollbar-color: rgba(138, 152, 165, 0.45) transparent;
}

.screen::-webkit-scrollbar {
  width: 3px;
}

.screen::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background: rgba(138, 152, 165, 0.45);
}

.screen-content {
  min-height: 100%;
  padding-bottom: 86px;
}

.screen-content--detail {
  padding-bottom: 28px;
}

.screen-content:not(.screen-content--detail) > .page-title-row {
  display: none;
}

.face-filter-strip {
  width: 100%;
  padding: 9px 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.face-filter-strip::-webkit-scrollbar,
.chip-row::-webkit-scrollbar {
  display: none;
}

.chip-row {
  display: flex;
  min-width: max-content;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip {
  min-height: 28px;
  flex: 0 0 auto;
  max-width: 175px;
  padding: 6px 11px;
  overflow: hidden;
  color: var(--hz-ink-secondary);
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip.is-active {
  color: #ffffff;
  background: var(--hz-primary);
  border-color: var(--hz-primary);
}

.data-freshness {
  display: flex;
  min-height: 35px;
  align-items: center;
  gap: 7px;
  margin: 4px 16px 0;
  color: var(--hz-ink-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.data-freshness__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--hz-success);
  box-shadow: 0 0 0 3px rgba(31, 122, 92, 0.16);
}

.data-freshness > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.data-freshness button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 5px;
  color: var(--hz-primary);
  background: transparent;
  font-size: 11px;
}

.section {
  margin: 10px 16px 0;
  padding: 16px;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border-light);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow-sm);
}

.section-heading {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.section-heading > div {
  min-width: 0;
}

.section-heading h2 {
  margin: 0;
  color: var(--hz-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.section-heading span,
.section-heading > div > span {
  display: block;
  margin-top: 3px;
  color: var(--hz-ink-muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.section-heading > button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  color: var(--hz-primary);
  background: transparent;
  font-size: 11.5px;
  white-space: nowrap;
}

.screen-content--today .section {
  overflow: hidden;
  padding: 0;
}

.screen-content--today .section-heading {
  min-height: 44px;
  padding: 9px 12px;
  margin: 0;
  border-bottom: 1px solid var(--hz-border-light);
}

.screen-content--today .section--alarm {
  border-top: 2px solid var(--hz-error);
}

.metric-grid {
  display: grid;
  overflow: hidden;
  gap: 0;
  background: var(--hz-surface);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-button,
.metric-cell {
  display: flex;
  min-width: 0;
  min-height: 72px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 11px;
  background: var(--hz-surface);
  border: 0;
  border-left: 1px solid var(--hz-border-light);
  border-radius: 0;
  text-align: left;
}

.metric-button:first-child,
.metric-cell:first-child {
  border-left: 0;
}

.metric-label {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  color: var(--hz-ink-muted);
  font-size: 10.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-value {
  max-width: 100%;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--hz-ink);
  font-family: "DIN Alternate", "Bahnschrift", sans-serif;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.05;
}

.metric-value--danger,
.metric-value--warning {
  color: var(--hz-error);
}

.metric-value--teal {
  color: var(--hz-primary);
}

.section-heading--resource {
  align-items: flex-start;
}

.segmented {
  display: grid;
  min-height: 34px;
  padding: 3px;
  gap: 2px;
  border-radius: var(--hz-radius-control);
  background: var(--hz-surface-muted);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented button {
  min-width: 0;
  min-height: 28px;
  padding: 0 10px;
  color: var(--hz-ink-muted);
  background: transparent;
  border-radius: 8px;
  font-size: 11.5px;
  white-space: nowrap;
}

.segmented button.is-active {
  color: var(--hz-primary);
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow-sm);
  font-weight: 650;
}

.resource-switch {
  width: 134px;
  min-height: 29px;
}

.resource-switch button {
  min-height: 23px;
  padding: 0 7px;
  font-size: 10.5px;
}

.resource-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-button {
  min-height: 64px;
  padding: 11px 12px;
  background: var(--hz-surface);
  border: 0;
  border-left: 1px solid var(--hz-border-light);
  border-radius: 0;
}

.resource-button:first-child {
  border-left: 0;
}

.resource-button__icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  color: var(--hz-primary);
  background: var(--hz-primary-pale);
  border-radius: 6px;
}

.resource-button:nth-child(2) .resource-button__icon {
  color: var(--hz-warning);
  background: var(--hz-warning-soft);
}

.resource-button span {
  margin-bottom: 3px;
  color: var(--hz-ink-muted);
  font-size: 10.5px;
}

.resource-button strong {
  color: var(--hz-ink);
  font-size: 20px;
}

.card-list {
  gap: 8px;
}

.record-card {
  overflow: hidden;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border-light);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow-sm);
}

.screen-content--today .card-list {
  gap: 0;
}

.screen-content--today .record-card {
  border: 0;
  border-bottom: 1px solid var(--hz-border-light);
  border-radius: 0;
  box-shadow: none;
}

.screen-content--today .record-card:last-child {
  border-bottom: 0;
}

.record-card__head {
  gap: 8px;
  padding: 12px;
}

.record-card__title strong {
  color: var(--hz-ink);
  font-size: 13.5px;
  line-height: 1.45;
}

.record-card__title span {
  margin-top: 3px;
  color: var(--hz-ink-muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.status-pill {
  min-height: 21px;
  padding: 3px 6px;
  color: var(--hz-primary);
  background: var(--hz-primary-pale);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.status-pill--danger {
  color: var(--hz-error);
  background: var(--hz-error-soft);
}

.status-pill--warning {
  color: var(--hz-warning);
  background: var(--hz-warning-soft);
}

.status-pill--success {
  color: var(--hz-success);
  background: var(--hz-success-soft);
}

.record-stats {
  border-top: 1px solid var(--hz-border-light);
}

.screen-content--today .record-stats {
  margin: 0 12px;
  border-bottom: 1px solid var(--hz-border-light);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.record-stat {
  padding: 9px;
  border-color: var(--hz-border-light);
}

.screen-content--today .record-stat:nth-child(2n) {
  border-right: 0;
  border-left: 1px solid var(--hz-border-light);
}

.record-stat span {
  color: var(--hz-ink-muted);
  font-size: 10px;
}

.record-stat strong {
  color: var(--hz-ink);
  font-size: 11.5px;
}

.record-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 10px;
  color: var(--hz-ink-secondary);
  font-size: 10.5px;
}

.cycle-progress {
  padding: 0 12px 12px;
}

.cycle-progress__track {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--hz-border-light);
  border-radius: var(--hz-radius-compact);
}

.cycle-progress__step {
  padding: 8px 5px;
  background: var(--hz-surface);
  border: 0;
  border-left: 1px solid var(--hz-border-light);
  border-radius: 0;
}

.cycle-progress__step:first-child {
  border-left: 0;
}

.cycle-progress__step.is-current {
  color: var(--hz-primary-strong);
  background: var(--hz-primary-pale);
}

.cycle-progress__step.is-current span {
  color: var(--hz-ink-muted);
}

.filter-stack {
  display: grid;
  gap: 10px;
}

.filter-toolbar {
  gap: 8px;
}

.filter-button {
  min-height: 36px;
  color: var(--hz-ink-secondary);
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-control);
}

.filter-button span {
  font-size: 11.5px;
}

.filter-line {
  min-width: 0;
}

.filter-line__label,
.filter-selection {
  color: var(--hz-ink-muted);
  font-size: 10.5px;
}

.screen-content--reality > .section:first-of-type,
.analysis-controlbar {
  padding: 7px;
  box-shadow: var(--hz-shadow);
}

.screen-content--reality > .section:nth-of-type(2) {
  padding: 0;
}

.screen-content--reality > .section:nth-of-type(2) .section-heading {
  display: none;
}

.screen-content--reality > .section:nth-of-type(3),
.screen-content--reports > .section:nth-of-type(2) {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.screen-content--reality > .section:nth-of-type(3) > .section-heading,
.screen-content--reports > .section:nth-of-type(2) > .section-heading {
  margin: 0 0 8px;
}

.screen-content--reality .metric-grid {
  border-radius: var(--hz-radius);
}

.screen-content--reality .cycle-card__meta {
  padding: 0 12px 12px;
}

.record-actions {
  gap: 0;
  background: var(--hz-border-light);
  border-top: 1px solid var(--hz-border-light);
}

.record-actions button {
  min-height: 38px;
  color: var(--hz-primary);
  background: var(--hz-primary-pale);
  font-size: 11.5px;
}

.analysis-view-switch {
  padding: 3px;
  background: var(--hz-surface-muted);
  border: 0;
  box-shadow: none;
}

.analysis-view-switch .segmented {
  padding: 0;
}

.analysis-controlbar {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 8px;
}

.analysis-controlbar .filter-button {
  margin-top: 0 !important;
}

.screen-content--analysis > .section:not(.analysis-view-switch):not(.analysis-controlbar) {
  margin-top: 10px;
}

.screen-content--analysis > .section:nth-of-type(3) {
  overflow: hidden;
  padding: 0;
}

.screen-content--analysis > .section:nth-of-type(3) > .section-heading {
  min-height: 45px;
  padding: 10px 13px;
  margin: 0;
  border-bottom: 1px solid var(--hz-border-light);
}

.metric-grid--four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid--four .metric-cell {
  min-height: 78px;
  border-bottom: 1px solid var(--hz-border-light);
}

.metric-grid--four .metric-cell:nth-child(2n + 1) {
  border-left: 0;
}

.comparison-table {
  border-color: var(--hz-border-light);
  border-radius: var(--hz-radius-compact);
}

.comparison-row {
  min-height: 48px;
  border-color: var(--hz-border-light);
}

.comparison-row--head {
  background: var(--hz-surface-muted);
}

.comparison-row .comparison-primary {
  color: var(--hz-primary-strong);
}

.bar-row__fill {
  background: linear-gradient(90deg, var(--hz-primary-bright), var(--hz-primary));
}

.screen-content--reports > .section:first-of-type {
  padding: 8px;
}

.screen-content--reports .report-banner {
  margin-bottom: 10px;
}

.report-card {
  padding: 13px;
}

.report-banner {
  color: var(--hz-primary-strong);
  background: var(--hz-primary-pale);
  border: 0;
  border-radius: var(--hz-radius-compact);
}

.report-card__facts {
  border-color: var(--hz-border-light);
}

.detail-title {
  margin: 0 16px 10px;
  padding: 14px;
  background: var(--hz-surface);
  border: 1px solid var(--hz-border-light);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow-sm);
}

.detail-title h1 {
  margin: 0;
  color: var(--hz-ink);
  font-size: 17px;
  font-weight: 750;
}

.detail-title p {
  color: var(--hz-ink-muted);
}

.detail-list__row {
  border-color: var(--hz-border-light);
}

.detail-list dt {
  color: var(--hz-ink-muted);
}

.detail-list dd {
  color: var(--hz-ink-secondary);
}

.timeline-item::before {
  border-color: var(--hz-primary);
}

.timeline-item::after {
  background: var(--hz-border);
}

.transition-alert {
  color: var(--hz-error);
  background: var(--hz-error-soft);
  border-color: #f3cfcb;
  border-radius: var(--hz-radius-compact);
}

.rule-note {
  color: var(--hz-ink-secondary);
  background: var(--hz-surface-muted);
  border-left-color: var(--hz-primary);
  border-radius: 0 var(--hz-radius-compact) var(--hz-radius-compact) 0;
}

.command-button {
  min-height: 42px;
  color: #ffffff;
  background: var(--hz-primary);
  border-radius: var(--hz-radius-control);
}

.command-button--secondary {
  color: var(--hz-primary);
  background: var(--hz-surface);
  border-color: var(--hz-primary);
}

.settings-row,
.organization-row {
  border-color: var(--hz-border-light);
}

.settings-row__icon {
  color: var(--hz-primary);
  background: var(--hz-primary-pale);
  border-radius: var(--hz-radius-compact);
}

.organization-row.is-current {
  background: var(--hz-primary-pale);
}

.tabbar {
  position: absolute;
  z-index: 20;
  min-height: 68px;
  padding: 7px 4px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--hz-border-light);
  box-shadow: 0 -2px 8px rgba(21, 54, 78, 0.05);
  backdrop-filter: blur(12px);
}

.tabbar__item {
  gap: 4px;
  color: var(--hz-ink-muted);
  font-size: 10px;
}

.tabbar__item svg {
  font-size: 21px;
  stroke-width: 1.8;
}

.tabbar__item.is-active {
  color: var(--hz-primary);
  font-weight: 650;
}

.sheet-backdrop {
  background: rgba(21, 36, 49, 0.46);
}

.bottom-sheet {
  padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: var(--hz-shadow-lg);
}

.sheet-header {
  border-color: var(--hz-border-light);
}

.sheet-close {
  border-radius: 9px;
}

.sheet-list__row {
  border-color: var(--hz-border-light);
}

.toast {
  bottom: 84px;
  padding: 9px 13px;
  background: rgba(21, 36, 49, 0.94);
  border-radius: 8px;
  box-shadow: var(--hz-shadow-lg);
}

@media (max-width: 480px) {
  .prototype-stage {
    display: block;
    background: var(--hz-bg);
  }

  .device-frame {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .app-header {
    padding-right: 13px;
    padding-left: 13px;
  }

  .section,
  .detail-title {
    margin-right: 13px;
    margin-left: 13px;
  }

  .face-filter-strip {
    padding-right: 13px;
    padding-left: 13px;
  }

  .data-freshness {
    margin-right: 13px;
    margin-left: 13px;
  }

  .metric-button,
  .metric-cell {
    min-height: 70px;
    padding: 9px 7px;
  }

  .metric-value {
    font-size: 21px;
  }

  .analysis-controlbar {
    grid-template-columns: 108px minmax(0, 1fr);
  }
}
