:root {
  color-scheme: light;
  --white: #fff;
  --ink: #202133;
  --muted: #55586c;
  --violet: #5833a3;
  --violet-soft: #ede6fa;
  --cool: #f5f6fa;
  --line: #dce0eb;
  --paper: #f8f5ef;
  --paper-line: #dcd3c7;
  --sans: system-ui, sans-serif;
  --serif: Georgia, serif;
  font-family: var(--sans);
  color: var(--ink);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--white); }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}
::selection { color: var(--ink); background: var(--violet-soft); }
[hidden] { display: none !important; }
.frame { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 3;
  inset: 12px auto auto 12px;
  padding: 12px;
  background: var(--white);
  transform: translateY(calc(-100% - 12px));
}
.skip-link:focus { transform: none; }
#demo, #vision { scroll-margin-top: 18px; }

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.site-header { min-height: 68px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -.04em;
}
.brand-mark {
  display: inline-block;
  position: relative;
  width: 25px;
  height: 22px;
  border: 2px solid var(--violet);
  border-radius: 6px;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 6px;
  border-radius: 2px;
  background: var(--violet);
}
nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
nav a, .site-footer > a:last-child { font-size: .875rem; font-weight: 650; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
.nav-demo {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--violet);
}

.hero {
  padding-block: clamp(30px, 4vw, 52px) clamp(44px, 6vw, 76px);
  background: var(--cool);
  border-top: 1px solid var(--line);
}
.hero-intro {
  display: grid;
  grid-template-columns: 1fr minmax(290px, 380px);
  align-items: end;
  gap: 16px 40px;
  margin-bottom: clamp(23px, 3vw, 36px);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.9rem, 6.4vw, 5.6rem);
  font-weight: 720;
  line-height: .98;
  letter-spacing: -.04em;
}
.hero h1 span { color: var(--violet); }
.hero-intro p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.65vw, 1.2rem);
  line-height: 1.55;
  max-width: 44ch;
}

.demo { position: relative; margin: 0; }
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 7px 12px;
  min-height: 56px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: var(--white);
}
.demo-bar:not(:has(.segments:not([hidden]))) { display: none; }
.demo:not(:has(.segments:not([hidden]))) .captures { border-top: 1px solid var(--line); border-radius: 12px; }
.segments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
[data-layout-controls] {
  padding: 3px;
  border-radius: 8px;
  background: var(--cool);
}
.segments button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
}
.segments button:hover { background: var(--cool); color: var(--ink); }
[data-layout-controls] button:hover { background: var(--white); }
.segments button[aria-pressed="true"] { background: var(--violet-soft); color: var(--violet); }
[data-layout-controls] button[aria-pressed="true"] { background: var(--violet); color: var(--white); }
.layout-mark {
  position: relative;
  width: 14px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 2px;
  flex: none;
}
.layout-mark::after {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 3px;
  background: currentColor;
  border-radius: 1px;
}
[data-layout="right"] .layout-mark::after { inset: 1px 1px 1px auto; width: 4px; height: auto; }
[data-layout="left"] .layout-mark::after { inset: 1px auto 1px 1px; width: 4px; height: auto; }
.captures {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--white);
}
.example + .example, .capture + .capture { border-top: 1px solid var(--line); }
.example[hidden] + .example, .capture[hidden] + .capture { border-top: 0; }
.example-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 3px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--cool);
}
.example-heading h2 { margin: 0; font-size: .875rem; font-weight: 650; }
.example-heading a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--violet);
  font-size: .875rem;
}
.capture a { display: block; }
.capture img { display: block; width: 100%; height: auto; }
.capture a > span { display: block; padding: 10px 14px 0; color: var(--violet); font-size: .875rem; }
.capture-note { margin: 0; padding: 7px 14px 13px; color: var(--muted); line-height: 1.5; }
figcaption { margin-top: 10px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
@media (prefers-reduced-motion: no-preference) {
  .capture.is-selected img { animation: layout-reveal 190ms ease-out; }
}
@keyframes layout-reveal {
  from { opacity: .78; }
  to { opacity: 1; }
}

.vision {
  padding-block: clamp(48px, 7vw, 104px);
  background: var(--paper);
  border-block: 1px solid var(--paper-line);
}
.vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 26px clamp(30px, 8vw, 108px);
}
.vision h2 {
  margin: 0;
  font: 400 clamp(2.45rem, 5vw, 4.65rem)/1.03 var(--serif);
  letter-spacing: -.04em;
}
.vision h2 em { color: var(--violet); }
.vision-lead p { max-width: 52ch; margin: 16px 0 0; color: #51483f; line-height: 1.65; }
.audiences { margin: 0; border-top: 1px solid var(--paper-line); }
.audiences > div {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) 1fr;
  gap: 6px 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--paper-line);
}
.audiences dt { font: 400 1.25rem/1.2 var(--serif); }
.audiences dd { margin: 0; color: #51483f; line-height: 1.5; }

.search-options { padding-block: clamp(40px, 6vw, 76px); }
.search-options h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4.2vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.options-intro { max-width: 68ch; margin: 12px 0 24px; color: var(--muted); line-height: 1.6; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.principles article { padding: 20px; }
.principles article:first-child { padding-left: 0; }
.principles article + article { border-left: 1px solid var(--line); }
.principles h3 { margin: 0 0 6px; font-size: 1.08rem; }
.principles p { margin: 0; color: var(--muted); line-height: 1.6; }
.site-footer { border-top: 1px solid var(--line); padding-block: 20px; }
.site-footer p { color: var(--muted); font-size: .875rem; margin: 0; }

@media (max-width: 740px) {
  .frame { width: calc(100% - 36px); }
  .hero-intro, .vision-grid { grid-template-columns: 1fr; }
  .demo-bar { padding: 8px; }
  .segments button { padding-inline: 8px; min-height: 40px; }
  .principles article { padding-inline: 12px; }
}

@media (max-width: 480px) {
  .site-header { min-height: 62px; gap: 10px; }
  .nav-demo { padding-inline: 9px; }
  .hero h1 { font-size: clamp(2.15rem, 10vw, 2.9rem); }
  [data-layout-controls] {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    width: 100%;
  }
  [data-layout-controls] button { padding-inline: 4px; font-size: .8125rem; line-height: 1.2; }
  .layout-mark { display: none; }
  .example-heading, .capture a > span, .capture-note { padding-inline: 10px; }
  .audiences > div { grid-template-columns: 1fr; gap: 4px; }
  .principles { grid-template-columns: 1fr; }
  .principles article + article { border-left: 0; border-top: 1px solid var(--line); }
  .principles article { padding-inline: 0; }
  .site-footer { flex-wrap: wrap; }
  .site-footer p { order: 1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

.info-page {
  max-width: 740px;
  padding-block: clamp(32px, 6vw, 64px);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.info-page h1 { margin: 0 0 16px; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.12; }
.info-page h2 { margin: 26px 0 8px; font-size: 1.25rem; line-height: 1.25; }
.info-page p { margin: 0 0 12px; }
.info-page a { color: var(--violet); }
.info-page table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.info-page th, .info-page td { padding: 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
