/* Service pages: the page owns its service colour. */
.svc-hero { border-bottom: var(--rule); color: var(--paper); }
.svc-hero-x { background: var(--x); }
.svc-hero-y { background: var(--y); }
.svc-hero-z { background: var(--z); color: var(--ink); }
.svc-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding-block: clamp(48px, 7vw, 104px); }
.svc-hero-copy { display: grid; gap: 22px; }
.svc-hero .lede { color: inherit; opacity: 0.92; }
.svc-hero :focus-visible { outline-color: var(--paper); }
.svc-hero-z :focus-visible { outline-color: var(--ink); }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 6px; }
.hero-sub { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.svc-hero-art { justify-self: center; width: min(100%, 420px); }
.svc-hero-art .glyph { width: 100%; margin: 0; }
.svc-hero-x .g-dot { fill: var(--z); }

/* What it covers: a ruled list; the heading carries the weight, the line explains. */
.covers-grid { list-style: none; display: grid; border-top: var(--rule); }
.covers-grid li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px clamp(24px, 4vw, 64px); align-items: baseline; padding-block: 22px; border-bottom: var(--hair); }
.covers-grid h3 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.2rem); }
.covers-grid p { color: var(--ink-2); font-size: var(--text-lg); max-width: 52ch; }
.covers-x li:hover h3 { color: var(--x); }
.covers-y li:hover h3 { color: var(--y); }

/* Toolbox: a ruled grid, three across. A card with its own service page carries a band of the
   service colour along its top edge and a solid marker; guides and tools an outlined one. */
.tb-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule); border-bottom: var(--rule); }
.tb-grid li { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; padding: 26px clamp(16px, 2vw, 28px) 22px; }
.tb-grid li:not(:nth-child(3n + 1)) { border-inline-start: var(--hair); }
.tb-grid li:nth-child(n + 4) { border-top: var(--hair); }
.tb-grid h3 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem); }
.tb-grid h3 a::after { content: ''; position: absolute; inset: 0; }
.tb-grid h3 a:focus-visible { outline: 0; }
.tb-grid li:has(a:focus-visible) { outline: 3px solid var(--y); outline-offset: -3px; }
.tb-grid p { color: var(--ink-2); }
.tb-kind { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-xs); font-weight: 700; color: var(--ink-2); }
.tb-kind::before { content: ''; width: 10px; height: 10px; border: 2px solid var(--ink); flex: none; }
.tb-y .tb-kind::before, .tb-z .tb-kind::before { border-radius: 50%; }
.tb-x .tb-page { box-shadow: inset 0 8px 0 var(--x); }
.tb-y .tb-page { box-shadow: inset 0 8px 0 var(--y); }
.tb-z .tb-page { box-shadow: inset 0 8px 0 var(--z); }
.tb-x .tb-page .tb-kind::before { background: var(--x); border-color: var(--x); }
.tb-y .tb-page .tb-kind::before { background: var(--y); border-color: var(--y); }
.tb-z .tb-page .tb-kind::before { background: var(--z); border-color: var(--ink); }
.tb-go { font-weight: 700; }
.tb-grid li:hover { background: var(--g-50); }
.tb-x li:hover h3 { color: var(--x-700); }
.tb-y li:hover h3 { color: var(--y); }
.tb-z li:hover h3 a { text-decoration: underline; text-decoration-color: var(--z); text-decoration-thickness: 3px; }
.tb-grid li:hover .arrow { translate: 4px 0; }
[dir='rtl'] .tb-grid li:hover .arrow { translate: -4px 0; }

/* Example with its planning tool beside it. */
.example-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.tool { border: var(--rule); padding: clamp(20px, 2.4vw, 32px); display: grid; gap: 14px; position: sticky; top: 96px; }
.tool-x { box-shadow: inset 0 10px 0 var(--x); }
.tool-y { box-shadow: inset 0 10px 0 var(--y); }
.tool-z { box-shadow: inset 0 10px 0 var(--z); }
.tool h2 { font-size: var(--h3); padding-top: 8px; }
.tool > p { color: var(--ink-2); font-size: var(--text-sm); }
.tool-links { list-style: none; display: grid; gap: 10px; }
.tool-links a { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }

.ba { display: grid; gap: 14px; }
.ba-tabs { display: inline-flex; border: 2px solid var(--ink); justify-self: start; }
.ba-tabs button { min-height: 44px; min-width: 96px; padding: 8px 18px; border: 0; background: var(--paper); font: 700 var(--text-sm)/1 var(--text-font); color: var(--ink); cursor: pointer; }
.ba-tabs button + button { border-inline-start: 2px solid var(--ink); }
.ba-tabs button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }

/* Calculator */
.calc { display: grid; gap: 12px; }
.calc-field { display: grid; gap: 4px; font-size: var(--text-sm); font-weight: 700; }
.calc-field input { padding: 8px 12px; font-variant-numeric: tabular-nums; }
.calc-out { margin: 8px 0 0; display: grid; gap: 0; border-top: var(--rule); }
.calc-out div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-block: 10px; border-bottom: var(--hair); }
.calc-out dt { font-size: var(--text-sm); }
.calc-out dd { margin: 0; font: 400 1.6rem/1 var(--display); font-variant-numeric: tabular-nums; }
.calc-value { background: var(--z); margin-inline: -14px; padding: 14px !important; border-bottom: 0 !important; }
.calc-note { font-size: var(--text-xs); color: var(--ink-2); }

/* Examples: each row ends in a full-strength field that says how to check it. */
.work-list { list-style: none; display: grid; border-top: var(--rule); }
.work-list li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: 0 clamp(20px, 3vw, 40px); align-items: stretch; border-bottom: var(--rule); }
.work-list h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); padding-block: 26px; }
.work-list p { color: var(--ink-2); padding-block: 26px; }
.work-check { display: grid; align-content: center; gap: 4px; padding: 20px !important; color: var(--paper) !important; font-size: var(--text-sm); }
.work-check b { font-family: var(--display); font-weight: 400; font-size: var(--text-md); }
.work-x .work-check { background: var(--x); }
.work-y .work-check { background: var(--y); }
.work-z .work-check { background: var(--z); color: var(--ink) !important; }

.ai-link { background: var(--z-50); }
.ai-link-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.ai-link-row > div { display: grid; gap: 10px; max-width: 60ch; }
.ai-link-row p { font-size: var(--text-lg); color: var(--ink-2); }
.together-copy { display: grid; gap: 16px; align-content: start; }
.together-copy p { color: var(--ink-2); font-size: var(--text-lg); }

@media (max-width: 980px) {
  .svc-hero-grid, .example-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-hero-art { width: min(60%, 280px); justify-self: start; order: -1; }
  .tool { position: static; }
  .tb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-grid li:not(:nth-child(3n + 1)) { border-inline-start: 0; }
  .tb-grid li:nth-child(n + 4) { border-top: 0; }
  .tb-grid li:nth-child(even) { border-inline-start: var(--hair); }
  .tb-grid li:nth-child(n + 3) { border-top: var(--hair); }
  .work-list li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .work-check { grid-column: 1 / -1; margin-bottom: 20px; }
}
@media (max-width: 680px) {
  .svc-hero-grid { gap: 20px; padding-block: 32px 48px; }
  .svc-hero-art { width: 150px; }
  .covers-grid li, .work-list li { grid-template-columns: minmax(0, 1fr); }
  .tb-grid { grid-template-columns: minmax(0, 1fr); }
  .tb-grid li:nth-child(even) { border-inline-start: 0; }
  .tb-grid li:nth-child(n + 2) { border-top: var(--hair); }
  .work-list h3 { padding-block: 22px 6px; }
  .work-list p { padding-block: 0 16px; }
  .hero-actions .btn { width: 100%; }
}
