/* ── The Retail Analyst — shared theme ─────────────────────────── */

:root {
    --paper:      #faf8f4;
    --paper-2:    #f2efe8;
    --card:       #fffefb;
    --ink:        #1c1c1a;
    --muted:      #6f6b63;
    --faint:      #a39c8d;
    --line:       #e3ddd1;
    --navy:       #1e3a5f;
    --navy-d:     #152a45;
    --navy-mid:   #31517b;   /* projected-column table header */
    --navy-tint:  #eef1f4;   /* projected-column fill */
    --navy-tint-2:#e6ebf1;   /* projected subtotal fill */
    --green:      #17663f;
    --green-tint: #e4efe7;
    --red:        #a4322a;
    --red-tint:   #f7ebe9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.serif { font-family: Georgia, 'Times New Roman', serif; }
.mono {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}
.shell { max-width: 960px; margin: 0 auto; padding: 0 28px; }
.shell.wide { max-width: 1280px; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
::selection { background: var(--navy); color: #fff; }

/* ── Site header ── */
.site-head {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    position: sticky; top: 0; z-index: 50;
}
.site-head .shell {
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; gap: 20px;
}
/* Tool pages: brand left, workflow rail dead-center, actions right */
.site-head .shell.centered {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.site-head .shell.centered .rail { justify-self: center; }
.site-head .shell.centered .head-right {
    justify-self: end; display: flex; align-items: center; gap: 12px;
}
.brand {
    font-family: Georgia, serif; font-size: 19px; font-weight: 700;
    color: var(--ink); text-decoration: none; letter-spacing: -0.2px;
    white-space: nowrap;
}
.brand .dot { color: var(--navy); }

.head-links { display: flex; align-items: center; gap: 26px; }
.head-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.head-links a:hover { color: var(--ink); }

/* ── Workflow rail (Assumptions · Model · DCF) ── */
.rail { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.rail-step { color: var(--muted); text-decoration: none; }
a.rail-step:hover { color: var(--ink); }
.rail-step.here {
    color: var(--navy); font-weight: 600;
    border-bottom: 2px solid var(--navy); padding-bottom: 1px;
}
.rail-step.off { color: #c9c2b4; pointer-events: none; }
.rail-sep { width: 18px; height: 1px; background: var(--line); flex: none; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    background: var(--navy); color: #fff;
    border: none; cursor: pointer;
    font-family: inherit; font-size: 15px; font-weight: 500;
    padding: 12px 26px; border-radius: 2px;
    text-decoration: none;
    transition: background 0.15s;
}
.btn:hover { background: var(--navy-d); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.small { font-size: 13.5px; padding: 8px 18px; }

/* ── Cards ── */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 24px 28px;
    margin-bottom: 18px;
}

/* ── Error panel ── */
.error-box {
    background: var(--red-tint); color: var(--red);
    border: 1px solid #dcbcb7;
    padding: 16px 20px; border-radius: 3px; font-size: 14.5px;
}
.error-box a { color: var(--navy); }

/* ── Footer ── */
.site-foot {
    border-top: 1px solid var(--line);
    margin-top: 88px; padding: 32px 0 44px;
    font-size: 13.5px; color: var(--muted);
}
.site-foot .shell {
    display: flex; justify-content: space-between; align-items: baseline;
    flex-wrap: wrap; gap: 12px;
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
