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

:root {
  --paper: #fbf9fc;
  --ink: #2e1e3d;
  --plum: #5f3a74;
  --hero: #eeeaf5;
  --lavender: #e7ddf6;
  --line: #cfc3da;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "DM Sans", Arial, sans-serif;
  color-scheme: light;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; line-height: 1.52; }
main { flex: 1; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: .99; letter-spacing: -.035em; }
a { color: inherit; text-underline-offset: .2em; }
input, select, textarea, button { font: inherit; }
:focus-visible { outline: 3px solid #6a489c; outline-offset: 4px; }
.shell { width: min(100% - 56px, 1110px); margin-inline: auto; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 2; top: 10px; left: 10px; padding: 8px 12px; background: white; }
.page-header { background: var(--hero); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; min-height: 75px; gap: 15px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.15rem; font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: end; gap: 2px; height: 21px; }
.brand-mark i { display: block; width: 10px; height: 100%; border: 1.5px solid currentColor; background: var(--lavender); }
.brand-mark i + i { height: 78%; background: var(--plum); }
nav { display: flex; gap: clamp(14px, 3vw, 32px); }
nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; font-weight: 600; text-decoration: none; }
nav a:hover { text-decoration: underline; }
h1 { font-size: clamp(2.7rem, 6.5vw, 6rem); font-weight: 700; letter-spacing: -.055em; }
.action { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 10px 16px; border: 1px solid var(--plum); border-radius: 4px; background: var(--plum); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; }
.action:hover { background: var(--ink); }
.action:disabled { cursor: wait; opacity: .68; }
.action span { font-size: 1.08em; }
section[id] { scroll-margin-top: 12px; }
.fit, .brief { padding-block: clamp(34px, 6.4vw, 77px); }
h2 { font-size: clamp(35px, 6vw, 65px); }
.section-head p { margin-top: 12px; max-width: 59ch; }
.comparison-heading { color: var(--paper); background: var(--ink); }
.comparison-layout { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr); gap: clamp(1.25rem, 5vw, 5rem); align-items: center; padding-block: clamp(24px, 4.6vw, 64px); }
.comparison-heading h1 { max-width: 17ch; font-size: clamp(2.7rem, 5.35vw, 5rem); letter-spacing: -.045em; }
.comparison-heading .section-head p { color: var(--lavender); }
.comparison-heading :focus-visible { outline-color: #eeeaf5; }
.comparison-tools { padding: clamp(12px, 2.1vw, 22px); border: 1px solid #a392b2; background: #39264a; }
.picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 12px; }
.picker label, form label { font-weight: 700; font-size: .9rem; }
.picker select { display: block; margin-top: 5px; }
.comparison-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .85rem; margin-top: .8rem; }
.comparison-actions .action { background: var(--lavender); border-color: var(--lavender); color: var(--ink); font-size: .9rem; }
.comparison-actions .action:hover { background: var(--paper); }
.swap-pair { min-height: 44px; padding: .25rem; border: 0; background: transparent; color: var(--paper); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; font-size: .84rem; }
.comparison-results { padding-block: clamp(18px, 3.1vw, 44px); }
select, input, textarea { width: 100%; min-width: 0; min-height: 46px; padding: 9px 12px; border: 1px solid #a798ad; border-radius: 4px; background: white; color: var(--ink); font-size: 1rem; }
select { cursor: pointer; }
.matrix { width: 100%; border-collapse: collapse; table-layout: fixed; overflow-wrap: anywhere; }
.matrix th, .matrix td { padding: 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.matrix th:first-child { width: 23%; }
.matrix thead { background: var(--plum); color: white; }
.matrix tbody th { background: var(--hero); font-size: .88rem; }
.compare-note { margin: 15px 0 20px; color: #594762; font-size: .88rem; }
.fit-link { margin-top: 16px; }
.fit { background: var(--hero); border-block: 1px solid var(--line); }
.fit-grid, .brief-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 8%; }
.fit dl { margin: 0; }
.fit dl div { border-top: 1px solid var(--line); padding: 13px 0; }
.fit dt { font-weight: 700; }
.fit dd { margin: 4px 0 0; }
form { display: grid; gap: 14px; padding: clamp(15px, 3.1vw, 27px); border: 1px solid var(--line); border-radius: 6px; background: var(--hero); }
.selection { background: var(--lavender); padding: 9px 12px; border-radius: 3px; font-weight: 700; }
#brief-review { align-self: start; }
#brief-review-materials { display: block; margin-top: .35rem; font-weight: 400; }
.focused-view .brief h1 { max-width: 19ch; }
.change-materials summary { cursor: pointer; color: var(--plum); font-weight: 700; text-underline-offset: .2em; text-decoration: underline; }
.change-materials[open] .picker { margin-top: .55rem; }
.use-pair { margin-top: .65rem; padding: .45rem .7rem; min-height: 44px; border: 1px solid var(--plum); background: var(--paper); color: var(--plum); font-weight: 700; cursor: pointer; }
.form-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
form label span { font-weight: 400; }
form :is(select,input,textarea) { display: block; margin-top: 5px; font-weight: 400; }
form textarea { resize: vertical; }
form button { justify-self: start; }
.form-status { font-weight: 600; }
.form-status[data-state=error] { color: #9f1b3c; }
.page-footer { border-top: 1px solid var(--line); background: var(--hero); }
.footer-inner { flex-wrap: wrap; padding-block: 15px; }
#footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 36px, 620px); }
  .comparison-layout, .fit-grid, .brief-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 530px) {
  .header-inner { min-height: 62px; }
  .brand { gap: 6px; font-size: 1rem; }
  .brand-mark { height: 16px; }
  .brand-mark i { width: 7px; }
  nav { gap: 12px; }
  nav a { font-size: .78rem; white-space: nowrap; }
  .matrix th, .matrix td { font-size: .81rem; padding: 8px 6px; }
  .matrix tbody th { font-size: .77rem; }
  .matrix th:first-child { width: 24%; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 365px) {
  .header-inner { gap: 5px 8px; }
  nav { gap: 8px; }
  nav a { font-size: .72rem; }
}
