/* The Round: components shared by the hub and every site. */

/* ---------- Header: a solid ground, a hairline once scrolled ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: var(--header-h);
  padding: 0 var(--gutter);
  background: var(--ground);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-swap) ease-out;
  view-transition-name: site-header;
}
html.is-scrolled .site-header { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); min-height: var(--target); text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; transition: transform var(--t-turn) var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(30deg); }
.brand-name { font-family: var(--face-family); font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--face-text); font-weight: 450; font-size: 0.8125rem; color: var(--ink-2); letter-spacing: 0; }
.header-nav { display: flex; align-items: center; gap: var(--s-2); }
.header-link {
  display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--s-3);
  font-weight: 550; font-size: 0.9375rem; text-decoration: none; color: var(--ink); border-radius: var(--radius-pill);
  background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: var(--s-3) calc(100% - 10px);
  transition: background-size var(--t-slide) var(--ease-out);
}
.header-link:hover { background-size: calc(100% - 2 * var(--s-3)) 1px; }
.header-link:active { transform: scale(.97); }
.theme-toggle {
  display: inline-grid; place-items: center; width: var(--target); height: var(--target);
  border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink);
}
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; transition: transform var(--t-slide) var(--ease-out), opacity var(--t-swap) ease-out; }
.theme-toggle .moon { opacity: 0; transform: rotate(-90deg); }
.theme-toggle[aria-pressed="true"] .sun { opacity: 0; transform: rotate(90deg); }
.theme-toggle[aria-pressed="true"] .moon { opacity: 1; transform: none; }
.theme-toggle:active { transform: scale(.94); }
.seal-mini .scallop { stroke-width: 34; }
.seal-mini .ring-line { stroke-width: 26; }
.seal-mini use { color: var(--ink); }

/* ---------- The call, buttons, chips ---------- */
.call {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  min-height: 52px; padding: 0 var(--s-5) 0 var(--s-6);
  background: var(--call); color: var(--call-ink);
  border-radius: var(--radius-pill); border: 0;
  font-family: var(--face-family); font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.005em;
  text-decoration: none;
  transition: background-color var(--t-swap) ease-out, transform var(--t-press) ease-out;
}
.call svg { width: 18px; height: 18px; transition: transform var(--t-swap) var(--ease-out); }
.call:hover { background: var(--call-deep); }
.call:hover svg { transform: translateX(3px); }
.call:active { transform: scale(.97); }
.call:focus-visible { outline-color: var(--ink); }
.call-note { font-size: var(--step-small); color: var(--ink-2); margin-top: var(--s-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--target); padding: 0 var(--s-5);
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink); font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  transition: background-color var(--t-swap) ease-out, transform var(--t-press) ease-out, border-color var(--t-swap);
}
.btn:hover { background: var(--ground-raised); border-color: var(--ink); }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: var(--target); padding: 0 var(--s-4);
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink); font-weight: 550; font-size: 0.9375rem;
  transition: background-color var(--t-swap) ease-out, color var(--t-swap) ease-out, transform var(--t-press) ease-out;
}
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* A two-way switch with a highlight that slides between its halves. */
.switch { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--ground); }
.switch::before { content: ""; position: absolute; inset: 4px auto 4px 4px; width: calc(50% - 4px); border-radius: var(--radius-pill); background: var(--ink); transition: transform var(--t-slide) var(--ease-out); }
.switch[data-on="1"]::before { transform: translateX(100%); }
.switch button { position: relative; min-height: 40px; padding: 0 var(--s-4); border: 0; background: transparent; border-radius: var(--radius-pill); font-weight: 600; font-size: 0.875rem; color: var(--ink); transition: color var(--t-swap) ease-out; white-space: nowrap; }
.switch button[aria-pressed="true"] { color: var(--ground); }
@media (any-pointer: coarse) { .switch button { min-height: var(--target); } }

/* ---------- Prices and labels ---------- */
.price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s-2); row-gap: 2px; }
.price-item { font-weight: 600; }
.price-label { font-size: var(--step-quiet); font-weight: 550; letter-spacing: 0.04em; color: var(--ink-2); white-space: nowrap; }
.price-note, .legal-line { font-size: var(--step-quiet); color: var(--ink-2); line-height: 1.45; }
.legal-line a { color: inherit; }
.example-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step-quiet); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.example-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.caption { font-size: var(--step-quiet); color: var(--ink-2); margin-top: var(--s-2); }
.caps { font-family: var(--face-family); font-size: 0.75rem; font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2); }

/* ---------- Footer: the small print row, every link a 44 px row ---------- */
.site-footer { border-top: 1px solid var(--line); padding: var(--s-6) var(--gutter) calc(var(--s-6) + env(safe-area-inset-bottom)); display: grid; gap: var(--s-4); grid-template-columns: 1fr auto; align-items: center; }
.site-footer .who { font-family: var(--face-family); font-weight: 600; }
.site-footer .who span { display: block; font-family: var(--face-text); font-weight: 400; color: var(--ink-2); font-size: var(--step-small); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-2); justify-content: flex-end; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--s-3); font-size: var(--step-small); text-decoration: none; border-radius: 8px; }
.footer-links a:hover { text-decoration: underline; }
@media (max-width: 719px) {
  .site-footer { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; flex-direction: column; margin-left: calc(-1 * var(--s-3)); }
}

/* ---------- The ring, drawn: shared by the seal, every dial and the small print ---------- */
.scallop { fill: none; stroke: var(--seal); stroke-width: 2.6; }
.ring-line { fill: none; stroke: var(--ink); stroke-width: 3; }
.inner-line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.bezel { fill: none; stroke: var(--ink-2); stroke-width: 1.6; }
.rim-name { font-family: var(--face-family); font-size: 25px; font-weight: 600; letter-spacing: 0.3em; fill: var(--ink); transition: fill var(--t-swap) ease-out; }
.arc-label { font-family: var(--face-family); font-size: 19px; font-weight: 500; letter-spacing: 0.34em; fill: var(--ink-2); }
.unit-label { font-family: var(--face-family); font-size: 22px; font-weight: 600; letter-spacing: 0.16em; fill: var(--ink-2); }
.pat { color: var(--area); }
.seg-arc { fill: none; stroke: var(--area); stroke-width: 4; stroke-linecap: butt; }
.seg-arc-lit { fill: none; stroke: var(--area); stroke-width: 10; opacity: var(--lit, 0); transition: opacity var(--t-swap) ease-out; }
.seg-tex { opacity: calc(var(--lit, 0) * 0.3); transition: opacity var(--t-swap) ease-out; }
.seg-hit { fill: transparent; }
.seg-mark .major { stroke: var(--area); stroke-width: 5; }
.seg-mark .dot { fill: var(--area); transform-box: fill-box; transform-origin: center; transform: scale(calc(1 + var(--lit, 0) * 0.6)); transition: transform var(--t-swap) var(--ease-out); }

/* A dial: one ring per screen, the family named on its rim. */
.dial { position: relative; container-type: inline-size; aspect-ratio: 1; width: 100%; view-transition-name: dial; }
.dial > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial-centre { position: absolute; inset: 22%; display: grid; place-content: center; text-align: center; gap: var(--s-2); }
.dial-reading { font-family: var(--face-display); font-weight: 650; font-size: clamp(1.5rem, 9cqi, 3.5rem); line-height: 1; letter-spacing: var(--track-display); }
.dial-sub { font-size: clamp(0.8125rem, 2.6cqi, 1rem); color: var(--ink-2); }
.dial-neighbour { position: absolute; top: 9%; display: inline-flex; align-items: center; gap: 4px; min-height: var(--target); padding: 0 var(--s-3); font-family: var(--face-family); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); border-radius: var(--radius-pill); background: var(--ground); transition: transform var(--t-swap) var(--ease-out), color var(--t-swap); }
.dial-neighbour--prev { left: 3%; }
.dial-neighbour--next { right: 3%; }
.dial-neighbour:hover { color: var(--ink); }
.dial-neighbour--prev:hover { transform: translateX(-4px); }
.dial-neighbour--next:hover { transform: translateX(4px); }

/* ---------- The reading card and rows ---------- */
.row {
  position: relative; display: grid; grid-template-columns: 14px 1fr auto; column-gap: var(--s-3); align-items: start;
  padding: var(--s-4) var(--s-2) var(--s-4) 0; min-height: 56px;
  text-decoration: none; color: var(--ink); border-top: 1px solid var(--line);
  transition: background-color var(--t-swap) ease-out;
}
.row:active { background: var(--ground-raised); }
.row-mark { width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; border: 3px solid var(--area); }
.row-name { font-family: var(--face-family); font-weight: 650; font-size: 1.1875rem; line-height: 1.2; }
.row-line { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.4; margin-top: 2px; }
.row .price { margin-top: var(--s-2); font-size: 0.9375rem; }
.row-go { align-self: center; width: 20px; height: 20px; color: var(--ink-2); }

/* ---------- The dock (phone): the family arc, tap only, above the home indicator ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; gap: var(--s-2); align-items: center; justify-content: space-between;
  padding: var(--s-2) var(--s-3) calc(var(--s-2) + env(safe-area-inset-bottom));
  background: var(--ground); border-top: 1px solid var(--line);
  touch-action: manipulation;
  transform: translateY(110%); visibility: hidden;
  transition: transform 280ms var(--ease-out), visibility 0s linear 280ms;
}
html.dock-on .dock { transform: none; visibility: visible; transition: transform 280ms var(--ease-out), visibility 0s; }
html.dock-on { --dock-h: 68px; }
.dock-ring { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-4) 0 var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--ground); font-weight: 600; font-size: 0.9375rem; }
.dock-ring svg { width: 32px; height: 32px; }
.dock-ring:active, .dock .call:active { transform: scale(.97); }
.dock .call { min-height: 48px; padding: 0 var(--s-4); font-size: 0.9375rem; }
.dock-side { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s-2); font-size: 0.875rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
@media (min-width: 720px) { .dock--phone { display: none; } html.dock-on { --dock-h: 0px; } }

/* ---------- The ring bloom: all nine in one tap ---------- */
.bloom { width: min(100vw, 460px); max-width: 100vw; max-height: 100svh; margin: auto auto 0; padding: var(--s-5) var(--s-3) calc(var(--s-5) + env(safe-area-inset-bottom)); border: 0; border-radius: 24px 24px 0 0; background: var(--ground); color: var(--ink); box-shadow: 0 -12px 40px rgb(0 0 0 / .18); }
.bloom::backdrop { background: color-mix(in srgb, var(--ink-family) 38%, transparent); }
.bloom-head { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--s-2) var(--s-3); }
.bloom-title { font-family: var(--face-family); font-weight: 650; font-size: 1.125rem; }
.bloom-ring { position: relative; width: 100%; aspect-ratio: 1; max-width: 400px; margin: 0 auto; container-type: inline-size; }
.bloom-ring::before { content: ""; position: absolute; inset: 21%; border-radius: 50%; border: 1.5px solid var(--ink); }
.bloom-ring::after { content: ""; position: absolute; inset: 17%; border-radius: 50%; border: 2px dotted var(--seal); }
.bloom-centre { position: absolute; inset: 30%; display: grid; place-content: center; text-align: center; gap: 6px; z-index: 1; }
.bloom-centre a { font-weight: 600; font-size: 0.875rem; min-height: var(--target); display: inline-flex; align-items: center; justify-content: center; }
.bloom-door {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 84px; min-height: var(--target); padding: 0 10px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--ground);
  font-family: var(--face-family); font-weight: 650; font-size: 0.875rem; text-decoration: none; color: var(--ink);
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(-36cqi) rotate(calc(-1 * var(--a)));
}
.bloom-door::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--area); }
.bloom-door:active { background: var(--area-tint); }
.bloom[open] .bloom-door { animation: bloom-in 360ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes bloom-in { from { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(-20cqi) rotate(calc(-1 * var(--a))) scale(.6); } }
@media (prefers-reduced-motion: reduce) { .bloom[open] .bloom-door { animation: bloom-fade 180ms ease-out both; } @keyframes bloom-fade { from { opacity: 0; } } }

/* ---------- The small print: one calm column, the ring stood down to a circle ---------- */
.print { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); padding: var(--s-7) var(--gutter) var(--s-8); max-width: 1180px; margin: 0 auto; }
@media (min-width: 960px) { .print { grid-template-columns: 240px minmax(0, var(--measure)); justify-content: center; } }
.print-circle { position: sticky; top: calc(var(--header-h) + var(--s-6)); align-self: start; }
.print-circle svg { width: 160px; height: 160px; }
.print-body h1 { font-size: var(--step-1); margin-bottom: var(--s-5); }
.print-body h2 { font-size: var(--step-2); margin: var(--s-7) 0 var(--s-3); }
.print-body p, .print-body li { margin-bottom: var(--s-3); max-width: var(--measure); }
.print-body ul, .print-body ol { padding-left: 1.2em; }
@media (max-width: 959px) { .print-circle { position: static; } .print-circle svg { width: 72px; height: 72px; } }
.dock-ring .dock-seal { stroke: var(--seal); }
