/*
 * Tentative Conference Agenda (issue #1246)
 * Scoped under .agx. Sites override the brand variables on .agx in their page.
 */
.agx {
    --agx-primary: #0d2a66;      /* dark session / primary card */
    --agx-primary-2: #1b3f8f;
    --agx-accent: #f7941d;       /* title highlight, submit button */
    --agx-info: #1aa7df;         /* registration button, pills */
    --agx-text: #13213c;
    --agx-muted: #66708a;
    --agx-line: #dfe5f0;
    --agx-soft: #f4f7fc;
    --agx-info-soft: #e6f5fc;    /* pill / eyebrow background */
    --agx-info-line: #bfe6f6;
    --agx-rail: #cfe3f5;         /* timeline line */
    --agx-tab-hover: #e8eef9;
    --agx-accent-ink: #fff;      /* text on accent button */
    --agx-title-accent: var(--agx-accent); /* highlighted word in the title */
    --agx-heading: var(--agx-primary);     /* page, day, item and track headings */
    --agx-radius: 10px;


    color: var(--agx-text);
    padding: 0 0 24px;  /* no gap above: the white column starts right after the page furniture */
    background: transparent;
    font-size: 15px;
    line-height: 1.5;
}

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

.agx-wrap { max-width: 1170px; margin: 0 auto; padding: 32px 15px 40px; background: #fff; }

.agx .agx-wrap h2, .agx .agx-wrap h3, .agx .agx-wrap h4, .agx .agx-wrap h5 {
    margin: 0; padding: 0; border: 0; background: none; color: inherit;
    text-transform: none; letter-spacing: normal; text-decoration: none; text-shadow: none;
    font-family: inherit; line-height: 1.3; text-align: left; opacity: 1; float: none; width: auto;
}
.agx .agx-wrap p { text-align: left; }
/* the page heading block stays centred (3 classes beats the reset above) */
.agx .agx-head .agx-title, .agx .agx-head .agx-intro, .agx .agx-head .agx-eyebrow { text-align: center; }
.agx h2::before, .agx h3::before, .agx h4::before, .agx h5::before,
.agx h2::after, .agx h3::after, .agx h4::after, .agx h5::after { content: none; }
.agx p { margin: 0; padding: 0; text-align: left; font-size: inherit; line-height: 1.5; }

/* Heading */
.agx-head { text-align: center; margin-bottom: 28px; }
.agx-eyebrow {
    display: inline-block; padding: 5px 14px; border-radius: 4px;
    background: var(--agx-info-soft); color: var(--agx-info); border: 1px solid var(--agx-info-line);
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.agx .agx-title { font-size: 34px; font-weight: 800; color: var(--agx-heading); margin-top: 12px; line-height: 1.2; text-align: center; }
.agx .agx-title span { color: var(--agx-title-accent); }
.agx .agx-intro { max-width: 720px; margin: 10px auto 0; color: var(--agx-muted); text-align: center; }

/* Summary cards */
.agx-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.agx-card {
    border: 1px solid var(--agx-line); border-radius: var(--agx-radius); padding: 14px 16px;
    background: #fff; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.agx-card-label { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--agx-muted); }
.agx-card strong { font-size: 20px; font-weight: 700; color: var(--agx-primary); }
.agx-card small { font-size: 12px; color: var(--agx-muted); overflow-wrap: anywhere; }
.agx-card--primary { background: var(--agx-primary); border-color: var(--agx-primary); }
.agx-card--primary .agx-card-label,
.agx-card--primary small { color: rgba(255, 255, 255, .75); }
.agx-card--primary strong { color: #fff; }

/* Notice */
.agx-notice {
    display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 18px;
    background: #fff7ec; border: 1px solid #fbd9ae; border-left: 4px solid var(--agx-accent); border-radius: var(--agx-radius);
}
.agx-notice-icon {
    flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--agx-accent); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.agx-notice-text { flex: 1; min-width: 0; }
.agx-notice-text strong { color: #b35c00; }
.agx-notice-text p { font-size: 13px; color: #7a5a35; margin-top: 2px; }
/* Day tabs */
.agx-tabs {
    scroll-margin-top: 90px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; margin-bottom: 18px;
    border: 1px solid var(--agx-line); border-radius: var(--agx-radius); background: var(--agx-soft);
}
.agx-tab {
    display: flex; flex-direction: column; align-items: center; padding: 10px 8px; border-radius: 7px;
    color: var(--agx-primary); text-decoration: none; text-align: center;
}
.agx-tab:hover, .agx-tab:focus { text-decoration: none; color: var(--agx-primary); background: var(--agx-tab-hover); }
.agx-tab strong { font-size: 14px; }
.agx-tab span { font-size: 12px; color: var(--agx-muted); }
.agx-tab.is-active { background: var(--agx-primary); color: #fff; }
.agx-tab.is-active span { color: rgba(255, 255, 255, .75); }

.agx-explainer {
    background: var(--agx-info-soft); border: 1px solid var(--agx-info-line); border-radius: var(--agx-radius);
    padding: 12px 16px; margin-bottom: 8px; font-size: 13px; color: var(--agx-muted);
}
.agx-explainer p { font-size: 13px; }
.agx-explainer strong { display: block; color: var(--agx-info); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* Day */
.agx-day { padding-top: 28px; scroll-margin-top: 90px; }
/* One day at a time: Day 01 on page load. The script switches days; without it,
   the #agx-day-N link target still opens the other day. */
.agx-day:not(.is-active) { display: none; }
.agx:not(.agx--tabbed) .agx-day:target { display: block; }
.agx:not(.agx--tabbed) .agx-days:has(.agx-day:target) .agx-day.is-active:not(:target) { display: none; }
.agx-day-switch { text-align: right; margin-top: 4px; }
.agx-day-switch a {
    display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
    color: var(--agx-primary); background: var(--agx-tab-hover); text-decoration: none;
}
.agx-day-switch a:hover, .agx-day-switch a:focus { color: #fff; background: var(--agx-primary); text-decoration: none; }
.agx-day-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.agx-day-kicker { color: var(--agx-title-accent); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.agx .agx-day-head h3 { font-size: 26px; font-weight: 800; color: var(--agx-heading); }
.agx-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.agx-pill {
    background: var(--agx-info-soft); color: var(--agx-info); border-radius: 999px; padding: 5px 14px;
    font-size: 11px; font-weight: 700; letter-spacing: .05em;
}

/* Timeline */
.agx-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.agx-timeline::before {
    content: ""; position: absolute; left: 104px; top: 6px; bottom: 6px; width: 2px; background: var(--agx-rail);
}
.agx-slot { display: grid; grid-template-columns: 90px 1fr; gap: 30px; margin-bottom: 14px; position: relative; }
.agx-slot::before {
    content: ""; position: absolute; left: 99px; top: 16px; width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 3px solid var(--agx-info);
}
.agx-slot--session::before { border-color: var(--agx-accent); }
.agx-slot-time { text-align: right; padding-top: 10px; }
.agx-slot-time strong { display: block; font-size: 13px; color: var(--agx-primary); }
.agx-slot-time span { font-size: 11px; color: var(--agx-muted); }

.agx-item {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    border: 1px solid var(--agx-line); border-radius: var(--agx-radius); padding: 14px 18px; background: #fff;
}
.agx .agx-item h4 { font-size: 15px; font-weight: 700; color: var(--agx-heading); }
.agx-item p { font-size: 12.5px; color: var(--agx-muted); margin-top: 2px; }

.agx-tag {
    flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; border-radius: 4px;
    padding: 4px 12px; background: var(--agx-info-soft); color: var(--agx-info);
}
.agx-tag--plenary { background: var(--agx-tab-hover); color: var(--agx-primary); }
.agx-tag--break { background: #eef7f0; color: #3f7e44; }
.agx-tag--closing, .agx-tag--awards { background: #fff2e3; color: #c46a00; }

/* Technical session */
.agx-session { border-radius: var(--agx-radius); overflow: hidden; border: 1px solid var(--agx-line); background: #fff; }
.agx-session-head {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px;
    background: linear-gradient(90deg, var(--agx-primary), var(--agx-primary-2)); color: #fff;
}
/* SDG model: square SDG badge(s) at the left of the session header */
.agx-session-badges { flex: 0 0 auto; display: flex; gap: 6px; }
.agx .agx-session-badge {
    box-sizing: border-box; flex: 0 0 auto; width: 40px; height: 40px; min-width: 40px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center; line-height: 1;
    font-weight: 800; font-size: 18px; color: #fff; text-align: center;
}
.agx-session-sep { opacity: .55; margin: 0 8px; }
.agx-session-titles { flex: 1; min-width: 0; }
.agx-session-kicker { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.agx .agx-session-head h4 { font-size: 16px; font-weight: 700; color: #fff; }
.agx .agx-session-head h4 small { font-weight: 500; opacity: .8; font-size: 12px; }
.agx-session-count {
    flex: 0 0 auto; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 4px 12px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: #fff;
}

.agx-tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.agx-tracks--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agx-track {
    border: 1px solid var(--agx-line); border-top: 3px solid var(--agx-info); border-radius: 6px;
    padding: 12px 14px; background: #fff; min-width: 0;
}
.agx-track-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.agx-track-no { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--agx-info); text-transform: uppercase; }
.agx .agx-track h5 { font-size: 14px; font-weight: 700; color: var(--agx-heading); margin-top: 4px; line-height: 1.35; overflow-wrap: anywhere; }
.agx-track-sdgs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; max-width: 45%; }
.agx-track-body { border-top: 1px dashed var(--agx-line); margin-top: 12px; padding-top: 10px; }
.agx-track-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--agx-muted); }
.agx-track-body p {
    font-size: 12px; color: var(--agx-muted); margin-top: 4px;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.agx-empty { padding: 14px 18px; color: var(--agx-muted); font-size: 13px; }

/* Scoped under .agx so a site rule for bare spans cannot flatten the chips. */
.agx .agx-sdg-chip {
    box-sizing: border-box; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    min-width: 26px; height: 26px; padding: 0 6px; margin: 0; border-radius: 4px; line-height: 1;
    color: #fff; font-size: 11px; font-weight: 800; text-align: center; vertical-align: middle;
}

/* Aligned SDGs */
.agx-aligned {
    display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 28px 0 0 120px;
    border: 1px solid var(--agx-line); border-radius: var(--agx-radius); padding: 14px 18px;
}
.agx-aligned-head strong { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--agx-primary); display: block; }
.agx-aligned-head span { font-size: 12px; color: var(--agx-muted); }
.agx-aligned-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.agx .agx .agx-aligned-item { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.3; color: var(--agx-muted); }

/* CTA */
.agx-cta {
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 32px; padding: 22px 26px; border-radius: var(--agx-radius);
    background: var(--agx-soft); border: 1px solid var(--agx-line);
}
.agx .agx-cta h3 { font-size: 22px; font-weight: 800; color: var(--agx-heading); }
.agx-cta p { color: var(--agx-muted); font-size: 13px; }
.agx-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.agx-btn {
    display: inline-block; padding: 10px 18px; border-radius: 4px; color: #fff; font-weight: 700;
    font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
}
.agx-btn:hover, .agx-btn:focus { color: #fff; text-decoration: none; opacity: .9; }
.agx-btn--accent,
.agx-btn--accent:hover,
.agx-btn--accent:focus { background: var(--agx-accent); color: var(--agx-accent-ink); }
.agx-btn--info { background: var(--agx-info); }

/* Responsive */
@media (max-width: 1100px) {
    .agx-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .agx-tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agx-aligned { margin-left: 0; }
}
@media (max-width: 640px) {
    .agx { padding: 32px 0 40px; }
    .agx .agx-title { font-size: 26px; }
    .agx-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agx-card--primary { grid-column: 1 / -1; }
    .agx-timeline::before { left: 5px; }
    .agx-slot { grid-template-columns: 1fr; gap: 6px; padding-left: 24px; }
    .agx-slot::before { left: 0; top: 4px; }
    .agx-slot-time { text-align: left; padding-top: 0; }
    .agx-slot-time strong, .agx-slot-time span { display: inline; }
    .agx-slot-time span::before { content: " – "; }
    .agx-item { flex-direction: column; align-items: flex-start; }
    .agx-session-head { flex-wrap: wrap; }
    .agx-tracks, .agx-tracks--two { grid-template-columns: 1fr; padding: 10px; }
    .agx .agx-day-head h3 { font-size: 21px; }
    .agx-cta { padding: 18px; }
}
