/* Defects — page rules on top of ../../styles.css. Calm hero: words plus one product figure on the ground (no dusk video). */

/* ---------- hero ---------- */
.d-hero { padding: 16px 0 48px; background: linear-gradient(180deg, var(--ground) 0, var(--ground) 40%, var(--sunk) 78%, var(--ground) 100%); }
.d-hero-in { display: grid; gap: 40px; }
.d-words { display: flex; flex-direction: column; align-items: flex-start; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: 15px; color: var(--ink-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
/* REC-271 phase 3: the crumb's first segment has no page to link to yet (see index.astro) — same ink as the linked form, just inert. */
.crumb-here { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }
.crumb-sep { color: var(--line-2); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.d-h1 { margin-top: 16px; font-size: 44px; line-height: 1.02; font-weight: 700; letter-spacing: -.038em; text-wrap: balance; max-width: 14ch; }
.d-words .lead { margin-top: 20px; }
.d-words .actions { margin-top: 24px; }
.d-caveat { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.5; color: var(--ink-2); font-weight: 500; align-self: stretch; }

/* ---------- app window (shared by both figures) ---------- */
.d-fig, .guide-fig { margin: 0; }
.win { background: var(--surface); border-radius: var(--r-3); box-shadow: 0 0 0 1px rgba(24,23,21,.08), var(--sh-3); overflow: hidden; font-size: 15px; line-height: 1.45; color: var(--ink); }
.win .pal-bar span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* the defect's header pane */
.tl-head { padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.tl-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-meta { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
.tl-title { margin-top: 8px; font-size: 18px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }

/* the timeline: one unbroken rail, a node per dated event. Each row draws its own stretch of the rail in its node cell —
   centred on the node column at every width — from the node's centre down through the row gap to the next node; the nodes
   (z-index 1, a 4px surface ring) sit over the joins */
.tl { --tl-gap: 18px; position: relative; padding: 18px 18px 20px; display: grid; gap: var(--tl-gap); }
.tl-row { position: relative; display: grid; grid-template-columns: 30px 1fr; grid-template-areas: "node date" "node body"; column-gap: 14px; }
.tl-row::before { content: ""; grid-area: node; justify-self: center; width: 1.5px; margin: 15px 0 calc(-1 * var(--tl-gap)); background: var(--line-2); }
.tl-row:last-child::before { display: none; }
.tl-date { grid-area: date; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); line-height: 1.4; padding-top: 5px; }
.tl-node { grid-area: node; position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 4px var(--surface); color: var(--ink-3); }
.tl-node .ic { width: 16px; height: 16px; }
.tl-av { background: #e9e4dc; box-shadow: 0 0 0 4px var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.tl-body { grid-area: body; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tl-who { font-size: 14px; }
.tl-text { font-size: 15px; color: var(--ink); text-wrap: pretty; }
.tl-small { font-size: 13px; line-height: 1.45; color: var(--ink-3); letter-spacing: .005em; }
.tl-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.tl-photos img { display: block; width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--sunk); }
.tl-photos .tl-small { margin-left: 4px; white-space: nowrap; }
.tl-quote { margin: 4px 0 2px; padding: 8px 12px; background: var(--sunk); border-radius: 8px; font-size: 15px; color: var(--ink-2); }
/* the drafted next step: a raised block on the rail, status on the tint */
.tl-draft { margin-top: 4px; padding: 12px 14px; gap: 10px; background: var(--surface); border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2), var(--sh-2); }
.is-next .tl-node { background: var(--blue-tint); color: var(--blue-press); box-shadow: inset 0 0 0 1px var(--blue-tint-line), 0 0 0 4px var(--surface); }
.tl-ready { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--blue-press); background: var(--blue-tint); padding: 3px 10px 3px 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--blue-tint-line); }
.tl-ready::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-press); }
.is-done .tl-node { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-2), 0 0 0 4px var(--surface); }

/* ---------- workflow: a ruled split, no figure (the timeline above is its figure) ---------- */
.split { display: grid; gap: 24px; }
.split-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.split-body { display: flex; flex-direction: column; gap: 16px; }
.d-lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.d-rule { font-size: 17px; font-weight: 600; color: var(--ink); padding-top: 14px; border-top: 1px solid var(--line); max-width: 60ch; }

/* ---------- guidance ---------- */
.guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; } /* minmax(0): the pal-bar title ellipsizes at 320 instead of widening the track */
.guide-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.guide-copy .h2 { margin-bottom: 8px; }
.guide-copy .d-rule { align-self: stretch; }
.g-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.g-h { font-size: 17px; font-weight: 700; letter-spacing: -.012em; }
.g-track { border-top: 1px solid var(--line); }
.g-track li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.g-track .ic { width: 18px; height: 18px; color: var(--ink-2); }
.g-d { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.g-wait { color: var(--ink); font-weight: 600; }
.g-wait .ic { color: var(--blue-press); }
.g-wait .g-d { color: var(--blue-press); background: var(--blue-tint); padding: 1px 8px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--blue-tint-line); }
.g-next { padding: 12px 14px; background: var(--sunk); border-radius: 10px; font-size: 15px; color: var(--ink); text-wrap: pretty; }
.g-foot { font-size: 14px; line-height: 1.5; color: var(--ink-3); text-wrap: pretty; }
.g-link { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- evidence: three ruled columns ---------- */
.cols { margin-top: 40px; display: grid; border-top: 1px solid var(--line); }
.col { padding: 28px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.col .h3 { margin-top: 4px; }
.col p { color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }

/* ---------- final + also ---------- */
.final-h { max-width: 14ch; }
.also { border-top: 1px solid var(--line); }
.also-in { display: flex; flex-direction: column; }
.also-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; color: var(--blue); text-decoration: none; }
.also-link:last-child { border-bottom: 0; }
.also-link .ic { width: 18px; height: 18px; }
.also-link:hover { color: var(--blue-hover); text-decoration: underline; }
.also-link:hover .ic { transform: translateX(3px); }
.also + .foot { margin-top: 0; }

/* interactions { */
/* EX-L14.marketing: every transition sits under prefers-reduced-motion: no-preference — moved here,
   value unchanged, from the rule it styles. */
@media (prefers-reduced-motion: no-preference) {
  .also-link .ic { transition: transform .25s var(--ease); }
}
/* } interactions */

/* ---------- >= 760 ---------- */
@media (min-width: 760px) {
  .d-hero { padding: 32px 0 80px; }
  .d-h1 { font-size: 60px; }
  .tl-row { grid-template-columns: 56px 30px 1fr; grid-template-areas: "date node body"; }
  .tl-date { text-align: right; padding-top: 6px; }
  .tl-body { padding-top: 5px; }
  .tl-draft { padding-top: 12px; margin-top: 0; }
  .split { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .cols { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .col { padding: 32px 28px 36px; border-bottom: 0; border-left: 1px solid var(--line); }
  .col:first-child { border-left: 0; padding-left: 0; }
  .col:last-child { padding-right: 0; }
  .also-in { flex-direction: row; gap: 0; }
  .also-link { flex: 1; justify-content: flex-start; border-bottom: 0; min-height: 88px; }
  .also-link + .also-link { border-left: 1px solid var(--line); padding-left: 32px; }
}

/* ---------- >= 1080 ---------- */
@media (min-width: 1080px) {
  .d-hero { padding: 40px 0 112px; }
  .d-hero-in { grid-template-columns: 1fr 1.12fr; gap: 64px; align-items: center; }
  .d-words { padding-top: 8px; }
  .d-h1 { margin-top: 24px; font-size: 66px; line-height: .99; letter-spacing: -.04em; }
  .d-words .lead { margin-top: 24px; font-size: 20px; }
  .d-words .actions { margin-top: 32px; }
  .d-caveat { margin-top: 28px; padding-top: 16px; }
  .d-fig { padding-top: 24px; }
  .tl { padding: 22px 24px 24px; --tl-gap: 20px; }
  .tl-head { padding: 18px 24px 16px; }
  .split { grid-template-columns: 5fr 6fr; gap: 72px; }
  .split-body { padding-top: 38px; }
  .guide { grid-template-columns: 5fr 6fr; gap: 72px; align-items: center; }
  .g-body { padding: 22px 24px 24px; gap: 16px; }
  .cols { margin-top: 56px; }
  .final-h { max-width: 16ch; }
  .also-link { font-size: 19px; }
}
