/* Fajtaelemzés: tömör, rendszerszerű felület semleges felületekkel; a márkaszínek csak hangsúlyként jelennek meg. Minden betűtípus helyi. */
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-weight: 400; font-display: swap; src: url(fonts/sora-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url(fonts/sora-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Material Icons'; font-weight: 400; font-display: block; src: url(fonts/material-icons.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --deep: #1f5e33; --green: #3e8e3e; --light: #8dbf4a; --yellow: #e0ae2a; --ink: #16261b;
  --surface: #ffffff; --bg: #f5f6f4; --line: #dcdfd9; --line-strong: #c3c7bf;
  --text: #1b1f1c; --muted: #5a625c; --danger: #b3261e; --danger-bg: #fdf0ef; --warn-bg: #fdf6e3; --ok: #1f7a3d; --info-bg: #eff5ec;
  --radius: 8px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
h1 { font-size: 22px; line-height: 1.2; font-weight: 650; }
h2 { font-size: 16px; line-height: 1.3; font-weight: 650; }
h2.spaced { margin-top: 16px; }
h3 { font-size: 14px; font-weight: 650; }
a { color: var(--deep); }
code { font-size: 12px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error-text { color: var(--danger); }
ul, ol { padding-left: 20px; }

.ic { font-family: 'Material Icons'; font-weight: 400; font-style: normal; font-size: 18px; line-height: 1; display: inline-block; vertical-align: -4px; white-space: nowrap; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; overflow: hidden; width: 1em; flex: none; }
.ic.small { font-size: 16px; }
.ic.big { font-size: 28px; }
.ic.ok { color: var(--ok); }
.ic.warn { color: #a06f00; }

/* gombok és mezők */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: #f0f2ee; }
.btn.flat { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn.flat:hover:not(:disabled) { background: #184c29; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #932018; }
.btn.text { border-color: transparent; background: transparent; color: var(--deep); padding: 6px 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .toggle button:focus-visible, .tabs button:focus-visible, .stored:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: #eceeea; color: var(--text); }
.icon-btn.light { color: #fff; }
.icon-btn.light:hover { background: rgba(255,255,255,.15); color: #fff; }
.help-link { display: inline-flex; padding: 0; border: 0; background: transparent; color: var(--green); cursor: pointer; vertical-align: middle; }
.help-link:hover { color: var(--deep); }
.field { display: inline-flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.field input, .field select, textarea { font: inherit; font-size: 14px; color: var(--text); padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); min-width: 0; max-width: 100%; }
.check { display: inline-flex; align-items: center; gap: 6px; }
.toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.toggle button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 0; border-right: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.toggle button:last-child { border-right: 0; }
.toggle button.on { background: var(--info-bg); color: var(--deep); font-weight: 600; }
.toggle button:disabled { opacity: .5; cursor: default; }

/* keret */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 52px; padding: 6px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: Sora, Inter, sans-serif; font-size: 15px; white-space: nowrap; }
.brand-name span { color: var(--green); }
.brand-name b { color: var(--ink); font-weight: 600; }
.product { padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); font-weight: 550; }
.spacer { flex: 1; }
.stored { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--info-bg); color: var(--deep); font: inherit; font-size: 12px; font-weight: 550; cursor: pointer; }
.user { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 13px; }
.page { display: flex; flex-direction: column; gap: 12px; max-width: 1240px; margin: 0 auto; padding: 14px 16px 24px; }
.page > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.footer { display: flex; flex-wrap: wrap; gap: 6px 18px; max-width: 1240px; margin: 0 auto; padding: 8px 16px 20px; color: var(--muted); font-size: 12px; }
.footer a { display: inline-flex; align-items: center; gap: 4px; }
.progress { position: sticky; top: 52px; z-index: 19; height: 3px; overflow: hidden; background: var(--info-bg); }
.progress span { display: block; width: 35%; height: 100%; background: var(--green); animation: slide 1.1s infinite ease-in-out; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .progress span { animation: none; width: 100%; opacity: .6; } }

.card { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.grid { display: grid !important; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.head-row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; }
.head-row > div:first-child { min-width: 0; flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.banner { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; background: var(--info-bg); border: 1px solid #cfe0c8; border-radius: var(--radius); color: var(--ink); }
.banner span:not(.ic) { flex: 1; }
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; background: var(--info-bg); border-radius: 6px; }

/* belépés */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 440px; gap: 14px; padding: 22px; }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form .field input { width: 100%; }
.login-card hr { width: 100%; margin: 2px 0; border: 0; border-top: 1px solid var(--line); }
.promise { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.promise li { display: flex; gap: 8px; }
.promise .ic { color: var(--green); }

/* feltöltés és futtatások */
.upload-hints { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.upload-hints .help-link .ic { font-size: 15px; }
.upload-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.run-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.run-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.run-list li:first-child { border-top: 0; }
.run-list a { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.run-list a:hover b { color: var(--deep); text-decoration: underline; }
.run-list a span { font-size: 12px; }
.merge-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }

/* táblák */
.table-scroll { overflow-x: auto; max-width: 100%; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
table.data th, table.data td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data thead th { position: sticky; top: 0; background: #f7f8f6; font-weight: 600; color: var(--muted); font-size: 12px; }
table.data .num { text-align: right; }
table.data td.wrap { white-space: normal; min-width: 220px; }
table.data td.name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: #f7f8f6; }
table.data tr.off td { color: var(--muted); }
table.data tr.low td { background: var(--warn-bg); }
table.example td, table.example th { white-space: nowrap; }
.chip { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #eef0ec; color: var(--muted); font-size: 11px; font-weight: 550; white-space: nowrap; }
.chip.check { background: #e7eefa; color: #1c4f94; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #eef0ec; font-size: 12px; white-space: nowrap; }
.badge[data-badge='reliable'] { background: #e6f4ea; }
.badge[data-badge='medium'] { background: #fdf6e3; }
.badge[data-badge='volatile'] { background: #fdecea; }
.link-matrix { width: auto; }
.link-matrix td.weak { color: var(--danger); }

/* szerkesztő */
.edit-scroll { max-height: 66vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.edit-table thead th { z-index: 2; }
.edit-table tbody th { position: sticky; left: 0; z-index: 1; background: #fafbf9; }
.edit-table thead th:first-child { left: 0; z-index: 3; }
.edit-table input { width: 100%; min-width: 66px; padding: 4px 6px; font: inherit; font-size: 13px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text); }
.edit-table input:hover { border-color: var(--line-strong); }
.edit-table input:focus { border-color: var(--green); background: #fff; outline: none; }
.edit-table input.num { text-align: right; font-variant-numeric: tabular-nums; }
.edit-table input.missing { background: #f3f4f1; }
.edit-table input.outlier { border-color: var(--yellow); background: var(--warn-bg); }
.edit-table input::placeholder { color: #9aa19b; font-style: italic; }
.head-cell { display: flex; align-items: center; gap: 2px; min-width: 110px; }
.head-cell input { font-weight: 600; min-width: 60px; }
.st-toggle { padding: 0 5px; height: 20px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.st-toggle.on { background: #1c5cab; border-color: #1c5cab; color: #fff; }
.remove { display: inline-flex; padding: 0; border: 0; background: transparent; color: #9aa19b; cursor: pointer; }
.remove:hover { color: var(--danger); }
.remove .ic { font-size: 15px; }
.table-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.table-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-strong); vertical-align: -2px; }
.swatch.missing { background: #f3f4f1; }
.swatch.outlier { background: var(--warn-bg); border-color: var(--yellow); }
.import-notes { list-style: none; padding: 0; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.import-notes li, .quality p, .changed-note, .warn-line, .plain-note { display: flex; gap: 6px; align-items: flex-start; }
.quality { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 6px; background: var(--warn-bg); font-size: 13px; }
.quality[data-status='blocked'] { background: var(--danger-bg); }
.changed-note { font-size: 13px; color: #805a00; }
.edit-options { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rep-info { display: inline-flex; align-items: center; gap: 4px; }
.merge-info { padding: 6px 10px; background: var(--warn-bg); border-radius: 6px; }

/* eredmény */
.result-header { flex-direction: row !important; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.result-header h2 { overflow-wrap: anywhere; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 8px 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-weight: 550; cursor: pointer; }
.tabs button.on { color: var(--deep); border-bottom-color: var(--deep); }
.tab-body { display: flex; flex-direction: column; gap: 12px; }
.insights { display: flex; flex-direction: column; gap: 12px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.brief { border-left: 3px solid var(--green); }
.brief h2 { display: flex; align-items: center; gap: 4px; }
.brief-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.brief-q { color: var(--muted); margin-right: 5px; }
.brief-name { margin-right: 6px; }
.brief-reason { display: block; font-size: 13px; color: var(--muted); }
.top-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.top-card { flex-direction: row !important; gap: 10px; }
.top-card .rank { font-size: 22px; font-weight: 700; color: var(--green); line-height: 1.1; }
.top-card .body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.top-card h3 { font-size: 15px; overflow-wrap: anywhere; }
.top-card ul { font-size: 13px; color: var(--muted); padding-left: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips .chip { margin-left: 0; }
.verdict { font-weight: 500; }
.compare-pickers { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; }
.vs { padding-bottom: 8px; color: var(--muted); }
.compare-text { font-size: 15px; }
.picker select { min-width: 200px; }
.profile { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; }
.profile-text { display: flex; flex-direction: column; gap: 6px; }
.chart { width: 100%; }
.badge-groups { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.badge-groups li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.badge-names { font-size: 13px; }
.caveats { display: flex; gap: 8px; padding: 2px 4px; font-size: 13px; color: var(--muted); }
.plain-note { font-size: 13px; color: var(--muted); }
.trait-summary .lead { display: flex; gap: 6px; font-weight: 550; }
.trait-summary .ic { color: var(--green); }
.trait-summary ol { padding-left: 42px; }
.trait-controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.trait-control { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.trait-control.off { opacity: .65; }
.trait-name { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.trait-weight { display: flex; align-items: center; gap: 8px; }
.trait-weight input { flex: 1; min-width: 0; accent-color: var(--deep); }
.notes { font-size: 13px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.panel summary::-webkit-details-marker { display: none; }
.panel-title { font-weight: 600; }
.panel-desc { flex: 1; font-size: 12px; color: var(--muted); min-width: 0; }
.chev { transition: transform .15s; color: var(--muted); }
.panel[open] .chev { transform: rotate(180deg); }
.panel-body { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 12px; }
.model-body { display: flex; flex-direction: column; gap: 14px; }
.model-body > div { display: flex; flex-direction: column; gap: 6px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.weights { max-height: 280px; overflow: auto; }
.imputed { columns: 2; font-size: 13px; }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.charts figcaption { font-weight: 600; font-size: 13px; }
.zoomable { width: 100%; height: auto; cursor: zoom-in; border-radius: 4px; }
.files { columns: 3; font-size: 13px; }
.files li { break-inside: avoid; overflow-wrap: anywhere; }
.narrow-only { display: none; }
.row-cards { list-style: none; padding: 0; flex-direction: column; gap: 8px; }
.row-card { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.row-card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; }
.row-card dt { color: var(--muted); }
.row-card dd { margin: 0; }

/* kötegelt */
.batch { gap: 10px; }
.group-body { display: flex; flex-direction: column; gap: 10px; }
.links { display: flex; flex-direction: column; gap: 4px; overflow-x: auto; }
.combine { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.results { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.warn-line { font-size: 13px; color: #805a00; }

/* ablakok */
.backdrop { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; background: rgba(20, 26, 22, .45); overflow-y: auto; }
.modal { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; padding: 18px 20px; background: var(--surface); border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.modal.wide { max-width: 860px; height: 84vh; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal-head h2 { display: flex; align-items: center; gap: 5px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.modal ul { display: flex; flex-direction: column; gap: 4px; }
.help-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; }
.help-body > div { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 12px; }
.help-body section { display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 8px; }
.help-body h3 { color: var(--deep); font-size: 14.5px; }
.receipt-head { display: flex; align-items: center; gap: 10px; }
.receipt-list { padding-left: 18px; }
.toast { position: fixed; left: 50%; bottom: 18px; z-index: 60; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 9px 14px; border-radius: 6px; background: var(--ink); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.toast.error { background: var(--danger); }
.zoom-overlay { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: rgba(15, 18, 16, .92); }
.zoom-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; color: #fff; font-weight: 550; }
.zoom-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: grab; touch-action: none; }
.zoom-stage img { max-width: 96%; max-height: 96%; min-width: 60%; background: #fff; border-radius: 4px; transform-origin: center; user-select: none; }

/* AI-súgó */
.chat { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; display: flex; flex-direction: column; gap: 8px; width: min(400px, 100vw); padding: 12px 14px; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -6px 0 24px rgba(0, 0, 0, .12); }
.chat-warning { display: flex; gap: 6px; padding: 7px 9px; border-radius: 6px; background: var(--warn-bg); font-size: 12px; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.chat-q { align-self: flex-end; max-width: 88%; padding: 6px 10px; border-radius: 10px; background: var(--info-bg); overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-a { max-width: 96%; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-a.off-topic { color: var(--muted); font-style: italic; }
.chat-status { color: var(--danger); font-size: 13px; }
.chat textarea { width: 100%; resize: vertical; }
.chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* nyomtatható lap */
.print-page { background: #e9ebe7; }
.print-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 210mm; margin: 16px auto 8px; padding: 0 16px; }
.sheet { width: 210mm; max-width: 100%; min-height: 297mm; margin: 0 auto 24px; padding: 14mm; background: #fff; color: var(--ink); box-shadow: 0 2px 14px rgba(0, 0, 0, .18); font-size: 10.5pt; line-height: 1.4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet h2 { margin: 12px 0 6px; font-size: 12.5pt; color: var(--deep); }
.sheet table { width: 100%; border-collapse: collapse; font-size: 9.5pt; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { padding: 3px 6px; border-bottom: 1px solid #d3ddcf; text-align: left; vertical-align: top; }
.sheet th { font-weight: 600; color: #4d5e52; background: #eef6e4; }
.sheet .num { text-align: right; white-space: nowrap; }
.sheet-head { display: flex; align-items: center; gap: 16px; padding-bottom: 8px; border-bottom: 3px solid var(--green); }
.sheet-head img { width: 180px; height: auto; flex: none; }
.sheet-head h1 { font-size: 18pt; line-height: 1.15; overflow-wrap: anywhere; }
.sheet-head p { color: #4d5e52; }
.kind { font-size: 9pt; letter-spacing: .08em; text-transform: uppercase; color: var(--green); font-weight: 700; }
.sheet-brief { margin-top: 10px; padding: 8px 10px; border: 2px solid var(--green); border-radius: 8px; }
.sheet-brief h2 { margin-top: 0; }
.sheet-brief ul { padding-left: 18px; font-size: 11pt; }
.sheet-brief li { margin-bottom: 4px; }
.sheet-brief .q { color: #4d5e52; }
.sheet-brief .why { display: block; font-size: 9.5pt; color: #4d5e52; }
.winners { columns: 2; column-gap: 16px; padding-left: 16px; font-size: 9.5pt; }
.sheet-caveats { padding-left: 16px; font-size: 8.5pt; line-height: 1.3; color: #4d5e52; }
.sheet-foot { margin-top: 14px; padding-top: 6px; border-top: 1px solid #d3ddcf; font-size: 8.5pt; color: #4d5e52; }
@page { size: A4; margin: 12mm; }
@media print {
  html, body, .print-page { background: #fff !important; }
  .print-bar { display: none !important; }
  .sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
}

@media (max-width: 900px) {
  .grid, .profile { grid-template-columns: minmax(0, 1fr); }
  .files { columns: 2; }
  .charts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wide-only { display: none; }
  .narrow-only { display: flex; }
  .product, .user { display: none; }
  .files, .imputed, .winners { columns: 1; }
  .btn { min-height: 38px; }
  .picker, .picker select { width: 100%; }
  .sheet { min-height: auto; padding: 16px; }
  .sheet-head { flex-direction: column; align-items: flex-start; }
}
