:root {
  --page-bg: linear-gradient(135deg, #e7f7f1 0%, #eef7f7 45%, #f7fbfb 100%);
  --card-bg: rgba(255, 255, 255, 0.84);
  --card-strong: #fffdf8;
  --ink: #24373d;
  --ink-soft: #53676d;
  --line: rgba(22, 51, 54, 0.12);
  --accent: #1c8d98;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --accent-dark: #12343b;
  --warn: #b45309;
  --danger: #9f1239;
  --shadow: 0 18px 60px rgba(12, 49, 54, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page-bg);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 24px;
  padding: 30px;
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(140deg, rgba(18, 52, 59, 0.80), rgba(18, 52, 59, 0.72)),
    url("/static/assets/quantum-header.png") center/cover no-repeat;
  color: #f7fbfa;
  box-shadow: var(--shadow);
}

.hero-copywrap {
  flex: 1 1 auto;
  max-width: 760px;
}

.hero-mark {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 300px;
}

.hero-logo {
  width: min(440px, 100%);
  border-radius: 22px;
  box-shadow: 0 20px 40px rgba(8, 28, 33, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.78);
}

.panel-kicker {
  color: var(--accent);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.hero-copy {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(247, 251, 250, 0.86);
}

.status-banner {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-dark);
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.status-banner.error {
  background: rgba(159, 18, 57, 0.1);
  border-color: rgba(159, 18, 57, 0.18);
  color: var(--danger);
}

.status-banner.hidden {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.panel-base {
  background: linear-gradient(180deg, rgba(28, 141, 152, 0.08), rgba(255, 255, 255, 0.9) 26%);
}

.panel-quote {
  background: linear-gradient(180deg, rgba(18, 52, 59, 0.06), rgba(255, 255, 255, 0.92) 26%);
}

.panel-result {
  background: linear-gradient(180deg, rgba(96, 221, 170, 0.10), rgba(255, 255, 255, 0.92) 26%);
}

.panel-history {
  background: linear-gradient(180deg, rgba(18, 52, 59, 0.05), rgba(255, 255, 255, 0.9) 26%);
}

.panel-wide {
  grid-column: 1 / -1;
}

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

.panel-header h2,
.notes h3 {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}

.panel-actions {
  display: flex;
  gap: 10px;
}

.config-accordion {
  width: 100%;
}

.config-accordion[open] .config-summary {
  margin-bottom: 18px;
}

.config-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  padding: 6px 2px;
}

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

.summary-hint {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(28, 141, 152, 0.14);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.config-inner {
  padding-top: 4px;
}

.config-actions {
  justify-content: flex-end;
  margin-bottom: 18px;
}

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

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

.form-grid label,
.check {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.form-grid label span,
.check span {
  font-weight: 600;
}

.form-grid input,
.form-grid select {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(22, 51, 54, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.form-grid input:focus,
.form-grid select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: rgba(15, 118, 110, 0.4);
}

.span-2 {
  grid-column: span 2;
}

.button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--accent);
  color: #f6fbfb;
  box-shadow: 0 10px 22px rgba(28, 141, 152, 0.24);
}

.button:hover {
  filter: brightness(0.97);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-dark);
  box-shadow: none;
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.button-strong {
  width: 100%;
  margin-top: 18px;
  background: linear-gradient(135deg, #1c8d98, #12343b);
}

.notes {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(96, 221, 170, 0.12), rgba(28, 141, 152, 0.09));
}

.notes ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.toggle-row {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(22, 51, 54, 0.08);
}

.check input {
  inline-size: 18px;
  block-size: 18px;
}

.route-summary,
.result-empty {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(28, 141, 152, 0.08);
  color: var(--ink-soft);
}

.api-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 0.94rem;
}

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

.metric {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card-strong);
  border: 1px solid rgba(22, 51, 54, 0.08);
}

.metric-label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.metric-value {
  display: block;
  margin-top: 8px;
  font-size: 1.28rem;
  font-weight: 700;
}

.metric-emphasis {
  background: linear-gradient(135deg, rgba(28, 141, 152, 0.16), rgba(96, 221, 170, 0.18));
}

.breakdown-table,
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

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

.cost-group {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(18, 52, 59, 0.08);
}

.cost-group-full {
  margin-top: 16px;
}

.cost-group h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--accent-dark);
}

.breakdown-table td,
.history-table th,
.history-table td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(22, 51, 54, 0.08);
  text-align: left;
}

.history-table th {
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.row-total td {
  font-weight: 700;
  color: var(--accent-dark);
}

.row-grand-total td {
  font-weight: 800;
  color: var(--accent-dark);
  font-size: 1.04rem;
}

.link-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.link-row a {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 118, 110, 0.26);
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .form-grid.compact,
  .result-grid,
  .cost-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 18px 14px 36px;
  }

  .hero,
  .panel-header,
  .panel-actions,
  .toggle-row {
    flex-direction: column;
  }

  .form-grid,
  .form-grid.compact,
  .result-grid,
  .cost-stack {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .hero-mark {
    min-width: 0;
    justify-content: flex-start;
  }
}


.section-intro {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.quote-guidance {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 1.25rem;
}

.guidance-item {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(16, 24, 40, 0.08);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.guidance-item strong {
  display: block;
  margin-bottom: 0.28rem;
  color: #0f172a;
  font-size: 0.92rem;
}

.guidance-item span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.panel-result .result-empty {
  border-style: solid;
  border-color: rgba(16, 24, 40, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,250,252,0.92));
}

.hero {
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
}

.button.button-strong {
  box-shadow: 0 14px 28px rgba(6, 95, 70, 0.22);
}


.hero {
  grid-template-columns: 1.35fr 0.9fr;
  min-height: 220px;
}

.hero-copy {
  max-width: 58ch;
  font-size: 1rem;
  line-height: 1.65;
}

.panel {
  border-radius: 24px;
}

.panel-kicker {
  letter-spacing: 0.16em;
}

.section-intro, .autocomplete-note {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.autocomplete-note {
  margin: 0.9rem 0 1.2rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(10, 122, 95, 0.08);
  border: 1px solid rgba(10, 122, 95, 0.14);
}

.profile-groups {
  display: grid;
  gap: 1.2rem;
}

.profile-group {
  padding: 1rem 1rem 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(244,248,248,0.92));
}

.profile-group-header {
  margin-bottom: 0.9rem;
}

.profile-group-header h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: #0f172a;
}

.profile-group-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.quote-grid {
  align-items: start;
}

.quote-guidance {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 1.25rem;
}

.guidance-item {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(16, 24, 40, 0.08);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
}

.guidance-item strong {
  display: block;
  margin-bottom: 0.28rem;
  color: #0f172a;
}

.result-empty {
  min-height: 120px;
  display: grid;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(244,248,250,0.92));
}

.pac-container {
  z-index: 9999 !important;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 16px 40px rgba(15,23,42,0.14);
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
}
