:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#192a20;background:#f3f6f2;line-height:1.45;--green:#176647;--ink:#192a20;--muted:#53655a;--line:#dce5dc;--paper:#fff}
*{box-sizing:border-box}
body{margin:0}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(2.25rem,6vw,4rem);letter-spacing:-.065em;line-height:1.05;margin-bottom:14px}
h2{font-size:1.17rem;letter-spacing:-.025em}
h3{font-size:1rem}
p{color:var(--muted)}
[hidden]{display:none!important}
.shell{width:min(1180px,calc(100% - 56px));margin-inline:auto}
.topbar{background:#fff;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:11px;height:64px;font-weight:700}
.brand-icon,.file-icon{display:grid;place-items:center;color:var(--green);background:#e0f0e6;font-weight:800;border-radius:10px}
.brand-icon{width:34px;height:34px}
.hero{padding:48px 0 27px}
.hero p{max-width:670px}
.card{background:var(--paper);border:1px solid var(--line);border-radius:16px;margin-bottom:18px}
.upload{display:flex;align-items:center;gap:15px;padding:21px 22px}
.upload p,.table-head p,.dialog-header p{font-size:.875rem;margin-top:3px}
.file-icon{width:48px;height:48px;font-size:1.6rem;flex:none}
.upload .button{margin-left:auto;flex:none}
.button{appearance:none;border:1px solid transparent;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 15px;font:inherit;font-size:.875rem;font-weight:700;cursor:pointer;white-space:nowrap}
.primary{color:#fff;background:var(--green)}
.primary:hover{background:#105439}
.secondary{color:var(--green);background:#fff;border-color:var(--line)}
.secondary:hover,.secondary[aria-pressed=true]{background:#eaf4ed}
button:disabled{opacity:.48;cursor:default}
.file-button{position:relative;overflow:hidden}
.file-button input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.file-button:focus-within,:focus-visible{outline:3px solid #65ae90;outline-offset:2px}
.notice{padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:#e9f3ec;margin-bottom:18px;white-space:pre-wrap}
.notice.error,.inline-warning{color:#7b3d18}
.notice.error{background:#fff0e4;border-color:#eed5c2}
.settings{padding:17px 22px}
summary{cursor:pointer;font-weight:700}
.settings-grid{margin-top:14px;display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr))}
label{display:grid;gap:5px;font-size:.83rem;font-weight:650}
fieldset{min-width:0;grid-column:1/-1;border:1px solid var(--line);border-radius:10px;margin:0;padding:0 13px 13px}
legend{font-size:.84rem;font-weight:700;padding:0 5px}
input,select{min-width:0;width:100%;background:#fff;color:var(--ink);border:1px solid #cbd9cf;border-radius:8px;padding:8px 10px;font:inherit;height:38px}
input[type=checkbox]{width:17px;height:17px;accent-color:var(--green)}
input[type=file]{font-size:.74rem}
small{font-size:.72rem;color:var(--muted);font-weight:500}
.table-head,.filters{display:flex;align-items:center;gap:12px;padding:17px 22px}
.table-head{justify-content:space-between}
.filters{padding-top:0;justify-content:flex-start}
.filters input{width:min(326px,100%)}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;text-align:left;font-size:.875rem}
th,td{padding:11px 12px;border-top:1px solid var(--line);white-space:nowrap}
td:nth-child(2){white-space:normal;min-width:180px}
td:first-child,th:first-child{padding-left:22px;width:48px}
td:last-child,th:last-child{padding-right:22px;text-align:right}
th{color:var(--muted);font-size:.79rem;background:#f8faf8}
td small{display:block}
.badge{display:inline-block;border-radius:5px;padding:3px 7px;background:#eaf3eb;color:#205e3e;font-size:.74rem;font-weight:650}
.badge.warn{background:#fff2e6;color:#804b24}
.text-button{font:inherit;font-weight:700;font-size:.8rem;background:none;border:none;padding:3px 0;color:var(--green);cursor:pointer;text-decoration:underline;text-underline-offset:3px;text-align:left}
dialog{padding:0;width:min(1220px,calc(100% - 32px));max-height:calc(100dvh - 34px);border:1px solid var(--line);border-radius:16px;color:var(--ink)}
dialog::backdrop{background:#102319a6}
.dialog-header,.dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 20px;border-bottom:1px solid var(--line)}
.dialog-footer{border-top:1px solid var(--line);border-bottom:0;position:sticky;bottom:0;background:#fff;font-size:.82rem}
.review-grid{display:grid;grid-template-columns:340px minmax(0,1fr)}
.review-form{padding:18px 20px;display:grid;align-content:start;gap:14px}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.wide{grid-column:1/-1}
#scores{display:grid;gap:5px;margin-top:10px}
.score{display:grid;grid-template-columns:1fr 65px;gap:7px;align-items:center}
.score-title{font-size:.77rem;font-weight:bold;color:var(--muted);margin-top:7px}
.inline-warning{font-size:.8rem;white-space:pre-line}
.preview{background:#eef3ef;padding:18px;min-width:0}
.preview canvas{display:block;width:100%;height:auto;background:#fff;box-shadow:0 3px 12px #10231924}
.page-controls{display:flex;gap:6px;margin-bottom:12px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:820px){.settings-grid{grid-template-columns:1fr 1fr}.review-grid{grid-template-columns:1fr}.preview{grid-row:1}}
@media(max-width:560px){.shell{width:calc(100% - 28px)}.hero{padding-top:32px}.upload{flex-wrap:wrap}.upload .button{margin:0}.settings-grid{grid-template-columns:1fr}.table-head,.filters{padding-inline:13px}.filters{flex-wrap:wrap}.filters label{width:100%}.filters input{width:100%}}
