:root {
  --paper: #f3f0e8;
  --surface: #fcfbf7;
  --ink: #24352d;
  --muted: #626960;
  --line: #dadbd0;
  --green: #204e3d;
  --green-soft: #e9efe7;
  --amber: #805018;
  --amber-soft: #f6eddc;
  --red: #9a382d;
  --red-soft: #f9ede6;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button, summary, input[type='checkbox'], label:has(input[type='checkbox']) { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled, input:disabled, label:has(input:disabled) { cursor: not-allowed; }
a { color: var(--green); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #527d62; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -70px; padding: 12px 18px; background: var(--surface); border: 2px solid var(--green); border-radius: 6px; z-index: 10; }
.skip-link:focus { top: 12px; }
.masthead { max-width: 1552px; margin: 0 auto; padding: 24px 32px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; font-size: 16px; letter-spacing: -.3px; }
.brand-index { display: grid; place-items: center; width: 36px; height: 36px; background: var(--green); color: #fffdf5; border-radius: 7px 7px 14px 7px; font-size: 12px; letter-spacing: 1px; }
.brand-secondary { font-weight: 450; color: var(--muted); }
.local-badge { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #cbd5c5; border-radius: 30px; padding: 5px 10px; font-size: 11px; font-weight: 650; color: var(--green); white-space: nowrap; }
.local-badge span { font-size: 7px; }
main { max-width: 1552px; padding: 32px 32px 20px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 750; color: var(--muted); margin-bottom: 7px; }
h1 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.15; letter-spacing: -1.3px; font-weight: 650; }
.intro { color: var(--muted); margin-top: 9px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.button { min-height: 44px; padding: 10px 15px; border-radius: 7px; border: 1px solid transparent; font-weight: 650; line-height: 1.35; }
.button-secondary { background: var(--surface); color: var(--ink); border-color: #c7ccbf; }
.button-secondary:hover { background: #e9eee4; border-color: #8b9b88; }
.button-quiet { color: var(--muted); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.button-quiet:hover { color: var(--ink); background: #e8e6de; }
.button-primary { background: var(--green); color: #fffdf6; display: flex; align-items: center; justify-content: space-between; width: 100%; }
.button-primary:hover { background: #173d2e; }
.button-primary span { font-size: 20px; line-height: 1; }
.context-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); margin-bottom: 16px; font-size: 11px; font-variant-numeric: tabular-nums; }
.source-badge { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.source-badge::before { content: ''; width: 6px; height: 6px; border: 1px solid var(--muted); transform: rotate(45deg); }
.source-badge > span { color: #9b9f93; }
.example-notice, .noscript { padding: 12px 16px; margin-bottom: 16px; border: 1px solid #b9cbb3; background: var(--green-soft); border-radius: 7px; color: var(--green); font-size: 12px; }
.workspace { display: grid; grid-template-columns: 244px minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.panel-heading { display: flex; align-items: center; gap: 9px; min-height: 24px; margin-bottom: 10px; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -.35px; }
.section-number { font-size: 10px; font-weight: 650; color: var(--muted); border-bottom: 1px solid #b3bcab; padding-bottom: 2px; font-variant-numeric: tabular-nums; }
.small-label { font-size: 10px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.panel-description { color: var(--muted); font-size: 12px; line-height: 1.6; }
.input-group { min-width: 0; padding: 0; margin: 22px 0 0; border: 0; }
.input-group legend { padding: 0; margin-bottom: 13px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 1.1px; }
.field + .field { margin-top: 13px; }
.field > label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 5px; }
.field input { display: block; width: 100%; min-height: 43px; border: 1px solid #bfc6b8; border-radius: 6px; background: #fffefa; color: var(--ink); padding: 9px 11px; font-variant-numeric: tabular-nums; }
.field input::placeholder { color: #73796e; font-size: 12px; }
.field input:hover { border-color: #8d9c86; }
.field input[aria-invalid='true'] { border-color: var(--red); background: #fff8f4; }
.field-error { color: var(--red); font-size: 11px; margin-top: 5px; line-height: 1.45; }
.budget-inputs { border-top: 1px solid var(--line); padding-top: 16px; }
.budget-inputs legend { float: left; width: 100%; }
.budget-inputs .field { clear: both; }
.aside-note { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 14px 0 16px; color: var(--muted); font-size: 10px; }
.legend > span { display: flex; align-items: center; gap: 5px; }
.legend-dot { height: 6px; width: 6px; display: inline-block; border-radius: 50%; background: #8c9386; }
.legend-dot.met { background: var(--green); }
.legend-dot.missing { background: var(--amber); }
.legend-dot.unknown { background: transparent; border: 1px solid #777f70; }
.trait-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trait-card { border: 1px solid var(--line); border-radius: 8px; background: #fffefa; padding: 14px; display: flex; flex-direction: column; min-width: 0; }
.trait-card.is-selected { background: #f1f5eb; border-color: #72936a; box-shadow: inset 3px 0 0 var(--green); }
.trait-card.is-owned { border-color: #a6b49c; }
.trait-card.is-disputed { background: #f5f1e9; border-style: dashed; }
.trait-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.trait-number { color: var(--muted); font-size: 9px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.eligibility { font-size: 10px; font-weight: 650; color: var(--muted); text-align: right; }
.eligibility[data-state='met'], .eligibility[data-state='owned'] { color: var(--green); }
.eligibility[data-state='missing'], .eligibility[data-state='disputed'] { color: var(--amber); }
.eligibility[data-state='invalid'] { color: var(--red); }
.trait-card h3 { font-size: 15px; line-height: 1.3; letter-spacing: -.25px; margin-bottom: 7px; }
.trait-cost { font-size: 11px; font-weight: 650; color: var(--green); margin-bottom: 13px; }
.is-disputed .trait-cost { color: var(--amber); }
.requirements { list-style: none; padding: 0; font-size: 11px; margin-bottom: 14px; }
.requirement { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #e6e7df; }
.requirement-label { color: #525c4e; }
.requirement-state { font-size: 10px; font-weight: 650; white-space: nowrap; }
.requirement[data-state='met'] .requirement-state { color: var(--green); }
.requirement[data-state='missing'] .requirement-state { color: var(--amber); }
.requirement[data-state='unknown'] .requirement-state { color: var(--muted); }
.requirement[data-state='invalid'] .requirement-state { color: var(--red); }
.owned-explanation { color: var(--green); line-height: 1.6; padding-top: 5px; }
.dispute-note { font-size: 11px; color: #76502b; line-height: 1.6; margin-bottom: 10px; }
.trait-controls { display: flex; align-items: center; gap: 6px; margin-top: auto; border-top: 1px solid #e2e5da; padding-top: 5px; }
.check-control { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 5px 7px; font-size: 11px; font-weight: 600; border-radius: 5px; flex: 1; }
.check-control:hover { background: #e8ecdf; }
.check-control:has(input:disabled) { color: #757367; }
.check-control:has(input:disabled):hover { background: transparent; }
input[type='checkbox'] { accent-color: var(--green); width: 16px; height: 16px; margin: 0; flex: 0 0 16px; }
.catalog-note { margin-top: 16px; font-size: 11px; color: var(--muted); }
.plan-panel { position: sticky; top: 18px; }
.count-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; background: #e9ecdf; min-width: 24px; text-align: center; }
.budget-counter { padding: 16px 0; border-bottom: 1px solid var(--line); }
.counter-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700; }
.counter-label > span { font-size: 9px; font-weight: 450; color: var(--muted); }
.counter-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 11px; font-size: 35px; font-weight: 600; letter-spacing: -1.5px; line-height: 1.35; margin: 4px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.counter-divider { font-size: 22px; font-weight: 350; color: #afb6a6; }
.available-value { color: #747f6b; font-size: 26px; font-weight: 450; }
.balance { font-size: 11px; color: var(--muted); }
.balance[data-state='over'], .balance[data-state='invalid'] { color: var(--red); font-weight: 700; }
.balance[data-state='met'] { color: var(--green); }
.plan-status { display: flex; gap: 10px; align-items: flex-start; padding: 13px; background: #eeeee6; border-radius: 7px; margin-top: 20px; }
.status-marker { flex: 0 0 7px; width: 7px; height: 7px; margin-top: 6px; background: #7c8573; border-radius: 50%; }
.plan-status h3 { font-size: 13px; font-weight: 750; margin-bottom: 3px; }
.plan-status p { font-size: 11px; color: #5d6557; line-height: 1.6; }
.plan-status[data-status='ready'] { background: var(--green-soft); }
.plan-status[data-status='ready'] .status-marker { background: var(--green); }
.plan-status[data-status='blocked'], .plan-status[data-status='over-budget'] { background: var(--red-soft); }
.plan-status[data-status='blocked'] .status-marker, .plan-status[data-status='over-budget'] .status-marker { background: var(--red); }
.plan-status[data-status='incomplete'] { background: var(--amber-soft); }
.plan-status[data-status='incomplete'] .status-marker { background: var(--amber); }
.plan-reasons { padding: 0 0 0 16px; margin-top: 12px; color: #704930; font-size: 11px; line-height: 1.6; }
.plan-reasons li + li { margin-top: 7px; }
.plan-list-heading { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; margin-top: 24px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.plan-list-heading h3 { font-size: 11px; font-weight: 700; }
.plan-list-heading > span { font-size: 10px; color: var(--muted); }
.plan-empty { text-align: center; padding: 24px 0; }
.empty-symbol { width: 35px; height: 35px; display: grid; place-items: center; border: 1px dashed #a4ad99; margin: 0 auto 10px; color: #7c8b70; border-radius: 7px; font-size: 22px; font-weight: 300; }
.plan-empty p { font-size: 12px; font-weight: 600; }
.plan-empty > span:last-child { color: var(--muted); font-size: 11px; }
.selected-traits { list-style: none; padding: 0; }
.selected-row { padding: 12px 0; border-bottom: 1px solid #e5e6dc; }
.selected-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.selected-name { font-size: 12px; font-weight: 650; }
.selected-cost { font-size: 10px; color: var(--muted); text-align: right; }
.selected-check { font-size: 10px; color: var(--muted); margin-top: 3px; }
.selected-check[data-state='met'], .selected-check[data-state='owned'] { color: var(--green); }
.selected-check[data-state='missing'], .selected-check[data-state='disputed'], .selected-check[data-state='invalid'] { color: var(--red); }
.export-area { margin-top: 20px; }
.export-caption { font-size: 10px; text-align: center; color: var(--muted); margin-top: 7px; }
.download-message { font-size: 11px; line-height: 1.6; margin-top: 12px; padding: 10px; background: var(--green-soft); border-radius: 5px; }
.download-message[data-kind='error'] { color: var(--red); background: var(--red-soft); border: 1px solid #dcbab0; }
.export-fallback { margin-top: 12px; font-size: 11px; }
.export-fallback summary { padding: 7px 0; }
.export-fallback textarea { width: 100%; min-height: 180px; resize: vertical; padding: 8px; border: 1px solid #bfc6b8; border-radius: 5px; font-family: ui-monospace, monospace; font-size: 10px; }
.verification-note { margin-top: 15px; font-size: 10px; color: var(--muted); line-height: 1.65; }
.notes { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 16px; color: var(--muted); font-size: 11px; }
.notes > details { max-width: 950px; }
.notes summary { min-height: 32px; color: #4c5d47; }
.notes-content { padding: 8px 0 16px; line-height: 1.8; }
.notes-content ul { padding-left: 18px; margin: 10px 0; }
.notes-content li + li { margin-top: 6px; }
.footer-note { white-space: nowrap; font-size: 9px; letter-spacing: 1px; padding-top: 3px; }
@media (max-width: 1199px) and (min-width: 761px) {
  .workspace { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
  .plan-panel { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .plan-panel > .panel-heading, .plan-panel > .plan-status, .plan-panel > .plan-reasons, .plan-panel > .plan-list-heading, .plan-panel > .selected-traits, .plan-panel > .plan-empty, .plan-panel > .export-area, .plan-panel > .verification-note { grid-column: 1 / -1; }
  .trait-grid { gap: 10px; }
  .trait-card { padding: 12px; }
  .page-heading { align-items: flex-start; }
  .toolbar { justify-content: flex-end; }
}
@media (max-width: 760px) {
  .masthead { padding: 17px 18px; }
  .brand { font-size: 14px; gap: 9px; }
  .brand-index { width: 30px; height: 32px; font-size: 10px; }
  .local-badge { font-size: 9px; padding: 4px 8px; }
  main { padding: 24px 18px 18px; }
  .page-heading { display: block; margin-bottom: 17px; }
  h1 { letter-spacing: -.8px; }
  .intro { font-size: 12px; }
  .toolbar { margin-top: 17px; gap: 6px; }
  .button { font-size: 12px; }
  .context-line { align-items: flex-start; font-size: 10px; }
  .context-line > #selection-count { text-align: right; flex-shrink: 0; }
  .source-badge { gap: 5px; max-width: 220px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .panel { padding: 18px; }
  .plan-panel { position: static; }
  .stats-panel .input-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stats-panel .field + .field { margin-top: 0; }
  .stats-panel .input-group legend { margin-bottom: 12px; }
  .stats-panel .budget-inputs legend { float: none; }
  .trait-grid { gap: 10px; }
  .trait-card { padding: 12px; }
  .trait-card h3 { font-size: 14px; }
  .trait-topline { flex-wrap: wrap; gap: 3px; }
  .eligibility { font-size: 9px; }
  .requirement { flex-wrap: wrap; gap: 3px; }
  .trait-controls { flex-wrap: wrap; gap: 0; }
  .check-control { padding: 5px 3px; min-width: 65px; }
  .notes { gap: 12px; }
  .footer-note { display: none; }
}
@media (max-width: 400px) {
  .brand-secondary { display: none; }
  .trait-grid { grid-template-columns: minmax(0, 1fr); }
  .requirement { flex-wrap: nowrap; }
  .trait-controls { gap: 12px; }
  .source-badge { max-width: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

#manual-conditions{display:block;width:100%;font:inherit;border:1px solid var(--border,#aaa);border-radius:6px;padding:10px;background:#fff;color:inherit;resize:vertical} #manual-title{margin-top:0} main>section.panel{margin-top:18px} #manual-label,#manual-points,#manual-marks{display:block;width:100%;min-height:42px;margin:6px 0 12px;padding:8px;border:1px solid #aaa;border-radius:6px}

.privacy-link { margin: 0; font-size: 12px; white-space: nowrap; }
.privacy-page { display: block; max-width: 760px; margin: 48px auto; padding: 0 24px; line-height: 1.8; }
.privacy-page p { margin: 20px 0; }
@media (max-width: 760px) { .notes { flex-wrap: wrap; } .privacy-link { display: block; width: 100%; } }
