/* =====================================================================
   GeoFly Lab — site stylesheet
   A plain, conservative academic layout. UC Santa Cruz navy + gold accent.
   ===================================================================== */

:root {
    --navy: #003c6c;
    --navy-dark: #002a4d;
    --gold: #fdc700;
    --ink: #1f2933;
    --text: #3a4450;
    --muted: #66717d;
    --line: #e1e5ea;
    --bg-soft: #f6f7f9;
    --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: underline; text-decoration-color: rgba(0, 60, 108, .35); text-underline-offset: 2px; }
a:hover { color: var(--navy-dark); text-decoration-color: var(--navy-dark); }
h1, h2, h3, h4, h5 {
    font-family: var(--serif);
    color: var(--ink);
    font-weight: 600;
    line-height: 1.25;
    margin: 1.6em 0 .5em;
}
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 21px; }
h4, h5 { font-size: 18px; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
strong { color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
    border-top: 4px solid var(--navy);
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}
.brand { text-decoration: none; color: var(--ink); display: block; line-height: 1.2; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--navy); display: block; }
.brand-sub { font-size: 13.5px; color: var(--muted); display: block; margin-top: 2px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav li { margin: 0; }
.site-nav a {
    display: block;
    padding: 8px 12px;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }
.nav-toggle {
    display: none;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    background: none;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
}
@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .site-nav { display: none; width: 100%; }
    .site-nav.open { display: block; }
    .site-header .wrap { flex-wrap: wrap; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
    .site-nav ul { flex-direction: column; gap: 0; padding: 6px 0 4px; border-top: 1px solid var(--line); }
    .site-nav a { padding: 10px 2px; border-bottom: 0; }
    .site-nav a[aria-current="page"] { border-left: 3px solid var(--gold); padding-left: 10px; }
    .brand-name { font-size: 21px; }
}

/* ---------- Page heading ---------- */
main { display: block; padding-bottom: 64px; }
.page-head { padding: 40px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.page-head h1 { margin: 0 0 8px; }
.page-head .lede { font-size: 18.5px; color: var(--muted); margin: 0; max-width: 720px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.crumbs a { color: var(--muted); }
.meta { font-size: 15px; color: var(--muted); margin: 0; }

/* ---------- Home ---------- */
.intro { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 44px 0 40px; }
.intro h1 { font-size: 38px; margin: 0 0 6px; color: var(--navy); }
.intro .tagline { font-size: 19px; color: var(--muted); margin: 0 0 18px; }
.intro p { font-size: 17.5px; }
.intro figure { margin: 0; }
.intro figure img { width: 100%; border-radius: 3px; }
.intro figcaption { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.quick-links { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; }
.quick-links li { margin: 0; }
@media (max-width: 820px) { .intro { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; } .intro h1 { font-size: 32px; } }

.section { padding: 8px 0 12px; }
.section > h2 { font-size: 24px; margin: 28px 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-more { font-size: 15.5px; font-weight: 600; margin-top: 14px; }

.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; }
.area { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
.area img { width: 120px; height: 90px; object-fit: cover; border-radius: 2px; }
.area h3 { font-size: 18.5px; margin: 0 0 4px; }
.area h3 a { color: var(--ink); text-decoration: none; }
.area h3 a:hover { color: var(--navy); text-decoration: underline; }
.area p { font-size: 15.5px; margin: 0; }
@media (max-width: 820px) { .areas { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .area { grid-template-columns: 88px 1fr; } .area img { width: 88px; height: 70px; } }

.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.news-list li:first-child { border-top: 1px solid var(--line); }
.news-list time { color: var(--muted); font-size: 15px; white-space: nowrap; }
.news-list a { font-weight: 600; text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
@media (max-width: 560px) { .news-list li { grid-template-columns: 1fr; gap: 2px; } }

.note { background: var(--bg-soft); border-left: 3px solid var(--navy); padding: 16px 20px; margin: 28px 0 0; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Research ---------- */
.research-area { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.research-area:first-of-type { padding-top: 4px; }
.research-area img { width: 300px; height: 200px; object-fit: cover; border-radius: 2px; }
.research-area h2 { font-size: 23px; margin: 0 0 8px; }
.research-area h2 a { color: var(--ink); text-decoration: none; }
.research-area h2 a:hover { color: var(--navy); text-decoration: underline; }
.research-area p { margin-bottom: .7em; }
.research-area .projects { font-size: 15.5px; color: var(--muted); }
.research-area .projects strong { color: var(--text); }
@media (max-width: 760px) {
    .research-area { grid-template-columns: 1fr; gap: 14px; }
    .research-area img { width: 100%; height: 190px; }
}
.more { font-weight: 600; }

/* ---------- Article / long-form content ---------- */
.prose { max-width: 760px; }
.prose img { margin: 1.4em auto; border-radius: 2px; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose figure { margin: 1.4em 0; }
.prose iframe { max-width: 100%; }
.content-wide h3 { margin-top: 1.4em; }
.content-wide .text-center img { margin-left: auto; margin-right: auto; }
.back { font-weight: 600; margin-top: 36px; }

/* ---------- Publications ---------- */
.pubs h2 { font-size: 22px; margin: 34px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pubs h2:first-child { margin-top: 0; }
.pubs ol { list-style: none; padding: 0; margin: 0; }
.pubs li { padding-left: 1.6em; text-indent: -1.6em; margin: 0 0 14px; font-size: 16px; line-height: 1.6; }
.pubs li em { color: var(--ink); }
.pubs .pdf { font-size: 13px; font-weight: 700; text-decoration: none; border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; margin-left: 4px; text-indent: 0; display: inline-block; }
.pubs .pdf:hover { border-color: var(--navy); }

/* ---------- Facilities ---------- */
.facility-lab { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; margin-bottom: 12px; }
.facility-lab img { width: 260px; border-radius: 2px; }
@media (max-width: 760px) { .facility-lab { grid-template-columns: 1fr; } .facility-lab img { width: 100%; max-width: 360px; } }
.equipment { list-style: none; padding: 0; margin: 0; }
.equipment li { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; align-items: start; }
.equipment li:first-child { border-top: 1px solid var(--line); }
.equipment img { width: 110px; height: 82px; object-fit: contain; background: #fff; }
.equipment h3 { font-size: 17.5px; margin: 0 0 3px; }
.equipment p { font-size: 15.5px; margin: 0; }
.equipment .spec { font-size: 14.5px; font-weight: 600; }

/* ---------- News list page ---------- */
.news-year { font-size: 22px; margin: 34px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.news-year:first-child { margin-top: 0; }
.news-items { list-style: none; margin: 0; padding: 0; }
.news-item { display: grid; grid-template-columns: 1fr 150px; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); margin: 0; }
.news-item:last-child { border-bottom: 0; }
.news-item time { font-size: 14.5px; color: var(--muted); }
.news-item h3 { font-size: 19px; margin: 2px 0 6px; font-family: var(--serif); }
.news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover { color: var(--navy); text-decoration: underline; }
.news-item p { font-size: 15.5px; margin: 0; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item img { width: 150px; height: 100px; object-fit: cover; border-radius: 2px; }
@media (max-width: 560px) { .news-item { grid-template-columns: 1fr; } .news-item img { display: none; } }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.gallery a:hover img { opacity: .85; }
@media (max-width: 820px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 48px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } }
address { font-style: normal; line-height: 1.7; }
.contact-form label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin: 14px 0 5px; }
.contact-form input, .contact-form textarea {
    width: 100%;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    padding: 9px 12px;
    border: 1px solid #c9d0d8;
    border-radius: 3px;
    background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid rgba(0, 60, 108, .25); border-color: var(--navy); }
.contact-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .contact-form .two { grid-template-columns: 1fr; } }
.button {
    display: inline-block;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--navy);
    border: 0;
    border-radius: 3px;
    padding: 10px 22px;
    margin-top: 18px;
    cursor: pointer;
    text-decoration: none;
}
.button:hover { background: var(--navy-dark); color: #fff; }
.button[disabled] { opacity: .7; cursor: wait; }
.form-status { margin: 12px 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.is-ok { color: #1f7a3a; }
.form-status.is-error { color: #b42318; }
.map { width: 100%; height: 320px; border: 0; margin-top: 40px; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 36px; padding-bottom: 28px; }
.site-footer h2 { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin: 0 0 10px; border: 0; padding: 0; }
.site-footer p { margin: 0 0 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 5px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--navy); text-decoration: underline; }
.site-footer .footer-name { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.copyright { border-top: 1px solid var(--line); padding: 14px 0 18px; font-size: 13.5px; }
.copyright .wrap { display: block; padding: 0 24px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Minimal grid used by older content ---------- */
.row { display: flex; flex-wrap: wrap; margin: 0 -14px; }
.row > [class*="col-"] { padding: 0 14px; width: 100%; }
.col-12 { flex: 0 0 100%; }
@media (min-width: 768px) {
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .order-md-1 { order: 1; }
    .order-md-2 { order: 2; }
}
.align-items-center { align-items: center; }
.text-center { text-align: center; }
.img-fluid { max-width: 100%; height: auto; }
.my-4 { margin-top: 24px; margin-bottom: 24px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 40px; }
.list-unstyled { list-style: none; padding-left: 0; }
.content-wide .row + .row { margin-top: 8px; }
.content-wide .col-md-6 img { border-radius: 2px; }
.content-wide h5.heading, .content-wide h3.heading { font-size: 21px; margin-top: .4em; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Keep long words, links and hidden fields from widening the page */
body { overflow-wrap: break-word; }
.news-item > div, .news-list li > *, .area > div, .research-area > div, .equipment li > div, .contact-grid > div { min-width: 0; }
.news-item h3, .page-head h1, .prose, .content-wide { overflow-wrap: anywhere; }
.contact-form input.visually-hidden { width: 1px; height: 1px; padding: 0; border: 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; }

/* Phone header: keep the lab name and Menu button on one line */
@media (max-width: 820px) {
    .brand { flex: 1 1 0; min-width: 0; }
    .nav-toggle { flex: none; }
    .brand-sub { font-size: 12.5px; }
}

/* =====================================================================
   Color theme: navy header and footer, soft blue bands
   ===================================================================== */
:root {
    --band: #eaf1f7;
    --band-2: #f4f7fa;
    --footer-bg: #002a4d;
}
body { background: #fff; }

/* Header: navy bar with a thin gold line */
.site-header { background: var(--navy); border-top: 4px solid var(--gold); border-bottom: 0; }
.brand-name { color: #fff; }
.brand-sub { color: #bcd0e3; }
.site-nav a { color: #e3ecf5; }
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
.nav-toggle { color: #fff; border-color: rgba(255, 255, 255, .45); }
@media (max-width: 820px) {
    .site-nav ul { border-top-color: rgba(255, 255, 255, .2); }
}

/* Full-width tinted bands behind page titles and the home introduction */
.page-head, .intro {
    background: var(--band);
    box-shadow: 0 0 0 100vmax var(--band);
    clip-path: inset(0 -100vmax);
    border-bottom: 0;
}
.page-head { padding: 36px 0 28px; margin-bottom: 36px; }
.intro { padding: 44px 0 44px; margin-bottom: 20px; }
.page-head .lede, .intro .tagline { color: #4d5b69; }
.crumbs a { color: #4d5b69; }

/* Home: latest news on a light band */
.section.news-band {
    background: var(--band-2);
    box-shadow: 0 0 0 100vmax var(--band-2);
    clip-path: inset(0 -100vmax);
    padding: 4px 0 26px;
    margin: 36px 0 0;
}
.section > h2 { border-bottom: 2px solid var(--gold); display: inline-block; padding-right: 8px; }
.note { border-left-color: var(--gold); background: #fff8dc; }
.research-area h2 a, .area h3 a, .news-item h3 a { color: var(--navy); }

/* Buttons */
.button-gold { background: var(--gold); color: var(--navy-dark) !important; }
.button-gold:hover { background: #ffd83d; color: var(--navy-dark) !important; }
.note .button { margin-top: 4px; }

/* Footer: navy */
.site-footer { background: var(--footer-bg); border-top: 0; color: #bcd0e3; margin-top: 24px; }
.site-footer h2 { color: #fff; }
.site-footer .footer-name { color: #fff; }
.site-footer a { color: #e3ecf5; }
.site-footer a:hover { color: #fff; }
.site-footer .button { margin-top: 8px; text-decoration: none; }
.copyright { border-top-color: rgba(255, 255, 255, .15); color: #9fb6cc; }
main { padding-bottom: 40px; }

/* Home: prospective-students note with the group photo */
.note-photo { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: center; }
.note-photo img { width: 300px; height: 150px; object-fit: cover; border-radius: 2px; }
@media (max-width: 700px) { .note-photo { grid-template-columns: 1fr; } .note-photo img { width: 100%; height: auto; } }
.intro figure img { aspect-ratio: 16 / 10; object-fit: cover; object-position: center 20%; }

/* ---------- Team ---------- */
.first-h { margin-top: 0; }
.members { list-style: none; padding: 0; margin: 0 0 12px; }
.member { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); margin: 0; }
.member:first-child { padding-top: 6px; }
.member img { width: 132px; height: 132px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 4px var(--band); }
.member h3 { margin: 4px 0 2px; font-size: 20px; color: var(--navy); }
.member .role { font-size: 14.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.member p { font-size: 16px; }
@media (max-width: 560px) { .member { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; } .member img { width: 84px; height: 84px; } }
.alumni { list-style: none; padding: 0; margin: 0 0 8px; columns: 2; column-gap: 40px; }
.alumni li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line); margin: 0; }
.alumni span { display: block; font-size: 14.5px; color: var(--muted); }
@media (max-width: 700px) { .alumni { columns: 1; } }

/* ---------- Home: wider layout with a larger photo ---------- */
.home-wide .intro { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 48px; }
@media (max-width: 820px) { .home-wide .intro { grid-template-columns: 1fr; gap: 24px; } }

.pubs, .news-items, .news-year, .members, .alumni { max-width: 980px; }

/* =====================================================================
   Drone Mapping Course additions
   ===================================================================== */
.course { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: 15px; }
.toc h2 { font-family: var(--sans); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--navy); border-left-color: var(--navy); }
.toc .sub a { padding-left: 26px; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) {
    .course { grid-template-columns: 1fr; gap: 0; }
    .toc { position: static; border: 1px solid var(--line); padding: 14px 18px; margin-bottom: 28px; background: var(--bg-soft); }
    .toc .sub { display: none; }
}
.course-body { max-width: 780px; }
.course-body > section { scroll-margin-top: 16px; }
.course-body h2 { font-size: 27px; margin: 56px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.course-body > section:first-child h2, .course-body h2.first { margin-top: 0; border-top: 0; padding-top: 0; }
.course-body h3 { font-size: 20px; margin: 30px 0 10px; }
.module-num { display: block; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--line); }
.facts div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 16px; color: var(--ink); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

.objectives { columns: 2; column-gap: 36px; padding-left: 1.3em; }
.objectives li { break-inside: avoid; }
@media (max-width: 700px) { .objectives { columns: 1; } }

.modules { list-style: none; padding: 0; margin: 0; counter-reset: m; }
.modules li { counter-increment: m; display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.modules li:first-child { border-top: 1px solid var(--line); }
.modules li::before { content: counter(m); font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.modules a { font-weight: 600; }
.modules p { margin: 2px 0 0; font-size: 15.5px; }

.callout { border-left: 3px solid var(--navy); background: var(--bg-soft); padding: 14px 18px; margin: 20px 0; font-size: 16px; }
.callout.warn { border-left-color: #b7791f; background: #fdf8ec; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; font-weight: 700; color: var(--ink); margin-bottom: 4px; }

.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 16px 0 8px; }
.videos.one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .videos { grid-template-columns: 1fr; } }
.video figure { margin: 0; }
.video .frame { position: relative; aspect-ratio: 16 / 9; background: #111; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { font-size: 14.5px; color: var(--muted); margin-top: 6px; }

.materials { border: 1px solid var(--line); padding: 14px 18px; margin: 26px 0 8px; }
.materials h3 { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.materials ul { list-style: none; padding: 0; margin: 0; }
.materials li { margin: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.materials li:first-child { border-top: 0; }
.materials .size { color: var(--muted); font-size: 14px; white-space: nowrap; }

.course-body figure { margin: 22px 0; }
.course-body figure img { margin: 0 auto; border: 1px solid var(--line); }
.course-body figcaption { font-size: 14.5px; color: var(--muted); margin-top: 8px; }

table.params { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 16px 0; }
table.params caption { caption-side: top; text-align: left; font-size: 14.5px; color: var(--muted); padding-bottom: 6px; }
table.params th, table.params td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.params thead th { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line); }
table.params tbody th { font-weight: 600; color: var(--ink); }
.table-wrap { overflow-x: auto; }

.formula { font-family: var(--serif); font-size: 18px; background: var(--bg-soft); padding: 12px 16px; margin: 14px 0; }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 9px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; border: 2px solid var(--navy); border-radius: 2px; }
dl.glossary { margin: 0; }
dl.glossary dt { font-weight: 700; color: var(--ink); margin-top: 12px; }
dl.glossary dd { margin: 2px 0 0; }
.resources h3 { margin-top: 22px; }
.resources ul { padding-left: 1.2em; }
.cite { font-size: 15.5px; background: var(--bg-soft); padding: 14px 18px; }
.course-meta { font-size: 15px; color: var(--muted); margin: 10px 0 0; }
.course-body figure img { max-height: 460px; width: auto; }

/* =====================================================================
   Part 107 study guide and quiz
   ===================================================================== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 10px; }
.card-flip {
    font: inherit; text-align: left; cursor: pointer;
    border: 1px solid var(--line); border-top: 3px solid var(--navy);
    background: #fff; padding: 12px 14px; min-height: 104px; border-radius: 2px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
}
.card-flip:hover { border-color: var(--navy); }
.card-flip .front { font-size: 15px; color: var(--text); line-height: 1.4; }
.card-flip .back { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--navy); visibility: hidden; }
.card-flip .hint { font-size: 12.5px; color: var(--muted); }
.card-flip.flipped { background: var(--band); border-top-color: var(--gold); }
.card-flip.flipped .back { visibility: visible; }
.card-flip.flipped .hint { display: none; }
.text-button { font: inherit; font-size: 15px; font-weight: 600; color: var(--navy); background: none; border: 1px solid var(--line); border-radius: 3px; padding: 6px 12px; cursor: pointer; }
.text-button:hover { border-color: var(--navy); }

.decode { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 12px 0 18px; }
.decode th, .decode td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.decode th { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; color: var(--navy); white-space: nowrap; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-soft); padding: 10px 12px; display: block; overflow-x: auto; font-size: 14.5px; margin: 10px 0; }
.alpha { columns: 4; column-gap: 18px; padding: 0; list-style: none; font-size: 15px; }
.alpha li { margin: 0 0 4px; }
.alpha b { color: var(--navy); display: inline-block; width: 1.4em; }
@media (max-width: 560px) { .alpha { columns: 2; } }
.steps-list li { margin-bottom: 8px; }
.plan { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.plan th, .plan td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plan th { white-space: nowrap; color: var(--ink); }

/* Quiz */
.quiz { border: 1px solid var(--line); border-top: 4px solid var(--gold); background: #fff; padding: 22px 24px; margin: 18px 0 8px; }
.quiz label { font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }
.quiz select { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid #c9d0d8; border-radius: 3px; min-width: 280px; max-width: 100%; }
.quiz-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.quiz-cat { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; }
.quiz-bar { height: 6px; background: var(--band); margin: 8px 0 16px; }
.quiz-bar span { display: block; height: 100%; background: var(--navy); width: 0; transition: width .25s; }
.quiz-fig { font-size: 14.5px; background: #fff8dc; border-left: 3px solid var(--gold); padding: 8px 12px; margin-bottom: 12px; }
.quiz-q { font-family: var(--serif); font-size: 21px; color: var(--ink); line-height: 1.4; margin: 0 0 14px; outline: none; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt {
    font: inherit; font-size: 16px; text-align: left; cursor: pointer;
    display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start;
    padding: 11px 14px; border: 1px solid #c9d0d8; border-radius: 3px; background: #fff; color: var(--ink);
}
.quiz-opt:hover:not([disabled]) { border-color: var(--navy); background: var(--band-2); }
.quiz-opt .letter { font-weight: 700; color: var(--navy); }
.quiz-opt[disabled] { cursor: default; }
.quiz-opt.is-right { border-color: #1f7a3a; background: #eaf6ee; }
.quiz-opt.is-right .letter { color: #1f7a3a; }
.quiz-opt.is-wrong { border-color: #b42318; background: #fdecea; }
.quiz-opt.is-wrong .letter { color: #b42318; }
.quiz-feedback { margin: 14px 0 0; padding: 12px 14px; font-size: 15.5px; border-left: 3px solid; }
.quiz-feedback.ok { border-color: #1f7a3a; background: #eaf6ee; }
.quiz-feedback.no { border-color: #b42318; background: #fdecea; }
.quiz .button { margin-top: 16px; }
.quiz-score { font-size: 18px; color: var(--ink); outline: none; }
.quiz-score .big { font-family: var(--serif); font-size: 44px; font-weight: 700; color: var(--navy); display: block; line-height: 1.1; }
.quiz-review ol { padding-left: 1.3em; }
.quiz-review li { margin-bottom: 14px; }
.quiz-review .rq { font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.quiz-review .rk { font-weight: 700; color: #1f7a3a; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button-outline { background: #fff; color: var(--navy) !important; border: 1px solid var(--navy); }
.button-outline:hover { background: var(--band); }
@media (max-width: 900px) { .course { grid-template-columns: minmax(0, 1fr); } .toc { min-width: 0; } }
.quiz select { min-width: 0; width: 100%; max-width: 420px; }
.card-flip { min-height: 96px; }
.card-flip .back { display: none; visibility: visible; }
.card-flip.flipped .back { display: block; }
