/* CVLE 372 — Fundamentals of Reinforced Concrete · Interactive Laboratory
   Shared stylesheet. Design language follows the CVLE 381 lab (green workspace). */
:root {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #243c32;
    background: #f6f7f2;
    --accent: #28654f;
    --accent-dark: #1d4c3a;
    --border: #dce4db;
    --ink-soft: #6d7c6f;
    --steel: #62949c;
    --orange: #be9167;
}

* {
    box-sizing: border-box
}

body {
    margin: 0
}

[hidden] {
    display: none !important
}

/* ---------------------------------------------------------------- header */
header {
    height: 78px;
    padding: 18px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfefb;
    border-bottom: 1px solid var(--border);
    gap: 12px
}

.brand {
    text-decoration: none;
    color: #243c32;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 1.5px
}

.brand-icon {
    display: grid;
    place-items: center;
    background: #285c47;
    color: #fff;
    border-radius: 9px;
    width: 35px;
    height: 35px;
    font-family: Georgia, serif;
    font-size: 22px
}

.brand-name {
    font-weight: 800;
    font-size: 14px
}

.brand small {
    border-left: 1px solid #ced7ce;
    padding-left: 14px;
    color: #879389;
    font-size: 11px
}

.header-note {
    font-size: 12px;
    color: #6a7d70
}

.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #65a078;
    border-radius: 50%;
    margin: 0 6px
}

/* ------------------------------------------------------------ module tabs */
.module-tabs {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    gap: 6px;
    padding: 10px 4%;
    background: #fdfefb;
    border-bottom: 1px solid var(--border);
    overflow: auto
}

.module-tabs a {
    white-space: nowrap;
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #65756a;
    font-size: 13px;
    font-weight: 600
}

.module-tabs a:hover {
    background: #eef3ea
}

.module-tabs a.active {
    background: #e3ecdf;
    color: #295c44
}

/* ---------------------------------------------------------------- layout */
.layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    max-width: 1600px;
    margin: auto
}

/* Views without a module sidebar (the overview): main must span the layout,
   not fall into the 240px sidebar column. modules.js toggles the class. */
.layout.no-sidebar {
    grid-template-columns: minmax(0, 1fr)
}

.layout.no-sidebar main {
    grid-column: 1
}

aside {
    padding: 34px 23px;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 55px;
    height: calc(100vh - 133px);
    overflow-y: auto;
    scrollbar-width: thin
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 1.8px;
    color: #718476;
    margin: 0 0 3px;
    font-weight: 700
}

.home-link {
    display: block;
    padding: 14px 8px;
    color: #45644f;
    text-decoration: none;
    font-size: 13px
}

.aside-label {
    margin-top: 38px
}

.module-name {
    font-weight: 700;
    font-size: 18px;
    margin: 16px 0;
    color: #243c32
}

.module-name span {
    font-size: 10px;
    font-weight: 400;
    background: #e5ebe0;
    padding: 4px 7px;
    border-radius: 4px;
    margin-left: 10px;
    color: #45644f
}

aside nav a {
    display: flex;
    gap: 10px;
    padding: 13px 10px;
    font-size: 12px;
    color: #65756a;
    text-decoration: none;
    border-radius: 7px;
    margin: 3px 0
}

aside nav a b {
    font-size: 10px;
    opacity: .6
}

aside nav a:hover,
aside nav a.active,
.home-link.active {
    background: #e3ecdf;
    color: #295c44
}

aside nav a.active {
    font-weight: 700
}

.aside-bottom {
    margin-top: 64px;
    font-size: 11px;
    color: #567660
}

.aside-bottom p {
    color: #8a958b;
    margin-left: 18px
}

main {
    width: 100%;
    max-width: 1400px;
    padding: 38px 46px 60px;
    grid-column: 2
}

/* ------------------------------------------------------------------ hero */
.hero {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    align-items: center;
    gap: 25px;
    padding: 24px 0 43px;
    border-bottom: 1px solid var(--border)
}

.pill {
    font-size: 10px;
    letter-spacing: 1.6px;
    color: #4f7159;
    background: #e8eee1;
    padding: 7px 10px;
    border-radius: 4px
}

h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: clamp(36px, 4.2vw, 62px);
    line-height: 1.08;
    letter-spacing: -2px;
    margin: 24px 0 18px;
    color: #243c32
}

.view>h1 {
    font-size: 43px
}

h1 em {
    color: #48765b;
    font-weight: 400
}

h2 {
    font-size: 19px;
    margin: 0 0 10px
}

h3 {
    margin-bottom: 8px
}

p {
    line-height: 1.65
}

.intro {
    font-size: 15px;
    line-height: 1.8;
    max-width: 590px;
    margin-bottom: 25px;
    color: #738074
}

.button {
    display: inline-flex;
    gap: 35px;
    padding: 13px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: #243c32
}

.button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff
}

.button.primary:hover {
    background: var(--accent-dark)
}

.hero-art {
    background: #eaf0e3;
    border-radius: 50% 50% 12px 12px;
    padding: 16px
}

.hero-art svg {
    max-height: 310px
}

/* ------------------------------------------------------- overview cards */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 28px 0 20px
}

.section-heading h2 {
    font-size: 19px;
    margin: 0
}

.section-heading span {
    font-size: 11px;
    color: #879184
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px
}

.lab-card {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 23px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: transform .18s, box-shadow .18s
}

.lab-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px #183b3010
}

.lab-number {
    font-size: 9px;
    letter-spacing: 1.4px;
    color: #8a9386
}

.card-symbol {
    height: 67px;
    display: flex;
    align-items: center;
    font-size: 31px;
    letter-spacing: 5px;
    color: #6c8761
}

.card-symbol.blue {
    color: #62949c
}

.card-symbol.orange {
    color: #be9167
}

.card-symbol svg {
    width: 96px;
    height: 58px;
    display: block
}

.lab-card h3 {
    font-size: 16px;
    margin: 6px 0 10px
}

.lab-card h3 span {
    float: right;
    color: #94a390
}

.lab-card p {
    font-size: 12px;
    color: #7c877b;
    line-height: 1.8;
    min-height: 65px
}

.tag {
    display: inline-block;
    font-size: 9px;
    background: #f1f4ed;
    border-radius: 4px;
    padding: 6px 8px;
    color: #687962
}

/* --------------------------------------------------------------- panels */
.panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 22px
}

.workspace {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    gap: 20px
}

.controls {
    border-right: 1px solid var(--border);
    padding-right: 16px
}

.controls h2 {
    font-size: 17px
}

/* Compact control column — smaller inputs leave more room for the drawings */
.controls label {
    margin: 10px 0 5px;
    font-size: 11.5px
}

.controls input,
.controls select {
    padding: 8px 9px;
    font-size: 13px
}

.controls input[type=range] {
    margin: 6px 0
}

.controls .hint {
    padding: 10px;
    font-size: 11.5px
}

.controls .small {
    font-size: 11px
}

.controls .preset {
    padding: 6px 9px
}

label {
    display: block;
    font-size: 12px;
    color: #63715f;
    font-weight: 600;
    margin: 14px 0 8px
}

input,
select {
    font: inherit;
    width: 100%;
    padding: 11px;
    border: 1px solid #c9d3c7;
    border-radius: 7px;
    color: #304b3b;
    background: #fafcf8
}

input[type=range] {
    padding: 0;
    accent-color: var(--accent);
    margin: 12px 0
}

output {
    float: right;
    color: #285c47;
    font-weight: 600
}

button {
    font: inherit;
    font-size: 12px;
    border: 1px solid #c9d3c7;
    background: #fff;
    color: #243c32;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer
}

button:hover {
    background: #e6f4ea
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid #e2a832;
    outline-offset: 3px
}

.visual {
    min-width: 0
}

.visual-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 9px;
    letter-spacing: 1px;
    color: #768371;
    margin: 7px 0 15px
}

.visual svg {
    max-height: none;
    display: block;
    width: 100%
}

.legend {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 10px;
    color: #85917e
}

/* ------------------------------------------------------- readouts, notes */
.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px
}

.metrics.m4 {
    grid-template-columns: repeat(4, minmax(0, 1fr))
}

.metrics span {
    display: block;
    font-size: 10px;
    color: #7e8b78
}

.metrics strong {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #32573e;
    margin-top: 8px
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px
}

.card {
    padding: 18px;
    border-radius: 12px;
    background: #edf7f0
}

.card strong {
    display: block;
    font-size: 24px;
    color: #08766f;
    margin-top: 8px
}

.card span {
    font-size: 13px
}

.hint {
    background: #edf3e8;
    border-left: 3px solid #82a175;
    border-radius: 3px;
    padding: 13px;
    font-size: 12px;
    color: #57704f
}

.warn {
    padding: 14px;
    background: #fff2df;
    border-left: 4px solid #d88713;
    font-size: 12px
}

.steps {
    background: #f6f8f4;
    padding: 18px;
    border-radius: 12px;
    margin-top: 18px;
    font-size: 13px
}

.steps p {
    margin: 8px 0
}

.steps b {
    color: #285c47
}

.small {
    font-size: 12px;
    color: #84907d;
    line-height: 1.7
}

.pass {
    color: #397349
}

.fail {
    color: #b26730
}

.green {
    color: #28654f
}

.blue {
    color: #62949c
}

.orange {
    color: #be9167
}

/* ------------------------------------------------------------ equations */
.eq {
    background: #f4f7f1;
    border: 1px solid #e3e9dd;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    color: #2f4c3b;
    margin: 12px 0;
    line-height: 1.9
}

.eq em {
    color: #44705a
}

.eq .eq-note {
    display: block;
    font-size: 11px;
    color: #7d8b7b;
    font-family: "Segoe UI", Arial, sans-serif;
    margin-top: 4px
}

/* --------------------------------------------------------------- tables */
.table-wrap {
    overflow: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    min-width: 430px
}

th,
td {
    text-align: left;
    padding: 10px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px
}

th {
    color: #506579;
    font-weight: 600
}

td.num,
th.num {
    text-align: right;
    font-variant-numeric: tabular-nums
}

tr.governing td {
    background: #eaf3e4;
    font-weight: 700
}

/* ------------------------------------------------------------ presets */
.presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0
}

.preset {
    font-size: 11px;
    padding: 7px 10px;
    border-radius: 20px;
    border: 1px solid #c9d3c7;
    background: #fff;
    cursor: pointer
}

.preset:hover {
    background: #e6f4ea
}

.preset.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff
}

/* ----------------------------------------------------------- check rows */
.check-row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 9px 2px;
    border-bottom: 1px solid var(--border);
    font-size: 13px
}

.check-row:last-child {
    border-bottom: 0
}

.check-row>span:first-child {
    font-weight: 700;
    width: 16px
}

/* --------------------------------------------------------------- footer */
footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 22px 4%;
    font-size: 11px;
    color: #587080;
    background: #fdfefb
}

footer span::before {
    content: "\00b7";
    margin: 0 8px 0 4px
}

/* ---------------------------------------------------------- responsive */
@media(max-width:1100px) {
    .layout {
        grid-template-columns: 200px minmax(0, 1fr)
    }

    main {
        padding: 30px 25px
    }

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

    .workspace {
        grid-template-columns: 1fr
    }

    .controls {
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 0 0 14px
    }

    .hero-art {
        padding: 3px
    }
}

@media(max-width:700px) {
    header {
        height: auto;
        padding: 15px 18px
    }

    .brand small,
    .header-note {
        display: none
    }

    .layout {
        display: block
    }

    aside {
        position: static;
        height: auto;
        padding: 15px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--border)
    }

    .aside-label,
    .aside-bottom {
        margin-top: 12px
    }

    main {
        padding: 20px 18px 40px
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 18px 0 28px
    }

    .hero-art {
        display: none
    }

    .lab-grid,
    .cards,
    .metrics,
    .metrics.m4 {
        grid-template-columns: 1fr
    }

    .panel {
        padding: 18px
    }

    .view>h1 {
        font-size: 32px
    }
}

@media(min-width:1500px) {
    main {
        padding-top: 45px
    }

    .hero {
        padding-top: 35px;
        padding-bottom: 48px
    }
}

@media print {

    header,
    .module-tabs,
    aside,
    .presets,
    form button {
        display: none
    }

    .panel {
        break-inside: avoid;
        box-shadow: none
    }

    main {
        padding: 0
    }

    body {
        background: #fff
    }
}