/* ==========================================================================
   Promptly Built — design system

   Reference: a technical drawing. Visible column rules, mono annotations,
   numbered sheets, hairline separation instead of boxes. Near-monochrome:
   the accent appears two or three times per page and nowhere else.
   ========================================================================== */

:root {
  --ink: #08090b;
  --ink-2: #0d0f12;
  --ink-3: #131519;
  /* The raised sheet for alternating sections — a wider step than --ink-2 so
     the separation actually registers. */
  --sheet-raised: #101318;

  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --line-ghost: rgba(255, 255, 255, 0.032);

  --paper: #f4f2ed;
  --text: #8e939c;
  --muted: #767c86;

  /* Used deliberately sparingly — a red pen on a drawing, not a theme */
  --accent: #ff4a1c;
  --accent-ink: #08090b;

  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  --container: 1180px;
  --gutter: clamp(18px, 3.5vw, 40px);
  --section-y: clamp(64px, 8vw, 104px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   The sheet — vertical column rules running the height of the page
   -------------------------------------------------------------------------- */

.sheet {
  max-width: var(--container);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}

/* Interior column rules — the drawing sheet's own grid. Surface colour and
   grid ride on the same pseudo-element so alternating sections can change
   tone without painting over the rules, and so live previews sit above both. */
.hero,
.titleblock,
.section {
  position: relative;
}

.hero::before,
.titleblock::before,
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(12.5% - 1px),
    var(--line-ghost) calc(12.5% - 1px),
    var(--line-ghost) 12.5%
  );
}

.hero > *,
.titleblock > *,
.section > * {
  position: relative;
  z-index: 1;
}

.section:nth-of-type(even)::before {
  background-color: var(--sheet-raised);
}

/* One section marked out as the blueprint — a faint graph-paper grid behind
   the systems schematic, vignetted toward the edges like a real technical
   drawing rather than a flat repeating pattern. No photo: it reinforces the
   schematic sitting on top of it instead of competing with it. */
.section--blueprint::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line-ghost) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-ghost) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(
    ellipse 75% 65% at 50% 35%,
    #000 35%,
    transparent 88%
  );
  mask-image: radial-gradient(
    ellipse 75% 65% at 50% 35%,
    #000 35%,
    transparent 88%
  );
}

@media (max-width: 720px) {
  .section--blueprint::after {
    display: none;
  }
}

/* Glyph rain sits behind the hero content. Masked so it has presence at the
   top edge and has dissolved by the time it reaches the lede — the type must
   never have to compete with it. */
.hero__rain {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    rgba(0, 0, 0, 0.5) 45%,
    transparent 80%
  );
  mask-image: linear-gradient(
    180deg,
    #000 0%,
    rgba(0, 0, 0, 0.5) 45%,
    transparent 80%
  );
}

/* Narrow screens keep the ruled sheet — just at a coarser pitch, so three
   rules read as structure instead of seven reading as noise. */
@media (max-width: 720px) {
  .hero::before,
  .titleblock::before,
  .section::before {
    background-image: repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(25% - 1px),
      var(--line-ghost) calc(25% - 1px),
      var(--line-ghost) 25%
    );
  }
}

.bleed {
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--paper);
  font-weight: 500;
}

.display {
  font-family: var(--mono);
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
  max-width: 22ch;
}

/* The payoff line — same size, dropped back tonally so the sentence turns */
.display__turn {
  color: var(--muted);
}

/* Section headings are sans. Mono is reserved for the hero, labels, numbers
   and figures — it reads as engineering when it's rare and as a theme when
   it's everywhere. */
.h2 {
  font-family: var(--sans);
  font-size: clamp(1.55rem, 2.9vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}

.h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--paper);
}

/* Mono annotation — the drawing's callout text */
.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.mono--paper {
  color: var(--paper);
}

.mono--accent {
  color: var(--accent);
}

.lede {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
  max-width: 54ch;
  margin: 1.5rem 0 0;
  text-wrap: pretty;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--paper);
  font-weight: 600;
}

.measure {
  max-width: 58ch;
}

.small {
  font-size: 0.875rem;
}

.meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Sheet sections — numbered, with a ruled header
   -------------------------------------------------------------------------- */

.section {
  border-top: 1px solid var(--line);
}

.section__head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(36px, 4.5vw, 56px);
}

/* Sections with something worth saying in the right margin */
.section__head--annotated {
  grid-template-columns: 120px minmax(0, 1fr) clamp(150px, 16vw, 210px);
}

.section__no {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.55em;
}

/* Registration tick, as on a drawing. Carries the accent so the page has
   punctuation running down it rather than two isolated orange buttons. */
.section__no::before {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 12px;
}

.section__aside {
  padding-top: 0.55em;
  border-left: 1px solid var(--line);
  padding-left: clamp(14px, 1.6vw, 22px);
}

.section__aside dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.section__aside dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__aside dd {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--paper);
  letter-spacing: -0.01em;
}

.section__body {
  padding-bottom: var(--section-y);
}

/* Two-column layout with a mono annotation gutter on the left */
.spread {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
}

/* Three columns: margin note, prose capped at a readable measure, and a facts
   block holding the right-hand side. Widening the prose instead would push the
   line length past what's comfortable to read. */
.spread--annotated {
  grid-template-columns: 120px minmax(0, 62ch) minmax(0, 1fr);
}

.spread__note {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Specification list — replaces the icon/card grid
   -------------------------------------------------------------------------- */

.spec {
  margin: 0;
  border-top: 1px solid var(--line);
}

/* A specification table: clause number, term, definition, and the one fact
   worth pulling out. Aligns to the same 140px margin as the section number. */
.spec__row {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 0.85fr) minmax(0, 1.5fr) clamp(
      90px,
      10vw,
      120px
    );
  gap: clamp(12px, 2vw, 32px);
  align-items: start;
  padding-block: clamp(20px, 2.4vw, 30px);
  border-bottom: 1px solid var(--line);
  transition: background 200ms var(--ease);
}

/* Translucent so the hover reads on both the base and the raised sheet */
.spec__row:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Accent rule draws in from the left on hover */
.spec__row::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width 320ms var(--ease);
}

.spec__row:hover::before {
  width: 100%;
}

.spec__no {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  color: var(--muted);
  padding-top: 0.35em;
}

.spec__tag {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding-top: 0.5em;
}

.spec__row dt {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--paper);
  line-height: 1.45;
}

.spec__row dd {
  margin: 0;
  font-size: 0.9375rem;
}

.spec__row .mono {
  display: block;
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Numbered process
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

/* Two-up variant, so the capability sections don't all read as the same
   four-row list stacked down the page */
.steps--2 {
  grid-template-columns: repeat(2, 1fr);
}

.step {
  padding: clamp(24px, 3vw, 36px) clamp(18px, 2.2vw, 30px);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.steps:not(.steps--2) .step:last-child {
  border-right: 0;
}

.steps--2 .step:nth-child(2n) {
  border-right: 0;
}

/* --------------------------------------------------------------------------
   Systems schematic — SVG so every part is a real element that can be
   highlighted precisely, at any width, in the site's own palette
   -------------------------------------------------------------------------- */

.schematic {
  border-top: 1px solid var(--line);
  padding: clamp(28px, 4vw, 48px) var(--gutter) clamp(20px, 2.5vw, 28px);
}

.schematic__svg {
  width: 100%;
  height: auto;
  max-width: 960px;
  margin-inline: auto;
  overflow: visible;
}

.schematic__caption {
  max-width: 960px;
  margin: 18px auto 0;
}

.schematic__region {
  transition: opacity 220ms var(--ease);
}

/* Dim everything except the region being traced */
.schematic[data-active] .schematic__region {
  opacity: 0.22;
}

.schematic[data-active] .schematic__region.is-active {
  opacity: 1;
}

.schematic__box,
.schematic__chip,
.schematic__shell {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1;
  transition: stroke 220ms var(--ease), fill 220ms var(--ease);
}

.schematic__shell {
  stroke-dasharray: 3 5;
}

.schematic__region.is-active .schematic__box,
.schematic__region.is-active .schematic__shell {
  stroke: var(--accent);
  fill: rgba(255, 74, 28, 0.05);
}

.schematic__wires path {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1;
}

.schematic__title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  fill: var(--paper);
}

.schematic__sub,
.schematic__tag,
.schematic__chipLabel {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--muted);
}

.schematic__chipLabel {
  text-anchor: middle;
}

.schematic__region.is-active .schematic__tag {
  fill: var(--accent);
}

/* The card that matches whatever is being traced */
.step.is-active {
  background: rgba(255, 74, 28, 0.04);
}

.step {
  transition: background 220ms var(--ease);
}

@media (max-width: 720px) {
  /* At phone width the schematic would be unreadable — the cards below say
     everything it says, so it goes rather than shrinking into mush. */
  .schematic {
    display: none;
  }
}

.step__tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
}

.step__no {
  font-family: var(--mono);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--paper);
  opacity: 0.22;
  letter-spacing: -0.04em;
  margin-bottom: 22px;
}

.step .h3 {
  margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   Live viewport — the hero's rotating demo, and the figure plates
   -------------------------------------------------------------------------- */

.viewport {
  border: 1px solid var(--line-2);
  background: var(--ink-2);
}

.viewport__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}

.viewport__live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.viewport__live .mono {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewport__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.viewport__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 0;
}

.tab {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  padding: 4px 8px;
  cursor: pointer;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}

.tab:hover {
  color: var(--paper);
}

.tab[aria-selected="true"] {
  color: var(--paper);
  border-color: var(--line-2);
}

/* The demo renders at a fixed desktop width, scaled by script to fit */
.stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-3);
}

.stage__frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  max-width: none;
  border: 0;
  transform: scale(0.25);
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms var(--ease);
}

.stage__frame[data-loaded="true"] {
  opacity: 1;
}

.stage__veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 22px;
  background: linear-gradient(
    180deg,
    rgba(8, 9, 11, 0) 60%,
    rgba(8, 9, 11, 0.78) 100%
  );
  opacity: 0;
  transition: opacity 200ms var(--ease);
}

.plate:hover .stage__veil,
.plate:focus-within .stage__veil,
.viewport:hover .stage__veil,
.viewport:focus-within .stage__veil {
  opacity: 1;
}

/* Figure plates in the work section */
.plates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}

.plate {
  margin: 0;
  padding: clamp(22px, 2.6vw, 32px);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.plate:nth-child(2n) {
  border-right: 0;
}

.plate__caption {
  padding-top: 18px;
}

.plate__caption .h3 {
  margin: 10px 0 6px;
}

.plate__caption p {
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--line-2);
  background: none;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease),
    color 160ms var(--ease);
}

.btn:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

/* The one loud element on the page */
.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn--accent:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.btn--sm {
  padding: 9px 14px;
}

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

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 3px;
  transition: border-color 160ms var(--ease);
}

.link:hover {
  border-bottom-color: var(--paper);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 11, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
}

.nav__link {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 150ms var(--ease);
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--paper);
}

.nav__toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line-2);
  color: var(--paper);
  cursor: pointer;
}

.nav__drawer {
  display: none;
  border-top: 1px solid var(--line);
}

.nav__drawer[data-open="true"] {
  display: block;
}

.nav__drawer a {
  display: block;
  padding: 13px 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.nav__drawer a:last-child {
  border-bottom: 0;
}

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

.hero {
  padding-block: clamp(40px, 5.5vw, 68px) clamp(32px, 4vw, 48px);
}

.hero .display {
  margin-top: 1.5rem;
  max-width: 26ch;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 4vw, 52px);
  margin-top: clamp(32px, 4vw, 48px);
}

/* Measured facts presented as a drawing's title block */
.titleblock {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.titleblock__cell {
  padding: 18px clamp(12px, 1.6vw, 22px);
  border-right: 1px solid var(--line);
}

.titleblock__cell:last-child {
  border-right: 0;
}

.titleblock__cell--wide {
  grid-column: span 3;
}

.titleblock__cell--mid {
  grid-column: span 2;
}

.titleblock__value {
  font-family: var(--mono);
  font-size: clamp(1.1rem, 1.9vw, 1.5rem);
  color: var(--paper);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 6px;
}

/* Lists of names sit a size down from the single-figure cells so they hold
   one line. Must follow .titleblock__value — same specificity, order wins. */
.titleblock__value--list {
  font-size: clamp(0.9375rem, 1.25vw, 1.0625rem);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.plan:last-child {
  border-right: 0;
}

.plan--featured {
  background: var(--ink-2);
}

.plan__figure {
  font-family: var(--mono);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1;
  color: var(--paper);
  letter-spacing: -0.04em;
  margin-top: 16px;
}

.plan__period {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0;
}

/* "From" sits above the figure rather than competing with it. Rendered in
   every tier, empty where unused, so the prices share a baseline across the
   row instead of the qualified one dropping a line. */
.plan__pre {
  display: block;
  font-size: 0.6875rem;
  line-height: 1.6;
  min-height: 1.6em;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.plan__was {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-top: 10px;
}

.plan__terms {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.features {
  list-style: none;
  margin: 20px 0 28px;
  padding: 0;
  display: grid;
  gap: 11px;
  font-size: 0.875rem;
}

.features li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  line-height: 1.55;
}

.features span:first-child {
  font-family: var(--mono);
  color: var(--muted);
}

.plan .btn {
  margin-top: auto;
  width: 100%;
}

/* Home-page tier summary */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tier {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.4vw, 28px);
  border-right: 1px solid var(--line);
}

/* The recommended tier is lifted rather than outlined — quieter than a badge
   shouting over the row, but enough to give the eye somewhere to land. */
.tier--featured {
  background: var(--sheet-raised);
}

.tier__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.tier__flag {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* Says which shape of thing this is — a subscription or a project — so £2,500
   isn't read against £79 as though they were the same kind of number. */
.tier__billing {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 0;
}

.tier__summary {
  margin-top: 12px;
  min-height: 3.4em;
}

.tier__list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.8125rem;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.tier__list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  line-height: 1.5;
}

.tier__list li::before {
  content: "—";
  font-family: var(--mono);
  color: var(--muted);
}

/* Pushed to the bottom so the three links share a line regardless of how
   long each summary runs */
.tier__cta {
  margin-top: auto;
  padding-top: 22px;
}

.tier:last-child {
  border-right: 0;
}

.tier__price {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  color: var(--paper);
  letter-spacing: -0.03em;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

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

.label {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 11px 13px;
  background: var(--ink);
  border: 1px solid var(--line-2);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 150ms var(--ease);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--paper);
}

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

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23767c86' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Chat
   -------------------------------------------------------------------------- */

.chat {
  position: fixed;
  right: clamp(14px, 2.5vw, 24px);
  bottom: clamp(14px, 2.5vw, 24px);
  z-index: 90;
}

.chat__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 11px 16px;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms var(--ease);
}

.chat__toggle:hover {
  background: var(--ink-3);
}

.chat__panel {
  position: absolute;
  right: 0;
  bottom: 52px;
  width: min(336px, calc(100vw - 28px));
  height: 420px;
  display: none;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
}

.chat__panel[data-open="true"] {
  display: flex;
}

.chat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.chat__close {
  flex: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}

.chat__close:hover {
  color: var(--paper);
  border-color: var(--line-2);
}

/* Suggested openers — seeded on first open so the panel shows what it can
   actually be asked rather than waiting to be guessed at */
.chat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.chip {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--text);
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
  text-align: left;
  transition: color 150ms var(--ease), border-color 150ms var(--ease),
    background 150ms var(--ease);
}

.chip:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.chat__log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.8125rem;
  line-height: 1.55;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

/* Chrome / Safari / Edge — the default is a light system track and boxy
   arrow buttons, which sit badly on an ink page. A thin borderless thumb
   matches the rest of the site's hairline-and-mono language instead. */
.chat__log::-webkit-scrollbar {
  width: 6px;
}

.chat__log::-webkit-scrollbar-track {
  background: transparent;
}

.chat__log::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}

.chat__log::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.chat__log::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

.bubble {
  max-width: 90%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--ink);
}

.bubble--user {
  align-self: flex-end;
  border-color: var(--line-2);
  color: var(--paper);
}

.chat__form {
  display: flex;
  gap: 7px;
  padding: 11px;
  border-top: 1px solid var(--line);
}

.chat__form .input {
  padding: 8px 11px;
  font-size: 0.8125rem;
}

.chat__send {
  flex: none;
  padding-inline: 12px;
  border: 1px solid var(--line-2);
  background: none;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.625rem;
  cursor: pointer;
}

.chat__send:hover {
  background: var(--paper);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(32px, 4vw, 52px);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer__links a {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__links a:hover {
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 11px 18px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skip:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

@media (min-width: 981px) {
  .hero__grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
  }
}

@media (max-width: 980px) {
  .steps,
  .steps--2,
  .plates,
  .plans,
  .tiers {
    grid-template-columns: 1fr;
  }

  .step,
  .plate,
  .plan,
  .tier,
  .steps--2 .step {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .section__head,
  .section__head--annotated,
  .spread,
  .spread--annotated {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* The section number becomes a ruled header band: number, then a hairline
     running out to the edge. Keeps the drawing-sheet reading at phone width,
     where the margin column can't survive. */
  .section__no {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 0;
    margin-bottom: 4px;
  }

  .section__no::before {
    order: 2;
    flex: 1;
    width: auto;
    margin-bottom: 0;
  }

  .spec__no {
    padding-top: 0.2em;
    color: var(--paper);
    opacity: 0.55;
  }

  .section__aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 20px;
    margin-top: 8px;
  }

  .section__aside dl {
    grid-template-columns: repeat(2, 1fr);
  }

  .spec__row {
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
  }

  .spec__row dt {
    grid-column: 2;
  }

  .spec__row dd {
    grid-column: 2;
  }

  .spec__tag {
    grid-column: 2;
    text-align: left;
    padding-top: 2px;
  }

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

  .titleblock__cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .titleblock__cell--wide,
  .titleblock__cell--mid {
    grid-column: auto;
  }

  .titleblock__cell:last-child {
    border-bottom: 0;
  }

  .actions .btn {
    flex: 1 1 auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
