:root {
  --paper: #FBFAF7;
  --ink: #1C2430;
  --rule: #D8D5CC;
  --accent: #2E5E4E;
  --status-pass: #2F6B4F;
  --status-warn: #A66A00;
  --status-fail: #9B2C2C;
  --class-us-equity: #233A5E;
  --class-international-equity: #4F6F8F;
  --class-core-bonds: #6F7F63;
  --class-tax-aware-bonds: #8A8F72;
  --class-cash: #B8B5A6;
  --class-real-assets: #8B6F47;
  --class-liquid-alternatives: #5F4B66;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, 'Segoe UI', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; letter-spacing: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.workspace { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 100vh; }
.target-rail { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 28px; border-right: 1px solid var(--rule); background: var(--paper); }
.masthead h1 { margin: 0; font-size: 28px; }
.masthead p { margin: 6px 0 22px; color: rgba(28,36,48,.7); }
.summary-toggle { display: none; width: 100%; border: 1px solid var(--rule); border-radius: 4px; background: transparent; padding: 10px; text-align: left; }
.target-form { display: grid; gap: 14px; }
label, fieldset { display: grid; gap: 6px; font-size: 13px; }
fieldset { border: 1px solid var(--rule); border-radius: 4px; padding: 12px; }
fieldset label { display: block; }
input, select, textarea { width: 100%; border: 1px solid var(--rule); border-radius: 4px; background: transparent; padding: 9px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.primary { border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: white; padding: 11px 12px; cursor: pointer; }
.error { min-height: 20px; color: var(--status-fail); }
.recommendation-pane { padding: 38px 48px; transition: opacity .16s ease; }
.recommendation-pane.refreshing { opacity: .55; }
.empty-state { max-width: 620px; padding-top: 12vh; border-top: 1px solid var(--rule); }
.section { padding: 20px 0; border-top: 1px solid var(--rule); }
.headline { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.headline h2 { margin: 0; font-size: 32px; }
.footer-line { font-size: 12px; color: rgba(28,36,48,.68); }
.allocation-bar { display: flex; width: 100%; height: 30px; border: 1px solid var(--ink); margin: 22px 0 12px; }
.allocation-segment { min-width: 1px; outline: 1px solid rgba(28,36,48,.35); outline-offset: -1px; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 7px 18px; font-size: 12px; }
.legend-item.excluded { opacity: .58; }
.legend-item.excluded .swatch { background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(28,36,48,.45) 2px, rgba(28,36,48,.45) 4px); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border: 1px solid var(--ink); vertical-align: -1px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { border: 1px solid currentColor; border-radius: 4px; padding: 5px 8px; font-size: 12px; }
.pass { color: var(--status-pass); }
.warn { color: var(--status-warn); }
.fail { color: var(--status-fail); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 6px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.num { text-align: right; font-family: ui-monospace, 'SF Mono', Consolas, monospace; }
.severity-square { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; }
.severity-square.positive { background: var(--status-pass); }
.severity-square.neutral { background: var(--rule); }
.severity-square.moderate { background: var(--status-warn); }
.severity-square.severe { background: var(--status-fail); }
.alt-row { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
details { border-top: 1px solid var(--rule); padding-top: 14px; }
@media (max-width: 860px) {
  .workspace { display: block; }
  .target-rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule); }
  .summary-toggle { display: block; margin-bottom: 14px; }
  .target-rail.collapsed .target-form { display: none; }
  .recommendation-pane { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .recommendation-pane { transition: none; }
}
