:root {
    --ink: #172725;
    --muted: #6c7974;
    --paper: #f5f5ef;
    --paper-deep: #e6e9df;
    --line: #d5d9cf;
    --green: #102f2d;
    --green-mid: #28564d;
    --green-soft: #dce9df;
    --orange: #e37a3b;
    --orange-soft: #f5dfcb;
    --blue-soft: #dce7ea;
    --white: #fff;
    --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
    --sans: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 4px;
}

button { font: inherit; }

.skip-link {
    position: absolute;
    z-index: 20;
    top: -4rem;
    left: 1rem;
    padding: 0.65rem 0.9rem;
    color: var(--white);
    background: var(--green);
}

.skip-link:focus { top: 1rem; }

.shell {
    width: min(1180px, calc(100% - 3rem));
    margin-inline: auto;
}

.topbar {
    border-bottom: 1px solid var(--line);
}

.topbar-inner,
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-inner { min-height: 86px; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--paper);
    background: var(--green);
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 1.3rem;
}

.brand strong,
.brand small { display: block; }

.brand strong {
    font-family: var(--serif);
    font-size: 1.15rem;
    letter-spacing: 0.05em;
}

.brand small {
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    line-height: 1.4;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.topnav a { text-decoration: none; }

.topnav a:hover,
.text-link:hover,
.recent-item:hover,
.module-card:hover .module-link,
.logout-button:hover { color: var(--orange); }

.nav-cta {
    padding: 0.55rem 0.8rem;
    color: var(--green);
    border: 1px solid var(--green);
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: center;
    gap: 5rem;
    min-height: 610px;
    padding-block: 5rem;
}

.eyebrow {
    margin: 0 0 1rem;
    color: var(--orange);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: -0.035em;
}

h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(2.9rem, 6vw, 5.5rem);
    line-height: 1.12;
}

h1 em,
h2 em { color: var(--green-mid); font-style: normal; }

.hero-lede {
    max-width: 590px;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    min-height: 46px;
    padding: 0.65rem 1.1rem;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    color: var(--paper);
    background: var(--green);
}

.button-primary:hover { background: var(--green-mid); }

.button-quiet {
    color: var(--green);
    border-color: var(--line);
}

.button-quiet:hover { border-color: var(--green); }

.button-full { width: 100%; }

.hero-diagram {
    position: relative;
    min-height: 355px;
    padding: 2rem;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 50% 50% 48% 42%;
    transform: rotate(-4deg);
}

.hero-diagram::before {
    position: absolute;
    inset: 1rem;
    border: 1px dashed var(--green-mid);
    border-radius: 50% 50% 48% 42%;
    content: "";
}

.diagram-label,
.diagram-path,
.hero-diagram p { position: relative; z-index: 1; }

.diagram-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.4;
}

.diagram-path {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.7rem;
    max-width: 245px;
    margin: 3.1rem auto 2rem;
}

.diagram-node {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    font-family: var(--serif);
    background: var(--paper);
    border: 1px solid var(--green);
    border-radius: 50%;
}

.node-one { grid-column: 1; }
.node-two { grid-column: 3; }
.node-three { grid-column: 1; }
.node-four { grid-column: 3; }

.diagram-path i {
    display: block;
    width: 45px;
    height: 1px;
    background: var(--green-mid);
}

.hero-diagram p {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.45;
    text-align: center;
}

.module-section,
.recent-section { padding-block: 5rem; }

.module-section {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 4rem;
    border-top: 1px solid var(--line);
}

.section-intro h2,
.section-heading-row h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.2; }

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

.module-card {
    display: flex;
    min-height: 275px;
    flex-direction: column;
    padding: 1.45rem;
    background: var(--green-soft);
    border-top: 3px solid var(--green);
    text-decoration: none;
    transition: transform 160ms ease;
}

.module-card:hover { transform: translateY(-4px); }

.module-knowledge { background: var(--blue-soft); border-top-color: #658895; }
.module-map { background: #e6e5dc; border-top-color: #777a5d; }
.module-journal { background: var(--orange-soft); border-top-color: var(--orange); }

.module-index,
.module-link {
    color: var(--muted);
    font-size: 0.72rem;
}

.module-icon {
    margin-top: 1.5rem;
    color: var(--green);
    font-family: var(--serif);
    font-size: 2.2rem;
    line-height: 1;
}

.module-card h3 {
    margin: 1rem 0 0.55rem;
    font-size: 1.55rem;
    line-height: 1.25;
}

.module-card p {
    max-width: 300px;
    margin-bottom: 1rem;
    color: #596962;
    font-size: 0.9rem;
}

.module-link { margin-top: auto; color: var(--green); font-weight: 700; }

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.8rem;
}

.section-heading-row h2 { margin-bottom: 0; }

.text-link {
    color: var(--green);
    font-weight: 700;
    text-underline-offset: 0.3rem;
}

.recent-list { border-top: 1px solid var(--line); }

.recent-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.recent-marker {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.recent-marker.green,
.row-status.green { background: var(--green); }
.recent-marker.blue,
.row-status.blue { background: #658895; }
.recent-marker.orange,
.row-status.orange { background: var(--orange); }

.recent-main { display: grid; gap: 0.12rem; }
.recent-meta,
.recent-status { color: var(--muted); font-size: 0.72rem; }
.recent-main strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.recent-main > span:last-child { color: var(--muted); font-size: 0.86rem; }

.landing-note {
    padding-block: 5rem 7rem;
    border-top: 1px solid var(--line);
}

.landing-note h2 {
    margin-bottom: 0;
    font-size: clamp(2.2rem, 5vw, 4.3rem);
    line-height: 1.18;
}

.footer {
    min-height: 78px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
}

/* Authentication */
.auth-page { min-height: 100vh; background: var(--green); }

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
    min-height: 100vh;
}

.auth-intro {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem clamp(2rem, 7vw, 7rem);
    color: var(--paper);
}

.auth-intro .brand-mark { color: var(--green); background: var(--paper); }
.auth-intro .brand strong { color: var(--paper); }
.auth-intro .brand small { color: #a9c2b5; }
.auth-intro h1 { margin-bottom: 1.4rem; color: var(--paper); }
.auth-intro h1 em { color: #a9c2b5; }
.auth-intro > div p:last-child { max-width: 450px; color: #b9cec3; }
.auth-back { color: #d5e5dc; }

.auth-panel {
    display: grid;
    min-height: 100vh;
    padding: 2rem;
    place-items: center;
    background: var(--paper);
}

.auth-card { width: min(100%, 390px); }
.auth-card h2 { margin-bottom: 2rem; font-size: 2.2rem; }
.field-group { display: grid; gap: 0.45rem; margin-bottom: 1.2rem; }
.field-group label { color: var(--muted); font-size: 0.85rem; }
.field-group input { width: 100%; padding: 0.8rem 0.9rem; color: var(--ink); background: var(--white); border: 1px solid var(--line); font: inherit; }
.field-group input:focus { border-color: var(--green); outline: 0; box-shadow: 0 0 0 3px var(--green-soft); }
.form-error { padding: 0.75rem 0.9rem; color: #8c3b22; background: var(--orange-soft); font-size: 0.85rem; }
.auth-footnote { margin-top: 1.25rem; color: var(--muted); font-size: 0.75rem; }

/* Protected workbench */
.app-page { background: var(--paper); }
.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar { display: flex; min-height: 100vh; flex-direction: column; padding: 2rem 1.35rem 1.35rem; color: var(--paper); background: var(--green); }
.sidebar-brand .brand-mark { color: var(--green); background: var(--paper); }
.sidebar-brand strong { color: var(--paper); }
.sidebar-brand small { color: #a9c2b5; }
.sidebar-rule { height: 1px; margin: 2rem 0 1.6rem; background: rgb(223 235 226 / 24%); }
.sidebar-label,
.tip-kicker { color: #9db7aa; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; }
.sidebar-label { margin-bottom: 0.7rem; }
.side-nav { display: grid; gap: 0.35rem; }
.side-link { display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.75rem; color: #b7ccc1; text-decoration: none; }
.side-link:hover,
.side-link.active { color: var(--paper); background: rgb(223 235 226 / 12%); }
.side-symbol { width: 1.3rem; color: #91ad9f; font-family: var(--serif); font-size: 1.15rem; text-align: center; }
.sidebar-bottom { margin-top: auto; }
.sidebar-tip { margin: 2rem 0 1.5rem; padding: 1rem; background: rgb(223 235 226 / 10%); border-left: 2px solid var(--orange); }
.sidebar-tip strong { display: block; margin-top: 0.5rem; color: var(--paper); font-family: var(--serif); font-size: 1.05rem; font-weight: 500; line-height: 1.45; }
.logout-button { padding: 0.5rem 0; color: #b7ccc1; background: transparent; border: 0; cursor: pointer; font-size: 0.8rem; }
.app-main { width: min(100%, 1120px); padding: 2.75rem clamp(1.5rem, 5vw, 5rem) 5rem; }
.app-header { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.3rem; }
.breadcrumb { margin-bottom: 0.5rem; color: var(--muted); font-size: 0.75rem; }
.breadcrumb span { padding-inline: 0.4rem; color: var(--orange); }
.app-header h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.8rem); }
.app-status { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.75rem; }
.app-status span { width: 7px; height: 7px; background: #69a678; border-radius: 50%; }
.welcome-banner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.1rem 2.3rem; color: var(--paper); background: var(--green); }
.welcome-banner h2 { margin-bottom: 0.8rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.2; }
.welcome-banner h2 em { color: #a9c2b5; }
.welcome-banner p:last-child { max-width: 500px; margin-bottom: 0; color: #c2d4ca; font-size: 0.9rem; }
.banner-mark { display: grid; min-width: 80px; height: 80px; place-content: center; color: var(--green); background: var(--orange); border-radius: 50%; font-family: var(--serif); font-size: 1.45rem; line-height: 1; text-align: center; transform: rotate(8deg); }
.banner-mark small { font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.15em; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-block: 1.5rem 3.5rem; background: var(--line); border: 1px solid var(--line); }
.metric-card { display: grid; gap: 0.05rem; padding: 1.25rem 1.4rem; background: var(--paper); }
.metric-card strong { font-family: var(--serif); font-size: 2.25rem; font-weight: 500; line-height: 1.2; }
.metric-card span { color: var(--green); font-size: 0.85rem; }
.metric-card small { color: var(--muted); font-size: 0.7rem; }
.dashboard-section { padding-top: 0.2rem; }
.workbench-list { border-top: 1px solid var(--line); }
.workbench-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 1.1rem; align-items: start; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.workbench-row h3 { margin: 0.25rem 0; font-size: 1.2rem; }
.workbench-row p:last-child { margin-bottom: 0; color: var(--muted); font-size: 0.86rem; }
.row-meta { margin-bottom: 0; color: var(--muted); font-size: 0.72rem; }
.row-status { padding: 0.2rem 0.5rem; color: var(--paper); font-size: 0.68rem; }
.view-intro { display: flex; justify-content: space-between; gap: 3rem; margin-bottom: 3.5rem; }
.view-intro h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.9rem); line-height: 1.15; }
.view-intro > p { max-width: 350px; margin: 2rem 0 0; color: var(--muted); font-size: 0.92rem; }
.research-flow { display: flex; align-items: stretch; gap: 0.65rem; margin-bottom: 4rem; }
.flow-card { flex: 1; padding: 1.35rem; background: var(--green-soft); border-top: 3px solid var(--green); }
.flow-card:nth-of-type(2) { background: var(--blue-soft); border-top-color: #658895; }
.flow-card:nth-of-type(3) { background: var(--orange-soft); border-top-color: var(--orange); }
.flow-number { color: var(--orange); font-size: 0.75rem; font-weight: 700; }
.flow-card h3 { margin: 2.2rem 0 0.6rem; font-size: 1.5rem; }
.flow-card p { min-height: 5.5rem; margin-bottom: 1.5rem; color: #52635b; font-size: 0.87rem; }
.evidence-label { color: var(--muted); font-size: 0.7rem; }
.flow-arrow { align-self: center; color: var(--orange); font-size: 1.5rem; }
.quiet-count { color: var(--muted); font-size: 0.75rem; }
.question-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.question-card { padding: 1.2rem; border: 1px solid var(--line); }
.question-card span { color: var(--orange); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; }
.question-card strong { display: block; margin: 1.5rem 0 0.7rem; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; line-height: 1.4; }
.question-card p { margin-bottom: 0; color: var(--muted); font-size: 0.82rem; }
.connection-board { border-top: 1px solid var(--line); }
.board-head,
.connection-row { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr 1.5fr; gap: 1rem; align-items: center; }
.board-head { padding: 0.7rem 0; color: var(--muted); font-size: 0.65rem; letter-spacing: 0.15em; }
.connection-row { padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.connection-row strong { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; }
.connection-row > span:last-child { color: var(--muted); font-size: 0.78rem; }
.relation { color: var(--orange); font-size: 0.76rem; }
.relation i { font-style: normal; }
.knowledge-note { margin-top: 2rem; padding: 1.2rem 1.4rem; background: var(--green); color: var(--paper); }
.knowledge-note .eyebrow { color: #f2a26d; }
.knowledge-note p { max-width: 650px; margin-bottom: 0; color: #c5d7cc; font-family: var(--serif); font-size: 1.1rem; }
.mindmap-board { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; min-height: 500px; padding: 2rem; background: #e8e8df; border: 1px solid var(--line); }
.mindmap-board::before,
.mindmap-board::after { position: absolute; top: 50%; left: 50%; background: var(--green-mid); content: ""; transform: translate(-50%, -50%); }
.mindmap-board::before { width: 45%; height: 1px; }
.mindmap-board::after { width: 1px; height: 45%; }
.mindmap-center,
.map-branch { position: relative; z-index: 1; }
.mindmap-center { display: grid; width: 190px; height: 190px; place-content: center; justify-self: center; align-self: center; padding: 1rem; color: var(--paper); background: var(--green); border-radius: 50%; text-align: center; }
.mindmap-center span { color: #a9c2b5; font-size: 0.67rem; letter-spacing: 0.16em; }
.mindmap-center strong { margin-top: 0.65rem; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; line-height: 1.4; }
.map-branch { display: flex; max-width: 235px; flex-direction: column; padding: 1rem; background: var(--paper); border-left: 3px solid var(--orange); }
.branch-a { align-self: start; }
.branch-b { justify-self: end; align-self: start; border-left-color: #658895; }
.branch-c { align-self: end; border-left-color: #777a5d; }
.branch-d { justify-self: end; align-self: end; border-left-color: var(--green); }
.map-kicker { color: var(--muted); font-size: 0.65rem; letter-spacing: 0.12em; }
.map-branch strong { margin: 1rem 0 0.35rem; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.map-branch small { color: var(--muted); font-size: 0.75rem; }
.decision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 4rem; }
.decision-card { min-height: 235px; padding: 1.35rem; background: var(--green-soft); border-top: 3px solid var(--green); }
.decision-card:nth-child(2) { background: var(--orange-soft); border-top-color: var(--orange); }
.decision-card:nth-child(3) { background: var(--blue-soft); border-top-color: #658895; }
.decision-number { color: var(--orange); font-size: 0.75rem; font-weight: 800; }
.decision-status { float: right; color: var(--muted); font-size: 0.7rem; }
.decision-card h3 { margin: 3.5rem 0 0.7rem; font-size: 1.4rem; line-height: 1.35; }
.decision-card p { margin-bottom: 0; color: var(--muted); font-size: 0.84rem; }
.submission-note { display: flex; justify-content: space-between; gap: 3rem; padding: 1.8rem 0; border-top: 1px solid var(--line); }
.submission-note h2 { margin: 0; font-size: 2.1rem; line-height: 1.3; }
.submission-note > p { max-width: 330px; margin: 2rem 0 0; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 900px) {
    .landing-hero { grid-template-columns: 1fr; gap: 2.5rem; padding-block: 4rem; }
    .hero-diagram { width: min(100%, 390px); justify-self: center; }
    .module-section { grid-template-columns: 1fr; gap: 2.2rem; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-intro { min-height: 430px; }
    .auth-panel { min-height: 55vh; }
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar { min-height: auto; padding: 1rem 1.25rem; }
    .sidebar-rule, .sidebar-label, .sidebar-bottom { display: none; }
    .side-nav { grid-template-columns: repeat(5, 1fr); margin-top: 1rem; }
    .side-link { justify-content: center; padding: 0.5rem; font-size: 0.78rem; }
    .side-link span:last-child { display: none; }
    .app-main { width: 100%; }
}

@media (max-width: 650px) {
    .shell { width: min(100% - 2rem, 1180px); }
    .topbar-inner { min-height: 72px; }
    .topnav { gap: 0.8rem; font-size: 0.75rem; }
    .topnav a:nth-child(-n+2) { display: none; }
    .brand small { display: none; }
    .hero-diagram { min-height: 310px; }
    .module-grid,
    .question-grid,
    .decision-grid,
    .metrics-grid { grid-template-columns: 1fr; }
    .section-heading-row,
    .view-intro,
    .submission-note { display: block; }
    .section-heading-row .text-link { display: inline-block; margin-top: 1rem; }
    .view-intro > p,
    .submission-note > p { margin-top: 1.2rem; }
    .recent-item { grid-template-columns: 10px minmax(0, 1fr); }
    .recent-status { grid-column: 2; }
    .welcome-banner { align-items: flex-start; padding: 1.5rem; }
    .banner-mark { min-width: 62px; height: 62px; font-size: 1rem; }
    .research-flow { display: grid; }
    .flow-arrow { display: none; }
    .flow-card p { min-height: 0; }
    .board-head { display: none; }
    .connection-row { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .connection-row > span:last-child { grid-column: 1 / -1; }
    .mindmap-board { min-height: 620px; grid-template-columns: 1fr; padding: 1rem; }
    .mindmap-board::before { width: 1px; height: 60%; }
    .mindmap-board::after { display: none; }
    .mindmap-center { grid-row: 2; width: 150px; height: 150px; }
    .branch-a { grid-row: 1; justify-self: start; }
    .branch-b { grid-row: 1; justify-self: end; }
    .branch-c { grid-row: 3; justify-self: start; }
    .branch-d { grid-row: 3; justify-self: end; }
    .map-branch { max-width: 160px; }
    .map-branch strong { font-size: 1rem; }
    .app-header { align-items: flex-start; display: block; }
    .app-status { margin-top: 1rem; }
    .side-nav { gap: 0.15rem; }
    .auth-intro { min-height: 360px; padding: 1.5rem; }
    .auth-panel { padding: 2rem 1.25rem; }
}

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

