:root {
  --ink: #18212f;
  --muted: #5f6b7a;
  --line: #d7dee8;
  --panel: #ffffff;
  --canvas: #f5f7fa;
  --accent: #0f766e;
  --accent-dark: #0b5e58;
  --blue: #2563eb;
  --amber: #9a6700;
  --red: #b42318;
  --soft-green: #e9f7f4;
  --soft-blue: #edf4ff;
  --soft-amber: #fff7e6;
  --shadow: 0 12px 32px rgba(26, 35, 50, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.legacy-controls {
  display: none !important;
}

.debug-only {
  display: none !important;
}

body.debug-mode .debug-only {
  display: block !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 3vw, 36px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-title {
  margin: 0;
  font-weight: 760;
}

.topnav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.92rem;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 44px 0 24px;
}

.hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: 1.02rem;
  color: #2a3545;
}

.notice {
  max-width: 820px;
  margin: 0;
  color: var(--amber);
  font-weight: 650;
}

.subnotice {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  align-self: stretch;
}

.status-strip span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  color: #2e3a4a;
  font-weight: 650;
}

.workspace {
  display: block;
  padding: 12px 0 24px;
}

.config-form,
.analysis-panel,
.results-section,
.plans-section,
.quote-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.config-form,
.analysis-panel {
  padding: 22px;
}

.config-form {
  max-width: 860px;
  margin: 0 auto;
}

.form-head,
.section-head {
  margin-bottom: 18px;
}

h2,
h3 {
  margin: 0 0 6px;
  letter-spacing: 0;
}

.form-head p,
.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.mode-button {
  background: transparent;
  border-color: transparent;
  color: #344054;
}

.mode-button.active {
  color: #fff;
  background: var(--accent);
}

.mode-panel {
  margin-top: 12px;
}

.expert-fields {
  margin-top: 16px;
}

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

fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

legend {
  padding: 0 6px;
  color: #344054;
  font-weight: 800;
}

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

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.check-field span {
  margin: 0;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-weight: 700;
}

label small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

select,
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid #c7d0dd;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

select,
input[type="text"],
input[type="number"] {
  min-height: 42px;
  padding: 8px 10px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

textarea {
  resize: vertical;
  padding: 12px;
}

.memo-field {
  display: block;
  margin-top: 0;
}

.memo-field textarea {
  min-height: 190px;
  font-size: 1rem;
  line-height: 1.7;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border-color: #b9c4d2;
}

.disabled-button {
  color: #667085;
  background: #eef2f6;
  border-color: #d5dce6;
  cursor: not-allowed;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  align-items: flex-start;
}

.chip {
  padding: 6px 9px;
  border: 1px solid #bed3cf;
  border-radius: 999px;
  background: var(--soft-green);
  color: #18443f;
  font-size: 0.88rem;
  font-weight: 700;
}

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

.used-criteria-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.normalizer-box {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #bed3cf;
  border-radius: 8px;
  background: var(--soft-green);
}

.normalizer-box h3 {
  margin-bottom: 8px;
}

.normalizer-status {
  margin: 0;
  color: #1f4d46;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 700;
}

.normalizer-json {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid #26364e;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.used-criteria-box h3 {
  margin-bottom: 8px;
}

.empty-hint {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.quote-content > p {
  margin: 0 0 12px;
  color: var(--muted);
}

.quote-content h3 {
  margin: 18px 0 10px;
  font-size: 1rem;
}

.test-mode-note {
  display: inline-flex;
  margin: 0 0 14px !important;
  padding: 8px 10px;
  border: 1px solid #c9dcff;
  border-radius: 6px;
  background: #f3f7ff;
  color: #344054 !important;
  font-weight: 750;
}

.quote-request-form {
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

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

.quote-request-form label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--ink);
  font-weight: 750;
}

.quote-request-form input,
.quote-request-form textarea {
  width: 100%;
  border: 1px solid #c8d3df;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.quote-request-form textarea {
  min-height: 120px;
  resize: vertical;
}

.quote-full-field {
  margin-top: 14px !important;
}

.quote-honeypot {
  display: none !important;
}

.quote-submit-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.quote-submit-status.success {
  color: #0f6b45;
}

.quote-submit-status.error {
  color: #a43b2b;
}

.used-criteria ul,
.reason-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.used-criteria li,
.reason-box li {
  margin: 3px 0;
}

.boundary-box {
  margin-top: 18px;
  padding: 14px;
  background: var(--soft-blue);
  border: 1px solid #c9dcff;
  border-radius: 8px;
}

.boundary-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.results-section,
.plans-section,
.quote-section {
  margin: 16px 0 0;
  padding: 22px;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.result-count-summary {
  color: #344054;
  font-weight: 750;
}

.density-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 0;
}

.density-control select {
  min-width: 132px;
}

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

.advanced-model-list {
  display: grid;
  gap: 10px;
}

.advanced-list-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 650;
}

.advanced-model-table {
  display: grid;
  min-width: 980px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  grid-auto-rows: auto;
}

.advanced-model-list {
  overflow-x: auto;
}

.advanced-model-header,
.advanced-row-main {
  display: grid;
  grid-template-columns: 120px 170px 120px 72px 190px 150px 70px 70px minmax(180px, 1fr) 72px;
  align-items: stretch;
}

.advanced-model-header {
  position: relative;
  z-index: 1;
  min-height: 54px;
  margin-bottom: 4px;
  background: #f3f6fb;
  border-bottom: 2px solid #cbd5e1;
  color: #344054;
  font-weight: 800;
}

.advanced-model-header .advanced-cell {
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
  background: #f3f6fb;
  line-height: 1.35;
}

.advanced-model-row {
  display: grid;
  border-bottom: 1px solid #e5ebf2;
}

.advanced-model-row:last-child {
  border-bottom: 0;
}

.advanced-model-header + .advanced-model-row .advanced-row-main {
  border-top: 1px solid #e5ebf2;
}

.advanced-row-main {
  min-height: 54px;
  background: #fff;
  cursor: pointer;
}

.advanced-row-main .advanced-cell {
  padding-top: 10px;
  padding-bottom: 10px;
}

.advanced-row-main:hover,
.advanced-row-main:focus {
  background: #f9fbfd;
  outline: none;
}

.advanced-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid #e5ebf2;
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.advanced-cell:last-child {
  border-right: 0;
}

.advanced-action-cell {
  justify-content: center;
}

.advanced-row-detail {
  padding: 12px 14px 14px;
  background: #fbfcfe;
  border-top: 1px solid #e5ebf2;
}

.advanced-row-detail .meta-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
}

.advanced-row-detail .meta-list div {
  grid-template-columns: 112px minmax(0, 1fr);
}

.advanced-limit-note {
  margin: 4px 0 0;
}

.comparison-table-wrap {
  margin: 0 0 18px;
}

.comparison-disclosure {
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.comparison-disclosure > summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 800;
  color: #344054;
}

.comparison-disclosure[open] {
  padding-bottom: 12px;
}

.comparison-disclosure[open] > summary {
  border-bottom: 1px solid #d9e1ec;
}

.comparison-disclosure .comparison-head,
.comparison-disclosure .comparison-table {
  margin-left: 12px;
  margin-right: 12px;
}

.comparison-disclosure .comparison-table {
  overflow-x: auto;
}

.comparison-head {
  margin-bottom: 10px;
}

.comparison-head p {
  margin: 0;
  color: var(--muted);
}

.comparison-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comparison-table th,
.comparison-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5ebf2;
  text-align: left;
  vertical-align: top;
  font-size: 0.86rem;
}

.comparison-table th {
  color: #344054;
  background: #f7f9fc;
  font-weight: 800;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-action {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.result-card,
.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.stepwise-configurator {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.step-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-nav li {
  padding: 8px 10px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.step-nav li.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.step-nav li.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.step-panel {
  display: none;
  gap: 10px;
}

.step-panel.active-step {
  display: grid;
}

.step-panel h3 {
  margin: 0;
  color: var(--ink);
}

.step-panel label {
  display: grid;
  gap: 7px;
}

.choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 850;
  cursor: pointer;
}

.choice-button.active,
.choice-button:focus-visible {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.step-flow-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.config-builder {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.config-builder-head {
  margin: 0 0 14px;
}

.config-builder-head h3,
.current-config-box h4,
.builder-step-head h4,
.final-spec-box h4 {
  margin: 0 0 6px;
  color: var(--ink);
}

.config-builder-head p,
.builder-field small,
.builder-hint,
.builder-step-head p {
  margin: 0;
  color: var(--muted);
}

.builder-model-summary {
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.builder-field textarea {
  min-height: 76px;
  resize: vertical;
}

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

.builder-field {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
}

.builder-field > span {
  color: #344054;
  font-weight: 800;
}

.builder-field select,
.builder-field input,
.builder-field textarea,
.builder-inline-controls input {
  width: 100%;
}

.builder-inline-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.builder-hint {
  grid-column: 1 / -1;
  min-height: 1.4em;
  font-weight: 650;
}

.current-config-box,
.final-spec-box {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fbfcfe;
}

.current-config-box {
  margin-top: 12px;
  background: #f8fafc;
}

.builder-step-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fff;
}

.builder-step-controls {
  display: grid;
  gap: 12px;
}

.final-edit-menu {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #f8fafc;
}

.final-edit-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cpu-sku-table-wrap {
  overflow-x: auto;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fff;
}

.cpu-sku-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.7fr) minmax(130px, 0.75fr) minmax(120px, 0.7fr) minmax(180px, auto);
  gap: 8px;
  align-items: center;
  min-width: 1040px;
  padding: 10px 12px;
  border-bottom: 1px solid #d9e1ec;
  background: #f8fafc;
}

.cpu-sku-filter-bar input {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #b9c4d2;
  border-radius: 6px;
  font: inherit;
}

.cpu-sku-filter-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  text-align: right;
}

.cpu-sku-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.cpu-sku-table th,
.cpu-sku-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5ebf2;
  text-align: left;
  vertical-align: middle;
  line-height: 1.4;
}

.cpu-sku-table th {
  background: #f3f6fb;
  color: #344054;
  font-weight: 800;
  white-space: nowrap;
}

.cpu-sku-table tbody tr {
  cursor: pointer;
}

.cpu-sku-table tbody tr:hover {
  background: #f9fbfd;
}

.cpu-sku-table tbody tr:last-child td {
  border-bottom: 0;
}

.builder-slot-info {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.builder-actions {
  margin-top: 14px;
}

.current-config-box pre,
.final-spec-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.result-card:target {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
}

.candidate-group-heading {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.candidate-group-heading p {
  margin: 0;
  color: var(--muted);
}

.reference-card {
  border-color: #f3d08a;
  background: #fffdf8;
}

.needs-confirmation-card {
  border-color: #f1b5ad;
  background: #fffafa;
}

.candidate-group-control {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 4px 0 12px;
}

.result-card h3,
.plan-card h3 {
  margin-bottom: 8px;
}

.meta-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.meta-list div {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 10px;
}

.meta-list dt {
  color: var(--muted);
  font-weight: 700;
}

.meta-list dd {
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.tag {
  padding: 4px 8px;
  background: #f0f3f7;
  border: 1px solid #d9e1ec;
  border-radius: 999px;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 700;
}

.warning-tag {
  color: #7a4b00;
  background: var(--soft-amber);
  border-color: #f3d08a;
}

.image-policy {
  margin: 12px 0;
  padding: 10px;
  color: #475467;
  background: #f7f8fa;
  border: 1px dashed #b8c2cf;
  border-radius: 8px;
}

.fit-note,
.fit-warning {
  margin: 12px 0;
  padding: 10px;
  border-radius: 8px;
}

.fit-note {
  color: #1f4d46;
  background: var(--soft-green);
  border: 1px solid #b9d9d3;
}

.fit-warning {
  color: #7a3d00;
  background: #fff4e5;
  border: 1px solid #f0c16d;
  font-weight: 650;
}

.compact-note {
  margin: 10px 0;
}

.reason-box {
  margin: 12px 0;
  padding: 10px;
  color: #344054;
  background: #f8fafc;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
}

.confirmation-box {
  background: #fffdf8;
  border-color: #f3d08a;
}

.score-breakdown {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #cdd7e5;
  border-radius: 8px;
  background: #f9fbfd;
}

.score-breakdown-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
}

.score-breakdown-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
}

.score-breakdown-list dt {
  color: var(--muted);
  font-weight: 800;
}

.score-breakdown-list dd {
  margin: 0;
}

.candidate-details-section {
  margin: 10px 0 0;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.candidate-details-section summary {
  cursor: pointer;
  padding: 9px 11px;
  color: #344054;
  font-weight: 800;
}

.candidate-details-section[open] {
  padding-bottom: 10px;
}

.candidate-details-section[open] > summary {
  border-bottom: 1px solid #d9e1ec;
}

.candidate-details-section > .meta-list,
.candidate-details-section > .score-breakdown,
.candidate-details-section > .reason-box {
  margin: 10px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #b9c4d2;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
}

.link-button:hover {
  border-color: var(--blue);
  text-decoration: none;
}

.score {
  color: var(--accent-dark);
  font-weight: 800;
  margin: 0 0 8px;
}

.quote-section textarea {
  min-height: 330px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.quote-request-form textarea {
  font-family: inherit;
  font-size: 0.95rem;
}

.copy-status {
  margin: 8px 0 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .topbar,
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .status-strip,
  .step-nav,
  .field-grid,
  .expert-grid,
  .result-grid,
  .plan-grid,
  .config-builder-grid {
    grid-template-columns: 1fr;
  }

  .quote-form-grid {
    grid-template-columns: 1fr;
  }

  .builder-inline-controls {
    grid-template-columns: 1fr;
  }

  .inline-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .topnav {
    width: 100%;
    justify-content: flex-start;
  }

  .config-form,
  .analysis-panel,
  .results-section,
  .plans-section,
  .quote-section {
    padding: 16px;
  }

  .meta-list div {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .score-breakdown-list div {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
