:root {
  --graphite: #2f3337; --graphite-2: #44494e; --orange: #f39c12; --orange-2: #e67e22;
  --bg: #f4f5f6; --card: #fff; --line: #dcdfe3; --text: #1f2326; --muted: #6b7178;
  --ok: #1e8449; --bad: #c0392b; --warn: #b9770e;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
       color: var(--text); background: var(--bg); }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px;
             background: var(--graphite); color: #fff; border-bottom: 3px solid var(--orange); }
header.top a { color: #fff; text-decoration: none; }
.brand { font-size: 18px; font-weight: 600; }
.brand small { font-weight: 400; color: #c7cbd0; font-size: 12px; margin-left: 8px; }
.logo { background: var(--orange); color: var(--graphite); padding: 2px 7px; border-radius: 4px; margin-right: 6px;
        font-weight: 800; }
header nav a { margin-left: 18px; opacity: .9; } header nav a:hover { opacity: 1; color: var(--orange); }
main { max-width: 1400px; margin: 18px auto; padding: 0 16px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; }
.card.narrow { max-width: 380px; margin: 60px auto; }
h1 { font-size: 22px; margin: 0 0 12px; } h2 { font-size: 17px; margin: 18px 0 10px; } h3 { font-size: 15px; margin: 14px 0 8px; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .gap > * + * { margin-left: 8px; }
.muted { color: var(--muted); } .right { text-align: right; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.btn { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 14px;
       color: var(--text); text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--graphite-2); }
.btn.primary { background: var(--orange); border-color: var(--orange-2); color: #1d1d1d; font-weight: 600; }
.btn.primary:hover { background: var(--orange-2); }
.btn.dark { background: var(--graphite); color: #fff; border-color: var(--graphite); }
.btn.small { padding: 3px 9px; font-size: 12px; } .btn.danger { color: var(--bad); }
input, select, textarea { font: inherit; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
input:focus, select:focus { outline: 2px solid #f8c471; border-color: var(--orange); }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
label > input, label > select { display: block; width: 100%; margin-top: 3px; color: var(--text); font-size: 14px; }
label.chk { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
label.chk input { width: auto; margin: 0; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 16px; }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
table.grid th { background: #f0f1f3; font-weight: 600; font-size: 12px; color: #3a3f44; position: sticky; top: 0; }
table.edit td { padding: 2px 3px; } table.edit input, table.edit select { width: 100%; padding: 3px 4px; font-size: 13px; }
table.edit input.num { text-align: right; }
.scroll { overflow-x: auto; }
.projbar { display: flex; align-items: baseline; gap: 16px; }
.tabs { display: flex; gap: 4px; margin-bottom: 0; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); border-bottom: none; background: #e9ebee; padding: 9px 16px; cursor: pointer;
               border-radius: 7px 7px 0 0; font-size: 14px; }
.tabs button.active { background: #fff; font-weight: 600; border-top: 3px solid var(--orange); }
.tab { border-top-left-radius: 0; }
.errbox { background: #fdecea; border: 1px solid #f5b7b1; color: #922b21; padding: 10px 14px; border-radius: 6px; margin: 8px 0; }
.warnbox { background: #fef5e7; border: 1px solid #f8c471; padding: 10px 14px; border-radius: 6px; margin: 8px 0; }
.okbox { background: #eafaf1; border: 1px solid #a9dfbf; padding: 12px 16px; border-radius: 6px; margin: 8px 0; }
.err { color: var(--bad); }
.badge { padding: 2px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge.verified { background: #d5f5e3; color: #196f3d; } .badge.partial { background: #fdebd0; color: #9c640c; }
.badge.unverified { background: #fadbd8; color: #922b21; }
.ok { color: var(--ok); font-weight: 600; } .bad { color: var(--bad); font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 20px; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
svg.plan { width: 100%; height: auto; background: #fbfbfc; border: 1px solid var(--line); border-radius: 6px; }
.modal { position: fixed; inset: 0; background: rgba(20, 22, 25, .5); display: flex; align-items: flex-start; justify-content: center;
         padding-top: 40px; z-index: 10; }
.modal-body { background: #fff; border-radius: 10px; padding: 20px; width: min(1100px, 95vw); max-height: 85vh; overflow: auto; }
.rank tr.best td { background: #fff8e8; }
.rank tr.infeasible td { color: #9a9fa5; }
.bar { height: 8px; background: #eceef0; border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--orange); }
.downloads a { margin: 0 8px 8px 0; }
ol.steps li { margin-bottom: 6px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #ccc; border-top-color: var(--orange);
           border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
code { background: #f1f2f4; padding: 1px 4px; border-radius: 3px; font-size: 12px; }
header.top .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #d9dcdf; }
header.top .who .btn { color: var(--text); }
#ver { cursor: pointer; }
.small { font-size: 12px; }
[hidden] { display: none !important; }
