:root {
    --primary-bg: #F9F8F6;
    --text-main: #2A2A2A;
    --accent-green: #21382D;
    --accent-gold: #6F8177;
    --chat-bg: #FFFFFF;
    --chat-user: #21382D;
    --chat-bot: #F1F0ED;
    --paper-deep: #EEE9DF;
    --paper-line: rgba(42, 42, 42, 0.14);
    --ink-soft: rgba(42, 42, 42, 0.72);
    --white-soft: rgba(255, 255, 255, 0.86);
    --shadow-soft: 0 22px 70px rgba(42, 42, 42, 0.13);
    --font-display: "IvyPresto", "IvyPresto Display", Georgia, "Times New Roman", serif;
    --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
    --radius-card: 8px;
    --radius-control: 6px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --mg-blue: var(--accent-green);
    --mg-red: #8F2633;
    --mg-white: #FFFFFF;
    --mg-paper: var(--primary-bg);
    --mg-ink: var(--text-main);
    --mg-muted: var(--ink-soft);
    --mg-line: var(--paper-line);
    --mg-panel: rgba(255, 255, 255, 0.82);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    --scroll-progress: 0;
    --hero-shift: 0px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--primary-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent-green);
    text-decoration: underline;
}

a:hover {
    opacity: 0.8;
}

button,
textarea,
input {
    font: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.hidden {
    display: none !important;
}

.report-page {
    background:
        linear-gradient(rgba(249, 248, 246, 0.82), rgba(249, 248, 246, 0.82)),
        repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(42, 42, 42, 0.025) 32px);
}

.section-wrap {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 72px;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(249, 248, 246, 0.9);
    backdrop-filter: blur(18px);
    transition: min-height 220ms ease, background 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--accent-green);
    transform: scaleX(var(--scroll-progress));
    transform-origin: left;
}

.is-scrolled .site-header {
    min-height: 64px;
    border-color: rgba(42, 42, 42, 0.08);
    background: rgba(249, 248, 246, 0.94);
    box-shadow: 0 14px 38px rgba(42, 42, 42, 0.08);
}

.site-mark {
    display: inline-flex;
    align-items: center;
    min-width: min(18rem, 42vw);
}

.site-mark span,
.eyebrow,
.intro-kicker,
.section-kicker {
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.site-mark img {
    width: min(17rem, 42vw);
    height: auto;
}

.nav-toggle {
    display: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: rgba(42, 42, 42, 0.76);
    font-size: 0.92rem;
    font-weight: 600;
}

.site-nav a {
    position: relative;
    padding: 0.35rem 0;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--accent-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.site-nav a:hover::after {
    transform: scaleX(1);
}

.hero-editorial {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-height: 84svh;
    overflow: hidden;
    color: #FFFFFF;
}

.hero-media,
.hero-media img,
.hero-scrim {
    position: absolute;
    inset: 0;
}

.hero-media {
    z-index: -2;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.025) translateY(var(--hero-shift));
    will-change: transform;
}

.hero-scrim {
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(6, 24, 19, 0.78) 0%, rgba(6, 24, 19, 0.54) 42%, rgba(6, 24, 19, 0.12) 100%),
        linear-gradient(180deg, rgba(6, 24, 19, 0.24) 0%, rgba(6, 24, 19, 0.5) 100%);
}

.hero-content {
    width: min(780px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1440px) / 2));
    padding: 5rem 0 6rem;
}

.hero-content .eyebrow {
    color: var(--accent-gold);
    margin: 0 0 1rem;
    animation: luxeFadeUp 480ms 20ms var(--ease-out) both;
}

.hero-content h1 {
    margin: 0;
    font-family: var(--font-display);
    max-width: 11.5ch;
    font-size: 5.2rem;
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: 0;
    overflow-wrap: break-word;
    animation: luxeFadeUp 520ms 60ms var(--ease-out) both;
}

.hero-subtitle {
    max-width: 660px;
    margin: 1.35rem 0 0;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.12;
    animation: luxeFadeUp 520ms 100ms var(--ease-out) both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.15rem;
    margin-top: 2rem;
    animation: luxeFadeUp 520ms 180ms var(--ease-out) both;
}

.text-button {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.text-button {
    gap: 0.55rem;
    padding: 0.82rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-control);
    background: #FFFFFF;
    color: var(--accent-green);
    position: relative;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.text-button::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.45rem;
    width: 100%;
    height: 1px;
    background: var(--accent-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 220ms ease;
}

.text-button svg {
    transition: transform 180ms ease;
}

.text-button:hover::after {
    transform: scaleX(1);
}

.text-button:hover svg {
    transform: translateX(4px);
}

.editorial-intro {
    max-width: 960px;
    padding: 5rem 0 3.8rem;
}

.intro-kicker {
    color: var(--accent-green);
    margin-bottom: 1rem;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.68fr);
    gap: 4rem;
    align-items: start;
}

.intro-grid h2,
.section-heading h2,
.chat-editorial h2,
.feature-panel h3,
.stat-card h3,
.dashboard-header h1,
.admin-login h1,
.panel-heading h2 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0;
}

.intro-grid h2 {
    margin: 0;
    font-size: 3.25rem;
    line-height: 1.04;
    overflow-wrap: break-word;
}

.intro-copy {
    display: grid;
    gap: 1.15rem;
    color: var(--text-main);
    font-size: 1.04rem;
}

.intro-copy-single {
    max-width: 960px;
}

.intro-copy p {
    margin: 0;
}

.methodology-section {
    padding: 4.2rem 0;
    background: var(--accent-green);
    color: #FFFFFF;
}

.methodology-inner {
    display: grid;
    gap: 1rem;
    max-width: 960px;
}

.methodology-section .intro-kicker {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.methodology-section p:last-child {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2.25rem;
    line-height: 1.12;
}

.stat-band {
    padding: 4.5rem 0;
    background: #FFFFFF;
    border-top: 1px solid var(--paper-line);
    border-bottom: 1px solid var(--paper-line);
}

.section-heading {
    display: grid;
    gap: 0.85rem;
    max-width: 760px;
    margin-bottom: 2rem;
}

.section-heading.narrow {
    max-width: 840px;
}

.eyebrow,
.section-kicker {
    color: var(--accent-green);
}

.section-heading h2,
.chat-editorial h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 3rem;
    line-height: 1.04;
}

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

.stat-card,
.feature-panel,
.chat-shell,
.panel,
.stat-card.admin-stat {
    border-radius: var(--radius-card);
}

.stat-card {
    display: grid;
    align-content: start;
    min-height: 19rem;
    padding: 1.25rem;
    border: 1px solid var(--paper-line);
    border-top: 4px solid var(--accent-green);
    background: var(--primary-bg);
    position: relative;
    overflow: hidden;
    transition: transform 260ms var(--ease-out), box-shadow 260ms ease, border-color 260ms ease, background 260ms ease;
}

.stat-card::after {
    content: "";
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.1rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(33, 56, 45, 0.48), rgba(33, 56, 45, 0.18), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 360ms var(--ease-out);
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(33, 56, 45, 0.34);
    background: #FFFFFF;
    box-shadow: 0 18px 44px rgba(42, 42, 42, 0.1);
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-value {
    display: block;
    margin-bottom: 1.4rem;
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 0.95;
    transition: color 220ms ease, transform 220ms var(--ease-out);
}

.stat-card:hover .stat-value {
    color: var(--text-main);
    transform: translateY(-2px);
}

.stat-card h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.42rem;
    line-height: 1.12;
}

.stat-card p {
    margin: 1rem 0 0;
    color: var(--ink-soft);
}

.experience-section {
    padding: 5rem 0;
}

.experience-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 1rem;
}

.feature-image,
.feature-panel {
    min-height: 22rem;
}

.feature-image {
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--paper-deep);
    box-shadow: 0 16px 44px rgba(42, 42, 42, 0.08);
}

.feature-image img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 900ms var(--ease-out), filter 500ms ease;
}

.feature-image:hover img {
    filter: saturate(1.04) contrast(1.03);
    transform: scale(1.06);
}

.feature-image-large {
    grid-column: auto;
}

.feature-panel {
    display: grid;
    align-content: center;
    padding: 1.35rem;
    border: 1px solid rgba(33, 56, 45, 0.55);
    background: var(--accent-green);
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    transition: transform 260ms var(--ease-out), box-shadow 260ms ease, border-color 260ms ease;
}

.feature-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-left: 3px solid transparent;
    pointer-events: none;
    transition: border-color 240ms ease;
}

.feature-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.36);
    box-shadow: 0 16px 38px rgba(42, 42, 42, 0.08);
}

.feature-panel:hover::before {
    border-left-color: rgba(255, 255, 255, 0.72);
}

.feature-panel.accent {
    border-color: rgba(33, 56, 45, 0.55);
    background: var(--accent-green);
    color: #FFFFFF;
}

.feature-number {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    font-weight: 700;
}

.feature-panel h3 {
    margin: 0.9rem 0 0;
    font-size: 2rem;
    line-height: 1.05;
}

.feature-panel p {
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.8);
}

.feature-panel.accent p {
    color: rgba(255, 255, 255, 0.8);
}

.feature-panel.accent .feature-number {
    color: rgba(255, 255, 255, 0.72);
}

.chat-report {
    display: grid;
    gap: 1.5rem;
    align-items: start;
    width: min(1500px, calc(100% - 48px));
    padding: 5rem 0;
}

.chat-editorial {
    display: grid;
    gap: 1rem;
    max-width: 780px;
}

.chat-editorial p {
    margin: 0;
    color: var(--ink-soft);
}

.chat-editorial .eyebrow {
    color: var(--accent-green);
}

.chat-proof {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--paper-line);
}

.chat-proof span {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.chat-proof strong {
    color: var(--accent-green);
    font-size: 1.05rem;
}

.report-workbench {
    display: grid;
    grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.35fr);
    gap: 1rem;
    align-items: stretch;
}

.workbench-tabs {
    display: none;
}

.report-reader,
.chat-shell {
    border-radius: var(--radius-card);
}

.report-reader {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 760px;
    max-height: calc(100svh - 6rem);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(42, 42, 42, 0.16);
    background: #FFFFFF;
    box-shadow: var(--shadow-soft);
    transition: transform 260ms var(--ease-out), box-shadow 260ms ease, border-color 260ms ease;
}

.report-reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--paper-line);
    background: #FFFFFF;
}

.report-reader-header div {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.report-reader-header span {
    color: var(--accent-green);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.report-reader-header strong {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 400;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#citation-status {
    flex: 0 0 auto;
    color: var(--ink-soft);
    text-align: right;
}

.report-reader-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}



.report-reader-body {
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: #EDEBE6;
}

.pdf-viewer {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--paper-line);
    background: #FFFFFF;
}

.pdf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pdf-tool-button {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid rgba(42, 42, 42, 0.16);
    border-radius: var(--radius-control);
    background: #FFFFFF;
    color: var(--accent-green);
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
}

.pdf-tool-button:hover {
    border-color: rgba(212, 175, 55, 0.7);
    background: rgba(212, 175, 55, 0.08);
}

.pdf-tool-button:disabled {
    cursor: default;
    opacity: 0.42;
}

.pdf-page-label {
    min-width: 5.8rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.pdf-stage {
    overflow: auto;
    padding: 1rem;
    background:
        linear-gradient(rgba(237, 235, 230, 0.92), rgba(237, 235, 230, 0.92)),
        repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(42, 42, 42, 0.035) 32px);
}

.pdf-page-shell {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 16px 44px rgba(42, 42, 42, 0.22);
    transition: box-shadow 260ms ease;
}

.pdf-page-canvas {
    display: block;
}

.report-pdf-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #FFFFFF;
}

.report-fallback {
    margin: 0;
    padding: 1rem;
    color: var(--ink-soft);
}

.chat-shell {
    order: -1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 760px;
    max-height: calc(100svh - 6rem);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(42, 42, 42, 0.16);
    background: var(--chat-bg);
    box-shadow: var(--shadow-soft);
    transition: transform 260ms var(--ease-out), box-shadow 260ms ease, border-color 260ms ease;
}

.report-reader:hover,
.chat-shell:hover {
    border-color: rgba(33, 56, 45, 0.28);
    box-shadow: 0 24px 76px rgba(42, 42, 42, 0.16);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--paper-line);
    background: #FFFFFF;
}

.chat-header div {
    display: grid;
    gap: 0.15rem;
}

.chat-header span {
    color: var(--accent-green);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.chat-header strong {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 400;
}

.live-dot {
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 0 5px rgba(33, 56, 45, 0.14);
    animation: livePulse 2.8s ease-in-out infinite;
}

.chat-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    background:
        linear-gradient(rgba(249, 248, 246, 0.88), rgba(249, 248, 246, 0.88)),
        repeating-linear-gradient(90deg, transparent 0, transparent 39px, rgba(42, 42, 42, 0.025) 40px);
}

.chat-intro {
    display: grid;
    gap: 1rem;
    margin: auto;
    width: min(100%, 34rem);
}

.chat-welcome {
    margin: 0;
    color: var(--accent-green);
    font-family: var(--font-display);
    font-size: 1.7rem;
    line-height: 1.1;
}

.chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.chip {
    min-height: 2.45rem;
    padding: 0.58rem 0.75rem;
    border: 1px solid rgba(33, 56, 45, 0.22);
    border-radius: var(--radius-control);
    background: #FFFFFF;
    color: var(--accent-green);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.chip:hover {
    border-color: var(--accent-green);
    background: rgba(33, 56, 45, 0.08);
    transform: translateY(-1px);
}

.msg {
    max-width: min(88%, 42rem);
    padding: 0.9rem 1rem;
    border-radius: var(--radius-card);
    animation: msgIn 260ms var(--ease-out);
}

.msg-user {
    align-self: flex-end;
    background: var(--chat-user);
    color: #FFFFFF;
}

.msg-assistant {
    align-self: flex-start;
    border: 1px solid rgba(42, 42, 42, 0.12);
    background: var(--chat-bot);
    color: var(--text-main);
}

.msg-label {
    margin-bottom: 0.32rem;
    opacity: 0.72;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.msg-body {
    font-size: 0.96rem;
    line-height: 1.62;
}

.msg-user .msg-body {
    white-space: pre-wrap;
}

.msg-assistant .msg-body {
    white-space: normal;
}

.msg-body p,
.msg-body ul,
.msg-body h3 {
    margin: 0;
}

.msg-body p + p,
.msg-body p + h3,
.msg-body ul + h3,
.msg-body h3 + p,
.msg-body h3 + ul {
    margin-top: 0.82rem;
}

.msg-body h3 {
    color: var(--accent-green);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.35;
}

.msg-body ul {
    padding-left: 1.1rem;
}

.msg-body li + li {
    margin-top: 0.35rem;
}

.msg-body strong {
    color: rgba(42, 42, 42, 0.92);
    font-weight: 800;
}

.msg-citations {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.8rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(42, 42, 42, 0.12);
}

.msg-citations-label {
    color: var(--accent-green);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.msg-cite {
    display: flex;
    gap: 0.35rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(42, 42, 42, 0.78);
    cursor: pointer;
    font-size: 0.74rem;
    line-height: 1.35;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.72);
    text-underline-offset: 0.18em;
}

.msg-cite strong,
.msg-ref {
    color: var(--accent-green);
    font-weight: 700;
}

.msg-ref {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.72);
    text-underline-offset: 0.18em;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator {
    align-self: flex-start;
    display: inline-flex;
    gap: 0.28rem;
    width: fit-content;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(42, 42, 42, 0.12);
    border-radius: var(--radius-card);
    background: var(--chat-bot);
}

.typing-indicator span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: var(--accent-green);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.14s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes typingBounce {
    0%,
    72%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    36% {
        transform: translateY(-0.32rem);
        opacity: 1;
    }
}

.reveal-item {
    opacity: 0;
    transform: translateY(0.9rem);
    transition:
        opacity 520ms var(--ease-out) var(--reveal-delay, 0ms),
        transform 520ms var(--ease-out) var(--reveal-delay, 0ms);
}

.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes luxeFadeUp {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes livePulse {
    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.16);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.06);
    }
}

.chat-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.9rem;
    gap: 0.65rem;
    padding: 0.85rem;
    border-top: 1px solid var(--paper-line);
    background: #FFFFFF;
}

.chat-composer textarea {
    width: 100%;
    max-height: 8rem;
    min-height: 2.9rem;
    resize: none;
    border: 1px solid rgba(42, 42, 42, 0.16);
    border-radius: var(--radius-control);
    padding: 0.76rem 0.85rem;
    background: #FFFFFF;
    color: var(--text-main);
}

.chat-composer textarea::placeholder {
    color: rgba(42, 42, 42, 0.54);
}

.composer-send {
    width: 2.9rem;
    height: 2.9rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--accent-green);
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(10, 77, 60, 0.18);
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.composer-send:hover {
    background: #17291F;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(10, 77, 60, 0.24);
}

.composer-send:disabled {
    cursor: progress;
    opacity: 0.58;
    transform: none;
}

.enquiries-section {
    padding: 4.5rem 0;
    border-top: 1px solid var(--paper-line);
    background:
        linear-gradient(180deg, rgba(33, 56, 45, 0.06), rgba(255, 255, 255, 0.72)),
        #FFFFFF;
}

.enquiries-inner {
    display: grid;
    grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.enquiries-heading {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.enquiries-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 3.25rem;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid rgba(33, 56, 45, 0.2);
    border-radius: var(--radius-card);
    background: var(--accent-green);
    color: #FFFFFF;
    box-shadow: 0 16px 34px rgba(33, 56, 45, 0.14);
}

.enquiries-heading .eyebrow {
    margin: 0 0 0.65rem;
}

.enquiries-heading h2 {
    margin: 0;
    color: var(--accent-green);
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 400;
    line-height: 1;
}

.enquiries-list {
    display: grid;
    gap: 0.9rem;
    padding-top: 0.25rem;
    color: var(--accent-green);
    font-size: 1.08rem;
}

.enquiries-list p {
    margin: 0;
}

.enquiries-list a {
    color: var(--accent-green);
    font-weight: 700;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) auto minmax(10rem, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--paper-line);
    background: #FFFFFF;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.footer-mark {
    display: inline-flex;
    align-items: center;
    width: min(15rem, 42vw);
    text-decoration: none;
}

.footer-mark img {
    width: 100%;
    height: auto;
}

.site-footer span {
    justify-self: center;
}

.site-footer a {
    color: var(--accent-green);
    font-weight: 700;
}

.site-footer > a:last-of-type {
    justify-self: end;
}

.footer-disclaimer {
    grid-column: 1 / -1;
    max-width: 1180px;
    margin: 0.35rem auto 0;
    color: rgba(42, 42, 42, 0.62);
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

/* Admin styles */
.admin-shell {
    background: var(--primary-bg);
}

.admin-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.48)),
        repeating-linear-gradient(90deg, transparent 0, transparent 47px, rgba(10, 77, 60, 0.025) 48px);
    pointer-events: none;
}

.ambient {
    display: none;
}

.admin-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 2rem 0;
}

.panel {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid var(--paper-line);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 54px rgba(42, 42, 42, 0.08);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.dashboard-header h1,
.admin-login h1 {
    margin: 0.6rem 0 0;
    font-size: 3.2rem;
    line-height: 1;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
}

.section-kicker::before {
    content: "";
    width: 1.4rem;
    height: 1px;
    background: rgba(10, 77, 60, 0.35);
}

.lede {
    max-width: 62ch;
    margin: 1rem 0 1.4rem;
    color: var(--ink-soft);
}

.ghost-button,
.primary-button {
    min-height: 2.75rem;
    border-radius: var(--radius-control);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.ghost-button {
    border: 1px solid rgba(10, 77, 60, 0.22);
    background: rgba(255, 255, 255, 0.74);
    padding: 0.65rem 0.9rem;
    color: var(--accent-green);
}

.primary-button {
    border: none;
    padding: 0.85rem 1.15rem;
    color: #FFFFFF;
    background: var(--accent-green);
}

.ghost-button:hover,
.primary-button:hover {
    transform: translateY(-1px);
}

.admin-login {
    max-width: 34rem;
    margin: 4rem auto 2rem;
}

.admin-form {
    display: grid;
    gap: 0.85rem;
}

.admin-form label {
    display: grid;
    gap: 0.45rem;
    color: var(--ink-soft);
    font-weight: 700;
}

.admin-form input {
    width: 100%;
    border: 1px solid rgba(42, 42, 42, 0.16);
    border-radius: var(--radius-control);
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
}

.form-status {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
    gap: 1rem;
}

.stats-grid .stat-card {
    min-height: 9rem;
    padding: 1rem;
}

.stats-grid .stat-card strong {
    display: block;
    margin-top: 0.5rem;
    color: var(--accent-green);
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 2.2vw, 2.3rem);
    font-weight: 400;
    line-height: 1;
    overflow-wrap: anywhere;
}

.stats-grid .stat-card small {
    display: block;
    margin-top: 0.75rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.35;
}

.admin-stat-link {
    color: inherit;
    text-decoration: none;
}

.admin-stat-link:hover {
    opacity: 1;
}

.admin-insight-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-insight-card {
    display: grid;
    gap: 0.7rem;
    min-height: 11rem;
    padding: 1rem;
    border: 1px solid var(--paper-line);
    border-top: 4px solid var(--accent-green);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.84);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 16px 38px rgba(42, 42, 42, 0.07);
    transition: transform 180ms var(--ease-out), border-color 180ms ease, background 180ms ease;
}

.admin-insight-card:hover,
.admin-insight-card.is-active {
    border-color: rgba(33, 56, 45, 0.38);
    background: #FFFFFF;
    opacity: 1;
    transform: translateY(-3px);
}

.admin-insight-card span {
    color: var(--accent-green);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-insight-card strong {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 400;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.admin-insight-card small {
    align-self: end;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

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

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-heading h2 {
    margin: 0.6rem 0 0;
    font-size: 2.3rem;
    line-height: 1;
}

.guardrail-note {
    max-width: 16rem;
    margin: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: var(--radius-control);
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-green);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: right;
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--paper-line);
    border-left: 1px solid var(--paper-line);
}

.signal-row {
    min-height: 10rem;
    padding: 1rem;
    border-right: 1px solid var(--paper-line);
    border-bottom: 1px solid var(--paper-line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(249, 248, 246, 0.52));
}

.signal-row span,
.question-signal {
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.signal-row strong {
    display: block;
    margin-top: 0.65rem;
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 2vw, 2.2rem);
    font-weight: 400;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.signal-row p {
    margin: 0.65rem 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.bar-list {
    display: grid;
    gap: 0.85rem;
}

.bar-row {
    display: grid;
    gap: 0.45rem;
}

.bar-row header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.bar-row small,
.empty-state {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.bar {
    height: 0.66rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(10, 77, 60, 0.09);
}

.bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
    transition: width 520ms var(--ease-out);
}

.activity-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: end;
}

.activity-day {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.activity-bar {
    position: relative;
    height: 8.5rem;
    overflow: hidden;
    border: 1px solid rgba(10, 77, 60, 0.1);
    border-radius: var(--radius-control);
    background: linear-gradient(180deg, rgba(10, 77, 60, 0.06), rgba(212, 175, 55, 0.08));
}

.activity-bar span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 4px;
    background: linear-gradient(180deg, var(--accent-gold), var(--accent-green));
    transition: height 520ms var(--ease-out);
}

.activity-day strong {
    color: var(--accent-green);
    font-size: 0.82rem;
}

.activity-day small {
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.table-shell {
    overflow: auto;
}

.insight-table {
    width: 100%;
    min-width: 62rem;
    border-collapse: collapse;
}

.insight-table th,
.insight-table td {
    padding: 0.9rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--paper-line);
}

.insight-table th {
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-control);
    font-size: 0.74rem;
    font-weight: 700;
}

.status-pill.ok {
    background: rgba(10, 77, 60, 0.1);
    color: var(--accent-green);
}

.status-pill.refusal {
    background: rgba(143, 38, 51, 0.1);
    color: var(--mg-red);
}

@media (max-width: 980px) {
    .site-header {
        align-items: center;
        padding-inline: 1.25rem;
    }

    .site-nav {
        gap: 0.9rem;
    }

    .hero-content h1 {
        font-size: 4.4rem;
    }

    .hero-subtitle {
        font-size: 1.75rem;
    }

    .report-workbench {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    }

    .stat-grid,
    .experience-grid,
    .enquiries-inner,
    .admin-insight-nav,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-image-large {
        grid-column: auto;
    }

    .report-reader,
    .chat-shell {
        max-height: none;
    }

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

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

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

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

    .hero-media img {
        transform: none;
    }

    .reveal-item {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 700px) {
    body {
        font-size: 15px;
    }

    .section-wrap,
    .admin-layout {
        width: calc(100% - 24px);
        max-width: 1180px;
    }

    .chat-report {
        width: 100%;
    }

    .site-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 64px;
        gap: 0.75rem 1rem;
        padding: 0.8rem 1rem;
    }

    .site-mark {
        min-width: 0;
    }

    .site-mark img {
        width: min(13.5rem, 72vw);
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        min-height: 2.45rem;
        padding: 0.55rem 0.75rem;
        border: 1px solid rgba(42, 42, 42, 0.14);
        border-radius: var(--radius-control);
        background: #FFFFFF;
        color: var(--accent-green);
        cursor: pointer;
        font-size: 0.82rem;
        font-weight: 800;
    }

    .nav-toggle svg {
        transition: transform 180ms ease;
    }

    .site-header.nav-open .nav-toggle svg {
        transform: rotate(180deg);
    }

    .site-nav {
        display: none;
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        border: 1px solid rgba(42, 42, 42, 0.12);
        border-radius: var(--radius-card);
        background: #FFFFFF;
        box-shadow: 0 14px 34px rgba(42, 42, 42, 0.1);
        font-size: 0.84rem;
    }

    .site-header.nav-open .site-nav {
        display: grid;
    }

    .site-nav a {
        min-width: 0;
        padding: 0.82rem 0.9rem;
        border-bottom: 1px solid rgba(42, 42, 42, 0.08);
        text-align: left;
        white-space: normal;
    }

    .site-nav a:last-child {
        border-bottom: 0;
    }

    .site-nav a::after {
        display: none;
    }

    .hero-editorial {
        min-height: 82svh;
        align-items: end;
    }

    .hero-scrim {
        background:
            linear-gradient(180deg, rgba(6, 24, 19, 0.18) 0%, rgba(6, 24, 19, 0.78) 62%, rgba(6, 24, 19, 0.86) 100%);
    }

    .hero-content {
        width: calc(100% - 24px);
        max-width: 760px;
        margin-inline: auto;
        padding: 4rem 0 5rem;
    }

    .hero-content h1 {
        font-size: clamp(2.7rem, 14vw, 3.35rem);
        line-height: 1;
        max-width: 11ch;
    }

    .hero-subtitle {
        font-size: 1.32rem;
        max-width: 18rem;
    }

    .editorial-intro,
    .experience-section,
    .chat-report {
        padding: 3.25rem 0;
    }

    .chat-editorial {
        width: calc(100% - 24px);
        margin-inline: auto;
    }

    .stat-band,
    .methodology-section {
        padding: 3.25rem 0;
    }

    .methodology-section p:last-child {
        font-size: clamp(1.65rem, 8vw, 2rem);
    }

    .section-heading h2,
    .chat-editorial h2 {
        font-size: clamp(2rem, 10vw, 2.25rem);
        max-width: calc(100vw - 24px);
        overflow-wrap: break-word;
    }

    .stat-grid,
    .experience-grid,
    .admin-insight-nav,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 0;
    }

    .stat-value {
        font-size: 3rem;
    }

    .feature-image-large {
        grid-column: span 1;
    }

    .feature-image,
    .feature-panel {
        min-height: 18rem;
    }

    .workbench-tabs {
        position: sticky;
        top: 64px;
        z-index: 12;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        width: calc(100% - 24px);
        margin: 0 auto -0.15rem;
        padding: 0.45rem;
        border: 1px solid rgba(42, 42, 42, 0.12);
        border-radius: var(--radius-card);
        background: rgba(249, 248, 246, 0.92);
        backdrop-filter: blur(16px);
    }

    .workbench-tab {
        min-height: 2.45rem;
        border: 0;
        border-radius: var(--radius-control);
        background: transparent;
        color: var(--ink-soft);
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 800;
    }

    .workbench-tab.is-active {
        background: var(--accent-green);
        color: #FFFFFF;
        box-shadow: 0 10px 22px rgba(10, 77, 60, 0.14);
    }

    .report-workbench {
        display: flex;
        gap: 0.8rem;
        width: 100%;
        margin-top: 0.25rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 12px 0.35rem;
        scroll-padding-inline: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .report-workbench::-webkit-scrollbar {
        display: none;
    }

    .report-reader,
    .chat-shell {
        flex: 0 0 calc(100vw - 24px);
        width: calc(100vw - 24px);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .chat-shell {
        height: min(680px, calc(100svh - 9.6rem));
        min-height: 500px;
    }

    .report-reader {
        height: min(620px, calc(100svh - 9.6rem));
        min-height: 480px;
    }

    .report-reader-header,
    .chat-header {
        padding: 0.82rem 0.9rem;
    }

    .report-reader-header {
        align-items: flex-start;
    }

    #citation-status {
        display: none;
    }

    .pdf-toolbar {
        align-items: stretch;
        gap: 0.45rem;
        overflow-x: auto;
        padding: 0.5rem;
    }

    .pdf-toolbar-group {
        flex: 0 0 auto;
    }

    .pdf-stage {
        padding: 0.65rem;
    }

    .msg {
        max-width: 96%;
        padding: 0.82rem 0.88rem;
    }

    .chat-body {
        padding: 0.85rem;
    }

    .chat-composer {
        padding: 0.72rem;
    }

    .site-footer {
        grid-template-columns: 1fr;
        justify-items: start;
        padding-inline: 1rem;
    }

    .site-footer span,
    .site-footer > a:last-of-type,
    .footer-disclaimer {
        justify-self: start;
        text-align: left;
    }

    .footer-mark {
        width: min(13.5rem, 72vw);
    }

    .enquiries-inner {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .enquiries-section {
        padding: 3.25rem 0;
    }

    .enquiries-heading h2 {
        font-size: clamp(2rem, 10vw, 2.25rem);
    }

    .enquiries-list {
        font-size: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .panel-heading {
        flex-direction: column;
    }

    .guardrail-note {
        max-width: none;
        text-align: left;
    }

    .intro-copy p {
        text-align: justify;
    }

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

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

    .dashboard-header h1,
    .admin-login h1 {
        font-size: 2.35rem;
    }
}
