@import url("/fonts.css");

:root {
  font-family:
    "Inter",
    "Noto Sans KR",
    system-ui,
    -apple-system,
    "Malgun Gothic",
    sans-serif;
  color: #202236;
  background: #f8f9fc;
  font-synthesis: none;

  /* Hubwise UI Foundation Color Tokens */
  --brand-primary: #d92d50;
  --accent: #d92d50;
  --accent-hover: #be123c;
  --accent-soft: #fff5f7;
  --accent-ring: rgba(217, 45, 80, 0.15);
  --accent-soft-border: rgba(217, 45, 80, 0.35);

  --text-primary: #202236;
  --text-secondary: #616575;
  --text-muted: #8e95a5;
  --text-nav: #5f6b76;

  --bg-page: #f8f9fc;
  --surface: #ffffff;
  --border: #dce0e8;
  --border-subtle: #e8ecf0;
  --line: #e8ecf0;

  --primary: #d92d50;
  --primary-hover: #be123c;
  --dark-navy: #1a1a2e;
  --selected-border: var(--accent);
  --selected-bg: #ffffff;
  --muted: #616575;

  /* Spacing Scale (4, 8, 12, 16, 20, 24, 32, 48, 64) */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;

  /* Layout Foundation */
  --page: 1440px;
  --content: 1280px;
  --gutter: 80px;
  --column-gap: 24px;

  /* Radius System (Unified 12px) */
  --radius-card: 12px;
  --radius-btn: 12px;
  --radius-input: 12px;
  --radius-badge: 8px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  --surface-radius: 12px;
  --control-radius: 12px;
  --control-height: 48px;
  --surface-padding: 24px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.header-inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--content));
  margin: 0 auto;
  min-height: 60px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 24px;
  box-sizing: border-box;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark-navy);
  line-height: 24px;
}
.brand-mark {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-circle);
  background: var(--accent);
  flex: none;
}
nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
}
nav a {
  position: relative;
  padding: 4px 0;
  color: var(--text-nav);
  transition: color 0.15s ease;
}
nav a:hover {
  color: var(--accent);
  text-decoration: none;
}
nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
}
nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.menu-toggle {
  display: inline-flex;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}
.trial {
  font-size: 12px;
  color: var(--muted);
}
main {
  width: min(calc(100% - 2 * var(--gutter)), var(--content));
  margin: 0 auto;
  padding: 48px 0 64px;
  min-height: 75vh;
  box-sizing: border-box;
}
h1 {
  font-size: 30px;
  line-height: 1.35;
  letter-spacing: -0.5px;
  margin: 0;
  font-weight: 800;
  color: var(--text-primary);
}
h1[tabindex="-1"]:focus-visible {
  outline: none;
}
h2 {
  font-size: 18px;
  line-height: 1.4;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--text-primary);
}
h3 {
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--text-primary);
}
p {
  line-height: 1.6;
}
.intro {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.lede {
  margin: 16px 0 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
}
.notice {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  margin: 20px 0 0;
}
.toolbar {
  display: grid;
  gap: 20px;
  margin: 20px 0 0;
}
.toolbar label {
  min-width: 0;
}
.search-form-compact {
  width: 100%;
  max-width: 100%;
  margin: 0 0 20px;
}
.search-bar-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.search-input-field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 16px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.search-input-field input {
  width: 100%;
  min-height: var(--control-height);
  height: var(--control-height);
  padding: 0 16px 0 44px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: white;
  font-size: 15px;
  color: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.search-input-field input:hover {
  border-color: var(--accent-soft-border);
}
.search-input-field input:focus,
.search-input-field input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  outline: none;
}
.search-submit-button {
  width: auto;
  min-width: 96px;
  height: var(--control-height);
  min-height: var(--control-height);
  margin: 0;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  border-radius: var(--radius-btn);
}
.search-helper-meta {
  margin: 8px 0 0 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 480px) {
  .search-submit-button {
    min-width: 76px;
    padding: 0 14px;
    font-size: 14px;
  }
}
label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-primary);
}
input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 12px 16px;
  background: white;
  color: inherit;
  margin-top: 8px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
select {
  height: var(--control-height);
}
input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  min-width: 0;
}
legend {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  padding: 0;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--accent-soft-border);
}
input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  outline: none;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: white;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
  gap: 8px;
  width: 100%;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background-color 0.15s ease;
}
button:hover,
.button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
  text-decoration: none;
}
.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white;
}
header .button,
header .menu-toggle {
  width: auto;
}
.button.header-cta {
  min-height: 38px;
  min-width: 88px;
  padding: 8px 20px;
  font-size: 14px;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  border-radius: var(--radius-pill);
}
.button.header-cta:hover {
  background: var(--accent-hover);
  color: #fff;
}
.tab-switch {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--column-gap);
  row-gap: 24px;
  width: 100%;
  margin: 0;
}
@supports (grid-template-columns: subgrid) {
  .tab-switch {
    grid-template-columns: subgrid;
  }
}
.tab-switch button {
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-btn);
}
.tab-switch button.primary {
  background: var(--dark-navy);
  border-color: var(--dark-navy);
  color: #fff;
}
.tab-switch button.primary:hover {
  background: #2b2b46;
  border-color: #2b2b46;
  color: #fff;
}
.tab-switch button:not(.primary) {
  background: #fff;
  border-color: var(--border);
  color: var(--text-secondary);
}
.tab-switch button:not(.primary):hover {
  border-color: var(--accent);
  color: var(--accent);
}
.actions,
.stack {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  padding: var(--surface-padding);
  min-width: 0;
  overflow-wrap: anywhere;
  background: #fff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.card.selected {
  border-color: var(--accent);
  background: var(--selected-bg);
  box-shadow: 0 0 0 1px var(--accent);
}
.clickable-card {
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.clickable-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-ring);
}
.card-action {
  margin-top: 14px;
}
.card-action button {
  width: 100%;
}
.place-head-actions {
  display: flex;
  gap: 8px;
}
.place-head-actions button {
  width: auto;
  font-size: 13px;
  padding: 6px 12px;
}
.inspection-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.badge {
  display: inline-flex;
  align-items: center;
  background: #f1f3f8;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-badge);
  margin: 0 8px 8px 0;
  min-height: 24px;
  border: 1px solid var(--line);
}
.badge-primary {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft-border);
}
.price {
  font-size: 25px;
  font-weight: 750;
  margin: 12px 0;
}
.muted,
.meta {
  font-size: 14px;
  color: var(--muted);
}
.meta {
  line-height: 1.6;
  margin-top: 12px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
.empty,
.busy-status {
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: #fff;
  margin-top: 20px;
}
.empty h1,
.empty h2,
.busy-status h2 {
  margin: 0 0 8px;
  font-size: 16px;
}
.empty p,
.busy-status p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.error {
  border: 1px solid #f3c5ce;
  border-radius: var(--control-radius);
  padding: 16px;
  background: #fff2f4;
  line-height: 1.7;
  margin-bottom: 20px;
}
.list {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.list .card {
  display: block;
}
.list .card p {
  margin: 8px 0 0;
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
}
.choice input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}
.evidence {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px;
  line-height: 1.8;
}
summary {
  cursor: pointer;
  min-height: 44px;
}
.field-error {
  color: #a11e36;
  margin: 8px 0 0;
  font-weight: 500;
}
[aria-invalid="true"] {
  border-color: #a11e36;
}
dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 14px;
}
dt {
  color: var(--muted);
}
.compare-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.compare-head .card {
  margin: 0;
}
.comparison-switcher {
  display: block;
  margin: 16px 0;
  max-width: 480px;
}
.comparison-switcher select {
  margin-top: 6px;
}
.compare {
  overflow: auto;
}
.compare table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 14px;
}
.compare th,
.compare td {
  text-align: left;
  padding: 18px;
  border: 1px solid var(--line);
  min-width: 180px;
  vertical-align: top;
}
.compare th {
  background: #f8f9fc;
}
.compare th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--muted);
  width: min(calc(100% - 2 * var(--gutter)), var(--content));
  margin: 0 auto;
  box-sizing: border-box;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  z-index: 10;
  padding: 12px;
  background: white;
}
.skip:focus {
  top: 10px;
}
@media (max-width: 1024px) {
  .header-inner,
  main,
  footer {
    padding-left: 40px;
    padding-right: 40px;
  }
  nav {
    gap: 16px;
    justify-content: flex-start;
    overflow: auto;
  }
  h1 {
    font-size: 28px;
  }
}
@media (max-width: 760px) {
  .header-inner {
    padding: 12px 16px;
    gap: 8px;
    justify-content: space-between;
  }
  nav {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .header-actions {
    flex: none;
    gap: 8px;
  }
  .button.header-cta {
    min-width: 0;
    padding: 8px 12px;
    font-size: 13px;
  }
  main {
    padding: 24px 20px 48px;
  }
  h1 {
    font-size: 26px;
    letter-spacing: -0.4px;
    line-height: 1.5;
  }
  .grid,
  .example-pair {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 16px;
  }
  .price {
    font-size: 23px;
  }
  .compare th,
  .compare td {
    padding: 14px;
    min-width: 140px;
  }
  footer {
    padding: 24px 20px;
  }
}

.comparison-switcher {
  display: none;
  margin: 24px 0;
}
@media (max-width: 1599px) {
  .comparison-switcher {
    display: block;
  }
  .compare .comparison-extra,
  .compare-head .comparison-extra {
    display: none;
  }
}
@media (max-width: 600px) {
  .compare table {
    min-width: 0;
    display: block;
  }
  .compare thead,
  .compare tbody {
    display: block;
  }
  .compare tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }
  .compare th,
  .compare td {
    min-width: 0;
    padding: 14px;
    border-radius: 12px;
    overflow-wrap: anywhere;
  }
  .compare th:first-child {
    position: static;
    grid-column: 1 / -1;
    border: 0;
    padding: 0;
    background: transparent;
  }
  .compare .evidence ul {
    padding-left: 16px;
  }
}

.home-page {
  background: #f8f9fc;
}
.brand-rule {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 20px 0 0;
}

.example-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.place-card,
.candidate-card {
  display: grid;
  gap: 12px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.place-card:hover,
.candidate-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-ring);
}
.place-head,
.candidate-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.place-head h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  color: var(--primary);
  flex: 1;
}
.candidate-head h2 {
  margin: 0;
  flex: 1;
}
.place-head button,
.candidate-actions button,
.compact-action {
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
}
.candidate-card {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
}
.candidate-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 16px;
  border-radius: var(--control-radius);
  background: #f4f6f8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.candidate-info .actions {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.menu-list {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.deferred {
  margin-top: 28px;
}
.deferred h2 {
  margin-bottom: 12px;
}
.compare-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.compare-head .card h2 {
  margin-bottom: 8px;
}
.example-guide {
  margin-top: 24px;
  line-height: 1.8;
}
@media (max-width: 760px) {
  .example-pair .card {
    padding: 16px;
  }
  .example-pair h2 {
    font-size: 16px;
  }
  .candidate-card {
    grid-template-columns: 1fr;
  }
  .candidate-photo {
    min-height: 170px;
  }
  .candidate-info .actions,
  .compare-head {
    grid-template-columns: 1fr;
  }
}
.home h1,
.onboarding {
  max-width: var(--content);
  margin: 0;
}
.condition-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.condition-form legend {
  margin-bottom: 16px;
  font-weight: 700;
}
.condition-form .choice {
  cursor: pointer;
}
.condition-form .choice:has(input:checked) {
  border-color: var(--selected-border);
  background: var(--selected-bg);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}
.condition-form p {
  margin: 0;
}
.onboarding .list .card {
  display: block;
}

textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #cbd2db;
  border-radius: var(--control-radius);
  font: inherit;
  line-height: 1.7;
  color: inherit;
  resize: vertical;
}
#note-form,
#visit-form,
#comparison-input-form {
  margin-top: 24px;
}
.note-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .compare.single-candidate tr {
    grid-template-columns: minmax(0, 1fr);
  }
}

.help-status {
  margin-top: 24px;
}
.help-status dl {
  grid-template-columns: minmax(80px, 1fr) 3fr;
  line-height: 1.8;
}
#visit-form .choice {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--control-radius);
}
#account-host {
  display: grid;
  gap: 20px;
}
.compare td .button,
.compare td button {
  margin-top: 12px;
}

.export-preview {
  margin-top: 24px;
}
.export-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.8;
}

.map-section {
  margin: 28px 0;
}
.candidate-map {
  width: 100%;
  height: 360px;
  border: 1px solid #cbd2db;
  border-radius: var(--control-radius);
}
.map-label {
  display: inline-block;
  min-width: 26px;
  padding: 3px 8px;
  border: 1px solid #20334f;
  border-radius: 14px;
  background: white;
  color: #20334f;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.map-origin {
  background: #df2454;
  border-color: #df2454;
  color: white;
}
@media (max-width: 600px) {
  .candidate-map {
    height: 300px;
  }
}
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 24px 0;
  color: #52647b;
}
.flow-steps li {
  padding: 8px 12px;
  border: 1px solid #dce3ed;
  border-radius: var(--control-radius);
}
.flow-steps [aria-current="step"] {
  color: #b31949;
  border-color: currentColor;
  font-weight: 700;
}
.comparison-guide li {
  margin: 10px 0;
  line-height: 1.7;
}

@media (max-width: 760px), (pointer: coarse) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* Figma 77:3: shared surfaces, progressive detail, and five viewport sizes. */
body {
  line-height: 1.6;
}
.card,
.empty,
.notice,
.button,
button,
input,
select,
textarea {
  border-radius: 12px;
}
.card,
.empty {
  background: white;
}
.card {
  padding: 16px;
}
.card h2,
.card h3 {
  font-size: 16px;
}
.card p,
.meta {
  font-size: 13px;
}
.card p,
.intro,
.meta {
  color: var(--muted);
}
button,
.button {
  font-size: 14px;
  line-height: 22px;
}
.button.header-cta {
  border-radius: var(--radius-pill);
}
.brand-rule {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 12px 0 0;
}
:focus-visible {
  outline-color: var(--accent);
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}
.text-link:hover {
  text-decoration: underline;
}
.condition-form,
main > h2,
.legal-page > h2 {
  margin-top: 24px;
}
main > .intro + *,
.onboarding > .intro + *,
.onboarding > .brand-rule + .card {
  margin-top: 20px;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}
.onboarding-progress a[aria-current="page"] {
  color: var(--primary);
  border-color: var(--primary);
  background: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(26, 26, 46, 0.08);
}
.condition-form .choice {
  min-height: var(--control-height);
}
#profile-form .choice {
  justify-content: center;
  position: relative;
}
#profile-form .choice input {
  position: absolute;
  left: 16px;
}
.selected,
.place-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--selected-bg);
  box-shadow:
    0 0 0 1px var(--accent),
    0 2px 8px var(--accent-ring);
}
.place-card:has(input:checked) .choice {
  color: var(--accent);
  font-weight: 600;
}
.list .candidate-card {
  display: block;
}
.candidate-card .candidate-info {
  min-width: 0;
}
.candidate-tools {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.candidate-tools summary {
  display: list-item;
  padding: 12px 0;
  color: var(--muted);
  font-size: 14px;
}
.candidate-info > .actions:last-child {
  display: flex;
  justify-content: flex-end;
}
.candidate-info > .actions:last-child button {
  width: auto;
  color: var(--muted);
  font-size: 13px;
  background: transparent;
  border: none;
  padding: 6px 10px;
}
.candidate-info > .actions:last-child button:hover {
  color: #a11e36;
  background: #fef2f2;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.compare {
  overflow: visible;
  margin-top: 28px;
}
.compare table,
.compare thead,
.compare tbody {
  display: block;
  min-width: 0;
}
.compare tr {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.compare th,
.compare td {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  padding: 18px;
  background: white;
  overflow-wrap: anywhere;
  box-shadow: 0 2px 8px rgba(26, 26, 46, 0.02);
}
.compare th:first-child {
  grid-column: 1 / -1;
  position: static;
  border: none;
  background: transparent;
  padding: 0 0 4px 0;
  color: #1a1a2e;
  font-size: 15px;
  font-weight: 700;
}
.compare.single-candidate tr {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 600px) {
  .compare {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
  }
  .compare table {
    min-width: 480px;
  }
  .compare tr {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
  }
  .compare th,
  .compare td {
    padding: 14px;
  }
}
.comparison-cell-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.compare .evidence {
  font-size: 12px;
}
.compare-head {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.comparison-guide {
  border-left: 3px solid var(--accent);
}
.comparison-next summary,
.comparison-details > summary {
  padding: 12px 0;
  min-height: var(--control-height);
  font-weight: 700;
  cursor: pointer;
}
.comparison-details {
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.evidence-dialog {
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  width: min(100%, 460px);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  color: #1a1a2e;
  background: white;
  overflow-y: auto;
}
.evidence-dialog::backdrop {
  background: rgb(26 26 46 / 42%);
}
.evidence-panel {
  padding: 28px 24px;
  display: grid;
  gap: 20px;
}
.evidence-panel h2 {
  font-size: 28px;
  margin: 0;
}
.evidence-panel p {
  margin: 0;
}
.evidence-content {
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.evidence-content ul {
  padding-left: 20px;
}
.evidence-content a {
  color: var(--accent);
  text-decoration: underline;
}
.evidence-open {
  overflow: hidden;
}
.account-settings {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.legal-page form {
  margin-top: 28px;
}
.legal-page h2 {
  font-size: 20px;
  margin-top: 32px;
}
.legal-page h3 {
  margin-top: 24px;
}
@media (min-width: 1600px) {
  .compare-head:has(> :nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  :root {
    --page: 1632px;
    --content: 1440px;
    --gutter: 96px;
  }
  .compare tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .compare tr:has(> td:nth-child(3):last-child),
  .compare tr:has(> th:nth-child(3):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 761px) and (max-width: 1023px) {
  nav {
    display: none;
  }
}
@media (max-width: 760px) {
  h1 {
    font-size: 24px;
  }
  .evidence-dialog {
    width: 100%;
    height: fit-content;
    max-height: 85dvh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  .evidence-panel {
    padding: 24px 20px;
  }
  .evidence-panel h2 {
    font-size: 24px;
  }
  .compare td,
  .compare th {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  .button,
  .card {
    transition:
      background-color 120ms ease,
      border-color 120ms ease;
  }
}

/* Make comparison: one aligned matrix, with progressive evidence below it. */
.compare-head {
  gap: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #1a1a2e;
}
.compare-head .card {
  background: transparent;
  color: #fff;
  padding: 24px;
  border: 0;
  border-radius: 0;
}
.compare-head .card + .card {
  border-left: 1px solid #ffffff30;
}
.compare-head .card h2 {
  font-size: 20px;
}
.compare-head .card .meta {
  color: #e0dce9;
}
.comparison-guide {
  margin-block: 32px;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0;
  background: transparent;
  padding: 4px 0 4px 24px;
}
.comparison-guide h2 {
  font-size: 22px;
}
.comparison-guide .actions {
  justify-content: flex-start;
}
.comparison-guide .actions button {
  width: auto;
}
@media (min-width: 900px) {
  #routes-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
  #transactions-form {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: end;
  }
  #transactions-form > button {
    width: auto;
    min-width: 96px;
  }
  main[data-page="compare"] > .actions,
  .comparison-guide .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  main[data-page="compare"] > .actions .button {
    width: auto;
  }
  .compare {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
  }
  .compare table {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }
  .compare thead {
    display: table-header-group;
  }
  .compare tbody {
    display: table-row-group;
  }
  .compare tr {
    display: table-row;
  }
  .compare th,
  .compare td {
    display: table-cell;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-radius: 0;
    padding: 24px;
    vertical-align: top;
  }
  .compare th:first-child {
    width: 23%;
    padding: 24px;
    background: #fafafc;
    border-bottom: 1px solid var(--line);
  }
  .compare thead th {
    background: #f1f2f6;
    font-size: 14px;
  }
  .compare thead th:first-child {
    background: #f1f2f6;
  }
  .compare tr:last-child td,
  .compare tbody tr:last-child th {
    border-bottom: 0;
  }
  .comparison-cell-label {
    display: none;
  }
  .compare td .price {
    font-size: 25px;
  }
}
@media (min-width: 900px) and (max-width: 1599px) {
  .compare .comparison-extra {
    display: none;
  }
}
@media (max-width: 600px) {
  .compare-head .card {
    padding: 18px 14px;
  }
  .compare-head .card h2 {
    font-size: 16px;
  }
  .comparison-guide {
    padding-left: 16px;
  }
  .comparison-guide h2 {
    font-size: 19px;
  }
}
.onboarding-progress nav {
  width: 100%;
  display: block;
}

.onboarding-progress ol {
  display: flex;
  flex: 1;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.onboarding-progress li {
  flex: 1;
}

.onboarding-progress a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
  text-decoration: none;
}

.condition-choice {
  min-width: 0;
}
.condition-choice .meta {
  margin: 8px 0 12px;
  line-height: 1.65;
}
.places-intro h1 {
  margin-bottom: 12px;
}
.places-list {
  min-width: 0;
}
.place-empty-state h2 {
  font-size: 18px;
}
.places-help summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
}
.places-footer .button {
  width: auto;
}
@media (min-width: 700px) {
  .place-search {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  .place-search button {
    width: auto;
    min-width: 96px;
  }
}
@media (max-width: 600px) {
  .place-search {
    padding: 18px;
  }
  .place-empty-state {
    padding: 4px 4px 16px;
  }
  .onboarding-progress a {
    padding: 10px 6px;
    font-size: 13px;
  }
}

/* Site-wide layout contract: shared shell; narrower content lives inside it. */
.header-inner,
main,
footer {
  width: min(calc(100% - 2 * var(--gutter)), var(--content));
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
main {
  padding-top: 48px;
  padding-bottom: 64px;
}
main[data-page="home"] {
  width: 100%;
}
.page-heading {
  margin-bottom: 32px;
}
.page-heading .intro {
  margin-top: 12px;
  max-width: 80ch;
  line-height: 1.6;
  font-size: 14px;
  color: var(--text-secondary);
}
.page-heading .brand-rule {
  margin-top: 12px;
}
.onboarding {
  max-width: none;
}
.onboarding-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 24px;
  max-width: none;
  margin-inline: auto;
  padding: 0;
  border: 0;
}

.condition-form {
  display: grid;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  padding: var(--surface-padding);
  max-width: 800px;
}

.place-search {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  padding: var(--surface-padding);
  margin: 0 0 20px;
  width: 100%;
}

.places-intro {
  margin-bottom: 24px;
}

.places-intro .page-heading {
  margin-bottom: 12px;
}
.place-empty-state {
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  background: #fff;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.04);
}
.place-empty-state h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--primary);
}
.place-empty-state p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.places-help {
  margin-top: 24px;
  max-width: 800px;
  font-size: 14px;
}

.places-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}

button,
.button {
  border-radius: var(--control-radius);
  font-size: 14px;
}
.button.header-cta,
.home .button.primary {
  border-radius: 999px;
}
@media (min-width: 1600px) {
  :root {
    --gutter: 96px;
    --content: 1440px;
  }
}
@media (max-width: 1199px) {
  :root {
    --gutter: 40px;
  }
}
@media (max-width: 899px) {
  :root {
    --gutter: 32px;
  }
}
@media (max-width: 760px) {
  :root {
    --gutter: 20px;
    --surface-padding: 20px;
  }
  main {
    padding-top: 32px;
    padding-bottom: 48px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
}
.legal-page {
  max-width: none;
}

.legal-page > p {
  max-width: 80ch;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.actions > button,
.actions > .button {
  width: auto;
}
.header-cta.button,
.menu-toggle {
  min-height: 44px;
}
.header-inner nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (min-width: 761px) {
  .toolbar:has(> label:only-of-type) {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  .toolbar:has(> label:only-of-type) > button {
    width: auto;
    min-width: 96px;
  }
}

/* Maps stay secondary to explicit registration and comparison choices. */
/* Layout Variants based on 1280px 12-Column Grid Foundation */
/* 6 / 6: 동일 중요도의 비교·탐색 (span 6 / span 6) */
.grid-6-6,
.explore-workspace,
.places-workspace,
.example-workspace,
.candidates-workspace {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  column-gap: var(--column-gap);
  row-gap: 24px;
  align-items: start;
  margin-top: 24px;
}

/* 5 / 7: 입력 + 상세 정보 (span 5 / span 7) */
.grid-5-7,
.input-workspace,
.notes-workspace {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: var(--column-gap);
  row-gap: 24px;
  align-items: start;
  margin-top: 24px;
}

/* 4 / 8: 보조 패널 + 주요 콘텐츠 (span 4 / span 8, 특히 #checklist) */
.grid-4-8,
.checklist-workspace {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: var(--column-gap);
  row-gap: 24px;
  align-items: start;
  margin-top: 24px;
}

/* 8 / 4: 주요 콘텐츠 + 보조 가이드 (span 8 / span 4) */
.grid-8-4,
.inspection-workspace,
.surroundings-workspace,
.maintenance-workspace,
.help-workspace,
.export-workspace,
.onboarding-workspace {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  column-gap: var(--column-gap);
  row-gap: 24px;
  align-items: start;
  margin-top: 24px;
}
.places-list > :first-child,
.explore-list > :first-child,
.explore-history > :first-child,
.inspection-left > :first-child,
.candidates-left > :first-child,
.input-form-col > :first-child,
.notes-main-col > :first-child,
.checklist-main-col > :first-child,
.checklist-side-col > :first-child,
.maintenance-main-col > :first-child,
.surroundings-list-col > :first-child,
.onboarding-form-col > :first-child,
.help-main-col > :first-child,
.export-main-col > :first-child,
.example-main-col > :first-child {
  margin-top: 0;
}
.clickable-card {
  cursor: pointer;
}
.card-action {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.card-action > button,
.card-action > .button {
  width: auto;
  min-width: 180px;
}
#transactions-form,
#nearby-form,
#maintenance-form,
#routes-form {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  margin-block: 24px;
}
@media (min-width: 768px) {
  #transactions-form,
  #nearby-form,
  #maintenance-form,
  #routes-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
  }
  #transactions-form > label,
  #nearby-form > label,
  #maintenance-form > label,
  #routes-form > label {
    flex: 1 1 160px;
    min-width: 0;
  }
  #transactions-form > button,
  #nearby-form > button,
  #maintenance-form > button,
  #routes-form > button {
    width: auto;
    min-width: 110px;
    flex: 0 0 auto;
    height: var(--control-height);
  }
}
.explore-workspace.explore-history-mode .explore-history {
  grid-column: 1 / -1;
}
.places-list,
.explore-list,
.explore-history,
.inspection-left,
.candidates-left,
.input-form-col,
.notes-main-col,
.checklist-main-col,
.maintenance-main-col,
.surroundings-list-col,
.onboarding-form-col,
.help-main-col,
.export-main-col,
.example-main-col {
  min-width: 0;
}
.location-map-panel,
.side-guide-panel {
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  background: #fff;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.04);
}
.sticky-side-panel,
.places-workspace .location-map-panel,
.explore-workspace .location-map-panel,
.inspection-workspace .location-map-panel,
.candidates-workspace .location-map-panel,
.surroundings-workspace .location-map-panel,
.input-workspace .side-guide-panel,
.notes-workspace .side-guide-panel,
.checklist-workspace .side-guide-panel,
.checklist-side-col,
.maintenance-workspace .side-guide-panel,
.onboarding-workspace .side-guide-panel,
.help-workspace .side-guide-panel,
.export-workspace .side-guide-panel,
.example-workspace .side-guide-panel {
  position: sticky;
  top: 88px;
  margin-top: 0;
}
.prerequisite-card {
  padding: 24px;
}
.prerequisite-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}
.prerequisite-card p {
  margin: 0 0 16px;
  line-height: 1.5;
}
.prerequisite-card .actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.prerequisite-card .actions .button,
.prerequisite-card .actions button {
  width: 100%;
}
.location-map-panel {
  padding: 20px;
  border-radius: var(--radius-card);
}
.location-map-panel h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
}
.location-map-canvas .candidate-map {
  height: 480px;
  border-radius: var(--radius-card);
}
.side-guide-panel h2 {
  font-size: 18px;
  margin: 0 0 12px;
  font-weight: 700;
}
.side-guide-panel h3 {
  font-size: 15px;
  margin: 16px 0 8px;
  font-weight: 650;
}
.side-guide-panel .guide-item {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}
.side-guide-panel .guide-item:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.side-guide-panel ul {
  padding-left: 18px;
  margin: 8px 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.explore-guide-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.explore-quick-examples {
  background: #f8f9fc;
  border-radius: var(--control-radius);
  padding: 16px;
  border: 1px solid var(--line);
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.chip-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 6px var(--accent-ring);
}
.candidate-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--radius-card);
}
.candidate-card .candidate-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.candidate-card .candidate-head h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}
.candidate-card .candidate-address {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
  line-height: 1.5;
}
.candidate-card .candidate-price-block {
  padding: 12px 16px;
  background: #f8f9fc;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  margin: 8px 0;
}
.candidate-card .candidate-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.candidate-card .candidate-maintenance {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 4px;
}
.candidate-card .candidate-specs {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.candidate-delete-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.candidate-delete-row button,
.candidate-delete-row .button,
.candidate-card [data-action="remove-candidate"] {
  width: auto;
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}
.candidate-delete-row button:hover,
.candidate-delete-row .button:hover,
.candidate-card [data-action="remove-candidate"]:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-soft-border);
  text-decoration: none;
}
.explore-steps-card {
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  padding: 16px;
}
.explore-steps-card h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
.flow-mini-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.flow-mini-steps strong {
  color: var(--primary);
  font-weight: 600;
}
.places-summary-box {
  background: var(--accent-soft);
  border: 1px solid rgba(217, 45, 80, 0.15);
  border-radius: var(--control-radius);
  padding: 14px 16px;
}
.places-summary-box h3 {
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 8px;
}
.places-summary-box ul {
  list-style: disc;
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}
.location-map-canvas {
  min-height: 380px;
}
.location-map-canvas .candidate-map {
  height: 440px;
  border-radius: var(--control-radius);
  overflow: hidden;
}
.map-mobile-controls {
  display: none;
}
.map-highlight {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.map-label.map-selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.catalogue-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 14px;
}
.catalogue-facts dt {
  color: var(--muted);
}
.catalogue-facts dd {
  margin: 0;
  font-weight: 600;
}
.notice-card {
  scroll-margin-top: 100px;
}
.notice-card details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-block: 20px;
}
#catalogue-host .toolbar,
#library-host .actions {
  margin-block: 24px;
}
#catalogue-host .grid {
  margin-block: 24px;
}
@media (min-width: 768px) and (max-width: 1024px) {
  .places-workspace,
  .explore-workspace,
  .inspection-workspace,
  .candidates-workspace,
  .input-workspace,
  .notes-workspace,
  .maintenance-workspace,
  .surroundings-workspace,
  .onboarding-workspace,
  .help-workspace,
  .export-workspace,
  .example-workspace {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .checklist-workspace {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 20px;
    align-items: start;
  }
  .location-map-canvas .candidate-map {
    height: 380px;
  }
}
@media (max-width: 767px) {
  .onboarding-progress ol {
    flex-wrap: wrap;
  }
  .onboarding-progress li {
    flex: 1 1 40%;
  }
  .places-workspace,
  .explore-workspace,
  .inspection-workspace,
  .candidates-workspace,
  .input-workspace,
  .notes-workspace,
  .checklist-workspace,
  .maintenance-workspace,
  .surroundings-workspace,
  .onboarding-workspace,
  .help-workspace,
  .export-workspace,
  .example-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .places-workspace > *,
  .explore-workspace > *,
  .inspection-workspace > *,
  .candidates-workspace > *,
  .input-workspace > *,
  .notes-workspace > *,
  .checklist-workspace > *,
  .maintenance-workspace > *,
  .surroundings-workspace > *,
  .onboarding-workspace > *,
  .help-workspace > *,
  .export-workspace > *,
  .example-workspace > * {
    width: 100%;
  }
  .places-workspace .location-map-panel,
  .explore-workspace .location-map-panel,
  .inspection-workspace .location-map-panel,
  .candidates-workspace .location-map-panel,
  .surroundings-workspace .location-map-panel,
  .sticky-side-panel {
    position: static;
    margin: 0;
    padding: 16px;
  }
  .map-mobile-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  .map-mobile-controls button {
    flex: 1;
    min-height: 40px;
    font-size: 14px;
  }
  .location-map-panel.map-view-list .location-map-canvas {
    display: none;
  }
  .places-workspace[data-map-view="map"] .places-list,
  .explore-workspace[data-map-view="map"] .explore-list,
  .inspection-workspace[data-map-view="map"] .inspection-left,
  .candidates-workspace[data-map-view="map"] .candidates-left {
    display: none;
  }
  .location-map-canvas .candidate-map {
    height: 340px;
  }
}

#activity-merge-dialog {
  max-width: min(540px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px;
  color: var(--text-primary);
}
#activity-merge-dialog::backdrop {
  background: rgb(26 26 46 / 45%);
}

.catalogue-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.catalogue-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: white;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.catalogue-nav a[aria-current="page"] {
  color: #fff;
  background: var(--dark-navy);
  border-color: var(--dark-navy);
}
#catalogue-host .toolbar {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
#catalogue-host .card {
  box-shadow: 0 6px 20px rgb(26 26 46 / 4%);
}
@media (max-width: 1024px) {
  nav {
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar {
    display: none;
  }
}
@media (min-width: 900px) {
  #catalogue-host .toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 20px;
  }
  #catalogue-host #finance-search {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  }
  #catalogue-host .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}
@media (max-width: 767px) {
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading .intro {
    font-size: 14px;
    margin-top: 12px;
  }
  .card {
    padding: 16px;
    border-radius: var(--control-radius);
  }
  .actions {
    gap: 10px;
  }
  .actions > button,
  .actions > .button {
    width: 100%;
  }
}
@media (max-width: 600px) {
  #catalogue-host .toolbar {
    padding: 16px;
    display: grid;
    gap: 14px;
  }
  .catalogue-nav {
    gap: 6px;
  }
  .catalogue-nav a {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 38px;
  }
  .catalogue-facts {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.route-loading-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--accent-soft);
  border: 1px solid rgba(217, 45, 80, 0.2);
  border-radius: var(--radius-card);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-block: 16px;
}
.route-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(217, 45, 80, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: route-spin 0.8s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes route-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================================================
   Comparison Difference Intelligence & Decision Support
   ================================================== */

.comparison-guide-container {
  margin-block: 28px;
}

.tradeoff-card {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-soft) 100%);
  border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(217, 45, 80, 0.06);
}

.tradeoff-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tradeoff-summary-text {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.diff-summary-section {
  margin-bottom: 24px;
}

.diff-summary-header {
  margin-bottom: 16px;
}

.diff-summary-header h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 6px 0 4px;
  color: var(--text-primary);
}

.diff-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.diff-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.diff-category {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.diff-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

.diff-missing {
  color: var(--text-muted);
  font-weight: 500;
}

.diff-advantage-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-soft-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.diff-advantage-badge.small {
  padding: 2px 8px;
  font-size: 11px;
}

.diff-routes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diff-routes-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diff-route-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-primary);
}

.missing-fields-card {
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px 20px;
}

.missing-fields-card summary {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-primary);
}

.missing-fields-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.missing-fields-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: #fdfdfd;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.missing-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.missing-item-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Decision Support Section */
.decision-support-section {
  margin-top: 40px;
  padding: 28px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.decision-support-header {
  margin-bottom: 24px;
}

.decision-support-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 8px 0 6px;
  color: var(--text-primary);
}

.decision-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.decision-card {
  background: #fdfdfd;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.decision-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.decision-card.primary-decision {
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
  border: 1px solid var(--accent-soft-border);
  box-shadow: 0 2px 10px rgba(217, 45, 80, 0.08);
}

.decision-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decision-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.decision-tag.highlight {
  color: var(--accent);
}

.decision-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.decision-content p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.decision-action {
  margin-top: auto;
}

.decision-action .button {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .diff-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .decision-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .diff-summary-grid {
    grid-template-columns: 1fr;
  }
  .decision-cards-grid {
    grid-template-columns: 1fr;
  }
  .tradeoff-card {
    padding: 16px;
  }
  .tradeoff-summary-text {
    font-size: 15px;
  }
  .missing-fields-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .missing-fields-list li .button,
  .missing-fields-list li button {
    width: 100%;
    text-align: center;
  }
  .decision-support-section {
    padding: 20px 16px;
  }
}

/* Journey screens follow the current common layout, with readable form widths. */
.journey-page {
  max-width: 1280px;
  margin-inline: auto;
}
.journey-page .condition-form,
.checklist-page > .list {
  max-width: 800px;
}
.journey-page .card {
  border-radius: 20px;
}
.journey-page [aria-current="step"] {
  border: 2px solid var(--brand-primary);
}
.journey-page .grid {
  align-items: start;
}
#funding-results {
  scroll-margin-top: 88px;
  margin-top: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#funding-results dl {
  display: block;
}
#funding-results dt {
  margin-top: 16px;
  color: var(--text-secondary);
}
#funding-results dd {
  margin: 4px 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.journey-page fieldset {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.journey-page .choice input {
  width: auto;
}
@media (max-width: 1023px) {
  #funding-results {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .header-actions {
    gap: 8px;
  }
  #header-account {
    padding-inline: 12px;
  }
  .journey-page .grid {
    grid-template-columns: 1fr;
  }
}

.login-panel,
.login-actions {
  max-width: 800px;
}
