/* DCIF — Digital Communications India Forum · redesigned site
   Design tokens → base → layout → components → pages */

:root {
  --ink: #0e1033;
  --ink-2: #2b2f55;
  --muted: #5a6085;
  --brand: #2c2a85;        /* logo indigo */
  --brand-700: #1d1c5f;
  --brand-900: #12123d;
  --brand-50: #eef0ff;
  --brand-100: #dde1ff;
  --accent: #f5a524;       /* vibrant amber for interactive elements */
  --accent-600: #e08e0b;
  --accent-ink: #231701;
  --bg: #f5f6fb;
  --card: #ffffff;
  --line: #e2e5f2;
  --ok: #0f8a5f;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(18, 18, 61, .06), 0 2px 8px rgba(18, 18, 61, .05);
  --shadow: 0 10px 30px -10px rgba(18, 18, 61, .25);
  --maxw: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.7;
  color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6em; font-weight: 750; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 8px; z-index: 1000; font-weight: 600; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(48px, 7vw, 92px) 0; }
.section--tight { padding: clamp(32px, 4vw, 56px) 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); background: var(--brand-50); padding: .3rem .7rem; border-radius: 99px; margin-bottom: 1rem; }
.section-head { max-width: 720px; margin: 0 auto 2.4rem; text-align: center; }
.section-head p { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 650; font-size: .95rem; line-height: 1; padding: .9rem 1.4rem; border-radius: 99px; border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .2s, color .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -6px rgba(245, 165, 36, .8); }
.btn-primary:hover { background: var(--accent-600); color: var(--accent-ink); }
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover { background: var(--brand-700); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: #fff; color: var(--brand-900); }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand-100); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-700); }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.btn-sm { padding: .65rem 1.05rem; font-size: .88rem; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--brand-900); color: #cfd3ff; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #e8eaff; text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
.topbar a:hover { color: var(--accent); }
.topbar-contact { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.topbar-social { display: flex; gap: .9rem; }
.topbar-social span { display: inline-flex; }
.topbar svg, .ico { width: 1em; height: 1em; fill: currentColor; flex: none; }
.topbar svg { width: 15px; height: 15px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-stuck { box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); }
#site-header, #site-footer { display: contents; }   /* injected shared layout; keeps the header sticky */
.brand img { height: 58px; width: auto; mix-blend-mode: multiply; }
.brand-text { display: none; line-height: 1.2; }
.brand-text strong { display: block; font-size: .95rem; letter-spacing: -.01em; color: var(--brand-900); }
.brand-text span { font-size: .72rem; color: var(--muted); font-weight: 500; }
@media (min-width: 1500px) { .brand-text { display: block; } }

.nav { display: none; }
.nav-list, .nav-list ul { list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list a, .nav-list button.nav-toggle { font: inherit; font-size: .84rem; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: .3rem; padding: .7rem .7rem; border-radius: 8px; white-space: nowrap; width: 100%; text-align: left; }
.nav-list a:hover, .nav-list button.nav-toggle:hover, .nav-list li.is-open > button.nav-toggle { color: var(--brand); background: var(--brand-50); }
.nav-list a[aria-current="page"], .nav-list li.has-current > a, .nav-list li.has-current > button.nav-toggle { color: var(--brand); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 8px 8px 0 0; }
.chev { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.4; transition: transform .2s; }
.is-open > .nav-toggle .chev { transform: rotate(180deg); }
.nav-search { margin-left: .3rem; }
.icon-btn { background: var(--brand-50); border: 0; color: var(--brand); width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--brand-100); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.menu-btn { display: inline-grid; }
@media (min-width: 1100px) { .menu-btn { display: none; } }

/* dropdowns (desktop) */
@media (min-width: 1100px) {
  .nav { display: block; }
  .nav-list { display: flex; align-items: center; gap: .1rem; }
  .nav-list ul { position: absolute; left: 0; top: calc(100% + 6px); min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; z-index: 20; }
  .nav-list li:hover > ul, .nav-list li.is-open > ul, .nav-list li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
  .nav-list ul a, .nav-list ul button.nav-toggle { text-transform: none; font-size: .92rem; font-weight: 550; letter-spacing: 0; justify-content: space-between; }
  .nav-list ul ul { left: 100%; top: -9px; }
  .nav-list ul .chev { transform: rotate(-90deg); }
  .nav-list ul .is-open > .nav-toggle .chev { transform: rotate(-90deg); }
  .nav-list > li:nth-last-child(-n+3) > ul { left: auto; right: 0; }
  .nav-list > li:nth-last-child(-n+3) ul ul { left: auto; right: 100%; }
  .nav-list ul li.has-current > a, .nav-list ul li.has-current > button.nav-toggle, .nav-list ul a[aria-current="page"] { box-shadow: none; background: var(--brand-50); border-radius: 8px; }
  .nav-list ul li { position: relative; }
}

/* mobile menu */
@media (max-width: 1099.98px) {
  /* backdrop-filter would make the header the containing block of the fixed drawer (it collapsed to header height) */
  .site-header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav { position: fixed; inset: 0 0 0 auto; width: min(380px, 100%); background: #fff; transform: translateX(105%); transition: transform .28s ease; z-index: 200; overflow-y: auto; padding: 5rem 1rem 2rem; display: block; box-shadow: var(--shadow); visibility: hidden; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav-list a, .nav-list button.nav-toggle { padding: .9rem .8rem; font-size: .9rem; justify-content: space-between; }
  .nav-list ul { display: none; padding-left: .9rem; border-left: 2px solid var(--brand-100); margin: 0 0 .3rem .8rem; }
  .nav-list li.is-open > ul { display: block; }
  .nav-list ul a, .nav-list ul button.nav-toggle { text-transform: none; font-weight: 550; font-size: .95rem; }
  .nav-close { position: absolute; top: 1rem; right: 1rem; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(14, 16, 51, .55); z-index: 99; opacity: 0; visibility: hidden; transition: .25s; }
  .nav-backdrop.is-on { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
}
@media (min-width: 1100px) { .nav-close, .nav-backdrop { display: none; } }

/* search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(14, 16, 51, .72); display: none; padding: 8vh 16px 16px; }
.search-overlay.is-on { display: block; }
.search-box { max-width: 680px; margin: 0 auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.search-box input { width: 100%; font: inherit; font-size: 1.1rem; padding: 1.1rem 1.3rem; border: 0; border-bottom: 1px solid var(--line); outline: none; }
.search-results { max-height: 55vh; overflow: auto; list-style: none; margin: 0; padding: .4rem; }
.search-results a { display: block; padding: .7rem .9rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a:focus { background: var(--brand-50); }
.search-results small { display: block; color: var(--muted); }
.search-hint { padding: 1rem 1.3rem; color: var(--muted); font-size: .9rem; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; color: #fff; background: var(--brand-900) center/cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 16, 51, .55), rgba(14, 16, 51, .86)), radial-gradient(60% 80% at 80% 10%, rgba(44, 42, 133, .55), transparent); z-index: -1; }
.hero .container { padding: clamp(64px, 11vw, 140px) 0 clamp(96px, 12vw, 150px); text-align: center; max-width: 920px; }
.hero h1 { color: #fff; margin-bottom: .5rem; text-wrap: balance; }
.hero h1 .unit { display: block; font-size: .55em; font-weight: 600; color: var(--accent); letter-spacing: .02em; margin-top: .3rem; }
.hero .reg { color: #c8ccf5; font-size: .95rem; margin: 1rem auto 1.8rem; max-width: 640px; }
.hero .tag { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 650; color: #fff; margin: 0 0 .4rem; }
.hero .tag--sub { font-size: 1rem; font-weight: 500; color: #d9dcff; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

.stats { margin-top: calc(-1 * clamp(48px, 6vw, 70px)); position: relative; z-index: 2; }
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.stats li { padding: 1.4rem 1.6rem; border-right: 1px solid var(--line); }
.stats li:last-child { border-right: 0; }
.stats strong { display: block; font-size: 1.6rem; color: var(--brand); letter-spacing: -.02em; line-height: 1.2; }
.stats span { color: var(--muted); font-size: .88rem; }
@media (max-width: 640px) { .stats li { border-right: 0; border-bottom: 1px solid var(--line); } .stats li:last-child { border-bottom: 0; } }

/* ---------- Split / about ---------- */
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--reverse > :first-child { order: 2; } }
.photo-frame { position: relative; }
.photo-frame img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-frame::after { content: ""; position: absolute; inset: 18px -14px -14px 18px; border: 2px solid var(--accent); border-radius: var(--radius); z-index: -1; }
blockquote.pull { margin: 1.6rem 0 0; padding: 1.1rem 1.3rem; border-left: 4px solid var(--accent); background: var(--brand-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--brand-900); font-weight: 550; }

.mission { position: relative; color: #fff; text-align: center; background: var(--brand-900) center/cover no-repeat; isolation: isolate; }
.mission::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(18, 18, 61, .94), rgba(44, 42, 133, .82)); z-index: -1; }
.mission h2 { color: #fff; }
.mission p { font-size: clamp(1.1rem, 2vw, 1.4rem); max-width: 780px; margin-inline: auto; color: #e8eaff; line-height: 1.6; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
a.card, .card.is-link { text-decoration: none; color: inherit; display: block; }
a.card:hover, .card.is-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.card-body { padding: 1.3rem 1.4rem 1.5rem; }
.card h3 { margin-bottom: .4rem; font-size: 1.1rem; }
.card p:last-child { margin-bottom: 0; }
.card .meta { color: var(--muted); font-size: .86rem; }
.more { color: var(--brand); font-weight: 650; font-size: .92rem; display: inline-flex; gap: .3rem; align-items: center; }
a.card:hover .more { color: var(--accent-600); }

.leader { display: grid; grid-template-columns: 110px 1fr; gap: 1.1rem; align-items: center; padding: 1.1rem; }
a.card.leader { display: grid; }
a.card.focus-card { display: flex; }
.leader img, .leader .avatar { width: 110px; height: 130px; object-fit: cover; object-position: top; border-radius: 12px; }
.leader h3 { margin: 0 0 .2rem; }
.leader .meta { margin: 0; }
.role-pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: #fde7bd; padding: .25rem .6rem; border-radius: 99px; margin-bottom: .4rem; }

.focus-card { padding: 1.2rem 1.3rem; display: flex; gap: .9rem; align-items: flex-start; }
.focus-num { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 750; font-size: .95rem; }
.focus-card strong { color: var(--ink); line-height: 1.35; display: block; }

/* ---------- Inner-page hero ---------- */
.page-hero { background: linear-gradient(135deg, var(--brand-900), var(--brand) 70%); color: #fff; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 165, 36, .35), transparent 65%); }
.page-hero .container { padding: clamp(36px, 5vw, 64px) 0; position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin: .5rem 0 0; font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 22ch; text-wrap: balance; }
.page-hero .lead { color: #d9dcff; margin: .8rem 0 0; max-width: 62ch; }
.breadcrumbs { font-size: .85rem; color: #b9bef0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .6; }
.breadcrumbs a { color: #e3e5ff; text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- Prose (long-form text) ---------- */
.content { padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 8vw, 96px); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(22px, 4vw, 48px); }
.prose { max-width: 78ch; }
.prose.wide { max-width: none; }
.prose h2 { margin-top: 1.6em; font-size: 1.55rem; }
.prose h3 { margin-top: 1.4em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose li > p { margin-bottom: .4em; }
.prose strong { color: var(--ink); }
.prose .sub { font-weight: 700; color: var(--brand); margin: 1.6em 0 .5em; text-transform: none; font-size: 1.02rem; }
.prose blockquote { border-left: 4px solid var(--accent); margin: 1.2em 0; padding: .4em 1.2em; background: var(--brand-50); border-radius: 0 8px 8px 0; }
.prose img { border-radius: 10px; }
.prose a { word-break: break-word; }
.prose.legal { max-width: 88ch; font-size: .98rem; }
.prose.legal ol li { margin-bottom: .6em; }
.prose.sources p { font-size: .9rem; color: var(--muted); }

/* numbered lists (members etc.) */
.numbered { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.numbered li { display: flex; gap: .8rem; align-items: baseline; padding: .75rem 1rem; background: var(--bg); border-radius: 10px; }
.numbered .n { flex: none; min-width: 2.2ch; font-weight: 750; color: var(--brand); font-variant-numeric: tabular-nums; }
.numbered--cols { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.numbered a { font-weight: 600; }
.numbered--plain li { background: transparent; border-bottom: 1px solid var(--line); border-radius: 0; padding-inline: 0; }

/* rosters (committees) */
.roster { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.roster li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; box-shadow: var(--shadow-sm); }
.roster li.is-chair { border-color: var(--accent); background: linear-gradient(180deg, #fff8ea, #fff); }
.roster .who { font-weight: 650; color: var(--ink); }
.roster .who a { color: var(--ink); }
.roster .role { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600); }
.committee-links { display: flex; gap: .7rem; flex-wrap: wrap; }

/* people / profile */
.person-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.person .photo { aspect-ratio: 4/5; background: linear-gradient(160deg, var(--brand-100), var(--brand-50)); position: relative; overflow: hidden; display: grid; place-items: center; }
.person .photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.person .initials { position: absolute; inset: 0; display: none; place-items: center; font-size: 3rem; font-weight: 800; color: var(--brand); letter-spacing: -.03em; }
.person .photo.no-img .initials { display: grid; }
.person .photo.no-img img { display: none; }
.person-body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.person-body h3 { margin: 0; font-size: 1.05rem; }
.person-body .role-pill { align-self: flex-start; margin: 0 0 .3rem; }
.person-bio { font-size: .9rem; color: var(--muted); margin: .3rem 0 0; }
.person-body .more { margin-top: auto; padding-top: .6rem; }
.person--tier { border-color: var(--accent); }
.tier-title { display: flex; align-items: center; gap: .8rem; margin: 2.2rem 0 1rem; font-size: 1.15rem; }
.tier-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tier-title:first-child { margin-top: 0; }

.profile { display: grid; gap: clamp(22px, 4vw, 48px); }
@media (min-width: 860px) { .profile { grid-template-columns: 300px 1fr; align-items: start; } .profile aside { position: sticky; top: 108px; } }
.profile aside img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 300px; }
.profile .name-card { margin-top: 1rem; }
.profile .name-card h2 { margin: 0 0 .25rem; font-size: 1.3rem; }

/* docs / downloads */
.doc-card { display: flex; flex-direction: column; height: 100%; }
.doc-thumb { aspect-ratio: 4/3; background: var(--brand-50); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.doc-thumb.is-icon img { width: 84px; height: 84px; object-fit: contain; opacity: .9; }
.doc-card .card-body { display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.doc-card h3 { font-size: 1.02rem; margin: 0; }
.doc-card .btn { margin-top: auto; align-self: flex-start; }

.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.file-list a { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); transition: .2s; }
.file-list a:hover { border-color: var(--brand); transform: translateX(4px); }
.file-badge { flex: none; font-size: .7rem; font-weight: 800; letter-spacing: .06em; padding: .4rem .55rem; border-radius: 8px; background: var(--brand); color: #fff; min-width: 3.6rem; text-align: center; }
.file-badge.pdf { background: #c0392b; }
.file-badge.pptx, .file-badge.ppt { background: #d35400; }

/* events */
.event-card { display: flex; flex-direction: column; height: 100%; }
.event-card .thumb { aspect-ratio: 16/10; background: var(--brand-50); overflow: hidden; position: relative; }
.event-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
a.event-card:hover .thumb img { transform: scale(1.04); }
.date-chip { position: absolute; left: 12px; top: 12px; background: #fff; border-radius: 10px; padding: .35rem .7rem; text-align: center; line-height: 1.1; box-shadow: var(--shadow-sm); }
.date-chip b { display: block; font-size: 1.25rem; color: var(--brand); }
.date-chip span { font-size: .72rem; text-transform: uppercase; font-weight: 700; color: var(--muted); letter-spacing: .08em; }
.event-card h3 { font-size: 1.02rem; }
.event-meta { display: flex; flex-direction: column; gap: .2rem; color: var(--muted); font-size: .86rem; margin-top: .4rem; }
.empty { text-align: center; padding: 2.4rem 1.2rem; border: 2px dashed var(--brand-100); border-radius: var(--radius); background: #fff; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: .3rem; }
.event-detail { display: grid; gap: 2rem; }
@media (min-width: 900px) { .event-detail { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.event-detail img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.form [hidden] { display: none !important; }
[data-limit="4"] > .grid > .event-card:nth-child(n+5) { display: none; }
.event-detail--single { grid-template-columns: minmax(0, 760px) !important; }
.event-about { margin: 1.2rem 0 0; white-space: pre-line; }
.event-live { position: absolute; right: 12px; top: 12px; background: #0b5d3f; color: #fff; border-radius: 999px; padding: .25rem .7rem; font-size: .74rem; font-weight: 700; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.facts li { display: flex; gap: .9rem; }
.facts .ico { width: 22px; height: 22px; color: var(--brand); margin-top: .2rem; }
.facts b { display: block; color: var(--ink); }

/* gallery */
.gallery-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-bottom: 2.4rem; }
.gallery-grid button { padding: 0; border: 0; background: var(--brand-50); border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery-grid button:hover img { transform: scale(1.06); }
.gallery-title { margin: 0 0 1rem; font-size: 1.25rem; padding-left: .9rem; border-left: 4px solid var(--accent); }
.lightbox { position: fixed; inset: 0; background: rgba(8, 9, 30, .92); z-index: 400; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.is-on { display: flex; }
.lightbox img { max-height: 88vh; max-width: min(96vw, 1400px); border-radius: 8px; object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .14); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .3); }
.lb-close { top: 16px; right: 16px; } .lb-prev { left: 16px; } .lb-next { right: 16px; }
.story-pages { display: grid; gap: 1.2rem; max-width: 900px; margin: 0 auto; }
.story-pages img { width: 100%; border-radius: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: #fff; cursor: zoom-in; }

/* media */
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-sm); }
.video iframe, .video button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button { padding: 0; background: #000 center/cover no-repeat; cursor: pointer; }
.video button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: var(--accent); box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.video button::before { content: ""; position: absolute; left: 50%; top: 50%; margin: -11px 0 0 -6px; border-left: 18px solid var(--accent-ink); border-top: 11px solid transparent; border-bottom: 11px solid transparent; z-index: 1; }

/* contact */
.contact-grid { display: grid; gap: 1.6rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 5fr 7fr; } }
.info-list { display: grid; gap: 1.1rem; }
.info-item { display: flex; gap: 1rem; align-items: flex-start; }
.info-item .ico-wrap { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.info-item .ico-wrap svg { width: 22px; height: 22px; fill: currentColor; }
.info-item h3 { margin: 0 0 .15rem; font-size: 1rem; }
.info-item p { margin: 0; color: var(--ink-2); }
.info-item a { color: inherit; }
form.form { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .35rem; color: var(--ink); }
.field input, .field textarea { width: 100%; font: inherit; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.field .req { color: #c0392b; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
.map { border: 0; width: 100%; height: 380px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* blog */
.post-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .88rem; color: var(--muted); margin: .6rem 0 0; }
.post-meta span { display: inline-flex; gap: .35rem; align-items: center; }
.post-card .card-body { display: flex; flex-direction: column; gap: .5rem; height: 100%; }
.cat { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); background: var(--brand-50); padding: .2rem .55rem; border-radius: 99px; align-self: flex-start; }
.comments { margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line); max-width: 78ch; }
.comment { background: var(--bg); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: .8rem; }
.comment b { color: var(--ink); } .comment time { color: var(--muted); font-size: .82rem; margin-left: .5rem; }

/* buttons row for newsletter etc. */
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2rem; }

/* cta band */
.cta-band { background: linear-gradient(120deg, var(--brand), var(--brand-700)); color: #fff; border-radius: 22px; padding: clamp(28px, 5vw, 56px); display: grid; gap: 1.4rem; align-items: center; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { color: #fff; margin: 0 0 .4rem; }
.cta-band p { color: #d9dcff; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: #b9bef0; margin-top: auto; }
.footer-grid { display: grid; gap: 2rem; padding: clamp(40px, 6vw, 72px) 0; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: #fff; margin-bottom: 1rem; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: #d3d7ff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer address { font-style: normal; }
.footer-brand img { background: #fff; padding: 8px 12px; border-radius: 12px; width: 120px; margin-bottom: 1rem; }
.footer-brand p { font-size: .92rem; max-width: 34ch; }
.footer-social { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.footer-social a, .footer-social span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; }
.footer-social a:hover { background: var(--accent); color: var(--accent-ink); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.1rem 0; font-size: .85rem; display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; opacity: 0; visibility: hidden; transition: .25s; box-shadow: var(--shadow); background: var(--accent); color: var(--accent-ink); }
.to-top.is-on { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--accent-600); }

body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .topbar, .site-header, .site-footer, .to-top, .nav-backdrop { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; border: 0; padding: 0; }
}

/* rank badge on past office-bearer cards */
.person .rank { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: .85rem; box-shadow: var(--shadow-sm); }

/* ---------- Home: leadership (large cards) ---------- */
.leaders { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); }
.leader-lg { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; align-items: stretch; background: #fff; }
.leader-lg:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.leader-photo { display: block; background: linear-gradient(160deg, var(--brand-100), var(--brand-50)); overflow: hidden; }
.leader-photo img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; object-position: top center; transition: transform .5s; }
.leader-lg:hover .leader-photo img { transform: scale(1.04); }
.leader-body { padding: clamp(1.2rem, 2.4vw, 1.9rem); display: flex; flex-direction: column; gap: .35rem; justify-content: center; }
.leader-body h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); margin: 0 0 .3rem; }
.leader-body h3 a { color: var(--ink); text-decoration: none; }
.leader-body h3 a:hover { color: var(--brand); }
.leader-body p { color: var(--ink-2); font-size: .95rem; margin: 0 0 1rem; }
.leader-body .btn { align-self: flex-start; }
.leader-body .role-pill { align-self: flex-start; }
@media (max-width: 560px) { .leader-lg { grid-template-columns: 1fr; } .leader-photo img { min-height: 0; aspect-ratio: 4 / 4.2; } }

/* contact form feedback (PHP version) */
.alert { padding: .9rem 1.1rem; border-radius: 10px; font-weight: 550; border: 1px solid; }
.alert-ok { background: #e8f7f0; border-color: #9fd9bf; color: #0b5d3f; }
.alert-err { background: #fdecea; border-color: #f2b3ad; color: #8a1f14; }

/* ---------- Site structure ---------- */
/* nine menu items (ten when signed in): keep them on one line on smaller laptop screens */
@media (min-width: 1100px) and (max-width: 1340px) {
  .site-header .container { gap: .5rem; width: min(100% - 24px, var(--maxw)); }
  .brand img { height: 48px; }
  .nav-list > li > a, .nav-list > li > button.nav-toggle { font-size: .74rem; letter-spacing: 0; padding: .6rem .36rem; gap: .15rem; }
  .header-login { font-size: .78rem; padding: .55rem .75rem; }
  .header-actions .icon-btn { width: 36px; height: 36px; }
}
.section--flush { padding-top: 0; }
.header-login { white-space: nowrap; }
.header-login[hidden] { display: none; }
@media (max-width: 520px) {
  .site-header .container { gap: .4rem; }
  .brand img { height: 46px; }
  .header-actions { gap: .3rem; }
  .header-login { font-size: .74rem; padding: .5rem .7rem; }
  .header-actions .icon-btn { width: 36px; height: 36px; }
}
.section-tabs { background: #fff; border-bottom: 1px solid var(--line); }
.section-tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: thin; }
.section-tabs a { display: block; padding: .85rem .9rem; font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.section-tabs a:hover { color: var(--brand); }
.section-tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--accent); }
.hub-card .card-body { display: flex; flex-direction: column; gap: .35rem; height: 100%; }
.hub-card .more { margin-top: auto; padding-top: .4rem; }
a.card.quick-card { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.3rem; border-left: 4px solid var(--brand); }
.quick-card strong { color: var(--ink); font-size: 1.05rem; }
.quick-card span { color: var(--muted); font-size: .9rem; }

/* ---------- Data tables ---------- */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.data-table th { background: var(--brand); color: #fff; font-weight: 650; text-align: left; padding: .9rem 1rem; white-space: nowrap; }
.data-table td { padding: 1rem; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.data-table tbody tr:nth-child(even) { background: #fafbff; }
.cp-num { font-variant-numeric: tabular-nums; color: var(--muted); }
.data-table .cp-name { min-width: 280px; font-weight: 550; color: var(--ink); }
.cp-name a { color: var(--ink); }
.cp-name a:hover { color: var(--brand); }
.cp-name small { display: block; margin-top: .25rem; font-weight: 500; font-size: .8rem; color: var(--muted); }
.cp-date { white-space: nowrap; }
.cp-none { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.cp-note { margin-top: 1rem; }
.cp-table .btn { white-space: nowrap; }
.file-tag { font-size: .68rem; font-weight: 800; letter-spacing: .05em; background: rgba(255, 255, 255, .2); padding: .15rem .35rem; border-radius: 4px; }
.status { display: inline-block; font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 99px; white-space: nowrap; }
.status--open { background: #e2f6ec; color: #0b5d3f; }
.status--closed { background: #eceef6; color: #4a5070; }
.status--wait { background: #fdf0d3; color: #6b4a00; }
.status--muted { background: #f2f3f8; color: var(--muted); }
@media (max-width: 860px) {
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table, .data-table tbody, .data-table tr { display: block; width: 100%; }
  .data-table tr { padding: .6rem 0; border-top: 1px solid var(--line); }
  .data-table tbody tr:first-child { border-top: 0; }
  .data-table td { border: 0; padding: .4rem 1rem; display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: .8rem; align-items: start; width: 100%; }
  .data-table td::before { content: attr(data-label); font-size: .78rem; font-weight: 700; color: var(--muted); }
  .data-table td > * { justify-self: start; }
  .data-table .cp-name { min-width: 0; white-space: normal; }
  .cp-name > * { grid-column: 2; }
  .data-table .cp-name::before { grid-row: 1 / span 2; }
  .admin-table td[data-label="Member"] { display: block; }
  .admin-table td[data-label="Member"]::before { content: none; }
}

/* ---------- Member portal ---------- */
.portal-narrow { max-width: 480px; margin-inline: auto; }
.portal-loading { text-align: center; color: var(--muted); padding: 3rem 0; }
.portal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.portal-head h2 { margin: 0; font-size: 1.4rem; }
.portal-tabs { display: flex; flex-wrap: wrap; gap: .1rem .3rem; border-bottom: 2px solid var(--line); margin-bottom: 1.4rem; }
.portal-tabs button { font: inherit; font-weight: 650; font-size: .95rem; background: none; border: 0; padding: .8rem 1rem; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; }
.portal-tabs button:hover { color: var(--brand); }
.portal-tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--accent); }
.badge { background: #c0392b; color: #fff; font-size: .72rem; font-weight: 700; min-width: 1.4em; padding: 0 .4em; border-radius: 99px; text-align: center; line-height: 1.5; }
.portal-toolbar { display: flex; justify-content: space-between; gap: .8rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.portal-search { font: inherit; width: min(100%, 360px); padding: .7rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); margin-bottom: 1rem; }
.portal-toolbar .portal-search { margin: 0; }
.portal-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.portal-note { margin: 0 0 1rem; }
.portal-filter { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
#portal .alert { margin-bottom: 1rem; }
.alert code { font-size: 1rem; background: rgba(255, 255, 255, .7); padding: .1rem .4rem; border-radius: 4px; word-break: break-all; }
.temp-pass p { margin: 0 0 .4rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; display: block; }
.avatar--blank { background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-weight: 750; font-size: .95rem; }
.admin-who { display: flex; gap: .7rem; align-items: center; min-width: 220px; }
.admin-who small { color: var(--muted); word-break: break-all; }
.admin-who .role-pill { margin: 0 0 0 .4rem; }
.admin-address { max-width: 220px; white-space: pre-line; }
.admin-table td[data-label="Phone"], .admin-table td[data-label="Joined"] { white-space: nowrap; }
.temp-pass .btn { margin-top: .4rem; }
.login-id { display: block; margin-top: .25rem; color: var(--muted); overflow-wrap: anywhere; max-width: 150px; }
.portal-dialog form > .btn-outline { justify-self: start; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .1rem .8rem; min-width: 150px; }
.link-btn { font: inherit; font-size: .88rem; font-weight: 600; background: none; border: 0; padding: .1rem 0; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.link-btn--danger { color: #b3261e; }
.switch { display: inline-flex; gap: .45rem; align-items: center; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.switch input { width: 18px; height: 18px; accent-color: var(--brand); }
.check { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.access-table th:nth-child(n+3), .access-table td:nth-child(n+3) { text-align: center; }
.access-table th { white-space: normal; line-height: 1.25; vertical-align: bottom; padding-inline: .6rem; }
.access-table td { padding-inline: .6rem; }
.access-table small { display: block; color: var(--muted); }
.access-table td .role-pill { margin: 0 0 0 .4rem; }
@media (max-width: 860px) {
  .access-table td { grid-template-columns: 12rem minmax(0, 1fr); }
  .access-table td:nth-child(n+3) { text-align: left; }
}
.member-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.member-card { display: flex; gap: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow-sm); }
.member-photo { width: 110px; height: 136px; object-fit: cover; object-position: top; border-radius: 10px; flex: none; }
.member-photo--blank { display: grid; place-items: center; background: var(--brand-100); color: var(--brand); font-size: 2rem; font-weight: 800; }
.member-info { min-width: 0; flex: 1; }
.member-info h3 { margin: 0 0 .5rem; }
.member-info dl { margin: 0; display: grid; gap: .3rem; font-size: .92rem; }
.member-info dl > div { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .5rem; }
.member-info dt { color: var(--muted); font-weight: 600; font-size: .84rem; }
.member-info dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.portal-dialog { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 32px); width: min(100% - 32px, 620px); max-height: 90vh; overflow-y: auto; }
.portal-dialog::backdrop { background: rgba(14, 16, 51, .6); }
.portal-dialog h2 { font-size: 1.3rem; margin: 0; }
.form-2col { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field select { width: 100%; font: inherit; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field input[type="file"] { padding: .6rem; }
.btn-row--end { justify-content: flex-end; margin-bottom: 0; }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }
.mod-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: .9rem; box-shadow: var(--shadow-sm); }
.mod-meta { margin: 0; font-size: .92rem; overflow-wrap: anywhere; }
.mod-post { margin: .15rem 0 .7rem; font-size: .85rem; color: var(--muted); }
.mod-body { white-space: pre-line; color: var(--ink); overflow-wrap: anywhere; }
.mod-card .btn-row { margin: 0; align-items: center; }

.portal-upload { margin-bottom: 1.2rem; padding: clamp(18px, 3vw, 28px); }
.portal-upload h3 { margin: 0; }
.portal-upload > .btn { justify-self: start; }
.portal-subhead { margin: 1.8rem 0 .8rem; }
.my-blog { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.my-blog small { color: var(--muted); }
.mod-image { max-width: min(100%, 420px); border-radius: 10px; margin-bottom: .9rem; }
.mod-card h3 { margin: 0 0 .2rem; }
.article-rule { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0 1.6rem; }
.article-image { max-width: 100%; margin-bottom: 1.4rem; }
.article-para { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Blog comments ---------- */
.comment p { white-space: pre-line; overflow-wrap: anywhere; margin: .3rem 0 0; }
.comment-form { margin-top: 1.6rem; gap: .9rem; }
.comment-form h3 { margin: 0; }
.comment-form > .btn { justify-self: start; }
.comment-msg { margin-top: 1rem; }

/* ---------- Member area and admin on phones ---------- */
@media (max-width: 860px) {
  body:has(#portal) .page-hero .container { padding-block: 20px; }
  body:has(#portal) .page-hero .lead { display: none; }
  .portal-tabs { position: relative; flex-wrap: nowrap; gap: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-bottom: 1.1rem; }
  .portal-tabs::-webkit-scrollbar { display: none; }
  .portal-tabs button { flex: none; font-size: .9rem; padding: .7rem .8rem; }
  .link-btn { padding: .45rem 0; }
  .switch input { width: 22px; height: 22px; }
  .portal-search { width: 100%; }
  .portal-toolbar .portal-search { flex: 1 1 100%; }
  .portal-filter .btn { flex: 1 1 0; padding-inline: .3rem; font-size: .8rem; white-space: nowrap; }
  .mod-card { padding: 1rem; }
  /* who can open what: reads like a settings list, label left and tick right */
  .access-table td { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding-block: .15rem; }
  .access-table td[data-label="Member"] { padding-block: .3rem .4rem; }
}
@media (max-width: 520px) {
  .topbar .container { gap: .25rem 1rem; padding-block: .35rem; }
  /* photo beside the name, details below at full width */
  .member-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: .8rem; align-items: center; padding: 1rem; }
  .member-info { display: contents; }
  .member-info h3 { margin: 0; font-size: 1.05rem; }
  .member-info dl { grid-column: 1 / -1; }
  .member-photo { width: 72px; height: 88px; }
  .member-photo--blank { font-size: 1.4rem; }
  .portal-dialog { width: calc(100% - 20px); padding: 16px; }
  .portal-dialog .btn-row--end .btn { flex: 1; }
}
