:root {
  --ink: #193129;
  --ink-2: #2e463d;
  --muted: #718078;
  --muted-2: #93a099;
  --paper: #f3f0e7;
  --paper-2: #ece7da;
  --card: #fffdf8;
  --card-2: #faf7ef;
  --forest: #193e34;
  --forest-2: #235345;
  --forest-3: #2f6654;
  --coral: #df6b4f;
  --coral-soft: #f8e7df;
  --gold: #d5a143;
  --gold-soft: #f5eccf;
  --sage: #93ad9e;
  --sage-soft: #e5eee8;
  --blue: #557b8b;
  --blue-soft: #e7eff2;
  --danger: #b34a3b;
  --danger-soft: #f8e5e0;
  --success: #2f6b50;
  --success-soft: #e6f0e9;
  --line: rgba(25, 49, 41, 0.12);
  --line-strong: rgba(25, 49, 41, 0.2);
  --shadow-sm: 0 2px 8px rgba(28, 48, 40, 0.04);
  --shadow: 0 18px 40px rgba(28, 48, 40, 0.08);
  --shadow-lg: 0 32px 80px rgba(20, 39, 32, 0.18);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --font-sans: "Aptos", "Segoe UI Variable Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Aptos Display", "Segoe UI Variable Display", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia,
    "Times New Roman", "Songti SC", serif;
  --sidebar-width: 244px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 1024px;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 4%, rgba(213, 161, 67, 0.09), transparent 27rem),
    radial-gradient(circle at 18% 96%, rgba(47, 102, 84, 0.07), transparent 30rem),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

::selection {
  color: #fff;
  background: var(--forest-2);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon.icon-sm {
  width: 15px;
  height: 15px;
}

.icon.icon-lg {
  width: 22px;
  height: 22px;
}

.icon.fill {
  fill: currentColor;
  stroke: none;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.workbench {
  min-width: 0;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 26px 18px 20px;
  color: #f4efe3;
  background:
    radial-gradient(circle at 16% 4%, rgba(213, 161, 67, 0.18), transparent 15rem),
    radial-gradient(circle at 90% 82%, rgba(223, 107, 79, 0.1), transparent 18rem),
    #17392f;
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  right: -94px;
  bottom: 80px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(244, 239, 227, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 30px rgba(244, 239, 227, 0.025),
    0 0 0 64px rgba(244, 239, 227, 0.018);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 7px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(244, 239, 227, 0.28);
  border-radius: 13px;
  background: rgba(244, 239, 227, 0.06);
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.brand-name em {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  font-weight: 500;
}

.brand-sub {
  margin-top: 1px;
  color: rgba(244, 239, 227, 0.48);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.new-plan {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  padding: 0 13px;
  margin-bottom: 27px;
  color: #17392f;
  background: #f4efe3;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.new-plan:hover {
  background: #fffdf7;
  transform: translateY(-1px);
}

.new-plan kbd {
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid rgba(23, 57, 47, 0.15);
  border-radius: 4px;
  color: rgba(23, 57, 47, 0.46);
  font-family: var(--font-sans);
  font-size: 9px;
}

.nav-section-label {
  position: relative;
  z-index: 1;
  padding: 0 12px;
  margin-bottom: 8px;
  color: rgba(244, 239, 227, 0.38);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 41px;
  padding: 0 12px;
  color: rgba(244, 239, 227, 0.68);
  border-radius: 10px;
  text-align: left;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.nav-item:hover {
  color: #f4efe3;
  background: rgba(244, 239, 227, 0.06);
}

.nav-item.active {
  color: #fffdf7;
  background: rgba(244, 239, 227, 0.115);
  box-shadow: inset 2px 0 0 var(--coral);
}

.nav-item span {
  font-size: 13px;
  font-weight: 540;
}

.nav-badge {
  margin-left: auto;
  padding: 1px 6px;
  color: rgba(244, 239, 227, 0.44);
  border: 1px solid rgba(244, 239, 227, 0.13);
  border-radius: 99px;
  font-family: var(--font-serif);
  font-size: 10px !important;
}

.sidebar-spacer {
  flex: 1;
}

.current-trip {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 11px;
  margin-bottom: 10px;
  border: 1px solid rgba(244, 239, 227, 0.1);
  border-radius: 13px;
  background: rgba(244, 239, 227, 0.055);
  text-align: left;
  transition: background 170ms ease;
}

.current-trip:hover {
  background: rgba(244, 239, 227, 0.09);
}

.mini-map {
  position: relative;
  height: 58px;
  margin-bottom: 10px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 27% 38%, rgba(213, 161, 67, 0.42) 0 3px, transparent 4px),
    radial-gradient(circle at 66% 51%, rgba(223, 107, 79, 0.65) 0 3px, transparent 4px),
    radial-gradient(circle at 84% 29%, rgba(244, 239, 227, 0.7) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(244, 239, 227, 0.08), rgba(244, 239, 227, 0.02));
  overflow: hidden;
}

.mini-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 239, 227, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 227, 0.06) 1px, transparent 1px);
  background-size: 17px 17px;
  transform: rotate(-8deg) scale(1.3);
}

.mini-map::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 15%;
  top: 43%;
  height: 1px;
  background: rgba(244, 239, 227, 0.42);
  transform: rotate(-7deg);
  transform-origin: left;
}

.trip-mini-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  color: rgba(244, 239, 227, 0.4);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.current-trip strong {
  display: block;
  overflow: hidden;
  color: #f4efe3;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-trip small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: rgba(244, 239, 227, 0.48);
  font-size: 10.5px;
}

.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(213, 161, 67, 0.13);
}

.status-dot.green {
  background: #7eb394;
  box-shadow: 0 0 0 3px rgba(126, 179, 148, 0.13);
}

.status-dot.coral {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(223, 107, 79, 0.14);
}

.demo-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: rgba(244, 239, 227, 0.7);
  border-radius: 9px;
  font-size: 11.5px;
  text-align: left;
}

.demo-link:hover {
  color: #fff;
  background: rgba(244, 239, 227, 0.06);
}

.demo-link span {
  margin-left: auto;
  color: rgba(244, 239, 227, 0.32);
  font-size: 9px;
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 10px 0;
  margin-top: 6px;
  color: rgba(244, 239, 227, 0.3);
  border-top: 1px solid rgba(244, 239, 227, 0.08);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.sidebar-foot button {
  margin-left: auto;
  color: rgba(244, 239, 227, 0.42);
  font-size: 9px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(25, 49, 41, 0.08);
  background: rgba(243, 240, 231, 0.82);
  backdrop-filter: blur(16px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.breadcrumbs .icon {
  color: var(--muted-2);
}

.breadcrumbs strong {
  color: var(--ink);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 253, 248, 0.6);
  font-size: 10px;
}

.data-chip .icon {
  width: 13px;
  height: 13px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.7);
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.persona-switch {
  position: relative;
}

.persona-switch summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 253, 248, 0.7);
  list-style: none;
  cursor: pointer;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.persona-switch summary::-webkit-details-marker {
  display: none;
}

.persona-switch summary:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.persona-switch summary > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.persona-copy {
  display: grid;
  line-height: 1.2;
}

.persona-copy strong {
  font-size: 11.5px;
  font-weight: 650;
}

.persona-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.persona-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: 252px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.persona-menu-head {
  padding: 8px 10px 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.persona-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 8px;
  border-radius: 9px;
  text-align: left;
}

.persona-option:hover {
  background: var(--paper);
}

.persona-option.active {
  background: var(--sage-soft);
}

.persona-option div {
  display: grid;
  min-width: 0;
}

.persona-option strong {
  font-size: 12px;
  font-weight: 600;
}

.persona-option small {
  color: var(--muted);
  font-size: 9.5px;
}

.persona-option > .icon {
  margin-left: auto;
  color: var(--success);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.avatar.lg {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 9px;
}

/* Main view */
.view {
  max-width: 1440px;
  min-height: calc(100vh - 72px);
  padding: 34px 40px 96px;
  margin: 0 auto;
}

.view-enter {
  animation: viewIn 360ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: var(--coral);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.eyebrow.gold {
  color: #9a762a;
}

.eyebrow.muted {
  color: var(--muted);
}

.page-head h1,
.results-head h1,
.data-hero h1 {
  max-width: 760px;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.1vw, 44px);
  font-weight: 590;
  letter-spacing: -0.045em;
  line-height: 1.09;
}

.page-head h1 em,
.results-head h1 em,
.data-hero h1 em {
  color: var(--forest-2);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

.page-head .lede {
  max-width: 600px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 24px 0 26px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 24px 0 0;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
}

.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: width 300ms ease;
}

.step.done,
.step.active {
  color: var(--ink);
}

.step.done::before {
  width: 28px;
  background: var(--sage);
}

.step.active::before {
  width: 44px;
  background: var(--coral);
}

.step-num {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 9px;
}

.step.active .step-num {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.step.done .step-num {
  color: var(--success);
  border-color: #b4ccbc;
  background: var(--success-soft);
}

.step-divider {
  width: 30px;
  height: 1px;
  margin-right: 18px;
  background: var(--line);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fffdf7;
  background: var(--forest);
  box-shadow: 0 8px 18px rgba(25, 62, 52, 0.18);
}

.btn-primary:hover {
  background: var(--forest-2);
  box-shadow: 0 10px 22px rgba(25, 62, 52, 0.22);
}

.btn-primary:disabled {
  color: rgba(255, 253, 247, 0.62);
  background: #6f857c;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--card);
}

.btn-secondary:hover {
  border-color: rgba(25, 49, 41, 0.35);
  background: #fff;
}

.btn-ghost {
  min-height: 36px;
  padding: 0 10px;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--ink);
  background: rgba(25, 49, 41, 0.05);
}

.btn-coral {
  color: #fff;
  background: var(--coral);
}

.btn-danger {
  color: var(--danger);
  border-color: rgba(179, 74, 59, 0.25);
  background: var(--danger-soft);
}

.btn-small {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10.5px;
}

.btn-wide {
  width: 100%;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

/* Panels and layout */
.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 332px;
  gap: 24px;
  align-items: start;
}

.plan-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.plan-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 660;
  letter-spacing: -0.01em;
}

.panel-head h2 .num {
  color: var(--coral);
  font-family: var(--font-serif);
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
}

.panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.panel-body {
  padding: 18px 22px 22px;
}

.panel-head + .panel-body {
  padding-top: 17px;
}

.panel-note {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.panel-note .icon {
  width: 13px;
  height: 13px;
}

/* Fields */
.form-grid {
  display: grid;
  gap: 16px;
}

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

.form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  min-width: 0;
}

.field > label,
.field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.field-hint {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.5;
}

.field-error {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: var(--danger);
  font-size: 9.5px;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fffefa;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.input-shell:focus-within {
  border-color: var(--forest-3);
  box-shadow: 0 0 0 3px rgba(47, 102, 84, 0.09);
}

.input-shell.invalid {
  border-color: rgba(179, 74, 59, 0.66);
  box-shadow: 0 0 0 3px rgba(179, 74, 59, 0.07);
}

.input-shell > .icon {
  margin-left: 11px;
  color: var(--muted-2);
  width: 15px;
  height: 15px;
}

.input-shell input,
.input-shell select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 520;
}

.input-shell > .icon + input,
.input-shell > .icon + select {
  padding-left: 8px;
}

.input-shell select {
  appearance: none;
  cursor: pointer;
}

.input-shell .select-chevron {
  position: absolute;
  right: 11px;
  width: 13px;
  height: 13px;
  color: var(--muted);
  pointer-events: none;
}

.input-shell.readonly {
  border-color: var(--line);
  background: #f5f2e9;
}

.input-shell.readonly input {
  color: var(--muted);
  cursor: not-allowed;
}

.input-suffix {
  padding-right: 11px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.date-display {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.date-sep {
  display: grid;
  place-items: center;
  height: 42px;
  padding-top: 1px;
  color: var(--muted-2);
}

.date-sep .icon {
  width: 13px;
  height: 13px;
}

.people-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 9px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fffefa;
}

.people-stepper strong {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
}

.people-stepper small {
  color: var(--muted);
  font-size: 10px;
}

.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  margin-left: auto;
  color: #87651f;
  border-radius: 99px;
  background: var(--gold-soft);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}

.auto-badge .icon {
  width: 11px;
  height: 11px;
}

/* Preference chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 11px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
  font-size: 10.5px;
  font-weight: 540;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.chip:hover {
  border-color: var(--forest-3);
}

.chip.selected {
  color: var(--forest);
  border-color: rgba(47, 102, 84, 0.42);
  background: var(--sage-soft);
}

.chip.selected::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.chip.locked,
.chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chip .chip-area {
  color: var(--muted);
  font-size: 9px;
}

.chip-check {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: #fff;
  border-radius: 50%;
  background: var(--forest-2);
}

.chip-check .icon {
  width: 9px;
  height: 9px;
  stroke-width: 2.5;
}

.preference-block + .preference-block {
  padding-top: 17px;
  margin-top: 17px;
  border-top: 1px solid var(--line);
}

.preference-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.preference-title strong {
  font-size: 11.5px;
  font-weight: 640;
}

.preference-title span {
  color: var(--muted);
  font-size: 9.5px;
}

.budget-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  gap: 18px;
  align-items: end;
}

.money-input {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fffefa;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.money-input:focus-within {
  border-color: var(--forest-3);
  box-shadow: 0 0 0 3px rgba(47, 102, 84, 0.09);
}

.money-input > span {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 20px;
}

.money-input input {
  width: 100%;
  min-width: 0;
  padding: 0 5px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 29px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.money-input small {
  color: var(--muted);
  font-size: 10px;
}

.budget-copy {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.budget-copy strong {
  color: var(--ink);
  font-weight: 650;
}

/* Members */
.member-list {
  display: grid;
  gap: 7px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.member-row:hover {
  border-color: var(--line);
  background: #fbf8f0;
}

.member-row.self {
  border-color: rgba(47, 102, 84, 0.16);
  background: rgba(229, 238, 232, 0.42);
}

.member-row.copy {
  border-style: dashed;
  background: transparent;
}

.member-main {
  min-width: 0;
  flex: 1;
}

.member-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-name-line strong {
  font-size: 12px;
  font-weight: 620;
}

.member-role {
  padding: 1px 5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.member-role.initiator {
  color: #8a6420;
  border-color: rgba(213, 161, 67, 0.3);
  background: var(--gold-soft);
}

.member-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.member-meta .icon {
  width: 10px;
  height: 10px;
}

.member-budget {
  margin-left: auto;
  padding-right: 4px;
  text-align: right;
}

.member-budget strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.member-budget small {
  color: var(--muted);
  font-size: 8.5px;
}

.member-budget.masked {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.member-budget.masked .icon {
  width: 12px;
  height: 12px;
}

.member-actions {
  display: flex;
  gap: 2px;
}

.member-actions .icon-btn {
  width: 28px;
  height: 28px;
  border-color: transparent;
  background: transparent;
}

.member-actions .icon-btn:hover {
  border-color: var(--line);
  background: var(--card);
}

.add-member {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  margin-top: 9px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  font-size: 10.5px;
}

.add-member:hover {
  color: var(--forest);
  border-color: rgba(47, 102, 84, 0.45);
  background: rgba(229, 238, 232, 0.32);
}

/* AI panel */
.ai-panel {
  position: relative;
  padding: 18px;
  color: #f4efe3;
  border: 1px solid rgba(25, 49, 41, 0.05);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 8%, rgba(213, 161, 67, 0.24), transparent 12rem),
    radial-gradient(circle at 8% 94%, rgba(223, 107, 79, 0.14), transparent 13rem),
    var(--forest);
  box-shadow: 0 18px 36px rgba(25, 62, 52, 0.13);
  overflow: hidden;
}

.ai-panel::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -25px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(244, 239, 227, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(244, 239, 227, 0.025);
}

.ai-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}

.ai-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--gold);
  border: 1px solid rgba(244, 239, 227, 0.18);
  border-radius: 10px;
  background: rgba(244, 239, 227, 0.07);
}

.ai-orb::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(213, 161, 67, 0.2);
  border-radius: 13px;
}

.ai-head strong {
  display: block;
  font-size: 12px;
  font-weight: 620;
}

.ai-head small {
  display: block;
  margin-top: 1px;
  color: rgba(244, 239, 227, 0.46);
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.ai-head .ai-status {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: rgba(244, 239, 227, 0.55);
  font-size: 8.5px;
}

.ai-copy {
  position: relative;
  padding: 13px;
  border: 1px solid rgba(244, 239, 227, 0.12);
  border-radius: 11px;
  background: rgba(9, 27, 21, 0.2);
}

.ai-copy p {
  color: rgba(244, 239, 227, 0.76);
  font-size: 10.5px;
  line-height: 1.7;
}

.ai-copy p + p {
  margin-top: 5px;
}

.ai-compose {
  position: relative;
  margin-top: 11px;
}

.ai-compose textarea {
  display: block;
  width: 100%;
  height: 74px;
  padding: 11px 12px 30px;
  color: #f8f4e9;
  border: 1px solid rgba(244, 239, 227, 0.2);
  border-radius: 10px;
  outline: none;
  background: rgba(244, 239, 227, 0.06);
  font-size: 10.5px;
  line-height: 1.6;
  resize: none;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.ai-compose textarea::placeholder {
  color: rgba(244, 239, 227, 0.34);
}

.ai-compose textarea:focus {
  border-color: rgba(213, 161, 67, 0.65);
  background: rgba(244, 239, 227, 0.08);
}

.ai-send {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 8px;
  color: var(--forest);
  border-radius: 6px;
  background: #e9d9ad;
  font-size: 9px;
  font-weight: 700;
}

.ai-send:hover {
  background: #f4e6c0;
}

.ai-send .icon {
  width: 11px;
  height: 11px;
}

.quick-prompts {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.quick-prompts button {
  padding: 4px 7px;
  color: rgba(244, 239, 227, 0.58);
  border: 1px solid rgba(244, 239, 227, 0.13);
  border-radius: 99px;
  font-size: 8.5px;
  text-align: left;
}

.quick-prompts button:hover {
  color: #fff;
  border-color: rgba(244, 239, 227, 0.3);
}

.ai-disclaimer {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 12px;
  padding-top: 10px;
  color: rgba(244, 239, 227, 0.36);
  border-top: 1px solid rgba(244, 239, 227, 0.1);
  font-size: 8.5px;
  line-height: 1.5;
}

.ai-disclaimer .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

/* Checklist */
.check-panel {
  padding: 17px 18px;
}

.check-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.check-panel-head h3 {
  font-size: 11.5px;
  font-weight: 660;
}

.check-panel-head span {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 11px;
}

.check-list {
  display: grid;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.check-icon {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 0;
  color: var(--success);
  border-radius: 50%;
  background: var(--success-soft);
}

.check-icon .icon {
  width: 9px;
  height: 9px;
  stroke-width: 2.4;
}

.check-icon.warn {
  color: #8a6420;
  background: var(--gold-soft);
}

.check-icon.wait {
  color: var(--muted-2);
  background: var(--paper-2);
}

.check-item strong {
  color: var(--ink-2);
  font-weight: 600;
}

.check-item small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 9px;
}

.source-mini {
  padding: 14px 16px;
}

.source-mini .source-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9.5px;
}

.source-mini .source-row + .source-row {
  margin-top: 6px;
}

.source-mini .icon {
  width: 12px;
  height: 12px;
  color: var(--sage);
}

.source-mini a {
  margin-left: auto;
  color: var(--forest-2);
  font-size: 9px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Action dock */
.action-dock {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 18px;
  margin-top: 20px;
  border: 1px solid rgba(25, 49, 41, 0.16);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 16px 36px rgba(25, 49, 41, 0.1);
  backdrop-filter: blur(14px);
}

.action-dock-copy {
  min-width: 0;
}

.action-dock-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
}

.action-dock-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.page-actions > span {
  display: flex;
}

#dock-primary-action {
  display: flex;
  margin-left: auto;
}

.action-dock .btn {
  min-width: 148px;
}

.action-dock .dock-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 9.5px;
}

.dock-meta .icon {
  width: 13px;
  height: 13px;
}

/* Notice banners */
.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 10.5px;
  line-height: 1.55;
}

.notice-banner .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.notice-banner strong {
  font-weight: 650;
}

.notice-banner p {
  color: var(--muted);
}

.notice-banner.warning {
  color: #76591e;
  border-color: rgba(213, 161, 67, 0.32);
  background: #fbf5e4;
}

.notice-banner.warning .icon {
  color: #a37a26;
}

.notice-banner.info {
  color: var(--forest-2);
  border-color: rgba(47, 102, 84, 0.2);
  background: var(--sage-soft);
}

.notice-banner.danger {
  color: var(--danger);
  border-color: rgba(179, 74, 59, 0.24);
  background: var(--danger-soft);
}

.notice-banner .banner-action {
  margin-left: auto;
  flex: 0 0 auto;
  color: currentColor;
  font-size: 10px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Results */
.results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.results-head h1 {
  font-size: clamp(31px, 3vw, 42px);
}

.results-head .lede {
  max-width: 630px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 253, 248, 0.5);
  font-size: 9.5px;
}

.meta-pill .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.meta-pill.success {
  color: var(--success);
  border-color: rgba(47, 107, 80, 0.22);
  background: var(--success-soft);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 24px;
  align-items: start;
}

.result-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.result-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.plan-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 10px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 158px;
  padding: 16px;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.plan-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: var(--plan-color, var(--forest));
  opacity: 0.75;
}

.plan-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(25, 49, 41, 0.07);
  transform: translateY(-2px);
}

.plan-card.selected {
  border-color: var(--plan-color, var(--forest));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--plan-color) 5%, transparent), transparent 45%),
    var(--card);
  box-shadow: 0 12px 26px rgba(25, 49, 41, 0.1);
}

.plan-card.invalid {
  opacity: 0.72;
  border-style: dashed;
  cursor: default;
}

.plan-card.invalid:hover {
  transform: none;
  box-shadow: none;
}

.plan-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.plan-index {
  color: var(--muted-2);
  font-family: var(--font-serif);
  font-size: 10px;
  font-style: italic;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 19px;
  padding: 0 6px;
  margin-left: auto;
  color: #fffdf7;
  border-radius: 4px;
  background: var(--forest);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.plan-badge.alt {
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
}

.plan-badge.invalid {
  color: var(--danger);
  border: 1px solid rgba(179, 74, 59, 0.2);
  background: var(--danger-soft);
}

.plan-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.plan-card .plan-tagline {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.plan-card-metrics {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.plan-metric small {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.plan-metric strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.plan-metric strong span {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
}

.plan-match {
  display: grid;
  justify-items: end;
  color: var(--forest-2);
}

.plan-match strong {
  font-size: 13px;
  font-weight: 650;
}

.plan-match small {
  color: var(--muted);
  font-size: 8px;
}

.plan-invalid-note {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  color: var(--danger);
  font-size: 9px;
}

.plan-invalid-note .icon {
  width: 11px;
  height: 11px;
}

.invalid-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px dashed rgba(179, 74, 59, 0.28);
  border-radius: 9px;
  background: rgba(248, 229, 224, 0.48);
  color: var(--danger);
  font-size: 9.5px;
}

.invalid-strip .icon {
  width: 13px;
  height: 13px;
}

.invalid-strip button {
  margin-left: auto;
  color: var(--danger);
  font-size: 9px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Decision card */
.decision-card {
  padding: 18px;
  border: 1px solid rgba(25, 49, 41, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(229, 238, 232, 0.58), rgba(255, 253, 248, 0) 45%),
    var(--card);
  box-shadow: var(--shadow);
}

.decision-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.decision-kicker .status-dot {
  margin-right: 4px;
}

.decision-plan-name {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 3px;
}

.decision-plan-name h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 630;
  letter-spacing: -0.035em;
}

.plan-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--plan-color, var(--forest));
}

.decision-tagline {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.decision-personal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9.5px;
}

.decision-personal span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.decision-personal .icon {
  width: 10px;
  height: 10px;
  color: var(--coral);
}

.decision-personal strong {
  color: var(--ink-2);
  font-weight: 650;
}

.decision-money {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 0 11px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.decision-money small {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}

.decision-money strong {
  display: block;
  margin-top: 1px;
  font-family: var(--font-serif);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.decision-money .money-side {
  text-align: right;
}

.decision-money .money-side strong {
  font-size: 20px;
}

.budget-block {
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--line);
}

.budget-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 9.5px;
}

.budget-block-head span {
  color: var(--muted);
}

.budget-block-head strong {
  font-weight: 650;
}

.budget-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9e5da;
}

.budget-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--forest-2);
  transition: width 500ms ease;
}

.budget-bar.warn > i {
  background: var(--gold);
}

.budget-bar.danger > i {
  background: var(--danger);
}

.budget-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8.5px;
}

.budget-foot strong {
  color: var(--success);
  font-weight: 650;
}

.member-checks {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.member-check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  font-size: 9.5px;
}

.member-check-row + .member-check-row {
  margin-top: 1px;
}

.member-check-row .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-check-row .amount {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.member-check-row .amount.self {
  color: var(--ink);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
}

.status-badge.pass {
  color: var(--success);
  background: var(--success-soft);
}

.status-badge.over {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-badge.masked {
  color: var(--muted);
  background: var(--paper-2);
}

.status-badge .icon {
  width: 9px;
  height: 9px;
  stroke-width: 2.3;
}

.decision-actions {
  display: grid;
  gap: 7px;
  padding-top: 13px;
}

.decision-actions .btn {
  width: 100%;
}

.permission-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 8px;
  padding: 7px 8px;
  color: #76591e;
  border-radius: 7px;
  background: var(--gold-soft);
  font-size: 8.5px;
  line-height: 1.45;
}

.permission-note .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

.reason-card {
  padding: 17px 18px;
}

.reason-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.reason-head .icon {
  width: 15px;
  height: 15px;
  color: var(--coral);
}

.reason-head h3 {
  font-size: 11.5px;
  font-weight: 660;
}

.reason-head span {
  margin-left: auto;
  color: var(--muted);
  font-size: 8px;
}

.reason-list {
  display: grid;
  gap: 7px;
}

.reason-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.reason-item .num {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--forest-2);
  border: 1px solid rgba(47, 102, 84, 0.22);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 8px;
}

.reason-source {
  margin-top: 10px;
  padding-top: 9px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  font-size: 8.5px;
  line-height: 1.5;
}

/* Itinerary */
.itinerary-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.itinerary-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 660;
}

.itinerary-head h2 .num {
  color: var(--coral);
  font-family: var(--font-serif);
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
}

.itinerary-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.day-tabs {
  display: flex;
  gap: 3px;
  padding: 14px 22px 0;
  overflow-x: auto;
}

.day-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 0 9px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 9.5px;
  white-space: nowrap;
}

.day-tab:hover {
  color: var(--ink);
  background: var(--paper);
}

.day-tab.active {
  color: var(--forest);
  border-color: rgba(47, 102, 84, 0.2);
  background: var(--sage-soft);
  font-weight: 650;
}

.days {
  display: grid;
  gap: 0;
  padding: 13px 22px 22px;
}

.day-block {
  border-top: 1px solid var(--line);
  scroll-margin-top: 92px;
}

.day-block:first-child {
  border-top: 0;
}

.day-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 15px 1px 11px;
  text-align: left;
}

.day-date {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card-2);
}

.day-date strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.day-date small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7.5px;
}

.day-copy {
  min-width: 0;
  flex: 1;
}

.day-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}

.day-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
}

.day-total {
  color: var(--muted);
  font-size: 8.5px;
  text-align: right;
  white-space: nowrap;
}

.day-toggle {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: var(--muted);
  border-radius: 50%;
}

.day-toggle .icon {
  width: 12px;
  height: 12px;
  transition: transform 200ms ease;
}

.day-block.collapsed .day-toggle .icon {
  transform: rotate(-90deg);
}

.day-block.collapsed .timeline {
  display: none;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding: 2px 0 5px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 22px;
  left: 48px;
  width: 1px;
  background: linear-gradient(var(--line-strong), rgba(25, 49, 41, 0.04));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 43px 14px minmax(0, 1fr);
  gap: 11px;
  min-height: 50px;
  padding: 6px 0;
}

.timeline-time {
  padding-top: 2px;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.timeline-time small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 8px;
}

.timeline-dot {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.timeline-dot > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  color: var(--forest-2);
  border: 1px solid rgba(47, 102, 84, 0.3);
  border-radius: 50%;
  background: var(--card);
}

.timeline-dot > span .icon {
  width: 7px;
  height: 7px;
  stroke-width: 2.4;
}

.timeline-dot .dot-fill {
  width: 5px;
  height: 5px;
  border: 0;
  background: var(--forest-2);
}

.timeline-item.transport .timeline-dot > span {
  color: var(--muted);
  border-color: var(--line);
  background: var(--card-2);
}

.timeline-item.personal .timeline-dot > span {
  color: #9b7423;
  border-color: rgba(213, 161, 67, 0.4);
  background: var(--gold-soft);
}

.timeline-item.adjusted .timeline-dot > span {
  color: var(--coral);
  border-color: rgba(223, 107, 79, 0.4);
  background: var(--coral-soft);
}

.timeline-body {
  min-width: 0;
  padding-bottom: 6px;
}

.activity-title-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.activity-title-line strong {
  font-size: 11px;
  font-weight: 620;
  line-height: 1.4;
}

.activity-title-line strong .local {
  margin-left: 5px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 400;
}

.activity-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.activity-bottom {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 17px;
  padding: 0 5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 7.5px;
  white-space: nowrap;
}

.tag.must {
  color: #8a6420;
  border-color: rgba(213, 161, 67, 0.3);
  background: var(--gold-soft);
}

.tag.personal {
  color: #8e5a1f;
  border-color: rgba(213, 161, 67, 0.24);
  background: #fcf4df;
}

.tag.adjusted {
  color: var(--coral);
  border-color: rgba(223, 107, 79, 0.22);
  background: var(--coral-soft);
}

.activity-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 2px 5px;
  color: var(--forest-2);
  border-radius: 4px;
  font-size: 8px;
  font-weight: 650;
}

.activity-action:hover {
  background: var(--sage-soft);
}

.activity-action .icon {
  width: 10px;
  height: 10px;
}

.activity-action.locked {
  color: var(--muted-2);
  cursor: default;
}

.day-summary-note {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 0 3px 68px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.day-summary-note .icon {
  width: 11px;
  height: 11px;
}

/* No feasible */
.no-plan {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(223, 107, 79, 0.1), transparent 20rem),
    var(--card);
  box-shadow: var(--shadow);
}

.no-plan-top {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.no-plan-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  color: var(--coral);
  border: 1px solid rgba(223, 107, 79, 0.26);
  border-radius: 50%;
  background: var(--coral-soft);
}

.no-plan-icon .icon {
  width: 28px;
  height: 28px;
}

.no-plan h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 590;
  letter-spacing: -0.04em;
}

.no-plan-top p {
  max-width: 680px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.diagnosis-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-2);
}

.diagnosis-card.danger {
  border-color: rgba(179, 74, 59, 0.2);
  background: var(--danger-soft);
}

.diagnosis-card.warning {
  border-color: rgba(213, 161, 67, 0.28);
  background: #fbf5e4;
}

.diagnosis-card .diag-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 650;
}

.diagnosis-card .diag-head .icon {
  width: 13px;
  height: 13px;
}

.diagnosis-card p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.diagnosis-card strong {
  color: var(--danger);
}

.candidate-diagnosis {
  margin-top: 17px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.candidate-diagnosis h3 {
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 650;
}

.candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border-top: 1px solid rgba(25, 49, 41, 0.07);
  font-size: 9.5px;
}

.candidate-row:first-of-type {
  border-top: 0;
}

.candidate-row .cand-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.candidate-row .cand-reason {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.candidate-row .cand-cost {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 11px;
  text-align: right;
}

.no-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.no-plan-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 8.5px;
}

/* Cost detail */
.cost-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.cost-panel {
  padding: 24px;
}

.cost-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.cost-panel-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.cost-panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.cost-table {
  width: 100%;
  border-collapse: collapse;
}

.cost-table th {
  padding: 8px 8px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.cost-table td {
  padding: 11px 8px;
  border-bottom: 1px solid rgba(25, 49, 41, 0.07);
  font-size: 10.5px;
  vertical-align: top;
}

.cost-table td.amount {
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.cost-table .cost-label strong {
  display: block;
  font-weight: 600;
}

.cost-table .cost-label small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.4;
}

.cost-table .source-tag {
  color: var(--muted);
  font-size: 8px;
}

.cost-total-row td {
  padding-top: 14px;
  border-bottom: 0;
  font-weight: 650;
}

.cost-total-row td.amount {
  font-size: 19px;
}

.cost-summary-card {
  padding: 18px;
}

.cost-summary-card h3 {
  margin-bottom: 12px;
  font-size: 11.5px;
  font-weight: 660;
}

.cost-big {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.cost-big small {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}

.cost-big strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.cost-breakdown {
  display: grid;
  gap: 8px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.cost-breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
}

.cost-breakdown-row span:first-child {
  color: var(--muted);
}

.cost-breakdown-row strong {
  margin-left: auto;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 500;
}

.cost-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.cost-note .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

/* Data page */
.data-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: end;
  padding: 28px 30px;
  margin-bottom: 20px;
  overflow: hidden;
  color: #f6f1e5;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 84% 2%, rgba(213, 161, 67, 0.22), transparent 18rem),
    radial-gradient(circle at 12% 110%, rgba(223, 107, 79, 0.16), transparent 22rem),
    var(--forest);
  box-shadow: var(--shadow);
}

.data-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(246, 241, 229, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(246, 241, 229, 0.025);
}

.data-hero h1 {
  font-size: 34px;
  color: #f6f1e5;
}

.data-hero h1 em {
  color: #e4c67d;
}

.data-hero p {
  max-width: 600px;
  margin-top: 10px;
  color: rgba(246, 241, 229, 0.58);
  font-size: 11.5px;
  line-height: 1.7;
}

.data-hero .eyebrow {
  color: #e4c67d;
}

.data-hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(246, 241, 229, 0.12);
  border-radius: 13px;
  background: rgba(246, 241, 229, 0.05);
}

.data-stat small {
  display: block;
  color: rgba(246, 241, 229, 0.44);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.data-stat strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.data-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}

.data-card {
  padding: 22px;
}

.data-card h2 {
  font-size: 14px;
  font-weight: 660;
  letter-spacing: -0.01em;
}

.data-card > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.rule-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.rule-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.rule-row:first-child {
  border-top: 0;
}

.rule-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--forest-2);
  border: 1px solid rgba(47, 102, 84, 0.2);
  border-radius: 6px;
  font-family: var(--font-serif);
  font-size: 10px;
}

.rule-copy strong {
  display: block;
  font-size: 10.5px;
  font-weight: 650;
}

.rule-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.rule-tag {
  color: var(--muted);
  font-size: 8px;
  text-align: right;
  white-space: nowrap;
}

.source-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
}

.source-table th {
  padding: 7px 6px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.source-table td {
  padding: 9px 6px;
  border-bottom: 1px solid rgba(25, 49, 41, 0.07);
  color: var(--muted);
  font-size: 9px;
  vertical-align: top;
}

.source-table td strong {
  display: block;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
}

.source-status {
  display: inline-block;
  padding: 2px 5px;
  color: var(--success);
  border-radius: 3px;
  background: var(--success-soft);
  font-size: 7.5px;
  white-space: nowrap;
}

.method-note {
  padding: 14px;
  margin-top: 14px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--card-2);
  font-size: 9px;
  line-height: 1.65;
}

.method-note strong {
  color: var(--ink-2);
}

/* Trips */
.trips-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.trips-head h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 590;
  letter-spacing: -0.045em;
}

.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.trip-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.trip-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.trip-card-art {
  position: relative;
  height: 82px;
  margin: -6px -6px 16px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 28% 48%, rgba(223, 107, 79, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 64% 38%, rgba(213, 161, 67, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 82% 66%, rgba(255, 253, 248, 0.8) 0 2px, transparent 3px),
    linear-gradient(135deg, var(--forest-2), #315d4e);
  overflow: hidden;
}

.trip-card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 253, 248, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 248, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  transform: rotate(-10deg) scale(1.3);
}

.trip-card-art::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 17%;
  top: 47%;
  height: 1px;
  background: rgba(255, 253, 248, 0.55);
  transform: rotate(-8deg);
  transform-origin: left;
  box-shadow:
    38px -14px 0 rgba(255, 253, 248, 0.22),
    94px 6px 0 rgba(255, 253, 248, 0.22);
}

.trip-card-status {
  position: absolute;
  right: 13px;
  top: 12px;
  z-index: 2;
  color: rgba(255, 253, 248, 0.82);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trip-card h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.trip-card .trip-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.trip-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.trip-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.trip-card-foot small {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}

.trip-card-foot strong {
  display: block;
  margin-top: 1px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.trip-card .btn {
  min-width: 92px;
}

.empty-trip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.4);
  text-align: center;
}

.empty-trip h2 {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 650;
}

.empty-trip p {
  max-width: 420px;
  margin: 5px auto 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 32, 26, 0.46);
  backdrop-filter: blur(5px);
  animation: fadeIn 180ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.modal {
  position: relative;
  width: min(560px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: modalIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal.wide {
  width: min(880px, calc(100vw - 48px));
}

.modal.medium {
  width: min(680px, calc(100vw - 48px));
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head-copy {
  min-width: 0;
  flex: 1;
}

.modal-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.modal-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--ink);
  background: var(--paper);
}

.modal-body {
  padding: 20px 24px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--line);
}

.modal-foot .modal-foot-note {
  margin-right: auto;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.drawer-backdrop {
  place-items: stretch end;
  padding: 0;
}

.drawer {
  width: min(540px, 100vw);
  height: 100vh;
  max-height: 100vh;
  border-radius: 20px 0 0 20px;
  animation: drawerIn 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes drawerIn {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* Adopt modal */
.adopt-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
}

.adopt-plan {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.03em;
}

.adopt-tagline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.adopt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.adopt-stat {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.adopt-stat small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.adopt-stat strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
}

.adopt-checks {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.adopt-check {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9.5px;
}

.adopt-check .check-icon {
  width: 16px;
  height: 16px;
}

.adopt-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 9px 10px;
  margin-top: 14px;
  color: #76591e;
  border-radius: 7px;
  background: var(--gold-soft);
  font-size: 9px;
  line-height: 1.5;
}

.adopt-warning .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
}

/* Compare modal */
.compare-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 620px;
}

.compare-table th,
.compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  position: sticky;
  top: 0;
  color: var(--muted);
  background: var(--card);
  font-size: 9px;
  font-weight: 650;
}

.compare-plan-head {
  display: grid;
  gap: 2px;
}

.compare-plan-head strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.compare-plan-head small {
  color: var(--muted);
  font-size: 8px;
}

.compare-table tr.current td {
  background: rgba(229, 238, 232, 0.28);
}

.compare-label {
  color: var(--muted);
  white-space: nowrap;
}

.compare-value {
  font-weight: 550;
}

.compare-value.big {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
}

.compare-bar {
  width: 78px;
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--paper-2);
}

.compare-bar i {
  display: block;
  height: 100%;
  background: var(--forest-2);
}

.compare-actions {
  display: flex;
  gap: 5px;
  padding-top: 3px;
}

/* Trial modal */
.trial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 18px;
}

.trial-current {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
}

.trial-current-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--forest-2);
  border-radius: 9px;
  background: var(--sage-soft);
}

.trial-current small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.trial-current strong {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 620;
}

.trial-current span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.trial-options {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.trial-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.trial-option:hover {
  border-color: var(--line-strong);
}

.trial-option.selected {
  border-color: var(--forest-2);
  background: rgba(229, 238, 232, 0.35);
}

.trial-radio {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.trial-option.selected .trial-radio {
  border-color: var(--forest-2);
  box-shadow: inset 0 0 0 3px var(--card);
  background: var(--forest-2);
}

.trial-option-copy {
  min-width: 0;
  flex: 1;
}

.trial-option-title {
  display: flex;
  align-items: center;
  gap: 5px;
}

.trial-option-title strong {
  font-size: 10.5px;
  font-weight: 650;
}

.trial-option-title .tag {
  margin-left: auto;
}

.trial-option-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.trial-price {
  margin-top: 4px;
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 11px;
}

.trial-price span {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 8px;
}

.trial-side {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-2);
}

.trial-side h3 {
  margin-bottom: 9px;
  font-size: 10.5px;
  font-weight: 650;
}

.trial-impact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.trial-impact small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.trial-impact strong {
  display: block;
  margin-top: 1px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
}

.trial-impact .delta {
  text-align: right;
}

.trial-impact .delta strong {
  color: var(--coral);
  font-size: 15px;
}

.trial-checks {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.trial-check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 8.5px;
  line-height: 1.45;
}

.trial-check .check-icon {
  width: 14px;
  height: 14px;
  margin-top: 0;
}

.trial-check strong {
  display: block;
  color: var(--ink-2);
  font-weight: 600;
}

.trial-check span {
  display: block;
  color: var(--muted);
  margin-top: 1px;
}

.trial-check.fail strong {
  color: var(--danger);
}

.trial-check.fail .check-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.trial-total {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.trial-total strong {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 500;
}

/* AI parse modal */
.ai-parse {
  display: grid;
  gap: 12px;
}

.ai-parse-quote {
  padding: 12px 13px;
  color: var(--muted);
  border-left: 2px solid var(--gold);
  background: var(--card-2);
  font-size: 10px;
  line-height: 1.65;
}

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

.parse-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.parse-item small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.parse-item strong {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
}

.parse-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.parse-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 9px 10px;
  color: var(--muted);
  border-radius: 7px;
  background: var(--sage-soft);
  font-size: 8.5px;
  line-height: 1.5;
}

.parse-note .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--forest-2);
}

/* Demo guide */
.demo-intro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(213, 161, 67, 0.22);
  border-radius: 9px;
  background: var(--gold-soft);
}

.demo-intro .icon {
  width: 15px;
  height: 15px;
  color: #8a6420;
  margin-top: 1px;
}

.demo-intro p {
  color: #76591e;
  font-size: 9.5px;
  line-height: 1.6;
}

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

.demo-card {
  display: flex;
  flex-direction: column;
  min-height: 106px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  text-align: left;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.demo-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 7px 16px rgba(25, 49, 41, 0.06);
  transform: translateY(-1px);
}

.demo-card-badge {
  align-self: flex-start;
  padding: 1px 5px;
  margin-bottom: 6px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.demo-card strong {
  font-size: 11px;
  font-weight: 650;
}

.demo-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.demo-card .demo-card-go {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: auto;
  padding-top: 7px;
  color: var(--forest-2);
  font-size: 8px;
  font-weight: 650;
}

.demo-card .demo-card-go .icon {
  width: 10px;
  height: 10px;
}

/* Generate modal */
.gen-modal {
  width: min(500px, calc(100vw - 48px));
  padding: 30px;
  overflow: hidden;
  color: #f6f1e5;
  border-color: rgba(246, 241, 229, 0.12);
  background:
    radial-gradient(circle at 84% 2%, rgba(213, 161, 67, 0.25), transparent 15rem),
    radial-gradient(circle at 10% 105%, rgba(223, 107, 79, 0.14), transparent 18rem),
    var(--forest);
}

.gen-modal .modal-head {
  display: none;
}

.gen-modal .modal-body {
  padding: 0;
}

.gen-modal::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -100px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(246, 241, 229, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(246, 241, 229, 0.025);
  pointer-events: none;
}

.gen-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 19px;
}

.gen-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--gold);
  border: 1px solid rgba(246, 241, 229, 0.18);
  border-radius: 50%;
  background: rgba(246, 241, 229, 0.06);
}

.gen-orb::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(213, 161, 67, 0.2);
  border-radius: 50%;
  animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.8;
  }
}

.gen-head strong {
  display: block;
  font-size: 12px;
  font-weight: 620;
}

.gen-head small {
  display: block;
  margin-top: 1px;
  color: rgba(246, 241, 229, 0.45);
  font-size: 8.5px;
}

.gen-title {
  position: relative;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 560;
  letter-spacing: -0.04em;
}

.gen-title em {
  color: #e4c67d;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

.gen-route {
  position: relative;
  height: 38px;
  margin: 20px 0 17px;
}

.gen-route::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 1px;
  background: rgba(246, 241, 229, 0.16);
}

.gen-route::after {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: var(--progress, 0%);
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  transition: width 700ms ease;
}

.gen-stop {
  position: absolute;
  top: 12px;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(246, 241, 229, 0.25);
  border-radius: 50%;
  background: var(--forest);
  transform: translateX(-50%);
}

.gen-stop.done {
  border-color: var(--gold);
  background: var(--gold);
}

.gen-stop.active {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(246, 241, 229, 0.11);
}

.gen-steps {
  position: relative;
  display: grid;
  gap: 9px;
}

.gen-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(246, 241, 229, 0.34);
  font-size: 9.5px;
  transition: color 200ms ease;
}

.gen-step.active {
  color: rgba(246, 241, 229, 0.86);
}

.gen-step.done {
  color: rgba(246, 241, 229, 0.6);
}

.gen-step-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(246, 241, 229, 0.15);
  border-radius: 50%;
}

.gen-step.done .gen-step-icon {
  color: var(--forest);
  border-color: var(--gold);
  background: var(--gold);
}

.gen-step.active .gen-step-icon {
  border-color: rgba(246, 241, 229, 0.6);
  animation: stepPulse 1.2s ease-in-out infinite;
}

@keyframes stepPulse {
  50% {
    box-shadow: 0 0 0 4px rgba(246, 241, 229, 0.08);
  }
}

.gen-step-icon .icon {
  width: 9px;
  height: 9px;
  stroke-width: 2.4;
}

.gen-caption {
  min-height: 16px;
  margin-top: 16px;
  color: rgba(246, 241, 229, 0.42);
  font-size: 8.5px;
}

.gen-error {
  display: none;
  padding: 11px 12px;
  margin-top: 14px;
  color: #f9d7cc;
  border: 1px solid rgba(223, 107, 79, 0.32);
  border-radius: 8px;
  background: rgba(223, 107, 79, 0.12);
  font-size: 9.5px;
  line-height: 1.55;
}

.gen-modal.failed .gen-error {
  display: block;
}

.gen-modal.failed .gen-route,
.gen-modal.failed .gen-steps {
  display: none;
}

.gen-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.gen-actions .btn {
  flex: 1;
}

.gen-actions .btn-secondary {
  color: #f6f1e5;
  border-color: rgba(246, 241, 229, 0.2);
  background: rgba(246, 241, 229, 0.07);
}

/* Toast */
.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 44px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 16px 38px rgba(25, 49, 41, 0.16);
  font-size: 10.5px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toastIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.toast.out {
  animation: toastOut 200ms ease both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

.toast .toast-icon {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: var(--success);
  border-radius: 50%;
  background: var(--success-soft);
}

.toast.error .toast-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.toast.info .toast-icon {
  color: #8a6420;
  background: var(--gold-soft);
}

.toast .toast-icon .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.toast strong {
  display: block;
  font-weight: 650;
}

.toast p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
}

/* Misc */
.divider {
  height: 1px;
  background: var(--line);
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--paper);
  font-size: 16px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 7px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 8.5px;
}

.pill.dark {
  color: #f6f1e5;
  border-color: rgba(246, 241, 229, 0.16);
  background: rgba(246, 241, 229, 0.06);
}

.cost-category-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--forest-2);
  border-radius: 7px;
  background: var(--sage-soft);
}

.cost-category-icon .icon {
  width: 13px;
  height: 13px;
}

/* Readability pass */
.page-head .lede,
.results-head .lede {
  font-size: 13.5px;
  line-height: 1.72;
}

.panel-head h2 {
  font-size: 15px;
}

.panel-head p {
  font-size: 11.5px;
}

.field > label,
.field-label {
  font-size: 11.5px;
}

.field-hint {
  font-size: 10px;
}

.input-shell input,
.input-shell select {
  font-size: 13.5px;
}

.member-name-line strong {
  font-size: 13px;
}

.member-meta {
  font-size: 10.5px;
}

.ai-copy p {
  font-size: 11.5px;
}

.check-item {
  font-size: 10.8px;
  line-height: 1.5;
}

.check-item small {
  font-size: 9.5px;
}

.plan-tagline {
  font-size: 10.5px;
}

.plan-card {
  min-height: 166px;
}

.decision-tagline {
  font-size: 10.8px;
}

.decision-kicker {
  font-size: 9.5px;
}

.budget-block-head,
.member-check-row {
  font-size: 10.5px;
}

.budget-foot {
  font-size: 9.2px;
}

.timeline-body .activity-title-line strong {
  font-size: 12.5px;
}

.activity-note {
  font-size: 10.3px;
  line-height: 1.55;
}

.activity-bottom .tag {
  font-size: 8.2px;
}

.timeline-time {
  font-size: 11.5px;
}

.timeline-time small {
  font-size: 8.5px;
}

.timeline-item {
  min-height: 56px;
}

.day-copy strong {
  font-size: 13px;
}

.day-copy span {
  font-size: 10.3px;
}

.reason-item {
  font-size: 10.4px;
}

.reason-source {
  font-size: 9px;
}

.meta-pill {
  font-size: 10px;
}

.itinerary-head h2 {
  font-size: 16px;
}

.itinerary-head p {
  font-size: 10.5px;
}

.source-mini .source-row {
  font-size: 10px;
}

.btn {
  font-size: 12.5px;
}

.trial-check {
  font-size: 9.2px;
}

.trial-option-copy p {
  font-size: 9px;
}

.cost-table td {
  font-size: 11.5px;
}

.cost-table .cost-label small {
  font-size: 9px;
}

.modal-head h2 {
  font-size: 24px;
}

.modal-head p {
  font-size: 11px;
}

.demo-card strong {
  font-size: 12px;
}

.demo-card p {
  font-size: 9.5px;
}

.demo-card .demo-card-go {
  font-size: 9px;
}

.gen-head strong {
  font-size: 13px;
}

.gen-head small {
  font-size: 9.5px;
}

.gen-step {
  font-size: 10.5px;
}

.gen-caption {
  font-size: 9.5px;
}

.trial-option-title strong {
  font-size: 11.5px;
}

.trial-option-copy p {
  font-size: 9.5px;
}

.trial-check {
  font-size: 9.5px;
}

.ai-parse-quote {
  font-size: 11px;
}

.compare-table th,
.compare-table td {
  font-size: 10.5px;
}

/* Responsive */
@media (max-width: 1280px) {
  :root {
    --sidebar-width: 224px;
  }

  .view {
    padding: 30px 28px 90px;
  }

  .topbar {
    padding: 0 28px;
  }

  .plan-layout,
  .result-layout {
    grid-template-columns: minmax(0, 1fr) 306px;
    gap: 20px;
  }

  .page-head h1,
  .results-head h1 {
    font-size: 38px;
  }

  .budget-editor {
    grid-template-columns: minmax(0, 1fr) 150px;
  }
}

@media (max-width: 1120px) {
  :root {
    --sidebar-width: 86px;
  }

  .sidebar {
    align-items: center;
    padding: 22px 10px 16px;
  }

  .brand {
    padding: 0;
    margin-bottom: 24px;
  }

  .brand-copy,
  .new-plan span,
  .new-plan kbd,
  .nav-section-label,
  .nav-item span,
  .nav-badge,
  .current-trip,
  .demo-link span,
  .demo-link > span,
  .sidebar-foot span,
  .sidebar-foot button {
    display: none;
  }

  .new-plan {
    justify-content: center;
    width: 43px;
    padding: 0;
    margin-bottom: 22px;
  }

  .nav-item {
    justify-content: center;
    width: 43px;
    padding: 0;
  }

  .nav-item.active {
    box-shadow: inset 0 2px 0 var(--coral);
  }

  .demo-link {
    justify-content: center;
    width: 43px;
    padding: 0;
  }

  .plan-layout,
  .result-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan-rail,
  .result-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-rail .ai-panel {
    grid-row: span 2;
  }

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

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    padding: 0 18px;
  }

  .view {
    padding: 22px 18px 80px;
  }

  .page-head,
  .results-head,
  .trips-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .plan-rail,
  .result-rail {
    grid-template-columns: 1fr;
  }

  .plan-rail .ai-panel {
    grid-row: auto;
  }

  .plan-switcher {
    grid-template-columns: 1fr;
  }

  .itinerary-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .cost-layout,
  .data-hero {
    grid-template-columns: 1fr;
  }

  .form-row,
  .form-row.three {
    grid-template-columns: 1fr;
  }

  .budget-editor {
    grid-template-columns: 1fr;
  }

  .diagnosis-grid,
  .demo-grid,
  .parse-grid {
    grid-template-columns: 1fr;
  }

  .trial-layout {
    grid-template-columns: 1fr;
  }

  .no-plan-top {
    flex-direction: column;
  }
}

@media print {
  .sidebar,
  .topbar,
  .page-actions,
  .action-dock,
  .result-rail,
  .plan-switcher,
  .notice-banner,
  .demo-link,
  .modal-backdrop,
  .toast-root {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .app-shell {
    display: block;
  }

  .view {
    padding: 0;
    max-width: none;
  }

  .result-layout {
    display: block;
  }

  .panel,
  .no-plan {
    box-shadow: none;
    break-inside: avoid;
  }
}

@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;
  }
}
