/* ==========================================================================
   IIS conference site - single stylesheet
   Colours are driven by --accent, which each edition can override in
   content/editions/<year>/edition.php ('accent_color').
   ========================================================================== */

:root {
  --accent: #1d4e89;
  --accent-dark: #143a68;
  --ink: #16202b;
  --ink-soft: #55636f;
  --line: #e2e7ec;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-dark: #0f1e30;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 8px 24px rgba(16, 32, 48, .06);
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

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

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--ink); }
h1 { font-size: 2.1rem; margin: 0 0 .4em; }
h2 { font-size: 1.6rem; margin: 0 0 .6em; }
h3 { font-size: 1.15rem; margin: 0 0 .5em; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
.nowrap { white-space: nowrap; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------------ topbar */
.topbar {
  background: var(--bg-dark);
  color: #cfd8e3;
  font-size: .82rem;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; }
.topbar-meta { letter-spacing: .02em; }
.lang-switch a {
  color: #cfd8e3; padding: 2px 7px; border-radius: 4px; font-weight: 600;
  text-decoration: none;
}
.lang-switch a.active { background: var(--accent); color: #fff; }
.lang-switch a:hover { color: #fff; text-decoration: none; }

/* ------------------------------------------------------------------ header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { max-height: 46px; width: auto; }
.brand-text strong { display: block; font-family: var(--font-head); font-size: 1.3rem; color: var(--accent); line-height: 1.1; }
.brand-text small { display: block; font-size: .76rem; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }

.site-nav { margin-left: auto; }
.nav-list { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.site-nav a {
  display: block; padding: 8px 11px; font-size: .93rem; color: var(--ink);
  border-radius: 6px; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-alt); text-decoration: none; }
.site-nav a.active { color: var(--accent); font-weight: 600; }

/* drop-downs */
.nav-list > li.has-children > a { padding-right: 24px; }
.nav-list > li.has-children > a::after {
  content: ""; position: absolute; right: 11px; top: 50%; margin-top: -2px;
  border: 4px solid transparent; border-top-color: currentColor; opacity: .55;
}
.submenu-toggle { display: none; }

.submenu {
  position: absolute; top: 100%; left: 0; min-width: 240px; z-index: 45;
  list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16, 32, 48, .13);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .13s ease, transform .13s ease, visibility .13s;
}
.nav-list > li.has-children:hover > .submenu,
.nav-list > li.has-children:focus-within > .submenu,
.nav-list > li.has-children.open > .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu a { padding: 9px 12px; white-space: normal; }
.submenu a:hover { background: var(--bg-alt); }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 40px; background: none;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; padding: 9px 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* --------------------------------------------------------- archive banner */
.archive-banner {
  background: #fdf3d8; border-bottom: 1px solid #f0e0b0; color: #6b5518;
  font-size: .9rem; padding: 9px 0;
}
.archive-banner a { margin-left: 10px; font-weight: 600; color: #8a6a15; }

/* -------------------------------------------------------------------- hero */
.hero {
  background: linear-gradient(140deg, var(--bg-dark), var(--accent));
  background-size: cover; background-position: center;
  color: #fff; padding: 74px 0 66px;
}
.hero-inner { max-width: 820px; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; opacity: .85; margin-bottom: 14px; }
.hero h1 { font-size: 2.9rem; color: #fff; margin-bottom: .2em; }
.hero-theme { font-size: 1.35rem; font-family: var(--font-head); font-style: italic; opacity: .95; margin-bottom: 1em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 1rem; opacity: .95; margin-bottom: 1.6em; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2em; }

.hero-countdown {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255,255,255,.22);
  padding: 12px 18px; border-radius: var(--radius); font-size: .92rem;
}
.hero-countdown .label { text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; opacity: .85; }
.hero-countdown .badge { background: #fff; color: var(--accent-dark); padding: 2px 10px; border-radius: 20px; font-weight: 700; font-size: .8rem; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 8px; font-size: .95rem;
  font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: #fff; }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-small { padding: 8px 15px; font-size: .86rem; }
.cta-row { margin-top: 2rem; }

/* ------------------------------------------------------------- page header */
.page-header { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 46px 0 38px; }
.page-header .eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: var(--accent); margin: 0 0 8px; font-weight: 700; }
.page-header h1 { margin: 0; }
.page-sub { margin: .5em 0 0; color: var(--ink-soft); max-width: 700px; }

/* ---------------------------------------------------------------- sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { position: relative; padding-bottom: 12px; }
.section h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 54px; height: 3px; background: var(--accent); border-radius: 2px; }
.section-intro { color: var(--ink-soft); margin-top: -.4em; }

/* ----------------------------------------------------------------- content */
.prose { font-size: 1.02rem; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.12rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-style: italic;
}
.prose code { background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.prose pre { background: var(--bg-dark); color: #e6edf5; padding: 16px; border-radius: var(--radius); overflow: auto; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-alt); font-family: var(--font); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

/* ----------------------------------------------------------- important dates */
.dates-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dates-list li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
  padding: 14px 18px; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
}
.dates-list li.past { border-left-color: var(--line); opacity: .62; }
.date-day { font-weight: 700; min-width: 190px; font-variant-numeric: tabular-nums; }
.date-label { color: var(--ink-soft); }
.date-flag { margin-left: auto; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.dates-mini li { margin-bottom: 12px; }
.dates-mini li.past { opacity: .55; }

/* ------------------------------------------------------------------ topics */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 1.4em 0 0; }
.chips li {
  background: #fff; border: 1px solid var(--line); border-radius: 30px;
  padding: 8px 17px; font-size: .92rem;
}
.topic-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px;
}
.topic-grid li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; border-top: 3px solid var(--accent); font-weight: 500;
}

/* ------------------------------------------------------------------- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.person-photo { width: 92px; height: 92px; object-fit: cover; border-radius: 50%; margin-bottom: 14px; }
.person-card .talk { font-style: italic; color: var(--ink-soft); }

/* -------------------------------------------------------------- committees */
.committee-heading { margin-top: 2.4em; }
.committee-heading:first-of-type { margin-top: 0; }
.people {
  list-style: none; padding: 0; margin: 0 0 1em;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px;
}
.person {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.person-name { display: block; font-weight: 700; }
.person-role {
  display: inline-block; margin: 4px 0; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; background: var(--accent); color: #fff; padding: 2px 9px; border-radius: 20px;
}
.person-aff { display: block; color: var(--ink-soft); font-size: .9rem; }
.person-mail { display: block; font-size: .88rem; margin-top: 4px; }

/* ------------------------------------------------------------------ splits */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.side-box {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px;
}
.side-box h3 { margin-top: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font); color: var(--ink-soft); }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin-bottom: 8px; }

.callout {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 18px 22px; margin: 1.6em 0;
}
.callout h3 { margin-top: 0; }

.download-list li { margin-bottom: 10px; }
.download-list a, .download-list .disabled {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .93rem;
}
.download-list a:hover { border-color: var(--accent); text-decoration: none; }
.download-list .disabled { color: var(--ink-soft); opacity: .65; }
.file-ext {
  background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700;
  padding: 3px 7px; border-radius: 4px; letter-spacing: .04em; min-width: 42px; text-align: center;
}
.download-list .disabled .file-ext { background: var(--ink-soft); }

.fact-list { margin-top: 2.4em; display: grid; gap: 12px; }
.fact-list > div {
  display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line);
}
.fact-list span { min-width: 170px; color: var(--ink-soft); font-size: .9rem; }

/* ------------------------------------------------------------------- logos */
.logo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px; margin: 1.6em 0 2em;
}
.logo-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-align: center; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; min-height: 130px;
}
.logo-item img { max-height: 74px; width: auto; object-fit: contain; }
.logo-placeholder { font-weight: 600; font-size: .95rem; }
.logo-name { font-size: .82rem; color: var(--ink-soft); margin: 0; }

/* ------------------------------------------------------------------ papers */
.paper-list { padding-left: 1.4em; margin: 0 0 2em; }
.paper-list li { margin-bottom: 16px; }
.paper-title { display: block; font-weight: 600; }
.paper-authors { display: block; color: var(--ink-soft); font-size: .93rem; }
.paper-file { font-size: .8rem; font-weight: 700; }

.program-table td strong { font-family: var(--font); }

/* ----------------------------------------------------------------- gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery-grid figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: 6px; }
.gallery-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 1.6em; }
.gallery-strip img { border-radius: 8px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.lightbox {
  position: fixed; inset: 0; background: rgba(8, 14, 22, .93); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 2.6rem; line-height: 1; padding: 10px 18px; opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: 6px; right: 10px; font-size: 2.2rem; }
.lightbox-prev { left: 4px; }
.lightbox-next { right: 4px; }

/* ----------------------------------------------------------------- archive */
.edition-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.edition-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.edition-card.current { border-top: 4px solid var(--accent); }
.edition-card h2 { font-size: 1.25rem; margin-bottom: .3em; }
.edition-card h2::after { display: none; }
.edition-card .tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.edition-card .theme { font-style: italic; color: var(--ink-soft); margin-bottom: .4em; }
.edition-stats { display: flex; gap: 14px; font-size: .84rem; color: var(--ink-soft); margin: .8em 0 1.2em; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--bg-dark); color: #b9c5d3; margin-top: 40px; font-size: .93rem; }
.site-footer a { color: #dbe5f0; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; padding-top: 46px; padding-bottom: 34px;
}
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: .8em; }
.footer-col .muted { color: #8fa0b3; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; padding-bottom: 22px;
  font-size: .82rem; color: #8fa0b3;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; width: 100%; order: 3; margin-left: 0;
    border-top: 1px solid var(--line); padding: 10px 0 14px;
  }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .site-nav a { padding: 11px 4px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }

  /* drop-downs become accordions */
  .nav-list > li.has-children { display: flex; flex-wrap: wrap; align-items: stretch; }
  .nav-list > li.has-children > a { flex: 1; padding-right: 4px; }
  .nav-list > li.has-children > a::after { display: none; }
  .submenu-toggle {
    display: block; width: 46px; background: none; border: 0;
    border-bottom: 1px solid var(--line); color: var(--ink-soft);
    font-size: 1rem; cursor: pointer;
  }
  .submenu-toggle[aria-expanded="true"] span { display: inline-block; transform: rotate(180deg); }
  .submenu {
    position: static; width: 100%; min-width: 0; border: 0; border-radius: 0;
    box-shadow: none; padding: 0 0 0 16px; background: var(--bg-alt);
    display: none; opacity: 1; visibility: visible; transform: none;
  }
  .nav-list > li.has-children:hover > .submenu,
  .nav-list > li.has-children:focus-within > .submenu { display: none; }
  .nav-list > li.has-children.open > .submenu { display: block; }
  .submenu a { font-size: .95rem; }
  .header-inner { flex-wrap: wrap; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
  .hero { padding: 52px 0 46px; }
  .hero h1 { font-size: 2.1rem; }
  .hero-theme { font-size: 1.1rem; }
  h1 { font-size: 1.7rem; }
  .date-day { min-width: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .topbar-inner { font-size: .76rem; }
  .btn { width: 100%; text-align: center; }
  .btn-small { width: auto; }
}

@media print {
  .topbar, .site-header, .site-footer, .hero-actions, .nav-toggle, .lightbox { display: none !important; }
  body { font-size: 12pt; }
  .section { padding: 12pt 0; }
}
