/* Flowmade marketing site — the Workshop identity.
 *
 * Colours, typography and component roles follow
 * docs/flowmade-style-guide.md (v0.7): warm white background, white
 * surfaces, ink text, petrol accent and selection, DM Sans Semibold for
 * marketing headlines and large page titles, Source Sans 3 for everything
 * else. The webfonts are self-hosted (see the @font-face rules and the
 * OFL licences in /fonts/) — the site makes no third-party requests.
 */

@font-face {
  font-family: "DM Sans";
  src: url("/assets/dmsans-600-latin.30d4fbc42b0acebd44cb025c96b597b48baaea79c1791a0d895459d9a5da0cd6.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/sourcesans3-latin.587435ca9d90732b8c1ce4958222c6ad3ade2b875500188e1d318efbcb61f4c5.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The Workshop palette — the guide's exact sRGB values. */
  --fm-bg: #faf8f3;
  --fm-surface: #ffffff;
  --fm-ink: #20312d;
  --fm-ink-soft: #52635d;
  --fm-accent: #075750;
  --fm-accent-hover: #064a44;
  --fm-divider: #d7ddd8;
  --fm-frame: #cbd4cf;
  --fm-field: #889a92;
  --fm-row-hover: #f4f7f4;
  --fm-canvas: #faf9f5;
  --fm-canvas-dot: #d7dcd6;
  --fm-connector: #83958b;
  --fm-error: #cd030a;
  --fm-bg-alt: #f4f7f4;
  /* Model type fills (guide); the fine borders mix 70% fill + 30% ink
     #20312d in sRGB (the guide's reproducible border rule). */
  --fm-action-fill: #dcecf7;
  --fm-action-border: #a4b4ba;
  --fm-boundary-fill: #fff0ac;
  --fm-boundary-border: #bcb786;
  --fm-event-fill: #ffe3c7;
  --fm-event-border: #bcae99;
  --fm-view-fill: #e1efdb;
  --fm-view-border: #a7b6a7;
  /* Typeface roles (guide): headlines/large page titles in DM Sans
     Semibold; UI and reading text in Source Sans 3. */
  --font-display: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fm-ink);
  background: var(--fm-bg);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fm-surface);
  color: var(--fm-ink);
  padding: 8px 16px;
  z-index: 100;
  border-bottom: 2px solid var(--fm-accent);
}

.skip-link:focus {
  left: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--fm-accent);
  outline-offset: 2px;
}

a {
  color: inherit;
}

/* --- Navigation --- */

.site-nav {
  border-bottom: 1px solid var(--fm-divider);
  background: var(--fm-surface);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* The working brand mark: a petrol wave beside the Flowmade wordmark
   (DM Sans Semibold), at the leading edge of the header. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fm-ink);
}

.brand:hover {
  color: var(--fm-accent);
}

.brand-wave {
  width: 27px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--fm-accent);
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.lang-switch {
  display: flex;
  gap: 14px;
}

.lang-link {
  text-decoration: none;
  color: var(--fm-ink-soft);
  font-size: 0.9375rem;
}

.lang-link:hover {
  text-decoration: underline;
}

.lang-current {
  color: var(--fm-ink);
  font-weight: 600;
}

/* The trailing edge on wide screens: destinations, language switching, and
   the primary action (Start designing). */
.nav-wide {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* The initial page navigation (issue #190): Examples, How it works, About. */
.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--fm-ink-soft);
}

.nav-links a:hover {
  color: var(--fm-ink);
}

/* "Start designing" in the header: a navigation destination (a link to a
   URL), not a button — the hero's "Explore an example" is the page's one
   primary action. */
.nav-cta {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--fm-ink-soft);
}

.nav-cta:hover {
  color: var(--fm-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Small screens: a labelled menu button (native details/summary — no
   JavaScript) exposes the same destinations in the same order. */
.nav-details {
  display: none;
  position: relative;
  margin-left: auto;
}

.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--fm-frame);
  border-radius: 8px;
  background: var(--fm-surface);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--fm-ink);
  cursor: pointer;
  list-style: none;
}

.nav-menu-btn::-webkit-details-marker {
  display: none;
}

.nav-menu-btn:hover {
  background: var(--fm-row-hover);
}

.nav-menu-icon {
  width: 18px;
  height: 18px;
  color: var(--fm-ink);
}

.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 240px;
  padding: 16px;
  background: var(--fm-surface);
  border: 1px solid var(--fm-divider);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(32, 49, 45, 0.12);
  z-index: 50;
}

.nav-menu-panel .nav-links {
  flex-direction: column;
  gap: 12px;
}

.nav-menu-panel .nav-links a,
.nav-menu-panel .nav-cta {
  display: block;
}

/* --- Buttons (guide: primary petrol, secondary white + fine border,
      text actions ink) --- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: none;
}

.btn-primary {
  background: var(--fm-accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--fm-accent-hover);
}

.btn-secondary {
  background: var(--fm-surface);
  color: var(--fm-ink);
  border-color: var(--fm-frame);
}

.btn-secondary:hover {
  background: var(--fm-row-hover);
}

.btn-large {
  padding: 16px 34px;
  font-size: 1.125rem;
}

/* --- Sections --- */

.section {
  padding: 72px 0;
}

.section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--fm-ink);
}

.section-intro {
  color: var(--fm-ink-soft);
  margin: 0 0 36px;
  max-width: 640px;
}

/* --- Hero (two columns on wide screens: copy + actions left, the
      Room reservations model example right) --- */

.hero {
  padding: 80px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.015em;
  color: var(--fm-ink);
}

.hero-intro {
  font-size: 1.125rem;
  color: var(--fm-ink-soft);
  margin: 0 0 28px;
  max-width: 540px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* --- The Room reservations model example (native markup; the cards read
      Action -> Boundary -> Event in document order) --- */

.hero-fig {
  margin: 0;
}

.hero-fig-canvas {
  background: radial-gradient(
      circle,
      var(--fm-canvas-dot) 1.1px,
      transparent 1.1px
    )
    0 0 / 18px 18px,
    var(--fm-canvas);
  border: 1px solid var(--fm-divider);
  border-radius: 12px;
  padding: 24px;
}

.hero-fig-title {
  margin: 0 0 20px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--fm-ink);
}

.hero-fig-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.model-card {
  min-width: 0;
  border: 1px solid;
  border-radius: 10px;
  padding: 12px 14px;
}

.model-card-action {
  background: var(--fm-action-fill);
  border-color: var(--fm-action-border);
}

.model-card-boundary {
  background: var(--fm-boundary-fill);
  border-color: var(--fm-boundary-border);
}

.model-card-event {
  background: var(--fm-event-fill);
  border-color: var(--fm-event-border);
}

.model-card-view {
  background: var(--fm-view-fill);
  border-color: var(--fm-view-border);
}

.model-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-symbol {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: inline-flex;
}

.model-symbol svg {
  width: 100%;
  height: 100%;
}

/* Model glyphs in ink: the pale border tint would make the small glyph hard
   to distinguish on the pale fill, so the glyph takes the ink colour while
   the specified card fills and borders are preserved. */
.model-card .model-symbol {
  color: var(--fm-ink);
}

.model-card-kind {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--fm-ink);
}

.model-card-name {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--fm-ink);
}

/* The responsible role on the quote illustration's cards (secondary
   reading, one line under the business name). */
.model-card-role {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--fm-ink-soft);
}

/* Fine connectors between the cards: horizontal on wide screens, vertical
   on phones (no shrinking of the desktop diagram). */
.hero-fig-conn {
  flex: 0 0 auto;
  width: 32px;
  height: 2px;
  background: var(--fm-connector);
  position: relative;
}

.hero-fig-conn::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -2px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid var(--fm-connector);
}

.hero-fig figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--fm-ink-soft);
}

/* --- Product (illustration + capabilities) --- */

.product {
  background: var(--fm-bg-alt);
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: start;
}

.illu {
  margin: 0;
}

/* The illustration's frame is the container for the reading-order query:
   the row's width is tested against the frame's own available width, not
   the viewport (issue #202, finding 1). */
.illu-boundary {
  border: 1px dashed var(--fm-frame);
  border-radius: 10px;
  padding: 28px 20px 20px;
  background: var(--fm-surface);
  container-type: inline-size;
}

.illu-area {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fm-ink-soft);
  margin-bottom: 16px;
}

.illu-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

/* The illustration's model cards share the row's width (the row's own
   geometry — the cards themselves are the homepage's single card design). */
.illu-row .model-card {
  flex: 1 1 0;
  min-width: 130px;
}

.illu-arrow {
  align-self: center;
  color: var(--fm-connector);
  font-size: 1.25rem;
}

/* Reading order (issue #202, finding 1): when the frame's available width
   can no longer fit three 130px cards + the arrows on one line (≈462px),
   the whole sequence switches to a vertical layout with downward
   connectors — including the narrow desktop column of the product grid.
   Browsers without container queries keep the wrapping row. */
@container (max-width: 480px) {
  .illu-row {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .illu-row .model-card {
    flex: 0 0 auto;
  }

  .illu-arrow {
    transform: rotate(90deg);
  }
}

.illu figcaption {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--fm-ink-soft);
}

.product-caps {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.product-caps li {
  margin: 0 0 12px;
  color: var(--fm-ink-soft);
}

.product-caps strong {
  color: var(--fm-ink);
}

.product-note {
  margin: 0 0 20px;
  font-size: 0.875rem;
  color: var(--fm-ink-soft);
}

.product-try {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Scenario --- */

.scenario {
  background: var(--fm-bg-alt);
}

.scenario-steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  max-width: 640px;
  counter-reset: scenario;
}

.scenario-step {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--fm-divider);
}

.scenario-step:last-child {
  border-bottom: none;
}

.scenario-step h3 {
  margin: 2px 0 4px;
  font-size: 1.125rem;
}

.scenario-step p {
  margin: 0;
  color: var(--fm-ink-soft);
}

/* The step-kind labels: the guide's model type colours (blue Action,
   orange Event) and the model cards' glyphs, so each step stays
   identifiable from its label and symbol independently of colour. */
.step-kind {
  flex: 0 0 auto;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fm-ink);
  border: 1px solid var(--fm-divider);
  border-radius: 4px;
  padding: 2px 10px;
  margin-top: 4px;
}

.step-kind .model-symbol {
  width: 12px;
  height: 12px;
}

/* The step-kind chips carry the guide's model type colours (blue Action,
   orange Event). Defined after the shared .step-kind rule as compounds, so
   the type-specific border colour takes effect over the shared border. */
.step-kind.chip-event {
  color: var(--fm-ink);
  border-color: var(--fm-event-border);
  background: var(--fm-event-fill);
}

.step-kind.chip-action {
  color: var(--fm-ink);
  border-color: var(--fm-action-border);
  background: var(--fm-action-fill);
}

.step-kind.chip-boundary {
  color: var(--fm-ink);
  border-color: var(--fm-boundary-border);
  background: var(--fm-boundary-fill);
}

.scenario-terms {
  max-width: 640px;
  margin: 0 0 16px;
  font-size: 0.9375rem;
  color: var(--fm-ink-soft);
}

.scenario-outro {
  max-width: 640px;
  margin: 0;
  color: var(--fm-ink-soft);
}

.concepts-link {
  margin: 24px 0 0;
}

.concepts-link a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Card grids (pillars, glossary) --- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 8px;
}

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

.card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-divider);
  border-radius: 8px;
  padding: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.card p {
  margin: 0;
  color: var(--fm-ink-soft);
}

.extended-title {
  margin: 40px 0 16px;
  font-size: 1.375rem;
}

.why-desc {
  max-width: 640px;
  margin: 32px 0 0;
  color: var(--fm-ink-soft);
}

/* --- FAQ --- */

.faq-list {
  margin: 0;
}

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--fm-divider);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item dt {
  font-weight: 700;
  margin-bottom: 6px;
}

.faq-item dd {
  margin: 0;
  color: var(--fm-ink-soft);
  max-width: 640px;
}

/* --- Concepts page --- */

.concepts-main {
  padding: 56px 0 80px;
}

.concepts-inner {
  max-width: 860px;
}

.concepts-inner h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 12px;
}

/* --- Glossary comparison table --- */

.comparison-note {
  color: var(--fm-ink-soft);
  margin: 32px 0 12px;
}

.table-scroll {
  overflow-x: auto;
}

.comparison-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
}

.comparison-table th,
.comparison-table td {
  text-align: left;
  padding: 10px 16px;
  border: 1px solid var(--fm-divider);
}

.comparison-table thead th {
  background: var(--fm-bg-alt);
  font-weight: 700;
}

.comparison-footnote {
  color: var(--fm-ink-soft);
  font-size: 0.875rem;
  margin-top: 12px;
}

/* --- Examples (issue #193): gallery + read-only example detail --- */

.examples-main {
  padding: 56px 0 80px;
}

.examples-main h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 12px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.example-card {
  display: block;
  text-decoration: none;
  color: var(--fm-ink);
}

.example-card:hover {
  border-color: var(--fm-ink-soft);
}

.example-card p {
  margin-bottom: 12px;
}

.example-card-cta {
  font-weight: 600;
}

.example-main {
  padding: 56px 0 80px;
}

.example-inner {
  max-width: 960px;
}

.example-inner > h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 8px;
}

.example-back {
  margin: 0 0 20px;
}

.example-back a {
  font-weight: 600;
  text-decoration: none;
  color: var(--fm-ink-soft);
}

.example-back a:hover {
  text-decoration: underline;
  color: var(--fm-ink);
}

.example-section {
  padding: 48px 0;
}

.example-section p {
  max-width: 680px;
  color: var(--fm-ink-soft);
}

.example-section h2 + p {
  margin-top: 0;
}

/* The model figure: the server-rendered SVG, horizontally scrollable on
   small screens (touch parity, no JavaScript). */
.model-fig {
  margin: 32px 0 0;
}

.model-fig .fig-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.model-svg {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}

.model-fig figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--fm-ink-soft);
  max-width: 680px;
}

/* The featured example's model fragment (issue #206): one frame per
   business area; the cards reuse the model-card anatomy. */
.model-areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 0;
}

.model-area {
  border: 1px solid var(--fm-frame);
  border-radius: 12px;
  background: var(--fm-canvas);
  padding: 16px;
}

.model-area-name {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fm-ink-soft);
}

.model-area-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.model-area .model-card {
  flex: 1 1 150px;
}

/* The featured example's application screens (issue #206): static
   renderings of the real compiled artifact's screens, with the
   provider's sample rows. */
.app-screens {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 0;
}

.app-screen {
  border: 1px solid var(--fm-divider);
  border-radius: 12px;
  background: var(--fm-surface);
}

.app-screen-name {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--fm-divider);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
}

.app-screen-body {
  padding: 16px;
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--fm-divider);
  border-radius: 8px;
  padding: 10px 12px;
}

.app-row-name {
  font-weight: 600;
}

.app-row-price {
  color: var(--fm-ink-soft);
  font-size: 0.9375rem;
}

.app-row-action {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--fm-accent);
}

.app-record {
  border: 1px solid var(--fm-divider);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.app-record-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.9375rem;
}

.app-record-line span:first-child {
  color: var(--fm-ink-soft);
}

.app-form {
  border: 1px solid var(--fm-divider);
  border-radius: 8px;
  padding: 8px 14px;
}

.app-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.app-field + .app-field {
  border-top: 1px solid var(--fm-divider);
}

.app-field-label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.app-field-value {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.app-field-kind {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fm-ink-soft);
  border: 1px solid var(--fm-divider);
  border-radius: 4px;
  padding: 1px 6px;
}

.app-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.app-btn {
  border: 1px solid var(--fm-divider);
  border-radius: 8px;
  background: var(--fm-surface);
  color: var(--fm-ink);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 8px 16px;
}

.app-btn-primary {
  background: var(--fm-accent);
  border-color: var(--fm-accent);
  color: #fff;
}

/* The pinned outcomes: the executed submission (form state, the
   dispatched command with its resolved parameters) and the price rule
   (a violating value refused with the rule's message, a satisfying one
   dispatched). */
.app-trace {
  margin-top: 24px;
  border: 1px solid var(--fm-divider);
  border-radius: 12px;
  background: var(--fm-bg-alt);
  padding: 16px;
}

.app-trace + .app-trace {
  margin-top: 16px;
}

.app-trace-title {
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.app-trace-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-variant-numeric: tabular-nums;
}

.app-trace-state {
  flex: 0 0 auto;
  min-width: 76px;
  text-align: center;
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-trace-state-ok {
  background: var(--fm-view-fill);
  color: var(--fm-ink);
}

.app-trace-state-bad {
  border: 1px solid var(--fm-error);
  color: var(--fm-error);
}

.app-trace-cmd {
  flex: 0 0 auto;
  font-weight: 600;
}

.walk-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: walk;
}

.walk-item {
  counter-increment: walk;
  padding: 20px 0;
  border-bottom: 1px solid var(--fm-divider);
}

.walk-item:first-child {
  padding-top: 0;
}

.walk-item:last-child {
  border-bottom: none;
}

.walk-item h3 {
  margin: 0 0 6px;
  font-size: 1.0625rem;
}

.walk-item h3::before {
  content: counter(walk, decimal-leading-zero) "  ";
  color: var(--fm-ink-soft);
  font-size: 0.875rem;
}

.walk-item p {
  margin: 0;
}

.example-note,
.terms-note {
  font-size: 0.9375rem;
  color: var(--fm-ink-soft);
  border-left: 3px solid var(--fm-divider);
  padding: 4px 0 4px 16px;
  max-width: 680px;
}

.terms-note {
  margin-bottom: 0;
}

/* --- How it works page (issue #191) --- */

.hiw-main {
  padding: 56px 0 80px;
}

.hiw-inner {
  max-width: 860px;
}

.hiw-inner > h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 12px;
}

/* The "in practice" paragraph under a stage's one-liner. */
.stage-practice {
  margin-top: 10px;
}

/* Centered CTA block on the petrol final section. */
.hiw-final {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hiw-final p {
  margin: 0 0 20px;
}

/* --- About / Founder page (issue #195) --- */

.about-main {
  padding: 56px 0 80px;
}

.about-inner {
  max-width: 860px;
}

.about-inner > h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 12px;
}

.founder-card {
  margin-top: 8px;
}

/* --- Final CTA (petrol band) --- */

.final-cta {
  background: var(--fm-accent);
  color: #ffffff;
}

/* The inverted button roles inside the petrol band. */
.final-cta .btn-primary {
  background: #ffffff;
  color: var(--fm-accent);
}

.final-cta .btn-primary:hover {
  background: rgba(255, 255, 255, 0.88);
}

.final-cta .btn-secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.final-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.final-cta h2,
.final-cta p {
  color: #ffffff;
}

.final-cta .section-intro,
.final-cta p {
  color: rgba(255, 255, 255, 0.78);
}

.final-inner {
  max-width: 720px;
  text-align: center;
}

.final-access-note {
  margin-top: 24px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Closing contact route (issue #209): the starting point, the
       prefilled e-mail, the address shown so it can be copied --- */

.contact h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 8px;
}

.contact .section-intro {
  max-width: 680px;
}

.contact-start {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  max-width: 680px;
}

.contact-start li {
  padding: 10px 0;
  border-bottom: 1px solid var(--fm-divider);
  color: var(--fm-ink-soft);
}

.contact-start li:first-child {
  padding-top: 0;
}

.contact-start li:last-child {
  border-bottom: none;
}

.contact-detail {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--fm-ink-soft);
}

.contact-detail a {
  color: var(--fm-accent);
  font-weight: 600;
  text-decoration: none;
}

.contact-detail a:hover {
  text-decoration: underline;
}

.contact-founder {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--fm-ink-soft);
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--fm-divider);
  padding: 48px 0;
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-col h3 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fm-ink-soft);
  margin: 0 0 12px;
}

.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--fm-ink-soft);
  margin-bottom: 8px;
}

.footer-col a:hover {
  text-decoration: underline;
  color: var(--fm-ink);
}

.footer-brand-col .brand {
  margin-bottom: 12px;
}

.copyright {
  color: var(--fm-ink-soft);
  margin: 8px 0 0;
}

.footer-contact {
  margin: 8px 0 0;
}

.footer-contact a {
  text-decoration: none;
}

/* --- Language selection and 404 --- */

.selection-main {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.selection-inner {
  text-align: center;
  width: 100%;
}

.selection-inner h1 {
  font-family: var(--font-display);
  font-weight: 600;
}

.selection-inner .brand {
  display: inline-flex;
  margin-bottom: 32px;
}

.lang-choices {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* --- Legal pages --- */

.legal-main {
  padding: 56px 0 80px;
}

.legal-inner {
  max-width: 720px;
}

.legal-main h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 12px;
}

.legal-body h2 {
  font-size: 1.25rem;
  margin: 32px 0 8px;
}

.legal-body p {
  margin: 0;
  color: var(--fm-ink-soft);
}

.legal-lines {
  margin: 8px 0 0;
}

/* The line list renders for both legal page types; on pages without lines
   (privacy) it stays in the DOM but hidden. */
.legal-lines:empty {
  display: none;
}

.legal-lines dt {
  font-weight: 700;
}

.legal-lines dd {
  margin: 0 0 16px;
  color: var(--fm-ink-soft);
}

.legal-lines a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-lines a:hover {
  color: var(--fm-ink);
}

.section-contact {
  margin: 8px 0 0;
}

.section-contact a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-contact a:hover {
  color: var(--fm-ink);
}

/* --- Responsive --- */

/* The hero becomes two columns (copy left, model example right) on wide
   screens; the figure's cards then read horizontally. */
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .hero-fig-row {
    flex-direction: row;
    align-items: center;
  }
}

/* Below 900px the inline nav is replaced by the labelled menu button. */
@media (max-width: 899px) {
  .nav-wide {
    display: none;
  }

  .nav-details {
    display: block;
  }

  .hero-fig-conn {
    width: 2px;
    height: 18px;
    margin: 0 auto;
  }

  .hero-fig-conn::after {
    top: auto;
    right: auto;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 7px solid var(--fm-connector);
    border-bottom: none;
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .product-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 56px 0;
  }

  .card-grid,
  .card-grid-2,
  .examples-grid {
    grid-template-columns: 1fr;
  }

  .model-areas,
  .app-screens {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* --- Style reference (/style/, issue #215): the reference's own page
   furniture. The components it documents are styled by the production
   rules above; these classes only hold the reference's prose, its example
   frames and the live token table. --- */

.style-main {
  padding: 48px 0;
}

.style-main h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 12px;
}

.style-main h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 36px 0 8px;
}

.style-main code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--fm-bg-alt);
  padding: 1px 4px;
  border-radius: 3px;
}

.style-prose {
  max-width: 760px;
  margin: 0 0 8px;
}

.style-list {
  max-width: 760px;
  margin: 0 0 8px;
  padding-left: 20px;
  color: var(--fm-ink-soft);
}

.style-list li {
  margin: 6px 0;
}

.style-note {
  max-width: 760px;
  font-size: 0.9375rem;
  color: var(--fm-ink-soft);
}

/* The frame around a rendered example, in the site's own surface and
   border language. The example's sections and hero lose their page
   padding — the frame is their section. */
.style-example {
  background: var(--fm-surface);
  border: 1px solid var(--fm-divider);
  border-radius: 8px;
  padding: 24px;
  margin: 16px 0 8px;
}

.style-example .section,
.style-example .hero {
  padding: 0;
}

.style-example .hero-grid {
  display: block;
}

/* The hero example's headline carries the hero's own emphasis; it renders
   as an h2 on the reference page, which keeps a single h1 (its title). */
.style-example .style-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.015em;
  color: var(--fm-ink);
}

.style-example-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* The index cards link to the component pages. */
.style-main .card h3 a {
  text-decoration: none;
}

.style-main .card h3 a:hover {
  color: var(--fm-accent);
}

/* The live token table (the tokens page's example). */
.style-token-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.style-token-table th,
.style-token-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--fm-divider);
  vertical-align: top;
}

.style-token-table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fm-ink-soft);
}

.style-token-group th {
  background: var(--fm-bg-alt);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fm-ink);
}

.style-token-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  word-break: break-word;
}

.style-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--fm-frame);
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: -2px;
}

/* ==========================================================================
   The style reference — Designer component examples (issue #223).

   Furniture only: the frames that hold the verbatim Designer rules
   (static/style-designer.css, the second stylesheet of the reference's
   designer pages). All paint comes from the Designer's own :root tokens —
   the var() fallbacks only cover the pages where the extract is absent.
   Nothing here restyles the Designer classes beyond their placement in
   the frame (the documented exception: .home-hero's 8vh top margin).
   ========================================================================== */

/* The tokens page's two production blocks (website + Designer). */
.style-token-surface {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 28px 0 8px;
}

/* Canvas cards: the dotted ground the .item cards float on. */
.style-designer-canvas {
  position: relative;
  height: 260px;
  overflow: hidden;
  border: 1px solid var(--fm-divider);
  border-radius: 10px;
  background:
    radial-gradient(var(--canvas-dot, #d7dcd6) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--canvas, #faf9f5);
}

/* Inspector (column): the panel next to the canvas it edits. */
.style-designer-inspector {
  display: flex;
  height: 380px;
}

/* Home examples (the first-time hero, the Apps list): the workspace's
   warm-white ground under the white cards. */
.style-designer-home {
  padding: 16px;
  border: 1px solid var(--fm-divider);
  border-radius: 10px;
  background: var(--bg, #faf8f3);
}

/* The hero's own 8vh top margin is for a full workspace; in the frame it
   is placement, not paint — the documented exception above. */
.style-designer-home .home-hero {
  margin-top: 12px;
}

/* The workspace switcher: the menu panel in place of its trigger. */
.style-designer-menu {
  max-width: 320px;
  padding: 24px 16px 8px;
  border: 1px solid var(--fm-divider);
  border-radius: 10px;
  background: var(--bg, #faf8f3);
}

.style-designer-menu .workspace-menu {
  position: static;
  max-height: none;
}

/* The login gate card: the viewport the gate fills. */
.style-designer-gateframe {
  max-width: 640px;
  height: 320px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--fm-divider);
  border-radius: 10px;
  background: var(--bg, #faf8f3);
}

/* The phone composition (issue #223): the bar, the canvas host, and the
   sheet that fills the host — the layers as they stack in production. */
.style-designer-phone {
  display: flex;
  flex-direction: column;
  width: 320px;
  max-width: 100%;
  height: 480px;
  overflow: hidden;
  border: 1px solid var(--fm-frame);
  border-radius: 12px;
  background: var(--surface, #ffffff);
}

.style-designer-phone-bar {
  flex: none;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  background: var(--surface, #ffffff);
  border-bottom: 1px solid var(--border, #d7ddd8);
  color: var(--text, #20312d);
  font-size: 13px;
  font-weight: 600;
}

.style-designer-phone-host {
  position: relative;
  flex: 1;
  background:
    radial-gradient(var(--canvas-dot, #d7dcd6) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--canvas, #faf9f5);
}
