/*
 * Direction u: the paper. Base type, the ground and its fibre tile, links,
 * focus, browser surfaces, the header, the dock, the foot, page transitions
 * and the first frame after a hand-over. Copied unchanged by every site.
 */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ground);
  scroll-padding-bottom: calc(var(--dock-h) + 1rem);
  scroll-padding-top: 1rem;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--face-sans);
  font-size: var(--text-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
}
/* The paper's fibres: one static tile, coloured by the theme, never animated. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--fibre);
  -webkit-mask: url(/2026-10-10-round-2-h-areas/_assets/previews/u/style/system/patterns/fibre.1fb44c51fc.svg) repeat 0 0 / 240px 240px;
  mask: url(/2026-10-10-round-2-h-areas/_assets/previews/u/style/system/patterns/fibre.1fb44c51fc.svg) repeat 0 0 / 240px 240px;
}
[hidden] { display: none !important; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"], .plain-list { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--face-display); font-weight: 760; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
strong, b { font-weight: 650; }
::selection { background: var(--area, var(--ink)); color: var(--band-text); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
html { scrollbar-color: var(--crease) transparent; }
input, textarea { caret-color: var(--area, var(--ink)); accent-color: var(--area, var(--ink)); }
.tabular { font-variant-numeric: tabular-nums; }

/* Visually hidden, read aloud. */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s-4); top: -4rem; z-index: 60; padding: var(--s-3) var(--s-4); background: var(--sheet-raised); color: var(--ink); border: 1.5px solid var(--ink); border-radius: var(--radius-tag); font-weight: 600; }
.skip:focus-visible { top: var(--s-3); }

/* Caps label: the spaced capitals of her seal ring. */
.caps { font-family: var(--face-sans); font-size: var(--text-s); font-weight: 650; letter-spacing: var(--track-caps); text-transform: uppercase; line-height: 1.3; }
.small { font-size: var(--text-s); }
.quiet { color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.measure { max-width: var(--measure); }

/* The sheet frame: a page's width on the ground, with deliberate space round it. */
.frame { width: min(100% - 2 * var(--gutter), var(--sheet-max)); margin-inline: auto; }
.frame-narrow { width: min(100% - 2 * var(--gutter), 60rem); margin-inline: auto; }

/* ---- Header: her mark, the folder tab, the theme switch ---- */
.u-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  width: min(100% - 2 * var(--gutter), var(--sheet-max));
  margin-inline: auto;
  padding-block: var(--s-4) var(--s-3);
  view-transition-name: u-header;
}
.u-brand { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 44px; text-decoration: none; color: var(--ink); }
.u-brand-mark { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; }
.u-brand-mark svg { width: 21px; height: 25px; }
.u-brand-name { display: grid; line-height: 1.15; }
.u-brand-name b { font-family: var(--face-display); font-size: 1.125rem; font-weight: 760; letter-spacing: -.01em; }
.u-brand-name span { font-size: var(--text-xs); color: var(--ink-2); letter-spacing: .02em; }
.u-header-tools { display: flex; align-items: center; gap: var(--s-3); }

/* The folder tab: Sign in, same place on every page of every site. */
.folder-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-4) 0 var(--s-3);
  font-size: var(--text-m);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: var(--sheet-raised);
  border: 1.5px solid var(--ink);
  border-radius: 4px 12px 4px 4px;
  transition: transform var(--t-lift) var(--ease-paper);
}
.folder-tab svg { width: 18px; height: 18px; flex: none; }
.folder-tab:hover { transform: translateY(-2px); }

/* The theme switch. */
.theme-switch {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--sheet-raised);
  color: var(--ink);
  padding: 0;
}
.theme-switch svg { width: 20px; height: 20px; }

/* ---- The dock: the seal and the contents tab, at the thumb ---- */
.u-dock {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: stretch;
  gap: var(--s-2);
  translate: -50% 0;
  view-transition-name: u-dock;
}
html:not(.lt-js) .u-dock { display: none; }
.u-dock .seal { box-shadow: 0 6px 18px -6px var(--shadow-ink); }
.u-dock[data-seal-hidden] .seal { display: none; }
.u-dock .seal-sub { display: none; }
@media (max-width: 719px) {
  :root { --dock-h: 4.5rem; }
  .u-dock .seal-sub { display: block; }
  .u-dock { left: var(--s-3); right: var(--s-3); translate: none; }
  .u-dock .seal { flex: 1; min-width: 0; padding-right: var(--s-3); gap: var(--s-2); }
  .u-dock .seal-label { font-size: .96875rem; white-space: nowrap; }
  .u-dock .u-tab { min-width: 3.5rem; padding-inline: var(--s-2); }
  .u-header { padding-block: var(--s-3) var(--s-2); }
  .u-brand { gap: var(--s-2); }
  .u-brand-name b { font-size: 1rem; white-space: nowrap; }
  .u-brand-name span { display: none; }
  .folder-tab { white-space: nowrap; padding: 0 var(--s-3) 0 var(--s-2); }
  .u-dock[data-seal-hidden] .seal { display: inline-flex; }
}
@media (min-width: 720px) {
  :root { --dock-h: 4.25rem; }
  .u-dock { left: auto; right: var(--gutter); translate: none; }
}

/* ---- The foot: small print, her routes, the same on every page ---- */
.u-foot {
  width: min(100% - 2 * var(--gutter), var(--sheet-max));
  margin: var(--s-8) auto 0;
  padding: var(--s-6) 0 var(--s-7);
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  font-size: var(--text-m);
}
.u-foot h2 { font-family: var(--face-sans); font-size: var(--text-s); font-weight: 650; letter-spacing: var(--track-caps); text-transform: uppercase; margin-bottom: var(--s-2); color: var(--ink-2); }
.u-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.u-foot a { display: inline-flex; align-items: center; min-height: 44px; }
.u-foot-sign { display: grid; gap: var(--s-1); align-content: start; }
.u-foot-sign b { font-family: var(--face-display); font-size: var(--text-l); }

/* ---- Captions under illustrations ---- */
.caption { font-size: var(--text-xs); line-height: 1.4; color: var(--ink-2); margin-top: var(--s-2); }

/* ---- Page to page on one host: the sheet folds away, the next unfolds ---- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: u-vt-away 260ms var(--ease-press) both; transform-origin: 50% 0; }
::view-transition-new(root) { animation: u-vt-in 380ms var(--ease-paper) both; transform-origin: 50% 0; }
::view-transition-group(sheet) { animation-duration: 420ms; animation-timing-function: var(--ease-paper); }
@keyframes u-vt-away { to { opacity: 0; transform: perspective(1800px) rotateX(9deg) translateY(-1.5%); } }
@keyframes u-vt-in { from { opacity: 0; transform: perspective(1800px) rotateX(-7deg) translateY(1.5%); } }
.vt-sheet { view-transition-name: sheet; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ---- The first frame after a hand-over: the area's tint, then the paper ---- */
html[data-arrived-from-hub] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background: var(--arrive-tint, var(--area-tint));
  animation: u-tint-out 420ms 80ms var(--ease-paper) forwards;
}
html[data-arrived-from-hub]:not(.lt-ready) body::after { animation-play-state: paused; }
@keyframes u-tint-out { to { opacity: 0; visibility: hidden; } }
html[data-arrived-from-hub="organise"] { --arrive-tint: var(--tint-organise); }
html[data-arrived-from-hub="style"] { --arrive-tint: var(--tint-style); }
html[data-arrived-from-hub="celebrate"] { --arrive-tint: var(--tint-celebrate); }
html[data-arrived-from-hub="hub"] { --arrive-tint: var(--tint-hub); }
@media (prefers-reduced-motion: reduce) {
  html[data-arrived-from-hub] body::after { animation-duration: 150ms; animation-delay: 0ms; }
}

/* Reduced motion: every state still shown, nothing travels. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
