/* ─── Design Tokens (inlined from tokens.css for GitHub Pages) ─── */
:root {
    /* Legacy aliases. SPEC-DES-001 §X: a token whose value restates another
       token will not follow it when that token changes, so these reference the
       canonical values below rather than repeating a literal. Their previous
       values — #236960, #1a4742, #ac8255, #c49564 — predate the unified token
       set and were the brand split recorded in §XIII. */
    --primary-color: var(--primary);
    --primary-dark: var(--primary-hover);
    --secondary-color: var(--secondary);
    --accent-color: var(--secondary);
    --text-dark: var(--text-primary);
    --text-light: var(--text-secondary);
    --bg-light: var(--background);
    --bg-white: var(--surface);
    --border-color: var(--border-subtle);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Typeface layer. The status stylesheet composes var(--font-data) and it
       resolved to nothing here, so the capability ids rendered in Inter. */
    --font-family: 'Inter', sans-serif;
    --font-display: 'Atkinson Hyperlegible Next', sans-serif;
    --font-data: 'IBM Plex Mono', monospace;

    /* Content link on a light surface. Deliberately blue rather than the gold
       accent: on the public site a link inside running prose has no other
       affordance, and blue is the one colour a reader already reads as one.
       6.4:1 on --background. */
    --link-on-light: #005ea8;

    /* Muted label on the dark hero band and footer. The neutral ramp is tuned
       for dark-on-light and inverts poorly. */
    --text-on-dark-muted: #DEDEDE;

    /* Tokens from unified design system */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f3;
    --neutral-200: #e8e8e5;
    --neutral-300: #d4d4d0;
    --neutral-400: #a3a3a0;
    --neutral-500: #737370;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --background: var(--neutral-100);
    --surface: #ffffff;
    --text-primary: var(--neutral-800);
    --text-secondary: var(--neutral-500);
    --text-muted: var(--neutral-500);
    --text-inverse: #ffffff;
    --border-subtle: var(--neutral-200);
    --primary: #1a4d47;
    --primary-hover: #15403b;
    --primary-subtle: #e8f0ef;
    /* Canonical gold (SPEC-DES-001 §VI.4). #d3af37 / #c49f2e were the v1
       values; all three role themes have since converged on this pair. */
    --secondary: #D4A857;
    --secondary-hover: #c09840;
    --secondary-text: var(--neutral-900);
    --secondary-subtle: #f9f5e6;
    /* Gold is a fill: #D4A857 is 2.12:1 on white and #c09840 is 2.69:1, so
       neither may set text on a light surface (SPEC-DES-001 §VI.6). This pinned
       value is 6.70:1. */
    --accent-text-on-light: #735816;
    /* Status quartet. Part of the foundation, not of any one surface: the
       status service consumes this stylesheet and derives every service state
       from these four fills rather than inventing its own. */
    --success: #2e7d5b;
    --success-hover: #276a4d;
    --success-subtle: #e6f4ed;
    --info: #35719a;
    --info-hover: #2e6285;
    --info-subtle: #e6f0f8;
    --warning: #D4A857;
    --warning-hover: #a87912;
    --warning-subtle: #fef8e6;
    --danger: #c0392b;
    --danger-hover: #a83024;
    --danger-subtle: #fce8e6;

    /* Alert/notice body text, darkened past the status tokens so it clears AA
       on the matching --*-subtle fill. A status token is a fill, never type. */
    --alert-warning-text: #5f3d00;
    --alert-danger-text: #8f1f1f;
    --alert-info-text: #1f4f73;

    --advisor-green: #1a4d47;
    --steward-blue: #2F4F7F;
    --guardian-gray: #303030;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.landing-content a {
    color: var(--link-on-light);
}

.landing-content .landing-signin-btn,
.landing-content .landing-learn-more-btn {
    color: var(--text-inverse);
}

.landing-content .landing-learn-more-btn {
    color: var(--secondary-text);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Atkinson Hyperlegible Next', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.25rem;
}

h5, h6 {
    font-size: 1rem;
}

code, pre, .code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
}

pre {
    background-color: var(--neutral-100);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

hr {
    border-color: var(--accent-color);
    margin: 1rem 1rem;
    border-width: 2px;
}

.floating-back-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    background-color: var(--accent-text-on-light);
    color: var(--text-inverse);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-back-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.2);
    color: var(--text-inverse);
}

.floating-back-widget .material-symbols-outlined {
    font-size: 1.5rem;
}

.public-content-card {
    background: transparent;
    padding: 2rem 0;
}

.public-section {
    padding: 0 0 1.5rem 0;
}

.public-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.toc {
    background-color: var(--neutral-100);
    padding: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 2rem;
    border-radius: 4px;
}

.toc h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin: 0.5rem 0;
}

.toc a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.toc a:hover {
    color: var(--accent-text-on-light);
    text-decoration: underline;
}

/* Two-column layout for pages with TOC */
.landing-content {
    position: relative;
}

.public-content-card.with-toc {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background: transparent;
    padding: 0;
}

.public-content-card.with-toc .toc {
    position: sticky;
    top: 2rem;
    height: fit-content;
    margin-bottom: 0;
}

.public-content-card.with-toc > div:last-child {
    min-width: 0;
}

@media (max-width: 900px) {
    .public-content-card.with-toc {
        grid-template-columns: 1fr;
    }

    .public-content-card.with-toc .toc {
        position: relative;
        top: auto;
        margin-bottom: 2rem;
    }
}

.transition-page-v2-subheading {
    color:var(--accent-color);
    font-size:1.2rem;
    font-weight:400;
    padding-left: 3rem;
    margin-top:0;
}

/* Badge */
.version-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--secondary);
    color: var(--secondary-text);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-radius: 999px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section {
    margin-bottom: 4rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* ------------------------------------------------------------
   V2 Landing Page (docs/index.html)
   ------------------------------------------------------------ */
body.landing-page {
    background-color: var(--guardian-gray);
    color: var(--text-primary);
    margin: 0;
}

.landing-page .material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.landing-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

.landing-hero {
    background-color: var(--primary);
    color: var(--text-inverse);
    padding: 2.25rem 0 2.35rem 0;
}

.landing-hero-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4.1rem;
    align-items: center;
}

.landing-brand {
    display: grid;
    gap: 0.45rem;
    padding-right: 2.8rem;
    border-right: 2px solid var(--secondary-color);
}

.landing-brand-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 2.7rem;
    line-height: 1;
    font-weight: 500;
}

.landing-brand-row .material-symbols-outlined {
    color: var(--secondary-color);
    font-size: 2.7rem;
}

.landing-welcome h1 {
    color: var(--secondary);
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 600;
    margin: 0 0 0 0;
}

.landing-welcome p {
    color: var(--text-inverse);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 300;
}

.landing-welcome .version {
    color: var(--text-on-dark-muted);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3em;
}

.landing-welcome em {
    font-style: italic;
}

.landing-content {
    padding: 3.1rem 0 4.15rem 0;
    background-color: var(--background);
}

.landing-content-grid {
    display: grid;
    grid-template-columns: 375px 1fr;
    gap: 4rem;
}

.landing-signin-panel {
    padding-right: 2rem;
    border-right: 2px solid var(--secondary-color);
}

.landing-signin-heading,
.landing-about-panel h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.22;
}

.landing-signin-heading {
    margin-bottom: 1rem;
}

.landing-signin-buttons {
    display: grid;
    gap: 1rem;
    margin-bottom: 2.1rem;
}

.landing-signin-btn,
.landing-learn-more-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-inverse);
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 1.15rem;
    line-height: 1.2;
    transition: filter 120ms ease-in-out;
    box-shadow: var( --shadow);
}

.landing-signin-btn:hover,
.landing-signin-btn:focus-visible,
.landing-learn-more-btn:hover,
.landing-learn-more-btn:focus-visible {
    color: var(--text-inverse);
    box-shadow: 0 0 5px 1px var(--secondary-color);
}

.landing-signin-btn-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.landing-signin-btn-main .material-symbols-outlined,
.landing-signin-btn > .material-symbols-outlined,
.landing-learn-more-btn > .material-symbols-outlined {
    font-size: 1.45rem;
}

.landing-signin-btn--teacher {
    background-color: var(--primary);
}

.landing-signin-btn--student {
    background-color: var(--steward-blue);
}

.landing-signin-btn--operator {
    background-color: var(--guardian-gray);
}

.landing-signin-note-title {
    color: var(--accent-text-on-light);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
    margin: 0 0 0 0;
}

.landing-signin-note-title .material-symbols-outlined {
    font-size: 1.1rem;
    line-height: 1;
    transform: translateY(1px);
}

.landing-no-account-note {

    padding:0.5rem;
    font-size:0.9rem;

}

.landing-about-panel p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height:1.5;
}

.landing-signin-panel p:last-child {
    margin-bottom: 0;
}

.landing-status-wrap {
    margin-top: 1.4rem;
}

.landing-status-label {
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.landing-about-panel h2 {
    margin-bottom: 1rem;
}

.landing-signin-heading strong,
.landing-about-panel strong {
    color: var(--primary);
}

.landing-about-panel p {
    max-width: 780px;
}

.landing-learn-more-btn {
    background-color: var(--secondary);
    color: var(--secondary-text);
    width: 265px;
    margin-left: auto;
    margin-top: 2.25rem;
}

.landing-learn-more-btn:hover,
.landing-learn-more-btn:focus-visible {
    color: var(--secondary-text);
}

.landing-footer {
    background-color: var(--guardian-gray);
    color: var(--text-inverse);
    padding: 1rem 0;
    text-align: left;
}

.landing-footer p {
    opacity: 1;
}

.landing-footer-grid {
    display: grid;
    grid-template-columns:0.5fr 0.5fr 0.5fr 1.5fr;
    gap: 1rem;
    align-items: start;
}

.landing-footer {
    background-color: var(--neutral-800);
}

.landing-footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.landing-footer-links a {
    color: var(--neutral-100);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.3;
}

.landing-footer-links a:hover,
.landing-footer-links a:focus-visible {
    color: var(--secondary-color);
}

.landing-footer-meta {
    text-align: right;
}

.landing-footer-meta p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--secondary);

}

.landing-footer-meta p + p {
    margin-top: 0.25rem;
    color: var(--neutral-100);
}

@media (max-width: 1024px) {
    .landing-hero-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .landing-brand {
        border-right: 0;
        border-bottom: 2px solid var(--secondary-color);
        padding-right: 0;
        padding-bottom: 1.4rem;
    }

    .landing-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .landing-signin-panel {
        border-right: 0;
        border-bottom: 2px solid var(--secondary-color);
        padding-right: 0;
        padding-bottom: 1.5rem;
    }

    .landing-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .landing-footer-meta {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .landing-shell {
        padding: 0 1rem;
    }

    .landing-brand-row {
        font-size: 2rem;
    }

    .landing-brand-row .material-symbols-outlined {
        font-size: 2rem;
    }

    .landing-welcome h1 {
        font-size: 2rem;
    }

    .landing-welcome p {
        font-size: 1.3rem;
    }

    .landing-signin-heading,
    .landing-about-panel h2 {
        font-size: 1.7rem;
    }

    .landing-signin-btn,
    .landing-learn-more-btn {
        font-size: 1.05rem;
    }

    .landing-signin-panel p,
    .landing-about-panel p {
        font-size: 1rem;
    }

    .landing-learn-more-btn {
        width: 100%;
    }

    .landing-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .landing-footer-meta {
        margin-left: 0;
        text-align: left;
    }
}

/* ─── Learn More Page Styles ─── */
.v2-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.v2-feature-card {
    background-color: var(--surface);
    padding: 2.25rem;
    border-radius: 2px;
    box-shadow: var(--shadow);
    border-top: 10px solid var(--secondary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.v2-feature-card-left {
    background-color: var(--surface);
    padding: 2.25rem;
    border-radius: 2px;
    box-shadow: var(--shadow);
    border-top: 10px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.v2-feature-card-right {
    background-color: var(--surface);
    padding: 2.25rem;
    border-radius: 2px;
    box-shadow: var(--shadow);
    border-top: 10px solid var(--steward-blue);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.v2-feature-card-left .material-symbols-outlined {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
}

.v2-feature-card-left h3,
.v2-feature-card-right h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
    font-weight: 600;
}

.v2-feature-card-left p,
.v2-feature-card-right p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.v2-feature-card-left .dev-note,
.v2-feature-card-right .dev-note {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.philosophy-section {
    margin-bottom: 4.5rem;
}

.philosophy-heading {
    color: var(--guardian-gray);
    font-size: 2.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-subtle);
}

.philosophy-text p {
    font-size: 1.15rem;
    color: var(--text-primary);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.v2-badge {
    background-color: var(--secondary-color);
    color: var(--secondary-text);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.75rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab-container {
    margin-top: 1.5rem;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-subtle);
}

.tab-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    font-weight: 400;
    /* --text-secondary is 4.35:1 on the page ground; unselected tabs need AA. */
    color: var(--neutral-700);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    font-family: inherit;
}

.tab-btn#student-tab:hover {
    background-color: var(--steward-blue);
    color: var(--text-inverse);
}

.tab-btn#teacher-tab:hover {
    background-color: var(--advisor-green);
    color: var(--text-inverse);
}

.tab-btn#teacher-tab.active {
    background-color: var(--advisor-green);
    color: var(--text-inverse);
}

.tab-btn#teacher-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--advisor-green);
    border-radius: 4px 4px 0 0;
}

.tab-btn#student-tab.active {
    background-color: var(--steward-blue);
    color: var(--text-inverse);
}

.tab-btn#student-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--steward-blue);
    border-radius: 4px 4px 0 0;
}

#teacher-features .v2-feature-card {
    border-top-color: var(--advisor-green);
}

#teacher-features .v2-feature-card .material-symbols-outlined {
    color: var(--advisor-green);
}

#student-features .v2-feature-card {
    border-top-color: var(--steward-blue);
}

#student-features .v2-feature-card .material-symbols-outlined {
    color: var(--steward-blue);
}

.tab-content {
    display: none;
    animation: fade-in 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.v2-feature-list.grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .v2-feature-list.grid-2x2 {
        grid-template-columns: 1fr;
    }
}
:where(.visually-hidden) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
