/* mendelson shop – minimal stylesheet (no framework, no inline styles: CSP style-src 'self') */

:root {
  --bg: #ffffff;
  --fg: #1d2330;
  --muted: #5a6475;
  --accent: #0b5cad;
  --accent-fg: #ffffff;
  --border: #d8dde6;
  --surface: #f5f7fa;
  --warn-bg: #fff4ce;
  --error: #b42318;
  color-scheme: light dark;

  /* Design tokens (Phase 8) – the base of the future mendelson web design system.
     Restrained palette: near-black ink, neutral greys, hairline borders. */
  --ink: #14181f;
  --ink-hover: #2c333d;
  --on-ink: #ffffff;
  --text-1: #14181f;
  --text-2: #4b5462;
  --text-3: #6a7280;
  --line: #e2e5ea;
  --line-strong: #c4cad3;
  --surface-0: #ffffff;
  --surface-1: #f6f7f9;
  --surface-2: #eceef2;
  --focus: #14181f;
  /* Product family accents (exact colours of the brand marks; use sparingly) */
  --brand-comm: #1f3c13;
  --brand-comm-mid: #556b4c;
  --brand-mbi: #3e575d;
  --brand-converter: #aa9458;

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;
  --text-xs: 0.8125rem;
  --text-s: 0.875rem;
  --text-m: 1rem;
  --text-l: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: clamp(1.875rem, 1.4rem + 1.6vw, 2.625rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --content-max: 1080px;

  /* Homepage theme tokens (light). The dark scheme below maps them to graphite. */
  --home-max: 1200px;
  --home-radius: 12px;
  --home-bg: #f5f5f3;
  --home-surface: #ffffff;
  --home-sheen: #f1f1ef;
  --home-glow: rgba(255, 255, 255, 0.9);
  /* decorative motif (homepage): wave ribbons in cards, light arc above the hero */
  /* Motif (wave ribbons in cards, horizon arc above page heroes) – shared by all
     customer-facing shop pages via .has-motif / .motif-arc */
  --motif-color: #c9ccd1;
  --motif-opacity: 0.7;
  --motif-opacity-wide: 0.85;
  --motif-arc: rgba(255, 255, 255, 0.95);
  --motif-arc-line: rgba(20, 24, 31, 0.07);
  /* minimal shop footer */
  --footer-text: #6b717a;
  --footer-text-hover: #16191e;
  --home-text: #16191e;
  --home-muted: #5b616b;
  --home-border: #e6e7e9;
  --home-border-hover: #c6c9ce;
  --home-divider: #eeeff1;
  --home-divider-strong: #d3d6da;
  --home-hover: rgba(20, 24, 31, 0.05);
  --home-cta-bg: #1e2228;
  --home-cta-hover: #343a43;
  --home-cta-fg: #ffffff;
  /* navigation arrows on cards: light and quiet (Add to cart stays strong) */
  --nav-cta-bg: #eef0f2;
  --nav-cta-border: #dde0e4;
  --nav-cta-fg: #3a4049;
  --nav-cta-hover-bg: #e0e3e7;
  --nav-cta-hover-border: #b9bec5;
  --nav-cta-hover-fg: #16191e;
  /* primary purchase action (Add to cart): soft anthracite-grey, dark label;
     border ≥ 3:1 against the white card, label ≥ 7:1 */
  --buy-cta-bg: #bec4cc;
  --buy-cta-border: #878f99;
  --buy-cta-fg: #14181f;
  --buy-cta-hover-bg: #a9b0b9;
  --buy-cta-hover-border: #6f7782;
  --buy-cta-hover-fg: #0d1015;
  --home-shadow: 0 1px 1px rgba(20, 24, 31, 0.02), 0 8px 24px -16px rgba(20, 24, 31, 0.08);
  --home-shadow-hover: 0 1px 2px rgba(20, 24, 31, 0.03), 0 14px 32px -18px rgba(20, 24, 31, 0.14);
  --home-shadow-flat: 0 1px 1px rgba(20, 24, 31, 0.02);
  --home-card-pad: 36px;
  --home-hero-gap: 48px;
  --radius-s: 2px;
  --radius-m: 4px;
  --tap: 44px;
  /* product pages: heading hierarchy and one price typography
     (differences only through size, weight and muted colour) */
  --product-title-size: clamp(2.125rem, 1.6rem + 2vw, 3.25rem);
  --product-subtitle-size: clamp(0.9375rem, 0.9rem + 0.3vw, 1.125rem);
  /* dedicated purchase pages (one edition / license): one step smaller */
  --product-detail-title-size: clamp(1.875rem, 1.45rem + 1.5vw, 2.75rem);
  --product-detail-subtitle-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --price-font: var(--font-sans);
  --price-numerals: tabular-nums lining-nums;
  --price-main-size: clamp(1.75rem, 1.55rem + 0.6vw, 2.125rem);
  --price-main-weight: 450;
  --price-card-size: var(--text-xl);
  --price-card-weight: 500;
  --price-total-size: 1.625rem;
  --price-total-weight: 600;
  --price-secondary-size: var(--text-s);
  --price-secondary-weight: 500;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161d;
    --fg: #e6e9ef;
    --muted: #a3acba;
    --accent: #6aa9ec;
    --accent-fg: #0b1220;
    --border: #2c3442;
    --surface: #1a2029;
    --warn-bg: #4a3d0a;
    --error: #ff8a80;

    --ink: #e8ebf0;
    --ink-hover: #ffffff;
    --on-ink: #12161d;
    --text-1: #e8ebf0;
    --text-2: #b3bbc7;
    --text-3: #949dab;
    --line: #2a313c;
    --line-strong: #414a58;
    --surface-0: #12161d;
    --surface-1: #181d25;
    --surface-2: #202631;
    --focus: #e8ebf0;
    --brand-comm: #556b4c;

    --home-bg: #0f1216;
    --home-surface: #171b21;
    --home-sheen: #1c2128;
    --home-glow: #1b2028;
    --motif-color: #3f4651;
    --motif-opacity: 0.42;
    --motif-opacity-wide: 0.5;
    --motif-arc: rgba(255, 255, 255, 0.05);
    --motif-arc-line: rgba(255, 255, 255, 0.08);
    --footer-text: #949dab;
    --footer-text-hover: #e8ebf0;
    --home-text: #e8ebf0;
    --home-muted: #a3abb8;
    --home-border: #2a2f37;
    --home-border-hover: #3d444f;
    --home-divider: #252a32;
    --home-divider-strong: #3d444f;
    --home-hover: rgba(255, 255, 255, 0.06);
    --home-cta-bg: #e8ebf0;
    --home-cta-hover: #ffffff;
    --home-cta-fg: #12161d;
    --nav-cta-bg: #222831;
    --nav-cta-border: #343b45;
    --nav-cta-fg: #c9d0da;
    --nav-cta-hover-bg: #2c333d;
    --nav-cta-hover-border: #4a525e;
    --nav-cta-hover-fg: #ffffff;
    --buy-cta-bg: #3a414b;
    --buy-cta-border: #5a636f;
    --buy-cta-fg: #eef1f5;
    --buy-cta-hover-bg: #48505b;
    --buy-cta-hover-border: #7a838f;
    --buy-cta-hover-fg: #ffffff;
    --home-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --home-shadow-flat: 0 1px 1px rgba(0, 0, 0, 0.3);
    --home-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 30px -14px rgba(0, 0, 0, 0.6);
  }
}

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

/* Page shell: header, growing main, footer – the footer sits at the bottom of
   the viewport on short pages and follows the content on long ones. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    16px/1.55 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
}

a {
  color: var(--accent);
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 8px;
  background: var(--bg);
  padding: 4px 8px;
  z-index: 10;
}

.staging-banner {
  background: var(--warn-bg);
  text-align: center;
  padding: 6px 16px;
  font-weight: 600;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface-0);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: var(--tap);
  text-decoration: none;
  color: var(--text-2);
}
.brand-logo {
  display: block;
  width: 210px;
  height: auto;
}

@media (max-width: 599px) {
  .brand-logo {
    width: 168px;
  }
  .brand {
    gap: 10px;
  }
}
/* The wordmark is dark grey; invert it for the dark colour scheme. */
@media (prefers-color-scheme: dark) {
  .brand-logo {
    filter: invert(1);
  }
}

.site-header a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

main {
  flex: 1 0 auto;
  width: 100%;
  padding-top: 24px;
  padding-bottom: 48px;
}
h1 {
  font-size: 1.8rem;
  margin: 0 0 8px;
}

button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  align-self: flex-start;
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}
table.prices {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
}
table.prices caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 8px;
}
table.prices th,
table.prices td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
table.prices thead th {
  background: var(--surface);
  font-size: 0.9rem;
}
table.prices .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
table.prices tr.child th {
  padding-left: 28px;
  font-weight: normal;
}
table.prices tfoot th,
table.prices tfoot td {
  border-bottom: 0;
}

.error {
  color: var(--error);
  font-weight: 600;
}

/* Phase 2: cart */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}

/* cart: quantity field and Update/Remove are full-size touch targets */
.item-actions button {
  min-height: var(--tap);
}

.notice {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  padding: 8px 12px;
}
.cart-items {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  gap: 16px;
}
.cart-item {
  min-width: 0; /* grid item: the price table scrolls inside instead of widening the page */
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.cart-item.unavailable {
  opacity: 0.75;
  border-style: dashed;
}
.cart-item-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
}
.cart-item h2 {
  font-size: 1.1rem;
  margin: 0 0 4px;
}
.cart-item p {
  margin: 0 0 4px;
}
.cart-item .details {
  margin: 4px 0 0;
  padding-left: 18px;
}
.item-total {
  font-weight: 700;
  white-space: nowrap;
}
.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}
.cart-summary {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.cart-summary .subtotal {
  font-size: 1.2rem;
  display: flex;
  gap: 12px;
}

/* Phase 3: checkout */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
  counter-reset: step;
  color: var(--muted);
  font-size: 0.95rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step) '. ';
}
.steps li[aria-current='step'] {
  color: var(--fg);
  font-weight: 700;
}
.checkout-form {
  display: grid;
  gap: 16px;
  max-width: 720px;
}
.checkout-form fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px 16px;
  margin: 0;
  min-width: 0;
}
.checkout-form legend {
  font-weight: 700;
  padding: 0 4px;
}
.field {
  margin-top: 10px;
}
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field input[type='password'],
.field select,
.field textarea {
  width: 100%;
  padding: 8px;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}
.field-row {
  display: grid;
  gap: 0 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--error);
}
.field-error {
  color: var(--error);
  margin: 4px 0 0;
  font-size: 0.9rem;
}
.field-hint {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 0.9rem;
}
.req {
  color: var(--error);
}

.warning {
  background: var(--warn-bg);
  border-left: 4px solid var(--error);
  padding: 8px 12px;
}
.review-block {
  margin: 24px 0;
}
.review-block h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
address {
  font-style: normal;
  line-height: 1.6;
}
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 12px 0;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.pre {
  white-space: pre-line;
}
.line-details {
  display: block;
  font-weight: normal;
  color: var(--muted);
  font-size: 0.9rem;
}
table.prices tfoot tr.total th,
table.prices tfoot tr.total td {
  border-top: 2px solid var(--fg);
  font-size: 1.1rem;
}
.order-number {
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}
.place-order {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: grid;
  gap: 8px;
  max-width: 720px;
}

/* Phase 4: payment */
.mono {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}
.payment-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px 16px;
}
.payment-block h2 {
  margin-top: 0;
}
.payment-state.state-paid {
  color: var(--accent);
}

/* Phase 5: accounts */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.b2b-notice {
  font-weight: 600;
}

/* Internal order area (Phase 6, D-097): the light shop foundation with a
   clearly different, utilitarian frame – staff marker, plain tables, wide page. */
.page-internal {
  --internal-marker-bg: #fff4d6;
  --internal-marker-border: #b8860b;
  --internal-marker-text: #4d3800;
}
.internal-header .brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap);
}
.internal-label {
  padding: 2px var(--space-2);
  border: 1px solid var(--internal-marker-border);
  border-radius: var(--radius-s);
  background: var(--internal-marker-bg);
  color: var(--internal-marker-text);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.internal-tools a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-3);
  color: var(--home-text);
  font-size: var(--text-s);
}
.internal-tools a[aria-current='page'] {
  font-weight: 600;
}
.shop-flow.internal-page > *,
.shop-flow.internal-page > .review-block,
.shop-flow.internal-page > .flow-message {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}
.internal-banner {
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--internal-marker-border);
  border-left-width: 4px;
  border-radius: var(--radius-m);
  background: var(--internal-marker-bg);
  color: var(--internal-marker-text);
  font-size: var(--text-s);
  font-weight: 600;
}
.internal-page .internal-crumbs ol {
  justify-content: flex-start;
  margin-top: 0;
}
.internal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
}
.internal-title {
  margin: 0;
  color: var(--home-text);
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
.internal-views {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.internal-views a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid var(--home-border);
  border-radius: 999px;
  background: var(--home-surface);
  color: var(--home-text);
  font-size: var(--text-s);
  text-decoration: none;
}
.internal-views a:hover {
  border-color: var(--home-border-hover);
}
.internal-views a[aria-current='page'] {
  border-color: var(--home-text);
  font-weight: 600;
}
.internal-views a:focus-visible,
.internal-tools a:focus-visible,
.internal-header .brand:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.shop-flow .home-card.internal-card {
  display: block;
  padding: var(--space-3) var(--space-5);
  box-shadow: var(--home-shadow-flat);
}
.internal-list th[scope='row'],
.internal-list .num {
  white-space: nowrap;
}
.internal-state {
  margin: 0 0 var(--space-3);
}
.internal-action {
  display: inline-block;
  margin: 0 var(--space-3) var(--space-2) 0;
}
.shop-flow.internal-page .review-block h3 {
  margin: var(--space-4) 0 var(--space-2);
  color: var(--home-muted);
  font-size: var(--text-s);
  font-weight: 600;
}
.internal-footer p {
  margin: 0;
  color: var(--footer-text);
  font-size: var(--text-xs);
  text-align: center;
}

/* Phase 8: card link – the card's title link is stretched over the whole card
   (one tab stop per card); used by the homepage and the purchase flow. */
.select-card-link {
  color: inherit;
  text-decoration: none;
}
.select-card-link::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
}

/* Phase 8: protocol purchase flow (AS2 pilot; OFTP2 / AS4 reuse it). Same light
   card system as the homepage: .home-card, .home-cta, --home-* tokens only. */
.flow-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
  color: var(--home-muted);
  font-size: var(--text-s);
}
.flow-crumbs li {
  display: inline-flex;
  align-items: center;
}
.flow-crumbs li + li::before {
  content: '/';
  margin: 0 var(--space-2);
  color: var(--home-divider-strong);
}
.flow-crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--home-muted);
  text-decoration: none;
}
.flow-crumbs a:hover {
  color: var(--home-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.flow-crumbs [aria-current] {
  color: var(--home-text);
}
.flow-crumbs a:focus-visible,
.flow-add:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.flow-hero {
  position: relative;
  padding: var(--space-3) 0 var(--space-6);
  text-align: center;
}
.flow-title {
  margin: 0 0 var(--space-3);
  color: var(--home-text);
  font-size: var(--product-title-size);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: break-word;
  letter-spacing: 0.16em;
  padding-left: 0.16em;
}
.flow-question {
  margin: 0;
  color: var(--home-muted);
  text-wrap: pretty;
  font-size: var(--product-subtitle-size);
  letter-spacing: 0.03em;
}
.flow-hero-purchase .flow-title {
  font-size: var(--product-detail-title-size);
}
.flow-hero-purchase .flow-question {
  font-size: var(--product-detail-subtitle-size);
}
.flow-error {
  margin: 0 auto var(--space-5);
  max-width: 820px;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
  margin: 0 auto;
}
/* request-offer cards below direct-buy rows (MBI unlimited editions):
   longer titles, aligned on two lines */
.flow-grid-after-rows {
  margin-top: var(--space-7);
}
.flow-grid-after-rows .flow-option-title {
  min-height: 2.4em;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem);
  letter-spacing: 0.12em;
}
/* labelled card action ("Buy", "Request offer"); the link covers the card */
.flow-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--home-muted);
  font-size: var(--text-s);
  white-space: nowrap;
}
.home-card .flow-cta {
  color: var(--home-muted);
}
.home-card-link:hover .flow-cta {
  color: var(--home-text);
}
/* MBI modules: one compact chip collection below the cards (names only,
   no prices, no forms); chips wrap, long names may break on narrow screens */
.flow-modules {
  max-width: 920px;
  margin: var(--space-7) auto 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--home-divider);
  text-align: center;
}
.flow-modules .flow-plugins {
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
}
.flow-modules .flow-plugins li {
  padding: 4px var(--space-3);
  white-space: normal;
}
.flow-grid-1 {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
  margin: 0 auto;
}
.flow-option-title {
  margin: 0 0 var(--space-4);
  color: var(--home-text);
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.625rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.flow-features {
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  color: var(--home-text);
  font-size: var(--text-s);
  line-height: 1.5;
}
.flow-features li {
  position: relative;
  padding-left: var(--space-4);
  overflow-wrap: break-word;
}
.flow-features li + li {
  margin-top: var(--space-1);
}
.flow-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 7px;
  height: 1px;
  background: var(--home-muted);
}
.flow-plugins-label {
  margin: 0 0 var(--space-2);
  color: var(--home-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.flow-plugins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}
.flow-plugins li {
  padding: 2px var(--space-2);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-m);
  background: var(--home-bg);
  color: var(--home-muted);
  font-size: var(--text-xs);
  line-height: 1.6;
  white-space: nowrap;
}
/* price block and action sit at the bottom, aligned across the row */
.flow-foot {
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--home-divider);
}
.flow-prices {
  flex: 1;
  min-width: 0;
}
.flow-price {
  margin: 0;
  color: var(--home-text);
}
/* Shared price typography (all product pages and the homepage): one family and
   numeral style; main / card / total / secondary differ only in size, weight
   and (for affixes) muted colour – the same in perpetual and subscription. */
.flow-price-value,
.home-price,
.buy-lead-price,
.buy-choice .num,
.buy-total-row .num {
  font-family: var(--price-font);
  font-variant-numeric: var(--price-numerals);
  letter-spacing: 0;
  white-space: nowrap;
}
.flow-price-value {
  font-size: var(--price-card-size);
  font-weight: var(--price-card-weight);
}
.flow-price-affix {
  color: var(--home-muted);
  font-size: var(--price-secondary-size);
  font-weight: 400;
}
.flow-line {
  margin: 2px 0 0;
  color: var(--home-muted);
  font-size: var(--text-s);
}

.flow-add {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border: 1px solid var(--buy-cta-border);
  border-radius: var(--radius-m);
  background: var(--buy-cta-bg);
  color: var(--buy-cta-fg);
  font: inherit;
  font-size: var(--text-s);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}
.flow-add:hover {
  border-color: var(--buy-cta-hover-border);
  background: var(--buy-cta-hover-bg);
  color: var(--buy-cta-hover-fg);
}
.flow-add-arrow svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-note {
  margin: var(--space-5) auto 0;
  max-width: 820px;
  color: var(--home-muted);
  font-size: var(--text-s);
  text-align: center;
}
.flow-net {
  margin: var(--space-2) auto 0;
  color: var(--home-muted);
  font-size: var(--text-xs);
  text-align: center;
}

@media (max-width: 1023px) {
  .flow-grid-after-rows .flow-option-title {
    min-height: 0;
  }
  /* as wide as the direct-buy row above */
  .flow-grid-3.flow-grid-after-rows {
    max-width: none;
    margin-top: var(--space-6);
  }
  .flow-grid-3 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
    margin: 0 auto;
  }
}
@media (max-width: 639px) {
  .flow-hero {
    padding-bottom: var(--space-5);
  }
  .flow-title {
    letter-spacing: 0.12em;
    padding-left: 0.12em;
  }
  .flow-grid,
  .flow-grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  .flow-card {
    padding: var(--space-5);
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow-add {
    transition: none;
  }
}

/* Purchase page of one edition: two boxes – perpetual license (primary, ~60 %)
   and subscription (secondary). Each box is one form; the radio choice sets the
   existing field, the matching total is shown via :has() (no JavaScript). */
.buy-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: stretch;
}
.buy-layout-1 {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
  margin: 0 auto;
}
.buy-title {
  margin: 0 0 var(--space-3);
  color: var(--home-text);
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.625rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.buy-lead {
  margin: 0;
  color: var(--home-text);
}
.buy-lead-price {
  font-size: var(--price-main-size);
  font-weight: var(--price-main-weight);
}
.buy-line {
  margin: var(--space-1) 0 0;
  color: var(--home-muted);
  font-size: var(--text-s);
}
.buy-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: var(--space-5);
}
.buy-choices {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
/* options are flat rows; only the selected row gets a quiet frame and tint */
.buy-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: var(--tap);
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background-color 120ms ease;
}
.buy-choice:hover {
  background: var(--home-hover);
}
.buy-choice:has(input:checked) {
  border-color: var(--home-border-hover);
  background: var(--home-sheen);
}
.buy-choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--home-cta-bg);
}
.buy-choice input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.buy-choice-body {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}
.buy-choice-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}
.buy-choice-label {
  color: var(--home-text);
  font-weight: 500;
}
.buy-choice:has(input:checked) .buy-choice-label {
  font-weight: 600;
}
.buy-choice-value {
  color: var(--home-text);
  font-size: var(--price-secondary-size);
  font-weight: var(--price-secondary-weight);
}
.buy-choice-detail {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--home-muted);
  font-size: var(--text-s);
}
.buy-choice-total {
  color: var(--home-text);
}
/* quiet secondary link inside an option ("More details about SMP") */
.buy-choice-link {
  color: var(--home-muted);
  text-decoration: underline;
  text-decoration-color: var(--home-divider-strong);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.buy-choice-link:hover {
  color: var(--home-text);
  text-decoration-color: currentColor;
}
.buy-choice-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
/* perpetual: the per-choice total is said once, in the big total below
   (kept for screen readers inside the choice) */
.buy-purchase .buy-choice-total {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.buy-total {
  margin-top: var(--space-5);
}
.buy-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0;
  color: var(--home-text);
}
.buy-total-row strong {
  font-size: var(--price-total-size);
  font-weight: var(--price-total-weight);
}
.buy-total-for {
  color: var(--home-muted);
  font-size: var(--text-s);
}
@supports selector(:has(*)) {
  .buy-total-row {
    display: none;
  }
  .buy-total-for {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .buy-form:has(.buy-choice:nth-of-type(1) input:checked) .buy-total-1,
  .buy-form:has(.buy-choice:nth-of-type(2) input:checked) .buy-total-2,
  .buy-form:has(.buy-choice:nth-of-type(3) input:checked) .buy-total-3 {
    display: flex;
  }
}
.buy-note {
  margin: var(--space-3) 0 0;
  color: var(--home-muted);
  font-size: var(--text-s);
}
/* Add to cart (one unit; quantities are changed in the cart) */
.buy-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-5);
}
.buy-actions .flow-add {
  flex: 1;
}
/* consulting: the number of hours is the purchase choice */
.buy-hours {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--home-muted);
  font-size: var(--text-s);
}
.buy-hours input {
  width: 6.5rem;
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border: 1px solid var(--home-border-hover);
  border-radius: var(--radius-m);
  background: var(--home-surface);
  color: var(--home-text);
  font: inherit;
  font-size: var(--text-m);
  text-align: center;
}
@media (max-width: 479px) {
  .buy-hours input {
    width: 4.75rem;
  }
  .buy-actions .flow-add {
    white-space: nowrap;
  }
}
.buy-hours input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* subscription: secondary */
.buy-subscription {
  background: var(--home-surface);
  box-shadow: var(--home-shadow-flat);
}
.buy-subscription .buy-title {
  color: var(--home-muted);
}
.buy-note-link {
  color: var(--home-muted);
  text-decoration: underline;
  text-decoration-color: var(--home-divider-strong);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.buy-note-link:hover {
  color: var(--home-text);
  text-decoration-color: currentColor;
}
.buy-note-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Balanced boxes: both share one row grid (subgrid), so title, price, choices,
   total and Add to cart sit at the same height and the boxes are equally tall.
   Without subgrid support the boxes keep the flex column layout above. */
@supports (grid-template-rows: subgrid) {
  .buy-layout {
    row-gap: 0;
  }
  .home-card.buy-box {
    display: grid;
    grid-row: span 7;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
  .buy-box .buy-form {
    display: contents;
  }
  .buy-box .buy-title {
    grid-row: 1;
  }
  .buy-box .buy-lead {
    grid-row: 2;
  }
  .buy-box .buy-line {
    grid-row: 3;
  }
  .buy-box .buy-choices {
    grid-row: 4;
    align-self: start;
    margin-top: var(--space-5);
  }
  .buy-box .buy-total {
    grid-row: 5;
    align-self: start;
  }
  .buy-box .buy-note {
    grid-row: 6;
  }
  .buy-box .buy-actions {
    grid-row: 7;
    align-self: end;
  }
}

/* Wide navigation row (MBI Entry on /mbi, Runtime / IDE on /converter): like the homepage Software
   Maintenance row – name | one line | price | labelled light arrow. The whole
   row is the link (select-card-link); no form, no choices. */
.home-card.flow-link-row {
  display: grid;
  /* fixed minimum widths keep stacked rows (Runtime / IDE) aligned */
  grid-template-columns: minmax(16rem, auto) minmax(0, 1fr) minmax(7rem, auto) auto;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-7);
  box-shadow: var(--home-shadow-flat);
}
/* product names written in lower case (mbi, D-103) stay so in upper-case titles */
.brand-name {
  text-transform: none;
}
.flow-link-title {
  margin: 0;
  color: var(--home-text);
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.flow-link-text {
  margin: 0;
  max-width: 48ch;
  padding-left: var(--space-6);
  border-left: 1px solid var(--home-divider-strong);
  color: var(--home-muted);
  font-size: var(--text-s);
}
.flow-link-price {
  white-space: nowrap;
  text-align: right;
}
.flow-link-row + .flow-link-row {
  margin-top: var(--space-4);
}
@media (max-width: 1023px) {
  .home-card.flow-link-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3) var(--space-5);
    padding: var(--space-6);
  }
  .flow-link-title {
    grid-column: 1 / -1;
    white-space: normal;
  }
  .flow-link-text {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 0;
    border-left: 0;
  }
  .flow-link-price {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
  }
  .flow-link-row .flow-cta {
    grid-column: 2;
    grid-row: 3;
  }
}
@media (max-width: 639px) {
  .home-card.flow-link-row {
    padding: var(--space-5);
  }
}

@media (max-width: 1023px) {
  .buy-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  /* stacked: the gap between the boxes (the shared row grid has no row gap) */
  .buy-box + .buy-box {
    margin-top: var(--space-6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .buy-choice {
    transition: none;
  }
}

/* Software Maintenance (/maintenance): SMP renewals grouped by product family.
   One card per family – family name | rows (label · price per year · Add to
   cart). Each row is one POST /cart/add form with hidden qty=1. */
.renewals-rate {
  margin: var(--space-2) 0 0;
  color: var(--home-muted);
  font-size: var(--text-s);
}
.renewal-groups {
  display: grid;
  gap: var(--space-5);
  max-width: 880px;
  margin: 0 auto;
}
.home-card.renewal-group {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: start;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--home-shadow-flat);
}
.renewal-group-title {
  margin: 0;
  padding-top: 10px; /* aligns with the first row's text */
  color: var(--home-text);
  font-size: var(--text-l);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.renewal-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.renewal-row {
  display: grid;
  /* fixed price column: prices and buttons line up across all family cards */
  grid-template-columns: minmax(0, 1fr) 9.5rem auto;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--tap);
}
.renewal-row + .renewal-row {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--home-divider);
}
.renewal-label {
  color: var(--home-text);
  font-size: var(--text-m);
}
.renewal-price {
  color: var(--home-text);
  text-align: right;
  white-space: nowrap;
}
.renewal-price-value {
  font-family: var(--price-font);
  font-size: var(--text-m);
  font-weight: var(--price-card-weight);
  font-variant-numeric: var(--price-numerals);
}
.renewal-form {
  display: flex;
  margin: 0;
}
.renewal-add {
  /* compact member of the Add to cart family: same height, colours and states */
  flex: none;
  gap: var(--space-2);
  min-width: 8.5rem;
  padding: 0 var(--space-3);
  white-space: nowrap;
}
.renewal-add .flow-add-arrow svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 639px) {
  .home-card.renewal-group {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-5);
  }
  .renewal-group-title {
    padding-top: 0;
  }
  /* name over price on the left, compact Add to cart on the right */
  .renewal-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--space-3);
  }
  .renewal-label {
    grid-column: 1;
    grid-row: 1;
  }
  .renewal-price {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }
  .renewal-form {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* Phase 8: homepage (header / hero / product cards / maintenance / footer).
   Colours only through the --home-* tokens (light here, graphite in the dark
   scheme), so the same components can switch theme without layout changes. */
.page-home {
  background: var(--home-bg);
  color: var(--home-text);
}
.page-home .container {
  max-width: var(--home-max);
  padding: 0 var(--space-5);
}
.home-header {
  border-bottom: 0;
  background: transparent;
}
.home-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.home-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: -10px;
}
.icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-s);
  color: var(--home-text);
}
.icon-link svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-link:hover {
  background: var(--home-hover);
}
.icon-link:focus-visible,
.home-card-links a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.cart-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--home-cta-bg);
  color: var(--home-cta-fg);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.home {
  position: relative;
  overflow-x: clip;
  padding-bottom: var(--space-7);
}
.page-home main {
  padding-top: 0;
  padding-bottom: 0;
}
.home-hero {
  position: relative;
  /* no visible heading: the tagline is a quiet intro line above the grid */
  padding: var(--space-6) 0 var(--home-hero-gap);
  text-align: center;
}
/* a soft arc of light behind the title – very subtle, token-driven */
.home-hero::before,
.flow-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -25%;
  width: min(980px, 140%);
  height: 125%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--home-glow), transparent 85%);
  pointer-events: none;
}
/* Horizon arc above a page hero (reusable: add .motif-arc to the hero section;
   the hero must be position: relative inside an overflow-clipped wrapper). */
.motif-arc::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -56px;
  width: 190%;
  height: 260%;
  transform: translateX(-50%);
  border-top: 1px solid var(--motif-arc-line);
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--motif-arc), transparent 14%);
  pointer-events: none;
}
.home-subtitle {
  margin: 0 auto;
  max-width: 64ch;
  color: var(--home-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  letter-spacing: 0.04em;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--home-card-pad) var(--home-card-pad) var(--space-6);
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius);
  background:
    radial-gradient(90% 70% at 100% 0%, var(--home-sheen), transparent 60%), var(--home-surface);
  box-shadow: var(--home-shadow);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.home-card-link:hover {
  border-color: var(--home-border-hover);
  box-shadow: var(--home-shadow-hover);
}
.home-card .select-card-link {
  color: inherit;
  text-decoration: none;
}
.home-card .select-card-link:focus-visible {
  outline: none;
}
.home-card-link:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.home-card-link:has(.select-card-link:focus:not(:focus-visible)) {
  outline: none;
}
.home-card-title {
  margin: 0 0 var(--space-3);
  color: var(--home-text);
  font-size: clamp(1.75rem, 1.45rem + 0.9vw, 2.375rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.08em;
}
.home-card-text {
  margin: 0 0 var(--space-5);
  color: var(--home-muted);
  font-size: var(--text-m);
  line-height: 1.55;
  letter-spacing: 0.01em;
}
.home-card-links {
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}
.home-card-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 36px;
  color: var(--home-muted);
  text-decoration: none;
}
.home-card-links a:hover {
  color: var(--home-text);
}
.home-link-arrow svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-card-foot {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--home-divider);
}
.home-price-from {
  color: var(--home-muted);
  font-size: var(--price-secondary-size);
  font-weight: 400;
}
.home-price {
  color: var(--home-text);
  font-size: var(--price-card-size);
  font-weight: var(--price-card-weight);
}
.home-cta {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--nav-cta-border);
  border-radius: var(--radius-m);
  background: var(--nav-cta-bg);
  color: var(--nav-cta-fg);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}
.home-cta svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-card-link:hover .home-cta,
.home-card-link:focus-within .home-cta {
  border-color: var(--nav-cta-hover-border);
  background: var(--nav-cta-hover-bg);
  color: var(--nav-cta-hover-fg);
}

/* Wave motif for cards (reusable: add .has-motif, .motif-wide for full-width
   rows). One SVG used as a mask, coloured by --motif-* tokens; painted behind the
   content (isolation + z-index -1); no layout impact, not focusable, not read. */
.has-motif {
  isolation: isolate;
}
.has-motif::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(58%, 260px);
  height: 68%;
  border-top-right-radius: inherit;
  background: linear-gradient(200deg, var(--motif-color) 10%, transparent 88%);
  opacity: var(--motif-opacity);
  -webkit-mask: url('/static/images/motif/wave.svg') right top / 100% 100% no-repeat;
  mask: url('/static/images/motif/wave.svg') right top / 100% 100% no-repeat;
  pointer-events: none;
}
.motif-wide::before {
  width: min(46%, 520px);
  height: 100%;
  opacity: var(--motif-opacity-wide);
}

/* Software Maintenance: one full-width row */
.home-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-7);
  box-shadow: var(--home-shadow-flat);
}
.home-wide-title {
  margin: 0;
  font-size: clamp(1.125rem, 0.55rem + 1.2vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.home-card-wide .home-card-text {
  margin: 0;
  max-width: 48ch;
  padding-left: var(--space-6);
  border-left: 1px solid var(--home-divider-strong);
  font-size: var(--text-s);
}

@media (max-width: 1023px) {
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-card-wide {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-4) var(--space-5);
    padding: var(--space-6);
  }
  .home-card-wide .home-card-text {
    grid-column: 1;
    padding-left: 0;
    border-left: 0;
  }
  .home-card-wide .home-cta {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}
@media (max-width: 639px) {
  .page-home .container {
    padding: 0 var(--space-4);
  }
  .home-hero {
    padding: var(--space-5) 0 var(--space-6);
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  .home-card,
  .home-card-wide {
    padding: var(--space-5);
  }
  .home-card-links a {
    min-height: var(--tap);
  }
  .home-wide-title {
    letter-spacing: 0.14em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-card,
  .home-cta {
    transition: none;
  }
}

/* Minimal shop footer (all customer-facing pages): company · Contact · Legal disclosure */
.shop-footer {
  padding: var(--space-6) 0 var(--space-5);
}
.shop-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--footer-text);
  font-size: var(--text-s);
}
.shop-footer li + li::before {
  content: '·';
  margin: 0 var(--space-3);
  color: var(--footer-text);
}
.shop-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--footer-text);
  text-decoration: none;
}
.shop-footer a:hover {
  color: var(--footer-text-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.shop-footer a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Cart, checkout, order confirmation and payment (.shop-flow): the light shop
   design of the product pages – shared hero / headings, price typography,
   light Add to cart family for the primary action, light secondary buttons,
   quiet text actions, one calm message style, one form style. Scoped to
   .shop-flow so account and internal pages keep their own styles. */
.shop-flow {
  --flow-narrow: 820px;
}
.shop-flow .steps,
.shop-flow .flow-message,
.shop-flow .checkout-form,
.shop-flow .review-block,
.shop-flow .place-order,
.shop-flow .order-continue,
.shop-flow .cart-empty {
  max-width: var(--flow-narrow);
  margin-left: auto;
  margin-right: auto;
}
.shop-flow .flow-hero {
  padding-bottom: var(--space-5);
}
.shop-flow .muted,
.shop-flow .field-hint,
.shop-flow .field-note,
.shop-flow .cart-note {
  color: var(--home-muted);
  font-size: var(--text-s);
}

/* step indicator: subtle, the current step in text colour */
.shop-flow .steps {
  justify-content: center;
  gap: var(--space-1) var(--space-6);
  margin-top: 0;
  margin-bottom: var(--space-5);
  color: var(--home-muted);
  font-size: var(--text-s);
  letter-spacing: 0.02em;
}
.shop-flow .steps li::before {
  color: var(--home-divider-strong);
}
/* the current step: text colour and a thin line, no heavy weight */
.shop-flow .steps li[aria-current='step'] {
  color: var(--home-text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--home-text);
  text-underline-offset: 8px;
}
.shop-flow .steps li[aria-current='step']::before {
  color: var(--home-muted);
}

/* one calm message style (status, notices, errors, warnings) */
.shop-flow .flow-message,
.shop-flow .notice,
.shop-flow .warning {
  margin-top: 0;
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--home-border);
  border-left: 3px solid var(--home-divider-strong);
  border-radius: var(--radius-m);
  background: var(--home-surface);
  color: var(--home-text);
  font-size: var(--text-s);
  font-weight: 400;
}
.shop-flow .flow-message.is-error,
.shop-flow .flow-message.is-warning,
.shop-flow .warning {
  border-left-color: var(--error);
}
.shop-flow .review-block .notice,
.shop-flow .review-block .warning {
  margin: var(--space-4) 0 var(--space-2);
}

/* primary action: same light family as Add to cart (also for links) */
.shop-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border: 1px solid var(--buy-cta-border);
  border-radius: var(--radius-m);
  background: var(--buy-cta-bg);
  color: var(--buy-cta-fg);
  font: inherit;
  font-size: var(--text-s);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}
.shop-button:hover {
  border-color: var(--buy-cta-hover-border);
  background: var(--buy-cta-hover-bg);
  color: var(--buy-cta-hover-fg);
}
.shop-button .flow-add-arrow svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* secondary action: the light navigation-button family */
.shop-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border: 1px solid var(--nav-cta-border);
  border-radius: var(--radius-m);
  background: var(--nav-cta-bg);
  color: var(--nav-cta-fg);
  font: inherit;
  font-size: var(--text-s);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.shop-button-secondary:hover {
  border-color: var(--nav-cta-hover-border);
  background: var(--nav-cta-hover-bg);
  color: var(--nav-cta-hover-fg);
}
/* quiet text action (Remove, Empty cart, Back, Edit) */
.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: var(--home-muted);
  font: inherit;
  font-size: var(--text-s);
  text-decoration: underline;
  text-decoration-color: var(--home-divider-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-quiet:hover {
  color: var(--home-text);
  text-decoration-color: currentColor;
}
.shop-button:focus-visible,
.shop-button-secondary:focus-visible,
.link-quiet:focus-visible,
.shop-flow a:focus-visible,
.shop-flow input:focus-visible,
.shop-flow select:focus-visible,
.shop-flow textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* cart */
.cart-empty {
  text-align: center;
}
.cart-empty p {
  margin: 0 0 var(--space-5);
  color: var(--home-muted);
}
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: var(--space-6);
}
.home-card.cart-items {
  display: block;
  margin: 0;
  padding: var(--space-2) var(--space-6);
  list-style: none;
  box-shadow: var(--home-shadow-flat);
}
.shop-flow .cart-item {
  min-width: 0;
  padding: var(--space-5) 0;
  border: 0;
  border-radius: 0;
}
.shop-flow .cart-item + .cart-item {
  border-top: 1px solid var(--home-divider);
}
.shop-flow .cart-item.unavailable {
  opacity: 0.7;
}
.shop-flow .cart-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2) var(--space-5);
}
.cart-item-name {
  min-width: 0;
}
.shop-flow .cart-item h2 {
  margin: 0;
  color: var(--home-text);
  font-size: var(--text-l);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.shop-flow .cart-item h2 a {
  color: inherit;
  text-decoration: none;
}
.shop-flow .cart-item h2 a:hover {
  text-decoration: underline;
}
.shop-flow .cart-item-product {
  margin: 2px 0 0;
  color: var(--home-muted);
  font-size: var(--text-s);
}
/* configuration: one quiet line ("Perpetual license · incl. SMP (1 year)") */
.shop-flow .cart-item .details {
  display: flex;
  flex-wrap: wrap;
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
  color: var(--home-muted);
  font-size: var(--text-s);
}
.shop-flow .cart-item .details li + li::before {
  content: '·';
  margin: 0 var(--space-2);
}
.shop-flow .item-total {
  margin: 0;
  color: var(--home-text);
  font-family: var(--price-font);
  font-size: var(--price-card-size);
  font-weight: var(--price-card-weight);
  font-variant-numeric: var(--price-numerals);
  white-space: nowrap;
}
.shop-flow .item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-3);
}
.cart-qty-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0;
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--home-text);
  font-size: var(--text-s);
}
.cart-remove-form,
.cart-clear-form {
  margin: 0;
}
.home-card.cart-summary {
  position: sticky;
  top: var(--space-5);
  display: grid;
  gap: var(--space-3);
  padding: var(--space-6);
  border-top: 1px solid var(--home-border);
}
.shop-flow .cart-summary .subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0;
  color: var(--home-text);
  font-size: var(--text-m);
}
.shop-flow .cart-summary .subtotal strong {
  font-family: var(--price-font);
  font-size: var(--price-total-size);
  font-weight: var(--price-total-weight);
  font-variant-numeric: var(--price-numerals);
  white-space: nowrap;
}
.shop-flow .cart-note {
  margin: 0;
}
.cart-actions {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.cart-actions .cart-clear-form {
  justify-self: center;
}

/* price tables (cart breakdown, review, confirmation): light and compact */
.shop-flow .table-wrap {
  margin: var(--space-3) 0 0;
}
.shop-flow table.prices {
  min-width: 420px;
  color: var(--home-text);
  font-size: var(--text-s);
}
.shop-flow table.prices th,
.shop-flow table.prices td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--home-divider);
}
.shop-flow table.prices th:first-child,
.shop-flow table.prices td:first-child {
  padding-left: 0;
}
.shop-flow table.prices th:last-child,
.shop-flow table.prices td:last-child {
  padding-right: 0;
}
.shop-flow table.prices thead th {
  background: none;
  color: var(--home-muted);
  font-size: var(--text-xs);
  font-weight: 500;
}
.shop-flow table.prices tbody th {
  font-weight: 500;
}
.shop-flow table.prices .num {
  font-family: var(--price-font);
  font-variant-numeric: var(--price-numerals);
}
.shop-flow table.prices tr.child th {
  padding-left: var(--space-4);
  color: var(--home-muted);
  font-weight: 400;
}
.shop-flow .line-details {
  color: var(--home-muted);
  font-size: var(--text-xs);
}
.shop-flow table.prices tfoot th,
.shop-flow table.prices tfoot td {
  border-bottom: 0;
  font-weight: 400;
}
.shop-flow table.prices tfoot tr.total th,
.shop-flow table.prices tfoot tr.total td {
  border-top: 1px solid var(--home-divider-strong);
  font-size: var(--text-m);
}
.shop-flow table.prices tfoot tr.total strong {
  font-size: var(--price-total-size);
  font-weight: var(--price-total-weight);
}
.shop-flow table.cart-lines {
  min-width: 360px;
}

/* checkout form: one card, sections separated by quiet dividers */
.shop-flow .checkout-form {
  display: block;
  padding: var(--space-6);
  box-shadow: var(--home-shadow-flat);
}
.shop-flow .checkout-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.shop-flow .checkout-form fieldset + fieldset {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--home-divider);
}
.shop-flow .checkout-form legend {
  float: left;
  width: 100%;
  margin: 0 0 var(--space-2);
  padding: 0;
  color: var(--home-text);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.shop-flow .checkout-form legend + * {
  clear: left;
}
.shop-flow .field {
  margin-top: var(--space-3);
}
.shop-flow .field label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--home-text);
  font-size: var(--text-s);
  font-weight: 500;
}
.shop-flow .field input[type='text'],
.shop-flow .field input[type='email'],
.shop-flow .field input[type='tel'],
.shop-flow .field input[type='password'],
.shop-flow .field select,
.shop-flow .field textarea,
.shop-flow input[type='number'] {
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border: 1px solid var(--home-border-hover);
  border-radius: var(--radius-m);
  background: var(--home-surface);
  color: var(--home-text);
  font: inherit;
  font-size: var(--text-m);
}
.shop-flow .field textarea {
  padding: var(--space-2) var(--space-3);
}
.shop-flow input[type='number'] {
  width: 5em;
  text-align: center;
}
.shop-flow .field-row {
  gap: 0 var(--space-4);
}
.shop-flow .field.has-error input,
.shop-flow .field.has-error select,
.shop-flow .field.has-error textarea {
  border-color: var(--error);
}
.shop-flow .field-error {
  margin: var(--space-1) 0 0;
  color: var(--error);
  font-size: var(--text-s);
}
.shop-flow .field-hint,
.shop-flow .field-note {
  margin: var(--space-1) 0 0;
}
.shop-flow .field-note {
  margin-top: var(--space-3);
}
.shop-flow .req {
  color: var(--home-muted);
}
/* show / hide password (D-103): eye button inside the field, 44 px target */
.password-field {
  position: relative;
  display: block;
}
.shop-flow .password-field input[type='password'],
.shop-flow .password-field input[type='text'] {
  width: 100%;
  padding-right: calc(var(--tap) + var(--space-1));
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: var(--radius-m);
  background: transparent;
  color: var(--home-muted);
  cursor: pointer;
}
.password-toggle:hover {
  color: var(--home-text);
}
.password-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* payment method: chosen on the billing step, shown read only on the review (D-102) */
.shop-flow .payment-method-fieldset .buy-choices {
  margin-top: var(--space-2);
}
.shop-flow .payment-method-fieldset .field-error {
  margin: 0 0 var(--space-2);
}
.shop-flow .payment-method-chosen {
  margin: 0;
  color: var(--home-text);
  font-weight: 500;
}
.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-5);
}

/* shop information pages (legal disclosure, contact; D-093): same narrow
   column, card and message styles as the checkout */
.shop-flow .info-card,
.shop-flow .info-actions {
  max-width: var(--flow-narrow);
  margin-left: auto;
  margin-right: auto;
}
.shop-flow .info-card {
  display: block;
  padding: var(--space-6);
  box-shadow: var(--home-shadow-flat);
}
.shop-flow .info-card section + section {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--home-divider);
}
.shop-flow .info-title {
  margin: 0 0 var(--space-2);
  color: var(--home-text);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.shop-flow .info-card p {
  margin: 0;
  color: var(--home-text);
}
.shop-flow .info-card a {
  color: var(--home-text);
  text-underline-offset: 3px;
}
.shop-flow .info-card p + p,
.shop-flow .info-card p + .info-list,
.shop-flow .info-card .info-list + p {
  margin-top: var(--space-2);
}
.shop-flow .info-list {
  margin: 0;
  padding-left: 1.25em;
  color: var(--home-text);
}
.shop-flow .info-list li + li {
  margin-top: var(--space-1);
}
.shop-flow .info-card p.info-note {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--home-divider);
  color: var(--home-muted);
  font-size: var(--text-s);
}
.shop-flow .info-card p.info-basis {
  color: var(--home-muted);
  font-size: var(--text-s);
}
.shop-flow .legal-address {
  font-style: normal;
}
.shop-flow .legal-address,
.shop-flow .legal-lines {
  display: grid;
  gap: 2px;
  color: var(--home-text);
}
.shop-flow .legal-address .info-company {
  font-weight: 500;
}
.shop-flow .info-note a,
.shop-flow .place-terms a {
  overflow-wrap: anywhere;
}
.shop-flow .place-terms a {
  color: inherit;
  text-underline-offset: 3px;
}
.shop-flow .info-card a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* subtle link to an information page below a purchase-page intro (consulting) */
.flow-info-link {
  margin: var(--space-2) 0 0;
  font-size: var(--text-s);
}
.flow-info-link a {
  color: var(--home-muted);
  text-decoration: underline;
  text-decoration-color: var(--home-divider-strong);
  text-underline-offset: 3px;
}
.flow-info-link a:hover {
  color: var(--home-text);
}
.flow-info-link a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.shop-flow .contact-form .field input[type='text'],
.shop-flow .contact-form .field input[type='email'],
.shop-flow .contact-form .field select,
.shop-flow .contact-form .field textarea {
  width: 100%;
}
.shop-flow .contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

/* review and confirmation blocks */
.shop-flow .home-card.review-block {
  display: block;
  margin-top: 0;
  margin-bottom: var(--space-4);
  padding: var(--space-6);
  box-shadow: var(--home-shadow-flat);
}
.shop-flow .review-block h2 {
  margin: 0 0 var(--space-3);
  color: var(--home-text);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.review-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 var(--space-4);
}
.review-head .link-quiet {
  min-height: 0;
}
.shop-flow address {
  color: var(--home-text);
}
.shop-flow .facts {
  margin: var(--space-3) 0 0;
  font-size: var(--text-s);
}
.shop-flow .facts dt {
  color: var(--home-muted);
}
.shop-flow .order-number {
  font-family: var(--price-font);
  font-size: var(--text-l);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.shop-flow .payment-state.state-paid {
  color: var(--home-text);
}
.shop-flow .home-card.place-order {
  display: grid;
  gap: var(--space-3);
  margin-top: 0;
  padding: var(--space-6);
  border-top: 1px solid var(--home-border);
}
.place-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
  color: var(--home-text);
}
.place-total strong {
  font-family: var(--price-font);
  font-size: var(--price-total-size);
  font-weight: var(--price-total-weight);
  font-variant-numeric: var(--price-numerals);
}
.shop-flow .b2b-notice {
  margin: 0;
  color: var(--home-text);
  font-size: var(--text-s);
  font-weight: 500;
}

/* payment methods: one row per method – name and its action */
.pay-options {
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}
.pay-option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--home-divider);
}
.pay-option-name {
  color: var(--home-text);
  font-weight: 500;
}
.pay-option-form {
  margin: 0;
}
.pay-option .shop-button,
.pay-option .shop-button-secondary {
  min-width: 13rem;
}
.order-continue {
  text-align: center;
}

@media (max-width: 1023px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-card.cart-summary {
    position: static;
  }
}
@media (max-width: 639px) {
  .home-card.cart-items,
  .home-card.cart-summary,
  .shop-flow .checkout-form,
  .shop-flow .home-card.review-block,
  .shop-flow .home-card.place-order {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }
  .pay-option .shop-button,
  .pay-option .shop-button-secondary,
  .pay-option-form {
    width: 100%;
  }
  /* price tables stack per line: name, then "quantity × unit price … total" */
  .shop-flow table.prices,
  .shop-flow table.prices tbody,
  .shop-flow table.prices tfoot {
    display: block;
    min-width: 0;
  }
  .shop-flow table.prices thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .shop-flow table.prices tbody tr {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 2px var(--space-2);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--home-divider);
  }
  .shop-flow table.prices tbody th,
  .shop-flow table.prices tbody td {
    padding: 0;
    border: 0;
  }
  .shop-flow table.prices tbody th {
    grid-column: 1 / -1;
  }
  .shop-flow table.prices tbody td {
    color: var(--home-muted);
  }
  .shop-flow table.prices tbody td:first-of-type::after {
    content: ' ×';
  }
  .shop-flow table.prices tbody td:last-child {
    color: var(--home-text);
    text-align: right;
  }
  .shop-flow table.prices tr.child th,
  .shop-flow table.prices tr.child td:first-of-type {
    padding-left: var(--space-3);
  }
  .shop-flow table.prices tfoot tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
  }
  .shop-flow table.prices tfoot th,
  .shop-flow table.prices tfoot td {
    padding: var(--space-2) 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shop-button {
    transition: none;
  }
}

/* Customer account (D-096): login, registration, password reset, overview,
   profile, order history and order detail in the light shop design. Same
   cards, form and message styles as the checkout; no dashboard UI. */
.shop-flow .account-form,
.shop-flow.account-auth .flow-message,
.shop-flow .account-alt {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.shop-flow .account-alt {
  margin-top: var(--space-5);
  color: var(--home-muted);
  font-size: var(--text-s);
  text-align: center;
}
.shop-flow .account-alt a,
.shop-flow.order-detail .muted a {
  color: var(--home-text);
  text-underline-offset: 3px;
}
.shop-flow .account-form .field input {
  width: 100%;
}
.shop-flow .account-actions,
.shop-flow .account-nav,
.shop-flow .account-logout,
.shop-flow .account-empty,
.shop-flow .order-list,
.shop-flow.order-detail .flow-message,
.shop-flow.order-detail .flow-net {
  max-width: var(--flow-narrow);
  margin-left: auto;
  margin-right: auto;
}
.shop-flow .account-actions {
  justify-content: center;
}
.shop-flow .account-summary {
  display: grid;
  justify-items: center;
  gap: 2px;
  overflow-wrap: anywhere;
}
.shop-flow .account-company {
  color: var(--home-text);
}
.shop-flow .account-email {
  margin: 0;
  color: var(--home-text);
  overflow-wrap: anywhere;
}
.shop-flow .wrap-anywhere {
  overflow-wrap: anywhere;
}

/* overview: two navigation rows and the logout action */
.shop-flow .account-nav {
  display: grid;
  gap: var(--space-4);
  padding: 0;
  list-style: none;
}
.shop-flow .home-card.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-5);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--home-shadow-flat);
}
.shop-flow .account-row-title {
  margin: 0;
  color: var(--home-text);
  font-size: var(--text-l);
  font-weight: 500;
}
.shop-flow .account-row-title a {
  color: inherit;
  text-decoration: none;
}
.shop-flow .account-row-text {
  grid-column: 1;
  margin: 0;
  color: var(--home-muted);
  font-size: var(--text-s);
}
.shop-flow .account-row .home-cta {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.shop-flow .account-logout {
  margin-top: var(--space-6);
  text-align: center;
}

/* order history: one row per order, stacked facts */
.shop-flow .account-empty {
  display: block;
  padding: var(--space-7) var(--space-6);
  box-shadow: var(--home-shadow-flat);
  text-align: center;
}
.shop-flow .account-empty h2 {
  margin: 0 0 var(--space-2);
  color: var(--home-text);
  font-size: var(--text-l);
  font-weight: 500;
}
.shop-flow .account-empty p {
  margin: 0 0 var(--space-5);
  color: var(--home-muted);
}
.shop-flow .home-card.order-list {
  display: block;
  /* a little wider than the reading column so date and statuses stay on one line */
  max-width: 960px;
  margin-top: 0;
  padding: var(--space-2) var(--space-6);
  box-shadow: var(--home-shadow-flat);
}
.shop-flow .order-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
/* number | date | order status | payment status | total | details */
.shop-flow .order-rows-head,
.shop-flow .order-row {
  display: grid;
  /* fixed outer columns: header and rows are separate grids and must line up */
  grid-template-columns: 9.5rem minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 6.5rem 6.5rem;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}
.shop-flow .order-rows-head {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--home-divider);
  color: var(--home-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.shop-flow .order-rows-head .num {
  text-align: right;
}
.shop-flow .order-row {
  padding: var(--space-4) 0;
}
.shop-flow .order-row + .order-row {
  border-top: 1px solid var(--home-divider);
}
.shop-flow .order-row-number {
  margin: 0;
  font-family: var(--price-font);
  font-size: var(--text-m);
  font-weight: 600;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.shop-flow .order-row-number a {
  color: var(--home-text);
  text-underline-offset: 3px;
}
.shop-flow .order-row-tag {
  display: block;
  color: var(--home-muted);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0;
}
.shop-flow .order-row-facts {
  display: grid;
  grid-column: 2 / 6;
  grid-template-columns: subgrid;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  font-size: var(--text-s);
}
/* desktop: the column header names the values; the labels stay for screen readers */
.shop-flow .order-row-facts dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.shop-flow .order-row-total dd {
  text-align: right;
}
.shop-flow .order-row-facts dd {
  margin: 0;
  color: var(--home-text);
}
.shop-flow .order-row-total dd {
  font-weight: 600;
}

/* order detail: stacked lines, totals, facts */
.shop-flow.order-detail .flow-title {
  overflow-wrap: anywhere;
}
.shop-flow.order-detail .flow-title .order-number {
  font: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
}
.shop-flow .order-detail-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}
.shop-flow .order-detail-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-5);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--home-divider);
}
.shop-flow .order-detail-line.child {
  padding-left: var(--space-5);
}
.shop-flow .order-detail-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.shop-flow .order-detail-title {
  display: block;
  color: var(--home-text);
  font-weight: 500;
}
.shop-flow .order-detail-name .line-details {
  display: block;
  color: var(--home-muted);
  font-size: var(--text-s);
}
.shop-flow .order-detail-figures {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: var(--space-1) var(--space-5);
  margin: 0;
  font-size: var(--text-s);
  text-align: right;
}
.shop-flow .order-detail-figures dt {
  color: var(--home-muted);
  font-size: var(--text-xs);
}
.shop-flow .order-detail-figures dd {
  margin: 0;
  color: var(--home-text);
}
.shop-flow .order-detail-totals {
  display: grid;
  gap: var(--space-1);
  max-width: 360px;
  margin: var(--space-4) 0 0 auto;
}
.shop-flow .order-detail-totals > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
}
.shop-flow .order-detail-totals dt {
  color: var(--home-muted);
}
.shop-flow .order-detail-totals dd {
  margin: 0;
  color: var(--home-text);
}
.shop-flow .order-detail-totals .total {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--home-divider);
}
.shop-flow .order-detail-totals .total dt {
  color: var(--home-text);
  font-weight: 600;
}
.shop-flow.order-detail .review-block .flow-message {
  margin: var(--space-4) 0 0;
}

@media (max-width: 767px) {
  .shop-flow .order-rows-head {
    display: none;
  }
  .shop-flow .order-row {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-5) 0;
  }
  .shop-flow .order-row-facts {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-flow .order-row-facts dt {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    color: var(--home-muted);
    font-size: var(--text-xs);
  }
  .shop-flow .order-row-total dd {
    text-align: left;
  }
  .shop-flow .order-row-link {
    justify-self: start;
  }
  .shop-flow .order-detail-line {
    grid-template-columns: minmax(0, 1fr);
  }
  .shop-flow .order-detail-figures {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
    text-align: left;
  }
  .shop-flow .order-detail-figures > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
  }
  .shop-flow .order-detail-figures dt {
    font-size: var(--text-s);
  }
  .shop-flow .order-detail-totals {
    max-width: none;
  }
}
@media (max-width: 639px) {
  .shop-flow .home-card.account-row,
  .shop-flow .home-card.order-list,
  .shop-flow .account-empty {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }
}
