:root {
    --bg: #090f1f;
    --surface: rgba(16, 24, 42, 0.86);
    --surface-strong: rgba(19, 29, 50, 0.96);
    --surface-soft: rgba(97, 126, 174, 0.12);
    --border: rgba(146, 168, 210, 0.18);
    --text: #eef4ff;
    --muted: #9fb1cf;
    --accent: #58d5ff;
    --accent-strong: #38aee0;
    --accent-warm: #ff7b54;
    --accent-gold: #ffd166;
    --positive: #6ee7a8;
    --negative: #ff8a8a;
    --neutral: #b8c7e4;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.22);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --font-display: "Segoe UI Variable Display", "Pretendard", "Noto Sans KR", sans-serif;
    --font-body: "Segoe UI Variable Text", "Pretendard", "Noto Sans KR", sans-serif;
    --field-bg: rgba(255, 255, 255, 0.05);
    --field-bg-strong: rgba(12, 18, 32, 0.98);
    --field-border-focus: rgba(88, 213, 255, 0.5);
}

html {
    background-color: #080b12;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background-color: #080b12;
    background:
        radial-gradient(circle at 8% 6%, rgba(88, 213, 255, 0.18), transparent 28%),
        radial-gradient(circle at 86% 0%, rgba(255, 123, 84, 0.18), transparent 22%),
        radial-gradient(circle at 72% 64%, rgba(255, 209, 102, 0.12), transparent 22%),
        linear-gradient(145deg, #060b14, #0f1728 46%, #101b34 100%);
}

html[data-theme="aurora"],
body[data-theme="aurora"] {
    background-color: #080b12;
    color-scheme: dark;
}

body[data-theme="light"] {
    --bg: #eef3fb;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --surface-soft: rgba(40, 84, 162, 0.08);
    --border: rgba(92, 114, 153, 0.16);
    --text: #0d1b2f;
    --muted: #5a6782;
    --accent: #1e7cff;
    --accent-strong: #145ed0;
    --accent-warm: #ff7448;
    --accent-gold: #b87b00;
    --positive: #168f56;
    --negative: #d64b4b;
    --neutral: #42516d;
    --shadow: 0 28px 80px rgba(15, 32, 63, 0.12);
    --shadow-soft: 0 16px 42px rgba(15, 32, 63, 0.1);
    --field-bg: rgba(255, 255, 255, 0.96);
    --field-bg-strong: rgba(255, 255, 255, 0.98);
    --field-border-focus: rgba(30, 124, 255, 0.42);
    color: var(--text);
    background-color: #edf2fb;
    background:
        radial-gradient(circle at 8% 6%, rgba(30, 124, 255, 0.10), transparent 28%),
        radial-gradient(circle at 86% 0%, rgba(255, 116, 72, 0.10), transparent 22%),
        radial-gradient(circle at 72% 64%, rgba(255, 209, 102, 0.10), transparent 22%),
        linear-gradient(145deg, #f8fbff, #eef3fb 46%, #e7eef9 100%);
    color-scheme: light;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 18px 30px;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 12, 24, 0.7);
    backdrop-filter: blur(18px) saturate(1.3);
}

.brand {
    display: grid;
    gap: 6px;
}

.brand-logo {
    width: min(265px, 56vw);
    height: auto;
    display: block;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: -0.02em;
}

.topbar nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-language-form {
    margin: 0;
    min-width: 168px;
}

.topbar-language-form .custom-select-button {
    min-height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.topbar-language-form .custom-select-menu {
    min-width: 180px;
}

.nav-user {
    color: var(--accent-gold);
    font-size: 0.92rem;
    padding: 0 4px;
}

.topbar nav a,
.topbar nav button,
.settings-menu summary,
.preset-pill,
.custom-range-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.topbar nav a:hover,
.topbar nav button:hover,
.settings-menu summary:hover,
.preset-pill:hover,
.custom-range-form button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(88, 213, 255, 0.3);
}

.topbar nav a.is-active {
    background: linear-gradient(135deg, rgba(88, 213, 255, 0.16), rgba(255, 123, 84, 0.16));
    border-color: rgba(88, 213, 255, 0.34);
}

.container {
    width: min(1440px, calc(100vw - 40px));
    margin: 28px auto 56px;
    display: grid;
    gap: 20px;
}

.hero-card,
.filter-card,
.panel,
.metric-card,
.login-card {
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px) saturate(1.2);
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    padding: 30px;
    border-radius: var(--radius-lg);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-card h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: -0.06em;
}

.hero-copy {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.marketing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 24px;
}

.marketing-copy,
.marketing-panel-card,
.marketing-card {
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px) saturate(1.2);
}

.marketing-copy {
    display: grid;
    gap: 10px;
    padding: 36px 34px;
    border-radius: var(--radius-lg);
}

.marketing-copy h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    letter-spacing: -0.08em;
    line-height: 0.98;
}

.marketing-panel {
    display: grid;
}

.marketing-panel-card {
    display: grid;
    gap: 14px;
    align-content: center;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: linear-gradient(150deg, rgba(88, 213, 255, 0.14), rgba(255, 123, 84, 0.12));
}

.marketing-panel-card strong {
    font-size: 1.35rem;
    line-height: 1.3;
}

.marketing-panel-card p,
.marketing-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.marketing-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.marketing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.marketing-button:hover {
    transform: translateY(-1px);
}

.marketing-button.primary {
    background: linear-gradient(135deg, rgba(88, 213, 255, 0.18), rgba(255, 123, 84, 0.16));
    border-color: rgba(88, 213, 255, 0.36);
}

.marketing-button.subtle {
    background: rgba(255, 255, 255, 0.04);
}

.marketing-grid,
.marketing-feature-grid,
.marketing-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.marketing-card {
    display: grid;
    gap: 12px;
    padding: 24px;
    border-radius: 24px;
}

.marketing-card strong {
    font-size: 1.08rem;
}

.marketing-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 8px;
    line-height: 1.6;
}

.status-pill {
    display: grid;
    gap: 8px;
    align-content: center;
    padding: 20px 22px;
    border-radius: 24px;
    background: linear-gradient(150deg, rgba(88, 213, 255, 0.14), rgba(255, 123, 84, 0.12));
    border: 1px solid rgba(88, 213, 255, 0.18);
}

.status-pill strong {
    font-size: 1.2rem;
}

.status-label {
    color: var(--muted);
    font-size: 0.85rem;
}

.filter-card {
    display: grid;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 22px;
}

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

.preset-pill.is-active {
    background: linear-gradient(135deg, rgba(88, 213, 255, 0.16), rgba(255, 123, 84, 0.16));
    border-color: rgba(88, 213, 255, 0.34);
}

.custom-range-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
}

.live-toolbar {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--accent-gold);
    border: 1px solid rgba(255, 209, 102, 0.22);
    background: rgba(255, 209, 102, 0.08);
    font-size: 0.88rem;
}

.custom-range-form label,
.login-form label,
.stack-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.92rem;
}

.custom-range-form input,
.login-form input,
.stack-form input,
.stack-form select,
.inline-form input {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--field-bg);
    color: var(--text);
}

.stack-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px;
    background-color: var(--field-bg);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 2px),
        calc(100% - 14px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color-scheme: dark;
}

.custom-range-form input:focus,
.login-form input:focus,
.stack-form input:focus,
.stack-form select:focus,
.inline-form input:focus {
    outline: none;
    border-color: var(--field-border-focus);
    box-shadow: 0 0 0 4px rgba(88, 213, 255, 0.10);
}

body[data-theme="light"] .custom-range-form input:focus,
body[data-theme="light"] .login-form input:focus,
body[data-theme="light"] .stack-form input:focus,
body[data-theme="light"] .stack-form select:focus,
body[data-theme="light"] .inline-form input:focus {
    box-shadow: 0 0 0 4px rgba(30, 124, 255, 0.08);
}

.stack-form select option,
.stack-form select optgroup {
    background: var(--field-bg-strong);
    color: var(--text);
}

.stack-form select:focus,
.stack-form select:active,
.stack-form select:open {
    background-color: var(--field-bg-strong);
}

body[data-theme="aurora"] .stack-form select,
body[data-theme="aurora"] .stack-form select option,
body[data-theme="aurora"] .stack-form select optgroup {
    background-color: #0f1728 !important;
    color: #eef4ff !important;
    color-scheme: dark;
}

body[data-theme="light"] .stack-form select,
body[data-theme="light"] .stack-form select option,
body[data-theme="light"] .stack-form select optgroup {
    background-color: #ffffff !important;
    color: #0d1b2f !important;
    color-scheme: light;
}

.custom-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.custom-select {
    position: relative;
}

.custom-select-button {
    width: 100%;
    min-height: 44px;
    padding: 0 44px 0 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--field-bg);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    position: relative;
}

.custom-select-button::before,
.custom-select-button::after {
    content: "";
    position: absolute;
    right: 18px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    pointer-events: none;
    transition: transform 0.16s ease;
}

.custom-select-button::before {
    top: calc(50% - 7px);
    transform: rotate(45deg);
}

.custom-select-button::after {
    top: calc(50% - 1px);
    transform: rotate(45deg);
    opacity: 0;
}

.custom-select.is-open .custom-select-button {
    background: var(--field-bg-strong);
    border-color: var(--field-border-focus);
    box-shadow: 0 0 0 4px rgba(88, 213, 255, 0.10);
}

body[data-theme="light"] .custom-select.is-open .custom-select-button {
    box-shadow: 0 0 0 4px rgba(30, 124, 255, 0.08);
}

.custom-select.is-open .custom-select-button::before {
    transform: rotate(225deg);
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 80;
    display: none;
    gap: 6px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--field-bg-strong);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px) saturate(1.2);
    max-height: 280px;
    overflow-y: auto;
}

.custom-select.is-open .custom-select-menu {
    display: grid;
}

.custom-select.open-upward .custom-select-menu {
    top: auto;
    bottom: calc(100% + 8px);
}

.custom-select-option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}

.custom-select-option.is-selected {
    background: linear-gradient(135deg, rgba(88, 213, 255, 0.16), rgba(255, 123, 84, 0.16));
    color: var(--text);
}

.card-grid {
    display: grid;
    gap: 20px;
}

.summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.signal-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diagnostic-stack {
    display: grid;
    gap: 20px;
}

.diagnostic-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border-radius: 22px;
}

.metric-label,
.metric-meta {
    color: var(--muted);
}

.metric-value {
    font-size: 1.7rem;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.tone-positive .metric-value,
.tone-positive {
    color: var(--positive);
}

.tone-negative .metric-value,
.tone-negative {
    color: var(--negative);
}

.tone-neutral .metric-value {
    color: var(--text);
}

.report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lower-grid,
.side-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
    padding: 22px;
    border-radius: 24px;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: -0.03em;
}

.panel-heading span {
    color: var(--muted);
    font-size: 0.85rem;
}

.hint-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hint-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.hint-card strong {
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.hint-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.line-panel {
    grid-column: span 2;
}

.line-chart {
    width: 100%;
    height: 240px;
    display: block;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
        rgba(255,255,255,0.02);
}

.line-chart path {
    fill: none;
    stroke: url(#missing-gradient);
    stroke: var(--accent);
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 14px rgba(88, 213, 255, 0.28));
}

.line-chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.85rem;
}

.bar-list {
    display: grid;
    gap: 14px;
}

.bar-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 132px;
    gap: 12px;
    align-items: center;
}

.bar-list.compact .bar-row {
    grid-template-columns: 56px minmax(0, 1fr) 96px;
}

.bar-label,
.bar-value {
    font-size: 0.92rem;
}

.bar-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
}

.bar-fill.tone-positive {
    background: linear-gradient(90deg, rgba(110, 231, 168, 0.55), rgba(110, 231, 168, 1));
}

.bar-fill.tone-negative {
    background: linear-gradient(90deg, rgba(255, 138, 138, 0.55), rgba(255, 138, 138, 1));
}

.bar-fill.tone-neutral {
    background: linear-gradient(90deg, rgba(88, 213, 255, 0.35), rgba(88, 213, 255, 0.9));
}

.reason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.heatmap-panel {
    grid-column: span 2;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.heatmap-cell {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.heatmap-cell.tone-positive {
    background: linear-gradient(135deg, rgba(110, 231, 168, 0.18), rgba(110, 231, 168, 0.06));
}

.heatmap-cell.tone-negative {
    background: linear-gradient(135deg, rgba(255, 138, 138, 0.18), rgba(255, 138, 138, 0.06));
}

.heatmap-cell.tone-neutral {
    background: linear-gradient(135deg, rgba(88, 213, 255, 0.16), rgba(88, 213, 255, 0.05));
}

.heatmap-axis {
    color: var(--muted);
    font-size: 0.84rem;
}

.reason-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.reason-card strong {
    font-size: 1.2rem;
}

.reason-card small {
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    font-size: 0.92rem;
}

th {
    color: var(--muted);
    font-weight: 600;
}

.detail-list {
    display: grid;
    gap: 14px;
}

.detail-list div {
    display: grid;
    gap: 4px;
}

.detail-list dt {
    color: var(--muted);
    font-size: 0.86rem;
}

.detail-list dd {
    margin: 0;
    font-weight: 600;
    line-height: 1.6;
}

.status-inline {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.06);
}

.status-completed,
.status-inline.status-completed {
    color: var(--positive);
}

.status-running,
.status-inline.status-running {
    color: var(--accent);
}

.empty-state {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.scatter-list {
    display: grid;
    gap: 12px;
}

.scatter-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.scatter-row > div:first-child {
    display: grid;
    gap: 4px;
}

.scatter-row span,
.scatter-row small {
    color: var(--muted);
}

.scatter-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(440px, 100%);
    padding: 32px 28px;
    border-radius: 28px;
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.login-card p {
    margin: 0 0 20px;
    color: var(--muted);
}

.login-logo {
    width: min(240px, 70vw);
    margin-bottom: 20px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.settings-sidebar {
    position: sticky;
    top: 102px;
}

.settings-nav {
    display: grid;
    gap: 10px;
}

.settings-nav-link {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.settings-nav-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(88, 213, 255, 0.3);
}

.settings-nav-link.is-active {
    background: linear-gradient(135deg, rgba(88, 213, 255, 0.16), rgba(255, 123, 84, 0.16));
    border-color: rgba(88, 213, 255, 0.34);
}

.settings-content {
    display: grid;
    gap: 20px;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.login-form button {
    min-height: 46px;
    border-radius: 14px;
    border: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    color: #06101b;
    font-weight: 800;
    cursor: pointer;
}

.stack-form button,
.inline-form button {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
}

.danger-button {
    border-color: rgba(255, 138, 138, 0.24) !important;
    color: var(--negative) !important;
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 18px;
}

.alert.negative {
    background: rgba(255, 138, 138, 0.12);
    color: var(--negative);
}

.alert.positive {
    background: rgba(110, 231, 168, 0.12);
    color: var(--positive);
}

.note-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}

@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .signal-summary-grid,
    .diagnostic-grid,
    .hint-grid,
    .marketing-grid,
    .marketing-feature-grid,
    .marketing-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .hero-card,
    .marketing-hero,
    .report-grid,
    .lower-grid,
    .side-grid,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .line-panel {
        grid-column: span 1;
    }

    .settings-sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    .topbar {
        padding: 16px 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .container {
        width: min(100vw - 20px, 1440px);
        margin: 18px auto 42px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .signal-summary-grid,
    .diagnostic-grid,
    .hint-grid,
    .marketing-grid,
    .marketing-feature-grid,
    .marketing-plan-grid {
        grid-template-columns: 1fr;
    }

    .bar-row,
    .bar-list.compact .bar-row {
        grid-template-columns: 1fr;
    }

    .scatter-row,
    .scatter-meta {
        display: grid;
        justify-content: stretch;
    }

    table {
        min-width: 560px;
    }
}
