:root {
    --bg-0: #f5f2eb;
    --bg-1: #efe5d3;
    --ink-0: #252017;
    --ink-1: #4d4331;
    --line: #d8cdb9;
    --panel: rgba(255, 252, 246, 0.86);
    --sun: #d95f39;
    --teal: #0e8a89;
    --gold: #b38236;
    --ok: #1e8a61;
    --warn: #b26a1f;
    --err: #b53838;
    --shadow: 0 18px 40px rgba(94, 71, 36, 0.15);
    --workspace-sidebar-width: clamp(240px, 20vw, 320px);
    --workspace-header-height: 82px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: "Zen Kaku Gothic New", sans-serif;
    color: var(--ink-0);
    background:
        radial-gradient(1200px 600px at -8% -8%, rgba(217, 95, 57, 0.25), transparent 58%),
        radial-gradient(1000px 600px at 110% -10%, rgba(14, 138, 137, 0.2), transparent 62%),
        linear-gradient(180deg, var(--bg-0), var(--bg-1));
}

.backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.4) 46%, transparent 62%),
        radial-gradient(circle at 90% 90%, rgba(179, 130, 54, 0.14), transparent 32%);
    z-index: -2;
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(31, 22, 9, 0.12) 0.45px, transparent 0.45px);
    background-size: 3px 3px;
    opacity: 0.18;
    z-index: -1;
}

.layout {
    width: min(1180px, 95vw);
    margin: 36px auto 56px;
    display: grid;
    gap: 22px;
}

.workspace-topbar {
    position: fixed;
    top: 0;
    left: calc(var(--workspace-sidebar-width) + 16px);
    right: 16px;
    z-index: 24;
    width: auto;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 0 0 16px 16px;
    padding: 14px 16px;
    background: rgba(255, 252, 246, 0.9);
    box-shadow: var(--shadow);
}

.workspace-topbar h2 {
    margin: 0;
    font-family: "Zen Old Mincho", serif;
    font-size: 24px;
}

.workspace-shell {
    width: 100%;
    margin: 0;
    display: block;
}

.workspace-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 26;
    width: var(--workspace-sidebar-width);
    height: 100vh;
    border: 1px solid var(--line);
    border-radius: 0 20px 20px 0;
    background: var(--panel);
    backdrop-filter: blur(5px);
    box-shadow: var(--shadow);
    padding: 16px 14px 14px;
    display: grid;
    gap: 14px;
    overflow: hidden;
    align-content: start;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-link {
    text-decoration: none;
    color: #3f3527;
    border: 1px solid #d9ceb9;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
}

.sidebar-link:hover {
    border-color: #ce5330;
    color: #7d3a26;
}

.sidebar-actions {
    display: grid;
    gap: 8px;
}

.sidebar-actions .btn-secondary {
    text-decoration: none;
    text-align: center;
}

.sidebar-session {
    display: grid;
    gap: 8px;
}

.workspace-main.layout {
    width: min(1180px, calc(100vw - var(--workspace-sidebar-width) - 40px));
    margin: calc(var(--workspace-header-height) + 16px) 16px 48px calc(var(--workspace-sidebar-width) + 20px);
}

.workspace-main section[id] {
    scroll-margin-top: calc(var(--workspace-header-height) + 20px);
}

.app-bar {
    width: min(1180px, 95vw);
    margin: 24px auto 0;
}

.app-bar-inner {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 252, 246, 0.9);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.app-bar-inner h2 {
    margin: 0;
    font-family: "Zen Old Mincho", serif;
    font-size: 22px;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.session-badge {
    border: 1px solid #ccbda5;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: #4e4538;
}

.session-badge strong {
    color: #7d3a26;
}

.auth-layout {
    min-height: 100vh;
    width: min(560px, 92vw);
    margin: 0 auto;
    display: grid;
    align-content: center;
}

.auth-panel {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    background: linear-gradient(120deg, rgba(255, 251, 243, 0.92), rgba(244, 236, 222, 0.86));
    box-shadow: var(--shadow);
}

.auth-panel h1 {
    margin: 0;
    line-height: 1.08;
    font-family: "Zen Old Mincho", serif;
    font-size: clamp(36px, 6vw, 56px);
    color: #2a2114;
}

.auth-panel h1 span {
    color: var(--teal);
}

.auth-form {
    margin-top: 18px;
}

.auth-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--ink-1);
}

body.signin-body {
    min-height: 100vh;
    background: #fff5ed;
}

.signin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(300px, 48%) minmax(440px, 52%);
    width: 100%;
    overflow-x: hidden;
}

.signin-brand-pane {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
    background:
        radial-gradient(120% 70% at 20% 15%, rgba(255, 236, 218, 0.38), transparent 50%),
        radial-gradient(120% 75% at 86% 80%, rgba(255, 189, 142, 0.34), transparent 56%),
        linear-gradient(136deg, #f28a3f 0%, #ef7a3a 48%, #ea6e2d 100%);
}

.signin-brand-pane::before,
.signin-brand-pane::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.signin-brand-pane::before {
    width: 520px;
    height: 520px;
    background: rgba(255, 255, 255, 0.13);
    top: -220px;
    left: -140px;
}

.signin-brand-pane::after {
    width: 430px;
    height: 430px;
    background: rgba(255, 214, 174, 0.18);
    bottom: -180px;
    right: -120px;
}

.signin-brand-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
    color: #fffaf4;
}

.signin-kicker {
    margin: 0 0 14px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.88;
}

.signin-brand-title {
    margin: 0;
    line-height: 0.93;
    font-size: clamp(54px, 8vw, 106px);
    font-family: "Zen Old Mincho", serif;
    font-weight: 700;
}

.signin-brand-copy {
    margin: 18px 0 0;
    max-width: 340px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 248, 237, 0.94);
}

.signin-form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 52px) clamp(16px, 3vw, 36px);
    background:
        radial-gradient(100% 90% at 100% 0%, rgba(255, 215, 175, 0.28), transparent 56%),
        linear-gradient(180deg, #fffaf5 0%, #fff4ea 100%);
}

.signin-card {
    width: min(640px, 100%);
    max-width: 640px;
    border-radius: 26px;
    border: 1px solid #efdcc7;
    padding: clamp(22px, 3vw, 34px);
    background: rgba(255, 252, 248, 0.94);
    box-shadow: 0 24px 52px rgba(170, 108, 51, 0.17);
}

.signin-float-up {
    opacity: 0;
    transform: translateY(34px);
    animation: signin-float-up 0.72s cubic-bezier(0.22, 0.88, 0.31, 1) forwards;
}

.signin-title {
    margin: 6px 0 0;
    font-family: "Zen Old Mincho", serif;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.18;
    color: #312317;
}

.signin-card .lead {
    margin: 12px 0 0;
    max-width: 560px;
    color: #705a45;
}

.signin-card .auth-form {
    margin-top: 16px;
}

.signin-card .field label {
    font-size: 13px;
    color: #6c553f;
    font-weight: 600;
}

.signin-card input {
    border-radius: 16px;
    border-color: #e7d6c0;
    background: #fffefd;
    padding: 13px 14px;
}

.signin-card input::placeholder {
    color: #b5a896;
}

.signin-card input:focus {
    border-color: #ea7c34;
    box-shadow: 0 0 0 3px rgba(234, 124, 52, 0.16);
}

.signin-card .consent-block {
    margin-top: 14px;
    border-color: #efdac2;
    background: rgba(255, 247, 237, 0.92);
}

.signin-card .consent-copy {
    color: #6f5a45;
}

.signin-card .consent-check {
    color: #4a3a2c;
}

.signin-card .status {
    border: 1px solid rgba(199, 159, 119, 0.24);
}

.signin-btn,
.signin-sub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    text-decoration: none;
}

.signin-btn {
    border-radius: 999px;
    min-height: 46px;
    padding: 12px 18px;
    background: linear-gradient(120deg, #e67334, #f09e49);
    box-shadow: 0 10px 20px rgba(214, 117, 53, 0.26);
}

.signin-sub-btn {
    border-radius: 999px;
    min-height: 44px;
}

.signin-card h3 {
    margin: 18px 0 8px;
    font-size: 18px;
    color: #3f2f20;
}

.signin-card .actions.full {
    margin-top: 8px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@keyframes signin-float-up {
    from {
        opacity: 0;
        transform: translateY(34px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.consent-block {
    margin-top: 18px;
    border: 1px solid #d8ccb7;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    padding: 14px;
}

.consent-block h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.consent-copy {
    margin: 0 0 12px;
    color: #625640;
    font-size: 13px;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0 0;
    color: #3f3527;
    line-height: 1.5;
}

.consent-check input[type="checkbox"] {
    margin-top: 2px;
    flex: 0 0 auto;
}

.consent-required,
.consent-optional {
    margin-left: 6px;
    font-size: 11px;
}

.consent-required {
    color: var(--sun);
}

.consent-optional {
    color: var(--teal);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.hero {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 26px 30px;
    background: linear-gradient(120deg, rgba(255, 251, 243, 0.92), rgba(244, 236, 222, 0.86));
    box-shadow: var(--shadow);
}

.chip {
    display: inline-block;
    margin: 0 0 10px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(217, 95, 57, 0.35);
    color: #8a3f23;
    background: rgba(217, 95, 57, 0.08);
    font-size: 12px;
    letter-spacing: 0.06em;
}

.hero h1 {
    margin: 0;
    line-height: 1.04;
    font-family: "Zen Old Mincho", serif;
    font-size: clamp(34px, 5.1vw, 58px);
    color: #2a2114;
}

.hero h1 span {
    color: var(--teal);
}

.lead {
    margin: 14px 0 0;
    max-width: 820px;
    color: var(--ink-1);
}

.panel {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    backdrop-filter: blur(5px);
    box-shadow: var(--shadow);
    padding: 22px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 14px;
}

.panel-head h2 {
    margin: 0;
    font-family: "Zen Old Mincho", serif;
    font-size: 28px;
}

.panel-head p {
    margin: 0;
    color: var(--ink-1);
    font-size: 13px;
}

.panel-head code {
    color: #7d3a26;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

.field.checkbox {
    justify-content: end;
}

.field label {
    font-size: 13px;
    color: #5a503f;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfc0a8;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: #2f281c;
    padding: 10px 12px;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--sun);
    box-shadow: 0 0 0 3px rgba(217, 95, 57, 0.16);
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    align-self: flex-start;
    accent-color: var(--sun);
}

.source-switch {
    display: inline-flex;
    border: 1px solid #cfc0a8;
    border-radius: 999px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.8);
}

.mode-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    background: transparent;
    color: #5f5340;
    font-weight: 700;
    cursor: pointer;
}

.mode-btn.active {
    background: linear-gradient(120deg, #ce5330, #de8444);
    color: #fff;
}

.hidden {
    display: none !important;
}

.field-help {
    margin: 8px 0 0;
    font-size: 12px;
    color: #7a684d;
}

.field-help.warn {
    color: #8d3e23;
    font-weight: 600;
}

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

.btn-primary,
.btn-secondary {
    border-radius: 12px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    border: none;
    background: linear-gradient(120deg, #ce5330, #df8b45);
    color: #fff;
    box-shadow: 0 10px 18px rgba(193, 90, 47, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn-primary.is-loading {
    position: relative;
    padding-left: 44px;
}

.btn-primary.is-loading::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: eval-spin 0.8s linear infinite;
}

.btn-secondary {
    border: 1px solid #ccbda5;
    background: rgba(255, 255, 255, 0.82);
    color: #4e4538;
}

.status {
    margin: 14px 0 2px;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 12px;
}

.status.idle {
    background: rgba(186, 171, 144, 0.2);
    color: #625640;
}

.status.ok {
    background: rgba(33, 145, 97, 0.16);
    color: #1f724f;
}

.status.warn {
    background: rgba(194, 119, 45, 0.15);
    color: #7e4b1a;
}

.status.err {
    background: rgba(190, 67, 67, 0.14);
    color: #7c2f2f;
}

.eval-busy-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(37, 32, 23, 0.34);
    z-index: 1200;
}

.eval-busy-overlay.is-active {
    display: flex;
}

.eval-busy-box {
    min-width: min(460px, 92vw);
    border: 1px solid #dccab1;
    border-radius: 16px;
    background: rgba(255, 252, 246, 0.96);
    box-shadow: var(--shadow);
    padding: 18px 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.eval-busy-spinner {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid rgba(217, 95, 57, 0.26);
    border-top-color: #d95f39;
    animation: eval-spin 0.85s linear infinite;
}

.eval-busy-text {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a3e2f;
}

@keyframes eval-spin {
    to {
        transform: rotate(360deg);
    }
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.kpi-card {
    border: 1px solid #d8ccb7;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    padding: 12px;
}

.kpi-label {
    margin: 0;
    font-size: 12px;
    color: #705f46;
}

.kpi-value {
    margin: 6px 0 0;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: #2a2217;
}

.kpi-value.small {
    font-size: 13px;
    line-height: 1.35;
    word-break: break-all;
}

.viz-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.chart-card,
.meta-card,
.advice-box,
.feedback-box,
.growth-box,
.growth-detail-box,
.trend-card,
.history-box {
    border: 1px solid #d8ccb7;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 14px;
}

.chart-card h3,
.meta-card h3,
.advice-box h3,
.feedback-box h3,
.growth-box h3,
.history-box h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.meta-card h4,
.advice-box h4,
.growth-detail-box h4,
.trend-card h4 {
    margin: 10px 0 6px;
    font-size: 13px;
    color: #745f3f;
}

.growth-caption {
    margin: 0 0 12px;
    color: #665942;
    font-size: 13px;
}

.growth-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.growth-stat {
    border: 1px solid #d8ccb7;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    padding: 12px;
}

.growth-stat-label {
    margin: 0;
    font-size: 12px;
    color: #705f46;
}

.growth-stat-value {
    margin: 6px 0 0;
    font-size: 22px;
    font-weight: 700;
    color: #2a2217;
}

.growth-stat-value.up {
    color: var(--ok);
}

.growth-stat-value.down {
    color: var(--err);
}

.growth-stat-value.neutral {
    color: var(--ink-1);
}

.trend-card {
    margin-bottom: 12px;
}

.trend-chart {
    min-height: 172px;
    display: flex;
    align-items: flex-end;
}

.trend-empty {
    color: #6f624e;
    font-size: 13px;
}

.trend-bars {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
    gap: 10px;
    align-items: end;
}

.trend-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.trend-score {
    font-size: 12px;
    font-weight: 700;
    color: #7d3a26;
}

.trend-bar-shell {
    width: 100%;
    max-width: 48px;
    height: 120px;
    border-radius: 14px;
    padding: 6px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(180deg, rgba(14, 138, 137, 0.12), rgba(217, 95, 57, 0.08));
    border: 1px solid rgba(216, 204, 183, 0.9);
}

.trend-bar {
    width: 100%;
    min-height: 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, #0e8a89, #d95f39);
}

.trend-point.is-latest .trend-bar {
    background: linear-gradient(180deg, #d95f39, #efab54);
}

.trend-date,
.trend-meta {
    font-size: 11px;
    color: #6a5d47;
    text-align: center;
}

.growth-details {
    margin-bottom: 0;
}

#radar-chart {
    width: 100%;
    max-height: 360px;
    display: block;
}

.axis-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.axis-card {
    border: 1px solid #d8ccb7;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    padding: 12px;
}

.axis-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.axis-top h4 {
    margin: 0;
    font-size: 15px;
}

.axis-score {
    font-weight: 700;
    color: #954424;
}

.clean-list {
    margin: 0;
    padding-left: 18px;
    color: #493f31;
    font-size: 13px;
}

.clean-list li {
    margin-bottom: 3px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.feedback-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

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

.sep {
    border: 0;
    border-top: 1px solid #d9ccb6;
    margin: 14px 0;
}

.history-list {
    display: grid;
    gap: 8px;
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.compact-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 10px;
}

.analytics-filter-grid {
    align-items: end;
    margin-bottom: 10px;
}

.analytics-filter-grid .actions {
    margin-top: 0;
    align-items: end;
}

.analytics-list-grid {
    margin-top: 10px;
}

.analytics-list-grid .history-box {
    min-height: 170px;
}

.json-preview {
    margin: 6px 0 0;
    border: 1px solid #d9ceb9;
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.78);
    color: #2f281c;
    font-size: 12px;
    line-height: 1.55;
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-log {
    border: 1px solid #d9ceb9;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
    min-height: 240px;
    max-height: 420px;
    overflow-y: auto;
    padding: 10px;
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-bubble {
    border-radius: 12px;
    padding: 9px 10px;
    border: 1px solid #d8ccb7;
    max-width: 92%;
}

.chat-bubble.user {
    background: rgba(242, 201, 159, 0.32);
    justify-self: end;
}

.chat-bubble.assistant {
    background: rgba(255, 255, 255, 0.9);
    justify-self: start;
}

.chat-role {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #6a4a2b;
}

.chat-content {
    margin: 6px 0 0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.history-item {
    border: 1px solid #d9ceb9;
    border-radius: 10px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.history-item strong {
    color: #65311e;
}

.reveal {
    opacity: 0;
    transform: translateY(10px);
    animation: reveal 0.55s ease forwards;
}

.delay-1 {
    animation-delay: 0.08s;
}

.delay-2 {
    animation-delay: 0.14s;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .signin-shell {
        grid-template-columns: 1fr;
    }

    .signin-brand-pane {
        min-height: 34vh;
        padding: 38px 26px;
        align-items: flex-end;
        justify-content: flex-start;
    }

    .signin-brand-title {
        font-size: clamp(44px, 13vw, 72px);
    }

    .signin-brand-copy {
        max-width: 100%;
        margin-top: 10px;
    }

    .signin-form-pane {
        padding: 26px 16px 34px;
    }

    .signin-card {
        width: min(720px, 100%);
    }

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

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

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

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

    .two-col {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .workspace-topbar {
        position: static;
        left: auto;
        right: auto;
        z-index: auto;
        width: min(1160px, 96vw);
        margin: 18px auto 0;
        border-radius: 16px;
    }

    .workspace-shell {
        grid-template-columns: 1fr;
        width: min(1160px, 96vw);
        margin: 10px auto 48px;
        display: grid;
    }

    .workspace-sidebar {
        position: static;
        width: auto;
        height: auto;
        border-radius: 20px;
        overflow: visible;
    }

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

    .workspace-main.layout {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 640px) {
    .signin-brand-pane {
        min-height: 30vh;
        padding: 26px 16px;
    }

    .signin-card {
        padding: 18px;
        border-radius: 20px;
    }

    .layout {
        width: min(1160px, 96vw);
        margin-top: 20px;
        margin-bottom: 24px;
    }

    .hero,
    .panel {
        padding: 14px;
    }

    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

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

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

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

    .app-bar {
        width: min(1160px, 96vw);
        margin-top: 12px;
    }

    .app-bar-inner {
        padding: 12px;
    }

    .app-bar-inner h2 {
        font-size: 18px;
    }

    .auth-panel {
        padding: 18px;
    }

    .workspace-topbar h2 {
        font-size: 20px;
    }

    .sidebar-actions {
        grid-template-columns: 1fr;
    }
}
