/* ══ ONE TRANSACTION, DRAWN ══════════════════════════════════ 10 Sep 2026 ══
   Prefix hy-d-. The homeowner's page (transaction-detail.html) and the trade's (transaction-detail-tradesperson.html)
   mount the same script (assets/hyyryn-txdetail.js) and wear this one sheet, so the two cannot drift apart.

   rp217 (23 Oct 2026). Sir, before the test run: improve the remaining pages, This payment third, both sides. Redrawn
   in the site's newer hand (the job page, rp211 to rp214): the money on a navy card with its road lit as far as it
   has come and the one date that matters; the action and the split beside it; what has happened, the photographs and
   the job in rounded cards. The two pages had two grounds (hers a mountain drawing and a photograph at a few per
   cent, his plain) and two paddings; they have one now. No colour stripe down the side of anything (Mason 62.1),
   no !important. ══════════════════════════════════════════════════════════════════════════════════════════════════ */

.hy-d[hidden], .hy-d-side[hidden], .hy-d-act[hidden] { display: none; }
/* the trade's page eases every property of everything (*), the homeowner's eases its links: the component says its own */
.hy-d, .hy-d :where(*) { transition: none; }

/* one ground and one measure on both pages */
body:has(#txdHost) main::before, body:has(#txdHost) .page-bg { display: none; }
html:has(#txdHost), body:has(#txdHost) { background: #F3EFE4; }
.content:has(> #txdHost), .main:has(> #txdHost) { padding: 0; max-width: none; margin: 0; }
#txdHost { padding: clamp(24px, 3vw, 40px) clamp(16px, 3vw, 32px) 80px; }

.hy-d {
  --d-navy: var(--navy, #0A1628); --d-cream: var(--cream, #FAF8F3); --d-ink: var(--ink, #1B2638); --d-muted: var(--muted, #636976);
  --d-line: var(--line, #E6E0D0); --d-gold: var(--gold, #83632C); --d-gold-soft: var(--gold-soft, #D4A943); --d-green: var(--green, #0F5A4F);
  --d-display: var(--serif-display, 'Libre Caslon Display'), 'Libre Caslon Text', Georgia, serif;
  --d-sans: 'Inter', system-ui, sans-serif;
  max-width: 1160px; margin-inline: auto; font-family: var(--d-sans); line-height: 1.5; color: var(--d-navy);
}
/* zeroed at no weight (:where), so each part's own margin wins by order (Mason, rp213 lesson) */
.hy-d :where(p, h1, h2, ul, ol, li, dl, dd, figure) { margin: 0; }
.hy-d :where(ol) { padding: 0; list-style: none; }

/* ── the head ── */
.hy-d-head { margin-bottom: 26px; }
.hy-d-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--d-muted); margin-bottom: 12px; }
.hy-d-crumb a { display: inline-flex; align-items: center; min-height: 24px; color: var(--d-navy); font-weight: 500; text-decoration: none; border-bottom: 1px solid transparent; }
.hy-d-crumb a:hover { border-bottom-color: currentColor; }
.hy-d-crumb span { opacity: .6; margin: 0 8px; }
.hy-d-h1 { font-family: var(--d-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 400; line-height: 1.1; color: var(--d-navy); }
.hy-d-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 12px; font-size: 13.5px; color: var(--d-muted); }
.hy-d-trade { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px 0 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 1px rgba(216, 207, 184, .95); color: var(--d-navy); font-weight: 500; }
.hy-d-ring { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #fff, rgba(250, 248, 243, .6) 72%); box-shadow: inset 0 0 0 1px rgba(131, 99, 44, .45); color: var(--d-gold); }
.hy-d-ring svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hy-d-ring--xs { width: 26px; height: 26px; }
.hy-d-ring--xs svg { width: 14px; height: 14px; }
.hy-d-why--warn { margin: -10px 0 20px; padding: 10px 14px; border-radius: 12px; background: rgba(212, 169, 67, .14); color: var(--d-navy); }

/* ── the top: the money, and beside it what to do and the split ── */
.hy-d-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 20px; align-items: start; margin-bottom: 20px; }
.hy-d-aside { display: grid; gap: 20px; }

/* the money: navy, a faint drafting ground, a gold seam at the top (the job page's What you keep and its road) */
.hy-d-bear {
  position: relative; isolation: isolate; overflow: hidden; padding: clamp(26px, 3vw, 40px); border-radius: 28px; color: var(--d-cream);
  background: radial-gradient(90% 120% at 0% 0%, rgb(20, 42, 81), var(--d-navy) 60%);
  box-shadow: 0 2px 4px rgba(10, 22, 40, .12), 0 40px 80px -50px rgba(10, 22, 40, .8);
}
.hy-d-bear::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(250, 248, 243, .12) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask: radial-gradient(80% 90% at 70% 30%, #000, transparent); mask: radial-gradient(80% 90% at 70% 30%, #000, transparent); }
.hy-d-bear::after { content: ''; position: absolute; left: 40px; right: 40px; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(212, 169, 67, 0), rgba(212, 169, 67, .85), rgba(212, 169, 67, 0)); }
.hy-d-bear-k { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(250, 248, 243, .82); }
.hy-d-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d-gold-soft); box-shadow: 0 0 0 4px rgba(212, 169, 67, .18); }
.hy-d-bear--gone .hy-d-dot { background: rgb(111, 207, 170); box-shadow: 0 0 0 4px rgba(111, 207, 170, .16); }
.hy-d-bear--bad .hy-d-dot { background: #E8836F; box-shadow: 0 0 0 4px rgba(232, 131, 111, .18); }
.hy-d-bear--wait .hy-d-dot { background: rgba(250, 248, 243, .7); box-shadow: 0 0 0 4px rgba(250, 248, 243, .1); }
.hy-d-bear-v { margin-top: 10px; font-family: var(--d-display); font-size: clamp(46px, 5.4vw, 68px); line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--d-cream); }
.hy-d-bear--held .hy-d-bear-v { color: var(--d-gold-soft); }
.hy-d-bear--bad .hy-d-bear-v { color: #E8836F; }
.hy-d-bear-s { margin-top: 12px; max-width: 58ch; font-size: 14px; line-height: 1.6; color: rgba(250, 248, 243, .8); }
.hy-d-when { margin-top: 16px; max-width: 62ch; padding: 12px 16px; border-radius: 14px; background: rgba(250, 248, 243, .07); box-shadow: inset 0 0 0 1px rgba(250, 248, 243, .14);
  font-family: 'Libre Caslon Text', Georgia, serif; font-size: 15.5px; line-height: 1.55; color: var(--d-cream); }

/* its road: paid in, work started, finished and agreed, released; passed ticked, here lit, still to come quiet */
.hy-d-road { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 26px; }
.hy-d-rs { position: relative; display: grid; justify-items: start; gap: 10px; min-width: 0; padding-right: 8px; }
.hy-d-rs:not(:last-child)::after { content: ''; position: absolute; left: 36px; right: 2px; top: 15px; height: 0; border-top: 1.5px dashed rgba(250, 248, 243, .22); }
/* a stretch is gold where the money went: from a step passed to the next one passed, or to the one it is at */
.hy-d-rs.is-done:has(+ .is-done, + .is-now, + .is-stop)::after { border-top: 2px solid var(--d-gold-soft); top: 14px; box-shadow: 0 0 8px rgba(212, 169, 67, .45); }
.hy-d-rs-d { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, rgb(44, 60, 88), rgb(18, 32, 56)); box-shadow: inset 0 0 0 1px rgba(250, 248, 243, .22), 0 0 0 5px var(--d-navy); }
.hy-d-rs.is-done .hy-d-rs-d { background: var(--d-gold-soft); box-shadow: 0 0 0 5px var(--d-navy); }
.hy-d-rs.is-done .hy-d-rs-d::before { content: ''; width: 10px; height: 5px; margin-top: -3px; border: solid var(--d-navy); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.hy-d-rs.is-now .hy-d-rs-d { background: radial-gradient(circle at 35% 30%, rgb(255, 246, 220), var(--d-gold-soft) 65%); box-shadow: 0 0 0 5px var(--d-navy), 0 0 24px rgba(212, 169, 67, .55); }
.hy-d-rs.is-stop .hy-d-rs-d { box-shadow: inset 0 0 0 1.5px #E8836F, 0 0 0 5px var(--d-navy), 0 0 22px rgba(232, 131, 111, .3); }
.hy-d-rs-t { font-size: 12.5px; line-height: 1.35; color: rgba(250, 248, 243, .66); }
.hy-d-rs.is-done .hy-d-rs-t { color: rgba(250, 248, 243, .9); }
.hy-d-rs.is-now .hy-d-rs-t { color: var(--d-gold-soft); font-weight: 600; }
.hy-d-rs.is-stop .hy-d-rs-t { color: #F2A595; font-weight: 600; }

/* the facts under it */
.hy-d-seam { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px 20px; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(250, 248, 243, .12); }
.hy-d-seam dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(250, 248, 243, .62); }
.hy-d-seam dd { margin-top: 4px; font-family: 'Libre Caslon Text', Georgia, serif; font-size: 16px; color: var(--d-cream); font-variant-numeric: lining-nums; }

/* ── the cards ── */
.hy-d-card { padding: clamp(20px, 2.2vw, 28px); border-radius: 22px; background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 1px rgba(216, 207, 184, .95), 0 18px 36px -28px rgba(10, 22, 40, .45); }
.hy-d-sh { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.hy-d-k { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--d-gold); }
.hy-d-h2 { margin-top: 2px; font-family: var(--d-display); font-size: 23px; font-weight: 400; line-height: 1.15; color: var(--d-navy); }

/* what to do: one primary, the rest quiet, all pills */
.hy-d-acts { display: grid; gap: 10px; }
.hy-d-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px;
  background: var(--d-navy); color: var(--d-cream); font-family: var(--d-sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; text-align: center;
  box-shadow: 0 14px 26px -16px rgba(10, 22, 40, .7); transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.hy-d-btn:hover { background: var(--navy-2, #152238); transform: translateY(-1px); }
.hy-d-btn:focus-visible { outline: 2px solid var(--d-gold-soft); outline-offset: 3px; }
.hy-d-btn--ghost { background: transparent; color: var(--d-navy); box-shadow: inset 0 0 0 1px rgba(10, 22, 40, .28); }
.hy-d-btn--ghost:hover { background: rgba(10, 22, 40, .04); box-shadow: inset 0 0 0 1px var(--d-navy); }
.hy-d-why { margin-top: 14px; font-size: 13px; line-height: 1.55; color: var(--d-muted); }

/* the split */
.hy-d-line { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 12px 0; border-top: 1px solid var(--d-line); font-size: 14px; }
.hy-d-line span:first-child { color: var(--d-muted); }
.hy-d-line b { font-weight: 500; color: var(--d-navy); font-variant-numeric: tabular-nums; }
.hy-d-line--fee b { color: var(--d-gold); }
.hy-d-line--out b { font-family: var(--d-display); font-size: 24px; font-weight: 400; color: var(--d-green); }
.hy-d-note { margin-top: 12px; padding: 11px 14px; border-radius: 12px; background: rgba(243, 239, 228, .9); font-size: 12.5px; line-height: 1.55; color: var(--d-muted); }

/* ── below: what has happened beside the photographs and the job ── */
.hy-d-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.hy-d-col2 { display: grid; gap: 20px; }

/* what has happened, in the record's own times */
.hy-d-bay { position: relative; display: flex; gap: 16px; padding: 0 0 20px; }
.hy-d-bay::before { content: ''; position: absolute; left: 7px; top: 20px; bottom: 0; width: 1px; background: rgba(15, 90, 79, .35); }
.hy-d-bay:last-child { padding-bottom: 0; }
.hy-d-bay:last-child::before { display: none; }
.hy-d-bay--todo::before { background: repeating-linear-gradient(to bottom, var(--d-line) 0 3px, transparent 3px 7px); }
.hy-d-pip { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 3px; border-radius: 50%; background: var(--d-cream); box-shadow: inset 0 0 0 1px var(--line-2, #D8CFB8); }
.hy-d-bay--done .hy-d-pip { background: var(--d-green); box-shadow: 0 0 0 4px rgba(15, 90, 79, .12); }
.hy-d-bay--now .hy-d-pip { background: var(--d-gold-soft); box-shadow: inset 0 0 0 1px var(--d-gold), 0 0 0 5px rgba(212, 169, 67, .2); }
.hy-d-bay--bad .hy-d-pip { background: var(--danger, #C0392B); box-shadow: 0 0 0 4px rgba(192, 57, 43, .14); }
.hy-d-bay-t { font-size: 14.5px; font-weight: 500; color: var(--d-navy); }
.hy-d-bay--todo .hy-d-bay-t { font-weight: 400; color: var(--d-muted); }
.hy-d-bay--now .hy-d-bay-t { font-weight: 600; }
.hy-d-bay-d { margin-top: 2px; font-size: 12.5px; color: var(--d-muted); font-variant-numeric: tabular-nums; }
.hy-d-bay--now .hy-d-bay-d { color: var(--d-gold); font-weight: 600; }
.hy-d-bay-m { margin-top: 5px; max-width: 58ch; font-size: 13px; line-height: 1.55; color: var(--d-muted); }

/* the photographs: the start and the finish, side by side */
.hy-d-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hy-d-shot { min-width: 0; }
.hy-d-shot-box { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; margin: 0; padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: rgba(243, 239, 228, .9); box-shadow: inset 0 0 0 1px var(--d-line); color: var(--d-muted); font: inherit; cursor: zoom-in;
  transition: transform 220ms cubic-bezier(.16, .84, .44, 1), box-shadow 220ms ease; }
button.hy-d-shot-box:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--d-gold-soft), 0 16px 30px -20px rgba(10, 22, 40, .5); }
button.hy-d-shot-box:focus-visible { outline: 2px solid var(--d-gold); outline-offset: 3px; }
.hy-d-shot-box.is-empty { cursor: default; background: transparent; box-shadow: none; border: 1.5px dashed var(--line-2, #D8CFB8); }
.hy-d-shot-box svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hy-d-shot-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.hy-d-shot-cap { display: grid; justify-items: start; gap: 6px; margin-top: 10px; }
.hy-d-shot-k { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--d-gold); }
.hy-d-shot-s { display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 0 11px 0 9px; border-radius: 999px; background: rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 1px rgba(216, 207, 184, .95); font-size: 12.5px; font-weight: 500; color: var(--d-navy); }
.hy-d-shot-s::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--d-muted); }
.hy-d-shot[data-st="ok"] .hy-d-shot-s::before { background: var(--d-green); }
.hy-d-shot[data-st="wait"] .hy-d-shot-s::before { background: var(--d-gold-soft); }
.hy-d-shot[data-st="no"] .hy-d-shot-s::before { background: var(--danger, #C0392B); }
.hy-d-shot-t { font-size: 12.5px; color: var(--d-muted); font-variant-numeric: tabular-nums; }

/* the job */
.hy-d-desc { font-family: 'Libre Caslon Text', Georgia, serif; font-size: 16px; line-height: 1.6; color: var(--d-ink); max-width: 64ch; }
.hy-d-stage { margin: 18px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--d-gold); }
.hy-d-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.hy-d-fact { min-width: 0; padding: 12px 14px; border-radius: 14px; background: rgba(250, 248, 243, .9); box-shadow: inset 0 0 0 1px var(--d-line); }
.hy-d-fact-k { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--d-muted); }
.hy-d-fact-v { margin-top: 4px; font-size: 15px; color: var(--d-navy); overflow-wrap: anywhere; }
.hy-d-more { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 14px; color: var(--d-navy); font-size: 13.5px; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(10, 22, 40, .3); }
.hy-d-more::after { content: '\2192'; }
.hy-d-more:hover { border-bottom-color: var(--d-navy); }

/* one photograph large */
.hy-d-big { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: rgba(8, 15, 28, .94); }
.hy-d-big img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; cursor: zoom-out; }
.hy-d-big-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; color: #FAF8F3; font-size: 14px; }
.hy-d-big-x { min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: #FAF8F3; color: #0A1628; cursor: pointer;
  font: 600 12px/1 'Inter', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.hy-d-big-x:focus-visible { outline: 2px solid #D4A943; outline-offset: 3px; }

@media (max-width: 1000px) {
  .hy-d-top, .hy-d-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hy-d-bear { padding: 24px 20px; border-radius: 22px; }
  .hy-d-bear::after { left: 20px; right: 20px; }
  .hy-d-road { gap: 0; }
  .hy-d-rs-t { font-size: 12px; }
  .hy-d-rs:not(:last-child)::after { left: 34px; }
  .hy-d-seam { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hy-d-card { padding: 20px 18px; border-radius: 20px; }
  .hy-d-h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .hy-d-btn, .hy-d-shot-box { transition: none; } .hy-d-btn:hover, button.hy-d-shot-box:hover { transform: none; } }
@media (forced-colors: active) {
  .hy-d-bear, .hy-d-card { border: 1px solid CanvasText; }
  .hy-d-bear::before, .hy-d-bear::after { display: none; }
  .hy-d-rs-d, .hy-d-dot, .hy-d-shot-s::before { forced-color-adjust: none; background: CanvasText; }
}
