:root {
  color-scheme: light;
  --bg: #edf7ff;
  --bg-deep: #f8fbff;
  --panel: rgba(255, 255, 255, 0.56);
  --panel-strong: rgba(255, 255, 255, 0.76);
  --line: rgba(45, 80, 121, 0.13);
  --line-strong: rgba(45, 80, 121, 0.23);
  --text: #11243b;
  --muted: #52677d;
  --muted-2: #7890a7;
  --lime: #4fcaa5;
  --lime-strong: #167e6e;
  --cyan: #1389ba;
  --blue: #396ce5;
  --purple: #825bd7;
  --orange: #b76a19;
  --red: #c63859;
  --positive: #177852;
  --shadow: 0 22px 70px rgba(54, 96, 137, 0.14), 0 4px 18px rgba(83, 119, 156, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --content: 1420px;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(92, 164, 255, 0.34), transparent 28%),
    radial-gradient(circle at 86% 24%, rgba(119, 237, 213, 0.27), transparent 25%),
    radial-gradient(circle at 52% 70%, rgba(188, 139, 255, 0.21), transparent 34%),
    linear-gradient(145deg, var(--bg-deep), #e8f7ff 48%, #f7f1ff);
  background-attachment: fixed;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient-a {
  top: 110px;
  left: -210px;
  background: #3b92ff;
}

.ambient-b {
  right: -200px;
  top: 45%;
  background: #8b5cff;
  opacity: 0.14;
}

.page-shell {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding-bottom: 48px;
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand-mark {
  display: inline-grid;
  grid-template-columns: repeat(3, 4px);
  align-items: end;
  gap: 3px;
  width: 25px;
  height: 25px;
  padding: 4px;
  border: 1px solid rgba(200, 243, 91, 0.36);
  border-radius: 8px;
  background: rgba(200, 243, 91, 0.08);
}

.brand-mark i {
  display: block;
  height: 9px;
  border-radius: 4px;
  background: var(--lime);
}

.brand-mark i:nth-child(2) {
  height: 15px;
  opacity: 0.72;
}

.brand-mark i:nth-child(3) {
  height: 12px;
  opacity: 0.45;
}

.document-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(200, 243, 91, 0.8);
}

main {
  display: grid;
  min-width: 0;
  gap: 18px;
  padding-top: 28px;
}

main > *,
.control-grid > *,
.summary-grid > *,
.dashboard-grid > *,
.economics-grid > *,
.notes-grid > * {
  min-width: 0;
}

.glass-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(18, 34, 56, 0.82), rgba(10, 21, 37, 0.75));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.control-deck {
  padding: 28px;
}

.control-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.control-heading {
  margin-bottom: 24px;
}

.control-heading h1,
.section-heading h2,
.score-panel h2,
.horizon-card h2,
.note-card h2 {
  margin: 5px 0 0;
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.control-heading h1 {
  font-size: clamp(1.65rem, 3vw, 2.6rem);
}

.section-heading h2,
.score-panel h2,
.horizon-card h2,
.note-card h2 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.control-heading p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.panel-kicker,
.eyebrow {
  color: var(--lime);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  gap: 16px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
}

.segment-control,
.scenario-control {
  display: grid;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3, 11, 22, 0.55);
}

.segment-control {
  grid-template-columns: repeat(3, 1fr);
}

.scenario-control {
  grid-template-columns: repeat(3, 1fr);
}

.segment-control button,
.scenario-control button {
  min-width: 0;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.segment-control button:hover,
.scenario-control button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.segment-control button:focus-visible,
.scenario-control button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.segment-control button {
  display: grid;
  gap: 2px;
  padding: 13px 10px;
  border-radius: 11px;
  text-align: center;
}

.segment-control button strong {
  font-size: 1.05rem;
}

.segment-control button span {
  font-size: 0.72rem;
}

.segment-control button.is-active,
.scenario-control button.is-active {
  color: #101827;
  border-color: rgba(220, 255, 126, 0.75);
  background: linear-gradient(135deg, var(--lime-strong), #aeea45);
  box-shadow: 0 8px 30px rgba(200, 243, 91, 0.14);
}

.scenario-control button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 11px;
  text-align: left;
}

.scenario-control button > span:last-child {
  display: grid;
  min-width: 0;
}

.scenario-control small {
  overflow: hidden;
  margin-top: 2px;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-index {
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 700;
}

.scenario-control button.is-active .scenario-index {
  color: rgba(16, 24, 39, 0.52);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  gap: 18px;
}

.hero-card {
  position: relative;
  min-height: 335px;
  padding: 30px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(24, 48, 76, 0.96), rgba(12, 26, 45, 0.88)),
    var(--panel);
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 280px;
  height: 280px;
  border: 70px solid rgba(200, 243, 91, 0.055);
  border-radius: 50%;
  pointer-events: none;
}

.hero-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.assumption-pill,
.total-chip,
.table-hint {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(3, 11, 22, 0.34);
  font-size: 0.74rem;
  white-space: nowrap;
}

.hero-number-block {
  position: relative;
  z-index: 1;
  display: grid;
  margin-top: 34px;
}

.hero-number-block > span {
  color: var(--muted);
}

.hero-number-block strong {
  margin-top: 4px;
  color: var(--lime-strong);
  font-size: clamp(2.75rem, 6vw, 5.7rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-number-block strong.negative-number {
  color: var(--red);
}

.hero-number-block small {
  margin-top: 9px;
  color: var(--muted-2);
}

.verdict {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 660px;
  margin-top: 27px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.verdict-icon {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #0d1b1a;
  background: var(--positive);
  font-weight: 800;
}

.verdict.is-caution .verdict-icon {
  background: var(--orange);
}

.verdict.is-negative .verdict-icon {
  background: var(--red);
}

.verdict strong {
  display: block;
  font-size: 0.96rem;
}

.verdict p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.metric-card {
  min-height: 158px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-lg);
}

.metric-card > span {
  color: var(--muted);
  font-size: 0.84rem;
}

.metric-card strong {
  margin-top: auto;
  padding-top: 18px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 620;
  letter-spacing: -0.05em;
  line-height: 1;
}

.metric-card small {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.metric-card .negative-number {
  color: var(--red);
}

.accent-card {
  border-color: rgba(84, 216, 242, 0.27);
  background: linear-gradient(145deg, rgba(26, 57, 78, 0.9), rgba(11, 26, 43, 0.76));
}

.accent-card strong {
  color: var(--cyan);
}

.dashboard-grid,
.economics-grid,
.notes-grid {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.72fr);
}

.economics-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.72fr);
}

.notes-grid {
  grid-template-columns: repeat(2, 1fr);
}

.chart-panel,
.score-panel,
.economics-card,
.horizon-card,
.table-panel,
.note-card {
  padding: 26px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading.compact {
  align-items: center;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 0.72rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.chart-legend .chart-unit {
  color: var(--text);
  font-weight: 750;
}

.legend-gross,
.gross-bar {
  background: var(--blue);
}

.legend-income,
.income-bar {
  background: var(--lime);
}

.legend-sales-cost,
.sales-cost-bar {
  background: rgba(255, 113, 133, 0.7);
}

.chart-scroll {
  overflow-x: auto;
  padding: 2px 0 4px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(48px, 1fr));
  gap: 8px;
  min-width: 720px;
  height: 250px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--line-strong);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% 25%;
}

.chart-column {
  display: grid;
  grid-template-rows: auto 1fr 24px;
  gap: 4px;
  min-width: 0;
}

.chart-value-labels {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.chart-value-labels b {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 800;
  text-overflow: clip;
  white-space: nowrap;
}

.chart-value-labels .gross-value {
  color: var(--blue);
}

.chart-value-labels .income-value {
  color: var(--lime-strong);
}

.chart-value-labels .income-value.is-negative {
  color: var(--red);
}

.chart-value-labels .sales-cost-value {
  color: var(--red);
}

.chart-column > span {
  color: var(--muted-2);
  font-size: 0.7rem;
  text-align: center;
}

.chart-values {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 100%;
}

.gross-bar,
.income-bar,
.sales-cost-bar {
  display: block;
  max-height: 100%;
  border-radius: 6px 6px 2px 2px;
}

.gross-bar {
  flex: 0 1 17px;
}

.income-bar {
  flex: 0 1 12px;
}

.income-bar.is-negative {
  min-height: 4px;
  background: var(--red);
}

.sales-cost-bar {
  flex: 0 1 8px;
}

.score-panel {
  display: flex;
  flex-direction: column;
}

.score-panel > p,
.horizon-card > p,
.warning-card > p {
  color: var(--muted);
}

.score-panel > p {
  margin: 12px 0 18px;
  font-size: 0.9rem;
}

.market-scale {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.market-scale-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  box-shadow: 0 0 18px rgba(84, 216, 242, 0.4);
  transition: width 260ms ease;
}

.score-list {
  display: grid;
  margin-top: 18px;
}

.score-list > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.score-list span {
  color: var(--muted);
  font-size: 0.8rem;
}

.score-list strong {
  font-size: 0.88rem;
  white-space: nowrap;
}

.risk-note {
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgba(255, 173, 102, 0.18);
  border-radius: 13px;
  color: #d8b894;
  background: rgba(255, 173, 102, 0.055);
  font-size: 0.78rem;
}

.total-chip {
  color: var(--cyan);
  border-color: rgba(84, 216, 242, 0.2);
}

.waterfall {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 38px minmax(210px, 1fr) 38px minmax(160px, 0.7fr);
  align-items: stretch;
  gap: 8px;
}

.waterfall-group,
.waterfall-result {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(3, 11, 22, 0.3);
}

.waterfall-group h3 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.income-group h3 {
  color: var(--lime);
}

.cost-group h3 {
  color: var(--orange);
}

.waterfall-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
}

.waterfall-row span {
  color: var(--muted);
  font-size: 0.76rem;
}

.waterfall-row span small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.68rem;
}

.waterfall-row strong {
  font-size: 0.78rem;
  white-space: nowrap;
}

.waterfall-row.total {
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.waterfall-row.total span,
.waterfall-row.total strong {
  color: var(--text);
  font-size: 0.86rem;
}

.zero-cost {
  color: var(--positive);
}

.mix-track {
  display: flex;
  height: 5px;
  overflow: hidden;
  margin: 5px 0;
  border-radius: 99px;
}

.mix-track i {
  display: block;
  transition: width 260ms ease;
}

#subscription-mix {
  background: var(--blue);
}

#app-mix {
  background: var(--lime);
}

.waterfall-operator {
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 1.4rem;
}

.waterfall-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-color: rgba(200, 243, 91, 0.22);
  background: linear-gradient(145deg, rgba(200, 243, 91, 0.09), rgba(3, 11, 22, 0.32));
}

.waterfall-result span {
  color: var(--muted);
  font-size: 0.75rem;
}

.waterfall-result strong {
  margin-top: 7px;
  color: var(--lime-strong);
  font-size: clamp(1.3rem, 2.3vw, 2.15rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.waterfall-result small {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.technical-scope-note {
  display: grid;
  grid-template-columns: minmax(190px, 0.5fr) minmax(0, 1.5fr);
  gap: 22px;
  align-items: center;
  margin-top: 14px;
  padding: 17px 19px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 3% 20%, rgba(83, 203, 177, 0.2), transparent 28%),
    rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.technical-scope-note > div {
  display: grid;
  gap: 4px;
}

.technical-scope-note strong {
  color: #116f61;
  font-size: 1.65rem;
  line-height: 1;
}

.technical-scope-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.horizon-card {
  position: relative;
  overflow: hidden;
}

.horizon-card::before {
  content: "36";
  position: absolute;
  right: -8px;
  bottom: -45px;
  color: rgba(255, 255, 255, 0.025);
  font-size: 12rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.horizon-number {
  position: relative;
  z-index: 1;
  display: grid;
  margin-top: 24px;
}

.horizon-number span {
  color: var(--muted);
  font-size: 0.78rem;
}

.horizon-number strong {
  margin-top: 5px;
  color: var(--cyan);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.055em;
}

.horizon-card dl {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.horizon-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.horizon-card dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.horizon-card dd {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
}

.horizon-card > p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.74rem;
}

.table-scroll {
  overflow-x: auto;
}

.mobile-swipe-hint {
  display: none;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

td {
  white-space: nowrap;
}

th:first-child,
td:first-child {
  padding-left: 0;
  text-align: left;
}

th {
  padding-right: 8px;
  padding-left: 8px;
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: normal;
  vertical-align: bottom;
}

td {
  color: var(--muted);
  font-size: 0.8rem;
}

td strong {
  color: var(--text);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.018);
}

.month-cell {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  font-weight: 700;
}

.positive-number {
  color: var(--positive);
  font-weight: 650;
}

.negative-number {
  color: var(--red) !important;
  font-weight: 650;
}

.note-card ul {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.note-card li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.84rem;
}

.note-card li::before {
  content: "";
  position: absolute;
  top: 0.63em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--lime);
}

.warning-card {
  border-color: rgba(255, 173, 102, 0.18);
}

.warning-card.is-alert {
  border-color: rgba(255, 113, 133, 0.35);
  background: linear-gradient(145deg, rgba(68, 29, 42, 0.58), rgba(16, 24, 39, 0.78));
}

.warning-card.is-alert .panel-kicker,
.warning-card.is-alert h2 {
  color: #ffb1bd;
}

.warning-card p {
  margin: 15px 0 0;
  font-size: 0.84rem;
}

.warning-card a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--cyan);
  font-size: 0.82rem;
  text-decoration: none;
}

.warning-card a:hover {
  text-decoration: underline;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 4px 0;
  color: var(--muted-2);
  font-size: 0.72rem;
}

footer > div:first-child {
  display: grid;
  gap: 3px;
}

footer strong {
  color: var(--muted);
  letter-spacing: 0.05em;
}

.source-links {
  display: flex;
  gap: 18px;
}

.source-links a {
  text-decoration: none;
}

.source-links a:hover {
  color: var(--text);
}

noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  max-width: 360px;
  padding: 16px;
  border: 1px solid var(--red);
  border-radius: 14px;
  color: var(--text);
  background: #25121a;
}

/* Light liquid-glass theme */
.ambient {
  width: 520px;
  height: 520px;
  filter: blur(105px);
  animation: liquid-drift 18s ease-in-out infinite alternate;
}

.ambient-a {
  border-radius: 42% 58% 65% 35% / 52% 37% 63% 48%;
}

.ambient-b {
  border-radius: 61% 39% 45% 55% / 39% 58% 42% 61%;
  animation-delay: -8s;
}

@keyframes liquid-drift {
  from { transform: translate3d(-2%, -2%, 0) rotate(-4deg) scale(0.96); }
  to { transform: translate3d(4%, 5%, 0) rotate(7deg) scale(1.08); }
}

.topbar {
  border-color: rgba(255, 255, 255, 0.72);
}

.brand-mark {
  border-color: rgba(19, 137, 186, 0.28);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(57, 108, 229, 0.12);
}

.brand-mark i {
  background: linear-gradient(180deg, #4b84f4, #735cd4);
}

.live-dot {
  background: #24ae8d;
  box-shadow: 0 0 18px rgba(36, 174, 141, 0.48);
}

.glass-panel {
  border-color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 7% 0%, rgba(255, 255, 255, 0.96), transparent 38%),
    linear-gradient(142deg, rgba(255, 255, 255, 0.7), rgba(244, 251, 255, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 1px 0 0 rgba(255, 255, 255, 0.54),
    0 24px 70px rgba(62, 100, 139, 0.14),
    0 3px 10px rgba(53, 91, 131, 0.06);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  backdrop-filter: blur(28px) saturate(165%);
}

.control-deck {
  background:
    radial-gradient(circle at 92% -10%, rgba(112, 228, 214, 0.26), transparent 32%),
    radial-gradient(circle at 8% 120%, rgba(120, 143, 255, 0.2), transparent 34%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.79), rgba(244, 250, 255, 0.48));
}

.panel-kicker,
.eyebrow {
  color: #137a6b;
}

.segment-control,
.scenario-control {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 4px rgba(57, 95, 134, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8);
}

.segment-control button:hover,
.scenario-control button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
}

.segment-control button.is-active,
.scenario-control button.is-active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.42), transparent 38%),
    linear-gradient(118deg, #496fe8, #765bd5 54%, #24a7ae);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 10px 26px rgba(78, 94, 197, 0.24);
}

.scenario-control button.is-active .scenario-index {
  color: rgba(255, 255, 255, 0.66);
}

.hero-card {
  border-color: rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.98), transparent 35%),
    radial-gradient(circle at 93% 12%, rgba(84, 210, 206, 0.31), transparent 31%),
    radial-gradient(circle at 58% 112%, rgba(132, 96, 235, 0.2), transparent 40%),
    linear-gradient(125deg, rgba(255, 255, 255, 0.78), rgba(224, 242, 255, 0.5));
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(255, 255, 255, 0.45),
    0 30px 80px rgba(53, 90, 131, 0.17);
}

.hero-card::after {
  top: -118px;
  right: -86px;
  width: 330px;
  height: 330px;
  border: 78px solid rgba(255, 255, 255, 0.29);
  box-shadow: inset 0 0 32px rgba(74, 123, 213, 0.08), 0 0 46px rgba(255, 255, 255, 0.2);
}

.assumption-pill,
.total-chip,
.table-hint {
  border-color: rgba(255, 255, 255, 0.82);
  color: #506b84;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.hero-number-block strong {
  color: #235fba;
  background: linear-gradient(100deg, #155e9e, #6551c8 55%, #137f74);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-number-block strong.negative-number {
  color: var(--red);
  background: none;
  -webkit-text-fill-color: var(--red);
}

.verdict-icon {
  color: #ffffff;
  background: linear-gradient(145deg, #2fb990, #187a5d);
  box-shadow: 0 7px 16px rgba(23, 120, 82, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.verdict.is-caution .verdict-icon {
  background: linear-gradient(145deg, #eda457, #b96a18);
}

.verdict.is-negative .verdict-icon {
  background: linear-gradient(145deg, #ec6a83, #bf3453);
}

.metric-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.92), transparent 54%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(236, 247, 255, 0.4));
}

.accent-card {
  border-color: rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(circle at 100% 0%, rgba(100, 218, 208, 0.28), transparent 52%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(224, 246, 248, 0.5));
}

.accent-card strong {
  color: #117c8c;
}

.bar-chart {
  border-color: var(--line-strong);
  background-image: linear-gradient(to bottom, rgba(48, 87, 126, 0.12) 1px, transparent 1px);
}

.legend-gross,
.gross-bar {
  background: linear-gradient(180deg, #557fe9, #3a63cf);
}

.legend-income,
.income-bar {
  background: linear-gradient(180deg, #4fd1b4, #1d9f86);
}

.income-bar.is-negative {
  background: linear-gradient(180deg, rgba(229, 96, 123, 0.88), rgba(199, 55, 87, 0.78));
}

.legend-sales-cost,
.sales-cost-bar {
  background: linear-gradient(180deg, rgba(229, 96, 123, 0.74), rgba(199, 55, 87, 0.62));
}

.market-scale,
.mix-track {
  background: rgba(52, 87, 123, 0.08);
  box-shadow: inset 0 1px 2px rgba(45, 80, 121, 0.09);
}

.market-scale-fill {
  background: linear-gradient(90deg, #3d78ec, #4fcfb4);
  box-shadow: 0 0 18px rgba(61, 120, 236, 0.22);
}

.risk-note {
  border-color: rgba(183, 106, 25, 0.16);
  color: #8c571e;
  background: rgba(255, 236, 206, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.total-chip {
  color: #1279a3;
  border-color: rgba(255, 255, 255, 0.82);
}

.waterfall-group,
.waterfall-result {
  border-color: rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(235, 247, 255, 0.25));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 7px 22px rgba(53, 91, 131, 0.06);
}

.income-group h3 {
  color: #147967;
}

.cost-group h3 {
  color: #a95d16;
}

#subscription-mix {
  background: linear-gradient(90deg, #396ce5, #6a70eb);
}

#app-mix {
  background: linear-gradient(90deg, #39b99d, #6dd7bf);
}

.waterfall-result {
  border-color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 90% 10%, rgba(109, 215, 191, 0.35), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.69), rgba(223, 246, 243, 0.45));
}

.waterfall-result strong {
  color: #116f61;
}

.horizon-card {
  background:
    radial-gradient(circle at 95% 8%, rgba(120, 98, 225, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(237, 239, 255, 0.42));
}

.horizon-card::before {
  color: rgba(57, 79, 137, 0.035);
}

.horizon-number strong {
  color: #3a61bd;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.38);
}

.month-cell {
  border-color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.note-card li::before {
  background: linear-gradient(145deg, #4c82ef, #2cb79a);
}

.warning-card {
  border-color: rgba(255, 255, 255, 0.8);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 191, 111, 0.2), transparent 43%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.67), rgba(255, 245, 226, 0.4));
}

.warning-card.is-alert {
  border-color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 100% 0%, rgba(236, 106, 137, 0.23), transparent 43%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 232, 239, 0.48));
}

.warning-card.is-alert .panel-kicker,
.warning-card.is-alert h2 {
  color: #a82d4b;
}

.warning-card a {
  color: #166f9b;
}

noscript {
  color: #7e1f38;
  background: rgba(255, 236, 241, 0.92);
}

* {
  scrollbar-color: rgba(70, 111, 154, 0.32) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 99px;
  background: rgba(70, 111, 154, 0.28);
  background-clip: padding-box;
}

@media (max-width: 1120px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  main > *,
  .control-deck,
  .control-grid,
  .summary-grid,
  .dashboard-grid,
  .economics-grid,
  .notes-grid,
  .chart-panel,
  .economics-card,
  .table-panel {
    min-width: 0;
  }

  .control-grid,
  .summary-grid,
  .dashboard-grid,
  .economics-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 315px;
  }

}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 24px), var(--content));
    padding-bottom: 28px;
  }

  .topbar {
    min-height: 68px;
    gap: 16px;
  }

  .document-meta {
    font-size: 0.65rem;
  }

  main {
    gap: 14px;
    padding-top: 16px;
  }

  .control-deck,
  .hero-card,
  .chart-panel,
  .score-panel,
  .economics-card,
  .horizon-card,
  .table-panel,
  .note-card {
    padding: 20px;
    border-radius: 20px;
  }

  .control-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .control-heading p {
    max-width: none;
    text-align: left;
    font-size: 0.85rem;
  }

  .scenario-control {
    grid-template-columns: 1fr;
  }

  .segment-control button,
  .scenario-control button {
    min-height: 48px;
  }

  .scenario-control small {
    white-space: normal;
  }

  .summary-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .hero-number-block strong {
    font-size: clamp(2.5rem, 13vw, 4.2rem);
  }

  .metric-card {
    min-height: 140px;
  }

  .waterfall {
    grid-template-columns: 1fr;
  }

  .waterfall-operator {
    min-height: 28px;
  }

  .technical-scope-note {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  footer {
    flex-direction: column;
  }

  .source-links {
    flex-wrap: wrap;
  }

  .chart-scroll,
  .table-scroll {
    max-width: 100%;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .table-scroll {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .mobile-swipe-hint {
    display: block;
    margin: -5px 0 13px;
    color: var(--muted);
    font-size: 0.74rem;
  }

  th:first-child,
  td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    padding-left: 8px;
    background: rgba(243, 250, 255, 0.96);
    box-shadow: 10px 0 18px rgba(53, 91, 131, 0.05);
  }

  thead th:first-child {
    z-index: 2;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .page-shell {
    width: calc(100% - 20px);
  }

  .topbar {
    min-height: 64px;
    gap: 10px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
    font-size: 0.96rem;
    letter-spacing: 0.12em;
  }

  .brand img {
    width: 27px !important;
    height: 27px !important;
  }

  .document-meta {
    max-width: 128px;
    text-align: right;
    font-size: 0.6rem;
    line-height: 1.3;
  }

  .segment-control {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  main {
    gap: 12px;
    padding-top: 12px;
  }

  .control-deck,
  .hero-card,
  .chart-panel,
  .score-panel,
  .economics-card,
  .horizon-card,
  .table-panel,
  .note-card {
    padding: 16px;
    border-radius: 18px;
  }

  .control-heading {
    gap: 8px;
    margin-bottom: 18px;
  }

  .control-heading h1 {
    max-width: 100%;
    font-size: 1.65rem;
    overflow-wrap: anywhere;
  }

  .control-heading p {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .panel-kicker,
  .eyebrow {
    font-size: 0.68rem;
  }

  .control-grid {
    gap: 14px;
  }

  legend {
    margin-bottom: 8px;
    font-size: 0.78rem;
  }

  .segment-control,
  .scenario-control {
    padding: 4px;
    border-radius: 14px;
  }

  .segment-control button {
    min-height: 58px;
    padding: 8px 3px;
  }

  .segment-control button strong {
    font-size: 1rem;
  }

  .segment-control button span {
    font-size: 0.65rem;
    line-height: 1.25;
  }

  .scenario-control button {
    min-height: 56px;
    padding: 9px 10px;
  }

  .scenario-control small {
    font-size: 0.72rem;
  }

  .summary-grid,
  .dashboard-grid,
  .economics-grid,
  .notes-grid {
    gap: 12px;
  }

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

  .metric-card {
    min-height: 116px;
    padding: 15px;
    border-radius: 16px;
  }

  .metric-card > span {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .metric-card strong {
    padding-top: 13px;
    font-size: clamp(1.35rem, 7vw, 1.8rem);
  }

  .metric-card small {
    margin-top: 6px;
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .hero-card {
    min-height: 0;
  }

  .hero-card-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hero-number-block {
    margin-top: 22px;
  }

  .hero-number-block > span {
    font-size: 0.82rem;
  }

  .hero-number-block strong {
    font-size: clamp(2.7rem, 14vw, 3.5rem);
  }

  .hero-number-block small {
    font-size: 0.73rem;
  }

  .verdict {
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
  }

  .verdict strong {
    font-size: 0.9rem;
  }

  .verdict p {
    font-size: 0.78rem;
  }

  .section-heading {
    gap: 9px;
    margin-bottom: 17px;
  }

  .section-heading h2,
  .score-panel h2,
  .horizon-card h2,
  .note-card h2 {
    font-size: 1.3rem;
    overflow-wrap: anywhere;
  }

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

  .total-chip,
  .table-hint {
    min-height: 26px;
    max-width: 100%;
    font-size: 0.68rem;
    white-space: normal;
  }

  .chart-legend {
    justify-content: flex-start;
    gap: 7px 10px;
    font-size: 0.67rem;
  }

  .chart-scroll {
    overflow-x: hidden;
  }

  .bar-chart {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 3px;
    width: 100%;
    min-width: 0;
    height: 205px;
    padding: 7px 0 0;
  }

  .chart-column {
    grid-template-rows: auto 1fr 19px;
    gap: 2px;
  }

  .chart-value-labels {
    gap: 1px;
  }

  .chart-value-labels b {
    font-size: 0.68rem;
  }

  .chart-column > span {
    font-size: 0.58rem;
  }

  .chart-values {
    gap: 2px;
  }

  .gross-bar {
    flex-basis: 7px;
    border-radius: 4px 4px 1px 1px;
  }

  .income-bar {
    flex-basis: 4px;
    border-radius: 3px 3px 1px 1px;
  }

  .sales-cost-bar {
    flex-basis: 3px;
    border-radius: 3px 3px 1px 1px;
  }

  .score-panel > p {
    margin: 9px 0 15px;
    font-size: 0.82rem;
  }

  .score-list {
    margin-top: 14px;
  }

  .score-list > div {
    gap: 12px;
    padding: 10px 0;
  }

  .score-list span,
  .score-list strong {
    font-size: 0.76rem;
  }

  .risk-note {
    margin-top: 14px;
    padding: 11px;
    font-size: 0.74rem;
  }

  .waterfall {
    gap: 6px;
  }

  .waterfall-group,
  .waterfall-result {
    padding: 15px;
  }

  .waterfall-operator {
    min-height: 22px;
    font-size: 1.15rem;
  }

  .waterfall-row {
    gap: 10px;
  }

  .waterfall-row span {
    font-size: 0.73rem;
  }

  .waterfall-row strong {
    font-size: 0.76rem;
  }

  .waterfall-result {
    min-height: 124px;
  }

  .technical-scope-note {
    margin-top: 10px;
    padding: 14px;
  }

  .technical-scope-note strong {
    font-size: 1.45rem;
  }

  .technical-scope-note p {
    font-size: 0.76rem;
  }

  .horizon-card::before {
    font-size: 6.5rem;
  }

  .horizon-number {
    margin: 20px 0 15px;
    padding-bottom: 16px;
  }

  .horizon-number strong {
    font-size: 2.05rem;
  }

  .horizon-card dl > div {
    gap: 12px;
  }

  .horizon-card dt,
  .horizon-card dd {
    font-size: 0.75rem;
  }

  .table-scroll {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  table {
    min-width: 1120px;
  }

  th,
  td {
    padding: 11px 9px;
  }

  .note-card ul {
    gap: 9px;
    margin-top: 16px;
  }

  .note-card li,
  .warning-card p,
  .warning-card a {
    font-size: 0.78rem;
  }

  footer {
    gap: 15px;
    padding: 18px 3px 0;
    font-size: 0.68rem;
  }

  .source-links {
    gap: 10px 16px;
  }
}

@media (max-width: 360px) {
  .page-shell {
    width: calc(100% - 16px);
  }

  .control-deck,
  .hero-card,
  .chart-panel,
  .score-panel,
  .economics-card,
  .horizon-card,
  .table-panel,
  .note-card {
    padding: 14px;
  }

  .brand {
    font-size: 0.9rem;
  }

  .document-meta {
    max-width: 116px;
    font-size: 0.56rem;
  }

  .segment-control button span {
    font-size: 0.61rem;
  }

  .metric-card {
    padding: 13px;
  }

  .metric-card strong {
    font-size: 1.35rem;
  }

  .table-scroll {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }
}

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

@media print {
  :root {
    color-scheme: light;
  }

  body {
    color: #111827;
    background: #ffffff;
  }

  .ambient {
    display: none;
  }

  .page-shell {
    width: 100%;
  }

  .glass-panel {
    break-inside: avoid;
    color: #111827;
    border-color: #d7dde5;
    background: #ffffff;
    box-shadow: none;
  }

  .control-deck {
    display: none;
  }
}
