.planning-page {
  min-width: 0;
  overflow-x: hidden;
  background: var(--ice);
}

.orientation-prompt[hidden] { display: none !important; }

.orientation-prompt {
  position: fixed;
  z-index: 30;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  max-width: 560px;
  margin-inline: auto;
  padding: 15px 16px;
  border: 1px solid #bfd3e5;
  border-radius: 18px;
  background: white;
  color: var(--navy);
  box-shadow: 0 18px 48px rgba(9, 38, 65, 0.24);
}

.orientation-prompt-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--pale-blue);
  color: var(--blue);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.orientation-prompt strong,
.orientation-prompt p { display: block; }

.orientation-prompt strong { font-size: 15px; }

.orientation-prompt p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.orientation-prompt button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font: 750 13px var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
}

.orientation-prompt button:focus-visible {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 3px;
}

.tool-intro {
  padding-block: 62px 38px;
  text-align: center;
}

.tool-intro h1 { font-size: clamp(42px, 8vw, 72px); }

.tool-lead {
  max-width: 720px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 18px;
}

.plan-selector { margin-bottom: 24px; }

.plan-selector-panel { padding: 28px; }

.plan-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.plan-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.plan-options label {
  min-height: 104px;
  padding: 20px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: white;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.plan-options label:hover { transform: translateY(-2px); }

.plan-options label strong,
.plan-options label span { display: block; }

.plan-options label strong { color: var(--navy); font-size: 18px; }
.plan-options label span { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.plan-options input:checked + label {
  border-color: var(--blue);
  background: var(--pale-blue);
  box-shadow: 0 8px 24px rgba(79, 128, 184, 0.12);
}

.plan-options input:focus-visible + label {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 3px;
}

.question-branch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.question-branch[hidden] { display: none; }

.question-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.question-group legend {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
}

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

.compact-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.compact-options label {
  min-height: 50px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.compact-options input:checked + label {
  border-color: var(--blue);
  background: var(--pale-blue);
}

.compact-options input:focus-visible + label {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 2px;
}

.planner-continue {
  display: block;
  min-height: 52px;
  margin: 28px 0 0 auto;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font: 800 15px var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 8px 20px rgba(9, 38, 65, 0.18);
}

.planner-continue:hover { background: var(--blue); }

.planner-continue:disabled {
  cursor: not-allowed;
  background: #8998a5;
  box-shadow: none;
  opacity: 0.72;
}

.contra-questionnaire {
  padding-block: 44px 56px;
}

.contra-questionnaire[hidden] { display: none; }

.contra-panel {
  max-width: 980px;
  margin-inline: auto;
}

.contra-panel > .change-plan-button { margin-bottom: 24px; }

.contra-panel .panel-heading h2 {
  margin: 5px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
}

.contra-panel .panel-heading p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.contra-question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 18px;
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.stacked-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stacked-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stacked-options label {
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.stacked-options input:checked + label {
  border-color: var(--blue);
  background: var(--pale-blue);
}

.stacked-options input:focus-visible + label {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 2px;
}

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

.contra-result {
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid #99c6b6;
  border-radius: 14px;
  background: #edf8f3;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.55;
}

.contra-result strong { display: block; margin-bottom: 3px; }

.contra-result.check {
  border-color: #e4c06b;
  background: #fff9e9;
}

.contra-result.not-available {
  border-color: #d9a5a5;
  background: #fff1f1;
}

.contra-choice {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.contra-choice .plan-options { margin-top: 10px; }

.contra-choice input:disabled + label {
  cursor: not-allowed;
  opacity: 0.48;
}

.contra-small-print {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.planner-context {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding-block: 48px 28px;
}

.planner-context[hidden] { display: none; }
.planner-context h1 { margin: 4px 0 0; font-size: clamp(34px, 5vw, 58px); }
.planner-context p:last-child { margin: 10px 0 0; color: var(--muted); }

.change-plan-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--navy);
  font: 750 13px var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
}

.local-note {
  width: fit-content;
  max-width: 100%;
  margin: 22px auto 0;
  padding: 9px 14px;
  border: 1px solid #bfd3e5;
  border-radius: 999px;
  background: white;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 36px;
}

.tool-panel {
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 44px rgba(9, 38, 65, 0.08);
}

.results-panel { position: sticky; top: 20px; }

.panel-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 26px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--navy);
  font-weight: 800;
}

.panel-heading h2 {
  font-family: var(--font-body);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.private-purchase-fields {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.private-purchase-fields[hidden] { display: none; }

.private-fields-heading { margin-bottom: 20px; }
.private-fields-heading h3 { margin: 4px 0 0; color: var(--navy); font-size: 24px; }
.private-fields-heading p:last-child { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.full-field { grid-column: 1 / -1; }

.form-field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 750;
}

.form-field legend {
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 750;
}

.form-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.form-field input,
.form-field select {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font: 600 16px var(--font-body);
}

.form-field select { appearance: auto; }

.input-prefix,
.input-suffix {
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--ice);
}

.input-prefix { grid-template-columns: auto minmax(0, 1fr); }
.input-suffix { grid-template-columns: minmax(0, 1fr) auto; }

.private-fee-reference {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--pale-blue);
}

.private-fee-reference > span,
.private-fee-reference > strong,
.private-fee-reference > small { display: block; }

.private-fee-reference > span {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.private-fee-reference > strong {
  margin-top: 4px;
  color: var(--blue);
  font-size: 28px;
}

.private-fee-reference > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.input-prefix > span,
.input-suffix > span {
  padding-inline: 13px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.input-prefix input,
.input-suffix input { border: 0; border-radius: 0; }

.form-field input[readonly] {
  cursor: default;
  background: #f2f5f7;
  color: var(--navy);
}

.timeline-form[hidden],
.timeline-results[hidden],
#planning-notes[hidden] { display: none !important; }

.form-field input:focus,
.form-field select:focus,
.input-prefix:focus-within,
.input-suffix:focus-within {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 2px;
}

.primary-result {
  padding: 24px;
  border-radius: 18px;
  background: var(--navy-deep);
  color: white;
}

.primary-result > span,
.primary-result > strong,
.result-card > span,
.result-card > strong,
.stretch-result > span,
.stretch-result > strong { display: block; }

.primary-result > span,
.stretch-result > span { font-size: 13px; font-weight: 750; }

.primary-result > strong {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.1;
}

.primary-result p {
  margin: 10px 0 0;
  color: #c4d6e6;
  font-size: 13px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.result-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--ice);
}

.result-card span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.result-card strong { margin-top: 6px; color: var(--navy); font-size: 20px; }

.breakdown {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.breakdown summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.breakdown dl { margin: 0; padding-bottom: 12px; }

.breakdown dl > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
}

.breakdown dt { color: var(--muted); font-size: 13px; }
.breakdown dd { margin: 0; color: var(--navy); font-size: 13px; font-weight: 750; text-align: right; }

.stretch-result {
  margin-top: 18px;
  padding: 18px;
  border-radius: 15px;
  background: var(--sky);
  color: var(--navy);
}

.stretch-result strong { margin-top: 3px; font-size: 28px; }
.stretch-result p { margin: 8px 0 0; color: #43586c; font-size: 12px; line-height: 1.5; }

.scope-section { padding-block: 42px 90px; }
.scope-section h2 { font-size: clamp(32px, 5vw, 48px); }

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.scope-grid > div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.scope-grid strong { color: var(--navy); }
.scope-grid p, .legal-note { color: var(--muted); font-size: 14px; }
.scope-grid p { margin: 8px 0 0; }
.legal-note { margin: 20px 0 0; }
.legal-note a { color: var(--navy); font-weight: 750; }

.timeline-shell { padding-bottom: 36px; }
.timeline-form { padding: 30px; }
.timeline-form .field-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline-form .date-field, .timeline-form .fee-field { grid-column: span 2; }
.timeline-form .extension-question { grid-column: span 2; }
.timeline-results { margin-top: 0; }

.assumptions-actions {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.assumptions-actions .planner-continue { margin-top: 0; }

.result-edit-row {
  display: flex;
  justify-content: flex-start;
  margin: -10px 0 18px;
}

.extension-question {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.binary-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.binary-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.binary-choice label {
  min-height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--navy);
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
}

.binary-choice input:checked + label {
  border-color: var(--blue);
  background: var(--sky);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.binary-choice input:focus-visible + label {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 2px;
}

.extension-details {
  display: block;
  margin-top: 14px;
}

.extension-details[hidden] { display: none; }

.extension-details > span {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 750;
}

.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: -8px 0 12px;
}

.timeline-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-toolbar input[type="range"] {
  width: 150px;
  accent-color: var(--blue);
}

.zoom-button,
.fit-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--navy);
  font: 750 14px var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
}

.zoom-button {
  width: 44px;
  padding: 0;
  font-size: 24px;
}

.fit-button { padding: 0 14px; }

.zoom-button:hover,
.fit-button:hover { background: var(--sky); }

.zoom-button:focus-visible,
.fit-button:focus-visible,
.timeline-toolbar input:focus-visible {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 2px;
}

.zoom-button:disabled { cursor: not-allowed; opacity: 0.45; }

.pdf-only { display: none; }

.pdf-export-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 0 16px;
}

.pdf-export-control small {
  color: var(--muted);
  font-size: 12px;
}

.pdf-export-control small.error { color: #a42c2c; }

.pdf-button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font: 750 14px var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 8px 20px rgba(9, 38, 65, 0.18);
}

.pdf-button:hover { background: var(--blue); }

.pdf-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.pdf-button:focus-visible {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 3px;
}

#zoom-value {
  min-width: 48px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.swipe-hint {
  display: none;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-desktop-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--ice);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.timeline-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 16px;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--blue) var(--ice);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  touch-action: pan-x pan-y;
  user-select: none;
}

.timeline-scroll.is-dragging { cursor: grabbing; }

.timeline-scroll:focus-visible {
  outline: 3px solid rgba(79, 128, 184, 0.28);
  outline-offset: 4px;
}

.timeline-scale-frame {
  position: relative;
  width: 1040px;
  height: 440px;
}

.timeline-track {
  position: relative;
  width: 100%;
  min-width: 1040px;
  height: 440px;
  transform-origin: top left;
}

.timeline-line {
  position: absolute;
  z-index: 0;
  top: 220px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: var(--navy);
}

.duration-segment {
  position: absolute;
  z-index: 1;
  top: 198px;
  left: var(--segment-left, 0%);
  width: var(--segment-width, 0%);
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.duration-segment span {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: white;
}

.milestone {
  position: absolute;
  z-index: 2;
  top: 0;
  left: var(--position, 0%);
  width: 0;
  height: 100%;
}

.milestone::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 211px;
  left: -7px;
  width: 14px;
  height: 14px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(79, 128, 184, 0.25);
}

.milestone-card {
  position: absolute;
  left: 0;
  width: 168px;
  min-height: 160px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  transform: translateX(-50%);
  box-shadow: 0 8px 22px rgba(9, 38, 65, 0.06);
}

.milestone-top .milestone-card { top: 20px; }
.milestone-bottom .milestone-card { top: 254px; }
.milestone.edge-start .milestone-card { transform: translateX(0); }
.milestone.edge-end .milestone-card { transform: translateX(-100%); }

.milestone-card span,
.milestone-card strong,
.milestone-card small { display: block; }

.milestone-card span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.milestone-card strong { margin-top: 8px; color: var(--navy); font-size: 17px; line-height: 1.25; }
.milestone-card time { display: block; margin-top: 10px; color: var(--ink); font-size: 14px; font-weight: 750; }
.milestone-card small { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.35; }

.fee-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.fee-box {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.fee-box span, .fee-box strong { display: block; }
.fee-box span { color: var(--muted); font-size: 13px; }
.fee-box strong { margin-top: 4px; color: var(--navy); font-size: 24px; }
.fee-status.good { color: #1b6b50; }
.fee-status.check { color: #a42c2c; }

.combined-direction-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 14px;
  padding: 12px 16px;
  border: 1px solid #bfd3e5;
  border-radius: 14px;
  background: var(--pale-blue);
}

.combined-direction-note strong { color: var(--navy); font-size: 14px; }
.combined-direction-note span { color: var(--muted); font-size: 12px; text-align: right; }

.combined-scale-frame {
  position: relative;
  width: 1300px;
  height: 780px;
}

.combined-track {
  position: relative;
  width: 1300px;
  height: 780px;
  transform-origin: top left;
}

.combined-lane {
  position: absolute;
  left: 0;
  width: 100%;
  height: 326px;
}

.combined-lane.lane-0 { top: 0; }
.combined-lane.lane-1 { top: 354px; }

.combined-lane-title {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--navy);
}

.combined-lane-title strong { font-size: 20px; }
.combined-lane-title span { color: var(--muted); font-size: 12px; }

.combined-lane-line {
  position: absolute;
  top: 172px;
  left: 18px;
  right: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--navy);
}

.buy-lane .combined-lane-line,
.single-lane .combined-lane-line { background: var(--blue); }

.combined-milestone {
  position: absolute;
  top: 0;
  left: var(--position, 0%);
  width: 0;
  height: 100%;
}

.combined-milestone::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 165px;
  left: -7px;
  width: 14px;
  height: 14px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(79, 128, 184, 0.25);
}

.combined-milestone-card {
  position: absolute;
  left: 0;
  width: 166px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  transform: translateX(-50%);
  box-shadow: 0 8px 22px rgba(9, 38, 65, 0.06);
}

.combined-milestone.above .combined-milestone-card { top: 38px; }
.combined-milestone.below .combined-milestone-card { top: 195px; }
.combined-milestone.edge-left .combined-milestone-card { transform: translateX(0); }
.combined-milestone.edge-right .combined-milestone-card { transform: translateX(-100%); }

.combined-milestone-card span,
.combined-milestone-card strong,
.combined-milestone-card time,
.combined-milestone-card small { display: block; }

.combined-milestone-card span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.combined-milestone-card strong { margin-top: 6px; color: var(--navy); font-size: 15px; line-height: 1.2; }
.combined-milestone-card time { margin-top: 7px; color: var(--ink); font-size: 12px; font-weight: 750; }
.combined-milestone-card small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.3; }

.combined-duration {
  position: absolute;
  z-index: 2;
  top: 154px;
  left: var(--position, 0%);
  padding: 5px 9px;
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  transform: translate(-50%, -100%);
  white-space: nowrap;
}

.combined-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.combined-summary .fee-box { padding: 17px; }
.combined-summary .fee-box strong { font-size: 19px; }
.combined-summary .fee-box small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.occupancy-indicator {
  position: absolute;
  top: 688px;
  left: 0;
  width: 100%;
  height: 82px;
}

.occupancy-bar {
  position: absolute;
  top: 0;
  left: var(--occupancy-start);
  width: max(8px, var(--occupancy-width));
  height: 9px;
  border-radius: 999px;
  background: currentColor;
}

.occupancy-copy {
  position: absolute;
  top: 16px;
  left: clamp(160px, var(--occupancy-midpoint), calc(100% - 160px));
  width: 300px;
  padding: 10px 12px;
  border: 1px solid currentColor;
  border-radius: 12px;
  background: white;
  transform: translateX(-50%);
  box-shadow: 0 7px 18px rgba(9, 38, 65, 0.08);
}

.occupancy-copy strong,
.occupancy-copy small { display: block; }

.occupancy-copy strong { font-size: 14px; }
.occupancy-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.occupancy-gap { color: #b42318; }
.occupancy-gap .occupancy-copy,
.occupancy-summary.occupancy-gap { border-color: #f0a39c; background: #fff1f0; }
.occupancy-summary.occupancy-gap strong { color: #b42318; }

.occupancy-overlap { color: #18794e; }
.occupancy-overlap .occupancy-copy,
.occupancy-summary.occupancy-overlap { border-color: #8fd3ae; background: #edf9f2; }
.occupancy-summary.occupancy-overlap strong { color: #18794e; }

.occupancy-same-day { color: var(--blue); }
.occupancy-same-day .occupancy-copy,
.occupancy-summary.occupancy-same-day { border-color: #bfd3e5; background: var(--pale-blue); }
.occupancy-summary.occupancy-same-day strong { color: var(--navy); }

.parameter-section-heading,
.hdb-buying-fields,
.contra-plan-note {
  grid-column: 1 / -1;
}

.hdb-fee-rule {
  grid-column: 1 / -1;
  margin: -2px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ice);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.hdb-fee-rule.error {
  border-color: #d86a6a;
  background: #fff0f0;
  color: #a42c2c;
}

.form-field.field-invalid .input-prefix {
  border-color: #c94040;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(201, 64, 64, 0.12);
}

.form-field.field-invalid > span { color: #a42c2c; }

.parameter-section-heading,
.private-fields-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.parameter-section-heading h3,
.private-fields-heading h3 { margin: 4px 0 0; color: var(--navy); font-size: 24px; }
.parameter-section-heading p:last-child,
.private-fields-heading p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.hdb-buying-fields {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 2px solid var(--line);
}

.hdb-buying-fields[hidden] { display: none; }
.hdb-buying-fields > .field-grid { margin-top: 22px; }

.contra-plan-note {
  padding: 15px 18px;
  border: 1px solid #bfd3e5;
  border-radius: 14px;
  background: var(--pale-blue);
  color: var(--navy);
  font-size: 13px;
  line-height: 1.55;
}

.contra-plan-note strong { display: block; margin-bottom: 3px; font-size: 15px; }

.calculation-disclaimer {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #e4c06b;
  border-radius: 14px;
  background: #fff9e9;
  color: var(--navy);
}

.calculation-disclaimer strong { display: block; font-size: 14px; }
.calculation-disclaimer p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.timeline-contact-prompt {
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid #ead08d;
}

.timeline-contact-prompt h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.25;
}

.timeline-contact-prompt p { font-size: 13px; }

.timeline-whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 14px;
  padding: 0 18px;
  border-radius: 999px;
  background: #19734c;
  color: white;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 16px rgb(25 115 76 / 20%);
  touch-action: manipulation;
}

.timeline-whatsapp-button:hover { background: #125c3c; }
.timeline-whatsapp-button:focus-visible { outline: 3px solid rgb(25 115 76 / 30%); outline-offset: 3px; }

@media (max-width: 980px) {
  .tool-layout { grid-template-columns: 1fr; }
  .results-panel { position: static; }
  .timeline-form .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swipe-hint { display: block; }
  .timeline-desktop-hint { display: none; }
}

@media (max-width: 640px) {
  .orientation-prompt {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .orientation-prompt button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .tool-intro { padding-block: 46px 28px; }
  .tool-lead { font-size: 16px; }
  .local-note { border-radius: 15px; }
  .tool-panel, .timeline-form { padding: 22px 18px; border-radius: 19px; }
  .field-grid,
  .timeline-form .field-grid,
  .result-grid,
  .scope-grid,
  .fee-summary,
  .plan-options,
  .combined-summary { grid-template-columns: 1fr; }
  .full-field,
  .timeline-form .date-field,
  .timeline-form .fee-field,
  .timeline-form .extension-question { grid-column: auto; }
  .primary-result { padding: 20px; }
  .breakdown dl > div { align-items: flex-start; }
  .timeline-results { padding-inline: 14px; }
  .timeline-track { min-width: 1040px; }
  .timeline-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .timeline-toolbar > div { flex: 1 1 230px; }
  .timeline-toolbar input[type="range"] { flex: 1; min-width: 100px; }
  .fit-button { flex: 1 1 auto; }
  .pdf-export-control {
    align-items: stretch;
    flex-direction: column;
  }
  .pdf-button { width: 100%; }
  .timeline-whatsapp-button { width: 100%; }
  .plan-selector-panel { padding: 22px 18px; }
  .plan-options label { min-height: 92px; }
  .question-branch { grid-template-columns: 1fr; }
  .contra-question-grid,
  .stacked-options { grid-template-columns: 1fr; }
  .three-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .planner-continue { width: 100%; }
  .planner-context { align-items: stretch; flex-direction: column; padding-block: 28px 20px; }
  .combined-direction-note { align-items: flex-start; flex-direction: column; }
  .combined-direction-note span { text-align: left; }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 9mm 10mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    width: 100%;
    min-width: 0;
    overflow: visible !important;
    background: white !important;
    color: #172b3f;
    font-size: 10pt;
  }

  .draft-ribbon,
  .orientation-prompt,
  .skip-link,
  .site-header,
  .tool-intro,
  .timeline-form,
  .timeline-results > .panel-heading,
  .timeline-toolbar,
  .result-edit-row,
  .timeline-desktop-hint,
  .pdf-export-control,
  .swipe-hint,
  .site-footer {
    display: none !important;
  }

  .pdf-only { display: block; }

  main,
  .timeline-shell,
  .scope-section,
  .timeline-results {
    position: relative;
    z-index: 1;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .timeline-shell { padding: 0; }

  .timeline-results {
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .pdf-watermark {
    position: fixed;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: 112mm;
    height: 112mm;
    object-fit: contain;
    opacity: 0.055;
    transform: translate(-50%, -50%);
  }

  .pdf-document-header {
    display: grid;
    grid-template-columns: 21mm 1fr;
    gap: 5mm;
    align-items: center;
    padding-bottom: 3mm;
    border-bottom: 1.5pt solid var(--navy);
  }

  .pdf-document-header img {
    width: 19mm;
    height: 19mm;
    object-fit: contain;
  }

  .pdf-document-header p,
  .pdf-document-header h1,
  .pdf-document-header span { margin: 0; }

  .pdf-document-header p {
    color: var(--blue);
    font-size: 8pt;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .pdf-document-header h1 {
    margin-top: 1mm;
    font: 700 21pt/1.05 var(--font-display);
  }

  .pdf-document-header span {
    color: var(--muted);
    font-size: 8.5pt;
  }

  .pdf-assumptions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2.5mm;
    margin: 3mm 0 2mm;
  }

  .pdf-assumptions > div {
    padding: 2mm 2.5mm;
    border: 0.7pt solid var(--line);
    border-radius: 2.5mm;
    background: rgba(244, 248, 252, 0.88);
  }

  .pdf-assumptions dt,
  .pdf-assumptions dd { margin: 0; }

  .pdf-assumptions dt {
    color: var(--muted);
    font-size: 7.5pt;
  }

  .pdf-assumptions dd {
    color: var(--navy);
    font-size: 9pt;
    font-weight: 800;
  }

  .timeline-scroll {
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
    padding: 0;
  }

  .timeline-scale-frame {
    width: 100% !important;
    height: 76mm !important;
  }

  .timeline-track {
    width: 100% !important;
    min-width: 0 !important;
    height: 76mm !important;
    transform: none !important;
  }

  .timeline-line { top: 37mm; height: 1.2mm; }
  .duration-segment { top: 31mm; font-size: 9.5pt; }
  .duration-segment span { padding: 1mm 1.5mm; }

  .milestone::before {
    top: 35.1mm;
    left: -2mm;
    width: 4mm;
    height: 4mm;
    border-width: 0.7mm;
  }

  .milestone-card {
    width: 34mm;
    min-height: 28mm;
    padding: 2.5mm;
    border-radius: 3mm;
    box-shadow: 0 1.5mm 4mm rgba(9, 38, 65, 0.08);
  }

  .milestone-top .milestone-card { top: 1mm; }
  .milestone-bottom .milestone-card { top: 43mm; }
  .milestone-card span { font-size: 6.8pt; }
  .milestone-card strong { margin-top: 1.2mm; font-size: 10pt; }
  .milestone-card time { margin-top: 1.5mm; font-size: 8.5pt; }
  .milestone-card small { margin-top: 1.2mm; font-size: 7pt; }

  .fee-summary {
    grid-template-columns: 1fr 1fr;
    gap: 4mm;
    margin-top: 1mm;
  }

  .fee-box {
    padding: 2mm 3mm;
    border-radius: 3mm;
    background: rgba(255, 255, 255, 0.9);
  }

  .fee-box span { font-size: 8pt; }
  .fee-box strong { margin-top: 0; font-size: 14pt; }

  .scope-section {
    padding: 3mm 0 0;
    page-break-inside: avoid;
  }

  .scope-section h2 { font-size: 15pt; }

  .scope-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3mm;
    margin-top: 2mm;
  }

  .scope-grid > div {
    padding: 2mm 3mm;
    border-radius: 3mm;
    background: rgba(255, 255, 255, 0.9);
  }

  .scope-grid strong { font-size: 9pt; }
  .scope-grid p,
  .legal-note,
  .pdf-source-note {
    font-size: 8.2pt;
    line-height: 1.38;
  }

  .scope-grid p { margin-top: 1mm; }
  .legal-note { margin: 2mm 0 0; }

  .legal-note a {
    color: var(--navy);
    white-space: nowrap;
    word-break: break-all;
    text-decoration: none;
  }

  .legal-note a::after {
    content: none;
  }

  .pdf-hdb-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3mm;
    margin-top: 1.5mm;
  }

  .pdf-hdb-links p { margin: 0; }

  .pdf-hdb-links strong,
  .pdf-hdb-links a { display: block; }

  .pdf-hdb-links strong {
    color: var(--navy);
    font-size: 7.8pt;
  }

  .pdf-hdb-links a {
    color: var(--muted);
    font-size: 7.2pt;
    line-height: 1.25;
    text-decoration: none;
    word-break: break-all;
  }

  .pdf-source-note {
    margin: 1.5mm 0 0;
    color: var(--muted);
    word-break: break-all;
  }
}
