:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background: #f3f4f6;
    color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f3f4f6; }
a { color: inherit; }
.shell { width: min(760px, 100%); margin: 0 auto; padding: 20px 16px 64px; }
.hero { padding: 24px 4px 14px; }
.hero.compact { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.eyebrow { margin: 0 0 5px; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: #6b7280; font-weight: 800; }
h1 { margin: 0; font-size: clamp(2rem, 9vw, 3.5rem); letter-spacing: -.045em; }
h1.product-title { font-size: clamp(1.8rem, 7vw, 3rem); }
h2 { margin: 0 0 14px; font-size: 1.15rem; }
.subtitle { color: #6b7280; margin-bottom: 0; }
.card { position: relative; background: white; border: 1px solid #e5e7eb; border-radius: 20px; padding: 20px; margin-top: 14px; box-shadow: 0 6px 22px rgba(17,24,39,.04); }
.card.muted { background: #f9fafb; }
.step { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #111827; color: white; margin-bottom: 12px; }
label, .label { display: block; font-size: .85rem; font-weight: 750; color: #4b5563; margin: 12px 0 7px; }
input, textarea, select { width: 100%; border: 1px solid #d1d5db; border-radius: 13px; padding: 14px; font: inherit; background: white; outline: none; }
input:focus, textarea:focus, select:focus { border-color: #111827; box-shadow: 0 0 0 3px rgba(17,24,39,.08); }
textarea { resize: vertical; min-height: 230px; }
.hint { color: #6b7280; font-size: .84rem; min-height: 1.2em; }
.hint.ok { color: #047857; }
.hint.error { color: #b91c1c; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.button, button { border: 0; border-radius: 13px; padding: 13px 16px; font: inherit; font-weight: 800; text-decoration: none; text-align: center; cursor: pointer; }
.primary, .button:not(.secondary) { background: #111827; color: #fff; }
.secondary { background: #e5e7eb; color: #111827; }
.full { width: 100%; margin-top: 14px; }
.disabled { opacity: .4; pointer-events: none; }
.notice { border-radius: 13px; padding: 13px 14px; background: #eef2ff; color: #3730a3; margin-top: 12px; }
.notice.warning { background: #fffbeb; color: #92400e; }
.checklist { padding-left: 20px; margin-bottom: 0; }
.checklist li { margin: 7px 0; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.summary-grid .label { margin: 0 0 4px; }
.key { overflow-wrap: anywhere; font-size: .82rem; }
.items { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid #eee; }
.item:last-child { border-bottom: 0; }
.item strong, .item small { display: block; }
.item small { color: #6b7280; margin-top: 4px; }
.item-values { text-align: right; }

.quick-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.quick-link { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 15px; text-decoration: none; font-weight: 800; }
.quick-link small { display: block; font-weight: 500; color: #6b7280; margin-top: 4px; }

.product-list { display: grid; gap: 10px; margin-top: 14px; }
.product-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; background: white; border: 1px solid #e5e7eb; border-radius: 18px; padding: 16px; text-decoration: none; }
.product-card small { display: block; color: #6b7280; margin-top: 4px; }
.product-price { font-size: 1.15rem; font-weight: 900; white-space: nowrap; }

.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.metric-card { background: white; border: 1px solid #e5e7eb; border-radius: 18px; padding: 16px; }
.metric-card span, .metric-card small { display: block; color: #6b7280; }
.metric-card span { font-size: .8rem; font-weight: 750; }
.metric-card strong { display: block; font-size: 1.45rem; margin: 5px 0 3px; }
.metric-card small { font-size: .78rem; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.section-heading h2 { margin-bottom: 0; }
.chart-wrap { position: relative; height: 300px; margin-top: 14px; }

.analysis-list { display: grid; gap: 0; }
.analysis-list > div, .history-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px 0; border-bottom: 1px solid #eee; }
.analysis-list > div:last-child, .history-row:last-child { border-bottom: 0; }
.analysis-list span { color: #6b7280; }
.up { color: #b91c1c; }
.down { color: #047857; }

.history-table { display: grid; }
.history-row small { display: block; color: #6b7280; margin-top: 3px; }
.empty-state { text-align: center; padding: 36px 20px; }

@media (max-width: 520px) {
    .hero.compact { display: block; }
    .hero.compact .button { display: inline-block; margin-top: 12px; }
    .summary-grid, .metric-grid { grid-template-columns: 1fr 1fr; }
    .actions, .quick-nav { grid-template-columns: 1fr; }
    .chart-wrap { height: 260px; }
}

.notice.success { background: #ecfdf5; color: #047857; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(440px, 100%); background: white; border: 1px solid #e5e7eb; border-radius: 22px; padding: 24px; box-shadow: 0 18px 50px rgba(17,24,39,.08); }
.auth-card h1 { font-size: 2.2rem; }
.user-line { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: #6b7280; font-size: .9rem; }
.user-line a { font-weight: 800; }
.quick-nav.three { grid-template-columns: repeat(3, 1fr); }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-section { margin-top: 28px; }

@media (max-width: 620px) {
    .quick-nav.three { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .header-actions { margin-top: 12px; }
}
