:root {
  --bg: #f4f7f6;
  --ink: #121a22;
  --ink-soft: #2e3a44;
  --muted: #6b7986;
  --line: rgba(17, 24, 39, 0.09);
  --line-strong: rgba(17, 24, 39, 0.16);
  --card: #ffffff;
  --card-tint: #fcfdfd;
  --primary: #0d6d66;
  --primary-dark: #0a5a54;
  --primary-soft: #e8f4f2;
  --accent: #d97706;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --info: #1e6091;
  --info-bg: #eef7f6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.08);
  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.page-shell {
  width: min(1020px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 4px 4px 0;
}

.hero-text { min-width: 0; }

.landing-hero {
  align-items: stretch;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

h1 {
  margin: 0 0 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(1.25rem, 2.15vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
}

h2 {
  margin: 0 0 4px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.hero-sub {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.98rem;
}

.landing-sub {
  max-width: 58ch;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.hero-link {
  text-decoration: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(13, 109, 102, 0.22);
  border-radius: 9px;
  background: rgba(232, 244, 242, 0.75);
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.landing-badge {
  display: grid;
  gap: 8px;
  align-self: flex-start;
  white-space: normal;
  min-width: 240px;
}

.landing-badge strong {
  color: var(--primary-dark);
}

.hero-inline-link {
  margin: 12px 0 0;
}

/* ---------- Card ---------- */
.calculator-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-md);
}

.seo-intro {
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.seo-intro p {
  margin: 8px 0 0;
  max-width: 72ch;
  color: var(--ink-soft);
}

.mode-switch {
  display: flex;
  gap: 0;
  padding: 0 12px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  margin-bottom: 18px;
}

.mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  padding: 0 18px 11px;
  border: 0;
  background: transparent;
  color: rgba(107, 121, 134, 0.72);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.mode-button:hover { color: rgba(46, 58, 68, 0.9); }

.mode-button.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- Panels ---------- */
.tab-panel {
  background: transparent;
  border: 0;
  padding: 0;
}

.seo-content {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.info-section,
.noscript-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.info-section p,
.noscript-card p {
  margin: 10px 0 0;
  max-width: 74ch;
  color: var(--ink-soft);
}

.seo-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.seo-list li + li {
  margin-top: 8px;
}

.faq-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.faq-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.faq-item p {
  margin-top: 6px;
}

.seo-content-standalone {
  margin-top: 0;
}

.text-link {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.site-footer {
  margin-top: 14px;
  padding: 0 2px 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 6px 0 0;
}

.site-footer-compact {
  text-align: center;
}

.site-footer-compact p {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.site-footer-compact .text-link {
  font-weight: 500;
}

.footer-separator {
  display: inline-block;
  margin: 0 8px;
  color: rgba(107, 121, 134, 0.7);
}

.panel-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  max-width: 58ch;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading-split {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.info-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: default;
}

.info-chip svg {
  color: var(--primary);
}

.info-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(340px, 70vw);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.info-chip:hover .info-tooltip,
.info-chip:focus-within .info-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 320px); gap: 18px; }

.simple-grid {
  grid-template-columns: minmax(280px, 1.05fr) minmax(220px, 0.8fr);
  gap: 16px 28px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

input[type="number"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
input[type="number"]:hover { border-color: rgba(19, 26, 31, 0.22); }
input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.field { display: grid; gap: 10px; }

.field span {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
}

.date-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background-color: var(--card);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='3'/><path d='M16 2v4M8 2v4M3 10h18'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 18px 18px;
  color: var(--ink);
  font-size: 0.98rem;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.date-input::placeholder { color: var(--muted); }

.date-input:hover { border-color: rgba(19, 26, 31, 0.22); }

.date-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.date-input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.form-note {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Buttons ---------- */
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.primary-button:hover { background: var(--primary-dark); }

.secondary-button {
  background: var(--card);
  color: var(--primary-dark);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.secondary-button:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }

.primary-button:active, .secondary-button:active { transform: translateY(1px); }

/* ---------- Feedback ---------- */
.feedback {
  margin-top: 12px;
  min-height: 18px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.feedback:empty { margin-top: 0; min-height: 0; }

.feedback.error { color: var(--danger); }
.feedback.info { color: var(--muted); }

/* ---------- Result ---------- */
@keyframes slide-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-kicker {
  margin: 18px 0 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}

.result-date, .result-number {
  margin: 0;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.result-date { font-size: clamp(1.6rem, 3.2vw, 2.1rem); }
.result-date.small { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.result-number {
  font-size: 2.4rem;
  font-variant-numeric: tabular-nums;
  color: var(--primary-dark);
}

.multi-result,
.timeline-panel {
  margin: 0 0 20px;
  padding: 14px 0 0;
  animation: slide-up 0.25s ease;
}

.timeline-header {
  margin: 14px 0 8px;
}

.timeline-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.featured-result-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 108px;
  padding: 18px 24px;
  border: 1px solid rgba(13, 109, 102, 0.44);
  border-radius: 10px;
  background: #fbfdfd;
}

.featured-result-icon {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border-radius: 999px;
  border: 1px solid rgba(13, 109, 102, 0.18);
  color: var(--primary);
  display: grid;
  place-items: center;
  background: #fff;
}

.featured-result-copy {
  flex: 0 1 420px;
  min-width: 0;
  text-align: center;
  transform: translateY(1px);
}

.featured-result-label {
  margin: 0 0 6px;
  font-size: 0.94rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.featured-result-date {
  margin: 0;
  font-size: clamp(1.95rem, 3.4vw, 2.45rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.featured-result-subtitle {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}

.timeline-segment {
  position: relative;
  padding: 16px 16px 14px;
  text-align: center;
}

.timeline-segment + .timeline-segment {
  border-left: 1px solid rgba(17, 24, 39, 0.06);
}

.timeline-dot {
  display: block;
  width: 9px;
  height: 9px;
  margin: -5px auto 12px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 3px #fff;
}

.timeline-segment-title {
  margin: 0 0 4px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--primary);
}

.timeline-segment-copy {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline-segment-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.timeline-segment-date::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d6d66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='3'/><path d='M16 2v4M8 2v4M3 10h18'/></svg>");
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

.summary-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(13, 109, 102, 0.14);
  border-radius: 9px;
  background: #f8fbfa;
  color: var(--ink-soft);
}

.summary-banner svg {
  flex: 0 0 auto;
  color: var(--primary);
}

.summary-banner-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
}

.summary-banner-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(17, 24, 39, 0.12);
}

.summary-banner-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.result-footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.result-detail {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.multi-result {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.multi-result .result-date { font-size: clamp(1.6rem, 3vw, 2.1rem); }

.multi-summary-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
}

.multi-highlight-card,
.multi-metrics-card {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.multi-highlight-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-color: rgba(13, 109, 102, 0.44);
  background: #fbfdfd;
}

.multi-highlight-icon,
.multi-metric-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(232, 244, 242, 0.55);
}

.multi-highlight-copy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.multi-highlight-value {
  font-size: clamp(2.2rem, 3.6vw, 2.9rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.multi-highlight-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--primary);
}

.multi-metrics-card {
  display: flex;
  align-items: center;
  padding: 18px 22px;
}

.multi-metric {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.multi-metric-icon {
  width: 56px;
  height: 56px;
  color: #5e6a78;
  background: #f7f9fb;
}

.multi-metric-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.multi-metric-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.multi-metric-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.multi-metric-divider {
  width: 1px;
  align-self: stretch;
  margin: 0 20px;
  background: rgba(17, 24, 39, 0.08);
}

.multi-note-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(13, 109, 102, 0.12);
  border-radius: 8px;
  background: #f8fbfa;
}

.multi-note-banner svg {
  color: var(--primary);
  flex: 0 0 auto;
}

.multi-note-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.stat-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-top: 4px;
}

.stat-row-summary {
  margin-top: 0;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: none;
  min-height: 96px;
  justify-content: center;
}

.stat-value {
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat-accent .stat-value { color: var(--primary-dark); }

.stat-accent {
  background: #fbfdfd;
  border-color: rgba(13, 109, 102, 0.18);
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}

.stat-divider { display: none; }

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: inherit;
  transition: width 0.4s ease;
}

.progress-bar.warn { background: linear-gradient(90deg, var(--accent), #b85f00); }
.progress-bar.full { background: linear-gradient(90deg, var(--danger), #8a1a12); }

/* ---------- Stay rows ---------- */
.stay-list { display: grid; gap: 12px; }

.stays-section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 10px 0 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.stays-section-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.stay-row {
  padding: 16px 16px 14px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  will-change: transform;
}

.stay-row:hover { border-color: var(--line-strong); }
.stay-row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10); }
.stay-row.is-sorting { box-shadow: 0 10px 24px -18px rgba(15, 118, 110, 0.55); }

.stay-row-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.stay-badge {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.stay-label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}

.stay-days {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stay-label-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 6px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.stay-label-input::placeholder { color: var(--muted); font-weight: 600; }
.stay-label-input:hover { background: rgba(19, 26, 31, 0.04); }
.stay-label-input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

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

.remove-link {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.remove-link:hover { background: var(--danger-bg); color: var(--danger); }

/* ---------- Footer ---------- */
[hidden] { display: none !important; }

/* ---------- Ghost / print button ---------- */
.result-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 46px;
}

.result-actions-summary {
  margin-top: 4px;
  margin-bottom: 4px;
}

.multi-last-covered-block {
  padding-top: 2px;
}

.secondary-button-small {
  height: 34px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ghost-button:hover { background: var(--card-tint); color: var(--ink); border-color: rgba(19, 26, 31, 0.22); }

.subtle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.subtle-button:hover {
  color: var(--primary-dark);
}

.subtle-button:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 20px;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    flex-direction: column;
  }

  .section-heading {
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
    justify-content: space-between;
  }

  .mode-switch {
    padding: 0;
  }

  .mode-button {
    min-width: 0;
    flex: 1;
    padding-left: 8px;
    padding-right: 8px;
  }

  .simple-grid,
  .stay-fields,
  .stat-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .calculator-card {
    padding: 16px 14px 18px;
    border-radius: 22px;
  }

  .tab-panel {
    padding: 0;
  }

  .multi-summary-grid,
  .timeline-row {
    grid-template-columns: 1fr;
  }

  .multi-highlight-card,
  .multi-metrics-card,
  .multi-metric,
  .stays-section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .multi-highlight-copy {
    gap: 6px;
  }

  .multi-metrics-card {
    padding: 16px;
  }

  .multi-metric-divider {
    width: 100%;
    height: 1px;
    margin: 14px 0;
  }

  .featured-result-card,
  .summary-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .featured-result-card {
    min-height: 0;
  }

  .featured-result-copy {
    flex-basis: auto;
    text-align: left;
    transform: none;
  }

  .seo-intro,
  .info-section,
  .noscript-card {
    padding: 16px;
  }

  .landing-badge {
    min-width: 0;
  }

  .footer-separator {
    margin: 0 6px;
  }

  .timeline-segment + .timeline-segment {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .timeline-dot {
    margin-top: 0;
  }

  .timeline-segment {
    padding: 18px 16px;
  }

  .timeline-segment-date {
    justify-content: center;
  }

  .summary-banner-divider {
    width: 100%;
    height: 1px;
  }

  .result-actions {
    justify-content: space-between;
    margin-top: 26px;
  }
}
.ghost-button svg { opacity: 0.7; }

/* ---------- Print ---------- */
@media print {
  body {
    background: #fff !important;
    background-image: none !important;
    font-size: 12pt;
    color: #000;
  }
  .page-shell { width: 100%; padding: 0; }
  .hero-mark, .mode-switch, .secondary-button, .remove-link,
  .stay-row-header .stay-badge, .no-print, .feedback,
  .section-heading p, .stay-label-input { display: none !important; }
  .calculator-card { border: 0; box-shadow: none; padding: 0; }
  .tab-panel[hidden] { display: none !important; }
  .tab-panel { background: transparent; border: 0; padding: 0; }
  .multi-result {
    border: 1px solid #000;
    box-shadow: none;
    page-break-inside: avoid;
    animation: none;
  }
  .stay-row {
    border: 1px solid #999;
    box-shadow: none;
    page-break-inside: avoid;
  }
  .stay-fields .field span { color: #555; }
  input[type="text"].date-input, input[type="number"] {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    height: auto !important;
  }
  .date-input { background-image: none !important; padding-left: 0 !important; }
  .stay-days {
    background: transparent !important;
    color: #000 !important;
    padding: 0 !important;
  }
  .hero { margin-bottom: 16pt; }
  .date-picker { display: none !important; }
}

/* ---------- Date picker ---------- */
.date-picker {
  position: absolute;
  z-index: 50;
  width: 280px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -8px rgba(16, 24, 40, 0.18), 0 2px 6px rgba(16, 24, 40, 0.06);
  font-size: 0.88rem;
  user-select: none;
  animation: dp-in 0.12s ease;
}

@keyframes dp-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.dp-title {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}

.dp-month-btn, .dp-year-btn {
  background: transparent;
  border: 0;
  padding: 4px 6px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
}
.dp-month-btn:hover, .dp-year-btn:hover { background: rgba(19, 26, 31, 0.06); }
.dp-year-btn { color: var(--muted); font-weight: 500; }

.dp-nav {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dp-nav:hover { background: rgba(19, 26, 31, 0.06); color: var(--ink); }

.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.dp-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 4px 0;
  text-transform: uppercase;
}

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

.dp-day {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  transition: background-color 0.1s ease, color 0.1s ease;
}
.dp-day:hover { background: var(--primary-soft); color: var(--primary-dark); }
.dp-day.is-blank { cursor: default; pointer-events: none; }
.dp-day.is-today {
  box-shadow: inset 0 0 0 1px var(--primary);
  color: var(--primary-dark);
}
.dp-day.is-selected {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.dp-day.is-selected:hover { background: var(--primary-dark); color: #fff; }

.dp-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.dp-foot button {
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.dp-foot button:hover { background: var(--primary-soft); }
.dp-clear { color: var(--muted) !important; }
.dp-clear:hover { background: rgba(19, 26, 31, 0.06) !important; color: var(--ink) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .page-shell { padding: 32px 0 32px; }
  .hero { flex-direction: column; gap: 14px; }
  .tab-panel { padding: 0; }
  .section-heading { flex-direction: column; align-items: stretch; }
  .stay-fields { grid-template-columns: 1fr; }
  .simple-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .secondary-button { width: 100%; }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(100%, calc(100% - 12px));
    padding-top: 14px;
  }

  .hero {
    margin-bottom: 12px;
    padding-inline: 2px;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 0.8rem;
  }

  h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.12;
  }

  .hero-sub {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .calculator-card {
    padding: 14px 12px 16px;
    border-radius: 20px;
  }

  .mode-switch {
    margin-bottom: 14px;
  }

  .mode-button {
    padding: 0 6px 10px;
    font-size: 0.92rem;
  }

  .panel-intro {
    margin-bottom: 12px;
    font-size: 0.92rem;
  }

  .field {
    gap: 8px;
  }

  .field span {
    font-size: 0.94rem;
  }

  .date-input,
  input[type="number"] {
    height: 52px;
    font-size: 1rem;
  }

  .featured-result-card,
  .multi-highlight-card,
  .multi-metrics-card,
  .multi-note-banner,
  .stay-row {
    padding-left: 14px;
    padding-right: 14px;
  }

  .featured-result-date {
    font-size: clamp(1.85rem, 11vw, 2.45rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .timeline-header {
    margin: 12px 0 8px;
  }

  .timeline-segment-title,
  .timeline-segment-copy,
  .timeline-segment-date {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .multi-highlight-card {
    gap: 12px;
    min-height: 0;
  }

  .multi-highlight-icon,
  .multi-metric-icon {
    width: 56px;
    height: 56px;
  }

  .multi-highlight-copy {
    align-items: flex-start;
    gap: 4px;
  }

  .multi-highlight-value {
    font-size: clamp(2rem, 14vw, 2.8rem);
  }

  .multi-highlight-label {
    font-size: 0.92rem;
  }

  .multi-metric {
    width: 100%;
  }

  .multi-note-banner {
    align-items: flex-start;
  }

  .stays-section-heading {
    gap: 12px;
    align-items: stretch;
  }

  .stays-section-heading h2 {
    font-size: 0.98rem;
  }

  .secondary-button-small,
  .primary-button {
    width: 100%;
  }

  .stay-row-header {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 12px;
  }

  .stay-badge {
    flex: 0 0 auto;
  }

  .stay-label-input {
    flex: 1 1 120px;
    min-width: 0;
  }

  .stay-days {
    order: 3;
    margin-left: 40px;
  }

  .remove-link {
    margin-left: auto;
    width: 32px;
    height: 32px;
  }

  .result-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
    margin-top: 20px;
  }

  .subtle-button {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(13, 109, 102, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(232, 244, 242, 0.45);
  }

  .site-footer {
    margin-top: 12px;
    padding-bottom: 2px;
  }

  .site-footer-compact p {
    gap: 6px 10px;
    line-height: 1.6;
  }

  .footer-separator {
    margin: 0;
  }
}
