/* RoofWander partner widget catalogue — field-map design system.
   Served only on /widgets pages; iframe widgets keep their own styles. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/widgets/_assets/fonts/bricolage-grotesque-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/widgets/_assets/fonts/bricolage-grotesque-800.woff2') format('woff2');
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/widgets/_assets/fonts/hanken-grotesk-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/widgets/_assets/fonts/hanken-grotesk-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/widgets/_assets/fonts/hanken-grotesk-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/widgets/_assets/fonts/spline-sans-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/widgets/_assets/fonts/spline-sans-mono-500.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --paper: #f3f5f0;
  --card: #ffffff;
  --ink: #17251e;
  --pine: #1e4634;
  --action: #256f57;
  --action-hover: #1f5e4a;
  --route: #c2531f;
  --route-deep: #9c431b;
  --muted: #54655b;
  --line: rgba(23, 37, 30, 0.14);
  --line-strong: rgba(23, 37, 30, 0.3);
  --code-bg: #122019;
  --code-ink: #d9e4dc;
  --shadow: 0 2px 6px rgba(23, 37, 30, 0.05), 0 18px 44px -18px rgba(23, 37, 30, 0.22);
  --radius: 14px;
  --display: 'Bricolage Grotesque', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  --body: 'Hanken Grotesk', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Spline Sans Mono', 'SF Mono', 'Cascadia Code', monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-family: var(--display);
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--action);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--action-hover);
}

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600;
}

.skip-link:focus-visible {
  left: 12px;
}

.wrap {
  width: min(1120px, 100% - clamp(2.5rem, 8vw, 6rem));
  margin-inline: auto;
}

/* ---------- Shared atoms ---------- */

.eyebrow {
  display: block;
  margin: 0 0 14px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--route-deep);
}

.lede {
  max-width: 34em;
  font-size: clamp(1.06rem, 1rem + 0.4vw, 1.2rem);
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 0.78em 1.5em;
  border: 1.5px solid var(--pine);
  border-radius: 999px;
  background: var(--pine);
  color: #f6f9f5;
  font: 600 1rem var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--pine);
  color: var(--pine);
}

/* ---------- Header / footer ---------- */

.topbar {
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 18px;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.topbar-brand img {
  width: 108px;
  height: auto;
  display: block;
}

.topbar-brand span {
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.lang a {
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.lang a:hover {
  color: var(--pine);
  background: rgba(30, 70, 52, 0.07);
}

.lang a[aria-current='page'] {
  color: var(--paper);
  background: var(--pine);
}

.crumb {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
}

.crumb:hover {
  color: var(--pine);
}

.footer {
  margin-top: clamp(60px, 9vw, 110px);
  border-top: 1px solid var(--line);
  background: var(--card);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 34px;
  padding-block: 34px;
  font-size: 0.94rem;
  color: var(--muted);
}

.footer-inner img {
  width: 92px;
  height: auto;
  opacity: 0.9;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-inner a {
  color: var(--muted);
}

.footer-inner a:hover {
  color: var(--pine);
}

.footer-note {
  flex-basis: 100%;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(90rem 40rem at 85% -30%, rgba(37, 111, 87, 0.07), transparent 60%),
    var(--paper);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 104px);
}

.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hero h1 em {
  font-style: normal;
  color: var(--route);
}

.hero .lede {
  margin-top: 22px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-facts li::before {
  content: '◆';
  margin-right: 8px;
  font-size: 0.55rem;
  color: var(--route);
}

/* The hero preview: the real widget rather than a drawing of one */

.hero-browser {
  width: 100%;
  max-width: 560px;
  justify-self: end;
}

/* ---------- Trail: the plotted route down the page ---------- */

.trail {
  position: relative;
}

.leg {
  padding-top: clamp(64px, 9vw, 116px);
}

.leg--first {
  padding-top: clamp(28px, 4vw, 44px);
}

.leg-head {
  max-width: 42em;
}

.leg-head h1,
.leg-head h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.45rem);
}

.leg-head .lede {
  margin-top: 14px;
}

@media (min-width: 980px) {
  .trail::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 12px;
    width: 2px;
    background: repeating-linear-gradient(180deg, var(--route) 0 7px, transparent 7px 17px);
    opacity: 0.4;
  }

  .trail {
    padding-left: 54px;
  }

  .leg {
    position: relative;
  }

  .leg::before {
    content: '';
    position: absolute;
    left: -51px;
    top: calc(clamp(64px, 9vw, 116px) + 0.55em);
    width: 13px;
    height: 13px;
    border: 2.5px solid var(--route);
    background: var(--paper);
    rotate: 45deg;
  }

  .leg--first::before {
    top: calc(clamp(28px, 4vw, 44px) + 0.55em);
  }

  .leg--destination::before {
    background: var(--route);
  }
}

/* ---------- Widget cards (landing) ---------- */

.widget-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-top: clamp(36px, 4vw, 56px);
  padding: clamp(24px, 3.4vw, 44px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--card);
  box-shadow: var(--shadow);
}

.widget-card--flip {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.widget-card--flip .widget-copy {
  order: 2;
}

.widget-copy h3 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
  font-weight: 700;
}

.widget-copy > p {
  margin-top: 14px;
  color: var(--muted);
}

.cap-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.cap-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.97rem;
}

.cap-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.52em;
  width: 7px;
  height: 7px;
  background: var(--route);
  rotate: 45deg;
}

.widget-copy .btn {
  margin-top: 26px;
}

/* ---------- Browser frame for live previews ---------- */

.browser {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: max-width 0.35s ease;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #eef1ea;
}

.browser-dots {
  display: flex;
  gap: 5px;
  flex: none;
}

.browser-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(23, 37, 30, 0.18);
}

.browser-address {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.browser iframe {
  display: block;
  width: 100%;
  border: 0;
  background: #eef1ea;
}

.browser-note {
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Detail page: preview stage ---------- */

.stage {
  margin-top: clamp(30px, 4vw, 44px);
}

.stage-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-bottom: 18px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
}

.seg button {
  padding: 5px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: 600 0.85rem var(--body);
  color: var(--muted);
  cursor: pointer;
}

.seg button[aria-pressed='true'] {
  background: var(--pine);
  color: #f2f6f1;
}

.control-group select {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font: 600 0.85rem var(--body);
  color: var(--ink);
}

.stage .browser {
  max-width: 100%;
  margin-inline: auto;
}

.stage[data-device='mobile'] .browser {
  max-width: 400px;
}

/* ---------- Best-for cards ---------- */

.best-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(28px, 3.5vw, 40px);
}

.best-grid article {
  padding: 24px 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.best-grid h3 {
  font-family: var(--body);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}

.best-grid p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* A closing aside under a section: points readers at the other widget when this
   one is the wrong shape for their page. */
.leg-note {
  margin-top: clamp(20px, 2.4vw, 28px);
  font-size: 0.97rem;
  color: var(--muted);
}

/* ---------- Capabilities (detail) ---------- */

.does-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 40px;
  margin: clamp(28px, 3.5vw, 40px) 0 0;
  padding: 0;
  list-style: none;
}

.does-grid li {
  position: relative;
  padding: 12px 0 12px 26px;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

.does-grid li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 1.18em;
  width: 7px;
  height: 7px;
  background: var(--route);
  rotate: 45deg;
}

.does-grid strong {
  font-weight: 700;
}

/* ---------- Configuration table ---------- */

.config-table {
  width: 100%;
  margin-top: clamp(28px, 3.5vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.config-table th,
.config-table td {
  padding: 15px 22px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.config-table thead th {
  border-top: 0;
  background: #eef1ea;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.config-table tbody th {
  width: 18%;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--pine);
  white-space: nowrap;
}

.config-table td {
  font-size: 0.97rem;
}

.config-table td:last-child {
  width: 26%;
  color: var(--muted);
}

/* ---------- Managed setup route ---------- */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 26px;
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 52px;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--route);
  border-radius: 50%;
  background: var(--card);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--route-deep);
}

.steps li::after {
  content: '';
  position: absolute;
  top: 19px;
  left: 46px;
  right: -18px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--route) 0 6px, transparent 6px 15px);
  opacity: 0.4;
}

.steps li:last-child::after {
  content: none;
}

.steps h3 {
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
}

.steps p {
  margin-top: 7px;
  font-size: 0.94rem;
  color: var(--muted);
}

/* ---------- Partner cards ---------- */

.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: clamp(28px, 3.5vw, 40px);
}

.partner-card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.partner-card .eyebrow {
  margin-bottom: 10px;
}

.partner-card h3 {
  font-family: var(--display);
  font-size: 1.4rem;
}

.partner-card > p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.98rem;
}

.partner-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.partner-facts li {
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.partner-card > a {
  margin-top: 22px;
  font-weight: 600;
}

/* ---------- Technical details disclosure ---------- */

.tech {
  margin-top: clamp(28px, 3.5vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.tech summary {
  padding: 20px 26px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

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

.tech summary::before {
  content: '▸';
  margin-right: 12px;
  color: var(--route);
  display: inline-block;
  transition: rotate 0.15s ease;
}

.tech[open] summary::before {
  rotate: 90deg;
}

.tech-body {
  display: grid;
  gap: 22px;
  padding: 4px 26px 28px;
  border-top: 1px solid var(--line);
}

.tech-body h3 {
  margin-top: 18px;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
}

.tech-body p {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 62em;
}

.tech-body pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
}

.tech-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.tech-list li {
  font-size: 0.95rem;
  color: var(--muted);
}

.tech-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Request form ---------- */

.request-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(28px, 3.5vw, 40px);
}

.request-form {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--card);
  box-shadow: var(--shadow);
}

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

.field {
  display: block;
  margin-bottom: 18px;
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

.field small {
  display: block;
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  font: 500 0.97rem var(--body);
  color: var(--ink);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline-offset: 0;
  background: var(--card);
}

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

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 22px;
  font-size: 0.92rem;
  color: var(--muted);
}

.consent input {
  margin-top: 4px;
  width: 17px;
  height: 17px;
  accent-color: var(--action);
}

.form-hint {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--muted);
}

.form-error {
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid rgba(156, 67, 27, 0.4);
  border-radius: 9px;
  background: rgba(194, 83, 31, 0.07);
  font-size: 0.93rem;
  color: var(--route-deep);
}

.form-success {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--card);
  box-shadow: var(--shadow);
}

.form-success h3 {
  font-family: var(--display);
  font-size: 1.5rem;
}

.form-success p {
  margin-top: 12px;
  color: var(--muted);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.request-aside {
  display: grid;
  gap: 20px;
}

.aside-card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.aside-card h3 {
  font-family: var(--body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
}

.aside-card p {
  margin-top: 9px;
  font-size: 0.95rem;
  color: var(--muted);
}

.aside-card a {
  font-weight: 600;
}

.aside-card ol {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

/* ---------- Reveal on scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    translate: 0 16px;
    transition: opacity 0.55s ease, translate 0.55s ease;
  }

  .js .reveal.is-visible {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 979px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-block: clamp(44px, 8vw, 72px);
  }

  .hero-browser {
    justify-self: start;
  }

  .widget-card,
  .widget-card--flip {
    grid-template-columns: 1fr;
  }

  .widget-card--flip .widget-copy {
    order: 0;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps li:nth-child(even)::after {
    content: none;
  }

  .request-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  /* Brand, language switcher and call to action no longer fit on one line;
     let the actions drop to a second row instead of scrolling the page sideways. */
  .topbar-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-actions {
    gap: 12px;
  }

  .topbar-inner .btn {
    padding: 0.6em 1.1em;
    font-size: 0.92rem;
  }

  .best-grid,
  .partner-grid,
  .does-grid {
    grid-template-columns: 1fr;
  }

  .does-grid li::before {
    top: 1.1em;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .steps li {
    padding-top: 0;
    padding-left: 56px;
  }

  .steps li::after {
    content: none;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .config-table thead {
    position: absolute;
    left: -9999px;
  }

  .config-table tbody th,
  .config-table td {
    display: block;
    width: auto;
    padding: 6px 20px;
  }

  .config-table tbody th {
    padding-top: 18px;
  }

  .config-table td {
    border-top: 0;
  }

  .config-table td:last-child {
    width: auto;
    padding-bottom: 18px;
    font-size: 0.85rem;
  }

  .config-table td[data-label]::before {
    content: attr(data-label) ' — ';
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

@media (max-width: 560px) {
  .topbar-brand span {
    display: none;
  }
}
