/* FoodAI Pro workspace (/pro/). Builds on app.css and blog.css: their colour variables (light and dark),
   buttons, .seg and .suggest. The label prints alone on A4 (print rules at the end). */

main.blog:has(> .pro) { max-width: 1080px; }
.pro h1 { margin-top: 10px; }
.pro h2 { font: 700 1.2rem/1.25 var(--display); }
.pro h3 { margin-top: 18px; font-size: 1rem; }
.pro-loading { margin-top: 24px; color: var(--muted); }
.pro-muted { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.pro-muted p + p { margin-top: 4px; }
.pro-small { font-size: .78rem; color: var(--muted); }
.pro-unknown { color: var(--warm); font-style: italic; }
.recipe-pro { margin-top: 10px; font-size: .92rem; }
.recipe-pro a { color: var(--accent); font-weight: 600; }

/* Tabs: one per part of the workspace, all in sight at any width: compact enough for the eight of them to
   share one row of the desktop page, and wrapping onto more rows (never scrolling off the edge) on a phone. */
.pro-tabs { display: flex; flex-wrap: wrap; gap: 0 2px; margin-top: 22px; border-bottom: 1px solid var(--line); }
.pro-tabs button { flex: none; padding: 9px 9px; font-size: .93rem; border-bottom: 2px solid transparent; font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (max-width: 600px) { .pro-tabs button { padding: 6px 7px; font-size: .84rem; } }
.pro-tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--ink); }
.pro-notice { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); font-size: .92rem; }

.pro-card { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pro-two { display: grid; gap: 0 16px; }
@media (min-width: 820px) { .pro-two { grid-template-columns: 1fr 1fr; } }

.pro-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin-top: 12px; font-size: .85rem; color: var(--muted); }
.pro-field input, .pro-field select, .pro-add input, .pro-amount input, .pro-share input {
  width: 100%; min-width: 0; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font-size: 1rem;
}
.pro-field input:focus, .pro-field select:focus, .pro-add input:focus, .pro-amount input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.pro-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.pro-mode { margin-top: 14px; }

.pro-lines { margin-top: 12px; padding: 0; list-style: none; counter-reset: line; }
.pro-line { display: grid; grid-template-columns: 1fr 120px 32px; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pro-line-name { display: flex; flex-direction: column; min-width: 0; font-weight: 500; }
.pro-line-name small { overflow: hidden; font-size: .75rem; font-weight: 400; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
/* The line's own cooking method: a fold under the name, "as the dish" until it is opened and changed. */
.pro-lm { font-size: .75rem; font-weight: 400; color: var(--muted); }
.pro-lm summary { width: max-content; max-width: 100%; cursor: pointer; }
.pro-lm[open] summary { color: var(--ink); }
.pro-lm select { max-width: 100%; margin-top: 4px; padding: 3px 6px; font-size: .8rem; }
.pro-amount { display: flex; align-items: center; gap: 6px; }
.pro-amount input { text-align: right; padding: 7px 8px; }
.pro-amount span { width: 14px; font-size: .85rem; color: var(--muted); }
.pro-x { width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; color: var(--muted); }
.pro-x:hover { background: var(--warm-soft); color: var(--warm); }

.pro-add { position: relative; margin-top: 12px; }
.pro-suggest { list-style: none; margin: 0; max-height: 320px; overflow-y: auto; }
.pro-suggest li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.pro-suggest li small { margin-left: auto; color: var(--muted); }
.pro-suggest li[data-add]:hover { background: var(--accent-soft); }
.pro-own { margin-top: 12px; }
.pro-own summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.pro-own-form { margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--sunken); }
.pro-own-form .btn { margin-top: 12px; }
.pro-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; border: 0; font-size: .9rem; }
.pro-checks legend { margin-bottom: 6px; padding: 0; font-weight: 600; }
.pro-checks label { display: inline-flex; align-items: center; gap: 6px; }

.pro-badge { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); font: 600 .7rem var(--font); letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; }
.pro-table { margin-top: 10px; overflow-x: auto; }
.pro-table table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.pro-table td { white-space: nowrap; }
.pro-table th, .pro-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.pro-table th:first-child, .pro-table td:first-child { text-align: left; }
.pro-table thead th { font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.pro-table tbody th { font-weight: 500; }
.pro-sub th { padding-left: 22px !important; font-weight: 400 !important; color: var(--muted); }
.pro-contrib tbody th { min-width: 14em; }
.pro-contrib th small { display: block; max-width: 44ch; margin-top: 2px; font-size: .75rem; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }
@media (max-width: 600px) { .pro-table table { font-size: .84rem; } .pro-table th, .pro-table td { padding: 6px 5px; } .pro-card { padding: 14px 12px; } }
.pro-notes p { margin-top: 8px; font-size: .88rem; line-height: 1.5; }
.pro-warn { margin-top: 16px; padding: 10px 14px 10px 30px; border-radius: 12px; background: var(--warm-soft); color: var(--ink); font-size: .9rem; }
p.pro-warn { padding-left: 14px; }
.pro-how summary { list-style: none; cursor: pointer; }
.pro-how summary::-webkit-details-marker { display: none; }
.pro-how summary h2::after { content: " ▾"; color: var(--muted); font-size: .9rem; }
.pro-how > p { margin-top: 10px; font-size: .92rem; }
.pro-formula { padding: 8px 12px; border-radius: 10px; background: var(--sunken); font-variant-numeric: tabular-nums; line-height: 1.6; }

.pro-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pro-export .pro-buttons { margin-top: 0; }
.pro-btn { border: 1px solid var(--line); background: var(--surface); }
.pro-btn:hover { border-color: var(--accent); }
.pro-share { margin-top: 8px; font-size: .9rem; color: var(--accent); }
.pro-cite { margin-top: 10px; font-size: .88rem; }

/* The label: Ukrainian and English side by side on a wide screen, one under the other on a phone. */
.pro-labels { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 820px) { .pro-labels { grid-template-columns: 1fr 1fr; } }
.pro-label { padding: 16px; border: 2px solid var(--ink); border-radius: 6px; background: var(--surface); font-size: .9rem; line-height: 1.45; }
.pro-label h3 { margin: 0 0 8px; font-size: 1.1rem; }
.pro-label p { margin-top: 6px; }
.pro-label strong { font-weight: 800; }
.pro-decl { width: 100%; margin-top: 10px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pro-decl td { white-space: nowrap; }
.pro-decl caption { padding-bottom: 4px; font-weight: 700; text-align: left; }
.pro-decl th, .pro-decl td { padding: 3px 6px; border-top: 1px solid var(--ink); text-align: right; }
.pro-decl th:first-child { text-align: left; font-weight: 400; }
.pro-decl thead th { font-weight: 700; }
.pro-decl .pro-sub th { padding-left: 16px !important; color: inherit; }

/* The documents (technological card, allergen matrix, cost sheet): a sheet with its fields in place. */
.pro-doc { line-height: 1.45; }
.pro-doc h3 { margin-top: 20px; }
.pro-doc-title { margin-top: 10px; font-size: 1.3rem !important; }
.pro-docline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: .9rem; color: var(--muted); }
.pro-docline input { flex: 1 1 14em; min-width: 0; padding: 4px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: 1rem; }
.pro-docline input:focus, .pro-doc td input:focus, .pro-sign input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pro-dish { margin-top: 6px; }
.pro-dish input { font-weight: 600; }
.pro-card-nums .pro-field b { font-size: 1.05rem; color: var(--ink); padding: 8px 0 0; }
.pro-card-nums .pro-field small { font-size: .75rem; }
.pro-text { display: block; width: 100%; margin-top: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: .95rem; line-height: 1.45; resize: vertical; }
.pro-text:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.pro-print-text, .pro-print-only { display: none; }
.pro-q { margin-top: 8px; font-size: .92rem; }
.pro-q .pro-text { margin-top: 2px; }
.pro-doc td { text-align: right; }
.pro-doc tbody th, .pro-doc tfoot th { text-align: left !important; }
.pro-raw td:first-child { text-align: left; color: var(--muted); }
.pro-raw thead tr:first-child th:nth-child(-n+2), .pro-cost thead th:first-child { text-align: left; }
.pro-doc td input, .pro-doc td select { width: 5.5em; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; text-align: right; }
.pro-doc td select { width: auto; text-align: left; }
.pro-tag { display: block; margin-top: 2px; font-size: .68rem; font-weight: 600; letter-spacing: .03em; color: var(--accent); }
.pro-tag-hint { color: var(--muted); font-weight: 500; }
.pro-raw thead th, .pro-cost thead th { white-space: normal; vertical-align: bottom; }
.pro-raw tfoot th, .pro-raw tfoot td, .pro-cost tfoot th, .pro-cost tfoot td { font-weight: 700; border-bottom: 0; }
.pro-raw tbody th, .pro-cost tbody th { min-width: 9em; }
.pro-cost th small { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); }
.pro-per { white-space: nowrap; }
.pro-pc { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; font-size: .75rem; color: var(--muted); }
.pro-pc input { width: 4.5em !important; }
.pro-narrow { max-width: 460px; }
.pro-price-line { margin-top: 8px; font-weight: 600; }
.pro-checkline { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: .92rem; }
.pro-checkline input { margin-top: 3px; flex: none; }
.pro-inputas { display: block; margin-top: 10px; }
.pro-inputas .seg { margin-top: 6px; }
.pro-signs { display: grid; gap: 14px 20px; margin-top: 26px; }
@media (min-width: 700px) { .pro-signs { grid-template-columns: repeat(3, 1fr); } }
.pro-sign { display: grid; gap: 6px; font-size: .88rem; }
.pro-sign label { display: grid; grid-template-columns: 5.5em 1fr; align-items: end; gap: 6px; color: var(--muted); }
.pro-sign input { min-width: 0; padding: 3px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; }
.pro-sigline { display: block; height: 1.6em; border-bottom: 1px solid var(--line); }
.pro-disclaimer { margin-top: 4px; }
.pro-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.pro-chips li { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 12px; border-radius: 999px; background: var(--sunken); font-size: .9rem; }
.pro-chips .pro-x { width: 28px; height: 28px; }

/* The allergen matrix: group names written upwards, so 14 columns fit beside the dish names. */
.pro-matrix thead th { vertical-align: bottom; text-align: center; }
.pro-matrix thead th:not(:first-child) span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .8rem; }
.pro-matrix td { width: 2.6rem; text-align: center !important; padding: 6px 4px !important; font-size: 1.05rem; line-height: 1; }
.pro-matrix td input { width: auto; padding: 0; }
.pro-matrix tbody th { min-width: 11em; white-space: normal; }
/* On a narrow screen the table scrolls sideways: the dish names stay in view. */
.pro-matrix tbody th, .pro-matrix thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.pro-matrix tbody tr:nth-child(even) th { background: var(--sunken); }
@media (max-width: 600px) { .pro-matrix tbody th { min-width: 8em; } }
.pro-matrix tbody th small { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); }
.pro-matrix tbody tr:nth-child(even) { background: var(--sunken); }
.pro-mx-c { color: var(--warm); font-weight: 700; }
.pro-mx-m { color: var(--muted); }
.pro-legend { margin: 10px 0 0; padding-left: 0; list-style: none; }
.pro-legend li + li { margin-top: 3px; }

@media print {
  @page { size: A4; margin: 15mm; }
  @page wide { size: A4 landscape; margin: 12mm; }
  .pro-matrix-doc { page: wide; }
  .pro-print-text { display: block; white-space: pre-wrap; margin-top: 4px; font-size: 10pt; }
  .pro-q .pro-print-text { display: inline; }
  .pro-print-only { display: inline; }
  .pro-doc { font-size: 10pt; }
  .pro-doc h3 { margin-top: 10pt; font-size: 11pt; }
  .pro-doc td input, .pro-doc td select, .pro-docline input, .pro-sign input { border: 0; padding: 0; background: none; appearance: none; -webkit-appearance: none; }
  .pro-doc td input::placeholder { color: #000; font-style: italic; }
  .pro-docline input, .pro-sign input { border-bottom: 1px solid #000; }
  .pro-sigline { border-color: #000; }
  .pro-signs { grid-template-columns: repeat(3, 1fr); break-inside: avoid; }
  .pro-matrix input { display: none; }
  .pro-matrix tbody tr:nth-child(even), .pro-matrix tbody tr:nth-child(even) th { background: none; }
  .pro-matrix th, .pro-matrix td { border: 1px solid #000 !important; }
  .pro-mx-c, .pro-mx-m { color: #000; }
  .pro-raw th, .pro-raw td, .pro-cost th, .pro-cost td { border: 1px solid #000; padding: 3px 5px; }
  .pro-tag-hint { display: none; }
  .pro-tag { color: #000; }
  .pro-sign input::placeholder { color: transparent; }
  .pro-table table { font-size: 9.5pt; }
  .pro-badge { border: 1px solid #000; background: none; }
  :root { --ink: #000; --surface: #fff; --bg: #fff; --line: #999; --muted: #333; }
  body { background: #fff; color: #000; }
  .top, .foot, .pro > h1, .pro > .post-lead, .no-print, .pro-loading, .pro-share { display: none !important; }
  main.blog { max-width: none; padding: 0; }
  .pro-card { border: 0; padding: 0; break-inside: avoid; }
  .pro-two { display: block; }
  .pro-field input, .pro-field select { border: 0; padding: 0; background: none; }
  .pro-amount input { border: 0; background: none; }
  .pro-table { overflow: visible; }
  .pro-how { display: block; }
  .pro-labels { grid-template-columns: 1fr 1fr; gap: 8mm; }
  .pro-label { break-inside: avoid; font-size: 9pt; border-color: #000; }
}

/* The references under "How it was calculated". */
.pro-refs { margin-top: 14px; }
.pro-refs h3 { font-size: .95rem; color: var(--ink); }
.pro-refs ol { margin-top: 6px; padding-left: 1.4em; list-style: decimal; }
.pro-refs li { overflow-wrap: anywhere; }
.pro-refs li + li { margin-top: 4px; }
.pro-refs a, .pro-how small a { color: var(--accent); }

/* The account bar above the workspace (pro.js renderAccount) and the list of saved formulations. */
.pro-account { margin-top: 16px; }
.pro-acc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pro-acc-bar > .pro-muted { flex: 1 1 280px; margin: 0; }
.pro-acc-bar .pro-buttons { margin-top: 0; }
.pro-acc-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; flex: 1 1 220px; }
.pro-acc-who a { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.pro-acc-who .pro-muted { overflow-wrap: anywhere; }
.pro-acc-out { display: contents; }
.pro-acc-msg:empty { display: none; }
.pro-flist-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pro-flist-items { margin: 8px 0 0; padding: 0; list-style: none; }
.pro-flist-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pro-flist-item.is-current .pro-flist-head b { color: var(--accent); }
.pro-flist-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.pro-flist-head b { overflow-wrap: anywhere; }
.pro-flist-head small { color: var(--muted); font-size: .8rem; }
.pro-flist-item .pro-buttons { margin-top: 8px; gap: 6px; }
.pro-flist-item .btn { padding: 6px 12px; font-size: .88rem; }
.pro-flist-share { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pro-flist-share input { flex: 1 1 220px; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-size: .85rem; }
.pro-flist-share p { flex-basis: 100%; margin: 0; }
.pro-danger { color: var(--warm); }
.pro-danger:hover { border-color: var(--warm); }

/* The account page (/pro/account.php). */
.acc-back { margin-top: 10px; font-size: .92rem; }
.acc-back a { color: var(--accent); }
.acc-err { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--warm-soft); color: var(--warm); font-size: .9rem; }
.acc-submit { margin-top: 14px; }
.acc-forgot { margin-top: 14px; }
.acc-stored { margin: 6px 0 10px; padding-left: 1.2em; list-style: disc; font-size: .9rem; }
.acc-stored li + li { margin-top: 3px; }
.acc .pro-card form { margin: 0; }
.acc .pro-buttons form { display: inline; }
.acc-delete { border: 1px solid var(--warm); color: var(--warm); background: var(--surface); }
.acc .pro-card p { overflow-wrap: anywhere; }
/* A link drawn as a button keeps the button's look (the page's link colour and underline would win). */
.pro a.btn { display: inline-block; text-decoration: none; }
.pro a.btn.pro-btn { color: var(--ink); }
.pro a.btn.btn-primary { color: var(--accent-ink); }
.pro-acc-bar .btn { padding: 8px 14px; font-size: .92rem; }
.acc-danger .pro-muted { margin-top: 6px; }

/* «Раціон» (ration-view.js): the days, the reference person, the table with bars, the findings. */
.pro { --amber: #a86b00; }
@media (prefers-color-scheme: dark) { .pro { --amber: #f0b44c; } }
.pro-suggest li[data-ra-add]:hover, .pro-suggest li[data-pf-add]:hover, .pro-suggest li[data-mx-add]:hover { background: var(--accent-soft); }
.pro-person { margin: 12px 0 0; padding: 0; border: 0; }
.pro-person legend { padding: 0; font-weight: 600; }
.pro-days { display: flex; flex-wrap: wrap; gap: 6px; }
.pro-day { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; font-weight: 600; color: var(--muted); }
.pro-day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.pro-day-add { border-style: dashed; color: var(--accent); }
.pro-ration-doc h3 { margin-top: 14px; }
.pro-ra-table td { white-space: normal; }
.pro-ra-table td:nth-child(2), .pro-ra-table td:nth-child(3) { min-width: 7em; }
.pro-ra-table td small { color: var(--muted); font-size: .72rem; }
.pro-ra-pct { font-weight: 700; }
.pro-ra-barcell { width: 32%; min-width: 90px; }
.pro-ra-bar { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--sunken); overflow: hidden; }
.pro-ra-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--muted); }
.pro-ra-bar i { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--ink); opacity: .55; }
.pro-ra-low .pro-ra-bar span, .pro-ra-sw.pro-ra-low { background: var(--amber); color: var(--amber); }
.pro-ra-ok .pro-ra-bar span, .pro-ra-sw.pro-ra-ok { background: var(--accent); color: var(--accent); }
.pro-ra-high .pro-ra-bar span, .pro-ra-sw.pro-ra-high { background: var(--warm); color: var(--warm); }
.pro-ra-sw { background: none !important; }
.pro-ra-low .pro-ra-pct { color: var(--amber); }
.pro-ra-high .pro-ra-pct { color: var(--warm); }
.pro-ra-findings { display: grid; gap: 4px 20px; }
@media (min-width: 820px) { .pro-ra-findings { grid-template-columns: 1fr 1fr; } .pro-ra-find-unsure { grid-column: 1 / -1; } }
.pro-ra-find ul { margin: 6px 0 0; padding-left: 1.2em; list-style: disc; font-size: .9rem; }
.pro-ra-find li + li { margin-top: 4px; }
.pro-ra-find-short h3 { color: var(--amber); }
.pro-ra-find-over h3 { color: var(--warm); }
.pro-ra-notes { margin-top: 14px; }
.pro-ra-notes summary { cursor: pointer; font-weight: 600; }
.pro-ra-notes ul, .pro-ra-notes ol { margin-top: 6px; padding-left: 1.3em; }
.pro-ra-notes ul { list-style: disc; }
.pro-ra-notes ol { list-style: decimal; }
.pro-ra-notes li { overflow-wrap: anywhere; }
.pro-ra-notes li + li { margin-top: 3px; }
.pro-ra-notes a { color: var(--accent); }
.pro-ra-acc { margin-top: 12px; }
.pro-flist h3 { margin-top: 12px; }

/* «Профіль» (profile-view.js): the points tables, the Nutri-Score letter, the WHO model's verdict. */
.pro-profile-doc h4 { margin-top: 14px; font-size: .95rem; }
.pro-profile-doc ol { margin-top: 6px; padding-left: 1.3em; list-style: decimal; }
.pro-profile-doc ol li { overflow-wrap: anywhere; }
.pro-profile-doc a { color: var(--accent); }
.pro-pf-table caption { padding: 6px 0 2px; font-weight: 700; text-align: left; }
.pro-pf-table td:nth-child(4) { color: var(--muted); }
.pro-pf-unused td, .pro-pf-unused th { opacity: .5; text-decoration: line-through; }
.pro-pf-total th, .pro-pf-total td { font-weight: 700; border-bottom: 0; }
.pro-ns { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 600; }
.pro-ns-letter { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; font: 800 1.5rem/1 var(--font); color: #fff;
  print-color-adjust: exact; -webkit-print-color-adjust: exact; }
/* The five classes in the scale's own order, dark green to dark orange. */
.pro-ns-A { background: #038141; }
.pro-ns-B { background: #85bb2f; }
.pro-ns-C { background: #fecb02; color: #222; }
.pro-ns-D { background: #ee8100; }
.pro-ns-E { background: #e63e11; }
.pro-pf-bad td:last-child, .pro-ns-who.pro-pf-bad { color: var(--warm); }
.pro-pf-ok td:last-child, .pro-ns-who.pro-pf-ok { color: var(--accent); }
.pro-ns-who { margin-top: 10px; }

@media print {
  .pro-ra-bar, .pro-ra-bar span, .pro-ra-sw { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .pro-ra-bar { border: 1px solid #999; }
  .pro-ration-doc .pro-print-only, .pro-ration-doc .pro-print-only p { display: block; }
  .pro-ra-notes { display: block; }
  .pro-ra-notes summary { list-style: none; }
  .pro-ra-table th, .pro-ra-table td, .pro-pf-table th, .pro-pf-table td { padding: 2px 4px; }
  .pro-ra-findings { grid-template-columns: 1fr 1fr; }
  .pro-ra-find li { font-size: 9pt; }
  .pro-ra-find-short h3, .pro-ra-find-over h3, .pro-ra-low .pro-ra-pct, .pro-ra-high .pro-ra-pct { color: #000; }
}
.pro-ra-lines .pro-line { grid-template-columns: 1fr 150px 32px; }
.pro-ra-lines .pro-amount span { width: auto; min-width: 14px; }
.pro-ra-bar-in { display: none; }
@media (max-width: 600px) {
  .pro-ra-barcell { display: none; }
  .pro-ra-bar-in { display: block; margin-top: 4px; }
  .pro-ra-table th[scope="row"] { min-width: 6.5em; }
  .pro-ra-table td small { display: block; }
  .pro-ra-table { font-size: .8rem !important; }
  .pro-ra-table th, .pro-ra-table td { padding: 6px 3px !important; }
  .pro-ra-table thead th { font-size: .66rem; }
}
.pro-ra-pct { white-space: nowrap; }
@media print { .pro-ra-barcell { display: table-cell !important; } .pro-ra-bar-in { display: none !important; } }
.pro-ra-lines .pro-amount input { flex: 1 1 0; }

/* «Навчання» (teaching-view.js): classes, tasks, the class table, results of a check, a work on view. */
.pro-t-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
.pro-t-inline .pro-field { flex: 1 1 220px; }
.pro-t-inline .btn { flex: none; }
.pro-t-code { margin-top: 8px; font-size: 1rem; }
.pro-t-code b { font: 700 1.3rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.pro-t-task, .pro-t-class { padding: 12px 0; border-top: 1px solid var(--line); }
.pro-t-task.is-current { border-left: 3px solid var(--accent); padding-left: 10px; }
.pro-t-class.is-current b { color: var(--accent); }
.pro-t-text { margin-top: 6px; font-size: .92rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.pro-t-task details summary, .pro-t-ready summary { cursor: pointer; font-weight: 600; margin-top: 6px; }
.pro-t-readylist { margin: 8px 0 0; padding: 0; list-style: none; }
.pro-t-readylist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.pro-t-readylist .btn { margin-left: auto; padding: 6px 12px; font-size: .88rem; }
.pro-t-students small { margin-left: 4px; }
.pro-t-table th[scope="col"] { min-width: 7em; white-space: normal; text-transform: none; letter-spacing: 0; }
.pro-t-table tbody th { position: sticky; left: 0; background: var(--surface); }
.pro-t-cell { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); cursor: pointer; }
.pro-t-cell.pro-ok { border-color: var(--accent); background: var(--accent-soft); }
.pro-ok { color: var(--accent); }
.pro-bad { color: var(--warm); }
.pro-t-results td { white-space: normal; }
.pro-t-results td:last-child { white-space: nowrap; }
.pro-t-form { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.pro-t-form textarea, .pro-t-form input[type="datetime-local"] { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.pro-t-conds { margin: 14px 0 0; padding: 0; border: 0; }
.pro-t-conds legend { padding: 0; font-weight: 600; }
.pro-t-condlist { margin: 6px 0 0; padding-left: 1.2em; list-style: disc; font-size: .92rem; }
.pro-t-condlist li { overflow-wrap: anywhere; }
.pro-t-adder { align-items: flex-end; }
.pro-t-adder .btn { margin-top: 12px; }
.pro-viewing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--warm-soft); }
.pro-ro { min-width: 0; margin: 0; padding: 0; border: 0; }
.pro-ro input, .pro-ro select, .pro-ro textarea { opacity: .85; }
.pro-working { background: var(--sunken); }

/* On a phone the profile's points tables (five columns) did not fit: their last column, the points, was cut off
   behind a sideways scroll. There each row puts its label on a line of its own, and the numbers share the width
   below it, so every column is in view. Print and wider screens keep the plain table. */
@media screen and (max-width: 600px) {
  .pro-pf-table thead tr, .pro-pf-table tbody tr { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .pro-pf-table tr > * { flex: 1 1 0; min-width: 0; border-bottom: 0; white-space: normal; overflow-wrap: anywhere; }
  .pro-pf-table tr > :first-child { flex-basis: 100%; padding-bottom: 0; }
  .pro-pf-table thead tr > :first-child:empty { display: none; }
  .pro-pf-table caption { display: block; }
}
@media screen and (max-width: 600px) { .pro-pf-table thead th { font-size: .62rem; letter-spacing: 0; overflow-wrap: normal; } }

/* «Технологічний процес» (process-view.js): the two modes, the stages with their operations, where a line enters,
   the marks and footnotes of the nutrition table, рух сировини, норми витрат, the flow diagram. */
.pro-flowmode { margin-top: 12px; }
.pro-flowmode button { white-space: normal; }
.pro-example { margin-top: 8px; }
.pro-linkbtn { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: .9rem; font-weight: 600; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pro-flow .pro-stages { display: grid; gap: 14px; margin-top: 14px; }
.pro-stage { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); }
.pro-stage.is-final { border-color: var(--accent); }
.pro-stage-head { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 0 12px; }
.pro-stage-head .pro-field { margin-top: 0; }
.pro-stage-no, .pro-op-no { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: .85rem; color: var(--ink); }
.pro-stage-no { margin-bottom: 6px; background: var(--accent-soft); border-color: transparent; }
.pro-stage-final { align-self: end; margin: 0 0 8px !important; color: var(--accent) !important; font-weight: 600; }
.pro-stage-head .pro-x { margin-bottom: 4px; }
.pro-ops { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
/* The buttons sit in the corner, over the folded line, so an unfolded operation has the card's whole width. */
.pro-op { position: relative; list-style: none; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pro-op .pro-field { margin-top: 8px; }
.pro-op-fold > summary { display: flex; align-items: flex-start; gap: 10px; padding: 2px 100px 2px 0; cursor: pointer; list-style: none; }
.pro-op-fold > summary::-webkit-details-marker { display: none; }
.pro-op-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.pro-op-sum { display: flex; flex-direction: column; min-width: 0; padding-top: 3px; }
.pro-op-sum b::after { content: " ▾"; color: var(--muted); font-weight: 400; font-size: .8em; }
.pro-op-fold[open] .pro-op-sum b::after { content: " ▴"; }
.pro-op-sum small { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.pro-op-body { padding: 4px 0 6px; }
.pro-op-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 10px; }
.pro-op-sel { flex: 1 1 220px; }
.pro-op-own { flex: 1 1 200px; }
.pro-op-btns { position: absolute; top: 4px; right: 4px; display: inline-flex; gap: 0; }
.pro-op-btns .pro-x { font-size: 1rem; }
.pro-op-btns .pro-x:disabled { opacity: .3; cursor: default; background: none; }
.pro-op-src { margin-top: 6px; overflow-wrap: anywhere; }
.pro-op-reg { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.pro-op-more { margin-top: 8px; font-size: .85rem; }
.pro-op-more summary { cursor: pointer; color: var(--muted); }
.pro-op-dm { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.pro-op > .pro-small { margin-top: 4px; line-height: 1.45; }
.pro-stage-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; }
.pro-stage-foot .pro-muted { margin: 0; }
.pro-an { margin-top: 10px; font-size: .88rem; }
.pro-an summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.pro-an-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pro-place { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: .75rem; font-weight: 400; color: var(--muted); }
.pro-place select { max-width: 100%; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: .82rem; }
.pro-mark { margin-left: 2px; color: var(--warm); font-weight: 700; font-size: .7em; }
.pro-fn { margin-top: 12px; }
.pro-fn h3 { margin-top: 0; font-size: .92rem; }
.pro-fn ol { margin-top: 6px; padding-left: 1.6em; list-style: decimal; font-size: .86rem; line-height: 1.5; }
.pro-fn li::marker { color: var(--warm); font-weight: 700; }
.pro-fn li + li { margin-top: 4px; }
.pro-flow-out h3:first-child { margin-top: 0; }
.pro-wrap { white-space: normal !important; }
.pro-move th, .pro-move td.pro-wrap, .pro-opstable th, .pro-opstable td.pro-wrap { text-align: left !important; }
.pro-opstable td:nth-child(2), .pro-opstable td:nth-child(3) { text-align: left; }
.pro-op-note td { padding-top: 0 !important; font-size: .78rem; color: var(--muted); }
.pro-has-note th, .pro-has-note td { border-bottom: 0 !important; }
@media screen and (max-width: 600px) {
  .pro-move .pro-reg { display: none; }
  .pro-move { font-size: .76rem !important; }
  .pro-move th, .pro-move td { padding: 5px 3px !important; }
  .pro-move thead th { font-size: .62rem; letter-spacing: 0; white-space: normal; }
  .pro-move tbody th { min-width: 0; }
  .pro-opstable td[data-label].pro-none { display: none; }
  .pro-opstable thead { display: none; }
  .pro-opstable tr { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .pro-opstable tr.pro-has-note { padding-bottom: 0; border-bottom: 0; }
  .pro-opstable th, .pro-opstable td { display: block; padding: 1px 4px !important; border: 0 !important; text-align: left !important; }
  .pro-opstable td[data-label]:empty { display: none; }
  .pro-opstable td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .78rem; }
  .pro-opstable .pro-stage-row { padding: 0; }
}
.pro-move tbody th, .pro-opstable tbody th { min-width: 10em; white-space: normal; }
.pro-stage-row th { padding-top: 12px !important; font-weight: 700 !important; color: var(--ink); background: var(--sunken); }
.pro-trim th { font-weight: 400 !important; }
.pro-opstable td.pro-wrap { min-width: 7em; }
.pro-flow-how { margin-top: 16px; }
.pro-flow-how summary { cursor: pointer; font-weight: 700; }
.pro-flow-how ol { margin-top: 8px; padding-left: 1.4em; list-style: decimal; font-size: .9rem; line-height: 1.5; }
.pro-flow-how li + li { margin-top: 6px; }
@media (max-width: 600px) {
  .pro-stage { padding: 10px 8px; }
  .pro-op { padding: 6px; }
  .pro-op-btns .pro-x { width: 28px; height: 28px; }
  .pro-op-fold > summary { padding-right: 86px; }
  .pro-stage-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pro-stage-head > .pro-field:nth-of-type(2), .pro-stage-head .pro-stage-final { grid-column: 1 / -1; grid-row: 2; }
  .pro-op-reg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The flow diagram: a column per stage, side by side; on a narrow screen it scrolls inside its own box. */
.pro-scheme-wrap { margin-top: 10px; overflow-x: auto; padding-bottom: 6px; }
.pro-scheme-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pro-scheme { display: flex; align-items: flex-start; gap: 18px; width: max-content; min-width: 100%; }
.pro-sch-stage { flex: 0 0 236px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.pro-sch-stage.is-final { border-style: solid; border-color: var(--accent); }
.pro-sch-stage h4 { margin: 0 0 8px; font-size: .9rem; }
.pro-sch-ops { margin: 0; padding: 0; list-style: none; }
.pro-sch-op + .pro-sch-op::before { content: "↓"; display: block; text-align: center; color: var(--muted); line-height: 1.3; }
.pro-sch-in { margin: 0 0 3px; padding: 0; list-style: none; font-size: .74rem; color: var(--accent); }
.pro-sch-in li::before { content: "→ "; }
.pro-sch-join-in { font-weight: 700; }
.pro-sch-box { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border: 1px solid var(--ink); border-radius: 6px; background: var(--surface); font-size: .8rem; line-height: 1.3; }
.pro-sch-box small { color: var(--muted); font-size: .72rem; }
.pro-sch-loss { margin: 2px 0 0; text-align: right; font-size: .72rem; color: var(--warm); }
.pro-sch-loss::after { content: " ↘"; }
.pro-sch-to, .pro-sch-final { margin: 8px 0 0; padding: 6px 8px; border-radius: 6px; font-size: .8rem; font-weight: 700; }
.pro-sch-to { background: var(--sunken); }
.pro-sch-final { background: var(--accent-soft); text-align: center; }
.pro-card-flow h3 { margin-top: 20px; }

@media print {
  .pro-scheme-wrap { overflow: visible; }
  .pro-scheme { flex-wrap: wrap; width: auto; gap: 6mm; }
  .pro-sch-stage { flex: 0 0 56mm; break-inside: avoid; border-color: #000; }
  .pro-sch-box { border-color: #000; }
  .pro-sch-in, .pro-sch-loss, .pro-mark, .pro-fn li::marker { color: #000; }
  .pro-sch-final, .pro-sch-to { background: none; border: 1px solid #000; }
  .pro-move th, .pro-move td, .pro-opstable th, .pro-opstable td, .pro-norms th, .pro-norms td { border: 1px solid #000; padding: 2px 4px; }
  .pro-opstable td.pro-wrap { max-width: none; }
  .pro-flow-how { display: block; }
  .pro-card-flow { break-before: auto; }
}

/* «Контроль» (control-view.js): the hazards, the decision tree, the checks of an operation; the «НАССР» tab. */
.pro-ctl { margin-top: 12px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.pro-ctl[open] { border-style: solid; background: var(--bg); }
.pro-ctl > summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.pro-ctl > summary small { margin-left: 6px; font-weight: 600; color: var(--muted); }
.pro-ctl h4 { margin: 14px 0 4px; font-size: .9rem; }
.pro-ctl > .btn { margin-top: 8px; padding: 6px 12px; font-size: .88rem; }
.pro-hz, .pro-ck { position: relative; margin: 8px 0 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pro-hz legend, .pro-ck legend { padding: 0 4px; font-size: .85rem; font-weight: 700; }
.pro-hz-x { position: absolute; top: 2px; right: 4px; }
.pro-span2 { grid-column: span 2; }
@media (max-width: 600px) { .pro-span2 { grid-column: auto; } }
.pro-src { color: var(--muted); font-size: .74rem; }
.pro-risk { margin-top: 8px; padding: 6px 10px; border-radius: 8px; font-size: .86rem; line-height: 1.45; background: var(--sunken); }
.pro-risk.is-medium { background: var(--accent-soft); }
.pro-risk.is-high { background: var(--warm-soft); }
.pro-tree { margin-top: 10px; font-size: .88rem; }
.pro-tree > summary { cursor: pointer; font-weight: 600; }
.pro-tree-list { margin: 8px 0 0; padding-left: 0; list-style: none; }
.pro-tree-list li { padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.45; }
.pro-tree-a { margin-left: 6px; color: var(--accent); }
.pro-tree-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pro-tree-now .pro-tree-q { flex: 1 1 260px; font-weight: 600; }
.pro-tree-btns { display: inline-flex; gap: 6px; }
.pro-tree-btns .btn { padding: 5px 14px; font-size: .88rem; }
.pro-tree-out { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--sunken); }
.pro-tree-out.is-ccp { background: var(--warm-soft); }
.pro-overruled { color: var(--warm); }
.pro-limits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .pro-limits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pro-warn-list { margin: 4px 0 0; padding-left: 1.2em; list-style: disc; color: var(--warm); font-size: .84rem; }
.pro-warn-list:empty { display: none; }
.pro-refs-ctl { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--sunken); font-size: .84rem; line-height: 1.45; }
.pro-refs-ctl ul { margin: 4px 0 0; padding-left: 1.1em; list-style: disc; }
.pro-refs-ctl li + li { margin-top: 4px; }
.pro-refs-ctl details summary { cursor: pointer; color: var(--muted); }
.pro-refs-ctl .pro-linkbtn { font-size: .82rem; }
.pro-actual { align-items: end; }
.pro-limit-state { margin: 0 0 9px; font-size: .9rem; font-weight: 700; }
.pro-limit-state.is-operating, .pro-limit-state.is-within { color: var(--accent); }
.pro-limit-state.is-between, .pro-limit-state.is-outsideOperating { color: var(--amber); }
.pro-limit-state.is-outside { color: var(--warm); }
.pro-ctl-badge { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.pro-ctl-badge.is-ccp, .pro-sch-mark { background: var(--warm); color: #fff; }
.pro-ctl-badge.is-oprp { background: var(--accent-soft); color: var(--ink); }
.pro-sch-box.is-ccp { border-width: 2px; border-color: var(--warm); }
.pro-sch-box.is-oprp { border-style: dashed; }
.pro-sch-mark { align-self: flex-start; margin-bottom: 2px; padding: 0 6px; border-radius: 4px; font-size: .68rem; font-weight: 700; }
.pro-sch-box.is-oprp .pro-sch-mark { background: var(--accent-soft); color: var(--ink); }
.pro-product .pro-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pro-barrier { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; line-height: 1.5; }
.pro-barrier h4 { margin: 0 0 4px; font-size: .92rem; }
.pro-barrier p + p { margin-top: 4px; }
.pro-path td { white-space: nowrap; }
.pro-path tbody th { min-width: 12em; white-space: normal; font-style: italic; }
.pro-haccp-doc h2 { margin-bottom: 6px; }
.pro-proddoc tbody th { width: 34%; min-width: 9em; white-space: normal; text-align: left; vertical-align: top; }
.pro-proddoc td { text-align: left !important; }
.pro-hzdoc th, .pro-hzdoc td, .pro-plan th, .pro-plan td { text-align: left !important; vertical-align: top; }
.pro-hzdoc thead th, .pro-plan thead th { white-space: normal; text-transform: none; letter-spacing: 0; font-size: .74rem; }
.pro-hzdoc td small { display: block; color: var(--muted); font-size: .74rem; }
.pro-hzdoc td.pro-wrap { min-width: 7em; }
.pro-plan td.pro-wrap { min-width: 10em; }
/* Thirteen columns: on screen the plan keeps readable widths and scrolls inside its box; on paper it is landscape. */
@media screen { .pro-plan { min-width: 1500px; } .pro-plan td.pro-w-l { min-width: 18em; } .pro-plan td:first-child { white-space: normal; min-width: 6em; } .pro-hzdoc { min-width: 1250px; } }
.pro-plan tr.is-ccp td:first-child b { color: var(--warm); }
.pro-signs-2 { margin-top: 18px; }
@media (min-width: 700px) { .pro-signs-2 { grid-template-columns: 1fr 1fr; } }
.pro-valid { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
@media print {
  @page plan { size: A4 landscape; margin: 10mm; }
  .pro-plan-doc, .pro-haccp-doc:has(.pro-hzdoc) { page: plan; }
  .pro-haccp-doc { break-before: page; }
  .pro-haccp-doc:first-of-type { break-before: auto; }
  .pro-hzdoc th, .pro-hzdoc td, .pro-plan th, .pro-plan td, .pro-proddoc th, .pro-proddoc td { border: 1px solid #000; padding: 2px 4px; font-size: 8.5pt; }
  .pro-sch-box.is-ccp { border-color: #000; }
  .pro-sch-mark, .pro-ctl-badge.is-ccp { background: none; color: #000; border: 1px solid #000; }
  .pro-signs-2 { grid-template-columns: 1fr 1fr; }
  .pro-plan td, .pro-plan th, .pro-hzdoc td, .pro-hzdoc th { white-space: normal !important; min-width: 0 !important; overflow-wrap: break-word; hyphens: auto; }
  .pro-plan, .pro-hzdoc { width: 100%; }
  .pro-plan { table-layout: fixed; }
  .pro-hzdoc td:nth-child(n+5):nth-child(-n+7), .pro-hzdoc td:nth-child(n+9):nth-child(-n+14) { width: 1.8em; text-align: center !important; }
  .pro-hzdoc td:nth-child(8) { width: 7em; }
}
.pro-ctl .pro-tree-list, .pro-ctl .pro-tree-list li { list-style: none; }
.pro-hz small.pro-small { display: block; margin-top: 2px; line-height: 1.4; }
/* Lethality: an operation's «Летальність», the stand-alone tool and the document «Розрахунок летальності». */
.pro-th { margin-top: 12px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.pro-th[open] { border-style: solid; background: var(--bg); }
.pro-th > summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.pro-th > summary small { margin-left: 6px; font-weight: 600; color: var(--muted); }
.pro-th h4, .pro-th-tool h4 { margin: 16px 0 4px; font-size: .92rem; }
.pro-th h5, .pro-th-tool h5 { margin: 10px 0 2px; font-size: .86rem; }
.pro-th p + p, .pro-th-tool p + p { margin-top: 4px; }
.pro-th-rule { padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--sunken); border-radius: 0 8px 8px 0; }
.pro-th-paste { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; }
.pro-th-points summary, .pro-th-ints summary, .pro-th-targets summary, .pro-th-milk summary, .pro-th-missing summary, .pro-th-about summary { cursor: pointer; font-weight: 600; font-size: .88rem; margin-top: 8px; }
.pro-th-pts input { width: 7.5em; min-width: 0; padding: 4px 6px; }
.pro-th-pts td, .pro-th-pts th { padding: 2px 6px; }
.pro-th-table td, .pro-th-table th { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .82rem; }
.pro-th-table tr.is-outside td { color: var(--muted); }
.pro-th-table tr.is-below td, .pro-th-table tr.is-above td { color: var(--warm); }
.pro-th-ptab td, .pro-th-ptab th { padding: 2px 6px; font-size: .82rem; text-align: center; }
.pro-th-ptab caption { text-align: left; font-size: .84rem; font-weight: 600; margin-bottom: 2px; }
.pro-th-plot { margin: 8px 0; overflow-x: auto; }
.pro-th-plot svg { display: block; width: 100%; height: auto; max-width: 760px; }
/* On a phone the plot keeps legible labels and scrolls inside its box. */
@media screen and (max-width: 600px) { .pro-th-plot svg { min-width: 560px; } }
.pro-th-plot .pro-th-temp { fill: none; stroke: var(--warm); stroke-width: 2; stroke-linejoin: round; }
.pro-th-plot .pro-th-rate { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.pro-th-plot .pro-th-grid { stroke: var(--line); stroke-width: 1; }
.pro-th-plot .pro-th-axis { stroke: var(--muted); stroke-width: 1; }
.pro-th-plot .pro-th-from { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 5 4; }
.pro-th-plot .pro-th-phase { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.pro-th-plot .pro-th-span { fill: var(--sunken); }
.pro-th-plot .pro-th-hit { fill: transparent; }
.pro-th-plot .pro-th-hit:hover { fill: var(--ink); fill-opacity: .06; }
.pro-th-plot text { font-family: var(--font); }
.pro-th-plot .pro-th-ax { fill: var(--muted); font-size: 11px; }
.pro-th-plot .pro-th-lab { fill: var(--ink); font-size: 12px; font-weight: 600; }
.pro-th-F { font-size: 1.05rem; }
.pro-th-warn { color: var(--warm); font-size: .88rem; }
.pro-th-cmp { padding: 8px 10px; border-radius: 8px; line-height: 1.45; }
.pro-th-cmp.is-yes { background: var(--accent-soft); }
.pro-th-cmp.is-no { background: var(--warm-soft); }
.pro-th-ph { width: 5em; padding: 2px 6px; }
.pro-formula { display: inline-flex; align-items: center; gap: 4px; font-size: 1.02rem; }
.pro-frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.25; }
.pro-frac > span:first-child { padding: 0 4px 1px; border-bottom: 1px solid currentColor; }
.pro-frac > span:last-child { padding: 1px 4px 0; }
.pro-th-formula small { color: var(--muted); }
.pro-th-tool .pro-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.pro-th .pro-row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.pro-th-doc h3 { margin: 14px 0 4px; font-size: 1rem; }
@media print {
  .pro-th-plot svg { max-width: 100%; }
  .pro-th-plot .pro-th-temp { stroke: #000; }
  .pro-th-plot .pro-th-rate { fill: #ddd; stroke: #000; }
  .pro-th-cmp { border: 1px solid #000; background: none !important; }
  .pro-th-table td, .pro-th-table th, .pro-th-ptab td, .pro-th-ptab th { border: 1px solid #000; padding: 1px 3px; font-size: 8pt; }
}
/* «Шаблони процесів» and the product calculations on their operations. */
.pro-templates { margin-top: 8px; font-size: .92rem; }
.pro-templates > summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.pro-templates ul { margin: 6px 0 0; padding: 0; list-style: none; }
.pro-templates li { padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.4; }
.pro-templates li small { display: block; color: var(--muted); font-size: .8rem; }
.pro-tool { margin-top: 12px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.pro-tool[open] { border-style: solid; background: var(--bg); }
.pro-tool > summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.pro-tool > summary small { margin-left: 6px; font-weight: 600; color: var(--muted); }
.pro-tool p + p { margin-top: 4px; }
.pro-tool .pro-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pro-tool-eq { margin: 6px 0; font-variant-numeric: tabular-nums; }
.pro-tool-mis { color: var(--warm); }
.pro-tool-out { margin-top: 6px; }
.pro-tool-tab input { width: 7em; padding: 3px 6px; }
.pro-tool-tab td small { display: block; }
/* «Відповідність стандарту» and Дробот's dough tables. */
.pro-std h3 { margin: 10px 0 4px; font-size: 1rem; }
.pro-std-tab td small { font-weight: 700; }
.pro-std-in { color: var(--accent); }
.pro-std-out { color: var(--warm); }
.pro-dgh-tab td, .pro-tool-tab td { font-variant-numeric: tabular-nums; }
.pro-tool h5 { margin: 14px 0 4px; font-size: .9rem; }
/* A long option (a method with its pages) must not widen the operation on a phone. */
.pro-tool select, .pro-std select { max-width: 100%; min-width: 0; }
.pro-tool .pro-field, .pro-tool .pro-row > * { min-width: 0; }
.pro-stage-head .pro-field { min-width: 0; }
.pro-stage-head select { max-width: 100%; width: 100%; }
.pro-stage, .pro-stage-head > * { min-width: 0; }
.pro-op, .pro-op-fold, .pro-op-body, .pro-tool { min-width: 0; }

/* ── «Добавки»: additives as ingredients (additives-view.js) ── */
.pro-ad-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pro-ad-head h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.pro-ad h4, .pro-ad-card h4 { margin: 14px 0 0; font-size: .9rem; }
.pro-ad-amount { display: flex; align-items: center; gap: 6px; }
.pro-ad-amount input { flex: 1 1 auto; min-width: 0; width: 100%; }
.pro-ad-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.pro-ad-add select { flex: 1 1 240px; min-width: 0; max-width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.pro-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .9rem; }
.pro-ad-notes, .pro-ad-fn { margin: 6px 0 0; padding-left: 1.2em; list-style: disc; line-height: 1.45; }
.pro-ad-comps { margin: 8px 0 0; padding: 0; list-style: none; }
.pro-ad-comp { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.pro-ad-comp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pro-ad-comp-head b { flex: 1 1 200px; overflow-wrap: anywhere; }
.pro-ad-comp-head .pro-ad-amount { flex: 0 0 110px; }
.pro-ad-comp-head input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.pro-ad-spec, .pro-ad-al, .pro-ad-law, .pro-ad-card, .pro-ad-sources { margin-top: 12px; }
.pro-ad-spec > summary, .pro-ad-al > summary, .pro-ad-law > summary, .pro-ad-sources > summary { cursor: pointer; font-size: .88rem; color: var(--muted); }
.pro-ad-card > summary { cursor: pointer; font-weight: 600; }
.pro-ad-sub { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.pro-ad-sub h3, .pro-ad-dstu h3, .pro-ad-label h3, .pro-ad-labelnotes h3 { margin: 0 0 4px; font-size: 1rem; }
.pro-ad-rows { margin: 8px 0 0; padding: 0; list-style: none; }
.pro-ad-rows > li, .pro-ad-comps > li { list-style: none; }
.pro-ad-row { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--line); background: var(--accent-soft); border-radius: 0 10px 10px 0; font-size: .92rem; line-height: 1.5; }
.pro-ad-row.is-over { border-left-color: var(--warm); background: var(--warm-soft); }
.pro-ad-row.is-future { opacity: .8; }
.pro-ad-row p { margin: 2px 0; overflow-wrap: anywhere; }
.pro-ad-over { color: var(--warm); }
.pro-ad-ok { font-weight: 600; }
.pro-ad-verdict { font-size: .84rem; font-style: italic; }
.pro-ad-dstu { margin-top: 16px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: .92rem; }
.pro-ad-dstu ul, .pro-ad-warns, .pro-ad-hints, .pro-ad-types { margin: 6px 0 0; padding-left: 1.2em; list-style: disc; line-height: 1.5; }
.pro-ad-dstu li.is-over { color: var(--warm); }
.pro-ad-warns li, .pro-ad-hints li, .pro-ad-types li { margin-top: 6px; overflow-wrap: anywhere; }
.pro-ad-types li.is-ref { color: var(--muted); }
.pro-ad-line p { margin-top: 8px; line-height: 1.55; overflow-wrap: anywhere; }
.pro-ad-labelnotes { background: var(--warm-soft); }
.pro-ad q { quotes: '«' '»'; }
@media print { .pro-ad-row { background: none; } .pro-ad-card:not([open]) { display: none; } }
