/*
 * ANITA 2027 workshop and summer school
 *
 * A refresh of the ANITA workshop sites (2017-2026): it keeps their
 * structure (banner header, dark navigation bar, white content panel,
 * "organised and supported by" logo footer, Raleway headings) and adopts
 * the visual language of the AI for Astrophysics school programme
 * (indigo palette, colour-coded schedule, level markers, tier colours).
 *
 * Bootstrap 3 is still loaded for the grid and the collapsing navbar;
 * everything here sits on top of it.
 *
 * Component vocabulary (see school.html for examples of each):
 *   .page-hero          title block at the top of a page
 *   .section            a page section; .section-title is its heading
 *   .toc                pill-style in-page navigation
 *   .card / .card-grid  boxed content in an auto-fitting grid
 *   .callout            highlighted aside (.callout-warm for notices)
 *   .table-clean        tables with an indigo header row
 *   .glance             colour-coded "programme at a glance" timetable
 *   .lvl.l110 etc.      experience range (New / Familiar / Experienced)
 *   .tier-*             Bronze / Silver / Gold cells
 *   .talk               a talk description card
 *   .tbc                inline marker for details still to be confirmed
 *   .btn-cta            primary call-to-action button
 */

:root {
    --indigo: #5458c9;
    --indigo-mid: #6e72e0;
    --indigo-soft: #7b7fe6;
    --indigo-deep: #45427a;
    --ink: #2a2730;
    --text: #33313b;
    --muted: #595959;
    --accent: #ea580c;
    --panel: #f7f8ff;
    --callout: #eef2ff;
    --line: #e5e7eb;
    --talk: #e0e7ff;
    --hands: #d1fae5;
    --break: #f1f5f9;
    --bronze: #fce3cc;
    --silver: #e5e7eb;
    --gold: #fef3c7;
    --page-bg: #f4f5fb;
    --radius: 10px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--page-bg);
    color: var(--text);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

h1, h2, h3, h4, .navbar, .site-header {
    font-family: Raleway, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, h4 {
    color: var(--indigo-deep);
    font-weight: 700;
}

a {
    color: var(--indigo);
}

a:hover, a:focus {
    color: var(--indigo-deep);
}

/*
 * Site header (shared snippet)
 */

.site-header {
    position: relative;
    margin: 0;
    padding: 56px 24px 48px;
    text-align: center;
    color: #fff;
    background-color: var(--indigo-deep);
    background-image:
        linear-gradient(120deg, rgba(42, 39, 48, 0.88), rgba(84, 88, 201, 0.78)),
        url("../images/banner.jpg");
    background-size: cover;
    background-position: center;
}

.site-header .eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.site-header h1 {
    margin: 6px 0 8px;
    color: #fff;
    font-size: 52px;
    font-weight: 800;
    letter-spacing: 1px;
}

.site-header p {
    margin: 0;
    color: #e0e7ff;
    font-size: 19px;
}

.site-header .dates {
    margin-top: 18px;
    font-size: 16px;
}

.site-header .dates span {
    display: inline-block;
    margin: 4px 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

@media screen and (max-width: 767px) {
    .site-header {
        padding: 36px 16px 30px;
    }

    .site-header h1 {
        font-size: 34px;
    }

    .site-header p {
        font-size: 16px;
    }
}

/*
 * Navigation (shared snippet)
 */

.navbar {
    min-height: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: var(--ink);
    background-image: none;
    box-shadow: none;
}

.navbar-collapse, .navbar-header {
    text-align: center;
    background-color: var(--ink);
}

.navbar-nav {
    display: inline-block;
    float: none;
}

.navbar-default .navbar-nav > li > a,
.navbar-default .navbar-nav > li > a:visited {
    padding: 15px 22px;
    color: #f8f8f8;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: none;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-default .navbar-nav > li.active > a,
.navbar-default .navbar-nav > li.active > a:hover {
    color: #fff;
    background: transparent;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.navbar-default .navbar-nav > li > a.nav-cta {
    color: #fff;
    background: var(--indigo);
}

.navbar-default .navbar-toggle {
    border-color: #555;
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
    background-color: var(--ink);
}

.navbar-default .navbar-toggle .icon-bar {
    background-color: #fff;
}

@media screen and (max-width: 767px) {
    .navbar-collapse {
        padding: 0;
    }

    .navbar-default .navbar-nav {
        width: 100%;
        margin: 0;
    }

    .navbar-default .navbar-nav > li {
        border-bottom: 1px solid #444;
    }
}

/*
 * Main content panel
 */

.container.main {
    margin-top: 28px;
    margin-bottom: 28px;
    padding: 36px 40px;
    border-radius: var(--radius);
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(42, 39, 48, 0.08);
}

@media screen and (max-width: 767px) {
    .container.main {
        margin-top: 0;
        padding: 20px 16px;
        border-radius: 0;
    }
}

/*
 * Page hero
 */

.page-hero {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--accent);
}

.page-hero .kicker {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 6px 0 6px;
    color: var(--indigo);
    font-size: 40px;
    font-weight: 800;
}

.page-hero .lead {
    margin: 0 0 16px;
    color: var(--indigo-deep);
    font-size: 20px;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 15px;
}

.meta-list strong {
    color: var(--indigo-deep);
}

@media screen and (max-width: 767px) {
    .page-hero h1 {
        font-size: 30px;
    }

    .page-hero .lead {
        font-size: 17px;
    }
}

/*
 * In-page navigation
 */

.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.toc a {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--talk);
    border-radius: 999px;
    background: var(--panel);
    font-size: 14px;
    text-decoration: none;
}

.toc a:hover {
    border-color: var(--indigo-soft);
    background: var(--callout);
}

/*
 * Sections
 */

.section {
    margin-bottom: 44px;
    scroll-margin-top: 16px;
}

.section-title {
    margin: 0 0 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    color: var(--indigo);
    font-size: 28px;
    font-variant: small-caps;
    letter-spacing: 1px;
}

.section h3 {
    margin-top: 26px;
    font-size: 21px;
}

.section h4 {
    margin: 24px 0 10px;
    color: var(--indigo);
    font-size: 17px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mt-sm {
    margin-top: 14px;
}

.section p, .section li {
    font-size: 16px;
}

/* Numbered list of long clauses (code of conduct): space the items apart. */
.conduct-list > li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.muted {
    color: var(--muted);
}

/* Small bold column heading, a little above body text size (committee lists). */
.section .committee-title {
    margin-top: 0;
    font-size: 17px;
    font-weight: 700;
}

/*
 * Cards
 */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin: 18px 0;
}

.card {
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.card h3 {
    margin-top: 0;
    font-size: 19px;
}

.card > :last-child {
    margin-bottom: 0;
}

.card-feature {
    border-top: 4px solid var(--indigo);
    background: #fff;
}

/*
 * Callouts
 */

.callout {
    margin: 20px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--indigo-mid);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--callout);
}

.callout > :first-child {
    margin-top: 0;
}

.callout > :last-child {
    margin-bottom: 0;
}

.callout-warm {
    border-left-color: var(--accent);
    background: #fff4e5;
}

/*
 * Tables
 */

.table-wrap {
    overflow-x: auto;
    margin: 18px 0;
}

.table-clean {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.table-clean th {
    padding: 10px 12px;
    background: var(--indigo-mid);
    color: #fff;
    font-weight: 700;
    text-align: left;
}

.table-clean tbody th {
    background: var(--callout);
    color: var(--indigo-deep);
    vertical-align: top;
}

.table-clean td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table-clean tbody tr:nth-child(even) td {
    background: var(--panel);
}

/*
 * Programme at a glance
 */

.glance {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 4px;
    font-size: 14px;
    table-layout: fixed;
}

.glance thead th:first-child {
    width: 110px;
}

.glance.glance-even thead th:first-child {
    width: auto;
}

.glance th {
    padding: 10px;
    border-radius: 6px;
    background: var(--indigo-mid);
    color: #fff;
    text-align: center;
}

.glance th small {
    display: block;
    font-weight: 400;
    opacity: 0.9;
}

.glance td {
    padding: 10px;
    border-radius: 6px;
    vertical-align: top;
}

.glance td.time {
    width: 110px;
    background: var(--break);
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

/* Equal-width day columns, for timetables without a time column. */
.glance.glance-even {
    table-layout: fixed;
}

.glance .slot-talk {
    background: var(--talk);
}

.glance .slot-hands {
    background: var(--hands);
}

.glance .slot-break {
    background: var(--break);
    color: var(--muted);
    text-align: center;
}

.glance .slot-empty {
    background: transparent;
}

.glance strong {
    color: var(--indigo-deep);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
}

.legend .swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border-radius: 3px;
    vertical-align: -2px;
}

/*
 * Level markers and tiers
 */

.lvl {
    color: var(--indigo);
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Three-step experience scale (New, Familiar, Experienced). The class
 * name is a mask of the levels a session covers: filled dots for covered
 * levels, hollow dots for the rest, e.g. .l110 = new to familiar. */
.lvl.l100::before { content: "\25CF\25CB\25CB"; }
.lvl.l010::before { content: "\25CB\25CF\25CB"; }
.lvl.l001::before { content: "\25CB\25CB\25CF"; }
.lvl.l110::before { content: "\25CF\25CF\25CB"; }
.lvl.l011::before { content: "\25CB\25CF\25CF"; }
.lvl.l111::before { content: "\25CF\25CF\25CF"; }

.lvl[data-label]::after {
    content: " " attr(data-label);
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0;
}

tr.tier-bronze td,
.tier-bronze {
    background: var(--bronze);
}

tr.tier-silver td,
.tier-silver {
    background: var(--silver);
}

tr.tier-gold td,
.tier-gold {
    background: var(--gold);
}

.tier-table td:first-child {
    width: 110px;
    font-weight: 700;
}

/*
 * Talk cards
 */

.talk {
    margin: 18px 0;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--indigo-mid);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.talk.optional {
    border-left-color: var(--indigo-deep);
    border-left-style: dashed;
}

.talk h3 {
    margin: 0 0 4px;
    font-size: 20px;
}

.talk .code {
    color: var(--accent);
}

.talk .talk-meta {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 14px;
}

.try-it {
    margin: 12px 0 8px;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--hands);
}

.try-it::before {
    content: "Try it: ";
    color: #047857;
    font-weight: 700;
}

.connects {
    color: var(--muted);
    font-size: 14px;
}

/*
 * Pills, buttons and placeholders
 */

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--talk);
    color: var(--indigo-deep);
    font-size: 13px;
    font-weight: 700;
}

.btn-cta, .btn-cta:visited, button.btn-cta {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 999px;
    background: var(--indigo);
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-cta:hover, .btn-cta:focus {
    background: var(--indigo-deep);
    color: #fff;
    text-decoration: none;
}

.btn-ghost, .btn-ghost:visited {
    display: inline-block;
    padding: 11px 24px;
    border: 1px solid var(--indigo);
    border-radius: 999px;
    color: var(--indigo);
    font-weight: 700;
    text-decoration: none;
}

.btn-ghost:hover {
    background: var(--callout);
    text-decoration: none;
}

.tbc {
    border-bottom: 1px dashed var(--accent);
    color: var(--accent);
}

/*
 * Forms (registration page)
 */

.form-section {
    margin: 0 0 28px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.form-section legend {
    width: auto;
    margin: 0;
    padding: 0 8px;
    border: none;
    color: var(--indigo);
    font-family: Raleway, Arial, sans-serif;
    font-size: 21px;
    font-weight: 700;
}

.field {
    margin-bottom: 16px;
}

[hidden] {
    display: none !important;
}

.field > label, .field > .label {
    display: block;
    padding: 0;
    border-radius: 0;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    margin-bottom: 4px;
    color: var(--indigo-deep);
    font-weight: 700;
}

.field .hint {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 14px;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c7cbe6;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
}

.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--indigo);
    outline: 2px solid var(--talk);
}

.req::after {
    content: " *";
    color: var(--accent);
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.choice,
.field .choice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #c7cbe6;
    border-radius: 8px;
    background: #fff;
    font-weight: 400;
    cursor: pointer;
}

.form-section fieldset legend {
    margin-bottom: 4px;
    padding: 0;
    color: var(--indigo-deep);
    font-family: inherit;
    font-size: 16px;
}

.choice input {
    margin-top: 4px;
}

.choice:has(input:checked) {
    border-color: var(--indigo);
    background: var(--callout);
}

.choice small {
    display: block;
    color: var(--muted);
}

/*
 * Footer (shared snippet)
 */

.footer {
    margin-bottom: 28px;
    padding: 0;
    border-radius: var(--radius);
    background-color: #fff;
    text-align: center;
    overflow: hidden;
}

.footer .footer-bar {
    margin: 0;
    padding: 10px;
    background-color: var(--ink);
    color: #e0e7ff;
    letter-spacing: 1px;
}

.footer .logo-bar {
    margin: 0;
    padding: 24px 20px;
}

#logo-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 48px;
    align-items: center;
    justify-content: center;
}

.logo-image {
    max-width: 200px;
    max-height: 90px;
}

.footer .footer-note {
    padding: 0 20px 18px;
    color: var(--muted);
    font-size: 13px;
}

@media print {
    .navbar, .toc, .footer {
        display: none;
    }

    .site-header {
        padding: 12px;
        background: none;
        color: var(--ink);
    }

    .site-header h1, .site-header p {
        color: var(--ink);
    }
}
