/* The example pages (case studies, the sample audit report, the quote-to-invoice walkthrough), on top of /style.css.
   Kept apart so the site's own stylesheet stays untouched. Both languages sit in each page; <html lang> picks one. */
html[lang="es"] [data-l="en"], html:not([lang="es"]) [data-l="es"] { display: none !important; }

/* The label and the language and currency switches, under the site header on every example page. */
.ex-bar { border-bottom: 1px solid var(--line); background: rgba(245, 196, 81, .07); font-size: 14px; }
.ex-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 8px; padding-bottom: 8px; }
.ex-label { margin: 0; color: var(--muted); }
.ex-label strong { color: var(--accent); margin-right: 4px; }
.ex-switch { display: flex; gap: 10px; }
.ex-switch [role="group"] { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.ex-switch button { font: 600 13px var(--display); letter-spacing: .06em; color: var(--muted); background: transparent; border: 0; padding: 6px 12px; min-height: 32px; cursor: pointer; }
.ex-switch button[aria-pressed="true"] { background: rgba(74, 222, 128, .18); color: var(--fg); }

.btn.small { font-size: 15px; padding: 10px 18px; }
.link-btn { font: inherit; font-weight: 600; color: var(--primary); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.small { font-size: 14px; }
.note { font-size: 14px; color: var(--muted); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.chip { font: 600 13px/1.3 var(--display); padding: 5px 11px; border-radius: 999px; background: rgba(74, 222, 128, .14); color: var(--fg); }
.chip.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--display); color: var(--ink); background: var(--grad); }
.avatar.done { background: var(--primary); }

/* Headline numbers, used on the case pages and the report. */
.kpis { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 6px; align-content: start; color: var(--muted); font-size: 15px; line-height: 1.45; }
.kpi b { font: 700 clamp(30px, 5vw, 40px)/1.05 var(--display); color: var(--fg); letter-spacing: -.02em; }

/* Case-study pages. */
.case-hero { padding-bottom: 24px; }
.case-hero h1 { font-size: clamp(34px, 6.5vw, 58px); max-width: 900px; }
.case-section { padding: 28px 0; }
.case-cols { display: grid; gap: 28px; }
@media (min-width: 860px) { .case-cols { grid-template-columns: 1fr 1fr; gap: 48px; } }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 700; }
.crumb { color: inherit; text-decoration: none; }

/* ---------- The sample audit report ---------- */
.report .cover { padding-top: 56px; padding-bottom: 24px; }
.cover h1 { font-size: clamp(36px, 7vw, 60px); }
.cover-meta { color: var(--muted); font-size: 15px; }
.report .wrap { max-width: 992px; }
.r-section { padding-top: 36px; padding-bottom: 36px; }
.r-section h2 { font-size: clamp(24px, 4vw, 32px); }
.r-note { color: var(--muted); margin-top: 16px; }
.facts { display: grid; gap: 1px; margin: 20px 0 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--bg-2); padding: 16px 18px; }
.facts dt { font: 600 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.facts dd { margin: 4px 0 0; }

.chart { margin: 20px 0 0; padding: 20px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; }
.chart figcaption strong { color: var(--fg); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 14px; padding: 0; font-size: 14px; color: var(--muted); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.sw.before, .bar.before { fill: #6b8577; background: #6b8577; }
.sw.after, .bar.after { fill: var(--primary); background: var(--primary); }
.c-label { fill: var(--fg); font-size: 14px; }
.c-value { fill: var(--muted); font-size: 13px; font-weight: 600; }
.c-value.strong { fill: var(--fg); }
.c-axis { fill: var(--muted); font-size: 12px; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.bar:hover { opacity: .8; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.print-mode) .chart .bar { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  html:not(.print-mode) .chart .bar.col { transform-origin: center bottom; transform: scaleY(0); }
  html:not(.print-mode) .chart.in .bar { transform: none; }
  html:not(.print-mode) .chart.in .bar.after { transition-delay: .15s; }
}
.chart-table { margin-top: 12px; font-size: 14px; }
.chart-table summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.chart-table table { border-collapse: collapse; margin-top: 10px; min-width: 280px; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 14px 6px 0; border-bottom: 1px solid var(--line); }

.findings, .plan { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 16px; }
.finding { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 70px; }
.f-num { position: absolute; left: 22px; top: 22px; font: 700 20px var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.finding h3 { font-size: 19px; line-height: 1.35; }
.finding dl { display: grid; gap: 10px; margin: 12px 0 0; }
@media (min-width: 760px) { .finding dl { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.finding dt { font: 600 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.finding dd { margin: 2px 0 0; font-size: 15px; line-height: 1.5; }
.f-result dd { color: var(--primary); font-weight: 600; }
@media (max-width: 520px) { .finding { padding-left: 22px; } .f-num { position: static; display: block; margin-bottom: 6px; } }

.plan-item { display: grid; grid-template-columns: 48px 1fr; gap: 16px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.plan-item:first-child { border-color: rgba(74, 222, 128, .5); background: linear-gradient(150deg, rgba(74, 222, 128, .14), rgba(94, 234, 212, .08)); }
.p-rank { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font: 700 22px var(--display); color: var(--ink); background: var(--grad); }
.plan-item h3 { margin-bottom: 6px; }
.plan-item p { margin: 0; color: var(--muted); }
.plan-item .chips-row { margin-top: 12px; }

.roadmap { margin-top: 20px; display: grid; gap: 8px; font-size: 14px; }
.rm-row { display: grid; gap: 4px 14px; align-items: center; }
@media (min-width: 760px) { .rm-row { grid-template-columns: 230px 1fr; } }
.rm-name b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; margin-right: 6px; background: rgba(74, 222, 128, .18); font: 700 12px var(--display); }
.rm-track { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 calc(100% / 13 - 3px), transparent 0 calc(100% / 13)); border-radius: 8px; min-height: 30px; }
.rm-head { color: var(--muted); font-size: 12px; }
.rm-head .rm-track { background: none; min-height: 0; }
.rm-week { text-align: center; }
.rm-bar { border-radius: 8px; background: rgba(74, 222, 128, .22); border: 1px solid rgba(74, 222, 128, .55); padding: 4px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-bar.alt { background: rgba(74, 222, 128, .16); border-color: rgba(74, 222, 128, .5); }
@media (max-width: 759px) { .rm-head .rm-name { display: none; } .rm-name { margin-top: 6px; } }
.r-next .actions { margin-top: 20px; }

/* ---------- The quote-to-invoice walkthrough ---------- */
.wt-page { padding-top: 36px; padding-bottom: 64px; }
.wt-title { font-size: clamp(28px, 5vw, 44px); max-width: 860px; }
.wt-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 20px 0 14px; }
.wt-controls .btn:disabled { opacity: .4; cursor: not-allowed; }
.wt-count { margin-left: auto; color: var(--muted); font-size: 14px; }
.wt-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.wt-steps li { position: relative; flex: 1 0 auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.wt-steps li span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .08); font: 700 11px var(--display); }
.wt-steps li i { font-style: normal; color: var(--clay); font-size: 9px; }
.wt-steps li.done { color: var(--fg); }
.wt-steps li.done span { background: var(--primary); color: var(--ink); }
.wt-steps li.now { color: var(--fg); border-color: var(--primary); background: rgba(74, 222, 128, .12); }
.wt-steps li.now span { background: var(--primary); color: var(--ink); }
.wt-caption { margin: 16px 0 20px; padding: 14px 18px; border-left: 3px solid var(--primary); background: rgba(74, 222, 128, .06); border-radius: 0 12px 12px 0; font-size: 17px; min-height: 3.6em; max-width: 880px; }

.wt-stage { display: grid; gap: 18px; align-items: start; }
.wt-stage > * { min-width: 0; }
.wt-stage > section { padding: 0; } /* the site gives every section page-sized padding */
@media (min-width: 780px) { .wt-stage { grid-template-columns: minmax(260px, 340px) 1fr; } .wt-meter { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .wt-stage { grid-template-columns: 320px 1fr 250px; } .wt-meter { grid-column: auto; } }
.wt-phone, .wt-desk, .wt-meter { background: var(--glass); border: 1px solid var(--line); border-radius: 22px; }
.wt-phone header, .wt-desk header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.wt-phone h2, .wt-desk h2, .wt-meter h2 { font-size: 17px; margin: 0; }
.wt-phone header small, .wt-desk header small { color: var(--muted); font-size: 13px; }

.wt-phone { overflow: hidden; background: #0b1a17; border-color: rgba(74, 222, 128, .25); }
.wt-phone header { background: rgba(74, 222, 128, .08); }
.chat { list-style: none; margin: 0; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; height: 460px; overflow-y: auto; }
@media (max-width: 779px) { .chat { height: 360px; } }
.msg { max-width: 86%; display: grid; gap: 2px; }
.msg > div { padding: 9px 12px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.msg time { font-size: 11px; color: var(--muted); }
.msg.farmer { align-self: flex-end; text-align: right; }
.msg.farmer > div { background: #134e3a; border-bottom-right-radius: 4px; text-align: left; }
.msg.shop { align-self: flex-start; }
.msg.shop > div { background: #17312a; border-bottom-left-radius: 4px; }
.chat-empty { color: var(--muted); font-size: 14px; text-align: center; margin: auto 0; list-style: none; }
.list-photo { display: grid; gap: 4px; padding: 14px 16px; border-radius: 8px; background: #f6f0dc; color: #2b2b2b; font: italic 600 16px/1.3 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; transform: rotate(-1.5deg); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); background-image: repeating-linear-gradient(transparent 0 22px, rgba(56, 120, 200, .25) 22px 23px); }
.doc-chip { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; font: 600 14px var(--display); color: var(--fg); background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: left; }
.doc-chip:hover { border-color: var(--primary); }

.wt-desk { padding-bottom: 14px; }
.track { list-style: none; margin: 0; padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.track li { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.track li.done { border-color: rgba(74, 222, 128, .5); color: var(--primary); }
.track li.done::before { content: "✓ "; }
.desk-card { margin: 16px 18px 0; padding: 18px; border-radius: 16px; background: rgba(10, 23, 18, .6); border: 1px solid var(--line); min-height: 150px; }
.desk-card h3 { font-size: 18px; margin-bottom: 10px; }
.desk-card p { margin: 0 0 10px; font-size: 15px; }
.desk-card p:last-child { margin-bottom: 0; }
.desk-empty { color: var(--muted); text-align: center; padding: 36px 8px; }
.read-lines { margin: 0 0 10px; padding-left: 18px; }
.hand { font-style: italic; }
.ok-line { color: var(--primary); }
.flag { color: var(--accent); }
.big-num { font: 700 28px var(--display); }
.big-num small { font: 400 14px system-ui, sans-serif; color: var(--muted); margin-left: 6px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 12px; }
.mini-table td { padding: 8px 6px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.mini-table td small { display: block; color: var(--muted); font-size: 12px; }
.mini-table tfoot td { border-bottom: 0; font-weight: 700; }
.n { text-align: right; white-space: nowrap; }
.stock { font-size: 12px; font-weight: 600; white-space: nowrap; }
.stock.good { color: var(--primary); }
.stock.warn { color: var(--accent); }

.approve { margin: 16px 18px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(245, 158, 107, .5); background: rgba(245, 158, 107, .08); }
.approve[hidden] { display: none; }
.approve > div { flex: 1 1 160px; font-size: 15px; }
.approve small { display: block; color: var(--muted); font-size: 13px; }
.approve .btn { flex: 0 0 auto; }
.approve:has(.avatar.done) { border-color: rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .06); }
.btn.pressing { transform: scale(.96); box-shadow: 0 0 0 4px rgba(245, 158, 107, .45); }
@media (prefers-reduced-motion: no-preference) { .approve [data-approve] { animation: nudge 1.6s ease-in-out infinite; } }
@keyframes nudge { 50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, .25), 0 8px 30px -8px rgba(74, 222, 128, .6); } }

.desk-sub { margin: 20px 18px 8px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.inbox { list-style: none; margin: 0 18px; padding: 0; display: grid; gap: 6px; }
.inbox li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .035); }
.inbox li span { flex: 1 1 200px; }
.inbox li time { color: var(--muted); font-size: 12px; }
.inbox li em { color: var(--muted); }
.inbox .muted-item span { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .35); color: var(--muted); }
.inbox .muted-item em { text-decoration: none; display: inline-block; }
.inbox .chat-empty { background: none; justify-content: center; }

.wt-meter { padding: 18px; }
.wt-meter table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.wt-meter th, .wt-meter td { text-align: left; padding: 8px 6px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.wt-meter thead th { font: 600 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wt-meter tbody th { font-weight: 400; color: var(--muted); }
.wt-meter td:nth-child(2) { color: var(--primary); font-weight: 700; white-space: nowrap; }
.wt-meter td:nth-child(3) { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .msg.new, .inbox li.new { animation: pop .45s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* The document viewer: quote, order, invoice and receipt as paper. */
dialog.doc { width: min(640px, calc(100% - 32px)); max-height: calc(100% - 48px); border: 0; border-radius: 14px; padding: 28px; background: #fdfcf8; color: #14231b; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog.doc::backdrop { background: rgba(5, 12, 9, .7); backdrop-filter: blur(3px); }
.doc-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #e8ece6; font-size: 22px; cursor: pointer; color: #14231b; }
.doc-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid #14231b; margin-bottom: 14px; }
.doc-head b { font: 700 22px var(--display); display: block; }
.doc-head small { color: #56685d; }
.doc-id { text-align: right; padding-right: 30px; }
.doc-id span { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #56685d; }
.doc-id b { font-size: 18px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.doc-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #56685d; border-bottom: 1px solid #d6d3c8; padding: 6px 4px; }
.doc-table th.n { text-align: right; }
.doc-table td { padding: 8px 4px; border-bottom: 1px solid #ebe8de; }
.doc-table tfoot td { border-bottom: 0; padding-top: 6px; }
.doc-table .grand td { font-weight: 700; font-size: 16px; border-top: 2px solid #14231b; }
.doc-note { font-size: 14px; color: #3c4d43; }
.doc-demo { font-size: 12px; color: #85928a; margin: 0; }
dialog.doc .btn { color: var(--ink); }
dialog.doc .note { color: #56685d; }

/* The results video's page. */
.video-frame { margin: 28px 0 0; max-width: 960px; }
.video-frame video { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); }
.video-frame figcaption { margin-top: 10px; }
.ticks.numbered { counter-reset: n; }
.ticks.numbered li { counter-increment: n; }
.ticks.numbered li::before { content: counter(n); color: var(--primary); font-family: var(--display); }

/* ---------- App shell: the growers and food makers demos (top bar, figures, tabs, panels, activity log) ---------- */
.app-page { padding-top: 36px; padding-bottom: 64px; }
.app-page .lead { font-size: 17px; }
.app { margin-top: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--glass); overflow: hidden; }
.app-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: rgba(74, 222, 128, .06); }
.app-brand { font: 700 18px var(--display); margin-right: 12px; }
.app-date { color: var(--muted); font-size: 15px; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.app-kpis { list-style: none; margin: 0; padding: 16px 20px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-bottom: 1px solid var(--line); }
.app-kpis li { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.app-kpis b { font: 700 24px/1.1 var(--display); color: var(--fg); }
.app-grid { display: grid; }
.app-grid > * { min-width: 0; }
@media (min-width: 1000px) { .app-grid { grid-template-columns: 1fr 290px; } .app-side { border-left: 1px solid var(--line); border-top: 0 !important; } }
.app-main { padding-bottom: 18px; }
.app-tabs { display: flex; gap: 4px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.app-tabs [role="tab"] { font: 600 15px var(--display); color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.app-tabs [role="tab"][aria-selected="true"] { color: var(--fg); border-bottom-color: var(--primary); }
.app-tabs .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(245, 196, 81, .2); color: var(--accent); font-size: 12px; }
.app-tabs .count:empty { display: none; }
.app-panel { padding: 18px 20px 0; }
.app-panel .sub { margin: 22px 0 10px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.app-side { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.app-side h2 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.app-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; max-height: 560px; overflow-y: auto; }
.app-log li { padding-left: 12px; border-left: 2px solid var(--line); }
.app-log li:first-child { border-left-color: var(--primary); }
.app-log time { display: block; font-size: 12px; color: var(--muted); }
.app .table-wrap { overflow-x: auto; }
.app-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.app-table th, .app-table td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.app-table thead th { font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.app-table small { display: block; color: var(--muted); font-size: 12px; }
.app-table .empty { color: var(--muted); text-align: center; padding: 20px; }
.app .st { display: inline-block; font: 600 11px/1.6 var(--display); padding: 1px 8px; border-radius: 999px; }
.app .st-ok { background: rgba(74, 222, 128, .15); color: var(--primary); }
.app .st-low { background: rgba(245, 196, 81, .16); color: var(--accent); }
.app .st-out { background: rgba(248, 113, 113, .16); color: #fca5a5; }
.app .st-order { background: rgba(74, 222, 128, .15); color: var(--primary); }
.app .st-na { background: rgba(255, 255, 255, .06); color: var(--muted); }
.app .approve-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.blocks, .orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.blocks { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.block-card, .order-card { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(10, 23, 18, .45); }
.block-card h3, .order-card h3 { font-size: 17px; margin-bottom: 4px; }
.block-card h3 small, .order-card h3 small { color: var(--muted); font: 400 13px system-ui, sans-serif; }
.block-card p, .order-card p { margin: 0 0 6px; font-size: 15px; }
.order-card.late { border-color: rgba(248, 113, 113, .5); }
.order-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.rec-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; margin: 0 0 18px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(10, 23, 18, .45); max-width: none; }
.rec-form label { font-size: 14px; }
.rec-form .note { grid-column: 1 / -1; margin: 0; }
@media (max-width: 699px) {
  .app-table thead { display: none; }
  .app-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .app-table td, .app-table th { border: 0; padding: 0; }
  .app-table td.n { text-align: left; }
}

/* ---------- Print: the report as a document (Download PDF is this, saved once) ---------- */
@page { size: letter; margin: 14mm 14mm 16mm; }
@media print {
  :root { --fg: #10201a; --muted: #4d6055; --line: #d7e0da; --glass: #fff; --bg-2: #f3f7f4; --primary: #15803d; --accent: #a16207; --ink: #fff; }
  body { background: #fff !important; color: var(--fg); font-size: 11pt; }
  .site-header, .no-print, .ex-switch, .skip, .chart-table { display: none !important; }
  /* The footer's logo is the version for dark grounds and its links don't work on paper; the cover names the brand. */
  .footer-brand img, .site-footer nav { display: none !important; }
  .ex-bar { background: none; border: 0; }
  .ex-bar .wrap, .wrap { max-width: none; padding: 0; }
  .ex-label strong { color: #92400e; }
  .report .cover { padding: 24px 0 12px; }
  .grad, .f-num { background: none; color: var(--fg); -webkit-text-fill-color: currentColor; }
  .r-section { padding: 14px 0; max-width: none; }
  .kpi, .finding, .plan-item, .chart, .facts div { background: #fff; border-color: var(--line); }
  .plan-item:first-child { background: #f0fdf4; }
  .p-rank, .avatar { background: #15803d; color: #fff; }
  .chip { background: #dcfce7; }
  .kpi, .finding, .plan-item, .chart, .roadmap, .facts { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .findings, .plan { display: block; }
  .finding, .plan-item { margin-bottom: 12px; }
  .r-section > .muted { break-after: avoid; }
  .r-section:has(.chart), .r-section:has(.roadmap), .r-next { break-inside: avoid; }
  .kpis { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .kpi { padding: 14px; font-size: 10pt; }
  .kpi b { font-size: 24px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .rm-bar { font-size: 9px; padding: 3px 5px; }
  .sw.before, .bar.before { fill: #a3b8ab; background: #a3b8ab; }
  .sw.after, .bar.after { fill: #15803d; background: #15803d; }
  .chart .bar { transform: none !important; }
  .rm-bar { background: #dcfce7; border-color: #15803d; }
  .rm-bar.alt { background: #d1fae5; border-color: #047857; }
  .rm-track { background: #f3f7f4; }
  .rm-head .rm-track { background: none; }
  .rm-row { grid-template-columns: 200px 1fr; }
  .rm-head .rm-name { display: block; }
  .finding dl { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .site-footer { border-top: 1px solid var(--line); padding: 12px 0 0; }
  * { box-shadow: none !important; text-shadow: none !important; animation: none !important; }
}
