:root {
  --bg: #0f172a; --panel: #111827; --panel-2: #1f2937; --text: #e5e7eb; --muted: #9ca3af;
  --accent: #8b5cf6; --accent-2: #f59e0b; --good: #16a34a; --warn: #d97706; --bad: #dc2626;
  --border: rgba(255,255,255,0.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: linear-gradient(180deg, #0b1021, #111827); color: #e5e7eb; }
.app-shell { max-width: 1320px; margin: 0 auto; padding: 24px; }
.topbar, .section-head { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.topbar { margin-bottom: 20px; }
.eyebrow { color: var(--accent-2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: #f1f5f9; }
.tabs { display: flex; gap: 12px; margin: 12px 0 20px; flex-wrap: wrap; }
.tab, button, select { border-radius: 14px; border: 1px solid var(--border); background: #182234; color: var(--text); }
.tab, button { padding: 10px 16px; cursor: pointer; }
.tab.active { background: var(--accent); }
button:hover, .tab:hover { filter: brightness(1.1); }
button.secondary { background: #1e293b; }
button.danger { background: #3b1f2c; }
.card { background: rgba(17,24,39,.92); border: 1px solid var(--border); border-radius: 20px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.25); color: #e5e7eb; }
.grid { display: grid; gap: 20px; }
.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.house-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.house-box { background: var(--panel-2); border: 1px solid var(--border); border-radius: 16px; padding: 12px; min-height: 150px; }
.house-box label, .chart-card label, .section-head label { display: block; font-size: 13px; color: var(--muted); }
.house-box textarea { width: 100%; min-height: 78px; margin-top: 8px; background: #0b1220; color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 10px; resize: vertical; font-family: inherit; }
.house-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }
select, input, textarea { color: #e5e7eb; }
select { padding: 10px 12px; min-width: 180px; }
.validation-box, .empty-state { min-height: 64px; border: 1px dashed var(--border); border-radius: 14px; padding: 14px; background: rgba(255,255,255,.02); }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 6px 10px; border-radius: 999px; background: rgba(139,92,246,.15); color: #c4b5fd; font-size: 12px; }
.domain-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 16px; }
.domain-card, .verdict-card, .history-item { background: #182234; border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.domain-group-tag { display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(139,92,246,.15); color: #c4b5fd; }
.status-badge { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.status-strong, .status-supportive { background: rgba(22,163,74,.18); color: #86efac; }
.status-moderate, .status-mixed, .status-watch { background: rgba(217,119,6,.18); color: #fdba74; }
.status-high, .status-sensitive { background: rgba(220,38,38,.18); color: #fca5a5; }
.status-delayed { background: rgba(59,130,246,.18); color: #93c5fd; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.accordion-item { border: 1px solid var(--border); border-radius: 14px; background: #182234; padding: 0 14px; margin-bottom: 12px; }
.accordion-item summary { cursor: pointer; padding: 14px 0; font-weight: 700; }
.accordion-content { padding: 0 0 14px; color: #d1d5db; }
.accordion-content ul { margin: 0; padding-left: 20px; }
pre { white-space: pre-wrap; font-family: inherit; margin: 0; }
.form-row { display: flex; gap: 20px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row label { display: flex; flex-direction: column; gap: 8px; }
.form-row input[type="text"] { padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: #0b1220; color: var(--text); min-width: 260px; }
.verdict-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.verdict-card h3 { font-size: 13px; margin-bottom: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.verdict-value { font-size: 18px; font-weight: 700; color: #f8fafc; margin-bottom: 6px; }
.comparison-table-wrap, .history-list { display: grid; gap: 14px; }
.comparison-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.comparison-table th, .comparison-table td { border: 1px solid var(--border); padding: 12px 14px; text-align: left; vertical-align: top; }
.comparison-table th { background: #182234; color: #f8fafc; }
.comparison-table td { background: rgba(255,255,255,.02); }
.history-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.history-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-list, .bullet-list { margin: 10px 0 0; padding-left: 18px; }
.inline-list li, .bullet-list li { margin-bottom: 8px; }
.good { color: #86efac; } .warn { color: #fdba74; } .bad { color: #fca5a5; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .house-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .app-shell { padding: 14px; } .house-grid { grid-template-columns: 1fr; } }