/* Investment Path – pages
   Standalone pages: the sign-in card and the legal documents.
   ========================================================================== */

/* ---------- Private login ---------- */

.login-page {
    min-height: 100vh;
    padding: 0 0 28px;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 36px), 430px);
    margin: clamp(28px, 7vh, 68px) auto 0;
}

.login-card {
    padding: 30px;
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.login-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 14px;
    background: var(--accent-soft);
    font-size: 23px;
}

.login-eyebrow {
    color: var(--accent-2-text);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-card h1 {
    margin-top: 4px;
    font-size: 24px;
    letter-spacing: -0.025em;
}

.login-copy {
    margin-top: 9px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.6;
}

.login-error {
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 10px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 12.5px;
}

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

.login-form .field { margin: 0; }
.login-form input { min-height: 44px; }
.login-submit { width: 100%; margin-top: 3px; }

.login-note {
    margin-top: 16px;
    color: var(--text-faint);
    font-size: 11px;
    line-height: 1.5;
}

.login-legal-links {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* ---------- Legal information ---------- */

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 300;
    padding: 9px 13px;
    border-radius: 9px;
    color: #fff;
    background: var(--accent);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 0.15s ease;
}

.skip-link:focus { transform: translateY(0); }

.legal-page {
    min-height: 100vh;
    padding: 0 0 18px;
}

.legal-shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 36px), 920px);
    margin-inline: auto;
}

.legal-card {
    padding: clamp(24px, 5vw, 52px);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.legal-hero {
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.legal-kicker {
    color: var(--accent-2-text);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.legal-hero h1 {
    margin-top: 5px;
    font-size: clamp(30px, 6vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.legal-hero > p:last-child {
    max-width: 670px;
    margin-top: 12px;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.65;
}

.legal-warning {
    margin-top: 24px;
    padding: 15px 17px;
    border: 1px solid rgba(251, 191, 36, 0.42);
    border-radius: 12px;
    color: var(--amber);
    background: var(--amber-soft);
    font-size: 12.5px;
    line-height: 1.55;
}

.legal-warning strong { display: block; margin-bottom: 3px; }
.legal-warning p + p { margin-top: 5px; }

.legal-section {
    padding-top: 27px;
    scroll-margin-top: 18px;
}

.legal-section + .legal-section {
    margin-top: 26px;
    border-top: 1px solid var(--border);
}

.legal-section h2 {
    margin-bottom: 11px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* /about is long enough to need a level below h2, which the two legal pages
   never did. Sized between the h2 and the body so the hierarchy reads without
   another weight in the stack. */
.legal-section h3 {
    margin: 20px 0 8px;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 650;
    letter-spacing: -0.005em;
}

.legal-section h3:first-of-type { margin-top: 14px; }

.legal-section p,
.legal-section li,
.legal-address {
    color: var(--text-dim);
    font-size: 13.5px;
    line-height: 1.72;
}

.legal-section p + p { margin-top: 11px; }
.legal-section-intro { margin: -4px 0 12px; }

.legal-list,
.legal-steps {
    margin: 11px 0 0;
    padding-inline-start: 19px;
}

.legal-list { list-style: disc; }
.legal-steps { list-style: decimal; }

.legal-list li::marker,
.legal-steps li::marker { color: var(--text-faint); }
.legal-list li + li,
.legal-steps li + li { margin-top: 8px; }
.legal-list strong { color: var(--text); }

/* A displayed formula. Monospace so the operators line up between lines, and
   set on its own surface so the reader can tell at a glance which parts of the
   page are arithmetic they can check and which are prose. */
.legal-formula {
    margin: 13px 0;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent-2);
    border-radius: 10px;
    background: var(--surface-alt);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    line-height: 2;
    overflow-x: auto;
}

.legal-formula strong { font-weight: 700; }

/* Wide content scrolls inside its own box: the page body must never scroll
   sideways, and a three-column money table is wider than a 360px phone. */
.legal-table-wrap {
    margin: 13px 0;
    overflow-x: auto;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.legal-table th,
.legal-table td {
    padding: 8px 14px 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    text-align: right;
    white-space: nowrap;
}

.legal-table thead th {
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Row headers are labels, not figures: left-aligned, and the emphasis of the
   table. Column headers stay right-aligned over their numbers. */
.legal-table tbody th[scope="row"] {
    color: var(--text);
    font-weight: 600;
    text-align: left;
    white-space: normal;
}

.legal-table th:first-child,
.legal-table td:first-child { text-align: left; }
.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td { border-bottom: 0; }

/* The formula strings carry real exponents; without this the line-height of
   the surrounding paragraph stretches around them. */
.legal-section sup {
    font-size: 0.75em;
    line-height: 0;
}

.legal-section a,
.legal-footer a {
    color: var(--accent-2-text);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.legal-section a:hover,
.legal-section a:focus-visible,
.legal-footer a:hover,
.legal-footer a:focus-visible { color: var(--text); }

.legal-section code {
    padding: 1px 5px;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    background: var(--surface-alt);
    font-size: 0.9em;
}

.legal-address {
    display: grid;
    justify-items: start;
    font-style: normal;
}

.legal-address strong { color: var(--text); }
.legal-placeholder { color: var(--amber); }

.legal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 5px 6px;
    color: var(--text-faint);
    font-size: 11.5px;
}

.legal-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 16px;
}

/* ---------- Language switcher ---------- */

/* Links rather than a control, so the language is a place with an address.
   Sized to sit beside the theme toggle without becoming a second nav. */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: none;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
}
.lang-switch a {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-faint);
    text-decoration: none;
    white-space: nowrap;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active {
    color: var(--text);
    background: var(--surface-2, rgba(255, 255, 255, 0.08));
}
