/* earlkiu — brand tokens and shared components. The one stylesheet.
   Source: earlkiu/brand brand/tokens.css (dev). Every other copy is stamped from it.
   Rules: values live only in :root below. Everything after :root names tokens and never gives a value
   (tools/check.py fails the file otherwise). A component not defined here doesn't exist: write it here first.
   Built on: a 1.25 (major third) type scale from a 16px base; a 4px spacing grid; one neutral ramp with
   semantic roles per ground (light, dark, admin); every text and ground pair passes WCAG AA.
   Admin-only tokens and parts are marked "admin only" (Earl, 19 Oct 2026); Studio docs/design-system.md
   describes the admin parts and holds no CSS. Part 6's additions (admin parts, form grid, contact links,
   thumbnails, agreement, signature, toast, large view) were approved on Earl's look on the specimen (20 Oct 2026, 13:07).
   Emails and PDFs can't read CSS variables: tools/export.py writes tokens.json for them.
   Brand foundation part 5 (19 Oct 2026). */

@import url("https://use.typekit.net/pur8tye.css");
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@500&display=swap"); /* the typed signature only */

:root {
  /* ── Ramp: Yoru 400. No accent color, deliberately. ── */
  --n050: #FCFBF9; /* admin only: surfaces (tables, cards, drop-downs) */
  --n100: #F2F0ED;
  --n200: #DDDAD6;
  --n300: #B0ACA7;
  --n400: #7A7672;
  --n500: #3F3D3A;
  --n600: #1E1C1A;
  --n700: #100F0D;
  --overlay: rgb(16 15 13 / 0.6);

  /* ── Type ── */
  --font: "artifex-hand-cf", Georgia, serif;
  --weight-regular: 400;
  --weight-demi: 600;
  --weight-bold: 700;
  --font-signature: "Dancing Script", cursive; /* the typed signature only, never an agreement's text (visual.md → Type) */
  --weight-signature: 500;

  /* Scale: 16 × 1.25^n. Steps up to 20 are fixed; the four largest grow from one step down (375px wide) to their step (1440px). */
  --size-xs: 0.625rem;   /* 10 */
  --size-sm: 0.8125rem;  /* 13 */
  --size-base: 1rem;     /* 16 */
  --size-md: 1.25rem;    /* 20 */
  --size-lg: clamp(1.25rem, 1.14rem + 0.4695vw, 1.5625rem);     /* 20 → 25 */
  --size-xl: clamp(1.5625rem, 1.425rem + 0.5869vw, 1.9531rem);  /* 25 → 31 */
  --size-2xl: clamp(1.9531rem, 1.7812rem + 0.7336vw, 2.4414rem); /* 31 → 39 */
  --size-3xl: clamp(2.4414rem, 2.2265rem + 0.917vw, 3.0518rem);  /* 39 → 49 */

  --leading-tight: 1.1;   /* Display, H1, H2 */
  --leading-snug: 1.25;   /* H3, H4 */
  --leading-ui: 1.4;      /* H5, H6, Label, Meta, Action, fields */
  --leading-small: 1.6;   /* Small */
  --leading-body: 1.75;   /* Body */

  --tracking-tight: -0.02em; /* Display, H1 */
  --tracking-snug: -0.01em;  /* H2, H3 */
  --tracking-none: 0;
  --tracking-meta: 0.08em;   /* Meta */
  --tracking-caps: 0.2em;    /* every uppercase style: H6, Label, Action, links that stand alone */

  /* ── Space: 4px grid ── */
  --space-1: 0.25rem; /* 4 */
  --space-2: 0.5rem;  /* 8 */
  --space-3: 0.75rem; /* 12 */
  --space-4: 1rem;    /* 16 */
  --space-5: 1.5rem;  /* 24 */
  --space-6: 2rem;    /* 32 */
  --space-7: 3rem;    /* 48 */
  --space-8: 4rem;    /* 64 */
  --space-9: 6rem;    /* 96 */
  --space-10: 8rem;   /* 128 */
  --site-margin: var(--space-7);         /* page edge, 768px and up */
  --site-margin-phone: var(--space-5);   /* page edge, below 768px */
  --page-top: var(--space-10);           /* first block under the header */
  --page-top-phone: var(--space-9);
  --block-gap: var(--space-8);           /* above and below the rule between blocks */
  --block-gap-phone: var(--space-7);
  --field-gap: var(--space-5);           /* field to field */
  --link-gap: 0.125rem;                  /* 2: underline below the text */
  --hit: var(--space-2);                 /* invisible extra tap area above and below small links */

  /* ── Widths and shapes of things ── */
  --measure: 35rem;      /* 560: the longest line of reading text; padding outside */
  --width-page: 60rem;   /* 960: page is-contained */
  --width-wide: 90rem;   /* 1440: page is-wide */
  --breakpoint: 48em;    /* 768: the one breakpoint; 768 and up is desktop. Media queries can't read tokens: write (max-width: 47.99em) there, which iOS Safari before 16.4 reads (visual.md → Breakpoint). */
  --tile-ratio: 8.5 / 11; /* gallery and grid tiles: Earl's portrait crop (visual.md → Image specifications) */
  --tile-min: 15rem;     /* 240: Earl, 21 Oct 2026; the narrowest a card or figure gets in an auto grid */
  --tile-columns: 3;
  --tile-columns-phone: 2;
  --time-columns: 4;
  --time-columns-phone: 3;
  --two-col-gap: var(--space-8);   /* 64: two columns side by side (About; Studio's editor and preview) */
  --tile-gap: var(--space-1);
  --mount: var(--space-4);         /* a marked image steps in this far, like a print */
  --mark-size: var(--space-6);     /* the grid's choose square */
  --check-size: var(--space-4);
  --textarea-min: 7.5rem;          /* 120 */
  --qr-size: 6.25rem;              /* 100: room for a validated e-invoice's QR code on PDFs */
  --page-ratio: 210 / 297;         /* A4 */
  --side-nav: 13.75rem;            /* 220; admin only */
  --top-bar: 4.75rem;              /* 76; admin only */
  --initials: 1.75rem;             /* 28: the initials circle; admin only */
  --search-max: 30rem;             /* 480; admin only */
  --value-column: 18.75rem;        /* 300: a value row's value column; admin only */
  --drop-width: 20rem;             /* 320: a drop-down's width; the date field's drop at least this (components.md → Field → Dates) */
  --phone-bar: var(--space-8);     /* 64: the phone top bar; admin only */
  --icon: var(--space-5);          /* 24: the top bar's icons (bell, magnifier), a 1px line; admin only */
  --unsaved-mark: var(--space-2);  /* 8: an unsaved value row's square; admin only */
  --month-cell: var(--space-9);    /* 96: a day's least height on the admin month; admin only */
  --hour: var(--space-7);          /* 48: an hour on the admin week; admin only */
  --time-column: var(--space-8);   /* 64: the admin week's time column; admin only */
  --thumb: var(--space-8);         /* 64: a thumbnail's width (8.5:11) */
  --share-width: var(--space-8);   /* 64: a share bar's length */
  --share-height: var(--space-1);  /* 4: a share bar's thickness */
  --signature-height: var(--space-10); /* 128: the signature line's box */
  --screen: 100dvh;                /* the screen's height: large view, phone Menu */

  /* ── Lines and corners ── */
  --radius: 0;
  --radius-round: 50%;   /* the initials circle only */
  --border: 1px;
  --border-strong: 2px;  /* field error, required tick error, the tick inside a checked box, a chosen chip */
  --focus-width: 2px;
  --focus-offset: 4px;
  --lift: 0 8px 24px rgb(16 15 13 / 0.08), 0 1px 3px rgb(16 15 13 / 0.06); /* admin only: drop-downs */

  /* ── Motion ── */
  --ease: ease;
  --duration-ui: 300ms;     /* color, border, ground: hover, focus, open */
  --duration-image: 600ms;  /* image fade-in, slide change, image hover */
  --duration-page: 1200ms;  /* page fade-in, loading dots cycle */
  --duration-slide: 1800ms; /* homepage slider crossfade */
  --image-hover-scale: 1.03;
  --greyed: 0.6;            /* gallery images past the included count (the service's offering file; same as the overlay) */
  --loading-width: 1.4em;   /* the three dots */
  --toast-time: 4000ms;     /* how long a toast stays; admin only */

  /* ── Layers: low to high; nothing else sets a z-index (components.md → Layers) ── */
  --layer-bar: 10;      /* Save bar, toast */
  --layer-header: 10;   /* the fixed site header; never on a page with a bar */
  --layer-drop: 20;     /* drop-downs, the date field's drop */
  --layer-menu: 30;     /* the phone Menu; admin only */
  --layer-modal: 40;    /* modal, large view: over everything */
}

/* ── Grounds and roles. tools/check.py proves every pair. ── */
.theme-light, :root {
  --ground: var(--n100);
  --ground-2: var(--n200);       /* hover ground, image placeholder */
  --surface: var(--n100);        /* same as the ground off admin */
  --text: var(--n700);           /* 16.8:1 */
  --text-2: var(--n600);         /* 14.9:1: long reading */
  --text-muted: var(--n500);     /* 9.5:1: Label, Meta, Small notes, settled status */
  --rule: var(--n200);           /* decorative rule between rows and blocks */
  --rule-strong: var(--n400);    /* 4.0:1: field rule, checkbox, time box */
  --link-rule: var(--n400);      /* 4.0:1: a link's underline */
  --disabled: var(--n400);       /* disabled text and not-open days; exempt from AA, kept legible */
  --disabled-ground: var(--n200);
  --button-ground: var(--n700);
  --button-text: var(--n100);    /* 16.8:1 */
}
.theme-dark {
  --ground: var(--n700);
  --ground-2: var(--n600);
  --surface: var(--n700);
  --text: var(--n100);           /* 16.8:1 */
  --text-2: var(--n300);         /* 8.5:1 */
  --text-muted: var(--n300);     /* 8.5:1 */
  --rule: var(--n600);
  --rule-strong: var(--n400);    /* 4.3:1 */
  --link-rule: var(--n400);      /* 4.3:1 */
  --disabled: var(--n400);
  --disabled-ground: var(--n600);
  --button-ground: var(--n100);
  --button-text: var(--n700);
}
.theme-admin { /* admin only: the page stays n100; tables, cards and drop-downs sit on the n050 surface */
  --ground: var(--n100);
  --ground-2: var(--n200);
  --surface: var(--n050);        /* text on it 18.5:1, muted 10.5:1 */
  --text: var(--n700);
  --text-2: var(--n600);
  --text-muted: var(--n500);
  --rule: var(--n200);
  --rule-strong: var(--n400);
  --link-rule: var(--n400);
  --disabled: var(--n400);
  --disabled-ground: var(--n200);
  --button-ground: var(--n700);
  --button-text: var(--n100);
}
.theme-light, .theme-dark, .theme-admin { background-color: var(--ground); color: var(--text); }
.surface { background-color: var(--surface); }

/* ── Base ── */
body { margin: 0; font-family: var(--font); font-size: var(--size-base); line-height: var(--leading-body); color: var(--text); background-color: var(--ground); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
html.is-locked { overflow: hidden; } /* the page behind a modal, large view or Menu doesn't scroll (components.md → Layers) */
/* Base elements (Earl, 21 Oct 2026). Every box sizes with its padding; an image never overflows its column; a bare heading or paragraph gets its text style (below), so no screen sets a font size by hand. A class still wins. */
*, *::before, *::after { box-sizing: border-box; }
.email, .check-box:checked::after, .field-select::after, .field-date::after { box-sizing: content-box; } /* sized before border-box; kept as approved */
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
ul:not([class]), ol:not([class]) { margin: 0; padding-left: var(--space-5); } /* a list in running text: a bare list only; list parts keep their own (components.md → Arrangements; approved, Earl, 29 Oct 2026) */
:is(ul, ol):not([class]) > li + li { margin-top: var(--space-2); }
:focus-visible { outline: var(--focus-width) solid var(--text); outline-offset: var(--focus-offset); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; }
}

/* ── Text styles: the 12. The tag says what it is; the class says how it looks. Earl, 21 Oct 2026, changing his 19 Oct rule: a bare h1–h6 or p takes its matching style by default; a class still changes it. ── */
.text-display { font-size: var(--size-3xl); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
h1, .text-h1 { font-size: var(--size-2xl); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
h2, .text-h2 { font-size: var(--size-xl); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-snug); }
h3, .text-h3 { font-size: var(--size-lg); font-weight: var(--weight-bold); line-height: var(--leading-snug); letter-spacing: var(--tracking-snug); }
h4, .text-h4 { font-size: var(--size-md); font-weight: var(--weight-demi); line-height: var(--leading-snug); letter-spacing: var(--tracking-none); }
h5, .text-h5 { font-size: var(--size-base); font-weight: var(--weight-demi); line-height: var(--leading-ui); letter-spacing: var(--tracking-none); }
h6, .text-h6 { font-size: var(--size-xs); font-weight: var(--weight-demi); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
p, .text-body { font-size: var(--size-base); font-weight: var(--weight-regular); line-height: var(--leading-body); letter-spacing: var(--tracking-none); }
.text-small { font-size: var(--size-sm); font-weight: var(--weight-regular); line-height: var(--leading-small); letter-spacing: var(--tracking-none); color: var(--text-muted); }
.text-label { font-size: var(--size-xs); font-weight: var(--weight-regular); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted); }
.text-meta { font-size: var(--size-xs); font-weight: var(--weight-regular); line-height: var(--leading-ui); letter-spacing: var(--tracking-meta); color: var(--text-muted); }
.text-action { font-size: var(--size-xs); font-weight: var(--weight-demi); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.text-display, .text-h1, .text-h2, .text-h3, .text-h4, .text-h5, .text-h6, .text-body, .text-small, .text-label, .text-meta, .text-action { margin: 0; }
.is-strong { color: var(--text); }

/* ── Links: three kinds ── */
/* Text link: inside a sentence or a Small line, at that line's size and color. */
.link { color: inherit; text-decoration: none; border-bottom: var(--border) solid var(--link-rule); padding-bottom: var(--link-gap); transition: border-color var(--duration-ui) var(--ease); }
.link:hover { border-color: var(--text); }
button.link { font: inherit; background-color: transparent; border-width: 0 0 var(--border); border-style: solid; border-radius: var(--radius); padding-left: 0; padding-right: 0; padding-top: 0; cursor: pointer; } /* a link inside a sentence that acts in place is a button (components.md → Links → What it does, where it sits) */
button.link:disabled { color: var(--disabled); border-bottom-color: var(--disabled-ground); cursor: default; }
/* Action link: stands on its own (a table row, beside a button, a header). Label type, full text color, always underlined, never wraps. */
.action-link, .nav-link { position: relative; font-size: var(--size-xs); font-weight: var(--weight-regular); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; white-space: nowrap; text-decoration: none; }
.action-link::before, .nav-link::before { content: ""; position: absolute; inset: calc(var(--hit) * -1) 0; }
.action-link { color: var(--text); border-bottom: var(--border) solid var(--link-rule); padding-bottom: var(--link-gap); transition: border-color var(--duration-ui) var(--ease); }
.action-link:hover { border-color: var(--text); }
/* A button and an action link keep their own width (text plus padding) in any column: stack, block, column, center, modal, email. */
.button, .action-link { width: fit-content; }
button.action-link { font-family: var(--font); background-color: transparent; border-width: 0 0 var(--border); border-radius: var(--radius); padding-left: 0; padding-right: 0; padding-top: 0; cursor: pointer; } /* an action link that opens or acts in place (After payment's "open the rest") is a button */
/* Nav link: moves around the site. Label type, no underline; muted at rest, full text on hover and when current. */
.nav-link { color: var(--text-muted); transition: color var(--duration-ui) var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); }

/* ── Button: one style. Filled at rest, outline on hover. Busy keeps the look and takes no presses. ── */
.button { display: inline-block; font-family: var(--font); font-size: var(--size-xs); font-weight: var(--weight-demi); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; padding: var(--space-4) var(--space-6); border: var(--border) solid var(--button-ground); border-radius: var(--radius); background-color: var(--button-ground); color: var(--button-text); cursor: pointer; text-decoration: none; transition: background-color var(--duration-ui) var(--ease), color var(--duration-ui) var(--ease); }
.button:hover { background-color: transparent; color: var(--text); }
.email .button:hover { background-color: var(--button-ground); color: var(--button-text); } /* an email shows the rest state only (components.md → Layouts, Email → States) */
.button:disabled { background-color: var(--disabled-ground); border-color: var(--disabled-ground); color: var(--disabled); cursor: default; }
.button[aria-busy="true"] { pointer-events: none; }
.button[aria-busy="true"]:hover { background-color: var(--button-ground); color: var(--button-text); }
/* Button after images: images and the button they lead to sit in .after-images, --space-7 apart (gap, not margin). */
.after-images { display: flex; flex-direction: column; gap: var(--space-7); }

/* Short designed lines never split mid-word under the body's wrapping (21 Oct 2026) */
.button, .status, .count, .tile-tag, .table th { overflow-wrap: normal; }
/* A person's own typed word wraps, never cut (copy.md → Role words): anywhere, so a flex item or table cell can narrow to it */
.is-typed { overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: var(--border); height: var(--border); margin: calc(var(--border) * -1); padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* ── Loading: three dots, width held so nothing jumps ── */
.loading::after { content: "..."; display: inline-block; width: var(--loading-width); white-space: nowrap; text-align: left; vertical-align: bottom; animation: loading-dots var(--duration-page) steps(4) infinite; }
@keyframes loading-dots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ── Field: no box, bottom rule only, no placeholder ── */
.fields { display: flex; flex-direction: column; gap: var(--field-gap); }
.field { display: flex; flex-direction: column; gap: var(--space-2); position: relative; }
.field-input { font-family: var(--font); font-size: var(--size-base); line-height: var(--leading-ui); color: var(--text); background-color: transparent; border: 0; border-bottom: var(--border) solid var(--rule-strong); border-radius: var(--radius); padding: var(--space-2) 0 var(--space-3); transition: border-color var(--duration-ui) var(--ease); appearance: none; width: 100%; box-sizing: border-box; }
.field-input:focus { outline: none; border-bottom-color: var(--text); }
textarea.field-input { min-height: var(--textarea-min); resize: vertical; line-height: var(--leading-body); }
.field-help { font-size: var(--size-sm); line-height: var(--leading-small); color: var(--text-muted); }
/* An error shows from aria-invalid="true" on the input; .field.is-error is the same look, set together (components.md → Field). */
.field.is-error .field-input, .field-input[aria-invalid="true"] { border-bottom: var(--border-strong) solid var(--text); padding-bottom: calc(var(--space-3) - var(--border)); }
.field.is-error .field-help, .field-input[aria-invalid="true"] ~ .field-help { color: var(--text); }
.field-input:disabled { color: var(--disabled); border-bottom-color: var(--disabled-ground); }
/* Select: the same field, with a thin chevron at the right. */
.field-select { position: relative; display: block; }
/* Date field: a date chosen ahead (components.md → Field → Dates). Its value is a button with the Select's chevron; it opens the Month calendar in a drop under it. */
.field-date { position: relative; display: block; }
.field-date > .field-input { display: block; text-align: left; cursor: pointer; }
.field-date > .field-input:empty::before { content: "\200b"; } /* empty, the field keeps its height */
.field-select::after, .field-date::after { content: ""; position: absolute; right: var(--space-1); top: calc(50% - var(--space-2)); width: var(--space-2); height: var(--space-2); border-right: var(--border) solid var(--text); border-bottom: var(--border) solid var(--text); transform: rotate(45deg); pointer-events: none; }

/* ── Checkbox, choice rows ── */
.check { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.check-box { appearance: none; flex-shrink: 0; width: var(--check-size); height: var(--check-size); margin: 0; border: var(--border) solid var(--rule-strong); border-radius: var(--radius); background-color: transparent; display: grid; place-content: center; cursor: pointer; transition: border-color var(--duration-ui) var(--ease), background-color var(--duration-ui) var(--ease); }
.check-box:hover { border-color: var(--text); }
.check-box:checked { background-color: var(--text); border-color: var(--text); }
.check-box:checked::after { content: ""; width: var(--space-2); height: var(--space-1); border-left: var(--border-strong) solid var(--ground); border-bottom: var(--border-strong) solid var(--ground); transform: rotate(-45deg) translate(0, -15%); }
.check-box:disabled { border-color: var(--disabled); cursor: default; }
.check:has(.check-box:disabled) { color: var(--disabled); cursor: default; } /* a disabled option's label quiets with its box */
.check.is-error .check-box, .check-box[aria-invalid="true"] { border: var(--border-strong) solid var(--text); } /* a tick in error: from aria-invalid, .is-error set with it (components.md → Field → Error) */
.choices { border-top: var(--border) solid var(--rule); }
.choice:has(.check-box:disabled) { cursor: default; color: var(--disabled); }
.choice { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: var(--border) solid var(--rule); cursor: pointer; }

/* ── Month calendar: open dates look like links; every other day is plain and grey ── */
.calendar { display: flex; flex-direction: column; gap: var(--space-4); }
.calendar-head { display: flex; flex-wrap: wrap; row-gap: var(--space-2); column-gap: var(--space-5); justify-content: space-between; align-items: baseline; padding-bottom: var(--space-4); border-bottom: var(--border) solid var(--rule); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.calendar-day { font-size: var(--size-base); line-height: var(--leading-ui); padding: var(--space-3) 0; color: var(--disabled); }
.calendar-day.is-open { color: var(--text); cursor: pointer; }
.calendar-day.is-open > span { border-bottom: var(--border) solid var(--link-rule); padding-bottom: var(--link-gap); }
.calendar-day.is-chosen { background-color: var(--text); color: var(--ground); }
.calendar-day.is-chosen > span { border-bottom-color: transparent; }
.calendar-day.is-open:hover > span { border-bottom-color: var(--text); } /* an open day under the pointer, as a link's underline */
button.action-link:disabled, button.action-link:disabled:hover { color: var(--disabled); border-bottom-color: var(--disabled-ground); cursor: default; } /* a disabled action link, the calendar's Previous / Next included (components.md → Links) */
button.action-link[aria-busy="true"] { pointer-events: none; } /* busy: Button → Busy, its look unchanged (components.md → Links) */
button.action-link[aria-busy="true"]:hover { border-bottom-color: var(--link-rule); }
button.drop-item, button.admin-search, button.list-row { font-family: var(--font); text-align: left; background-color: transparent; border-style: solid; border-radius: 0; margin: 0; } /* a drop item, the search bar or a P9 row that acts in place is a button, its look unchanged (components.md → Links → What it does, where it sits; Earl, 17 Nov 2026) */
button.drop-item { width: 100%; border-width: var(--border) 0 0; border-color: var(--rule); }
button.list-row { width: 100%; font-size: inherit; line-height: inherit; border-width: 0 0 var(--border); border-color: var(--rule); }
button.admin-search { font-size: inherit; line-height: inherit; border-width: 0 0 var(--border); border-color: var(--rule-strong); cursor: pointer; }
button.calendar-day { font-family: var(--font); border: 0; background-color: transparent; width: 100%; } /* an open day is a button (components.md → Month calendar) */
button.calendar-day:focus-visible { outline-offset: calc(var(--focus-width) * -1); } /* inside the day, so the grid doesn't cut it */

/* ── Time boxes ── */
.times { display: grid; grid-template-columns: repeat(var(--time-columns), minmax(0, 1fr)); gap: var(--space-2); }
.time { font-family: var(--font); font-size: var(--size-base); line-height: var(--leading-ui); padding: var(--space-3) 0; text-align: center; border: var(--border) solid var(--rule-strong); background-color: transparent; color: var(--text); cursor: pointer; transition: border-color var(--duration-ui) var(--ease); }
.time:hover { border-color: var(--text); }
.time.is-chosen { background-color: var(--text); border-color: var(--text); color: var(--ground); }

/* ── Status label: text only. Needs action = full text, demi; settled = muted, regular. ── */
.status { font-size: var(--size-xs); font-weight: var(--weight-demi); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text); }
.status.is-settled { color: var(--text-muted); font-weight: var(--weight-regular); }

/* ── Alert: one look for good and bad news; a rule on the left ── */
.alert { border-left: var(--border) solid var(--text); padding-left: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.alert .text-label { color: var(--text); }
:where(.alert > *) { max-width: 100%; overflow-wrap: anywhere; }

/* ── Empty state: the block keeps its label; one sentence under it ── */
.empty { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }

/* ── Table: rules between rows, no box, no hover; amounts right-aligned ── */
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: var(--size-xs); font-weight: var(--weight-regular); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted); text-align: left; }
.table th, .table td { padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: var(--border) solid var(--rule); vertical-align: baseline; }
.table .is-amount { text-align: right; font-variant-numeric: tabular-nums; } /* number columns side by side keep the gap between them */
.table .is-amount:last-child { padding-right: 0; } /* the last flush right */
/* A share of a whole: a bar of --share-width, filled --text to the share on a --rule track, the percentage beside it (components.md → Table). */
.share { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--space-3); }
.share-bar { --share: 0%; flex-shrink: 0; width: var(--share-width); height: var(--share-height); background: linear-gradient(to right, var(--text) var(--share), var(--rule) var(--share)); }
.table .is-total td { font-weight: var(--weight-demi); border-top: var(--border) solid var(--rule-strong); }
/* Table scroll (approved, Earl, 21 Oct 2026, 20:26): a table wider than its pane scrolls sideways inside it; the page never does. */
.table-scroll { overflow-x: auto; }
.phone-rows > .list { display: none; }

/* ── Modal: dims the page; the button names the action, the dismiss link says what stays ── */
.modal-overlay { position: fixed; inset: 0; z-index: var(--layer-modal); overflow-y: auto; background-color: var(--overlay); display: flex; align-items: center; justify-content: center; padding: var(--site-margin-phone); }
.modal-overlay > .modal { margin: auto; } /* a panel taller than the screen scrolls inside the dim from its top */
.modal { background-color: var(--ground); color: var(--text); max-width: var(--measure); width: 100%; padding: var(--space-7); box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-5); }

/* ── Page: header, rhythm, column ── */
.site-header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-5); padding: var(--space-7) var(--site-margin); }
.site-header.is-contained { padding-inline: max(var(--site-margin), calc((100% - var(--width-page)) / 2)); } /* a person's page: lines up with page is-contained (components.md → Screens; Earl, 31 Oct 2026, 10:42) */
.site-header-brand { display: flex; flex-direction: column; gap: var(--space-1); color: var(--text); text-decoration: none; }
.site-header-links { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.site-header.is-fixed { position: fixed; top: 0; left: 0; right: 0; z-index: var(--layer-header); mix-blend-mode: multiply; }
.theme-dark .site-header.is-fixed { mix-blend-mode: normal; } /* light pages only: multiply vanishes on dark grounds */
/* A page and its column stack blocks with gap; a rule sits between blocks, --block-gap above (the gap) and below (padding). */
.page { display: grid; grid-template-columns: var(--site-margin) minmax(0, 1fr) var(--site-margin); align-content: start; padding: var(--page-top) 0 var(--block-gap); row-gap: var(--block-gap); } /* full width inside the site margin, as approved; Earl, 21 Oct 2026: a grid so a section can go full bleed */
.page.is-contained { grid-template-columns: minmax(var(--site-margin), 1fr) minmax(0, var(--width-page)) minmax(var(--site-margin), 1fr); }
.page.is-wide { grid-template-columns: minmax(var(--site-margin), 1fr) minmax(0, var(--width-wide)) minmax(var(--site-margin), 1fr); }
.page > * { grid-column: 2; }
.page > .full-bleed { grid-column: 1 / -1; }
.column { max-width: var(--measure); display: flex; flex-direction: column; gap: var(--block-gap); }
.block { display: flex; flex-direction: column; gap: var(--space-5); } /* a block's own parts: heading, rows, fields, button */
.heading-group { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; } /* a Label or H6 eyebrow over its heading, or a web page's date line under it (hgroup) */
.cell-lines { display: flex; flex-direction: column; gap: var(--space-1); } /* lines stacked in one table cell or row: a name over a note */
/* ── Arrangements (Earl, 21 Oct 2026): how a screen places its parts; no screen gets its own layout class (components.md → Arrangements) ── */
.stack { display: flex; flex-direction: column; gap: var(--space-5); }
.stack.is-tight { gap: var(--space-2); }
.stack.is-section { gap: var(--block-gap); }
.row, .actions { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; } /* .actions: the same row, its older name */
.row.is-spread { justify-content: space-between; align-items: baseline; }
/* Columns, split and editor choose their columns from their own room, not the screen (approved, Earl, 21 Oct 2026, 20:26; visual.md → Breakpoint). */
.columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--tile-min), (100% - var(--space-6)) / 2)), 1fr)); gap: var(--space-6); align-items: start; } /* two, fewer when a column would be under --tile-min */
.columns.is-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--tile-min), (100% - 2 * var(--space-6)) / 3)), 1fr)); }
.columns.is-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--tile-min)), 1fr)); } /* as many as fit: figures, cards */
.split { display: flex; flex-wrap: wrap; gap: var(--two-col-gap); align-items: flex-start; } /* the side drops below when the split can't hold --measure, the gap and --tile-min */
.split > :first-child { flex: 2 1 0; min-width: min(100%, var(--measure)); }
.split > :last-child { flex: 1 1 0; min-width: min(100%, var(--tile-min)); }
.center { display: grid; grid-template-columns: minmax(0, var(--measure)); justify-content: center; gap: var(--space-5); }
.center.is-screen { min-height: var(--screen); align-content: center; } /* also centered top to bottom: the login screen */
/* Width in a column (approved, Earl, 21 Oct 2026, 20:26; an instance of Earl's 6 Oct rule): running text and a form hold to --measure; tables, lists, tabs and the save bar take the full width. */
p, ul:not([class]), ol:not([class]), .fields, .form-grid { max-width: var(--measure); }
.page.is-contained .column, .page.is-contained .column :is(p, ul:not([class]), ol:not([class]), .fields, .form-grid) { max-width: var(--width-page); } /* a person's page reads the full contained width (Earl, 3 Nov 2026) */
/* ── Page grid (Earl, 21 Oct 2026): 12 columns with spans; the contained page and full bleed are .page (above) (components.md → Page grid) ── */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-6); }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; } .span-10 { grid-column: span 10; } .span-11 { grid-column: span 11; } .span-12 { grid-column: span 12; }
.block + .block { padding-top: var(--block-gap); border-top: var(--border) solid var(--rule); }
.fade-in { animation: fade-in var(--duration-page) var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Gallery: 8.5:11 tiles; marked = mounted like a print; greyed past the included count; a price tag on extras (counts and prices: the service's offering file) ── */
.gallery { display: grid; grid-template-columns: repeat(var(--tile-columns), minmax(0, 1fr)); gap: var(--tile-gap); }
.tile { position: relative; aspect-ratio: var(--tile-ratio); background-color: var(--ground-2); overflow: hidden; box-sizing: border-box; transition: padding var(--duration-ui) var(--ease), opacity var(--duration-ui) var(--ease); }
.tile-img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fade-in var(--duration-image) var(--ease) both; }
.tile.is-marked { padding: var(--mount); background-color: var(--ground); outline: var(--border) solid var(--text); outline-offset: calc(var(--border) * -1); }
.tile.is-greyed { opacity: var(--greyed); }
.tile-mark { cursor: pointer; position: absolute; top: var(--space-3); right: var(--space-3); width: var(--mark-size); height: var(--mark-size); background-color: var(--ground); display: grid; place-content: center; }
.tile.is-marked .tile-mark { top: calc(var(--mount) + var(--space-1)); right: calc(var(--mount) + var(--space-1)); }
.tile-tag { position: absolute; left: calc(var(--mount) + var(--space-3)); bottom: calc(var(--mount) + var(--space-3)); background-color: var(--ground); color: var(--text); padding: var(--space-1) var(--space-2); font-size: var(--size-xs); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.grid-image { transition: transform var(--duration-image) var(--ease); }
.grid-image:hover { transform: scale(var(--image-hover-scale)); }

/* ── Email: like a letter. Built from tokens.json, inlined (email apps drop CSS variables).
   Parts stack with gap: head, letter (label and title, body, button), sign-off, foot. ── */
.email { max-width: var(--measure); padding: var(--space-5); background-color: var(--ground); color: var(--text); display: flex; flex-direction: column; gap: var(--space-7); color-scheme: light dark; } /* both grounds, the device picks (components.md → Layouts, Email → Two grounds) */
.email-head { display: flex; flex-direction: column; gap: var(--space-1); }
.email-letter { display: flex; flex-direction: column; gap: var(--space-5); }
.email-title { display: flex; flex-direction: column; gap: var(--space-2); }
.email-button { } /* its width is the button's own rule; kept defined while creative-emails and the specimen use it */
.email-signoff { display: flex; flex-direction: column; gap: var(--space-1); }
.email-mark { width: var(--initials); height: var(--initials); object-fit: contain; flex-shrink: 0; } /* the EK mark heading Earl's notices; never cropped */
.email-foot { padding-top: var(--space-4); border-top: var(--border) solid var(--rule); }

/* ── PDF: one A4 page, the amount on the upper third, who it's for on the lower third ── */
.pdf { aspect-ratio: var(--page-ratio); background-color: var(--ground); color: var(--text); padding: var(--space-7); box-sizing: border-box; display: grid; grid-template-rows: auto 1fr 1fr 1fr auto; grid-template-areas: "corners" "amount" "items" "lower" "foot"; row-gap: var(--space-6); }
/* Guard: each third is 1fr (at least its content): a long list takes the room above the amount first, then pushes the details block down, --space-6 under it, never over it. A list that no longer fits moves whole to page 2 (is-continued). */
.pdf.is-continued { grid-template-rows: auto 1fr auto; grid-template-areas: "corners" "items" "foot"; }
.pdf-corners { grid-area: corners; display: flex; justify-content: space-between; align-items: flex-start; }
.pdf-corner { display: flex; flex-direction: column; gap: var(--space-1); }
.pdf-corner.is-right { align-items: flex-end; text-align: right; }
.pdf-amount { grid-area: amount; align-self: end; display: flex; flex-direction: column; gap: var(--space-2); }
.pdf-amount > .text-display { display: flex; align-items: baseline; gap: var(--space-2); }
.pdf-amount-unit { font-size: var(--size-md); color: var(--text-muted); }
.pdf-amount-sign { color: var(--text); } /* a credit note's minus, before RM at the unit's size */
.pdf-items { grid-area: items; align-self: start; }
.pdf-items .table tr:last-child td { border-bottom: 0; } /* a rule between items only; no head, no total row */
.pdf-lower { grid-area: lower; align-self: start; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-5); }
.pdf-who { display: flex; flex-direction: column; gap: var(--space-5); } /* Received from, then For */
.pdf-for { display: flex; flex-direction: column; gap: var(--space-1); }
.pdf-foot { grid-area: foot; display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-5); }
.pdf-foot > :last-child { white-space: nowrap; } /* the page number never breaks */
.pdf-qr { width: var(--qr-size); height: var(--qr-size); border: var(--border) solid var(--rule); flex-shrink: 0; }
/* Agreement PDF (components.md → Layouts → Agreement PDF): one box per page, Studio splits the text by its Breaks; corners and foot on every page; the agreement text runs on; one signature block per signer; the signing record last. */
.pdf.is-agreement { grid-template-rows: auto 1fr auto; grid-template-areas: "corners" "body" "foot"; }
.pdf-body { grid-area: body; display: flex; flex-direction: column; gap: var(--space-6); }
.pdf-signers { display: flex; flex-direction: column; gap: var(--space-6); }
/* A long value in an agreement PDF's value cell wraps; label and amount cells don't (components.md → Table). */
.pdf.is-agreement .table td + td:not(.is-amount) { overflow-wrap: anywhere; }
.pdf.is-agreement .table td:first-child { white-space: nowrap; } /* a label cell stays on one line (components.md → Table, 26 Oct 2026) */
.email .table td.is-one-line { white-space: nowrap; } /* a label Earl writes, in an email (components.md → Table, 5 Nov 2026) */
.pdf-signer { display: flex; flex-direction: column; gap: var(--space-2); }
/* A signer's name, typed on the line and printed under it, wraps where it must, never cut or widening the page (components.md → Layouts → Agreement PDF → Signature block, 9 Nov 2026) */
.pdf-signer { overflow-wrap: anywhere; }

/* ── Brand-wide parts added in part 6 (Earl approves on the specimen) ── */
/* Form grid: fields side by side on desktop, one column on phones. */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--field-gap) var(--space-6); align-items: end; } /* inputs line up when a label wraps */
.form-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Contact links: the ways to reach a person (her page: Earl's email and phone; Studio's contact card), action links in one row that wraps. */
.contact-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); list-style: none; margin: 0; padding: 0; }
/* A choice row that takes a value typed in place (a quantity, a note): the field's look, right-aligned. */
.choice-input { flex: 0 1 var(--space-9); min-width: 0; font-family: var(--font); font-size: var(--size-base); line-height: var(--leading-ui); color: var(--text); background-color: transparent; border: 0; border-bottom: var(--border) solid var(--rule-strong); border-radius: var(--radius); padding: var(--space-1) 0 var(--space-2); text-align: right; transition: border-color var(--duration-ui) var(--ease); }
.choice-input:focus { outline: none; border-bottom-color: var(--text); }
/* Photo tiles: plain thumbnails in a strip (lent items, a session's picks). 8.5:11, placeholder ground while loading. */
.thumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.thumb { --swatch: var(--ground-2); width: var(--thumb); aspect-ratio: var(--tile-ratio); background-color: var(--swatch); overflow: hidden; flex-shrink: 0; }
.thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.is-swatch { outline: var(--border) solid var(--rule); outline-offset: calc(var(--border) * -1); }
.thumb.is-framed { outline: var(--border) solid var(--text); outline-offset: calc(var(--border) * -1); } /* one person's photos set apart (the brand's on a loan sheet) */
/* Adding photos: an add tile the size of a thumbnail (a label holding the file input), uploading tiles with the dots, Remove under each. */
.thumb-item { display: flex; flex-direction: column; gap: var(--space-1); align-items: flex-start; }
.thumb-add { position: relative; width: var(--thumb); aspect-ratio: var(--tile-ratio); display: grid; place-content: center; text-align: center; border: var(--border) solid var(--rule-strong); box-sizing: border-box; cursor: pointer; transition: border-color var(--duration-ui) var(--ease); }
.thumb-add:hover, .thumb-add:focus-within { border-color: var(--text); }
.thumb-add > input { position: absolute; width: var(--border); height: var(--border); opacity: 0; overflow: hidden; }
.thumb.is-uploading { display: grid; place-content: center; }
/* Details: label over value, a rule between pairs, no box (a session's date, place, your role; a contact card's group). */
.details { display: flex; flex-direction: column; margin: 0; border-top: var(--border) solid var(--rule); }
.detail { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) 0; border-bottom: var(--border) solid var(--rule); margin: 0; }
.detail-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.detail > dd, .fact > dd, .fact > dt { margin: 0; }
/* Agreement text: the document itself, between two rules, in Small; numbered terms in Body. */
.agreement { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) 0; border-top: var(--border) solid var(--rule); border-bottom: var(--border) solid var(--rule); }
.terms { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding-left: var(--space-5); }
/* Signature: the name typed sits on the line in the signature face; "Draw it instead" is an action link under it. */
.signature { display: flex; align-items: flex-end; min-height: var(--signature-height); padding-bottom: var(--space-3); border-bottom: var(--border) solid var(--rule-strong); box-sizing: border-box; color: var(--text); }
.signature-typed { font-family: var(--font-signature); font-weight: var(--weight-signature); font-size: var(--size-2xl); line-height: var(--leading-tight); }
.signature > svg, .signature > canvas { width: 100%; height: 100%; stroke: currentColor; }
.signature > canvas { touch-action: none; } /* a finger draws on the line; it doesn't scroll the page (components.md → Signature) */
/* Large view: the image as large as the screen allows; position and Back to gallery above, Previous / Next and the action below. */
.large-view { display: flex; flex-direction: column; gap: var(--space-4); min-height: var(--screen); padding: var(--space-5) var(--site-margin); box-sizing: border-box; background-color: var(--ground); }
.large-view.is-layer { position: fixed; inset: 0; z-index: var(--layer-modal); overflow-y: auto; } /* over the gallery, which keeps its scroll place under it (components.md → Layers) */
.large-view-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-5); }
.large-view-image { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.large-view-image > img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
/* After payment: her images in the one grid look; Add more below at full opacity (no fade there). */
.gallery.is-extras .tile.is-greyed { opacity: 1; }

/* ── Studio admin parts: admin only (Studio docs/design-system.md describes them) ── */
/* Page frame: side nav left, top bar over the content, content full width inside the site margin. */
.admin { display: grid; grid-template-columns: var(--side-nav) minmax(0, 1fr); min-height: var(--screen); }
.admin-content { display: flex; flex-direction: column; min-width: 0; }
.admin-main { display: flex; flex-direction: column; gap: var(--space-7); padding: var(--space-7) var(--site-margin) var(--space-10); min-width: 0; }
/* P1 Side nav. The nav's rule runs its full height, from the top; the brand block (the top bar's height) has no rule under it; the bar's rule ends at the nav's rule (Earl, 23 Oct 2026, 00:51 and 02:37). */
.admin-nav { display: flex; flex-direction: column; border-right: var(--border) solid var(--rule); position: sticky; top: 0; align-self: start; height: var(--screen); overflow-y: auto; } /* the side nav stays put while the page scrolls (Earl, 18 Nov 2026) */
.admin-brand { display: flex; flex-direction: column; justify-content: center; gap: var(--space-1); height: var(--top-bar); padding-left: var(--space-5); color: var(--text); text-decoration: none; }
.admin-nav-body { flex: 1; display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-6) 0 var(--space-6) var(--space-5); }
.admin-nav-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.admin-nav-link { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); padding: var(--space-1) var(--space-5) var(--space-1) var(--space-3); border-left: var(--border) solid transparent; font-size: var(--size-base); line-height: var(--leading-ui); color: var(--text-muted); text-decoration: none; transition: color var(--duration-ui) var(--ease); }
.admin-nav-link:hover, .admin-nav-link[aria-current="page"] { color: var(--text); }
.admin-nav-link[aria-current="page"] { border-left-color: var(--text); }
.admin-nav-foot { margin-top: auto; padding-top: var(--space-4); margin-right: var(--space-5); border-top: var(--border) solid var(--rule); }
.admin-nav-foot .admin-nav-link { font-size: var(--size-sm); line-height: var(--leading-small); padding-right: 0; }
.count { font-size: var(--size-xs); font-weight: var(--weight-demi); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); color: var(--text); font-variant-numeric: tabular-nums; }
/* Top bar: search grows to --search-max; bell, then initials, on the right. */
.admin-bar { position: sticky; top: 0; z-index: var(--layer-bar); background-color: var(--ground); display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); height: var(--top-bar); padding: 0 var(--site-margin); border-bottom: var(--border) solid var(--rule); }
.admin-search { flex: 1; max-width: var(--search-max); display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: var(--space-2) 0 var(--space-3); border-bottom: var(--border) solid var(--rule-strong); color: var(--text-muted); text-decoration: none; transition: border-color var(--duration-ui) var(--ease); }
.admin-search:hover { border-bottom-color: var(--text); }
.admin-bar-end { display: flex; align-items: center; gap: var(--space-6); }
.icon-button { position: relative; display: inline-flex; align-items: center; gap: var(--space-1); color: var(--text-muted); background-color: transparent; border: 0; padding: 0; cursor: pointer; text-decoration: none; transition: color var(--duration-ui) var(--ease); }
.icon-button::before { content: ""; position: absolute; inset: calc(var(--hit) * -1); }
.icon-button:hover, .icon-button[aria-expanded="true"] { color: var(--text); }
.icon { width: var(--icon); height: var(--icon); flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: var(--border); vector-effect: non-scaling-stroke; }
.icon-count { font-size: var(--size-sm); font-weight: var(--weight-demi); line-height: var(--leading-ui); color: var(--text); }
.initials { display: inline-grid; place-content: center; width: var(--initials); height: var(--initials); border: var(--border) solid var(--text-muted); border-radius: var(--radius-round); font-size: var(--size-xs); font-weight: var(--weight-demi); line-height: var(--leading-ui); letter-spacing: var(--tracking-meta); color: var(--text-muted); flex-shrink: 0; transition: color var(--duration-ui) var(--ease), border-color var(--duration-ui) var(--ease); }
.icon-button:hover .initials, .icon-button[aria-expanded="true"] .initials { color: var(--text); border-color: var(--text); }
/* Drop-down: hangs from the bar's rule under its trigger, on the surface, with --lift (the one shadow). */
.drop { position: absolute; top: 100%; right: var(--site-margin); width: var(--drop-width); display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); background-color: var(--surface); border: var(--border) solid var(--rule); box-shadow: var(--lift); z-index: var(--layer-drop); max-height: calc(var(--screen) - var(--top-bar) - var(--site-margin)); }
.drop > .text-label { padding: 0 var(--space-5); }
.drop-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; min-height: 0; overflow-y: auto; } /* past its height the list scrolls; the label stays */
.drop-item { display: flex; flex-direction: column; padding: var(--space-2) var(--space-5); border-top: var(--border) solid var(--rule); font-size: var(--size-sm); line-height: var(--leading-small); color: var(--text); text-decoration: none; cursor: pointer; transition: background-color var(--duration-ui) var(--ease); }
.drop-item:hover { background-color: var(--ground); }
.drop-item[aria-disabled="true"], .drop-item[aria-disabled="true"]:hover { color: var(--disabled); background-color: transparent; cursor: default; } /* an action that can't run yet stays in the list (components.md → Button, At most three action links) */
.drop-item[aria-selected="true"] { outline: var(--focus-width) solid var(--text); outline-offset: calc(var(--focus-width) * -1); }
.drop-item:focus-visible { outline-offset: calc(var(--focus-width) * -1); } /* inside the item, so the scrolling list doesn't cut it */
/* The date field's drop: under the field, its width, never narrower than --drop-width; the Month calendar inside. */
.drop.is-date { top: calc(100% + var(--hit)); left: 0; right: auto; width: 100%; min-width: var(--drop-width); padding: var(--space-4) var(--space-5) var(--space-5); box-sizing: border-box; box-shadow: none; } /* no shadow on the light and dark grounds; --lift stays Studio's */
.theme-admin .drop.is-date { box-shadow: var(--lift); }
/* Sent out of its place (components.md → Layers → anchoring): fixed against its trigger; the script that opens it sets the three values. */
.drop.is-anchored { --anchor-top: 0; --anchor-left: 0; --anchor-room: var(--screen); position: fixed; top: var(--anchor-top); left: var(--anchor-left); right: auto; max-width: calc(100% - var(--site-margin) * 2); max-height: var(--anchor-room); }
.drop.is-date.is-anchored { width: var(--drop-width); min-width: 0; } /* sent out of its place, the drop's width (components.md → Layers) */
/* Phone bar and Menu: Earl Kiu left; magnifier, bell, initials, Menu right. Menu opens the nav full screen. */
.admin-phone-bar { display: none; position: relative; justify-content: space-between; align-items: center; gap: var(--space-5); height: var(--phone-bar); padding: 0 var(--site-margin-phone); border-bottom: var(--border) solid var(--rule); }
.admin-menu { position: fixed; inset: 0; z-index: var(--layer-menu); display: flex; flex-direction: column; gap: var(--space-6); min-height: var(--screen); padding: 0 var(--site-margin-phone) var(--space-7); background-color: var(--ground); overflow-y: auto; }
.admin-menu > .admin-phone-bar { display: flex; flex-shrink: 0; margin: 0 calc(var(--site-margin-phone) * -1); }
/* P2 Tabs: Action type, muted → full; the current tab underlined on the row's rule. */
.tabs { display: flex; gap: var(--space-6); border-bottom: var(--border) solid var(--rule); list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; } /* tabs that don't fit scroll inside their row at any width, the page stays still (Earl, 17 Nov 2026) */
.tabs > * { flex-shrink: 0; }
.tab { display: block; padding: var(--space-3) 0; margin-bottom: calc(var(--border) * -1); border-bottom: var(--border) solid transparent; font-size: var(--size-xs); font-weight: var(--weight-demi); line-height: var(--leading-ui); letter-spacing: var(--tracking-caps); text-transform: uppercase; white-space: nowrap; color: var(--text-muted); text-decoration: none; background-color: transparent; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; transition: color var(--duration-ui) var(--ease), border-color var(--duration-ui) var(--ease); }
.tab:hover { color: var(--text); }
.tab[aria-current="page"], .tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.tabs-row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-5); border-bottom: var(--border) solid var(--rule); }
.tabs-row > .tabs { border-bottom: 0; min-width: 0; }
.tabs-row > .button { margin-bottom: var(--space-2); }
/* P3 Session-type chips: time boxes in a row. P3a Filter chips: Label type, smaller. One chosen, filled. */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.chip { font-family: var(--font); font-size: var(--size-base); line-height: var(--leading-ui); padding: var(--space-3) var(--space-5); border: var(--border) solid var(--rule-strong); background-color: transparent; color: var(--text-muted); white-space: nowrap; cursor: pointer; text-decoration: none; transition: border-color var(--duration-ui) var(--ease); }
.chip.is-filter { font-size: var(--size-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; padding: var(--space-1) var(--space-2); }
.chip:hover { border-color: var(--text); }
/* Chosen chip: outlined, never filled — filled black is the button's, and a date, time or tick (Earl, 20 Oct 2026). The inset shadow thickens the line without moving the text. */
.chip[aria-pressed="true"], .chip[aria-current="true"] { border-color: var(--text); box-shadow: inset 0 0 0 calc(var(--border-strong) - var(--border)) var(--text); color: var(--text); font-weight: var(--weight-demi); }
/* Each chip holds the demi width of its label (data-label), so choosing one moves nothing beside it. */
.chip::after { content: attr(data-label); display: block; height: 0; overflow: hidden; visibility: hidden; font-weight: var(--weight-demi); }
/* P4 Groups: Label heading; groups split by a rule, --space-7 above, --space-5 below. */
.groups { display: flex; flex-direction: column; gap: var(--space-7); }
.group { display: flex; flex-direction: column; gap: var(--space-5); }
.group + .group { padding-top: var(--space-5); border-top: var(--border) solid var(--rule); }
/* P5 Value rows: meaning left (note in Small under it), the value right in --value-column; an unsaved row shows a square. */
.value-rows { border-top: var(--border) solid var(--rule); }
.value-row { display: grid; grid-template-columns: minmax(0, 1fr) var(--value-column); gap: var(--space-6); align-items: center; padding: var(--space-4) 0; border-bottom: var(--border) solid var(--rule); }
.value-row-key { display: flex; flex-direction: column; gap: var(--space-1); }
.value-row.is-unsaved .value-row-key > :first-child { display: flex; align-items: center; gap: var(--space-2); }
.value-row.is-unsaved .value-row-key > :first-child::before { content: ""; width: var(--unsaved-mark); height: var(--unsaved-mark); background-color: var(--text); flex-shrink: 0; }
.field-unit { display: flex; align-items: baseline; gap: var(--space-2); }
.field-unit > .field-input { flex: 1; min-width: 0; }
/* P6 Save bar: shows once something is edited; held to the bottom of the content area. */
.save-bar { position: sticky; bottom: 0; z-index: var(--layer-bar); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4) var(--space-5); padding: var(--space-4) var(--site-margin); background-color: var(--ground); border-top: var(--border) solid var(--rule); }
/* P7 Editor page: fields in --measure, a preview to the right; the preview drops below when the editor can't hold --measure, the gap and --tile-min (approved, Earl, 21 Oct 2026, 20:26). */
.editor-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); }
.editor-head > :not(.status) { min-width: 0; overflow-wrap: anywhere; } /* a long unbroken word (an id) wraps, never pushes the page (visual.md → long words; Earl, 17 Nov 2026) */
.editor { display: flex; flex-wrap: wrap; gap: var(--two-col-gap); align-items: flex-start; }
.editor > :first-child { flex: 0 1 var(--measure); min-width: 0; }
.editor > :last-child { flex: 1 1 var(--tile-min); min-width: 0; }
/* Page head (approved, Earl, 21 Oct 2026, 20:26): back link, then the title line (editor-head left, the page-wide actions right), tabs-row last. On phones the list's one button moves onto the title line. */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4) var(--space-5); align-items: baseline; }
.page-head > * { grid-column: 1 / -1; }
.page-head > .editor-head { grid-column: 1; }
.page-head > .row { grid-column: 2; }
/* P9 list rows, P10 stacked facts, P11 figure rows: on the surface, content --space-4 in; only P9 rows open, so only they tint. */
.list, .facts, .figures, .notices { background-color: var(--surface); border: var(--border) solid var(--rule); list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); border-bottom: var(--border) solid var(--rule); color: var(--text); text-decoration: none; cursor: pointer; transition: background-color var(--duration-ui) var(--ease); }
.list-row:hover { background-color: var(--ground); }
.list-row-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); min-width: 0; }
.list-row-line > * { min-width: 0; overflow-wrap: anywhere; } /* a long unbroken word wraps inside the row (visual.md → long words; Earl, 17 Nov 2026) */
.fact { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-bottom: var(--border) solid var(--rule); }
.figure-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: var(--space-4); border-bottom: var(--border) solid var(--rule); }
.figure { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); text-align: right; } /* a figure with its change on the period before in Small under it */
.list > :last-child, .facts > :last-child, .figures > :last-child, .notices > :last-child { border-bottom: 0; }
/* P12 notice lines (approved, Earl, 23 Oct 2026, 00:32): lines that don't open, so no tint and no pointer; a Critical's diagnosis behind a --rule line on its left, lighter than an Alert's. */
.notice { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); border-bottom: var(--border) solid var(--rule); }
.notice-diagnosis { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; border-left: var(--border) solid var(--rule); padding-left: var(--space-4); }
:where(.notice-diagnosis > *) { max-width: 100%; overflow-wrap: anywhere; } /* a long id in a diagnosis wraps, as an Alert's lines (Earl, 17 Nov 2026) */
/* Admin lists (§6 Table → Admin lists): the table on the surface, cells --space-4 in, a row that opens tints and shows the pointer. */
.theme-admin .table { background-color: var(--surface); border: var(--border) solid var(--rule); }
.theme-admin .table th:first-child, .theme-admin .table td:first-child { padding-left: var(--space-4); }
.theme-admin .table th:last-child, .theme-admin .table td:last-child { padding-right: var(--space-4); }
.theme-admin .table tbody tr:last-child td { border-bottom: 0; }
.theme-admin .table tbody tr { transition: background-color var(--duration-ui) var(--ease); }
.theme-admin .table tbody tr:hover { background-color: var(--ground); }
.theme-admin .table tbody tr:has(.link) { cursor: pointer; }
/* Admin lists whose rows don't open (a creative session's roster): is-static, no tint and no pointer, as Table's no hover and P12 (management, 29 Oct 2026). */
.theme-admin .table.is-static tbody tr:hover { background-color: transparent; }
.theme-admin .table.is-static tbody tr { cursor: auto; }
/* Toast: "Saved.", "Restored." in the Save bar's place — the same bar, Small text on the left, no button; it stays --toast-time and goes. Never floats. */
.toast { position: sticky; bottom: 0; z-index: var(--layer-bar); display: flex; align-items: center; box-sizing: border-box; padding: var(--space-4) var(--site-margin); background-color: var(--ground); border-top: var(--border) solid var(--rule); color: var(--text); font-size: var(--size-sm); line-height: var(--leading-small); animation: fade-in var(--duration-ui) var(--ease) both; }
/* Admin calendars. Month: day cells with rules, away days filled. Week: a time column and seven days; a block's row comes from
   --start and --span on it (the one inline style tools/check.py allows). Phone: the week as a list by day. */
.admin-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: var(--border) solid var(--rule); border-left: var(--border) solid var(--rule); }
.admin-month > * { display: flex; flex-direction: column; gap: var(--space-1); min-height: var(--month-cell); padding: var(--space-2) var(--space-3); border-right: var(--border) solid var(--rule); border-bottom: var(--border) solid var(--rule); font-size: var(--size-sm); line-height: var(--leading-ui); }
.admin-month > .is-head { min-height: 0; padding: var(--space-3); }
.admin-month .is-other { color: var(--disabled); }
.is-away { background-color: var(--text); color: var(--ground); }
.is-away .text-label, .is-away .text-small, .is-away .text-meta { color: var(--ground); }
.admin-week { display: grid; grid-template-columns: var(--time-column) repeat(7, minmax(0, 1fr)); border-top: var(--border) solid var(--rule); }
.admin-week-day { display: grid; grid-template-rows: repeat(24, calc(var(--hour) / 2)); border-left: var(--border) solid var(--rule); }
.week-block { --start: 1; --span: 2; grid-row: var(--start) / span var(--span); margin: 0 var(--space-1); padding: var(--space-1) var(--space-2); overflow: hidden; font-size: var(--size-sm); line-height: var(--leading-ui); border: var(--border) solid var(--text); background-color: var(--ground); color: var(--text); }
.week-block.is-away { background-color: var(--text); }
.day-list { display: flex; flex-direction: column; gap: var(--space-2); }
.day-list > .text-label { padding-bottom: var(--space-2); border-bottom: var(--border) solid var(--rule); }
.day-list > .is-away { padding: var(--space-2) var(--space-3); }
.admin-phone-bar > .text-action { color: var(--text); text-decoration: none; }

@media (max-width: 47.99em) { /* below 768px; 768 and up is desktop. Written max-width so iOS Safari before 16.4 reads it (visual.md → Breakpoint) */
  .site-header, .site-header.is-contained { padding: var(--space-5) var(--site-margin-phone); }
  .page, .page.is-contained, .page.is-wide { grid-template-columns: var(--site-margin-phone) minmax(0, 1fr) var(--site-margin-phone); padding: var(--page-top-phone) 0 var(--block-gap-phone); row-gap: var(--block-gap-phone); }
  .column { gap: var(--block-gap-phone); }
  .block + .block { padding-top: var(--block-gap-phone); }
  .gallery { grid-template-columns: repeat(var(--tile-columns-phone), minmax(0, 1fr)); }
  .times { grid-template-columns: repeat(var(--time-columns-phone), minmax(0, 1fr)); }
  .modal-overlay { padding: 0; }
  .modal { max-width: none; min-height: 100%; padding: var(--site-margin-phone); }
  .form-grid, .form-grid.is-3 { grid-template-columns: minmax(0, 1fr); }
  .stack.is-section { gap: var(--block-gap-phone); }
  .grid { gap: var(--space-5); }
  .grid > * { grid-column: 1 / -1; }
  .large-view { padding: var(--space-4) var(--site-margin-phone); }
  /* admin only */
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-nav, .admin-bar { display: none; }
  .admin-phone-bar { display: flex; }
  .admin-content > .admin-phone-bar { position: sticky; top: 0; z-index: var(--layer-bar); background-color: var(--ground); } /* the phone's top bar stays put too (Earl, 18 Nov 2026) */
  .admin-main { padding: var(--space-6) var(--site-margin-phone) var(--space-9); }
  .page-head > .row { grid-column: 1 / -1; } /* the page's actions go under the title line */
  .page-head > .tabs-row { display: contents; } /* the list's one button moves onto the title line */
  .page-head > .tabs-row > .button { grid-column: 2; grid-row: 1; margin-bottom: 0; }
  .page-head > .tabs-row > .tabs { grid-column: 1 / -1; border-bottom: var(--border) solid var(--rule); }
  .value-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .save-bar { padding: var(--space-4) var(--site-margin-phone); }
  .drop { left: 0; right: 0; width: auto; max-height: calc(var(--screen) - var(--phone-bar) - var(--site-margin-phone)); }
  .drop.is-anchored { left: 0; right: 0; width: auto; max-width: none; } /* full width, as in place */
  .drop.is-date { min-width: 0; }
  .toast { padding: var(--space-4) var(--site-margin-phone); }
  .admin-week { display: none; } /* the phone shows the week as a day list */
  .phone-rows > .table-scroll { display: none; } /* an Admin list is P9 rows on a phone (components.md → Admin lists) */
  .phone-rows > .list { display: block; }
  .admin-month > * { padding: var(--space-1); }
}
