:root {
    --ink: #1a2a30;
    --teal: #004e5d;
    --teal-dark: #003844;
    --teal-mid: #0a5f6e;
    --orange: #e87a1a;
    --red: #c5162c;
    --cream: #fff8e0;
    --line: #c9d6da;
    --paper: #fff;
    --muted: #5a6f76;
    --foot: #1a1a1a;
}

* { box-sizing: border-box; }

body.d2 {
    margin: 0;
    color: var(--ink);
    font-family: "Hind Siliguri", sans-serif;
    background:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23004e5d' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        #e8ecea;
}

a { color: var(--teal); }
img { max-width: 100%; height: auto; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 20; }

.portal {
    width: min(1180px, calc(100% - 16px));
    margin: 10px auto 56px;
    background: var(--paper);
    border: 1px solid #b8c8cc;
    box-shadow: 0 8px 28px rgba(0, 40, 48, 0.1);
}

/* —— Banner —— */
.portal-banner {
    position: relative;
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    gap: 10px;
    align-items: center;
    padding: 14px 18px 0;
    background: linear-gradient(180deg, #fff9ef 0%, #fff 55%);
    border-bottom: 0;
    overflow: hidden;
}

.portal-banner--image {
    position: relative;
    display: block;
    padding: 0;
    width: 100%;
    /* Design slot: 1100 × 200 */
    aspect-ratio: 1100 / 200;
    min-height: 200px;
    height: auto;
    background: #e8eef0;
    overflow: hidden;
    line-height: 0;
}

.portal-banner--image picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.portal-banner--image img.portal-banner__photo {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: fill !important;
    object-position: center center !important;
}

.portal-widget__btn--yt { background: #c00 !important; }

.portal-banner__logos {
    display: grid;
    place-items: center;
}

.portal-banner__logos img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #d4e4e8;
}

.portal-banner__center { text-align: center; }

.portal-banner h1 {
    margin: 0;
    color: var(--red);
    font-size: clamp(1.35rem, 3.2vw, 2.05rem);
    font-weight: 700;
    line-height: 1.25;
}

.portal-banner__en {
    margin: 2px 0 0;
    color: #111;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: clamp(0.85rem, 1.8vw, 1.05rem);
}

.portal-kicker {
    margin: 4px 0 0;
    color: var(--teal);
    font-weight: 600;
    font-size: 0.92rem;
}

.portal-banner__strip {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--teal) 0%, var(--teal-mid) 62%, var(--orange) 62%);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.portal-banner__strip span {
    padding: 7px 14px;
    flex: 1;
    text-align: left;
}

.portal-banner__strip em {
    font-style: normal;
    padding: 7px 16px;
    white-space: nowrap;
}

/* —— Meta bar —— */
.portal-meta {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 6px 14px;
    background: var(--teal-dark);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
}

.portal-meta a { color: #fff; text-decoration: none; }

.portal-meta__clock {
    display: flex;
    gap: 6px;
    align-items: center;
}

.portal-meta__clock span,
.portal-meta__clock strong {
    background: #6b1a2a;
    padding: 4px 8px;
    border-radius: 2px;
    font-weight: 700;
}

.portal-meta__anthem {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.portal-meta__anthem audio {
    height: 28px;
    max-width: min(320px, 100%);
}

.portal-meta__hint { opacity: 0.75; font-weight: 500; font-size: 0.8rem; }

.portal-meta__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: flex-end;
}

/* —— Nav —— */
.portal-nav { background: var(--teal); position: relative; }

.menu-toggle {
    display: none;
    width: 100%;
    background: var(--teal-dark);
    color: #fff;
    border: 0;
    padding: 12px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.portal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.portal-links > a,
.portal-links summary {
    color: #fff;
    text-decoration: none;
    padding: 11px 13px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    border: 0;
    background: transparent;
    font: inherit;
}

.portal-links summary::-webkit-details-marker { display: none; }
.portal-links summary::after {
    content: "▾";
    margin-left: 5px;
    color: #ff5a5a;
    font-size: 0.7rem;
}

.portal-home-link {
    background: var(--red) !important;
    min-width: 42px;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1;
}

.portal-links > a[aria-current="page"],
.portal-links > a:hover,
.portal-links summary:hover,
.portal-links details[open] > summary {
    background: #083841;
}

.portal-links details { position: relative; }

.portal-links details > .portal-subnav {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 40;
    min-width: 210px;
    background: var(--cream);
    border: 1px solid #e0d4a4;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.portal-links details[open] > .portal-subnav { display: grid; }

.portal-links details:not([open]) > .portal-subnav {
    display: none !important;
}

.portal-links details a {
    color: var(--teal);
    text-decoration: none;
    padding: 9px 12px;
    font-weight: 600;
    border-bottom: 1px solid #efe6c4;
}

.portal-links details a:hover {
    background: var(--teal);
    color: #fff;
}

.portal-corners {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 12px;
}

.portal-corner {
    background: var(--cream);
    border: 1px solid #e0d4a4;
    border-top: 4px solid var(--corner-color, var(--teal));
    padding: 12px;
}

.portal-corner h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--corner-color, var(--teal));
}

.portal-corner h2 img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.portal-corner a {
    display: block;
    color: var(--teal);
    text-decoration: none;
    padding: 5px 0;
    font-weight: 600;
    border-bottom: 1px solid #efe6c4;
}

.portal-logins img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-right: 6px;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .portal-corners { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .portal-corners { grid-template-columns: 1fr; }
}

.portal-links details .nav-group {
    display: block;
    padding: 8px 12px 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #6b5e3a;
    background: #f7f1da;
    border-bottom: 1px solid #efe6c4;
}

.flash {
    margin: 12px;
    padding: 10px 12px;
    background: #e8f7ef;
    border: 1px solid #b7e4c7;
}

.portal-alert,
.portal-ticker {
    margin: 0;
    overflow: hidden;
    background: var(--teal);
    color: #fff;
    font-weight: 600;
}

.portal-ticker__track {
    display: inline-block;
    white-space: nowrap;
    padding: 8px 0;
    animation: d2-ticker 28s linear infinite;
}

@keyframes d2-ticker {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

/* Active notices bar (below nav) — right to left */
.portal-notice-marquee {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    background: #fff8ef;
    min-height: 38px;
}

.portal-notice-marquee__label {
    display: grid;
    place-items: center;
    padding: 0 14px;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.portal-notice-marquee__viewport {
    overflow: hidden;
    display: flex;
    align-items: center;
}

.portal-notice-marquee__track {
    display: flex;
    width: max-content;
    animation: d2-notice-rtl var(--notice-marquee-duration, 12s) linear infinite;
}

.portal-notice-marquee:hover .portal-notice-marquee__track {
    animation-play-state: paused;
}

.portal-notice-marquee__group {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 8px 0;
}

.portal-notice-marquee__group a {
    color: var(--teal-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0 4px;
}

.portal-notice-marquee__group a:hover {
    color: var(--orange);
    text-decoration: underline;
}

.portal-notice-marquee__sep {
    color: var(--orange);
    padding: 0 10px;
    font-weight: 700;
}

@keyframes d2-notice-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* —— Home grid —— */
.portal-home {
    display: grid;
    grid-template-columns: 200px 1fr 240px;
    gap: 12px;
    padding: 12px;
}

.portal-side,
.portal-board,
.portal-card {
    border: 1px solid var(--line);
    background: #fff;
}

.portal-side h2,
.portal-card > h2,
.sheet-title,
.portal-widget h2 {
    margin: 0;
    padding: 9px 12px;
    background: var(--teal);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
}

.portal-side a {
    display: block;
    padding: 9px 12px;
    border-bottom: 1px dashed #d5e2e4;
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
}

.portal-side a:hover { background: #f0f8f9; }

.portal-slider {
    position: relative;
    min-height: 260px;
    background: #12343c;
    overflow: hidden;
    border: 1px solid var(--line);
}

.portal-slider .slide {
    display: none;
    margin: 0;
    min-height: 260px;
}

.portal-slider .slide.is-active { display: block; }

.portal-slider img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.portal-slider figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 8px 12px;
    color: #fff;
    background: rgba(8, 32, 38, 0.65);
}

.portal-slider__prev,
.portal-slider__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.portal-slider__prev { left: 8px; }
.portal-slider__next { right: 8px; }

.portal-board {
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.portal-activities {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #fff;
}

.portal-activities > h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: var(--teal);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 2px 2px 0 0;
}

.portal-activities__icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
}

.portal-activities__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-activities__list > li {
    border-bottom: 1px solid #e5eef0;
}

.portal-activities__list > li:last-child {
    border-bottom: 0;
}

.portal-activities__item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
}

.portal-activities__item:hover .portal-activities__title {
    color: var(--teal);
}

.portal-activities__date {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 6px 4px;
    border-radius: 6px;
    background: var(--teal);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.portal-activities__date--empty {
    opacity: 0.55;
}

.portal-activities__title {
    color: #16343c;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.portal-activities__empty {
    padding: 16px 14px;
    color: #5b6b72;
    font-size: 0.92rem;
}

.portal-activities__more {
    display: block;
    margin-top: auto;
    padding: 12px 14px 14px;
    text-align: center;
    color: #1a6bb5;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.portal-activities__more:hover {
    text-decoration: underline;
    color: var(--teal);
}

.portal-widget { border-top: 1px solid var(--line); }
.portal-widget__btn {
    display: inline-block;
    margin: 10px 12px 14px;
    padding: 7px 14px;
    background: #1877f2;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
}

/* —— Speeches / modules —— */
.portal-speeches,
.portal-modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 12px 12px;
}

.portal-card { margin: 0; }
.portal-card p { margin: 10px 12px; }
.portal-empty { color: var(--muted); }

.portal-card a,
.sheet a.more,
.portal-more {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
}

.portal-more {
    display: inline-block;
    margin: 0 12px 12px;
    font-size: 0.9rem;
}

.speech {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 12px;
}

.speech img {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.speech strong { display: block; margin-bottom: 4px; }

.portal-people-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 12px 12px;
    align-items: stretch;
}

.portal-people-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.portal-people-card .portal-more {
    margin-top: auto;
}

.portal-people__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 4px;
}

.portal-people__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
    font-size: 0.88rem;
}

.portal-people__table th,
.portal-people__table td {
    border: 1px solid #d5e2e5;
    padding: 8px 10px;
    text-align: left;
}

.portal-people__table thead th {
    background: var(--teal);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.portal-people__table tbody tr:nth-child(even) {
    background: #f7fafb;
}

.portal-people__empty {
    color: var(--muted);
    text-align: center;
}

.portal-teachers-wrap {
    padding: 10px 8px 6px;
}

.portal-teachers-wrap--marquee {
    overflow: hidden;
}

.portal-teachers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px 10px;
    padding: 4px 6px 8px;
    justify-items: center;
}

.portal-teachers--marquee {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    width: max-content;
    padding: 4px 0 8px;
    animation: d2-teachers-rtl 45s linear infinite;
}

.portal-teachers-wrap--marquee:hover .portal-teachers--marquee {
    animation-play-state: paused;
}

.portal-teachers__track {
    display: contents;
}

.portal-teachers--marquee .portal-teachers__track {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    padding: 0 9px;
}

.portal-teachers a,
.portal-teachers__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 140px;
    text-align: center;
    color: inherit;
    text-decoration: none;
}

.portal-teachers--marquee a,
.portal-teachers--marquee .portal-teachers__item {
    flex: 0 0 120px;
    width: 120px;
    max-width: 120px;
}

.portal-teachers img,
.portal-teachers span {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    margin: 0 auto 8px;
    background: #e7f1f2;
    border: 3px solid var(--teal);
    font-weight: 700;
    color: var(--teal);
    flex: 0 0 auto;
}

.portal-teachers strong {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 4px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
    text-align: center;
    line-height: 1.35;
    word-break: break-word;
}

.portal-teachers em {
    display: inline-block;
    width: auto;
    max-width: calc(100% - 8px);
    margin: 6px auto 0;
    padding: 3px 10px;
    background: var(--teal);
    color: #fff;
    font-style: normal;
    font-size: 0.75rem;
    border-radius: 2px;
    text-align: center;
    line-height: 1.25;
    box-sizing: border-box;
}

@keyframes d2-teachers-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .portal-notice-marquee__track,
    .portal-teachers--marquee,
    .portal-ticker__track {
        animation: none !important;
    }

    .portal-teachers-wrap--marquee {
        overflow-x: auto;
    }

    .portal-teachers--marquee {
        width: auto;
    }
}

.portal-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}

.portal-links-grid a {
    display: block;
    padding: 10px 8px;
    border: 1px solid var(--line);
    text-align: center;
    text-decoration: none;
    color: var(--teal);
    font-weight: 700;
    background: #f7fbfb;
}

.portal-links-grid a:hover {
    background: var(--teal);
    color: #fff;
}

/* —— Daily attendance 3-column row —— */
.portal-att-row {
    display: grid;
    grid-template-columns: minmax(170px, 200px) minmax(0, 1fr) minmax(190px, 230px);
    gap: 12px;
    padding: 0 12px 12px;
    align-items: start;
}

.portal-att-row__side {
    display: grid;
    gap: 12px;
}

.portal-att-box {
    border: 1px solid var(--line);
    background: #fff;
}

.portal-att-box > h2,
.portal-calendar > h2,
.portal-visitors > h2 {
    margin: 0;
    padding: 9px 12px;
    background: var(--teal);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.portal-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 8px;
    font-size: 0.72rem;
    text-align: center;
}

.portal-calendar__dow {
    color: var(--muted);
    font-weight: 700;
}

.portal-calendar__grid span {
    padding: 4px 0;
}

.portal-calendar__grid .is-today {
    background: var(--teal);
    color: #fff;
    border-radius: 3px;
    font-weight: 700;
}

.portal-visitors__row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px dashed #d5e2e4;
    font-weight: 600;
}

.portal-visitors__row strong {
    color: var(--teal-dark);
}

.portal-side-banner {
    overflow: hidden;
    line-height: 0;
    background: #f3f6f7;
}

.portal-side-banner img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 120px;
    object-fit: cover;
    background: #e8eef0;
}

.portal-links-grid--icons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}

.portal-links-grid--icons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 78px;
    padding: 8px 6px;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.25;
}

.portal-links-grid--icons img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.portal-fb__card {
    background: #fff;
}

.portal-fb__cover {
    position: relative;
    min-height: 110px;
    background: linear-gradient(135deg, #4267b2, #365899) center / cover no-repeat;
}

.portal-fb__cover-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 42px;
    font-weight: 800;
    font-family: Arial, sans-serif;
}

.portal-fb__body {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px 4px;
}

.portal-fb__profile {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    margin-top: -28px;
    background: #4267b2;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.portal-fb__profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-fb__meta {
    min-width: 0;
}

.portal-fb__meta strong {
    display: block;
    font-size: 0.92rem;
    color: #1c1e21;
    line-height: 1.25;
}

.portal-fb__meta em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-size: 0.78rem;
    color: #65676b;
}

.portal-fb__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 12px 12px;
}

.portal-fb__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    background: #1877f2;
    color: #fff !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
}

.portal-fb__btn--light {
    background: #e4e6eb;
    color: #050505 !important;
}

.portal-fb__btn:hover {
    filter: brightness(0.96);
}

.portal-attendance {
    min-width: 0;
    padding: 8px;
    border: 1px solid #9aa7ab;
    background: #f2f4f5;
}

.portal-attendance__head {
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid #b8c2c5;
    background: #e8ecee;
}

.portal-attendance__head h2 {
    margin: 0;
    font-size: 0.98rem;
    color: #1d2c31;
    text-align: center;
}

.portal-attendance__head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    text-align: center;
}

.portal-attendance__card {
    margin: 0 0 8px;
    padding: 10px;
    border: 1px solid #7fa8b2;
    background: #fff;
}

.portal-attendance__card:last-child {
    margin-bottom: 0;
}

.portal-attendance__card > h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #0b5f6e;
    font-size: 0.98rem;
}

.portal-attendance__card > h3 svg {
    width: 20px;
    height: 20px;
    fill: var(--teal);
    flex: 0 0 auto;
}

.portal-attendance__card > h4 {
    margin: 12px 0 8px;
    font-size: 0.9rem;
    color: var(--ink);
}

.portal-attendance__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.portal-attendance__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 360px;
    font-size: 0.88rem;
}

.portal-attendance__table th,
.portal-attendance__table td {
    border: 1px solid #d5e2e5;
    padding: 8px 8px;
    text-align: center;
    white-space: nowrap;
}

.portal-attendance__table thead th {
    background: var(--teal);
    color: #fff;
    font-weight: 700;
}

.portal-attendance__table tbody tr:nth-child(even) {
    background: #f7fafb;
}

.portal-attendance__empty {
    color: var(--muted);
    white-space: normal;
}

/* —— Board results summary —— */
.portal-results {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(220px, 0.85fr);
    gap: 12px;
    padding: 0 12px 12px;
    align-items: start;
}

.portal-results--links-only,
.portal-results--main-only {
    grid-template-columns: 1fr;
}

.portal-modules--full {
    grid-template-columns: 1fr;
}

.portal-results__wrap {
    padding: 8px 10px 12px;
}

.portal-results__group + .portal-results__group {
    margin-top: 14px;
}

.portal-results__group h3 {
    margin: 0 0 8px;
    padding: 6px 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--teal-dark);
    background: #eef5f6;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.portal-results__scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.portal-results__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: 0.88rem;
}

.portal-results__table th,
.portal-results__table td {
    border: 1px solid #d7e2e5;
    padding: 7px 6px;
    text-align: center;
    white-space: nowrap;
}

.portal-results__table thead th {
    background: #f0f5f6;
    color: var(--ink);
    font-weight: 700;
}

.portal-results__table tbody tr:nth-child(even) {
    background: #f7fafb;
}

.portal-results__table tbody tr:nth-child(odd) {
    background: #fff;
}

.portal-results__links .portal-links-grid {
    padding-top: 10px;
}

.portal-logins {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 0 12px 18px;
}

.portal-logins a {
    display: grid;
    place-items: center;
    min-height: 72px;
    border: 2px solid #2a3438;
    border-radius: 8px;
    background: #fafafa;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    padding: 8px;
}

.portal-logins a:hover {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

/* —— Footer —— */
.portal-foot {
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr;
    gap: 18px;
    padding: 22px 18px 10px;
    background: var(--foot);
    color: #f0f0f0;
}

.portal-foot h2 {
    margin: 0 0 10px;
    color: #e8c96a;
    font-size: 1rem;
    border-bottom: 2px solid #e8c96a;
    padding-bottom: 4px;
    display: inline-block;
}

.portal-foot a,
.portal-foot p {
    color: #e7e7e7;
    text-decoration: none;
    display: block;
    margin: 5px 0;
    font-size: 0.92rem;
}

.portal-foot a:hover { color: #e8c96a; }

.portal-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.portal-social a {
    display: inline-block;
    padding: 5px 10px;
    background: var(--teal);
    color: #fff !important;
    border-radius: 3px;
    font-size: 0.8rem;
    margin: 0;
}

.portal-copy {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #34383c;
    padding-top: 10px;
    margin: 8px 0 0 !important;
    font-size: 0.85rem;
}

.portal-copy span:last-child { color: #e8c96a; }

.whatsapp {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: transparent;
    font-size: 0;
    z-index: 40;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.whatsapp::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: center / 28px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M17.5 14.4c-.3-.1-1.6-.8-1.8-.9-.2-.1-.4-.1-.6.1-.2.2-.7.9-.8 1-.2.2-.3.2-.6.1-.3-.1-1.2-.4-2.3-1.4-.8-.8-1.4-1.7-1.6-2-.2-.3 0-.4.1-.6l.5-.6c.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5l-.8-1.9c-.2-.5-.4-.4-.6-.4h-.5c-.2 0-.5.1-.7.3-.2.3-.9.9-.9 2.1s.9 2.4 1 2.6c.1.2 1.8 2.8 4.4 3.9 1.6.7 2.2.8 3 .7.5-.1 1.6-.6 1.8-1.3.2-.6.2-1.2.1-1.3-.1-.1-.3-.2-.6-.3z'/%3E%3Cpath d='M12 2a10 10 0 0 0-8.7 15l-1.1 4 4.1-1.1A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.1l-.3-.2-2.5.7.7-2.4-.2-.3A8.2 8.2 0 1 1 12 20.2z'/%3E%3C/svg%3E");
}

/* —— Inner pages —— */
.sheet {
    margin: 16px 12px 22px;
    border: 1px solid var(--line);
    background: #fff;
}

.sheet-title {
    text-align: center;
    background: transparent !important;
    color: var(--teal) !important;
    font-size: 1.6rem !important;
    padding: 18px 12px 6px !important;
    position: relative;
}

.sheet-title::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin: 10px auto 0;
    background: var(--orange);
    border-radius: 2px;
    box-shadow: 18px 0 0 var(--orange), -18px 0 0 var(--orange);
}

.sheet-body,
.panel-body { padding: 14px; }

.people,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.contact-list {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
}

.contact-list > div {
    padding: 12px;
    background: #f4f8f9;
    border: 1px solid var(--line);
}

input,
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c5d4d8;
    font: inherit;
}

button,
.btn {
    background: var(--teal);
    color: #fff;
    border: 0;
    padding: 8px 14px;
    font: inherit;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border: 1px solid var(--line);
    padding: 8px;
    text-align: left;
}

th {
    background: var(--teal);
    color: #fff;
}

tr:nth-child(even) { background: #f5f9fa; }

@media (max-width: 980px) {
    .portal-home,
    .portal-speeches,
    .portal-modules,
    .portal-people-grid,
    .portal-att-row,
    .portal-results,
    .portal-foot,
    .portal-logins,
    .contact-list {
        grid-template-columns: 1fr;
    }

    .portal-att-row {
        display: flex;
        flex-direction: column;
    }

    .portal-att-row > .portal-attendance {
        order: -1;
    }

    .portal-att-row__side {
        grid-template-columns: 1fr;
    }

    .portal-attendance__table {
        min-width: 300px;
        font-size: 0.82rem;
    }

    .portal-attendance__table th,
    .portal-attendance__table td {
        padding: 7px 6px;
    }

    .portal-attendance__head h2 {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .portal-links-grid {
        grid-template-columns: 1fr 1fr;
    }

    .portal-banner:not(.portal-banner--image) {
        grid-template-columns: 72px 1fr 72px;
    }

    .portal-banner__logos img {
        width: 64px;
        height: 64px;
    }

    .portal-meta {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .portal-meta__contact { justify-content: center; }

    .menu-toggle { display: block; }

    .portal-links {
        display: none;
        flex-direction: column;
    }

    .portal-nav.is-open .portal-links { display: flex; }

    .portal-links details > .portal-subnav {
        position: static;
        border: 0;
        background: #083841;
        box-shadow: none;
    }

    .portal-links details a { color: #fff; border-color: #0f4a55; }
}

@media (max-width: 560px) {
    .portal-att-row,
    .portal-results,
    .portal-modules,
    .portal-speeches,
    .portal-logins {
        padding-left: 8px;
        padding-right: 8px;
    }

    .portal-attendance {
        padding: 6px;
    }

    .portal-attendance__card > h3 {
        font-size: 0.9rem;
    }

    .portal-calendar__grid {
        font-size: 0.68rem;
    }
}
