:root {
  color-scheme: light;
  --ink-950: #08111f;
  --ink-900: #0d1829;
  --ink-850: #111f33;
  --ink-800: #17263b;
  --ink-700: #2e3d52;
  --ink-600: #4b5a6e;
  --ink-500: #69778a;
  --ink-400: #8d99a9;
  --ink-300: #b9c2ce;
  --ink-200: #d9dfe7;
  --ink-150: #e8ecf1;
  --ink-100: #f2f5f8;
  --ink-50: #f8fafc;
  --paper: #ffffff;
  --canvas: #edf1f5;
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --blue-soft: #eaf1ff;
  --teal: #0f8c83;
  --teal-soft: #e7f7f4;
  --orange: #e76024;
  --orange-soft: #fff0e9;
  --gold: #c68c2c;
  --green: #1c8c5e;
  --green-soft: #e9f7f0;
  --red: #c84444;
  --red-soft: #fff0ef;
  --shadow-xs: 0 1px 2px rgba(8, 17, 31, 0.05);
  --shadow-sm: 0 8px 24px rgba(20, 34, 54, 0.07);
  --shadow-md: 0 18px 50px rgba(20, 34, 54, 0.11);
  --shadow-lg: 0 32px 80px rgba(8, 17, 31, 0.18);
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --sidebar-width: 272px;
  --workspace-max: 1440px;
  --transition: 180ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), transparent 36%),
    var(--canvas);
  color: var(--ink-900);
  font-family:
    "Aptos", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(33, 55, 82, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 55, 82, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

svg {
  display: block;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.22;
}

.ambient-a {
  top: -260px;
  right: 2vw;
  background: #8cb8ff;
}

.ambient-b {
  bottom: -300px;
  left: 26vw;
  background: #ffd5b9;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: min(100%, 1660px);
  min-height: 100vh;
  margin: 0 auto;
}

/* Sidebar */

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: auto;
  padding: 30px 24px 24px;
  color: #f6f9ff;
  background:
    radial-gradient(circle at 88% 4%, rgba(64, 123, 237, 0.28), transparent 28%),
    linear-gradient(165deg, #101d31 0%, #081321 58%, #07101c 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.sidebar::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.brand-lockup,
.sidebar-intro,
.workflow-nav,
.sidebar-source,
.sidebar-footnote {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-height: 44px;
}

.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 5px);
  align-items: end;
  gap: 4px;
  width: 25px;
  height: 30px;
}

.brand-mark span {
  width: 5px;
  border-radius: 5px;
  background: linear-gradient(to top, #437df1, #8fb9ff);
  box-shadow: 0 0 15px rgba(82, 137, 255, 0.42);
}

.brand-mark span:nth-child(1) {
  height: 16px;
}

.brand-mark span:nth-child(2) {
  height: 28px;
}

.brand-mark span:nth-child(3) {
  height: 21px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.sidebar-intro {
  margin-top: 44px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kicker-light {
  color: #8bb6ff;
}

.sidebar-intro h1 {
  margin-top: 10px;
  font-size: clamp(28px, 2.1vw, 36px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.sidebar-intro p {
  max-width: 200px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  line-height: 1.75;
}

.workflow-nav {
  display: grid;
  gap: 5px;
  margin-top: 36px;
}

.workflow-link {
  position: relative;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  color: rgba(255, 255, 255, 0.48);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.workflow-link:hover {
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.045);
  transform: translateX(2px);
}

.workflow-link.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(49, 111, 232, 0.22), rgba(255, 255, 255, 0.04));
  border-color: rgba(118, 164, 255, 0.2);
}

.workflow-link.is-active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  content: "";
  background: #77a7ff;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(119, 167, 255, 0.7);
}

.workflow-link > span:first-child {
  padding-top: 1px;
  color: #6f8ebb;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.workflow-link > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-link strong {
  font-size: 12px;
  font-weight: 500;
}

.workflow-link small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.33);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-source {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 15px 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
}

.source-orbit {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(107, 158, 255, 0.34);
  border-radius: 50%;
}

.source-orbit::before,
.source-orbit::after {
  position: absolute;
  inset: 6px;
  content: "";
  border: 1px dashed rgba(107, 158, 255, 0.28);
  border-radius: 50%;
}

.source-orbit::after {
  inset: 13px;
  background: #6fa1ff;
  border: 0;
  box-shadow: 0 0 12px rgba(111, 161, 255, 0.84);
}

.source-orbit span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #9bc0ff;
  border-radius: 50%;
}

.source-orbit span:nth-child(1) {
  top: 4px;
  left: 24px;
}

.source-orbit span:nth-child(2) {
  top: 24px;
  left: 4px;
}

.source-orbit span:nth-child(3) {
  right: 1px;
  bottom: 8px;
}

.sidebar-source > div:nth-child(2) {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sidebar-source small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.sidebar-source strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  color: var(--blue);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 500;
}

.text-button:hover {
  color: #174dc0;
}

.text-button-light {
  color: rgba(255, 255, 255, 0.7);
}

.text-button-light:hover {
  color: #fff;
}

.sidebar-source .text-button {
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding: 0 0 0 45px;
  color: #8bb6ff;
  font-size: 9px;
}

.sidebar-footnote {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 0 5px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 8px;
}

.status-pulse {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: #35c38c;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(53, 195, 140, 0.1);
}

.status-pulse::after {
  position: absolute;
  inset: -5px;
  content: "";
  border: 1px solid rgba(53, 195, 140, 0.42);
  border-radius: 50%;
  animation: pulse 2.3s ease-out infinite;
}

/* Main workspace and top bar */

.workspace {
  min-width: 0;
  padding: 0 34px 30px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  margin: 0 -34px;
  padding: 0 34px;
  background: rgba(237, 241, 245, 0.86);
  border-bottom: 1px solid rgba(117, 135, 158, 0.14);
  backdrop-filter: blur(18px);
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.context-label {
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.context-divider {
  width: 1px;
  height: 15px;
  background: var(--ink-200);
}

#topbarBrand {
  overflow: hidden;
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.data-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 0 11px;
  color: var(--ink-600);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 500;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot.is-warning {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(231, 96, 36, 0.11);
}

.status-dot.is-ok {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(28, 140, 94, 0.11);
}

.icon-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.icon-button {
  color: var(--ink-600);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--ink-200);
}

.icon-button:hover {
  color: var(--ink-900);
  background: #fff;
  border-color: var(--ink-300);
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button-dark {
  color: #fff;
  background: var(--ink-900);
  border: 1px solid var(--ink-900);
  box-shadow: 0 6px 16px rgba(8, 17, 31, 0.15);
}

.button-dark:hover {
  background: #1b2b42;
  border-color: #1b2b42;
  box-shadow: 0 8px 22px rgba(8, 17, 31, 0.2);
}

.button-accent {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.button-accent:hover {
  background: #174fc4;
  border-color: #174fc4;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.27);
}

.button-outline {
  color: var(--ink-800);
  background: #fff;
  border: 1px solid var(--ink-200);
}

.button-outline:hover {
  background: var(--ink-50);
  border-color: var(--ink-300);
}

.button-quiet {
  color: var(--ink-600);
  background: transparent;
  border: 1px solid transparent;
}

.button-quiet:hover {
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--ink-200);
}

.button-inverse {
  color: var(--ink-950);
  background: #fff;
  border: 1px solid #fff;
}

.button-inverse:hover {
  background: #e9f1ff;
  border-color: #e9f1ff;
}

.button-full {
  width: 100%;
}

.presentation-nav {
  display: none;
}

/* Brief */

.brief-panel {
  position: relative;
  margin-top: 22px;
  padding: 22px 24px 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(167, 179, 195, 0.46);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.brief-panel::before {
  position: absolute;
  top: -110px;
  right: -90px;
  width: 280px;
  height: 280px;
  content: "";
  background: radial-gradient(circle, rgba(37, 99, 235, 0.09), transparent 66%);
  pointer-events: none;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.section-heading > div:first-child {
  max-width: 760px;
}

.section-index {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.section-heading h2 {
  color: var(--ink-950);
  font-size: clamp(24px, 2.35vw, 38px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 690px;
  margin-top: 9px;
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.7;
}

.brief-heading {
  position: relative;
  z-index: 1;
  align-items: center;
}

.brief-heading h2 {
  font-size: clamp(22px, 1.9vw, 30px);
}

.brief-live {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  color: var(--ink-600);
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 999px;
  font-size: 9px;
  white-space: nowrap;
}

.brief-live.is-calculating .status-pulse {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.brief-live.is-calculating .status-pulse::after {
  border-color: rgba(37, 99, 235, 0.38);
}

.brief-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px 14px;
  align-items: end;
  margin-top: 21px;
  padding-top: 19px;
  border-top: 1px solid var(--ink-150);
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field-label {
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.control {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 500;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.control:hover {
  border-color: var(--ink-300);
}

.control:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: 0;
}

input[type="date"].control {
  min-width: 0;
  padding-right: 7px;
}

select.control {
  padding-right: 34px;
  appearance: none;
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap .icon {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 14px;
  height: 14px;
  color: var(--ink-500);
  pointer-events: none;
  transform: translateY(-50%);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  height: 39px;
  padding: 3px;
  background: var(--ink-100);
  border: 1px solid var(--ink-150);
  border-radius: 9px;
}

.segmented button {
  padding: 0 4px;
  color: var(--ink-500);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  transition:
    color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.segmented button:hover {
  color: var(--ink-900);
}

.segmented button.is-active {
  color: var(--ink-950);
  background: #fff;
  box-shadow: 0 2px 7px rgba(20, 34, 54, 0.09);
}

.media-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.media-toggle button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  height: 39px;
  padding: 0 9px;
  color: var(--ink-500);
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: 9px;
  font-size: 9px;
  font-weight: 500;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.media-toggle button .icon {
  width: 15px;
  height: 15px;
}

.media-toggle button i {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  background: var(--ink-300);
  border-radius: 50%;
}

.media-toggle button[aria-pressed="true"] {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.28);
}

.media-toggle button[aria-pressed="true"] i {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.media-toggle button:not([aria-pressed="true"]):hover {
  color: var(--ink-800);
  background: #fff;
}

.brief-action {
  display: flex;
  grid-column: span 2;
  gap: 7px;
  justify-content: flex-end;
  min-width: 0;
}

.brief-action .button {
  min-height: 39px;
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.45fr);
  gap: clamp(30px, 4vw, 72px);
  min-height: 440px;
  margin-top: 22px;
  padding: clamp(34px, 4vw, 58px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 15%, rgba(63, 132, 245, 0.38), transparent 30%),
    radial-gradient(circle at 10% 100%, rgba(17, 140, 131, 0.24), transparent 34%),
    linear-gradient(135deg, #101e33 0%, #0a1526 58%, #07101c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.hero::after {
  position: absolute;
  right: 22%;
  bottom: -72%;
  width: 560px;
  height: 560px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.018),
    0 0 0 140px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, black, transparent 72%);
}

.hero-glow {
  position: absolute;
  top: -150px;
  right: 20%;
  width: 430px;
  height: 430px;
  background: rgba(57, 123, 247, 0.18);
  border-radius: 50%;
  filter: blur(80px);
}

.hero-main,
.hero-scorecard {
  position: relative;
  z-index: 2;
}

.hero-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 25px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.badge-inverse {
  color: #cfe0ff;
  background: rgba(77, 137, 250, 0.18);
  border: 1px solid rgba(122, 167, 255, 0.28);
}

.badge-ghost {
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.hero-main h2 {
  max-width: 860px;
  margin-top: 11px;
  font-size: clamp(37px, 4.6vw, 72px);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-main > p {
  max-width: 650px;
  margin-top: 17px;
  color: rgba(255, 255, 255, 0.61);
  font-size: 12px;
  line-height: 1.8;
}

.hero-thesis {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 670px;
  margin-top: 24px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.045);
  border-left: 2px solid var(--blue-bright);
  border-radius: 0 10px 10px 0;
}

.hero-thesis > span {
  padding-top: 1px;
  color: #8fb9ff;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.hero-thesis p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  align-items: center;
  margin-top: 27px;
}

.hero-scorecard {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 324px;
  padding: 21px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 19px;
  backdrop-filter: blur(16px);
}

.scorecard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
}

.data-confidence {
  text-align: right;
}

.data-confidence.is-verified {
  color: #73dab4;
}

.budget-ring {
  --usage: 0%;
  position: relative;
  display: grid;
  place-items: center;
  width: 156px;
  height: 156px;
  margin: 24px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #101c2e 55%, transparent 56%),
    conic-gradient(#6ea2ff 0 var(--usage), rgba(255, 255, 255, 0.1) var(--usage) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 35px rgba(0, 0, 0, 0.14);
  transition: background 300ms ease;
}

.budget-ring::after {
  position: absolute;
  inset: 10px;
  content: "";
  border: 1px dashed rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.budget-ring > div {
  display: grid;
  gap: 1px;
  text-align: center;
}

.budget-ring small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
}

.budget-ring strong {
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -0.045em;
}

.scorecard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.scorecard-metrics > div {
  display: grid;
  gap: 3px;
}

.scorecard-metrics small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
}

.scorecard-metrics strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sections */

.content-section {
  margin-top: clamp(52px, 6vw, 88px);
}

.section-note {
  display: grid;
  gap: 3px;
  min-width: 120px;
  text-align: right;
}

.mini-label {
  color: var(--ink-500);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-note strong {
  color: var(--ink-800);
  font-size: 15px;
  font-weight: 500;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Strategy cards */

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.plan-card {
  --plan-accent: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 23px;
  overflow: hidden;
  text-align: left;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.plan-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: var(--plan-accent);
  opacity: 0.75;
}

.plan-card::after {
  position: absolute;
  top: -85px;
  right: -90px;
  width: 230px;
  height: 230px;
  content: "";
  background: radial-gradient(circle, color-mix(in srgb, var(--plan-accent) 12%, transparent), transparent 68%);
  pointer-events: none;
}

.plan-card:hover {
  border-color: color-mix(in srgb, var(--plan-accent) 34%, var(--ink-200));
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.plan-card.is-selected {
  border-color: color-mix(in srgb, var(--plan-accent) 60%, #fff);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--plan-accent) 15%, transparent),
    var(--shadow-md);
}

.plan-card.is-selected::after {
  opacity: 1;
}

.plan-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-index {
  color: var(--ink-400);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.plan-selected {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--plan-accent);
  font-size: 8px;
  font-weight: 600;
}

.plan-selected::before {
  width: 5px;
  height: 5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.plan-card[aria-selected="false"] .plan-selected {
  visibility: hidden;
}

.plan-eyebrow {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  color: var(--plan-accent);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.plan-card h3 {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  color: var(--ink-950);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.plan-description {
  position: relative;
  z-index: 1;
  min-height: 52px;
  margin-top: 9px;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.7;
}

.plan-mix {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 17px;
}

.plan-mix div {
  padding: 9px 10px;
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 8px;
}

.plan-mix span {
  display: block;
  color: var(--ink-500);
  font-size: 8px;
}

.plan-mix strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-800);
  font-size: 11px;
  font-weight: 500;
}

.plan-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--ink-150);
}

.plan-metrics div {
  min-width: 0;
  padding: 0 8px;
  border-right: 1px solid var(--ink-150);
}

.plan-metrics div:first-child {
  padding-left: 0;
}

.plan-metrics div:last-child {
  padding-right: 0;
  border-right: 0;
}

.plan-metrics small {
  display: block;
  color: var(--ink-400);
  font-size: 7px;
}

.plan-metrics strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink-900);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Map */

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 3px;
  color: var(--ink-500);
  font-size: 8px;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-store {
  background: #fff;
  border: 2px solid var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.legend-bus {
  width: 12px;
  height: 2px;
  background: #397cf0;
  border-radius: 5px;
}

.legend-metro {
  background: var(--orange);
}

.geo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, 0.55fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 26px;
}

.map-card,
.map-side {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.map-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 59px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-150);
}

.map-toolbar > div:first-child {
  display: grid;
  gap: 2px;
}

.map-toolbar strong {
  color: var(--ink-900);
  font-size: 11px;
  font-weight: 500;
}

.map-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  color: var(--ink-600);
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 999px;
  font-size: 8px;
  white-space: nowrap;
}

.map-expand {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--ink-500);
  background: transparent;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
}

.map-expand:hover {
  color: var(--ink-900);
  background: var(--ink-50);
}

.map-expand .icon {
  width: 14px;
  height: 14px;
}

.map-stage {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  background:
    radial-gradient(circle at 55% 42%, rgba(37, 99, 235, 0.055), transparent 34%),
    linear-gradient(150deg, #f7f9fc 0%, #eef3f8 100%);
}

.map-stage::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.55;
  background-image: radial-gradient(rgba(71, 92, 118, 0.2) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom right, black, transparent 80%);
}

.city-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 500px;
}

.map-data-stamp {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 10px;
  color: rgba(75, 90, 110, 0.4);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.map-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 19px;
}

.map-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.map-side-head > div {
  min-width: 0;
}

.map-side-head h3 {
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink-900);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 0 7px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(28, 140, 94, 0.16);
  border-radius: 999px;
  font-size: 7px;
  font-weight: 600;
  white-space: nowrap;
}

.status-chip::before {
  width: 4px;
  height: 4px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.status-chip.is-warning {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: rgba(231, 96, 36, 0.15);
}

.status-chip.is-neutral {
  color: var(--ink-500);
  background: var(--ink-100);
  border-color: var(--ink-200);
}

.status-chip-blue {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.14);
}

.selected-media-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 24px 10px;
  text-align: center;
}

.selected-media-empty p {
  max-width: 210px;
  margin-top: 15px;
  color: var(--ink-500);
  font-size: 9px;
  line-height: 1.7;
}

.radar-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 50%;
}

.radar-mark::before,
.radar-mark::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.radar-mark::before {
  inset: 9px;
  border: 1px dashed rgba(37, 99, 235, 0.2);
}

.radar-mark::after {
  width: 7px;
  height: 7px;
  background: var(--blue);
  box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.08);
}

.radar-mark span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(37, 99, 235, 0.45);
  border-radius: 50%;
}

.radar-mark span:nth-child(1) {
  top: 12px;
  right: 13px;
}

.radar-mark span:nth-child(2) {
  right: 8px;
  bottom: 18px;
}

.radar-mark span:nth-child(3) {
  bottom: 10px;
  left: 15px;
}

.selected-media-detail {
  flex: 1;
  margin-top: 15px;
}

.media-detail-title {
  color: var(--ink-950);
  font-size: 15px;
  font-weight: 500;
}

.media-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.media-detail-meta span {
  padding: 4px 6px;
  color: var(--ink-600);
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 5px;
  font-size: 7px;
}

.media-reason {
  margin-top: 16px;
  padding: 12px;
  color: var(--ink-700);
  background: var(--blue-soft);
  border-left: 2px solid var(--blue);
  border-radius: 0 8px 8px 0;
  font-size: 9px;
  line-height: 1.7;
}

.media-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.media-facts > div {
  padding: 9px;
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 7px;
}

.media-facts span {
  display: block;
  color: var(--ink-400);
  font-size: 7px;
}

.media-facts strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-800);
  font-size: 10px;
  font-weight: 500;
}

.media-evidence {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 13px;
  color: var(--ink-500);
  font-size: 8px;
  line-height: 1.6;
}

.media-evidence .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.coverage-summary {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--ink-150);
}

.coverage-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-500);
  font-size: 8px;
}

.coverage-summary-head strong {
  color: var(--ink-900);
  font-size: 17px;
  font-weight: 500;
}

.coverage-track {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  background: var(--ink-100);
  border-radius: 999px;
}

.coverage-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #6ca1ff);
  border-radius: inherit;
  transition: width 420ms ease;
}

.zone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  color: var(--ink-600);
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 5px;
  font-size: 7px;
}

.zone-chip::before {
  width: 4px;
  height: 4px;
  content: "";
  background: var(--ink-300);
  border-radius: 50%;
}

.zone-chip.is-covered {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(28, 140, 94, 0.13);
}

.zone-chip.is-covered::before {
  background: var(--green);
}

.map-side-foot {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 13px;
  padding: 10px;
  color: var(--ink-500);
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 8px;
  font-size: 7px;
  line-height: 1.6;
}

.map-side-foot .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: var(--orange);
}

body.map-expanded .geo-layout {
  grid-template-columns: 1fr;
}

body.map-expanded .map-stage,
body.map-expanded .city-map {
  min-height: min(72vh, 780px);
}

/* Map SVG */

.map-district {
  fill: rgba(255, 255, 255, 0.4);
  stroke: rgba(94, 115, 141, 0.12);
  stroke-width: 1;
}

.map-road {
  fill: none;
  stroke: rgba(120, 139, 161, 0.13);
  stroke-width: 1.2;
}

.map-river {
  fill: none;
  stroke: rgba(86, 156, 220, 0.37);
  stroke-linecap: round;
  stroke-width: 26;
}

.map-river-highlight {
  fill: none;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-linecap: round;
  stroke-width: 4;
}

.map-target-zone {
  pointer-events: none;
}

.map-target-zone .zone-halo {
  fill: rgba(37, 99, 235, 0.04);
  stroke: rgba(37, 99, 235, 0.15);
  stroke-dasharray: 4 6;
  stroke-width: 1;
}

.map-target-zone .zone-core {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 3;
}

.map-target-zone.is-covered .zone-halo {
  fill: rgba(28, 140, 94, 0.07);
  stroke: rgba(28, 140, 94, 0.22);
}

.map-target-zone.is-covered .zone-core {
  fill: var(--green);
  stroke: #fff;
}

.map-zone-label {
  fill: #526176;
  font-size: 13px;
  font-weight: 500;
  paint-order: stroke;
  stroke: rgba(247, 250, 253, 0.92);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
}

.map-zone-index {
  fill: #8d99a9;
  font-size: 9px;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.map-route {
  fill: none;
  stroke: rgba(37, 99, 235, 0.38);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  transition:
    stroke var(--transition),
    opacity var(--transition),
    stroke-width var(--transition);
}

.map-route-hit {
  fill: none;
  stroke: transparent;
  stroke-linecap: round;
  stroke-width: 16;
  cursor: pointer;
}

.map-route-group:hover .map-route,
.map-route-group:focus-visible .map-route,
.map-route-group.is-selected .map-route {
  stroke: var(--blue);
  stroke-width: 4;
}

.map-route-group.is-dimmed {
  opacity: 0.12;
}

.map-route-node {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
}

.map-route-label {
  fill: #2a5fbc;
  font-size: 10px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(247, 250, 253, 0.9);
  stroke-width: 3px;
  pointer-events: none;
}

.map-metro-group {
  cursor: pointer;
}

.map-metro-halo {
  fill: rgba(231, 96, 36, 0.08);
  stroke: rgba(231, 96, 36, 0.2);
  stroke-width: 1;
  transition:
    fill var(--transition),
    stroke var(--transition),
    transform var(--transition);
}

.map-metro-core {
  fill: var(--orange);
  stroke: #fff;
  stroke-width: 2;
}

.map-metro-group:hover .map-metro-halo,
.map-metro-group:focus-visible .map-metro-halo,
.map-metro-group.is-selected .map-metro-halo {
  fill: rgba(231, 96, 36, 0.18);
  stroke: var(--orange);
  transform: scale(1.35);
  transform-origin: center;
}

.map-metro-group.is-dimmed {
  opacity: 0.16;
}

.map-metro-label {
  fill: #94604c;
  font-size: 9px;
  paint-order: stroke;
  stroke: rgba(247, 250, 253, 0.9);
  stroke-width: 3px;
  pointer-events: none;
}

.map-tooltip {
  pointer-events: none;
}

.map-tooltip rect {
  fill: #0c182a;
  filter: drop-shadow(0 8px 16px rgba(8, 17, 31, 0.25));
}

.map-tooltip text {
  fill: #fff;
  font-size: 10px;
  font-weight: 500;
}

/* Inventory */

.inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.inventory-summary-card {
  display: grid;
  align-content: center;
  min-height: 104px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.inventory-summary-card > span {
  color: var(--ink-500);
  font-size: 8px;
}

.inventory-summary-card strong {
  margin-top: 3px;
  color: var(--ink-950);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.inventory-summary-card small {
  margin-top: 1px;
  color: var(--ink-400);
  font-size: 7px;
}

.inventory-summary-card.is-confidence {
  background:
    radial-gradient(circle at 100% 0, rgba(231, 96, 36, 0.09), transparent 45%),
    #fff;
  border-color: rgba(231, 96, 36, 0.2);
}

.inventory-summary-card.is-confidence strong {
  color: var(--orange);
}

.table-card,
.schedule-table-card {
  margin-top: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  padding: 0 17px;
  border-bottom: 1px solid var(--ink-150);
}

.table-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--ink-100);
  border-radius: 8px;
}

.table-tab {
  min-height: 30px;
  padding: 0 11px;
  color: var(--ink-500);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 500;
}

.table-tab:hover {
  color: var(--ink-800);
}

.table-tab.is-active {
  color: var(--ink-900);
  background: #fff;
  box-shadow: 0 2px 7px rgba(20, 34, 54, 0.08);
}

.table-meta {
  color: var(--ink-400);
  font-size: 8px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--ink-150);
}

th {
  color: var(--ink-500);
  background: var(--ink-50);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

td {
  color: var(--ink-700);
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: #fafcff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.table-primary {
  display: block;
  color: var(--ink-900);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.table-secondary {
  display: block;
  margin-top: 2px;
  color: var(--ink-400);
  font-size: 7px;
  white-space: nowrap;
}

.table-number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  padding: 0 5px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 5px;
  font-size: 8px;
  font-weight: 600;
}

.level-badge.level-s {
  color: #9d6410;
  background: #fff6df;
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 8px;
  white-space: nowrap;
}

.table-status::before {
  width: 5px;
  height: 5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.table-status.is-warning {
  color: var(--orange);
}

.table-status.is-neutral {
  color: var(--ink-500);
}

.row-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  color: var(--blue);
  background: transparent;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 5px;
  font-size: 7px;
  white-space: nowrap;
}

.row-action:hover {
  background: var(--blue-soft);
}

.table-reason {
  display: block;
  max-width: 210px;
  color: var(--ink-500);
  font-size: 8px;
  line-height: 1.5;
}

.table-empty {
  padding: 36px 20px !important;
  color: var(--ink-400);
  text-align: center;
}

.table-footnote {
  padding: 12px 16px;
  color: var(--ink-400);
  background: var(--ink-50);
  border-top: 1px solid var(--ink-150);
  font-size: 7px;
  line-height: 1.6;
}

/* Schedule */

.execution-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 14px;
  margin-top: 26px;
}

.timeline-card,
.budget-card,
.delivery-card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.timeline-card,
.budget-card {
  padding: 20px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.card-heading > div {
  min-width: 0;
}

.card-heading h3 {
  margin-top: 4px;
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 19px;
  padding: 9px 11px;
  color: var(--ink-500);
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 8px;
  font-size: 7px;
}

.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.timeline-legend span::before {
  width: 11px;
  height: 4px;
  content: "";
  background: var(--ink-300);
  border-radius: 9px;
}

.timeline-legend span:nth-child(1)::before {
  background: #7890ab;
}

.timeline-legend span:nth-child(2)::before {
  background: #5b81c8;
}

.timeline-legend span:nth-child(3)::before {
  background: var(--blue);
}

.timeline-legend span:nth-child(4)::before {
  background: var(--teal);
}

.timeline-legend span:nth-child(5)::before {
  background: var(--orange);
}

.gantt {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.gantt-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.gantt-label {
  overflow: hidden;
  color: var(--ink-600);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-track {
  position: relative;
  height: 20px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(141, 153, 169, 0.13) 1px, transparent 1px),
    var(--ink-50);
  background-size: 12.5% 100%;
  border: 1px solid var(--ink-150);
  border-radius: 5px;
}

.gantt-bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  min-width: 3px;
  background: var(--blue);
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.gantt-bar.phase-prepare {
  background: #7890ab;
}

.gantt-bar.phase-production {
  background: #5b81c8;
}

.gantt-bar.phase-launch {
  background: var(--blue);
}

.gantt-bar.phase-live {
  background: var(--teal);
}

.gantt-bar.phase-monitor {
  background: var(--orange);
}

.gantt-date-label {
  position: absolute;
  top: 50%;
  right: 5px;
  color: rgba(75, 90, 110, 0.5);
  font-size: 7px;
  transform: translateY(-50%);
}

.budget-card {
  display: flex;
  flex-direction: column;
}

.budget-visual {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 17px;
  align-items: center;
  margin-top: 24px;
}

.budget-donut {
  --bus: 50%;
  --metro: 40%;
  position: relative;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background: conic-gradient(
    var(--blue) 0 var(--bus),
    var(--orange) var(--bus) calc(var(--bus) + var(--metro)),
    var(--ink-150) calc(var(--bus) + var(--metro)) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(20, 34, 54, 0.04);
}

.budget-donut::before {
  position: absolute;
  inset: 19px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ink-150);
}

.budget-donut > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1px;
  text-align: center;
}

.budget-donut small {
  color: var(--ink-400);
  font-size: 7px;
}

.budget-donut strong {
  color: var(--ink-950);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.budget-breakdown {
  display: grid;
  gap: 11px;
}

.budget-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--ink-150);
}

.budget-line:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.budget-line span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-500);
  font-size: 8px;
}

.budget-line span::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--ink-300);
  border-radius: 2px;
}

.budget-line.bus span::before {
  background: var(--blue);
}

.budget-line.metro span::before {
  background: var(--orange);
}

.budget-line.production span::before {
  background: var(--ink-300);
}

.budget-line strong {
  color: var(--ink-800);
  font-size: 9px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.budget-range {
  display: grid;
  grid-template-columns: auto minmax(60px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: auto;
  padding-top: 22px;
}

.budget-range > div:first-child,
.budget-range > div:last-child {
  display: grid;
  gap: 2px;
}

.budget-range > div:last-child {
  text-align: right;
}

.budget-range span {
  color: var(--ink-400);
  font-size: 7px;
}

.budget-range strong {
  color: var(--ink-700);
  font-size: 9px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.range-line {
  position: relative;
  height: 3px;
  margin-bottom: 5px;
  background: linear-gradient(90deg, #f1c5aa, var(--orange), #f1c5aa);
  border-radius: 5px;
}

.range-line span {
  position: absolute;
  top: 50%;
  left: 62%;
  width: 7px;
  height: 7px;
  background: #fff;
  border: 2px solid var(--orange);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(231, 96, 36, 0.25);
  transform: translate(-50%, -50%);
}

.rate-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 18px;
  padding: 10px;
  color: var(--ink-500);
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 8px;
  font-size: 7px;
  line-height: 1.6;
}

.rate-note .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.schedule-table-card {
  margin-top: 14px;
}

.schedule-table-card > .card-heading {
  min-height: 68px;
  padding: 14px 19px;
  border-bottom: 1px solid var(--ink-150);
}

.schedule-table-card .card-heading .text-button {
  align-self: center;
}

.schedule-table th:nth-child(1) {
  width: 18%;
}

.schedule-table th:nth-child(2) {
  width: 14%;
}

.schedule-table th:nth-child(3) {
  width: 14%;
}

.schedule-table th:nth-child(5) {
  width: 12%;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 5px;
  font-size: 7px;
  white-space: nowrap;
}

.status-tag.is-critical {
  color: var(--orange);
  background: var(--orange-soft);
}

.status-tag.is-done {
  color: var(--green);
  background: var(--green-soft);
}

/* Delivery */

.delivery-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 1.05fr);
  gap: 14px;
  margin-top: 26px;
}

.delivery-card {
  padding: 21px;
}

.delivery-card-dark {
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(59, 130, 246, 0.28), transparent 40%),
    linear-gradient(145deg, #111f34, #0a1525);
  border-color: rgba(255, 255, 255, 0.09);
}

.delivery-card-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.delivery-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 9px;
}

.delivery-icon .icon {
  width: 17px;
  height: 17px;
}

.delivery-card-dark .delivery-icon {
  color: #9dc2ff;
  background: rgba(74, 133, 245, 0.15);
}

.delivery-icon-warn {
  color: var(--orange);
  background: var(--orange-soft);
}

.delivery-card-head h3 {
  margin-top: 3px;
  color: var(--ink-950);
  font-size: 16px;
  font-weight: 500;
}

.delivery-card-dark .delivery-card-head h3 {
  color: #fff;
}

.delivery-card-dark .mini-label {
  color: rgba(255, 255, 255, 0.4);
}

.sla-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.sla-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sla-list span {
  color: rgba(255, 255, 255, 0.43);
  font-size: 8px;
}

.sla-list strong {
  color: rgba(255, 255, 255, 0.85);
  font-size: 8px;
  font-weight: 500;
  text-align: right;
}

.delivery-footnote {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 7px;
  line-height: 1.65;
}

.closing-list {
  display: grid;
  gap: 7px;
  margin: 18px 0;
}

.closing-list > div {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px;
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 8px;
}

.closing-list span {
  color: var(--blue);
  font-size: 8px;
  font-weight: 600;
}

.closing-list p {
  color: var(--ink-700);
  font-size: 8px;
}

.risk-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.risk-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 8px;
}

.risk-item > span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 6px;
  font-size: 8px;
  font-weight: 600;
}

.risk-item.is-high > span {
  color: var(--red);
  background: var(--red-soft);
}

.risk-item h4 {
  margin: 0;
  color: var(--ink-800);
  font-size: 8px;
  font-weight: 500;
}

.risk-item p {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 7px;
  line-height: 1.55;
}

.decision-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
}

.decision-principles > div {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  column-gap: 9px;
}

.decision-principles span {
  grid-row: 1 / 3;
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
}

.decision-principles strong {
  color: var(--ink-800);
  font-size: 10px;
  font-weight: 500;
}

.decision-principles p {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 8px;
  line-height: 1.55;
}

.workspace-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding: 20px 2px 0;
  color: var(--ink-400);
  border-top: 1px solid var(--ink-200);
  font-size: 7px;
}

/* Modal */

.modal {
  width: min(780px, calc(100vw - 28px));
  max-height: min(90vh, 900px);
  padding: 0;
  overflow: hidden;
  color: var(--ink-900);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  box-shadow: 0 40px 120px rgba(8, 17, 31, 0.35);
}

.modal::backdrop {
  background: rgba(6, 13, 24, 0.64);
  backdrop-filter: blur(5px);
}

.modal[open] {
  animation: modal-in 220ms ease-out;
}

.modal-card {
  max-height: min(90vh, 900px);
  overflow: auto;
  padding: 25px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-head h2 {
  color: var(--ink-950);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.modal-head p {
  max-width: 550px;
  margin-top: 7px;
  color: var(--ink-500);
  font-size: 9px;
  line-height: 1.65;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  color: var(--ink-500);
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: 9px;
}

.modal-close:hover {
  color: var(--ink-900);
  background: var(--ink-100);
}

.modal-close .icon {
  width: 15px;
  height: 15px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 21px;
}

.source-card {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 11px;
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 9px;
}

.source-card::before {
  width: 6px;
  height: 6px;
  margin-top: 4px;
  content: "";
  background: var(--ink-300);
  border-radius: 50%;
}

.source-card.is-reference::before {
  background: var(--blue);
}

.source-card.is-demo::before {
  background: var(--orange);
}

.source-card.is-imported::before {
  background: var(--green);
}

.source-card > div {
  min-width: 0;
}

.source-card strong {
  display: block;
  overflow: hidden;
  color: var(--ink-800);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-card p {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 7px;
  line-height: 1.5;
}

.source-card small {
  color: var(--ink-400);
  font-size: 7px;
  white-space: nowrap;
}

.import-panel {
  margin-top: 14px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
}

.import-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  margin-top: 13px;
  padding: 20px;
  color: var(--ink-500);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(37, 99, 235, 0.06), transparent 45%),
    var(--ink-50);
  border: 1px dashed var(--ink-300);
  border-radius: 11px;
  transition:
    background var(--transition),
    border-color var(--transition);
}

.drop-zone:hover,
.drop-zone.is-dragging {
  background:
    radial-gradient(circle at 50% 0, rgba(37, 99, 235, 0.12), transparent 50%),
    #f6f9ff;
  border-color: var(--blue);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 11px;
  color: var(--blue);
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.drop-zone strong {
  color: var(--ink-800);
  font-size: 10px;
  font-weight: 500;
}

.drop-zone > span:last-child {
  margin-top: 4px;
  font-size: 8px;
}

.import-feedback {
  margin-top: 10px;
  padding: 9px 11px;
  color: var(--ink-500);
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 7px;
  font-size: 8px;
  line-height: 1.6;
}

.import-feedback.is-error {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(200, 68, 68, 0.15);
}

.import-feedback.is-success {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(28, 140, 94, 0.14);
}

.field-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.field-map > div {
  padding: 10px;
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: 8px;
}

.field-map span {
  display: block;
  color: var(--ink-500);
  font-size: 7px;
}

.field-map code {
  display: block;
  margin-top: 4px;
  color: var(--ink-700);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 7px;
  line-height: 1.55;
  word-break: break-word;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 17px;
}

/* Toast */

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 14px;
  color: #fff;
  background: var(--ink-900);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  box-shadow: var(--shadow-lg);
  font-size: 9px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Presentation mode */

body.presenting {
  overflow: hidden;
  background: #07101c;
}

body.presenting::before,
body.presenting .ambient,
body.presenting .sidebar,
body.presenting .topbar,
body.presenting .brief-panel,
body.presenting .workspace-footer {
  display: none;
}

body.presenting .app-shell {
  display: block;
  width: 100%;
  min-height: 100vh;
}

body.presenting .workspace {
  height: 100vh;
  padding: 68px clamp(20px, 4vw, 64px) 36px;
  overflow: auto;
}

body.presenting .presentation-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 54px;
  padding: 0 18px;
  background: rgba(8, 17, 31, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

body.presenting .presentation-nav button {
  min-height: 32px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.52);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 500;
}

body.presenting .presentation-nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

body.presenting .presentation-nav button.is-active {
  color: #fff;
  background: rgba(72, 130, 241, 0.23);
  border-color: rgba(104, 155, 255, 0.25);
}

body.presenting .presentation-nav .presentation-exit {
  margin-left: 10px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

body.presenting .content-section,
body.presenting .hero {
  display: none;
  width: min(100%, 1420px);
  margin: 0 auto;
  animation: slide-in 250ms ease-out;
}

body.presenting .content-section.is-presentation-active,
body.presenting .hero.is-presentation-active {
  display: block;
}

body.presenting .hero.is-presentation-active {
  display: grid;
  min-height: calc(100vh - 128px);
}

body.presenting .content-section {
  padding-top: 8px;
}

body.presenting .content-section .section-heading h2 {
  color: #fff;
}

body.presenting .content-section .section-heading p,
body.presenting .content-section .mini-label,
body.presenting .content-section .section-note strong,
body.presenting .content-section .section-index {
  color: rgba(255, 255, 255, 0.52);
}

body.presenting .content-section .section-index {
  color: #79a8ff;
}

body.presenting .map-card,
body.presenting .map-side,
body.presenting .table-card,
body.presenting .schedule-table-card,
body.presenting .timeline-card,
body.presenting .budget-card,
body.presenting .delivery-card,
body.presenting .inventory-summary-card,
body.presenting .decision-principles,
body.presenting .plan-card {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
}

body.presenting .delivery-card:not(.delivery-card-dark) {
  color: var(--ink-900);
}

body.presenting .plan-card,
body.presenting .map-card,
body.presenting .map-side,
body.presenting .table-card,
body.presenting .schedule-table-card,
body.presenting .timeline-card,
body.presenting .budget-card,
body.presenting .inventory-summary-card,
body.presenting .decision-principles {
  background: #fff;
}

body.presenting .delivery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Animations */

@keyframes pulse {
  0% {
    opacity: 0.7;
    transform: scale(0.75);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes count-pop {
  0% {
    opacity: 0.35;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.value-updated {
  animation: count-pop 260ms ease-out;
}

/* Responsive */

@media (max-width: 1320px) {
  :root {
    --sidebar-width: 244px;
  }

  .sidebar {
    padding: 27px 19px 21px;
  }

  .workspace {
    padding-right: 26px;
    padding-left: 26px;
  }

  .topbar {
    margin-right: -26px;
    margin-left: -26px;
    padding-right: 26px;
    padding-left: 26px;
  }

  .brief-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .plan-card {
    padding: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(235px, 0.5fr);
  }
}

@media (max-width: 1120px) {
  :root {
    --sidebar-width: 218px;
  }

  .brand-copy small,
  .workflow-link small {
    display: none;
  }

  .sidebar-intro {
    margin-top: 32px;
  }

  .sidebar-intro h1 {
    font-size: 28px;
  }

  .workflow-link {
    grid-template-columns: 23px minmax(0, 1fr);
    padding: 10px;
  }

  .brief-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brief-action {
    grid-column: span 2;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 245px;
    padding: 35px;
  }

  .hero-main h2 {
    font-size: clamp(34px, 4.2vw, 54px);
  }

  .plan-card {
    min-height: 350px;
  }

  .plan-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .plan-metrics div:nth-child(2) {
    border-right: 0;
  }

  .plan-metrics div:last-child {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid var(--ink-150);
  }

  .geo-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(235px, 0.55fr);
  }

  .map-stage,
  .city-map {
    min-height: 430px;
  }

  .execution-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }

  .budget-visual {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .budget-donut {
    width: 120px;
    height: 120px;
  }

  .delivery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .risk-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 24px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 18px 22px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brand-lockup {
    min-height: 38px;
  }

  .sidebar-intro,
  .sidebar-source,
  .sidebar-footnote {
    display: none;
  }

  .workflow-nav {
    display: flex;
    gap: 3px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
  }

  .workflow-nav::-webkit-scrollbar {
    display: none;
  }

  .workflow-link {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
    width: auto;
    padding: 7px 9px;
    border-radius: 7px;
  }

  .workflow-link.is-active::before {
    top: auto;
    right: 9px;
    bottom: 2px;
    left: 9px;
    width: auto;
    height: 2px;
  }

  .workflow-link > span:first-child {
    display: none;
  }

  .workflow-link strong {
    font-size: 10px;
    white-space: nowrap;
  }

  .workspace {
    padding: 0 20px 24px;
  }

  .topbar {
    position: relative;
    min-height: 63px;
    margin: 0 -20px;
    padding: 0 20px;
  }

  .context-label,
  .context-divider {
    display: none;
  }

  .data-pill span:last-child {
    display: none;
  }

  .data-pill {
    min-width: 28px;
    padding: 0 10px;
  }

  .icon-button span {
    display: none;
  }

  .icon-button {
    width: 36px;
    padding: 0;
  }

  .button {
    padding: 0 11px;
  }

  .brief-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brief-action {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding: 34px;
  }

  .hero-scorecard {
    display: grid;
    grid-template-columns: 1fr 150px 1.1fr;
    gap: 20px;
    align-items: center;
    min-height: auto;
  }

  .scorecard-top {
    align-self: start;
  }

  .budget-ring {
    grid-row: 1 / 3;
    grid-column: 2;
    width: 138px;
    height: 138px;
    margin: 0;
  }

  .scorecard-metrics {
    grid-row: 1 / 3;
    grid-column: 3;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 0 0 0 20px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
  }

  .plan-cards {
    grid-template-columns: 1fr;
  }

  .plan-card {
    min-height: 290px;
  }

  .plan-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .plan-metrics div:nth-child(2) {
    border-right: 1px solid var(--ink-150);
  }

  .plan-metrics div:last-child {
    grid-column: auto;
    margin-top: 0;
    padding-top: 0;
    padding-left: 8px;
    border-top: 0;
  }

  .geo-layout {
    grid-template-columns: 1fr;
  }

  .map-stage,
  .city-map {
    min-height: 500px;
  }

  .map-side {
    min-height: 330px;
  }

  .selected-media-empty {
    min-height: 150px;
  }

  .inventory-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .execution-grid {
    grid-template-columns: 1fr;
  }

  .budget-visual {
    grid-template-columns: 142px minmax(0, 1fr);
  }

  .budget-donut {
    width: 142px;
    height: 142px;
  }

  .budget-range {
    margin-top: 24px;
  }

  .decision-principles {
    grid-template-columns: 1fr;
  }

  body.presenting .workspace {
    padding-right: 20px;
    padding-left: 20px;
  }

  body.presenting .delivery-grid {
    grid-template-columns: 1fr;
  }

  body.presenting .risk-card {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding-right: 15px;
    padding-left: 15px;
  }

  .workspace {
    padding-right: 13px;
    padding-left: 13px;
  }

  .topbar {
    gap: 10px;
    min-height: 58px;
    margin-right: -13px;
    margin-left: -13px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .topbar-context {
    max-width: 35%;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-actions .data-pill {
    display: none;
  }

  .topbar-actions .button-dark {
    width: 36px;
    padding: 0;
  }

  .topbar-actions .button-dark span {
    display: none;
  }

  .brief-panel {
    margin-top: 9px;
    padding: 18px 15px;
    border-radius: 14px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  .brief-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }

  .brief-heading > div:first-child {
    flex: 1;
  }

  .brief-heading h2 {
    font-size: 22px;
  }

  .brief-live {
    margin-top: 20px;
    padding: 7px 9px;
  }

  .brief-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 17px;
    padding-top: 16px;
  }

  .brief-action {
    grid-column: auto;
    flex-direction: column;
  }

  .brief-action .button {
    width: 100%;
  }

  .hero {
    gap: 23px;
    margin-top: 10px;
    padding: 25px 20px;
    border-radius: 19px;
  }

  .hero-meta {
    margin-bottom: 20px;
  }

  .hero-main h2 {
    font-size: 36px;
  }

  .hero-thesis {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .hero-actions .text-button {
    width: 100%;
  }

  .hero-scorecard {
    display: flex;
    flex-direction: column;
    padding: 17px;
  }

  .scorecard-top {
    width: 100%;
  }

  .budget-ring {
    width: 134px;
    height: 134px;
    margin: 21px auto;
  }

  .scorecard-metrics {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    padding: 15px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 0;
  }

  .content-section {
    margin-top: 55px;
  }

  .section-note,
  .section-actions,
  .map-legend {
    margin-top: 15px;
    text-align: left;
    justify-content: flex-start;
  }

  .section-actions .button {
    flex: 1;
  }

  .plan-cards {
    margin-top: 20px;
  }

  .plan-card {
    min-height: auto;
    padding: 19px;
  }

  .plan-mix {
    grid-template-columns: 1fr 1fr;
  }

  .plan-metrics {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 20px;
  }

  .plan-metrics div {
    padding: 0 6px;
  }

  .plan-metrics small {
    font-size: 7px;
  }

  .plan-metrics strong {
    font-size: 10px;
  }

  .geo-layout {
    margin-top: 20px;
  }

  .map-stage,
  .city-map {
    min-height: 355px;
  }

  .map-side {
    padding: 16px;
  }

  .inventory-summary {
    gap: 7px;
    margin-top: 20px;
  }

  .inventory-summary-card {
    min-height: 93px;
    padding: 14px;
  }

  .inventory-summary-card strong {
    font-size: 20px;
  }

  .table-card {
    margin-top: 10px;
    border-radius: 14px;
  }

  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .table-meta {
    padding-left: 3px;
  }

  table {
    min-width: 760px;
  }

  .execution-grid {
    gap: 10px;
    margin-top: 20px;
  }

  .timeline-card,
  .budget-card,
  .delivery-card {
    padding: 16px;
    border-radius: 14px;
  }

  .gantt-row {
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 7px;
  }

  .budget-visual {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 13px;
  }

  .budget-donut {
    width: 118px;
    height: 118px;
  }

  .budget-donut::before {
    inset: 16px;
  }

  .schedule-table-card > .card-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
  }

  .delivery-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .risk-card {
    grid-column: auto;
  }

  .decision-principles {
    margin-top: 10px;
  }

  .workspace-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-top: 35px;
  }

  .modal-card {
    padding: 18px;
  }

  .modal-head h2 {
    font-size: 21px;
  }

  .source-grid,
  .import-fields,
  .field-map {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    min-height: 150px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }

  body.presenting .workspace {
    padding: 66px 13px 24px;
  }

  body.presenting .presentation-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  body.presenting .presentation-nav button {
    padding: 0 9px;
    white-space: nowrap;
  }

  body.presenting .presentation-nav .presentation-exit {
    margin-left: auto;
    padding: 0 11px;
  }

  body.presenting .hero.is-presentation-active {
    display: flex;
  }
}

@media (max-width: 390px) {
  .hero-main h2 {
    font-size: 31px;
  }

  .plan-metrics {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .plan-metrics div {
    padding: 0;
    border-right: 0;
  }

  .budget-visual {
    grid-template-columns: 1fr;
  }

  .budget-donut {
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body {
    background: #fff;
  }

  body::before,
  .ambient,
  .sidebar,
  .topbar,
  .presentation-nav,
  .brief-panel,
  .section-actions,
  .map-toolbar-actions,
  .table-toolbar,
  .rate-note,
  .workspace-footer,
  .toast,
  .modal {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .hero {
    min-height: auto;
    padding: 24px;
    color: #fff;
    box-shadow: none;
  }

  .hero-main h2 {
    font-size: 34px;
  }

  .content-section {
    margin-top: 28px;
    break-inside: avoid;
  }

  .plan-cards,
  .delivery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .geo-layout {
    grid-template-columns: 1.4fr 0.6fr;
  }

  .map-stage,
  .city-map {
    min-height: 390px;
  }

  .table-scroll {
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  .plan-card,
  .map-card,
  .map-side,
  .table-card,
  .timeline-card,
  .budget-card,
  .delivery-card,
  .inventory-summary-card,
  .decision-principles {
    box-shadow: none;
  }
}
