/* Razem – Polish Association of Utah */

:root {
  --red: #c92127;
  --red-dark: #a3191e;
  --red-soft: #fbeaea;
  --ink: #17181a;
  --ink-2: #44474d;
  --muted: #6b6f76;
  --line: #e6e2dc;
  --paper: #fbf9f6;
  --card: #ffffff;
  --sand: #f3eee6;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(23, 24, 26, .05), 0 6px 24px rgba(23, 24, 26, .06);
  --wrap: 1120px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; min-height: 72px; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { height: 52px; width: auto; }
.brand span { font-size: .8rem; line-height: 1.25; color: var(--muted); max-width: 11em; display: none; }
@media (min-width: 1180px) { .brand span { display: block; } }

.nav { margin-left: auto; margin-right: 8px; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav a, .nav button.sub-toggle {
  display: block; padding: 8px 11px; border-radius: 8px; color: var(--ink); text-decoration: none;
  font: 600 .95rem/1.2 var(--font-body); background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav a:hover, .nav button.sub-toggle:hover { background: var(--sand); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--red); }
.nav .has-sub { position: relative; }
.nav button.sub-toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); }
.nav .sub { list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: none; }
.nav .has-sub.open > .sub { display: block; }
.nav .sub a { font-weight: 500; white-space: normal; }
.nav .btn-join { background: var(--red); color: #fff; margin-left: 8px; }
.nav .btn-join:hover { background: var(--red-dark); color: #fff; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: 600 .95rem var(--font-body); cursor: pointer; color: var(--ink); }

@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 72px); overflow-y: auto; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 0; }
  .nav a, .nav button.sub-toggle { padding: 12px 8px; width: 100%; text-align: left; font-size: 1rem; }
  .nav .sub { position: static; box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0; border-left: 2px solid var(--line); margin-left: 8px; border-radius: 0; }
  .nav .btn-join { margin: 10px 0 0; text-align: center; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d6d6d9; margin-top: 72px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h2 { font-size: 1.05rem; color: #fff; font-family: var(--font-body); font-weight: 700; margin-bottom: .6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 6px; }
.footer-logo { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-block; margin-bottom: 12px; }
.footer-logo img { height: 48px; width: auto; }
.footer-bottom { border-top: 1px solid #33353a; padding: 16px 0 24px; font-size: .85rem; color: #9fa1a6; }
.socials { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.socials a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #2a2c31; color: #fff; }
.socials a:hover { background: var(--red); }
.socials svg { width: 19px; height: 19px; fill: currentColor; }

/* ---------- Building blocks ---------- */
.section { padding: 56px 0; }
.section-sm { padding: 36px 0; }
.page-head { padding: 48px 0 8px; }
.page-head .eyebrow, .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--red); margin-bottom: .6em; display: block; }
.page-head p.lead, .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 44em; }
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--red); background: var(--red); color: #fff; font-size: 1rem; line-height: 1.2; cursor: pointer; font-family: var(--font-body); }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--red); }
.btn-outline:hover { background: var(--red-soft); color: var(--red-dark); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--sand); border-color: var(--sand); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.callout { background: var(--red-soft); border-left: 4px solid var(--red); border-radius: var(--radius-sm); padding: 16px 20px; margin: 20px 0; }
.callout > :last-child { margin-bottom: 0; }
.note { background: var(--sand); border-radius: var(--radius-sm); padding: 14px 18px; font-size: .95rem; color: var(--ink-2); }

.link-card { display: block; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.link-card:hover { transform: translateY(-2px); color: var(--ink); box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.09); }
.link-card h3 { margin-bottom: .3em; }
.link-card p { color: var(--ink-2); margin: 0; }
.link-card .arrow { color: var(--red); font-weight: 700; display: inline-block; margin-top: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: #222 center/cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15,15,17,.86) 0%, rgba(15,15,17,.6) 55%, rgba(15,15,17,.25) 100%); z-index: -1; }
.hero .wrap { padding-top: 72px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin-bottom: .15em; }
.hero .sub-pl { font-size: clamp(1.15rem, 2.4vw, 1.45rem); opacity: .92; margin-bottom: 1.4em; }
.hero p { max-width: 36em; font-size: 1.12rem; }
.hero .pill { display: inline-block; background: var(--red); color: #fff; padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; letter-spacing: .04em; margin-bottom: 18px; }

/* ---------- Section heading row ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; text-decoration: none; }

/* ---------- News ---------- */
.news-list { display: grid; gap: 24px; }
.news-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.news-card .media { aspect-ratio: 16/10; background: var(--sand); overflow: hidden; }
.news-card .media img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-card time { font-size: .85rem; color: var(--muted); font-weight: 600; }
.news-card h3 { margin: 0; font-size: 1.2rem; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover { color: var(--red); }
.news-card p { margin: 0; color: var(--ink-2); }
.news-card .more { margin-top: auto; padding-top: 8px; font-weight: 700; }

.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: 1fr; scroll-margin-top: 90px; }
@media (min-width: 820px) { .post.has-media { grid-template-columns: 340px 1fr; } }
.post .media { background: var(--sand); }
.post .media button { all: unset; cursor: zoom-in; display: block; height: 100%; }
.post .media img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; }
@media (min-width: 820px) { .post .media img { max-height: none; } }
.post .body { padding: 24px 26px; }
.post time { font-size: .88rem; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.post h2 { font-size: 1.5rem; margin-bottom: .4em; }
.post .text { color: var(--ink-2); }
.post .text p:last-child { margin-bottom: 0; }
.post .actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.tag-new { display: inline-block; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: 2px; }

/* ---------- Gallery ---------- */
.album-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.album { text-decoration: none; color: var(--ink); display: block; }
.album .cover { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--sand); position: relative; box-shadow: var(--shadow); }
.album .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.album:hover .cover img { transform: scale(1.04); }
.album .count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.album h3 { font-size: 1.1rem; margin: 12px 0 2px; }
.album:hover h3 { color: var(--red); }
.album .date { font-size: .88rem; color: var(--muted); }

.photo-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); }
.photo-grid button, .photo-grid a { all: unset; cursor: zoom-in; display: block; position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--sand); }
.photo-grid button:focus-visible, .photo-grid a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease, opacity .3s; }
.photo-grid button:hover img, .photo-grid a:hover img { transform: scale(1.04); }
.back-link { display: inline-flex; gap: 6px; font-weight: 700; text-decoration: none; margin-bottom: 14px; }

.skeleton { background: linear-gradient(90deg, var(--sand) 0%, #faf6f0 50%, var(--sand) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.state { padding: 28px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(10,10,12,.94); z-index: 200; display: none; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 100vw; max-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 56px 12px 16px; }
.lightbox img { max-width: calc(100vw - 24px); max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; user-select: none; }
.lightbox figcaption { color: #ddd; margin-top: 10px; font-size: .95rem; text-align: center; }
.lightbox .lb-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-close { top: 10px; right: 12px; }
.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; top: 22px; left: 20px; color: #bbb; font-size: .9rem; }
.lightbox .lb-dl { top: 10px; right: 70px; font-size: 1.1rem; text-decoration: none; }
@media (max-width: 640px) { .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 14px; transform: none; } .lightbox figure { padding-bottom: 72px; } .lightbox img { max-height: calc(100vh - 150px); } }

/* ---------- Misc page parts ---------- */
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.info-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.info-list svg { width: 22px; height: 22px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 3px; }

.price-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.price-table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table td:first-child { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--red); width: 90px; }

.prose .dates, .dates { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 8px 0 16px; padding: 0; list-style: none; }
.dates li { background: var(--sand); border-radius: 10px; padding: 10px 14px; }
.dates strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.embed { width: 100%; border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.map { width: 100%; aspect-ratio: 4/3; border: 0; border-radius: var(--radius); }

.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.people li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.people strong { display: block; font-size: 1.05rem; }
.people span { color: var(--muted); font-size: .95rem; }

.timeline { border-left: 3px solid var(--line); margin-left: 6px; padding-left: 26px; }
.timeline > section { position: relative; margin-bottom: 36px; }
.timeline > section::before { content: ""; position: absolute; left: -35px; top: 8px; width: 15px; height: 15px; border-radius: 50%; background: var(--red); border: 3px solid var(--paper); }
.timeline h2 { font-size: 1.35rem; }
.bio { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.bio img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.bio h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin: 0 0 4px; }
.bio p { margin: 0; font-size: .95rem; color: var(--ink-2); }

.tabs { display: inline-flex; background: var(--sand); padding: 4px; border-radius: 999px; gap: 4px; margin: 8px 0 20px; }
.tabs button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font: 700 .95rem var(--font-body); cursor: pointer; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.bylaws { display: grid; gap: 32px; }
@media (min-width: 980px) { .bylaws { grid-template-columns: 260px 1fr; } }
.bylaws nav ol { padding-left: 1.1em; margin: 0; font-size: .93rem; }
.bylaws nav li { margin-bottom: 6px; }
.bylaws nav a { color: var(--ink-2); text-decoration: none; }
.bylaws nav a:hover { color: var(--red); }
@media (min-width: 980px) { .bylaws nav { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; } }
.bylaws article h3 { scroll-margin-top: 90px; margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--line); }
.bylaws article h3:first-child { margin-top: 0; padding-top: 0; border: 0; }
.bylaws .item { padding-left: 1.4em; text-indent: -1.4em; }
.signatures { columns: 2; padding-left: 1.2em; }

.issue-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(45%, 150px), 1fr)); }
.issue { all: unset; cursor: pointer; display: block; }
.issue img { border-radius: 6px; box-shadow: var(--shadow); aspect-ratio: 1200/1650; object-fit: cover; width: 100%; background: #fff; transition: transform .2s; }
.issue:hover img { transform: translateY(-3px); }
.issue:focus-visible img { outline: 3px solid var(--red); outline-offset: 3px; }
.issue span { display: block; font-weight: 700; margin-top: 8px; font-size: .95rem; }
.issue small { color: var(--muted); }
.year-block { margin-bottom: 40px; }

.doc-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.doc-link:hover { border-color: var(--red); color: var(--ink); }
.doc-link .ico { width: 44px; height: 52px; border-radius: 6px; background: var(--red-soft); color: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .75rem; flex-shrink: 0; }
.doc-link strong { display: block; }
.doc-link span { color: var(--muted); font-size: .9rem; }

.figure { margin: 0 0 20px; }
.figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.figure figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.float-img { float: right; width: min(42%, 280px); margin: 4px 0 16px 24px; }
@media (max-width: 600px) { .float-img { float: none; width: 100%; margin: 0 0 16px; } }

.two-col { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.stack > * + * { margin-top: 20px; }

/* ---------- Languages ----------
   Every text exists twice: lang="pl" and lang="en". Only the active language is shown. */
[data-lang="pl"] [lang="en"], [data-lang="en"] [lang="pl"] { display: none !important; }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-shrink: 0; }
.lang-switch button { border: 0; background: none; font: 700 .82rem/1 var(--font-body); padding: 7px 10px; border-radius: 999px; cursor: pointer; color: var(--muted); letter-spacing: .04em; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lang-switch button:hover:not([aria-pressed="true"]) { background: var(--sand); color: var(--ink); }
@media (max-width: 1020px) { .lang-switch { margin-left: auto; } .menu-toggle { margin-left: 8px; } }
.nav .sub-toggle.active { color: var(--red); }

/* ---------- Source tags / filter chips ---------- */
.tag-src { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: 2px; color: #fff; }
.tag-facebook { background: #1877f2; }
.tag-instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: 600 .92rem var(--font-body); cursor: pointer; color: var(--ink-2); }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.video-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .8rem; }
.follow { display: flex; flex-wrap: wrap; gap: 12px; }
.follow a { display: inline-flex; align-items: center; gap: 10px; }
.follow svg { width: 20px; height: 20px; fill: currentColor; }
.prose > h2:first-child { margin-top: 0; }

/* ---------- Events (calendar + list) ---------- */
.cal { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--t-accent, var(--red)); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-pics { display: none; order: -1; margin-right: auto; gap: 2px; align-items: center; }
.cal-pics img { width: 40px; height: 40px; }
.cal-pics img:first-child { width: 52px; height: 52px; }
@media (min-width: 560px) { .cal-pics { display: inline-flex; } }
.cal-head h2 { margin: 0 auto 0 4px; font-size: clamp(1.4rem, 3vw, 1.9rem); order: -1; }
.cal-head h2 small { display: block; font: 600 .8rem/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--t-accent, var(--red)); margin-top: 2px; }
@media (min-width: 560px) { .cal-head h2 { margin-right: 6px; } }
.cal-btn, .cal-today, .cal-dl { border: 1px solid var(--line); background: #fff; border-radius: 999px; height: 40px; min-width: 40px; padding: 0 12px; font: 700 1.1rem/1 var(--font-body); color: var(--ink); cursor: pointer; }
.cal-today { font-size: .9rem; order: -1; margin-right: 4px; }
.cal-btn:hover, .cal-today:hover, .cal-dl:hover { background: var(--sand); }
.cal-dl { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--t-accent, var(--red)); border-color: currentColor; }
.cal-dl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 479px) { .cal-dl span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.cal-btn:disabled { opacity: .35; cursor: default; background: #fff; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--t-accent, var(--red)); padding: 6px 0; border-radius: 6px; }
.cal-day { min-height: 54px; border-radius: 8px; background: var(--paper); padding: 4px 5px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3px; font-size: .8rem; line-height: 1.25; }
.cal-day.out { background: transparent; }
.cal-day.has-ev { cursor: pointer; background: var(--t-bg, var(--sand)); box-shadow: inset 0 0 0 1px var(--t-soft, var(--line)); }
.cal-day.has-ev:hover { box-shadow: inset 0 0 0 2px var(--t-accent, var(--red)); }
.cal-day.today .cal-num span { background: var(--t-accent, var(--red)); color: #fff; border-radius: 999px; padding: 0 7px; }
.cal-day.past { opacity: .6; }
.cal-num { width: 100%; font-weight: 700; color: var(--ink-2); display: flex; justify-content: space-between; align-items: flex-start; }
.cal-pic { display: none; }
.cal-ev { width: 8px; height: 8px; border-radius: 50%; background: var(--ev); font-size: 0; overflow: hidden; }
@media (min-width: 720px) {
  .cal { padding: 22px; }
  .cal-grid { gap: 6px; }
  .cal-day { min-height: 104px; padding: 6px 7px; display: block; }
  .cal-num { margin-bottom: 4px; }
  .cal-pic { display: block; width: 28px; height: 28px; margin: -2px -2px 0 0; }
  .cal-ev { display: block; width: auto; height: auto; border-radius: 4px; background: #fff; font-size: .8rem; border-left: 3px solid var(--ev); padding: 2px 5px; margin-bottom: 3px; overflow-wrap: anywhere; }
  .cal-ev b { color: var(--ev); }
}

.agenda { display: grid; gap: 14px; margin-top: 24px; }
.event { display: grid; grid-template-columns: 64px 1fr; gap: 16px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--ev, var(--red)); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); scroll-margin-top: 90px; transition: box-shadow .3s ease; }
.event.past { opacity: .65; }
.event.flash { box-shadow: 0 0 0 3px var(--ev, var(--red)), var(--shadow); }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--ev, var(--red)); color: #fff; border-radius: 12px; padding: 8px 4px; line-height: 1.1; text-align: center; align-self: start; min-width: 64px; }
.event-date .dow, .event-date .mon { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.event-date .num { font: 600 1.6rem/1.15 var(--font-head); white-space: nowrap; }
.event-body h3 { margin: 0 0 .25em; font-size: 1.2rem; display: flex; gap: 8px; align-items: flex-start; }
.ev-pic { width: 30px; height: 30px; flex-shrink: 0; margin-top: -3px; }
.event-meta { margin: 0 0 .5em; color: var(--muted); font-size: .95rem; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.event-body .text p:last-child { margin-bottom: 0; }

.upcoming { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.up-item { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s ease; }
.up-item:hover { transform: translateY(-2px); color: var(--ink); }
.up-item .event-date { min-width: 58px; align-self: center; }
.up-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.up-pic { width: 40px; height: 40px; flex-shrink: 0; align-self: flex-start; }
.up-body strong { line-height: 1.3; }

/* Downloadable calendar graphic (dialog) */
.poster-dialog { border: 0; padding: 0; border-radius: var(--radius); width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--ink); background: #fff; overflow: auto; }
.poster-dialog::backdrop { background: rgba(10, 10, 12, .6); }
.poster-tool { display: grid; gap: 20px 28px; align-items: start; padding: 24px; position: relative; }
.poster-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1rem; cursor: pointer; color: var(--ink); z-index: 1; }
.poster-close:hover { background: var(--sand); }
.poster-tool h2 { margin-bottom: .4em; }
.poster-month { font-weight: 700; }
.poster-opt { margin: 10px 0 14px; }
.poster-opt .chips { margin-top: 4px; }
.poster-preview img { width: 100%; max-width: 420px; height: auto; margin: 0 auto; border-radius: 10px; box-shadow: var(--shadow); background: var(--sand); aspect-ratio: 4 / 5; }
.btn[aria-disabled="true"] { opacity: .5; cursor: progress; }
.poster-error { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red-dark); font-size: .92rem; }
@media (min-width: 760px) { .poster-tool { grid-template-columns: 1fr minmax(0, 420px); padding: 32px 64px 32px 32px; } .poster-side { padding-top: 8px; } }
