*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
--bg: #faf9f7;
--surface: #ffffff;
--text: #1a1a2e;
--text-secondary: #5a5a72;
--accent: #f97316;
--accent-soft: #fff7ed;
--border: #e5e0d8;
--shadow: 0 1px 3px rgba(26, 26, 46, 0.06);
--shadow-lg: 0 4px 16px rgba(26, 26, 46, 0.08);
--radius: 10px;
--radius-sm: 6px;
--font: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
--danger: #dc2626;
--safe: #16a34a;
--warn: #f59e0b;
}

body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}

.site-header {
background: var(--surface);
border-bottom: 1px solid var(--border);
padding: 12px 24px;
position: sticky;
top: 0;
z-index: 10;
box-shadow: var(--shadow);
}

.header-inner {
max-width: 1100px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
}

.logo {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: var(--text);
font-weight: 700;
font-size: 1.2rem;
}

.logo-text { color: var(--text); }

.nav-list {
list-style: none;
display: flex;
gap: 24px;
}

.nav-list a {
text-decoration: none;
color: var(--text-secondary);
font-size: 0.9rem;
font-weight: 500;
transition: color 0.2s;
}

.nav-list a:hover { color: var(--accent); }

main {
max-width: 1100px;
margin: 0 auto;
padding: 32px 24px 64px;
}

.hero {
text-align: center;
padding: 40px 0 20px;
}

.hero h1 {
font-size: clamp(2rem, 5vw, 2.8rem);
font-weight: 800;
color: var(--text);
margin-bottom: 12px;
letter-spacing: -0.02em;
}

.hero-sub {
font-size: 1.15rem;
color: var(--text-secondary);
max-width: 600px;
margin: 0 auto;
}

.section-title {
font-size: 1.4rem;
font-weight: 700;
margin-bottom: 8px;
color: var(--text);
}

.section-desc {
color: var(--text-secondary);
margin-bottom: 16px;
font-size: 0.95rem;
}

.presets-section {
margin-bottom: 32px;
}

.preset-buttons {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.preset-btn {
padding: 10px 18px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface);
color: var(--text);
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
box-shadow: var(--shadow);
}

.preset-btn:hover {
border-color: var(--accent);
background: var(--accent-soft);
}

.preset-btn.active {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}

.dashboard {
margin-bottom: 40px;
}

.scenario-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
margin-bottom: 24px;
}

.scenario-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 24px;
box-shadow: var(--shadow-lg);
}

.scenario-card h3 {
font-size: 1.1rem;
font-weight: 700;
margin-bottom: 20px;
color: var(--text);
}

.field {
margin-bottom: 18px;
}

.field label {
display: block;
font-size: 0.85rem;
font-weight: 600;
color: var(--text-secondary);
margin-bottom: 4px;
}

.field input[type="number"] {
width: 100%;
padding: 10px 12px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-size: 0.95rem;
font-family: var(--font);
background: var(--bg);
transition: border-color 0.2s;
}

.field input[type="number"]:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.field input[type="range"] {
width: 100%;
margin-bottom: 4px;
accent-color: var(--accent);
}

.inline-number {
width: 80px !important;
display: inline-block;
margin-left: 8px;
}

.risk-gauge {
margin-top: 20px;
padding-top: 16px;
border-top: 1px solid var(--border);
}

.gauge-label {
font-size: 0.8rem;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.04em;
}

.gauge-value {
font-size: 2rem;
font-weight: 800;
display: block;
margin: 4px 0 8px;
}

.gauge-bar {
height: 10px;
background: #e5e0d8;
border-radius: 5px;
overflow: hidden;
}

.gauge-fill {
height: 100%;
border-radius: 5px;
transition: width 0.3s ease, background 0.3s ease;
}

.gauge-fill.low { background: var(--safe); }
.gauge-fill.medium { background: var(--warn); }
.gauge-fill.high { background: var(--danger); }

.comparison-table-wrapper {
overflow-x: auto;
margin-bottom: 20px;
}

.comparison-table {
width: 100%;
border-collapse: collapse;
background: var(--surface);
border-radius: var(--radius);
overflow: hidden;
box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
padding: 14px 16px;
text-align: left;
border-bottom: 1px solid var(--border);
font-size: 0.9rem;
}

.comparison-table th {
background: #f5f3f0;
font-weight: 700;
color: var(--text-secondary);
text-transform: uppercase;
font-size: 0.78rem;
letter-spacing: 0.03em;
}

.comparison-table td.positive { color: var(--safe); font-weight: 600; }
.comparison-table td.negative { color: var(--danger); font-weight: 600; }

.action-bar {
display: flex;
flex-wrap: wrap;
gap: 12px;
}

.primary-btn,
.secondary-btn {
padding: 10px 20px;
border-radius: var(--radius-sm);
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
border: 1px solid transparent;
transition: all 0.2s;
font-family: var(--font);
}

.primary-btn {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}

.primary-btn:hover {
background: #ea580c;
border-color: #ea580c;
}

.secondary-btn {
background: var(--surface);
color: var(--text);
border-color: var(--border);
}

.secondary-btn:hover {
background: #f5f3f0;
border-color: #c4bdb3;
}

.saved-scenarios {
margin-bottom: 40px;
}

.saved-list {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
min-height: 80px;
box-shadow: var(--shadow);
}

.empty-state {
color: var(--text-secondary);
font-style: italic;
text-align: center;
padding: 20px;
}

.saved-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 0;
border-bottom: 1px solid var(--border);
}

.saved-item:last-child { border-bottom: none; }

.saved-item .saved-name {
font-weight: 600;
font-size: 0.9rem;
}

.saved-item .saved-meta {
font-size: 0.8rem;
color: var(--text-secondary);
}

.saved-item button {
background: none;
border: 1px solid var(--border);
padding: 6px 12px;
border-radius: var(--radius-sm);
cursor: pointer;
font-size: 0.8rem;
font-weight: 500;
transition: all 0.2s;
}

.saved-item button:hover {
background: #fee2e2;
border-color: var(--danger);
color: var(--danger);
}

.support-content {
margin-bottom: 40px;
}

.support-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
margin-top: 16px;
}

.support-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
box-shadow: var(--shadow);
}

.support-card h3 {
font-size: 1.05rem;
font-weight: 700;
margin-bottom: 10px;
}

.support-card p,
.support-card li {
font-size: 0.9rem;
color: var(--text-secondary);
line-height: 1.55;
}

.support-card ul {
padding-left: 18px;
margin-top: 8px;
}

.support-card li { margin-bottom: 6px; }

.site-footer {
background: var(--surface);
border-top: 1px solid var(--border);
padding: 24px;
text-align: center;
font-size: 0.85rem;
color: var(--text-secondary);
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-inner a {
color: var(--accent);
text-decoration: none;
font-weight: 500;
}

.footer-inner a:hover { text-decoration: underline; }

.footer-version {
margin-top: 6px;
font-size: 0.75rem;
color: #999;
}

@media (max-width: 700px) {
.scenario-grid {
grid-template-columns: 1fr;
}

.action-bar {
flex-direction: column;
}

.preset-buttons {
flex-direction: column;
}

.preset-btn {
width: 100%;
text-align: center;
}
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
