/* Field sheet: the page is drawn from the papers a cultivation office already handles.
   Hero room board and plant tag, trust strip, who it serves, and the daily log of the three steps.
   Product visuals use demo data only (CanoSync Demo Farm, strains CS101 to CS108, tag ids with DEMO). */

:root {
  /* The app's strain colors, used only inside the demo room board. */
  --strain-1: #2b7bd6; --strain-2: #0f9aa6; --strain-3: #7652d6; --strain-4: #5f9a12;
  --strain-5: #2b7bd6; --strain-6: #0f9aa6; --strain-7: #7652d6; --strain-8: #5f9a12;
  --stripe: 3px;
}
.num { font-variant-numeric: tabular-nums lining-nums; letter-spacing: .01em; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Room board: the app's map cells (30% of the strain color, a 3px stripe, code top left, count bottom right). */
.board-wrap { position: relative; margin: 0; font-family: var(--body); }
.board { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.board-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-row); background: var(--surface-frame); font-size: .875rem; }
.board-h b { font-weight: 500; }
.board-h .meta { font-size: .75rem; color: var(--text-3); text-align: right; }
.benches { padding: 18px 18px 34px; display: grid; gap: 14px; }
.bench-l { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-3); margin-bottom: 6px; }
.cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.cell { --c: var(--strain-1); aspect-ratio: 1.35; border-radius: var(--r-small); background: color-mix(in srgb, var(--c) 18%, var(--surface)); box-shadow: inset var(--stripe) 0 0 var(--c); padding: 6px 6px 5px 10px; display: flex; flex-direction: column; justify-content: space-between; font-size: .75rem; line-height: 1; color: var(--text); }
.cell .code { font-weight: 500; }
.cell .n { align-self: flex-end; font-variant-numeric: tabular-nums; }
.cell.empty { background: var(--surface-sunk); box-shadow: none; border: 1px dashed var(--line); }
.cell.sel { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Plant tag: a demo depiction, overlapping only the board's bottom padding. */
.cap { margin: 0 0 8px; font-size: .875rem; color: var(--text-2); }
.cap b { font-weight: 500; color: var(--text); }
.ptag { position: relative; z-index: 1; width: 236px; margin: -18px 24px 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 6px 6px 10px 10px; padding: 14px 14px 12px; font-size: .75rem; }
.ptag::before { content: ""; position: absolute; top: 10px; right: 12px; width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-frame); }
.ptag .k { color: var(--text-3); }
.ptag .id { font-size: .78rem; font-weight: 500; letter-spacing: .02em; margin: 4px 0 8px; word-break: break-all; font-variant-numeric: tabular-nums; }
.ptag .tr { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-row); }
.ptag .stamp { position: absolute; top: 10px; right: 30px; font: 500 .75rem/1 var(--body); letter-spacing: .06em; color: var(--warn); border: 1px solid var(--warn-line); background: var(--warn-bg); padding: 3px 5px; border-radius: 3px; }

/* Trust strip: three plain facts on a hairline. */
.trust { border-top: 1px solid var(--line-row); border-bottom: 1px solid var(--line-row); }
.trust-row { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 0 auto; padding-top: 16px; padding-bottom: 16px; font-size: .875rem; line-height: 1.5; color: var(--text-2); }
.trust-row li { display: flex; align-items: center; gap: 10px; }
.trust-row a { color: var(--link); text-underline-offset: .2em; }

/* Daily log: the three steps as a signed sheet. */
.sheet { margin-top: 48px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }
.sheet-h, .entry { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.4fr) 220px; gap: 24px; padding: 0 24px; }
.sheet-h { padding-top: 12px; padding-bottom: 12px; background: var(--surface-frame); border-bottom: 1px solid var(--line-row); font-size: .75rem; color: var(--text-3); }
.entry { padding-top: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line-row); align-items: start; list-style: none; }
.entry:last-child { border-bottom: 0; }
.entry .time { font-size: .875rem; color: var(--text-2); font-variant-numeric: tabular-nums; padding-top: 4px; }
.entry h3 { font-weight: 400; font-size: clamp(1.25rem, 1rem + .8vw, 1.5rem); letter-spacing: -.015em; line-height: 1.2; }
.entry p { color: var(--text-2); font-size: 1rem; line-height: 1.6; }
.signed { font-size: .8125rem; color: var(--text-2); }
.signed .line { display: block; height: 1px; background: var(--text); margin: 0 0 10px; transform-origin: left center; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: var(--r-pill); font-size: .8125rem; white-space: nowrap; color: var(--ok); background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--ok-line); }
.chip svg { flex: none; }
.signed .who { display: block; margin-top: 8px; }

/* The one demonstration: when the sheet is first seen, each entry is signed in turn (line draws, chip fades in). Armed by log-play.js only, so without JS and under reduced motion the finished sheet shows. */
@media (prefers-reduced-motion: no-preference) {
  .sheet.armed .line { transform: scaleX(0); }
  .sheet.armed .chip { opacity: 0; transform: translateY(4px); }
  .sheet.armed.play .line { transform: none; transition: transform 400ms var(--ease-out) calc(var(--k) * 350ms); }
  .sheet.armed.play .chip { opacity: 1; transform: none; transition: opacity 200ms var(--ease-out) calc(var(--k) * 350ms + 250ms), transform 200ms var(--ease-out) calc(var(--k) * 350ms + 250ms); }
}

/* Who it serves */
.who-grid { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.who-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; }
.who-card h3 { font-weight: 400; font-size: 1.375rem; letter-spacing: -.012em; }
.who-card p { margin-top: 8px; color: var(--text-2); }
.who-card.soon { background: var(--surface-sunk); border-style: dashed; }
.who-card.soon h3 { color: var(--text-2); }
.who-card.soon p { color: var(--text-2); }

@media (max-width: 960px) {
  .sheet-h { display: none; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .entry .time { padding-top: 0; }
  .signed { margin-top: 8px; max-width: 320px; }
  .signed .line { margin-bottom: 12px; }
}
@media (max-width: 720px) {
  .trust-row { flex-direction: column; }
  .board-h { flex-wrap: wrap; }
  .board-h .meta { text-align: left; }
  .benches { padding: 14px 12px; }
  .cells { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cells .x { display: none; }
  .ptag { width: min(236px, calc(100% - 32px)); margin-right: 16px; }
  .entry { padding: 22px 16px; }
  .sheet { margin-top: 32px; }
  .who-grid { margin-top: 32px; }
}
.log { list-style: none; margin: 0; padding: 0; }
/* Today list inside step 2 */
.entry .signed { grid-column: 4; grid-row: 1; }
.today-list { grid-column: 2 / -1; grid-row: 2; margin: 20px 0 0; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 16px 4px; }
.today-list .cap { margin-bottom: 4px; }
.today-rows { list-style: none; margin: 0; padding: 0; }
.today-rows li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-row); }
.today-rows li > div { min-width: 0; }
.today-rows .t { display: block; font-size: .875rem; line-height: 1.4; color: var(--text); }
.today-rows .d { display: block; margin-top: 2px; font-size: .75rem; color: var(--text-3); }
.today-rows .s { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: var(--r-pill); font-size: .8125rem; white-space: nowrap; }
.today-rows .s-due { color: var(--wait); background: var(--wait-bg); box-shadow: inset 0 0 0 1px var(--wait-line); }
.today-rows .s-ready { color: var(--ok); background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--ok-line); }
.today-rows .s-late { color: var(--warn); background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-line); }
.center { text-align: center; }
@media (max-width: 960px) { .entry .signed { grid-column: 1; grid-row: auto; } .today-list { grid-column: 1; grid-row: auto; order: 5; } }
@media (max-width: 560px) { .today-rows li { flex-wrap: wrap; gap: 6px; } }
@media (max-width: 960px) { .entry .time::after { content: " (demo)"; } }
