/* ==========================================================================
   History From Home: emerald and yellow
   --------------------------------------------------------------------------
   Based on the History From Home mockup: a green menu bar with the house
   logo on a white tab, a photo with a slanted deep green band carrying the
   name in yellow, and green bordered course panels.

   Headings use Bree Serif, as in the logo. Body text is Atkinson
   Hyperlegible, designed by the Braille Institute for readers with low
   vision. Base size is 17px, with larger steps of 20px and 24px.

   Irish appears in small italic above the English on headings and menus.

   All text colour pairs meet WCAG AA contrast (4.5:1 for normal text).
   ========================================================================== */

@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 700; font-display: swap; src: url(../fonts/atkinson-hyperlegible-latin-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Bree Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/bree-serif-latin-400-normal.woff2) format("woff2"); }

:root {
  --green: #007a50;         /* menu bar, buttons, headings, borders */
  --green-deep: #00553a;    /* hero band, slide viewer */
  --green-darkest: #003624; /* footer, text on yellow */
  --green-pale: #e8f6ef;    /* help line, help panel, done states */
  --green-line: #c4e6d4;    /* rules and dividers */
  --photo: #d3eedf;         /* photo placeholder */
  --yellow: #ffd54f;        /* name, highlight buttons, step numbers, live */
  --yellow-line: #f2c230;   /* logo house, photo frame */
  --amber: #7a5a00;         /* years on white */
  --ink: #102419;
  --muted: #475c51;
  --page: #ffffff;
  --focus-dark: #003624;
  --focus-light: #ffd54f;
  --base: 17px;
  --body: "Atkinson Hyperlegible", Verdana, sans-serif;
  --serif: "Bree Serif", Georgia, serif;
}
html[data-text="larger"] { --base: 20px; }
html[data-text="largest"] { --base: 24px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: var(--base); }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--body); line-height: 1.6; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
h1 { font-size: 2.3rem; margin: .3em 0 .45em; color: var(--green-deep); }
h2 { font-size: 1.6rem; margin: 1.5em 0 .5em; color: var(--green); }
h3 { font-size: 1.2rem; margin: 1em 0 .35em; }
p { margin: 0 0 1em; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 4px solid var(--focus-dark); outline-offset: 2px; }
.site-header :focus-visible, .hero-band :focus-visible, .band :focus-visible, .site-footer :focus-visible { outline-color: var(--focus-light); }

/* Irish in small italic above the English */
.ga { display: block; font-family: var(--body); font-style: italic; font-weight: 400; font-size: .6em; line-height: 1.25; margin-bottom: .2em; }
.en { display: block; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1rem; }

/* ---- Help line and text size ------------------------------------------- */
.utility { background: var(--green-pale); border-bottom: 1px solid var(--green-line); font-size: .82rem; }
.utility .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; justify-content: space-between; padding-top: .4rem; padding-bottom: .4rem; }
.textsize { display: flex; align-items: center; gap: .4rem; }
.textsize form { display: inline; }
.textsize button { font: inherit; font-weight: 700; border: 2px solid var(--green); background: #fff; color: var(--green-deep); border-radius: 6px; padding: 0 .55rem; cursor: pointer; min-width: 2.4rem; min-height: 2.2rem; }
.textsize button[aria-pressed="true"] { background: var(--green); color: #fff; }
.textsize .s1 { font-size: .85rem; } .textsize .s2 { font-size: 1rem; } .textsize .s3 { font-size: 1.2rem; }

/* ---- Header: green bar with the logo on a white tab --------------------- */
.site-header { background: var(--green); color: #fff; }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: .8rem 2rem; align-items: center; justify-content: space-between; }
.logo-tab { display: block; background: #fff; padding: .7rem .9rem .5rem; border-radius: 0 0 10px 10px; margin-bottom: -2rem; position: relative; z-index: 2; line-height: 0; }
.logo-tab svg { width: 6.6rem; height: auto; }
.main-nav { display: flex; flex-wrap: wrap; gap: .3rem .3rem; align-items: center; padding: .7rem 0; margin-left: auto; }
.main-nav a, .main-nav button { color: #fff; text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; padding: .35rem .65rem; border-radius: 6px; text-align: center; line-height: 1.2; }
.main-nav .ga { font-size: .66rem; opacity: .95; margin-bottom: .1rem; }
.main-nav .en { font-weight: 700; font-size: .88rem; }
.main-nav a:hover, .main-nav button:hover { background: rgba(255,255,255,.14); color: #fff; }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -4px 0 var(--yellow); border-radius: 6px 6px 0 0; }
.main-nav .nav-white { background: #fff; color: var(--green-deep); }
.main-nav .nav-white:hover { background: var(--green-pale); color: var(--green-darkest); }
.main-nav .nav-yellow { background: var(--yellow); color: var(--green-darkest); }
.main-nav .nav-yellow:hover { background: #ffe07a; color: var(--green-darkest); }
.main-nav .nav-basket { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 2.8rem; min-height: 2.8rem; }
.main-nav .basket-count { position: absolute; top: .1rem; right: .05rem; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; border-radius: .65rem; background: var(--yellow); color: var(--green-darkest); font-size: .72rem; font-weight: 700; line-height: 1.3rem; text-align: center; }
.main-nav .nav-divider { width: 2px; align-self: stretch; margin: .3rem .4rem; background: rgba(255,255,255,.5); }
.main-nav form { margin: 0; display: flex; }
@media (max-width: 700px) { .logo-tab { margin-bottom: 0; } .logo-tab svg { width: 5rem; } .main-nav { margin-left: 0; padding-top: .2rem; } main { padding-top: 1.6rem; } .band { margin-top: -1.6rem; padding-top: 1.6rem; } }

main { padding: 3.2rem 0 3rem; }

/* ---- Home page hero: photo with a slanted green band -------------------- */
.hero { border: 4px solid var(--yellow-line); border-radius: 4px; overflow: hidden; background: var(--photo); margin-bottom: 2rem; }
.hero-photo { height: 15rem; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-photo:has(img) { padding: 0; }
.hero-placeholder { margin: 0; color: #2f5a45; font-size: 1.4rem; text-align: center; }
.hero-band { background: var(--green-deep); color: #fff; clip-path: polygon(0 26%, 100% 0, 100% 100%, 0 100%); margin-top: -4rem; padding: 4.4rem 2.4rem 1.6rem; position: relative; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-end; justify-content: space-between; }
.hero-band h1 { margin: 0; font-size: 2.7rem; line-height: 1.05; color: var(--yellow); }
.hero-band h1 .ga { color: #fff; font-size: .4em; margin-bottom: .35rem; }
.hero-band .sub { margin: .3rem 0 0; font-family: var(--serif); font-size: 1.5rem; color: #fff; }
@media (max-width: 700px) { .hero-band { clip-path: none; margin-top: 0; padding: 1.6rem 1.2rem; } .hero-photo { height: 13rem; } }
.intro { font-size: 1.1rem; max-width: 40em; }

/* Inner page header band */
.band { background: var(--green-deep); color: #fff; margin-top: -3.2rem; margin-bottom: 2rem; padding: 3.4rem 0 1.8rem; }
.band h1 { color: #fff; }
.band h1 .ga { color: var(--yellow); font-size: .45em; }
.band a { color: #fff; }

/* ---- Messages ---------------------------------------------------------- */
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.messages li { padding: .75rem 1rem; border-radius: 6px; border: 3px solid var(--green); background: var(--green-pale); margin-bottom: .5rem; font-weight: 700; }
.messages li.error { border-color: #9a2b16; background: #fbecea; }
.messages li.info { border-color: var(--green-deep); background: #fff; }

/* ---- Buttons ----------------------------------------------------------- */
.btn, button.btn {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
  background: var(--green); color: #fff; border: 3px solid var(--green); border-radius: 6px;
  padding: .55rem 1.2rem; min-height: 3rem; line-height: 1.4;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn.secondary { background: #fff; color: var(--green-deep); }
.btn.secondary:hover { background: var(--green-pale); color: var(--green-darkest); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--green-darkest); }
.btn.yellow:hover { background: #ffe07a; border-color: #ffe07a; color: var(--green-darkest); }
.btn.outline-white { background: transparent; border-color: #fff; color: #fff; }
.btn.outline-white:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn.big { font-size: 1.1rem; padding: .7rem 1.5rem; }
.btn.danger { background: #9a2b16; border-color: #9a2b16; }
.btn.small { font-size: .85rem; padding: .25rem .8rem; min-height: 2.3rem; border-width: 2px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1rem 0; }

/* ---- Sections and layout ----------------------------------------------- */
.card { border: 3px solid var(--green); border-radius: 8px; padding: 1.1rem 1.3rem; margin-bottom: 1.6rem; background: #fff; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.two-col { display: grid; gap: 2.4rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 1rem; } }
.meta { color: var(--muted); font-size: .85rem; }
.price { font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.lead { font-size: 1.1rem; max-width: 40em; }
.form-narrow { max-width: 36rem; }

/* Small labels for step kind and status */
.tag, .kind { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 4px; padding: .05rem .55rem; line-height: 1.5; margin-right: .3rem; border: 2px solid; }
.tag { background: #fff; color: var(--green-deep); border-color: var(--green); }
.tag.live { background: var(--yellow); color: var(--green-darkest); border-color: var(--yellow-line); }
.tag.green { background: var(--green-pale); color: var(--green-deep); border-color: var(--green); }
.kind.lecture { background: var(--green); color: #fff; border-color: var(--green); }
.kind.discussion { background: #fff; color: var(--green-deep); border-color: var(--green); }

/* ---- Course panels ----------------------------------------------------- */
.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.course-card { display: flex; flex-direction: column; gap: .4rem; border: 3px solid var(--green); border-radius: 8px; padding: 1.1rem 1.2rem; background: #fff; }
.course-card .years { margin: 0; font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; color: var(--amber); }
.course-card h3 { margin: 0; font-size: 1.25rem; color: var(--ink); }
.course-card h3 .ga { color: var(--muted); }
.course-card h3 a { color: inherit; text-decoration: none; }
.course-card h3 a:hover { text-decoration: underline; }
.course-card p { margin: 0; }
.course-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 2px solid var(--photo); padding-top: .6rem; margin-top: auto; }

/* Featured course: one wide panel in three parts */
.section-head { margin: 0 0 .6rem; }
.feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .75fr); border: 3px solid var(--green); border-radius: 8px; overflow: hidden; background: #fff; }
.feature > div { padding: 1.2rem 1.4rem; }
.feature .years { margin: 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; color: var(--amber); }
.feature h3 { margin: .2rem 0 .5rem; font-size: 1.5rem; }
.feature h3 a { color: var(--ink); text-decoration: none; }
.feature h3 a:hover { text-decoration: underline; }
.feature h3 .ga { color: var(--muted); }
.feature-main p { margin: 0 0 .6rem; }
.feature-weeks { background: var(--green-pale); border-left: 2px solid var(--green-line); }
.feature-weeks h4 { margin: 0 0 .5rem; font-family: var(--serif); font-weight: 400; font-size: 1.1rem; color: var(--green); }
.feature-weeks h4 .ga { font-size: .65rem; }
.feature-weeks ol { list-style: none; margin: 0; padding: 0; }
.feature-weeks li { padding: .4rem 0; border-top: 1px solid var(--green-line); line-height: 1.35; }
.feature-weeks li:first-child { border-top: 0; padding-top: 0; }
.feature-weeks .wk { display: block; font-size: .78rem; font-weight: 700; color: var(--green-deep); }
.feature-book { background: var(--green-deep); color: #fff; display: flex; flex-direction: column; gap: .5rem; justify-content: center; align-items: flex-start; }
.feature-book p { margin: 0; }
.feature-book .starts { font-weight: 700; }
.feature-book .places { color: #d3eedf; font-size: .9rem; }
.feature-book .big-price { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--yellow); margin: .3rem 0; }
.feature-book form { margin: 0; }
.feature-book .more { color: #fff; font-size: .9rem; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } .feature-weeks { border-left: 0; border-top: 2px solid var(--green-line); } }

/* Full width tinted band for how it works */
.wide-band { background: var(--green-pale); border-top: 3px solid var(--green-line); margin: 2.6rem 0 -3rem; padding: 2.2rem 0 2.4rem; }
.how-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: .5rem 2.4rem; align-items: end; margin-bottom: 1.4rem; }
.how-head h2 { margin: 0; }
.how-head .intro { margin: 0; font-size: 1.05rem; }
@media (max-width: 860px) { .how-head { grid-template-columns: 1fr; } }
.wide-band .help-panel { background: #fff; margin-top: 2rem; }

/* How a course works */
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 1.6rem; }
.how li { display: flex; gap: .8rem; }
.how .num { flex: none; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--yellow); color: var(--green-darkest); font-family: var(--serif); font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }
.how h3 { margin: .2rem 0; font-family: var(--body); font-weight: 700; font-size: 1.05rem; }
.how p { margin: 0; }

/* Help panel */
.help-panel { background: var(--green-pale); border: 3px solid var(--green); border-radius: 8px; padding: 1.4rem 1.6rem; display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; align-items: center; justify-content: space-between; margin: 3rem 0 0; }
.help-panel h2 { margin: 0 0 .2rem; font-size: 1.5rem; }
.help-panel p { margin: 0; }

/* ---- Lists of lectures and dates --------------------------------------- */
.lecture-list { list-style: none; padding: 0; margin: 0; }
.lecture-list li { border-top: 2px solid var(--green-line); padding: .8rem 0; display: flex; gap: .5rem 1rem; flex-wrap: wrap; align-items: baseline; justify-content: space-between; }
.lecture-list li:first-child { border-top: 0; }
.lecture-list .when { color: var(--muted); font-size: .9rem; }

/* ---- Forms ------------------------------------------------------------- */
form p { margin: 0 0 1rem; }
label { display: block; font-weight: 700; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  font: inherit; width: 100%; max-width: 32rem; padding: .6rem .75rem; border: 2px solid var(--muted); border-radius: 6px; background: #fff; color: var(--ink);
}
textarea { max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
.helptext { display: block; color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.errorlist { color: #9a2b16; list-style: none; padding: 0; margin: .3rem 0; font-weight: 700; }

/* ---- Notes and slides -------------------------------------------------- */
.notes { font-size: 1.02rem; max-width: 38em; }
.notes h2:first-child, .notes h3:first-child { margin-top: 0; }
.notes h2 { font-size: 1.3rem; }
.notes blockquote { border-left: 6px solid var(--yellow-line); margin: 1rem 0; padding: .3rem 1rem; background: #fff8dc; }
.slide-viewer { background: var(--green-deep); color: #fff; border: 4px solid var(--yellow-line); border-radius: 8px; padding: 1.4rem 1.6rem; min-height: 13rem; }
.slide-viewer h3 { margin-top: 0; font-size: 1.45rem; color: var(--yellow); }
.slide-viewer .counter { font-size: .8rem; color: #d3eedf; margin-bottom: .3rem; }
.slide-viewer .notes { color: #fff; }
.slide-viewer img { max-width: 100%; height: auto; }

/* ---- Questions --------------------------------------------------------- */
.question { border-top: 2px solid var(--green-line); padding: .9rem 0; }
.question:first-child { border-top: 0; padding-top: 0; }
.question .q-text { font-size: 1.04rem; white-space: pre-wrap; }
.answer { margin: .6rem 0 0 1.2rem; padding: .6rem .9rem; border-left: 5px solid var(--green-line); white-space: pre-wrap; }
.answer.lecturer { border-left-color: var(--green); background: var(--green-pale); }
.answer .who { font-weight: 700; font-size: .85rem; white-space: normal; display: block; }
details summary { cursor: pointer; color: var(--green); font-weight: 700; padding: .3rem 0; }
.filter-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.filter-tabs a { padding: .2rem .9rem; border-radius: 6px; border: 2px solid var(--green); text-decoration: none; color: var(--green-deep); font-weight: 700; font-size: .9rem; }
.filter-tabs a[aria-current="true"] { background: var(--green); color: #fff; }

/* ---- Course run pages -------------------------------------------------- */
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: .2rem; }
.run-nav { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; margin: .4rem 0 1.4rem; border-bottom: 3px solid var(--green); }
.run-nav a { text-decoration: none; padding: .35rem 0; border-bottom: 6px solid transparent; margin-bottom: -3px; color: var(--green-deep); }
.run-nav a .ga { font-size: .7rem; }
.run-nav a .en { font-weight: 700; }
.run-nav a[aria-current="page"] { border-bottom-color: var(--yellow-line); color: var(--ink); }

.progress { background: var(--green-pale); border: 2px solid var(--green); border-radius: 8px; height: 1.2rem; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); }
.progress-label { font-size: .9rem; color: var(--muted); margin: .3rem 0 0; }

.week-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; list-style: none; padding: 0; }
.week-tabs a { display: inline-block; text-align: center; padding: .35rem .9rem; border-radius: 6px; border: 3px solid var(--green); text-decoration: none; font-weight: 700; color: var(--green-deep); background: #fff; line-height: 1.25; }
.week-tabs a .ga { font-size: .68rem; margin: 0; }
.week-tabs a[aria-current="page"] { background: var(--green); color: #fff; }
.week-tabs .locked { border-style: dashed; border-color: #7f958a; color: var(--muted); font-weight: 400; }
.week-tabs .done .en::after { content: " \2713"; }

.step-list { list-style: none; padding: 0; margin: 0; }
.step-list li { display: grid; grid-template-columns: 4rem 1fr auto; gap: .9rem; align-items: center; padding: .9rem 0; border-top: 2px solid var(--green-line); }
.step-list li:first-child { border-top: 0; }
.step-no { font-family: var(--serif); font-size: 1.6rem; color: var(--green); }
.step-title a { font-weight: 700; font-size: 1.05rem; }
.step-meta { font-size: .85rem; color: var(--muted); }
.tick { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 3px solid #7f958a; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: transparent; }
.tick.done { background: var(--green); border-color: var(--green); color: #fff; }

.outline-week { border-top: 2px solid var(--green-line); padding: .9rem 0; display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; }
.outline-week:first-child { border-top: 0; padding-top: 0; }
.outline-week .wk { font-family: var(--serif); font-size: 1.1rem; color: var(--green); line-height: 1.2; }
.outline-week .wk .ga { font-size: .7rem; color: var(--muted); }
.outline-week h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.outline-week ul { margin: .2rem 0 0; padding: 0; list-style: none; }
.outline-week li { padding: .2rem 0; }
.outline-week .yrs { font-size: .82rem; color: var(--muted); margin-left: .3rem; }

.run-option { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; border-top: 2px solid var(--green-line); padding: .9rem 0; }
.run-option:first-of-type { border-top: 0; }

.big-years { font-family: var(--serif); font-size: 3rem; line-height: .95; color: var(--amber); margin: 0 0 .3rem; }
.big-years span { font-size: .55em; color: var(--muted); display: block; margin-top: .2rem; }
.band .big-years { color: var(--yellow); }
.band .big-years span { color: #fff; }

.step-footer { display: grid; gap: 1rem; border-top: 3px solid var(--green); border-bottom: 3px solid var(--green); padding: 1rem 0; margin: 1.6rem 0; }
.step-footer form { margin: 0; }
.step-footer .complete-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.step-footer .nav-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.done-note { color: var(--green-deep); font-weight: 700; }
.discussion-prompt { background: var(--green-pale); border: 3px solid var(--green); border-radius: 8px; padding: 1.1rem 1.3rem; font-size: 1.08rem; }

.comments h2 { margin-top: 0; }
.comment { border-top: 2px solid var(--green-line); padding: 1rem 0; }
.comment:first-of-type { border-top: 0; }
.comment .who { font-weight: 700; }
.comment .when { color: var(--muted); font-size: .85rem; margin-left: .4rem; }
.comment .text { white-space: pre-wrap; margin: .3rem 0 .5rem; }
.comment.lecturer > .text, .reply.lecturer > .text { border-left: 5px solid var(--green); padding-left: .8rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; background: var(--green); color: #fff; border-radius: 4px; padding: 0 .45rem; margin-left: .3rem; }
.replies { margin: .5rem 0 0 1.5rem; border-left: 4px solid var(--green-line); padding-left: 1rem; }
.reply { padding: .6rem 0; }
.comment-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.comment-actions form { margin: 0; }

/* ---- Live room --------------------------------------------------------- */
.live-grid { display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 960px) { .live-grid { grid-template-columns: 1fr; } }
.video-box { background: var(--green-darkest); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; width: 100%; }
.video-box iframe { width: 100%; height: 100%; border: 0; }
.video-fallback { color: #fff; padding: 1.5rem; }
.status-banner { padding: .65rem 1rem; border-radius: 6px; font-weight: 700; margin-bottom: 1rem; border: 3px solid; }
.status-banner.waiting { background: #fff; color: var(--green-deep); border-color: var(--green); }
.status-banner.live { background: var(--yellow); color: var(--green-darkest); border-color: var(--yellow-line); }
.status-banner.ended { background: var(--green-pale); color: var(--green-deep); border-color: var(--green); }
.on-screen { background: var(--green-deep); color: #fff; border: 4px solid var(--yellow-line); border-radius: 8px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
.on-screen .label { font-weight: 700; font-size: .85rem; color: var(--yellow); }
.on-screen .text { font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; margin: .2rem 0; }
.on-screen .meta { color: #d3eedf; }
.queue { list-style: none; padding: 0; margin: 0; }
.queue li { border-top: 2px solid var(--green-line); padding: .75rem 0; }
.queue li:first-child { border-top: 0; }
.queue .q { white-space: pre-wrap; }
.queue .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; align-items: center; }
.presenter-bar { position: sticky; top: 0; z-index: 5; background: var(--green-deep); color: #fff; border-radius: 8px; padding: .7rem 1rem; display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.presenter-bar .btn.secondary { border-color: #fff; }
.presenter-bar :focus-visible { outline-color: var(--focus-light); }
.speaker-notes { background: #fff8dc; border: 2px dashed var(--amber); border-radius: 6px; padding: .8rem 1rem; margin-top: 1rem; font-size: .9rem; }

/* ---- Tables ------------------------------------------------------------ */
table.simple { width: 100%; border-collapse: collapse; }
table.simple th, table.simple td { text-align: left; padding: .6rem .7rem; border-bottom: 2px solid var(--green-line); vertical-align: top; }
table.simple th { background: var(--green); color: #fff; font-family: var(--serif); font-weight: 400; }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--green-darkest); color: #fff; padding: 1.6rem 0; font-size: .85rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; }
.site-footer p { margin: 0 0 .4rem; }
.site-footer .name { font-family: var(--serif); font-size: 1.15rem; color: var(--yellow); }
.site-footer a { color: #fff; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .site-header, .utility, .site-footer, .no-print { display: none !important; }
  body { font-size: 13pt; }
}

/* About page: profile and publications */
.profile-photo { height: 12rem; background: var(--photo); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.profile h3 { margin: 0 0 .3rem; }
.jump { margin: .6rem 0 0; padding-left: 1.1rem; }
.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.pubs > li { border-top: 2px solid var(--green-line); padding-top: 1rem; }
.pubs > li:first-child { border-top: 0; padding-top: 0; }
.pubs p { margin: 0 0 .6rem; }
.pub-title { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.pub-title cite { font-style: normal; color: var(--green-deep); }
.pubs blockquote { margin: 0 0 .8rem; padding: .7rem 1rem; background: var(--green-pale); border-radius: 6px; }
.pubs blockquote p { margin: 0 0 .3rem; font-style: italic; }
.pubs blockquote footer { font-size: .9rem; color: var(--muted); }
