/* The proposal's document. Colours and sizes come from the workspace's
   design system (_picode/ds/default/tokens.css, product layer). */
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-400.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-500.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-600.woff2) format("woff2"); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-base); color: var(--text-primary); font: 15px/1.6 var(--font-sans); overflow-x: hidden; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
code, .d-mono { font-family: var(--font-mono); font-size: .9em; }
button { font: inherit; }

.d-wrap { max-width: 880px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.d-wide { max-width: 1760px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.d-head { padding-top: 40px; padding-bottom: 8px; }
.d-eyebrow { margin: 0 0 6px; color: var(--text-secondary); font-size: 13px; }
h1.d-title { margin: 0 0 12px; font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; }
p.d-lede { margin: 0 0 14px; font-size: 17px; line-height: 1.55; }
p.d-meta { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.d-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 13.5px; }
.d-nav a { color: var(--text-primary); text-decoration: none; display: flex; align-items: center; justify-content: center; text-align: center; min-height: var(--ctl-h); padding: 0 10px; white-space: nowrap; border: 1px solid var(--control-line); border-radius: var(--radius-ctl); }
.d-nav a:hover { background: var(--bg-hover); }
.d-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.d-sec { padding-top: 48px; }
h2.d-h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h3.d-h3 { margin: 28px 0 8px; font-size: 16px; font-weight: 600; }
p.d-p { margin: 0 0 12px; }
p.d-sub { margin: 0 0 16px; color: var(--text-secondary); }
ul.d-list, ol.d-list { margin: 0 0 14px; padding-left: 22px; }
ul.d-list > li, ol.d-list > li { margin: 0 0 6px; }
.d-num { font-variant-numeric: tabular-nums; font-weight: 600; }
p.d-note { margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-ctl); background: var(--bg-panel); color: var(--text-secondary); font-size: 13.5px; line-height: 1.5; }

/* Fixed decisions and the seven lines. */
.d-fixed { margin: 22px 0 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--bg-panel); }
.d-fixed h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.d-fixed ul { margin: 0; padding-left: 20px; font-size: 14.5px; }
ol.d-seven { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: seven; border-top: 1px solid var(--border); }
ol.d-seven > li { counter-increment: seven; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
ol.d-seven > li::before { content: counter(seven); color: var(--text-secondary); font: 600 13px/1.7 var(--font-mono); }

/* Captures. */
figure.d-shot { margin: 18px 0 0; }
figure.d-shot .d-shot-frame { border: 1px solid var(--border-strong); border-radius: var(--radius-panel); overflow: hidden; background: var(--bg-panel); }
img.d-img { width: 100%; height: auto; }
figure.d-shot figcaption { margin: 8px 2px 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.5; }
figure.d-shot figcaption b { color: var(--text-primary); font-weight: 600; }
img.t-dark { display: block; }
img.t-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) img.t-light { display: block; }
  :root:not([data-theme]) img.t-dark { display: none; }
}
:root[data-theme="light"] img.t-light { display: block; }
:root[data-theme="light"] img.t-dark { display: none; }
:root[data-theme="dark"] img.t-light { display: none; }
:root[data-theme="dark"] img.t-dark { display: block; }
.d-shots3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.d-shots2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.d-shots3 figure.d-shot, .d-shots2 figure.d-shot { margin: 0; }

/* Measured facts. */
dl.d-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; border: 1px solid var(--border); border-radius: var(--radius-panel); overflow: hidden; background: var(--bg-panel); }
dl.d-facts > div { padding: 12px 14px; border-right: 1px solid var(--border); }
dl.d-facts > div:last-child { border-right: 0; }
dl.d-facts dt { color: var(--text-secondary); font-size: 12.5px; line-height: 1.35; }
dl.d-facts dd { margin: 2px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
dl.d-facts dd small { font-size: 12.5px; font-weight: 400; color: var(--text-secondary); letter-spacing: 0; }

/* Tables. */
.d-tablewrap { margin: 14px 0 0; overflow-x: auto; }
table.d-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
table.d-table th, table.d-table td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--border); }
table.d-table th { color: var(--text-secondary); font-weight: 600; font-size: 13px; white-space: nowrap; }
table.d-table td:first-child { font-weight: 600; }
table.d-table td.d-n { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Redrawn layouts of other products. */
.d-refs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.d-ref { border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--bg-panel); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.d-ref h3 { margin: 0; font-size: 15px; font-weight: 600; }
.d-ref p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.d-ref p.d-take { color: var(--text-secondary); }
.d-ref p.d-take b { color: var(--text-primary); font-weight: 600; }
.d-ref p.d-src { font-size: 12.5px; color: var(--text-secondary); margin-top: auto; }
.d-dia { display: grid; gap: 4px; height: 128px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-base); font: 500 11.5px/1.2 var(--font-mono); color: var(--text-secondary); }
.d-dia > div, .d-dia .d-b, .d-dia .d-col > div:not(.d-pills) { border: 1px solid var(--border-strong); border-radius: 5px; display: grid; place-items: center; text-align: center; padding: 2px; min-width: 0; white-space: nowrap; }
.d-dia .is-chat { background: var(--accent-soft); border-color: var(--accent); color: var(--text-primary); }
.d-dia .d-col { display: grid; gap: 4px; border: 0; padding: 0; place-items: stretch; }
.d-dia .d-pills { display: flex; gap: 3px; align-items: stretch; justify-content: flex-start; border: 0; padding: 0; }
.d-dia .d-pills span { display: grid; place-items: center; min-width: 26px; padding: 0 5px; border: 1px solid var(--border-strong); border-radius: 4px 4px 0 0; }
.d-dia .d-pills span.is-chat { background: var(--accent-soft); border-color: var(--accent); color: var(--text-primary); }
.d-dia-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.d-dia-row.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.d-dia-row .d-dia { height: 100px; }
.d-dia-cap { font: 500 12px/1.3 var(--font-mono); color: var(--text-secondary); text-align: center; margin: 4px 0 0; }
.d-tabs-demo { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font: 500 11px/1 var(--font-mono); }
.d-tabs-demo span { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 6px 6px 0 0; color: var(--text-secondary); }
.d-tabs-demo i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-secondary); display: inline-block; }
.d-tabs-demo i.is-run { background: var(--ok); }
.d-tabs-demo i.is-ask { background: var(--warn); }
.d-tabs-demo i.is-new { background: var(--accent); }

/* The prototype's stage. */
.d-stage { margin-top: 18px; }
.d-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 10px; }
.d-seg { display: inline-flex; border: 1px solid var(--control-line); border-radius: var(--radius-ctl); overflow: hidden; }
.d-seg button { height: var(--ctl-h); padding: 0 12px; border: 0; border-right: 1px solid var(--control-line); background: transparent; color: var(--text-primary); cursor: pointer; white-space: nowrap; font-size: 13.5px; }
.d-seg button:last-child { border-right: 0; }
.d-seg button[aria-pressed="true"] { background: var(--accent-fill); color: var(--on-accent); }
.d-seg button:focus-visible, .d-try button:focus-visible, .d-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-bar .d-label { color: var(--text-secondary); font-size: 13px; margin-right: -8px; }
.d-btn { height: var(--ctl-h); padding: 0 14px; border: 1px solid var(--control-line); border-radius: var(--radius-ctl); background: transparent; color: var(--text-primary); cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.d-btn:hover, .d-seg button:hover:not([aria-pressed="true"]) { background: var(--bg-hover); }
.d-frame { border: 1px solid var(--border-strong); border-radius: var(--radius-panel); overflow: hidden; background: var(--bg-frame); }
.d-frame-note { margin: 8px 2px 0; color: var(--text-secondary); font-size: 13.5px; }
.d-try { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; counter-reset: tryn; }
.d-try li { counter-increment: tryn; }
.d-try button { width: 100%; min-height: 44px; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; text-align: left; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-ctl); background: var(--bg-panel); color: var(--text-primary); cursor: pointer; font-size: 13.5px; line-height: 1.35; }
.d-try button::before { content: counter(tryn); color: var(--text-secondary); font: 600 12px/1 var(--font-mono); }
.d-try button:hover { background: var(--bg-hover); }
.d-try button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.d-hint { margin: 0 2px 10px; min-height: 44px; color: var(--text-secondary); font-size: 14px; }
.d-hint b { color: var(--text-primary); font-weight: 600; }
.d-static { display: none; }
.d-insp-row { display: grid; grid-template-columns: repeat(3, 322px) minmax(0, 1fr); gap: 24px; margin-top: 18px; align-items: start; }
.d-insp-row figure { margin: 0; }
.d-insp-row .d-frame { width: 100%; }
.d-insp-row .d-insp-title { margin: 0 2px 8px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.d-insp-row figcaption { margin: 8px 2px 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.5; }
.d-insp-notes { min-width: 0; max-width: 520px; }
.d-insp-notes ul.d-list { margin: 0; font-size: 14px; line-height: 1.55; }
.d-insp-notes ul.d-list > li { margin-bottom: 10px; }

/* Decisions. */
.d-decs { margin: 18px 0 0; border-bottom: 1px solid var(--border); }
.d-dec { padding: 14px 0; border-top: 1px solid var(--border); }
.d-dec h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 600; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: baseline; }
.d-dec h3 .d-id { font: 600 12.5px/1.6 var(--font-mono); color: var(--text-secondary); }
.d-dec ul { margin: 0 0 6px 44px; padding: 0; list-style: none; }
.d-dec li { display: grid; grid-template-columns: 22px minmax(0, 1fr); margin: 0 0 3px; color: var(--text-secondary); }
.d-dec li b { font-weight: 600; }
.d-dec li.is-rec { color: var(--text-primary); }
.d-dec p { margin: 0 0 0 44px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.d-dec p b { color: var(--text-primary); font-weight: 600; }
.d-crops { display: grid; gap: 10px; margin: 10px 0 0; }
.d-crops .d-shot-frame { background: var(--bg-frame); }
.d-foot { margin-top: 48px; padding-top: 18px; padding-bottom: 56px; color: var(--text-secondary); font-size: 13px; }
.d-foot p { margin: 0; padding-top: 18px; border-top: 1px solid var(--border); }

@media (max-width: 1379px) {
  .d-insp-row { grid-template-columns: repeat(3, 322px); justify-content: center; }
  .d-insp-notes { grid-column: 1 / -1; width: 100%; max-width: 840px; margin: 0 auto; }
}
@media (max-width: 1339px) {
  .d-refs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .d-insp-row { grid-template-columns: repeat(2, 322px); }
}
@media (max-width: 899px) {
  .d-dia-row, .d-dia-row.is-two { grid-template-columns: minmax(0, 1fr); }
  .d-dia-row .d-dia { height: 72px; }
  .d-live { display: none; }
  .d-static { display: block; }
  .d-shots3, .d-shots2 { grid-template-columns: minmax(0, 1fr); }
  dl.d-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dl.d-facts > div:nth-child(2) { border-right: 0; }
  dl.d-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  table.d-stack thead { display: none; }
  table.d-stack, table.d-stack tbody, table.d-stack tr, table.d-stack td { display: block; width: 100%; }
  table.d-stack tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  table.d-stack td { border: 0; padding: 2px 0; }
  table.d-stack td[data-l]::before { content: attr(data-l) ": "; color: var(--text-secondary); font-weight: 400; font-size: 12.5px; }
  table.d-stack td:first-child::before { content: none; }
}
@media (max-width: 700px) {
  .d-wrap, .d-wide { padding-left: 16px; padding-right: 16px; }
  .d-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-nav a { min-height: 40px; }
  h1.d-title { font-size: 28px; }
  .d-refs { grid-template-columns: minmax(0, 1fr); }
  .d-insp-row { grid-template-columns: minmax(0, 322px); justify-content: center; }
  .d-dec ul, .d-dec p { margin-left: 0; }
  .d-dec h3 { grid-template-columns: 38px minmax(0, 1fr); }
}

@media (max-width: 1250px) { .d-try { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
