/* TellYours design system: the tokens and the ty- components every product screen is built from.
   Stewart, 2026-09-30: "please make sure all UI are standardized with a design system", and on the
   admin page beside the sign-up: "You can see admin and the start page its slight different even
   the view port." The look is the start page's, whose values came from the landing page.
   Every product screen loads this; do not copy styles into a page. A page's own <style> keeps only
   what no other screen has, painted from these tokens. Reference: /admin/design/.
   Light theme only, deliberately: the brand is the warm cream page. */

:root {
  color-scheme: light;

  /* Colour */
  --ty-bg: #F7F1E6;           /* the page */
  --ty-tint: #F4E4D8;         /* surface: selected option, panel, TellYours's chat bubble */
  --ty-tint-ink: #3A2418;     /* text on the tint */
  --ty-ink: #1A1714;          /* text, input underline */
  --ty-ink-2: #4A453E;        /* secondary text: lede, field label, note */
  --ty-ink-3: #5E574E;        /* ghost action, unavailable option */
  --ty-muted: #8A7F72;        /* eyebrow, hint, table heading */
  --ty-faint: #A39A8E;        /* placeholder, unselected language */
  --ty-rule: #DCD2C2;         /* hairlines */
  --ty-rule-2: #C9BFB0;       /* the separator in the language switch */
  --ty-accent: #9A4B24;       /* the one colour: actions, links, "yours" */
  --ty-accent-hover: #7A3A1A;
  --ty-surface: #FFFDF8;      /* a card or tile lifted off the page */
  /* How much has been told, rich to nothing: the chip's text colour, and the colour of its bar. */
  --ty-rich: #4F6B2E;  --ty-rich-fill: #7E9B55;
  --ty-good: #6A5A1E;  --ty-good-fill: #B9A24E;
  --ty-thin-fill: #D99A6E;  --ty-none-fill: #D7CFC2;   /* thin's text colour is the accent, nothing's is --ty-muted */

  /* Type */
  --ty-sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ty-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --ty-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --ty-mark: "Helvetica Neue", Helvetica, Arial, sans-serif;   /* the wordmark only */
  --ty-display-size: clamp(46px, 6.6vw, 92px); --ty-display-lh: 0.98;
  --ty-h1-size: clamp(34px, 7vw, 48px);        --ty-h1-lh: 1.02;
  --ty-h2-size: clamp(25px, 5vw, 30px);        --ty-h2-lh: 1.2;
  --ty-lede-size: clamp(17px, 1.5vw, 19px);    --ty-lede-lh: 1.55;
  --ty-body-size: clamp(17px, 1.5vw, 19px);    --ty-body-lh: 1.5;
  --ty-small-size: 14px;                       --ty-small-lh: 1.6;
  --ty-label-size: 13.5px;                     --ty-label-tracking: 0.06em;

  /* Space */
  --ty-space-1: 4px;  --ty-space-2: 8px;  --ty-space-3: 12px; --ty-space-4: 16px;
  --ty-space-5: 20px; --ty-space-6: 24px; --ty-space-7: 28px; --ty-space-8: 32px;
  --ty-space-9: 40px; --ty-space-10: 48px; --ty-space-11: 96px;
  --ty-gutter: clamp(16px, 5vw, 20px);
  --ty-space-top: clamp(16px, 3vw, 32px);      /* from the header to the page's first line */

  /* Shape */
  --ty-radius: 0;               /* controls are underlines and hairlines, not boxes */
  --ty-radius-sm: 3px;
  --ty-radius-bubble: 15px;
  --ty-radius-pill: 999px;

  /* Width */
  --ty-width: 640px;            /* the standard column: forms and reading pages */
  --ty-width-wide: 960px;       /* data pages: tables */
  --ty-width-site: 1240px;      /* the landing page */
}

/* Base */
* { box-sizing: border-box; }
/* Author display rules beat the UA's [hidden] rule, so a flex row the script hid stayed visible. */
[hidden] { display: none !important; }
body { margin: 0; background: var(--ty-bg); color: var(--ty-ink); font-family: var(--ty-sans);
  -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--ty-accent); text-decoration: none; }
a:hover { color: var(--ty-accent-hover); text-decoration: underline; }
::placeholder { color: var(--ty-faint); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ty-accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; }
}

/* Page container: the standard column, or the wide one for data pages. Same gutters for both. */
.ty-page { max-width: var(--ty-width); margin: 0 auto; padding: 0 var(--ty-gutter) var(--ty-space-11); }
.ty-page--wide { max-width: var(--ty-width-wide); }

/* Header: the wordmark left, one slot right (language switch or signed-in line). */
.ty-header { display: flex; align-items: center; justify-content: space-between; gap: var(--ty-space-5);
  padding: clamp(20px, 3vw, 32px) 0; }
.ty-wordmark { font-size: 21px; font-weight: 700; letter-spacing: -0.05em; font-family: var(--ty-mark); }
.ty-wordmark span { color: var(--ty-accent); }
/* Beta: the small label inside the wordmark while TellYours is in beta (Stewart, 2026-09-30: "please put a label
   beta on the logo"). Sits inside .ty-wordmark so a header's space-between layout does not move it. */
.ty-wordmark .ty-beta { display: inline-block; margin-left: 8px; padding: 1px 6px; border: 1px solid var(--ty-accent);
  border-radius: var(--ty-radius-pill); color: var(--ty-accent); font-family: var(--ty-sans); font-size: 12px;
  font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4; vertical-align: 3px; }

/* Language switch: "EN / ID"; the script writes button[aria-pressed] and span.sep inside it. */
.ty-langs { display: flex; align-items: center; gap: 14px; font-size: var(--ty-label-size);
  letter-spacing: var(--ty-label-tracking); }
.ty-langs .sep { color: var(--ty-rule-2); }
.ty-langs button { border: none; background: none; padding: 6px 0; border-radius: var(--ty-radius); cursor: pointer;
  font: inherit; font-weight: 400; color: var(--ty-faint); border-bottom: 1px solid transparent; }
.ty-langs button[aria-pressed="true"] { color: var(--ty-ink); border-bottom-color: var(--ty-ink); }

/* Headings and the opening lines of a page */
.ty-eyebrow { font-size: var(--ty-small-size); color: var(--ty-muted); margin: var(--ty-space-top) 0 18px; }
.ty-display { font-family: var(--ty-serif); font-weight: 300; font-size: var(--ty-display-size);
  line-height: var(--ty-display-lh); letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.ty-h1 { font-family: var(--ty-serif); font-weight: 300; font-size: var(--ty-h1-size);
  line-height: var(--ty-h1-lh); letter-spacing: -0.03em; margin: 0 0 var(--ty-space-5); text-wrap: balance; }
/* A title with no eyebrow above it takes the eyebrow's place below the header. */
.ty-h1:first-child { margin-top: var(--ty-space-top); }
.ty-lede { color: var(--ty-ink-2); font-size: var(--ty-lede-size); line-height: var(--ty-lede-lh);
  margin: 0 0 var(--ty-space-9); text-wrap: pretty; }
.ty-em { font-family: var(--ty-serif); font-style: italic; color: var(--ty-accent); }
.ty-small { font-size: var(--ty-small-size); color: var(--ty-muted); }
.ty-small .ty-link { font-size: inherit; }

/* Section: a hairline above, then the section heading. */
.ty-section { border-top: 1px solid var(--ty-rule); padding: var(--ty-space-7) 0 0; }
.ty-h2 { font-family: var(--ty-serif); font-weight: 300; font-size: var(--ty-h2-size);
  line-height: var(--ty-h2-lh); letter-spacing: -0.01em; margin: 0 0 18px; text-wrap: balance; }

/* Field: a label, an optional hint, and an underline input. Inputs are styled bare, so a form a
   script writes needs no class on them. */
.ty-label { font-size: var(--ty-body-size); line-height: 1.45; color: var(--ty-ink-2); display: block;
  margin: var(--ty-space-7) 0 6px; }
.ty-label:first-child { margin-top: 0; }
.ty-hint { color: var(--ty-muted); font-size: var(--ty-body-size); line-height: var(--ty-body-lh);
  margin: -6px 0 18px; white-space: pre-line; }
.ty-label + .ty-hint { margin: 0 0 6px; }
input, textarea, select { width: 100%; font: inherit; font-size: var(--ty-body-size); padding: 6px 0;
  color: var(--ty-ink); background: transparent; border: none; border-bottom: 1px solid var(--ty-ink);
  border-radius: var(--ty-radius); }
input:focus, textarea:focus, select:focus { outline: none; border-bottom-color: var(--ty-accent);
  box-shadow: 0 1px 0 var(--ty-accent); }
textarea { min-height: 6rem; line-height: var(--ty-body-lh); resize: vertical; }

/* Actions. A bare button is the secondary action; .ty-secondary names it where a class is wanted. */
.ty-actions { display: flex; gap: var(--ty-space-6); margin-top: var(--ty-space-7); align-items: center; flex-wrap: wrap; }
button, .ty-secondary { font: inherit; font-size: var(--ty-body-size); font-weight: 500; border: none; background: none;
  cursor: pointer; padding: 6px 0; border-radius: var(--ty-radius); color: var(--ty-ink); }
.ty-primary { color: var(--ty-accent); white-space: nowrap; }
.ty-primary::after { content: " →"; }
.ty-primary:hover:not(:disabled) { color: var(--ty-accent-hover); }
.ty-primary:disabled { opacity: 0.35; cursor: default; }
.ty-ghost { color: var(--ty-ink-3); font-weight: 400; }
.ty-ghost:hover { color: var(--ty-ink); }
/* CTA: the page's one big action, filled in the accent, its arrow after (Stewart, 2026-09-30, on the sign-up's last
   step: "the open whatsapp link is the centre piece"). Full width on a phone, a comfortable width centred on a desktop.
   An <a> or a <button>. */
.ty-cta { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 360px; min-height: 56px;
  margin: var(--ty-space-7) auto; padding: var(--ty-space-3) var(--ty-space-6); background: var(--ty-accent);
  color: var(--ty-bg); font: inherit; font-size: var(--ty-body-size); font-weight: 500; text-align: center;
  border: none; border-radius: var(--ty-radius-sm); cursor: pointer; transition: background .12s, transform .12s; }
.ty-cta::after { content: "\00a0→"; }
.ty-cta:hover { background: var(--ty-accent-hover); color: var(--ty-bg); text-decoration: none; }
.ty-cta:active { background: var(--ty-tint-ink); color: var(--ty-bg); transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .ty-cta:active { transform: none; } }

/* Note: a line set off by the accent rule. Panel: a block on the tint. */
.ty-note { border-left: 2px solid var(--ty-accent); padding: 2px 0 2px var(--ty-space-4);
  font-size: var(--ty-body-size); color: var(--ty-ink-2); line-height: 1.6; }
.ty-panel { background: var(--ty-tint); color: var(--ty-tint-ink); padding: var(--ty-space-4) 18px; }

/* Table: small text, a dark rule under the heading, hairlines between rows. Wrap it in
   .ty-table-wrap so a narrow screen scrolls the table, not the page. */
.ty-table-wrap { overflow-x: auto; }
.ty-table { width: 100%; border-collapse: collapse; font-size: var(--ty-small-size); }
.ty-table th { text-align: left; font-weight: 500; color: var(--ty-muted); border-bottom: 1px solid var(--ty-ink);
  padding: var(--ty-space-2) 10px var(--ty-space-2) 0; }
.ty-table td { border-bottom: 1px solid var(--ty-rule); padding: 10px 10px 10px 0; vertical-align: baseline;
  font-variant-numeric: tabular-nums; }
.ty-table td button { font-size: var(--ty-small-size); }
.ty-table td button + button { margin-left: var(--ty-space-4); }

/* Progress: one segment per step; the script writes <i> and <i class="done"> inside. */
.ty-progress { display: flex; gap: 6px; margin: 0 0 var(--ty-space-6); }
.ty-progress i { height: 2px; flex: 1; background: var(--ty-rule); transition: background 0.2s; }
.ty-progress i.done { background: var(--ty-accent); }
/* Stewart, 2026-09-30: the steps are clickable. Each <i> sits in a <button data-step>, a 24px tap target around the
   thin dash, its margin keeping the bar the height it was; [aria-current] marks the step on show, [aria-disabled]
   one not reached yet. */
.ty-progress button { flex: 1; display: flex; align-items: center; height: 24px; margin: -11px 0; padding: 0; min-width: 0; }
.ty-progress button[aria-current] i { background: var(--ty-ink); }
.ty-progress button:not([aria-disabled]):hover i { background: var(--ty-accent-hover); }
.ty-progress button[aria-disabled] { cursor: default; }

/* Step counter: "03 / 13" above a question. */
.ty-step { font-size: var(--ty-small-size); color: var(--ty-accent); margin-bottom: var(--ty-space-3); }

/* Options: a list of rows between hairlines, each numbered. The script toggles .selected, .cursor
   (the keyboard's row) and writes .unsupported on a choice this version cannot take.
   .ty-options--chips lays them out as pills that wrap, for a multiple choice or a short range. */
.ty-options { display: flex; flex-direction: column; border-top: 1px solid var(--ty-rule); }
.ty-option { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--ty-rule);
  padding: 14px var(--ty-space-3); cursor: pointer; font-size: var(--ty-body-size); line-height: 1.4;
  transition: background .12s, color .12s; }
.ty-option:hover { color: var(--ty-accent); }
.ty-option:focus-visible { outline: 2px solid var(--ty-accent); outline-offset: -2px; }
.ty-option.selected { background: var(--ty-tint); color: var(--ty-tint-ink); }
.ty-option.cursor { box-shadow: inset 2px 0 0 var(--ty-accent); }
.ty-option .n { font-size: var(--ty-small-size); color: var(--ty-muted); min-width: 1.3rem;
  font-variant-numeric: tabular-nums; }
.ty-option.selected .n { color: var(--ty-accent); }
.ty-option.unsupported { color: var(--ty-ink-3); }
.ty-options--chips { flex-direction: row; flex-wrap: wrap; gap: 10px; border-top: none; }
/* The age ranges open under the date fields; give them the same breathing room as a new row. */
.ty-date + .ty-actions + .ty-options--chips, .ty-date ~ .ty-options--chips { margin-top: var(--ty-space-5); }
.ty-options--chips .ty-option { border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-pill);
  padding: var(--ty-space-2) var(--ty-space-4); }
.ty-options--chips .ty-option.selected { border-color: var(--ty-accent); }

/* Link: an underlined action in running text's place, e.g. an honest non-answer ("I'm not sure"). */
.ty-link { color: var(--ty-accent); font-weight: 400; font-size: var(--ty-body-size); text-decoration: underline;
  text-underline-offset: 3px; }
/* Pressed: the non-answer is chosen for its field. It reads as an answer given, not a link still to press. */
.ty-link[aria-pressed="true"] { color: var(--ty-ink); text-decoration: none; font-weight: 500; }
.ty-link[aria-pressed="true"]::before { content: "\2713\00a0"; color: var(--ty-accent); }

/* Date: year, month and day side by side, stacked on a narrow screen. */
.ty-date { display: grid; grid-template-columns: 1fr 1.3fr .8fr; gap: 18px; }
.ty-date label { font-size: var(--ty-small-size); color: var(--ty-muted); display: block; margin-bottom: var(--ty-space-1); }
.ty-date input, .ty-date select { font-variant-numeric: tabular-nums; }
@media (max-width: 26rem) { .ty-date { grid-template-columns: 1fr; } }

/* Why: the footnote under a question that says why it is asked, its lead word in <b>. */
.ty-why { color: var(--ty-muted); font-size: var(--ty-small-size); line-height: 1.6; margin-top: var(--ty-space-8);
  border-top: 1px solid var(--ty-rule); padding-top: 14px; }
.ty-why b { color: var(--ty-ink-3); font-weight: 500; }

/* Keys: the keyboard hints, each key in <kbd>. A phone has no keyboard shortcuts to show. */
.ty-keys { margin-top: var(--ty-space-6); font-size: var(--ty-small-size); color: var(--ty-muted);
  display: flex; gap: 18px; flex-wrap: wrap; }
.ty-keys kbd { font: inherit; border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm);
  padding: 1px 5px; margin-right: var(--ty-space-1); }
@media (hover: none) and (pointer: coarse) { .ty-keys { display: none; } }

/* Bubble: a chat message from TellYours, on the tint, its speaker in .who. */
.ty-bubble { border-radius: var(--ty-radius-bubble) var(--ty-radius-bubble) 4px var(--ty-radius-bubble);
  background: var(--ty-tint); padding: var(--ty-space-3) 15px; font-size: var(--ty-body-size); line-height: 1.5;
  color: var(--ty-tint-ink); margin: 0 0 var(--ty-space-8); }
.ty-bubble .who { font-size: var(--ty-small-size); font-weight: 500; color: var(--ty-accent); display: block;
  margin-bottom: var(--ty-space-1); }

/* Summary: what was answered, as a <dl> of small labels over the answers. */
.ty-summary { margin: var(--ty-space-7) 0 0; }
.ty-summary dt { font-size: var(--ty-small-size); color: var(--ty-muted); margin-top: var(--ty-space-4); }
.ty-summary dd { margin: var(--ty-space-1) 0 0; font-size: var(--ty-body-size); }

/* Code: a code to copy or send, large and spaced, between hairlines. */
.ty-code { font-family: var(--ty-serif); font-weight: 300; font-size: 40px; letter-spacing: .16em;
  color: var(--ty-accent); border-top: 1px solid var(--ty-rule); border-bottom: 1px solid var(--ty-rule);
  padding: 14px 0; text-align: center; margin: var(--ty-space-2) 0 0; font-variant-numeric: tabular-nums; }

/* Waiting: a pulsing dot and a line while something is awaited. Badge: a small outlined tag. */
.ty-waiting { display: flex; align-items: center; gap: 10px; color: var(--ty-muted); font-size: var(--ty-small-size);
  margin-top: 22px; flex-wrap: wrap; }
.ty-waiting .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ty-accent);
  animation: ty-pulse 1.6s ease-in-out infinite; }
@keyframes ty-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ty-waiting .dot { animation: none; opacity: .7; } }
.ty-badge { font-size: var(--ty-small-size); color: var(--ty-muted);
  border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-pill); padding: 2px var(--ty-space-2); }

/* Signed in: the "Signed in as … · Not you?" line under the header. */
.ty-signedin { font-size: var(--ty-small-size); color: var(--ty-muted); margin: 0; }

/* Added 2026-10-11 for the dashboard (the story wall), Stewart: "make sure to follow the design system". */

/* CTA, unavailable: the page's big action when what it needs is not met yet. The reason sits beside it in a .ty-note. */
.ty-cta:disabled { opacity: 0.35; cursor: default; background: var(--ty-accent); }
.ty-cta:disabled:hover { background: var(--ty-accent); }
.ty-cta:disabled:active { transform: none; }

/* Meter: how far along, as one filled bar; the script sets --ty-meter-value (a percentage) on it, and --ty-meter-mark
   on the optional <u> inside to show a bar to clear (the 80% to generate). The stepped .ty-progress is for steps. */
.ty-meter { position: relative; height: 6px; background: var(--ty-rule); margin: var(--ty-space-2) 0; }
.ty-meter i { display: block; height: 100%; width: var(--ty-meter-value, 0%); background: var(--ty-accent); transition: width 0.2s; }
.ty-meter u { position: absolute; top: -4px; bottom: -4px; left: var(--ty-meter-mark, 0%); width: 2px; background: var(--ty-ink); }
/* Meter --indeterminate: work whose total is not known, so no value (and no aria-valuenow): a band travels along the bar. With reduced motion the band stands still. */
.ty-meter--indeterminate { overflow: hidden; }
.ty-meter--indeterminate i { width: 35%; animation: ty-meter-travel 1.6s ease-in-out infinite alternate; }
@keyframes ty-meter-travel { from { transform: translateX(0); } to { transform: translateX(185%); } }
@media (prefers-reduced-motion: reduce) { .ty-meter--indeterminate i { animation: none; transform: translateX(90%); } }
/* A bar that follows a waiting line closely: the line, then how far it has got. */
.ty-waiting + .ty-meter-block { margin-top: var(--ty-space-3); }

/* List and item: rows between hairlines. An item holds a lead line in <b>, its text, a .ty-small line, and a .ty-actions
   row of what can be done with it (an input in it is bare, as everywhere). Badge --done: the accent tag, a thing settled. */
.ty-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ty-rule); }
.ty-item { border-bottom: 1px solid var(--ty-rule); padding: var(--ty-space-4) 0; font-size: var(--ty-body-size); line-height: var(--ty-body-lh); }
.ty-item b { font-weight: 500; }
.ty-item .ty-small { display: block; margin-top: var(--ty-space-1); }
.ty-item.ty-saved { border-left: 2px solid var(--ty-accent); padding-left: var(--ty-space-4); }
.ty-item .ty-actions { margin-top: var(--ty-space-3); gap: var(--ty-space-5); }
.ty-item .ty-actions button { font-size: var(--ty-small-size); }
.ty-note + .ty-list { margin-top: var(--ty-space-4); }
.ty-list + .ty-note { margin-top: var(--ty-space-6); }
.ty-note + .ty-hint { margin-top: var(--ty-space-4); }
.ty-badge--done { color: var(--ty-accent); border-color: var(--ty-accent); }

/* Fold: a section the reader opens, on a <details>; its <summary> is the heading. */
.ty-fold { border-bottom: 1px solid var(--ty-rule); }
.ty-fold:first-of-type { border-top: 1px solid var(--ty-rule); }
.ty-fold summary { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ty-space-4); cursor: pointer;
  padding: var(--ty-space-4) 0; list-style: none; font-family: var(--ty-serif); font-weight: 300; font-size: 22px; }
.ty-fold summary::-webkit-details-marker { display: none; }
.ty-fold summary::after { content: "+"; color: var(--ty-accent); font-family: var(--ty-sans); }
.ty-fold[open] summary::after { content: "\2212"; }
.ty-fold summary:focus-visible { outline: 2px solid var(--ty-accent); outline-offset: 3px; }
.ty-fold .ty-list { border-top: none; margin-bottom: var(--ty-space-4); }

/* Tree: a family by generation, oldest at the top, one .ty-tree-row of .ty-node boxes per generation, headed by a
   .ty-small label. It scrolls inside its own box, never the page. A node holds the name in <b> and how they relate in
   <span>; --self marks the person the story is about, --gap a person mentioned and never named. */
.ty-tree { overflow-x: auto; border: 1px solid var(--ty-rule); padding: var(--ty-space-4); margin-bottom: var(--ty-space-4); }
.ty-tree-row { display: flex; flex-wrap: nowrap; gap: var(--ty-space-3); margin: 0 0 var(--ty-space-5); min-width: max-content; }
.ty-tree-row:last-child { margin-bottom: 0; }
.ty-tree-gen { font-size: var(--ty-small-size); color: var(--ty-muted); margin: 0 0 var(--ty-space-2); }
.ty-node { border: 1px solid var(--ty-rule-2); border-radius: var(--ty-radius-sm); padding: var(--ty-space-2) var(--ty-space-3); font-size: var(--ty-small-size); line-height: 1.4; }
.ty-node b { display: block; font-weight: 500; font-size: 16px; }
.ty-node span { color: var(--ty-muted); }
.ty-node--self { background: var(--ty-tint); color: var(--ty-tint-ink); border-color: var(--ty-accent); }
.ty-node--self span { color: var(--ty-tint-ink); }
.ty-node--gap { border-style: dashed; color: var(--ty-ink-3); }

/* Added 2026-10-17 for the Storyboard (the dashboard's new page), Stewart: "we already have the artifact right? We can start
   bringing that alive?" Ported from the prototype at tools/storyboard-prototype, painted from the tokens above. */

/* Site width: the cockpit page (a side menu and a wide column) takes the 1240px site width. */
.ty-page--site { max-width: var(--ty-width-site); }
/* A narrow column inside a site-width page, for a sign-in or a message. */
.ty-column { max-width: var(--ty-width); }
.ty-column > .ty-h2:first-child { margin-top: var(--ty-space-top); }

/* App header: the wordmark and the page's name left, the signed-in line right (it shrinks; "Not you?" never does). */
.ty-header--app { flex-wrap: wrap; row-gap: var(--ty-space-1); }
.ty-brand { display: flex; align-items: center; flex: none; }
.ty-brand .ty-wordmark { white-space: nowrap; }
.ty-pagename { font-size: var(--ty-label-size); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--ty-muted);
  margin: 0 0 0 var(--ty-space-3); }
.ty-header > .ty-signedin { display: flex; gap: var(--ty-space-1); min-width: 0; white-space: nowrap; }
.ty-header > .ty-signedin .who { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ty-header > .ty-signedin a { flex: none; }
@media (max-width: 520px) { .ty-header--app > .ty-signedin { flex: 1 1 100%; } }

/* Story bar: the story's portrait on the left, the story switcher on the right. Display only until stories can change. */
.ty-storybar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ty-space-2) var(--ty-space-3); padding: 0 0 var(--ty-space-4);
  border-bottom: 1px solid var(--ty-rule); min-width: 0; }
/* The profile photo is a button (Order MD): it opens the picker of the photos in Media. */
.ty-portrait { display: flex; align-items: center; gap: var(--ty-space-2); min-width: 0; font-size: var(--ty-small-size); font-weight: 400;
  color: var(--ty-muted); padding: 0; min-height: 44px; text-align: left; }
.ty-portrait:hover .pt { color: var(--ty-ink); text-decoration: underline; }
.ty-portrait .pc { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--ty-rule-2); background: var(--ty-surface); color: var(--ty-muted); font-family: var(--ty-serif); font-size: 14px; }
/* The profile photo in the slot (MED2-6): the picture is placed by the page so the buyer's circle fills the round slot. */
.ty-portrait .pc--photo { position: relative; overflow: hidden; border: 1px solid var(--ty-rule-2); }
.ty-portrait .pc--photo img { position: absolute; max-width: none; object-fit: cover; }
.ty-portrait .pt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-storypick { margin-left: auto; display: flex; align-items: center; gap: var(--ty-space-3); flex: none; min-width: 0; }
.ty-switcher { width: auto; max-width: 46vw; font-size: 15px; padding: 6px 30px 6px 10px; border: 1px solid var(--ty-rule);
  border-radius: var(--ty-radius-sm); background-color: var(--ty-surface); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ty-muted) 50%), linear-gradient(135deg, var(--ty-muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
  overflow: hidden; text-overflow: ellipsis; } /* WebKit counts the selected option's whole text as the select's scrollable overflow even when the box is narrower, so a long story title made the page scroll sideways at 390 px (OX130 Slice B check, 24 Nov): clipped here, shown with an ellipsis */
/* End story capture (the Storyboard's story bar): at the right end of the row with the profile photo; the question opens under the row, and once the story has ended the same place is quiet words. */
.ty-endslot { flex: none; display: flex; align-items: center; min-width: 0; }
.ty-endslot:empty { display: none; }
.ty-ended { color: var(--ty-muted); font-size: 15px; white-space: nowrap; }
.ty-endask { flex: 1 1 100%; min-width: 0; }
.ty-endask[hidden] { display: none; }
.ty-tick { display: flex; align-items: center; gap: var(--ty-space-2); min-height: 44px; margin-top: var(--ty-space-2); cursor: pointer; }
.ty-tick input { width: 20px; height: 20px; flex: none; accent-color: var(--ty-accent); }
/* Story language (the Output tab): the family's own language and English, side by side; the current one is aria-pressed. */
.ty-lang { margin-top: var(--ty-space-2); display: flex; align-items: center; flex-wrap: wrap; gap: var(--ty-space-1) 0; min-width: 0; }
.ty-lang [role="alert"] { margin-left: var(--ty-space-3); }
.ty-lang[hidden] { display: none; }
.ty-lang button { font-size: 15px; padding: 5px 12px; border: 1px solid var(--ty-rule); background: var(--ty-surface); color: var(--ty-ink); cursor: pointer; }
.ty-lang button:first-of-type { border-radius: var(--ty-radius-sm) 0 0 var(--ty-radius-sm); }
.ty-lang button + button { border-radius: 0 var(--ty-radius-sm) var(--ty-radius-sm) 0; margin-left: -1px; }
.ty-lang button[aria-pressed="true"] { background: var(--ty-accent); border-color: var(--ty-accent); color: var(--ty-surface); cursor: default; }
.ty-lang button:disabled { opacity: 0.6; cursor: default; }
.ty-switcher:focus, .ty-switcher:focus-visible { outline: 2px solid var(--ty-accent); outline-offset: 2px; box-shadow: none; }
/* Soon: a control or section that is not built yet. Plain dimmed words with a .ty-badge, never a button. */
.ty-soon { display: inline-flex; align-items: baseline; gap: var(--ty-space-2); color: var(--ty-muted); font-size: 15px; cursor: default; white-space: nowrap; }
@media (max-width: 520px) {
  .ty-lang button { flex: 1 1 0; }
  .ty-portrait { flex: none; }
  .ty-portrait .pt { display: none; }
  .ty-storypick { flex: 1 1 0; }
  .ty-endslot { flex: 1 1 100%; justify-content: flex-end; } /* the row wraps: the button (or "Story ended") takes its own line, at the right */
  .ty-switcher { flex: 1 1 auto; min-width: 0; max-width: none; }
  .ty-storypick { gap: var(--ty-space-2); }
}

/* Cockpit: a menu of sections beside the section on show (above it on a phone). The current section is
   button[aria-current]; a section not built yet is .ty-soon inside it. */
.ty-cockpit { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; margin-top: var(--ty-space-5); }
.ty-side { display: flex; flex-direction: column; gap: var(--ty-space-1); position: sticky; top: var(--ty-space-4); align-self: start; }
.ty-side button { text-align: left; border-left: 2px solid transparent; padding: var(--ty-space-2) var(--ty-space-3);
  color: var(--ty-ink-2); font-size: 16px; font-weight: 400; }
.ty-side button:hover { color: var(--ty-ink); }
.ty-side button:focus-visible { outline-offset: -2px; }
.ty-side button[aria-current="page"] { border-left-color: var(--ty-accent); color: var(--ty-ink); background: var(--ty-tint); }
.ty-side .ty-soon { flex-direction: column; align-items: flex-start; gap: 0; padding: var(--ty-space-2) var(--ty-space-3); font-size: 16px; }
.ty-side .ty-soon small { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.ty-cockpit [tabindex="-1"]:focus { outline: none; }
/* A family published on life (board 1): the sections run along the story bar's row, so the cockpit is one column, and the Story tab is the list of chapters beside the chapters. */
.ty-cockpit--life { grid-template-columns: minmax(0, 1fr); }
.ty-storybar--life .ty-portrait .pt { display: none; }
.ty-navslot { min-width: 0; }
.ty-navslot .ty-side { flex-direction: row; flex-wrap: wrap; position: static; align-self: center; gap: 0 var(--ty-space-2); }
.ty-navslot .ty-side button { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.ty-navslot .ty-side button[aria-current="page"] { border-bottom-color: var(--ty-accent); background: none; }
.ty-lifegrid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
/* The chapter list scrolls inside itself when it is taller than the window (Order SBR-A4 part 1), so its last chapter can be reached without scrolling the whole story; a phone has it in the flow, whole. */
.ty-lifelist { position: sticky; top: var(--ty-space-4); max-height: calc(100dvh - 2 * var(--ty-space-4)); overflow-y: auto; }
.ty-lifelist .ty-small { display: block; margin-top: var(--ty-space-1); }
.ty-lifelist .ty-link { text-align: left; } /* a button centres its text, which shows once a title wraps in the narrow column */
/* The facts panel on top of the Story tab (Order SBR-A2), above the chapter list and the chapters: a compact grid of label and value pairs. */
.ty-facts { padding-bottom: var(--ty-space-4); border-bottom: 1px solid var(--ty-rule); }
.ty-facts .ty-small { margin: 0 0 var(--ty-space-2); }
.ty-facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--ty-space-3) var(--ty-space-6); margin: 0; }
.ty-facts dt { font-size: var(--ty-small-size); color: var(--ty-muted); }
.ty-facts dd { margin: var(--ty-space-1) 0 0; font-size: var(--ty-body-size); overflow-wrap: anywhere; }
@media (max-width: 820px) { .ty-lifegrid { grid-template-columns: minmax(0, 1fr); } .ty-lifelist { position: static; max-height: none; overflow: visible; } }
@media (max-width: 520px) {
  .ty-storybar--life .ty-navslot { flex: 1 1 100%; order: 3; }
  .ty-storybar--life .ty-navslot .ty-side { flex-wrap: nowrap; overflow-x: auto; }
  .ty-storybar--life .ty-endslot { order: 4; }
}
@media (max-width: 820px) {
  .ty-cockpit { grid-template-columns: minmax(0, 1fr); }
  .ty-side { flex-direction: row; overflow-x: auto; position: static; border-bottom: 1px solid var(--ty-rule); }
  .ty-side button { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .ty-side button[aria-current="page"] { border-bottom-color: var(--ty-accent); }
  .ty-side .ty-soon { white-space: nowrap; flex: none; }
}

/* Card: a block on the surface with a hairline. Kicker: the small capital label that heads one. */
.ty-card { background: var(--ty-surface); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm); padding: var(--ty-space-4); }
.ty-kicker { font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ty-muted); }
.ty-stack > * + * { margin-top: var(--ty-space-8); }
.ty-card > .ty-kicker { margin-bottom: var(--ty-space-3); }
.ty-card .ty-lede { margin: 0 0 var(--ty-space-2); }
.ty-card .ty-note { margin-top: var(--ty-space-3); }
.ty-card .ty-fold { margin-top: var(--ty-space-4); }
.ty-card .ty-fold h3.ty-kicker { margin: 14px 0 4px; }

/* Tiles: a few figures side by side, each a .ty-tile of .ty-kicker, .ty-tile-num and .ty-tile-sub. Not buttons. */
.ty-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--ty-space-3); }
.ty-tile { background: var(--ty-surface); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm);
  padding: 14px var(--ty-space-4); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ty-tile-num { font-family: var(--ty-serif); font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.ty-tile-sub { font-size: 13.5px; color: var(--ty-ink-2); overflow-wrap: anywhere; }
.ty-tile .ty-meter { margin: var(--ty-space-1) 0 0; }
/* A tile that opens a section is a button: .ty-tile--go. Plain tiles are never clickable. */
button.ty-tile--go { align-items: flex-start; text-align: left; font-weight: 400; color: var(--ty-ink); cursor: pointer; }
button.ty-tile--go:hover { border-color: var(--ty-accent); }
button.ty-tile--go:focus-visible { outline-offset: 2px; }

/* Chip: how much has been told, in a word. --rich, --good, --thin, --none, --done (a thin chapter told as much as there is); none of them is the default (still being sorted). */
.ty-chip { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; border: 1px solid currentColor;
  border-radius: var(--ty-radius-pill); padding: 1px 7px; white-space: nowrap; color: var(--ty-muted); display: inline-block; }
.ty-chip--rich { color: var(--ty-rich); }
.ty-chip--good { color: var(--ty-good); }
.ty-chip--thin { color: var(--ty-accent); }
.ty-chip--none { color: var(--ty-muted); }
.ty-chip--done { color: var(--ty-rich); }

/* Bars: one row per chapter, the name, a three-step bar for how much, the chip, and under it the one-line gap. A row is a button
   that opens the chapter. */
.ty-bars { display: flex; flex-direction: column; gap: var(--ty-space-3); }
.ty-bar-row { display: grid; grid-template-columns: minmax(96px, 170px) minmax(0, 1fr) 10.5rem; gap: var(--ty-space-3); align-items: center;
  width: calc(100% + 16px); margin: 0 -8px; padding: 6px 8px; border-radius: var(--ty-radius-sm); text-align: left;
  font-size: 15px; font-weight: 400; }
.ty-bar-row:hover { background: var(--ty-tint); }
.ty-bar-row:focus-visible { outline-offset: 0; }
.ty-bar-row .track { height: 14px; background: var(--ty-rule); border-radius: 2px; overflow: hidden; }
.ty-bar-row .track i { display: block; height: 100%; width: 0; background: var(--ty-none-fill); }
.ty-bar-row--thin .track i { width: 33%; background: var(--ty-thin-fill); }
.ty-bar-row--good .track i { width: 66%; background: var(--ty-good-fill); }
.ty-bar-row--rich .track i { width: 100%; background: var(--ty-rich-fill); }
.ty-bar-row .chip-cell { text-align: right; white-space: nowrap; }
.ty-bar-row .chip-cell::after { content: " ›"; color: var(--ty-accent); }
.ty-bar-row .gap { grid-column: 1 / -1; font-size: 13.5px; color: var(--ty-ink-2); line-height: 1.4; margin-top: -4px; font-weight: 400; }
@media (max-width: 560px) { .ty-bar-row { grid-template-columns: 100px minmax(0, 1fr) 7rem; } .ty-bar-row--done .chip-cell { grid-column: 1 / -1; } } /* the long "As much as there is" chip takes the row's second line on a phone */

/* Chapter: one chapter's draft. A head (title, chip, years, "Draft"), the prose, what is missing, what TellYours asks next. Each
   sentence ends in a .ty-edit button that opens its receipts. */
.ty-chapters { display: flex; flex-direction: column; gap: 18px; }
.ty-chapter { background: var(--ty-surface); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm);
  padding: 18px 20px; scroll-margin-top: var(--ty-space-4); }
.ty-chapter:focus { outline: none; }
.ty-chapter.focus { border-color: var(--ty-accent); box-shadow: 0 0 0 3px var(--ty-tint); }
.ty-chapter-head { display: flex; align-items: center; gap: var(--ty-space-3); flex-wrap: wrap; position: relative; }
.ty-chapter-head h3 { margin: 0; font-family: var(--ty-serif); font-size: 22px; font-weight: 500; }
.ty-chapter-head .tag { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ty-muted); }
.ty-chapter-top { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--ty-space-3); } /* the title's own row: "Chapter N", the title, and the three dots at the right (Order SBUI, SP item 2) */
.ty-chapter-top h3 { flex: 1 1 12ch; min-width: 0; }
.ty-chapter--hidden .ty-chapter-top h3 { flex-basis: 6ch; } /* a chapter that is out of the story has "Not in the story" after its title (Order OX25): the title gives way, so the label and the dots stay on its row */
@media (max-width: 560px) { .ty-chapter-top > .ty-small { flex-basis: 100%; } } /* on a phone "Chapter N" stands above the title, so the title and its dots share one row */
.ty-dots { min-width: 44px; padding-inline: 0; font-size: 20px; line-height: 1; text-align: center; }
.ty-chapter-top .ty-dots { min-height: 44px; font-size: 24px; }
.ty-chapter-top .ty-dots:hover, .ty-chapter-top .ty-dots[aria-expanded="true"] { background: var(--ty-tint); }
.ty-chapter-head .ty-menu[role=menu] { left: auto; right: 0; min-width: min(15rem, calc(100vw - 2 * var(--ty-gutter))); } /* a chapter's own menu hangs from the right of the dots, so it never runs off a phone */
.ty-chapter--hidden > :not(.ty-chapter-head) { opacity: 0.55; } /* left out of the story by the buyer (Order CH): listed, muted */
.ty-chapter-body { max-width: 68ch; margin-top: var(--ty-space-3); }
.ty-chapter-body > * + * { margin-top: var(--ty-space-3); }
.ty-chapter .ty-note { font-size: 15px; }
.ty-prose { font-family: var(--ty-serif); font-size: 18px; line-height: 1.6; margin: 0; }
.ty-prose + .ty-prose { margin-top: var(--ty-space-3); }
/* What the story does not tell yet (STY-4): a fold under the story, its heading as quiet as a note. */
.ty-chapter-body .ty-fold, #unfiled .ty-fold { margin-bottom: var(--ty-space-3); }
.ty-chapter-body .ty-fold summary, #unfiled .ty-fold summary { font-family: var(--ty-sans); font-size: 15px; font-weight: 400; color: var(--ty-ink-2); padding: var(--ty-space-3) 0; }
.ty-empty { font-family: var(--ty-serif); font-size: 18px; color: var(--ty-muted); margin: 0; }
.ty-edit { font-size: 12px; line-height: 1; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--ty-accent);
  background: var(--ty-surface); color: var(--ty-accent); vertical-align: middle; margin: 0 var(--ty-space-2) 0 3px; }
.ty-edit[aria-expanded="true"] { background: var(--ty-accent); color: var(--ty-surface); }
.ty-edit:focus-visible { outline-offset: 2px; }
.ty-dots { display: inline-block; vertical-align: middle; }
.ty-edit .ty-dots { display: block; margin: auto; }
.ty-small .ty-dots { vertical-align: -3px; }
.ty-chapter-gap { font-size: 14.5px; color: var(--ty-ink-2); margin: 0; }
.ty-chapter-gap b { color: var(--ty-ink); font-weight: 500; }

/* Photos (Order PH-5): a chapter's photos as a row of square thumbnails under its title (.ty-photos, each a .ty-photo button holding an image). The selected one opens in the photo view (.ty-photo-view, Order MD): the picture with
   Back, Delete, previous and next, beside the Info panel (.ty-view-info: caption, chapter, date, and what the family said), which sits below the picture on a phone. */
.ty-photos { list-style: none; margin: var(--ty-space-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ty-space-2); }
.ty-photo { display: block; width: 96px; height: 96px; padding: 0; border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm); background: var(--ty-tint); overflow: hidden; cursor: pointer; }
.ty-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ty-photo[aria-expanded="true"] { border-color: var(--ty-accent); box-shadow: 0 0 0 3px var(--ty-tint); }
/* A life chapter's photos above their paragraph (Order PH2): the photos and videos not placed on a paragraph are one row under the title (.ty-row--top); one the buyer put on a paragraph (.ty-para) shows in a row (.ty-row) just before it. A row of five or more folds after three
   (.ty-more). The paragraph, or the top row, a photo is held over is marked (.ty-drop). */
.ty-row { margin: 0 0 var(--ty-space-3); }
.ty-row .ty-photos { margin-top: 0; }
.ty-row--top { margin-top: var(--ty-space-3); padding: var(--ty-space-3); background: var(--ty-bg); border-radius: var(--ty-radius-sm); }
.ty-row--top .ty-small { margin: 0 0 var(--ty-space-2); }
/* Order OX28 (the founder, 2 Nov): on a wide screen the top row stays in view while its chapter is scrolled (Order OX31, 2 Nov: only while it holds a photo; an empty row scrolls with the page), so a photo can be dragged onto any paragraph; it stops where the chapter's article ends, and a tall row scrolls inside itself. */
@media (min-width: 900px) { .ty-chapter > .ty-row--held { position: sticky; top: var(--ty-space-2); z-index: 5; max-height: 40vh; overflow-y: auto; } }
.ty-more { width: 96px; height: 96px; padding: 0; border: 1px dashed var(--ty-rule); border-radius: var(--ty-radius-sm); background: none; color: var(--ty-accent); font: inherit; cursor: pointer; }
.ty-para { padding: 0 var(--ty-space-2); margin-inline: calc(-1 * var(--ty-space-2)); border-radius: var(--ty-radius-sm); }
.ty-drop { background: var(--ty-tint); box-shadow: inset 0 0 0 2px var(--ty-accent); }
.ty-para.ty-drop::before { content: "Drop to show it before this paragraph"; display: block; margin-bottom: var(--ty-space-2); font: 500 12px var(--ty-sans); color: var(--ty-accent); }
.ty-photo-view { position: fixed; inset: 0; z-index: 40; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); background: var(--ty-ink); color: var(--ty-bg); }
.ty-photo-view:focus { outline: none; }
.ty-view-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ty-view-bar { display: flex; align-items: center; gap: var(--ty-space-3); padding: var(--ty-space-2) var(--ty-space-3); }
.ty-view-gap { flex: 1; }
.ty-view-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--ty-space-2); min-width: 44px; min-height: 44px; padding: 0 var(--ty-space-2); color: inherit; border-radius: var(--ty-radius-sm); }
.ty-view-btn:hover { background: color-mix(in srgb, var(--ty-bg) 16%, transparent); }
.ty-view-btn:focus-visible { outline-color: var(--ty-bg); }
.ty-view-btn svg { width: 24px; height: 24px; }
.ty-view-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: var(--ty-space-3); padding: 0 var(--ty-space-3); }
.ty-view-stage img, .ty-view-stage video { display: block; min-width: 0; max-width: 100%; max-height: calc(100dvh - 9rem); object-fit: contain; border-radius: var(--ty-radius-sm); }
.ty-view-stage audio { width: min(100%, 28rem); }
.ty-photo-view figcaption { padding: var(--ty-space-3) var(--ty-space-4); font-size: 15px; text-align: center; }
.ty-view-info { background: var(--ty-surface); color: var(--ty-ink); padding: var(--ty-space-5) var(--ty-space-6); overflow-y: auto; display: flex; flex-direction: column; gap: var(--ty-space-4); min-width: 0; }
.ty-view-info .ty-h2 { margin: 0; }
.ty-view-info .ty-label { margin: 0 0 var(--ty-space-1); font-size: var(--ty-label-size); letter-spacing: var(--ty-label-tracking); text-transform: uppercase; color: var(--ty-ink-3); }
.ty-view-info .ty-small { margin: var(--ty-space-1) 0 0; }
.ty-view-info .ty-receipts { margin: 0; }
.ty-view-info .ty-receipt { white-space: pre-line; }
.ty-field { display: flex; flex-direction: column; }
@media (max-width: 800px) {
  .ty-photo-view { grid-template-columns: minmax(0, 1fr); grid-template-rows: max-content max-content; align-content: start; overflow-y: auto; }
  .ty-view-stage { padding: 0 var(--ty-space-2); }
  .ty-view-stage img, .ty-view-stage video { max-height: 55dvh; }
  .ty-view-info { overflow: visible; padding: var(--ty-space-4); }
}
/* On a phone the previous and next arrows sit over the photo's edges and the photo takes the full width (Order OX43, Codex 1149; as the finished story's viewer does, Order OX18); the buttons keep their 44 px targets on a dark disc */
@media (max-width: 608px) {
  .ty-view-stage { position: relative; padding: 0; }
  .ty-view-stage img, .ty-view-stage video { width: 100%; border-radius: 0; }
  .ty-view-stage > .ty-view-btn[data-ph] { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; padding: 0; border-radius: 50%; background: color-mix(in srgb, var(--ty-ink) 65%, transparent); color: var(--ty-bg); }
  .ty-view-stage > [data-ph=prev] { left: var(--ty-space-2); }
  .ty-view-stage > [data-ph=next] { right: var(--ty-space-2); }
}
.ty-chapter > .ty-small { margin: var(--ty-space-2) 0 0; }
/* What the family said about an opened photo (Order MED-4): the captions sit on the surface inside the photo's tinted ground, line breaks kept. */

/* Media (Order MED-3): every photo as a square tile with its label (a .ty-chip: its chapter's name, or Unsorted) and, when the family described it, the first line of what they said. The opened photo is the
   .ty-photo-view above the grid. A removed photo is a row in the list under it, with its way back. */
/* Videos and voice notes in Media (MED2-8): a video tile is its first frame with a play mark, a voice note a mark with its words; the viewer holds the player. */
.ty-photo { position: relative; }
.ty-photo video, .ty-photo .ty-tile-media { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ty-play { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; display: grid; place-items: center; background: var(--ty-accent); color: var(--ty-surface); }
.ty-voice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--ty-space-1); width: 100%; height: 100%; background: var(--ty-tint); color: var(--ty-tint-ink); font-size: var(--ty-small-size); }
/* Upload (MED2-6-UP): a panel under the filter with a drop area, the chapter to put the files in, and a line for each file with its progress. */
.ty-media-actions { display: flex; gap: var(--ty-space-5); align-items: baseline; }
.ty-uploadpanel { display: flex; flex-direction: column; gap: var(--ty-space-4); padding: var(--ty-space-4); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm); background: var(--ty-surface); }
.ty-drop { display: grid; place-items: center; text-align: center; padding: var(--ty-space-8) var(--ty-space-4); border: 2px dashed var(--ty-rule-2); border-radius: var(--ty-radius-sm); color: var(--ty-ink-2); }
.ty-drop--over { border-color: var(--ty-accent); background: var(--ty-tint); color: var(--ty-tint-ink); }
.ty-filepick { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ty-filepick:focus-visible + * { outline: 2px solid var(--ty-accent); }
.ty-drop:focus-within { border-color: var(--ty-accent); }
.ty-uploadrow { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--ty-space-3) var(--ty-space-4); }
.ty-uploadrow select { width: auto; min-width: 11rem; max-width: 100%; }
.ty-uploadrow .ty-label { margin: 0; }
.ty-upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--ty-space-1) var(--ty-space-4); align-items: baseline; }
.ty-upload-name { overflow-wrap: anywhere; }
.ty-upload-row progress { grid-column: 1 / -1; width: 100%; height: 6px; accent-color: var(--ty-accent); }
.ty-upload-row .ty-link { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 560px) { .ty-uploadrow select { flex: 1 1 100%; } }
/* Selection (MED2-6, Order TO): the filter and Upload on one line; a circle on each tile (top left) ticks it, and the bar over the grid is fixed at the top of the screen while any is ticked. */
.ty-media-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--ty-space-4); flex-wrap: wrap; }
.ty-media li, .ty-linkcards--media li { position: relative; }
/* Order MD, like Google Photos: the circle shows on hover, and on every tile while any is ticked (always on a touch screen, which has no hover); a ticked tile is tinted with its photo shrunk inside and a filled check in the accent. */
.ty-pick { position: absolute; top: var(--ty-space-2); left: var(--ty-space-2); width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--ty-surface); background: color-mix(in srgb, var(--ty-ink) 28%, transparent); color: var(--ty-surface); display: grid; place-items: center; cursor: pointer; font-size: 14px; line-height: 1; opacity: 0; transition: opacity .1s; }
.ty-pick::after { content: "\2713"; opacity: 0; }
.ty-pick:hover::after, .ty-pick[aria-pressed="true"]::after { opacity: 1; }
.ty-media li:hover .ty-pick, .ty-linkcards--media li:hover .ty-pick, .ty-media--selecting .ty-pick, .ty-pick:focus-visible, .ty-pick[aria-pressed="true"] { opacity: 1; }
.ty-pick[aria-pressed="true"] { background: var(--ty-accent); border-color: var(--ty-accent); }
@media (hover: none) { .ty-pick { opacity: 1; } }
.ty-media li { border-radius: var(--ty-radius-sm); transition: background .12s; }
.ty-media .ty-photo { transition: transform .14s, border-radius .14s; }
.ty-media li.ty-picked { background: var(--ty-tint); }
/* Order LK: a link card (Media) has the same circle, at the card's top right so it does not cover the Map or Page kicker; a ticked card takes the tint. */
.ty-linkcards--media .ty-pick { left: auto; right: var(--ty-space-2); }
.ty-linkcards--media li.ty-picked .ty-linkcard { background: var(--ty-tint); border-color: var(--ty-accent); }
.ty-media li.ty-picked .ty-photo { transform: scale(.84); border-radius: 10px; }
.ty-selectbar { position: fixed; top: 0; margin: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; flex-wrap: wrap; gap: var(--ty-space-1) var(--ty-space-3); padding: var(--ty-space-2) var(--ty-space-4); background: var(--ty-accent); color: var(--ty-surface); box-shadow: 0 2px 10px color-mix(in srgb, var(--ty-ink) 18%, transparent); }
/* Order SBR-A3 (the founder): the bar is the brand brown with light text (6.2 : 1); its own controls follow, with a light hover and focus ring; the menus that open from it keep their cream surface. */
.ty-selectbar > .ty-link, .ty-selectbar > .ty-menu-wrap > .ty-bar-btn, .ty-selectbar > .ty-small { color: var(--ty-surface); }
.ty-selectbar > .ty-link:hover, .ty-selectbar > .ty-menu-wrap > .ty-bar-btn:hover, .ty-selectbar > .ty-menu-wrap > .ty-bar-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--ty-surface) 18%, transparent); }
.ty-selectbar button:focus-visible { outline-color: var(--ty-surface); }
.ty-selectbar #pickedCount { font-weight: 600; margin-right: var(--ty-space-3); }
.ty-selectbar [data-media-remove-picked] { margin-left: auto; }
.ty-selectbar button:disabled { opacity: 0.5; cursor: default; }
/* Menus (Order MD): Chapter and Date are buttons that open a small menu under them; a pick saves at once. */
.ty-menu-wrap { position: relative; display: inline-block; }
.ty-field .ty-menu-wrap, .ty-item .ty-menu-wrap { display: block; } /* .ty-item: the name question's field (Order SP item 4) */
.ty-bar-btn, .ty-field-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: var(--ty-space-2); min-height: 44px; padding: 10px 12px; font-size: 16px; font-weight: 400; color: var(--ty-ink); border-radius: var(--ty-radius-sm); text-align: left; }
.ty-bar-btn:hover, .ty-bar-btn[aria-expanded="true"] { background: var(--ty-tint); }
.ty-field-btn { display: flex; width: 100%; padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--ty-rule); }
.ty-field-btn:hover, .ty-field-btn[aria-expanded="true"] { border-bottom-color: var(--ty-accent); }
.ty-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 240px; max-height: 70vh; overflow-y: auto; padding: var(--ty-space-2); background: var(--ty-surface); color: var(--ty-ink); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm); box-shadow: 0 8px 24px color-mix(in srgb, var(--ty-ink) 14%, transparent); }
.ty-menu-item { display: block; width: 100%; min-height: 40px; padding: 9px 10px; text-align: left; font-size: 15px; font-weight: 400; border-radius: var(--ty-radius-sm); }
.ty-menu-item:hover { background: var(--ty-tint); }
.ty-menu-item[aria-current] { font-weight: 600; }
/* The Chapter menu's second level (Order SBR-A3 item 4): Unsorted › opens a fly-out to the RIGHT with a plain Unsorted and the predefined topics. The list scrolls on its own and the fly-out stands beside it, so the scrolling does not cut it off; where there is no room to the
   right (a phone, the photo's Info panel) it is set in under the list instead. */
.ty-menu--ch { overflow: visible; max-height: none; }
.ty-menu-scroll { max-height: 70vh; overflow-y: auto; }
.ty-flyout { position: absolute; left: calc(100% + var(--ty-space-1)); bottom: 0; z-index: 31; min-width: 220px; max-height: 70vh; overflow-y: auto; padding: var(--ty-space-2); background: var(--ty-surface); color: var(--ty-ink); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm); box-shadow: 0 8px 24px color-mix(in srgb, var(--ty-ink) 14%, transparent); }
.ty-view-info .ty-flyout { position: static; margin-top: var(--ty-space-1); max-height: 34vh; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
.ty-menu-item[aria-expanded="true"] { background: var(--ty-tint); }
.ty-menu--date { width: 460px; max-width: calc(100vw - 2 * var(--ty-gutter)); display: flex; flex-direction: column; gap: var(--ty-space-3); padding: var(--ty-space-4); }
.ty-menu--date .ty-small { margin: 0; }
.ty-menu--date input { font-size: 15px; }
.ty-view-info .ty-menu { left: 0; right: 0; min-width: 0; width: auto; }
.ty-placelist { list-style: none; margin: 0; }
.ty-placelist[hidden] { display: none; }
.ty-placelist .ty-small { margin: 0; padding: var(--ty-space-2); }
.ty-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ty-opt { min-height: 34px; padding: 6px 12px; font-size: 14px; font-weight: 400; border: 1px solid var(--ty-rule-2); border-radius: var(--ty-radius-pill); background: var(--ty-surface); }
.ty-opt:hover { border-color: var(--ty-accent); }
.ty-opt[aria-pressed="true"] { background: var(--ty-accent); border-color: var(--ty-accent); color: var(--ty-surface); }
.ty-opt[aria-current="true"]:not([aria-pressed="true"]) { border-color: var(--ty-accent); } /* the decade whose years are on show, when it is not the one saved */
@media (max-width: 560px) {
  .ty-selectbar .ty-menu-wrap { position: static; }
  .ty-selectbar .ty-menu { left: var(--ty-space-3); right: var(--ty-space-3); width: auto; min-width: 0; max-height: 75vh; }
  .ty-selectbar .ty-menu--ch { max-height: none; }
  .ty-selectbar .ty-menu-scroll { max-height: 40vh; }
  .ty-selectbar .ty-flyout { position: static; margin-top: var(--ty-space-1); max-height: 34vh; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
}
/* A caption is edited where it stands (Order MD): a plain line that shows its underline on hover and focus. */
.ty-capin, .ty-placein { width: 100%; padding: 2px 0; min-height: 26px; font-size: 14px; border-bottom: 1px solid transparent; text-overflow: ellipsis; }
.ty-capin::placeholder, .ty-placein::placeholder { color: var(--ty-muted); }
.ty-placein + .ty-small { display: block; margin-top: var(--ty-space-1); } /* the OpenStreetMap credit, under the Place field */
.ty-capin:hover, .ty-placein:hover { border-bottom-color: var(--ty-rule-2); }
.ty-capin:focus, .ty-placein:focus { border-bottom-color: var(--ty-accent); box-shadow: none; }
.ty-view-info .ty-capin, .ty-view-info .ty-placein { padding: 10px 0; font-size: 16px; border-bottom-color: var(--ty-rule); }
/* The toast an edit leaves (Order MD): at the foot of the screen, over a photo view too, with Undo. */
.ty-toast { position: fixed; left: var(--ty-space-8); bottom: var(--ty-space-6); z-index: 60; display: flex; align-items: center; gap: var(--ty-space-4); max-width: calc(100vw - 2 * var(--ty-space-4)); padding: var(--ty-space-3) var(--ty-space-4) var(--ty-space-3) 18px; background: var(--ty-ink); color: var(--ty-bg); border-radius: var(--ty-radius-sm); font-size: 15px; box-shadow: 0 8px 24px color-mix(in srgb, var(--ty-ink) 25%, transparent); }
.ty-toast:focus { outline: none; }
.ty-toast .ty-link { color: var(--ty-tint); font-size: 15px; font-weight: 600; text-decoration: none; min-height: 32px; }
@media (max-width: 560px) { .ty-toast { left: var(--ty-space-3); bottom: var(--ty-space-3); } }
/* The profile photo picker (Order MD): a dialog over the page holding every photo in Media; a tap on one sets it. */
.ty-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: var(--ty-space-4); background: color-mix(in srgb, var(--ty-ink) 45%, transparent); }
.ty-dialog { width: min(760px, 100%); max-height: 85dvh; overflow-y: auto; padding: var(--ty-space-5) var(--ty-space-6); background: var(--ty-surface); border-radius: var(--ty-radius-sm); box-shadow: 0 16px 40px color-mix(in srgb, var(--ty-ink) 30%, transparent); }
.ty-dialog:focus { outline: none; }
.ty-dialog--narrow { width: min(460px, 100%); }
/* Visually hidden, still read by a screen reader and still a place for the focus (a pane's heading that would only repeat its tab's name). */
.ty-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ty-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ty-space-3); }
.ty-dialog-head .ty-h2 { margin: 0; }
.ty-pickgrid { list-style: none; margin: var(--ty-space-4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--ty-space-2); }
.ty-pickphoto { display: block; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; border: 3px solid transparent; border-radius: var(--ty-radius-sm); background: var(--ty-tint); }
.ty-pickphoto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ty-pickphoto[aria-pressed="true"] { border-color: var(--ty-accent); }
.ty-media-filter { max-width: 22rem; }
.ty-media-filter .ty-label { margin-top: 0; }
.ty-media { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--ty-space-4); }
.ty-media li { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ty-space-2); min-width: 0; }
.ty-media .ty-photo { width: 100%; height: auto; aspect-ratio: 1; }
/* A long chapter name stays inside its tile (the Media board's tag rule); the whole name is the pill's title. */
.ty-media .ty-chip, .ty-linkcards--media .ty-chip { max-width: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
.ty-removed-thumb { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: var(--ty-radius-sm); margin-bottom: var(--ty-space-2); }
@media (max-width: 560px) { .ty-media { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ty-photo { width: 76px; height: 76px; } }

/* Links (Order LNK-5): a link the family shared as a card (.ty-linkcard, an anchor): what it is (.ty-kicker: Map or Page), its title, whether it opens a map, its host, who shared it. A chapter lists them in a row under its title and
   photos (.ty-linkcards); in Media each sits above its label (a .ty-chip). */
.ty-linkcards { list-style: none; margin: var(--ty-space-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ty-space-3); }
.ty-linkcards li { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ty-space-2); min-width: 0; max-width: 100%; }
.ty-linkcard { display: flex; flex-direction: column; gap: 2px; box-sizing: border-box; width: 18rem; max-width: 100%; padding: var(--ty-space-3); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm); background: var(--ty-surface); color: var(--ty-ink); text-decoration: none; }
.ty-linkcard:hover { border-color: var(--ty-accent); text-decoration: none; }
.ty-linkcard:focus-visible { outline: 2px solid var(--ty-accent); outline-offset: 2px; }
.ty-linkcard-title { font-weight: 500; overflow-wrap: anywhere; }
.ty-linkcard .ty-small { margin: 0; overflow-wrap: anywhere; }
.ty-linkcards--media { margin-top: var(--ty-space-4); }
@media (max-width: 560px) { .ty-linkcards, .ty-linkcards li { width: 100%; } .ty-linkcard { width: 100%; } }

/* Family tree (TREE-2): the drawing in a region of its own, so a wide family never widens the page. */
.ty-tree { max-width: 100%; box-sizing: border-box; overflow-x: auto; padding: var(--ty-space-4); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm); background-color: var(--ty-surface);
  /* Where it is cut (TREE-EX-R2-2): a shadow on each edge that has more to scroll to, none where it has not. The two surface covers move with the content (local) and hide the two shadows (fixed to the box, scroll) when the content reaches the edge. */
  background-image: linear-gradient(to right, var(--ty-surface) 30%, transparent), linear-gradient(to left, var(--ty-surface) 30%, transparent), linear-gradient(to right, var(--ty-rule-2), transparent), linear-gradient(to left, var(--ty-rule-2), transparent);
  background-position: left center, right center, left center, right center; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-repeat: no-repeat; background-attachment: local, local, scroll, scroll; }
.ty-tree svg { display: block; max-width: none; margin: 0 auto; }
.ty-tree:focus-visible { outline: 2px solid var(--ty-accent); outline-offset: 2px; }
/* Order SBR items 6, 13, 14 (board 7): the tree is dragged to move around it, has zoom tools, and a picked person's card opens beside them in the wrapper that holds all three. */
.ty-treewrap { position: relative; }
.ty-tree { cursor: grab; }
/* Order TD: the storyboard's tree is drawn by d3 in a stage that is dragged and zoomed, not scrolled. Order OX53 (the 7 Nov QA): one finger scrolls the page (touch-action pan-y; two fingers move and zoom the drawing), and the stage is as tall as the drawing (the page sets its height, up to 560px). */
.ty-treewrap .ty-tree { height: 420px; max-height: 70vh; padding: 0; overflow: hidden; touch-action: pan-y; background-image: none; }
.ty-treewrap .ty-tree:active { cursor: grabbing; }
.ty-treewrap .ty-tree svg { width: 100%; height: 100%; margin: 0; }
.ty-treetools { display: flex; justify-content: flex-end; gap: var(--ty-space-1); margin-bottom: var(--ty-space-2); } /* above the stage (Order TD), so a person's card never covers them */
.ty-treetools button { min-width: 36px; min-height: 36px; padding: 0 var(--ty-space-3); font-family: var(--ty-sans); font-size: 15px; font-weight: 400; color: var(--ty-ink); background: transparent; border: 1px solid var(--ty-rule-2); border-radius: 8px; cursor: pointer; } /* the finished story's tree buttons: the label face, the rule colour, an 8px corner (Order OX53) */
.ty-treetools button:hover:not(:disabled) { border-color: var(--ty-accent); }
.ty-treetools button:disabled { opacity: .5; cursor: default; }
.ty-treecard { position: absolute; z-index: 20; overflow-y: auto; box-sizing: border-box; width: min(340px, calc(100% - 16px)); display: flex; flex-direction: column; gap: var(--ty-space-3); padding: var(--ty-space-4);
  background: var(--ty-surface); border: 1px solid var(--ty-rule); border-radius: var(--ty-radius-sm); box-shadow: 0 8px 24px color-mix(in srgb, var(--ty-ink) 14%, transparent); }
.ty-treecard:focus { outline: none; }
.ty-treecard .ty-actions { margin: 0; }
.ty-treecard-head { display: flex; align-items: center; gap: var(--ty-space-3); padding-right: var(--ty-space-6); }
.ty-treecard-head > div { display: flex; flex-direction: column; min-width: 0; }
.ty-treecard b { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.ty-treecard-close { position: absolute; top: var(--ty-space-2); right: var(--ty-space-3); font-size: 20px; line-height: 1; min-height: 32px; }
@media (pointer: coarse), (max-width: 640px) { .ty-treetools button, .ty-treecard-close, .ty-treecard .ty-link, .ty-treecard .ty-primary { min-width: 44px; min-height: 44px; } } /* a finger's size (Order OX53) */
.ty-treephoto { flex: none; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; overflow: hidden; border-radius: 50%; border: 1px dashed var(--ty-rule-2); background: var(--ty-tint); color: var(--ty-tint-ink); font-size: 12px; line-height: 1.1; font-weight: 400; text-align: center; }
.ty-treephoto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ty-treephoto { position: relative; }
.ty-treephoto img[data-frame] { position: absolute; max-width: none; width: auto; height: auto; }
/* The circle-and-zoom step of the photo picker (Order SBR-A3 item 5): the picture dimmed, the circle lit over it. The page sizes and places the two pictures; dragging and the arrow keys move them. */
.ty-frame { position: relative; box-sizing: border-box; width: min(280px, 100%); aspect-ratio: 1; margin: var(--ty-space-4) auto; overflow: hidden; background: var(--ty-tint); border-radius: var(--ty-radius-sm); cursor: grab; touch-action: none; user-select: none; }
.ty-frame:active { cursor: grabbing; }
.ty-frame:focus-visible { outline: 2px solid var(--ty-accent); outline-offset: 3px; }
.ty-frame img { position: absolute; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.ty-frame .ty-frame-dim { opacity: 0.4; }
.ty-frame-circle { position: absolute; left: 10%; top: 10%; width: 80%; height: 80%; overflow: hidden; border-radius: 50%; box-shadow: 0 0 0 2px var(--ty-surface), 0 0 0 3px var(--ty-accent); }
#frameZoom { width: 100%; accent-color: var(--ty-accent); }
.ty-treename { display: flex; flex-direction: column; gap: var(--ty-space-2); }
.ty-treename .ty-label { margin-top: 0; }

/* Receipts: where a sentence came from, under it. Each .ty-receipt is who said it and when (small capitals), then their words. */
.ty-receipts { padding: 14px var(--ty-space-4); background: var(--ty-tint); color: var(--ty-tint-ink); border-radius: var(--ty-radius-sm); }
.ty-receipt { font-size: 15px; line-height: 1.5; margin: 8px 0 0; padding-left: var(--ty-space-3); border-left: 2px solid var(--ty-accent); overflow-wrap: anywhere; }
.ty-receipt small { display: block; color: var(--ty-ink-2); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
/* The question an answer replies to (STY-26): above the family's words, quieter than them. */
.ty-receipt .ty-asked { display: block; margin: 2px 0 4px; color: var(--ty-ink-3); font-size: 13.5px; line-height: 1.4; font-style: italic; }
/* A guess at where a note not yet filed may go (NOTES-2): a hint under its words. */
.ty-receipt .ty-guess { display: block; margin-top: 4px; color: var(--ty-ink-3); }
#unfiled .ty-receipt label { display: block; margin-top: 6px; }
#unfiled .ty-receipt select { width: auto; min-width: 11rem; max-width: 100%; }
/* Mark: the words a sentence rests on, inside a receipt's message (the page writes a <mark> around them, never a class). On the receipt's tint they
   lift to the surface and are underlined in the accent, so they do not rest on colour alone (a border, which forced colours keep). */
.ty-receipt mark { background: var(--ty-surface); color: inherit; padding: 0 2px; border-bottom: 2px solid var(--ty-accent); }
/* Order TS: a box on the family tree that can be moved among its siblings is picked by click or key; the picked one carries the accent edge. */
.ty-tree g[data-person] { cursor: pointer; }
.ty-tree g[data-person]:focus-visible { outline: 2px solid var(--ty-accent); outline-offset: 2px; }
.ty-tree g[data-person][aria-pressed="true"] rect { stroke: var(--ty-accent); stroke-width: 3; }
/* Order TD: the boxes and lines d3 draws, in the design system's tokens. A box is the surface on a rule, the subject's is the tint on the accent; a marriage that ended and a link between brothers and sisters with no parents on the tree are dashed. */
.ty-tree .t-box { fill: var(--ty-surface); stroke: var(--ty-rule-2); stroke-width: 1.2; }
.ty-tree .subject .t-box { fill: var(--ty-tint); stroke: var(--ty-accent); }
.ty-tree .t-name { font: 500 15px var(--ty-sans); fill: var(--ty-ink); }
.ty-tree .t-called { font: 400 11px var(--ty-sans); fill: var(--ty-ink-3); }
.ty-tree .t-rel { font: 400 13px var(--ty-sans); fill: var(--ty-ink-3); }
.ty-tree .subject .t-name, .ty-tree .subject .t-called, .ty-tree .subject .t-rel { fill: var(--ty-tint-ink); }
.ty-tree .t-av { fill: var(--ty-rule); }
.ty-tree .subject .t-av { fill: var(--ty-surface); }
.ty-tree .t-av-t { font: 500 12px var(--ty-sans); fill: var(--ty-ink-2); }
.ty-tree .t-ring { fill: none; stroke: var(--ty-rule-2); stroke-width: 1; }
.ty-tree .t-descent, .ty-tree .t-sib { fill: none; stroke: var(--ty-rule-2); stroke-width: 1.5; }
.ty-tree .t-spouse { stroke: var(--ty-rule-2); stroke-width: 1.5; }
.ty-tree .t-ended, .ty-tree .t-sib { stroke-dasharray: 5 4; }
.ty-tree .t-sib { stroke: var(--ty-muted); }
