/* ===== Fonts: served from this site (no third-party requests); text shows at once in a system font ===== */
@font-face { font-family: "Noto Serif Ethiopic"; src: url("../fonts/noto-serif-ethiopic.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-600.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ===== Tokens ===== */
:root {
  --bg: #f4ead6;
  --bg-2: #ecdfc3;
  --surface: #fbf6ea;
  --surface-2: #f3e8d0;
  --ink: #2a1a10;
  --ink-soft: #5b4430;
  --muted: #7a6450;
  --line: #d9c7a3;
  /* Ethiopian flag — used as fills, stripes and accents */
  --flag-green: #078930;
  --flag-yellow: #fcdd09;
  --flag-red: #da121a;
  --flag-h: linear-gradient(90deg, var(--flag-green) 0 33.34%, var(--flag-yellow) 33.34% 66.67%, var(--flag-red) 66.67% 100%);
  --flag-v: linear-gradient(var(--flag-green) 0 33.34%, var(--flag-yellow) 33.34% 66.67%, var(--flag-red) 66.67% 100%);
  /* Text-safe shades (≥ 4.5:1 on the parchment background) */
  --red: #a8121a;
  --red-deep: #7e0d13;
  --green: #08692a;
  --green-deep: #054d1e;
  --btn: #067a2b;
  --btn-hover: #055c20;
  --gold: #c9a300;
  --gold-soft: #fcdd09;
  --footer-bg: #0a3a1c;
  --blue: #1f3f7a;
  --on-red: #fff6e2;
  --art-bg: radial-gradient(ellipse at 50% 35%, #fffaf0 0%, #efe0c0 60%, #e2cda2 100%);
  --art-hole: #3a2412;
  --shadow: 0 1px 2px rgba(60,35,10,.08), 0 10px 30px -12px rgba(60,35,10,.35);
  --radius: 14px;
  --serif-display: "Cormorant Garamond", "Noto Serif Ethiopic", Georgia, serif;
  --serif: "Source Serif 4", "Noto Serif Ethiopic", Georgia, serif;
  --ethiopic: "Noto Serif Ethiopic", "Nyala", "Abyssinica SIL", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14100c; --bg-2: #1b1510; --surface: #211912; --surface-2: #2a2017;
    --ink: #f3e7cf; --ink-soft: #d9c6a4; --muted: #a8937452; --muted: #a89374; --line: #3d2f22;
    --red: #ff6b6b; --red-deep: #da121a; --gold: #fcdd09; --gold-soft: #fcdd09;
    --green: #4cc46e; --green-deep: #78d892; --btn: #078930; --btn-hover: #0a9f39; --footer-bg: #06210f; --blue: #8fb0ea; --on-red: #fff6e2;
    --art-bg: radial-gradient(ellipse at 50% 35%, #3a2c1e 0%, #241a12 65%, #17110c 100%);
    --art-hole: #0e0a07;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -14px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14100c; --bg-2: #1b1510; --surface: #211912; --surface-2: #2a2017;
  --ink: #f3e7cf; --ink-soft: #d9c6a4; --muted: #a89374; --line: #3d2f22;
  --red: #ff6b6b; --red-deep: #da121a; --gold: #fcdd09; --gold-soft: #fcdd09;
  --green: #4cc46e; --green-deep: #78d892; --btn: #078930; --btn-hover: #0a9f39; --footer-bg: #06210f; --blue: #8fb0ea; --on-red: #fff6e2;
  --art-bg: radial-gradient(ellipse at 50% 35%, #3a2c1e 0%, #241a12 65%, #17110c 100%);
  --art-hole: #0e0a07;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -14px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.65;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(185,131,42,.10), transparent 40%),
    radial-gradient(circle at 85% 100%, rgba(142,29,24,.07), transparent 45%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
:root[data-theme="dark"] a:hover { color: var(--gold-soft); }
h1, h2, h3 { font-family: var(--serif-display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
[lang="am"], .am { font-family: var(--ethiopic); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--red); color: var(--on-red); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
main { display: block; min-height: 60vh; outline: none; }
.eyebrow { font-family: var(--serif); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; color: var(--red); font-weight: 600; margin-bottom: .6em; }

/* ===== Tilet band (woven border) ===== */
.tilet {
  height: 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpath d='M0 7 L7 0 L14 7 L7 14z' fill='%23e8b94a'/%3E%3Cpath d='M14 7 L21 0 L28 7 L21 14z' fill='%232f6b3a'/%3E%3Cpath d='M5 7 L7 5 L9 7 L7 9z' fill='%238e1d18'/%3E%3Cpath d='M19 7 L21 5 L23 7 L21 9z' fill='%23fbf6ea'/%3E%3C/svg%3E") repeat-x center / 28px 14px,
    var(--red-deep);
  border-block: 2px solid var(--gold);
}

/* ===== Header ===== */
.preview-banner { background: var(--surface-2); color: var(--ink-soft); font-size: .88rem; text-align: center; padding: 6px 40px 6px 12px; position: relative; border-bottom: 1px solid var(--line); }
.preview-banner button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font-size: 1.1rem; cursor: pointer; }
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; color: var(--red); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-am { font-size: 1.15rem; font-weight: 700; color: var(--red); }
.brand-en { font-family: var(--serif-display); font-size: 1.12rem; font-weight: 600; letter-spacing: .02em; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .97rem; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--red); color: var(--on-red); }
.nav-tools { display: flex; gap: 6px; margin-left: 8px; }
.chip-btn { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; min-width: 40px; height: 36px; padding: 0 10px; cursor: pointer; font-family: var(--ethiopic); }
.chip-btn:hover { border-color: var(--gold); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 40px; cursor: pointer; padding: 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle span:not(.sr) { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 12px 16px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .nav-tools { margin: 8px 0 0; }
}

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; text-decoration: none; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--red); background: var(--red); color: var(--on-red); cursor: pointer; transition: transform .15s ease, background .2s; }
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: var(--on-red); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--red); }
.btn.ghost:hover { background: var(--surface-2); color: var(--red); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== Hero ===== */
.hero { position: relative; padding: clamp(32px, 6vw, 80px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(20px, 4vw, 60px); align-items: center; }
.hero h1 .am { display: block; font-size: .55em; color: var(--red); margin-bottom: .2em; font-weight: 700; }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 36em; }
.hero-art { position: relative; aspect-ratio: 4/5; max-width: 420px; justify-self: center; width: 100%; }
.hero-art::before { content: ""; position: absolute; inset: 6% 2% 10%; border-radius: 50% 50% 18px 18px; background: var(--art-bg); box-shadow: var(--shadow); }
.hero-art .halo { position: absolute; inset: 0 0 25%; border-radius: 50%; background: radial-gradient(circle, rgba(240,200,103,.55), transparent 60%); animation: glow 6s ease-in-out infinite; }
.hero-art svg { position: relative; width: 100%; height: 100%; }
@keyframes glow { 50% { opacity: .5; transform: scale(.96); } }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 280px; order: -1; }
}

/* ===== Sections ===== */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section.alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.page-head { padding: clamp(32px, 5vw, 64px) 0 12px; }
.page-head p { max-width: 46em; color: var(--ink-soft); font-size: 1.1rem; }
.ornament { display: flex; align-items: center; gap: 14px; color: var(--gold); margin: 8px 0 18px; }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; max-width: 120px; background: currentColor; opacity: .6; }
.ornament.left::before { display: none; }

/* ===== Cards & grid ===== */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
a.card:hover { transform: translateY(-4px); color: inherit; box-shadow: 0 2px 4px rgba(60,35,10,.1), 0 22px 40px -16px rgba(60,35,10,.5); }
.card-art { aspect-ratio: 4/5; background: var(--art-bg); position: relative; display: grid; place-items: center; padding: 6% 8%; }
.card-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card-art svg { width: 100%; height: 100%; transition: transform .4s ease; }
a.card:hover .card-art svg { transform: scale(1.04); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body h3 { font-size: 1.32rem; margin: 0; }
.card-body .am { color: var(--red); font-size: .95rem; }
.card-meta { font-size: .88rem; color: var(--muted); margin-top: auto; padding-top: 8px; }
.tag { display: inline-block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.placeholder-dot { position: absolute; top: 10px; right: 10px; font-size: .68rem; background: var(--surface); border: 1px solid var(--line); color: var(--muted); padding: 2px 8px; border-radius: 99px; }

.cat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.cat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; transition: border-color .2s, transform .2s; }
.cat-tile:hover { border-color: var(--gold); transform: translateY(-2px); color: inherit; }
.cat-tile .mini { height: 120px; background: var(--art-bg); border-radius: 10px; display: grid; place-items: center; }
.cat-tile .mini svg { height: 110px; width: auto; }
.cat-tile strong { font-family: var(--serif-display); font-size: 1.35rem; }
.cat-tile span.am { color: var(--red); }
.cat-tile small { color: var(--muted); line-height: 1.45; }

/* ===== Today widget ===== */
.today { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.today-date { text-align: center; padding-right: 24px; border-right: 1px solid var(--line); }
.today-date .day { font-family: var(--ethiopic); font-size: 3.2rem; line-height: 1; color: var(--red); font-weight: 700; }
.today-date .month { font-family: var(--ethiopic); font-size: 1.15rem; }
.today-date .yr { color: var(--muted); font-size: .9rem; }
.today h3 { margin-bottom: .2em; }
@media (max-width: 600px) {
  .today { grid-template-columns: 1fr; }
  .today-date { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
}

/* ===== Collection filters ===== */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 28px; }
.filter-chip { font: inherit; font-size: .95rem; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.filter-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { flex: 1 1 220px; min-width: 0; max-width: 340px; margin-left: auto; position: relative; }
.search input { width: 100%; font: inherit; padding: 10px 16px 10px 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.search::before { content: "⌕"; position: absolute; left: 15px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 1.2rem; }
.empty { text-align: center; padding: 60px 0; color: var(--muted); }

/* ===== Object page ===== */
.object { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); padding: 28px 0 60px; align-items: start; }
.object-art { position: sticky; top: 110px; background: var(--art-bg); border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 4/5; display: grid; place-items: center; padding: 6%; box-shadow: var(--shadow); overflow: hidden; cursor: zoom-in; }
.object-art svg, .object-art img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; transform-origin: var(--zx, 50%) var(--zy, 50%); }
.object-art.zoom { cursor: zoom-out; }
.object-art.zoom svg, .object-art.zoom img { transform: scale(2); }
.object h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.object .am-title { font-size: 1.35rem; color: var(--red); margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 22px 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .96rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.details-list { padding-left: 1.2em; }
.details-list li { margin-bottom: .3em; }
.details-list li::marker { content: "✣  "; color: var(--gold); }
.callout { border-left: 4px solid var(--gold); background: var(--surface); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 20px 0; }
.note { font-size: .9rem; color: var(--muted); border: 1px dashed var(--line); padding: 10px 14px; border-radius: 10px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.crumbs { font-size: .9rem; color: var(--muted); padding-top: 20px; }
.crumbs a { color: var(--muted); }
@media (max-width: 860px) {
  .object { grid-template-columns: 1fr; }
  .object-art { position: relative; top: 0; max-width: 460px; width: 100%; margin-inline: auto; }
}

/* ===== Timeline ===== */
.timeline { position: relative; margin: 30px 0 60px; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--gold), var(--red)); transform: translateX(-50%); border-radius: 3px; }
.tl-item { position: relative; width: 50%; padding: 0 42px 34px 0; opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.tl-item.in { opacity: 1; transform: none; }
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 34px 42px; }
.tl-item::before { content: ""; position: absolute; top: 18px; right: -10px; width: 20px; height: 20px; background: var(--surface); border: 4px solid var(--red); border-radius: 50%; transform: rotate(45deg); border-radius: 3px; }
.tl-item:nth-child(even)::before { right: auto; left: -10px; }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.tl-card.church { border-color: var(--gold); background: linear-gradient(var(--surface), var(--surface-2)); }
.tl-year { font-family: var(--serif-display); font-size: 1.15rem; color: var(--red); font-weight: 700; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tl-year .geez { font-family: var(--ethiopic); color: var(--gold); font-size: .95rem; font-weight: 600; }
.tl-card h3 { margin: 4px 0 8px; }
.tl-card p { margin: 0; color: var(--ink-soft); }
@media (max-width: 760px) {
  .timeline::before { left: 10px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 26px 38px; }
  .tl-item::before, .tl-item:nth-child(even)::before { left: 0; right: auto; }
}
@media (prefers-reduced-motion: reduce) { .tl-item { opacity: 1; transform: none; transition: none; } .hero-art .halo { animation: none; } html { scroll-behavior: auto; } }

/* ===== Tour ===== */
.tour { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(20px, 4vw, 48px); align-items: start; padding-bottom: 60px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.plan svg { width: 100%; height: auto; }
.plan .zone { cursor: pointer; transition: filter .2s, opacity .2s; }
.plan .zone:hover, .plan .zone:focus { filter: brightness(1.12); outline: none; }
.plan .zone.active { filter: brightness(1.2) drop-shadow(0 0 6px rgba(232,185,74,.9)); }
.plan .zone-label { font-family: var(--ethiopic); font-size: 13px; pointer-events: none; fill: #fff8e6; text-anchor: middle; font-weight: 600; }
.plan .zone-label.dark { fill: #2a1a10; }
.stop { position: sticky; top: 110px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); }
.stop .am { color: var(--red); font-size: 1.15rem; }
.stop-count { color: var(--muted); font-size: .9rem; }
.stops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
@media (max-width: 860px) { .tour { grid-template-columns: 1fr; } .stop { position: relative; top: 0; } }

/* ===== Calendar ===== */
.cal-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; padding-bottom: 60px; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h2 { margin: 0; font-size: 1.7rem; text-align: center; }
.cal-head h2 small { display: block; font-family: var(--serif); font-size: .9rem; color: var(--muted); font-weight: 400; }
.icon-btn { font: inherit; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: 1.2rem; flex: none; }
.icon-btn:hover { border-color: var(--gold); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: .78rem; color: var(--muted); padding: 4px 0; font-family: var(--ethiopic); }
.cal-day { min-height: 70px; border-radius: 8px; background: var(--surface-2); padding: 5px 6px; font-size: .78rem; position: relative; border: 1px solid transparent; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-day .n { font-family: var(--ethiopic); font-size: 1.05rem; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.cal-day .n small { font-family: var(--serif); font-size: .7rem; color: var(--muted); font-weight: 400; }
.cal-day .ev { line-height: 1.2; color: var(--red); font-weight: 600; font-size: .72rem; }
.cal-day .ev.minor { color: var(--muted); font-weight: 400; }
.cal-day.fast { background: color-mix(in srgb, var(--blue) 10%, var(--surface-2)); }
.cal-day.feast { background: color-mix(in srgb, var(--gold) 22%, var(--surface-2)); }
.cal-day.today { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.cal-day.empty { background: transparent; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.upcoming { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.upcoming li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.upcoming .when { color: var(--muted); font-size: .88rem; grid-column: 1; }
.upcoming .count { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; font-family: var(--serif-display); font-size: 1.5rem; color: var(--red); font-weight: 700; line-height: 1; }
.upcoming .count small { display: block; margin-top: 6px; font-size: .7rem; font-family: var(--serif); color: var(--muted); font-weight: 400; }
.converter { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.converter label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.converter input { font: inherit; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); width: 100%; }
.converter output { display: block; margin-top: 10px; font-family: var(--ethiopic); font-size: 1.15rem; }
@media (max-width: 960px) { .cal-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .cal { padding: 10px; }
  .cal-day { min-height: 54px; padding: 3px; }
  .cal-day .ev { font-size: 0; }
  .cal-day .ev::before { content: "•"; font-size: 1rem; line-height: .6; }
  .cal-day .n small { display: none; }
}

/* ===== Fidel ===== */
.fidel-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.fidel { border-collapse: collapse; width: 100%; min-width: 620px; }
.fidel th { font-family: var(--serif); font-weight: 600; font-size: .82rem; color: var(--muted); padding: 10px 6px; background: var(--surface-2); position: sticky; top: 0; }
.fidel td, .fidel th { text-align: center; border-bottom: 1px solid var(--line); }
.fidel td.name { text-align: left; padding-left: 14px; font-size: .88rem; color: var(--ink-soft); white-space: nowrap; }
.fidel button { font-family: var(--ethiopic); font-size: 1.6rem; background: none; border: 0; color: var(--ink); width: 100%; padding: 6px 0; cursor: pointer; border-radius: 8px; }
.fidel button:hover, .fidel button:focus-visible { background: color-mix(in srgb, var(--gold) 25%, transparent); color: var(--red); }
.fidel tr:hover td.name { color: var(--red); }
.fidel-side { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 28px 0 60px; }
.glyph-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); }
.glyph-card .big { font-family: var(--ethiopic); font-size: 6rem; line-height: 1.1; color: var(--red); }
.numerals { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.numerals input { font: inherit; font-size: 1.2rem; padding: 10px 14px; width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
.numerals output { display: block; font-family: var(--ethiopic); font-size: 2.6rem; color: var(--red); min-height: 1.4em; margin-top: 10px; word-break: break-all; }
.num-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.num-row span { font-family: var(--ethiopic); background: var(--surface-2); border-radius: 8px; padding: 4px 10px; font-size: 1.1rem; }
.num-row span small { font-family: var(--serif); color: var(--muted); font-size: .72rem; margin-left: 4px; }
@media (max-width: 760px) { .fidel-side { grid-template-columns: 1fr; } }

/* ===== Visit ===== */
.visit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 22px; padding-bottom: 60px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.hours { list-style: none; padding: 0; margin: 0; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.etiquette { padding-left: 1.2em; }
.etiquette li::marker { content: "✣  "; color: var(--gold); }

/* ===== Footer ===== */
.site-footer { margin-top: 40px; background: var(--surface-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; padding: 26px 0 34px; flex-wrap: wrap; align-items: center; }
.footer-name { font-family: var(--serif-display); font-size: 1.3rem; font-weight: 600; margin: 0; }
.footer-inner p { margin: 0; }
.footer-date { font-family: var(--ethiopic); text-align: right; }

/* Page transition */
.view-enter { animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .view-enter { animation: none; } }
@media (max-width: 600px) { .preview-banner { font-size: .76rem; line-height: 1.4; } }

/* ===== Server-rendered (FastAPI + HTMX) additions ===== */
.art { width: 100%; height: 100%; display: grid; place-items: center; }
.art svg { width: 100%; height: 100%; }
.hero-art .art { position: relative; }
.split { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: center; }
.filter-chip { text-decoration: none; display: inline-block; }
.filter-chip[aria-current="page"], .filter-chip[aria-current="step"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-chip:hover { color: var(--ink); border-color: var(--gold); }
.filter-chip[aria-current="page"]:hover, .filter-chip[aria-current="step"]:hover { color: var(--bg); }
.search { display: block; }
.lede { font-size: 1.12rem; }
.zoom-hint { text-align: center; font-size: .85rem; margin-top: 8px; }
.note { margin-top: 10px; }
.mt { margin-top: 20px; }
.center { text-align: center; }
.center p { margin-inline: auto; }
.tl-card .note { margin-top: 10px; }
.plan .zone { cursor: pointer; transition: filter .2s; outline: none; }
.plan .zone:hover, .plan .zone:focus-visible { filter: brightness(1.12); }
.plan .zone:focus-visible { filter: brightness(1.2) drop-shadow(0 0 4px #fff); }
.plan .zone.active { filter: brightness(1.2) drop-shadow(0 0 6px rgba(232,185,74,.9)); }
.stop .stops .filter-chip { font-size: .9rem; padding: 6px 12px; }
.icon-btn { display: inline-grid; place-items: center; text-decoration: none; }
.legend .lg-feast { background: color-mix(in srgb, var(--gold) 40%, var(--surface-2)); }
.legend .lg-fast { background: color-mix(in srgb, var(--blue) 25%, var(--surface-2)); }
.legend .lg-today { border: 2px solid var(--red); }
.small-note { font-size: .88rem; margin-top: 8px; }
.aside-title { font-size: 1.7rem; }
.conv-row { display: flex; gap: 8px; }
.conv-out { display: block; margin-top: 10px; font-family: var(--ethiopic); font-size: 1.15rem; }
.conv-sub { display: block; font-family: var(--serif); font-size: 1rem; color: var(--ink-soft); }
.fidel a { display: block; font-family: var(--ethiopic); font-size: 1.6rem; color: var(--ink); padding: 6px 0; border-radius: 8px; text-decoration: none; }
.fidel a:hover, .fidel a:focus-visible { background: color-mix(in srgb, var(--gold) 25%, transparent); color: var(--red); }
.fidel th.name { text-align: left; padding-left: 14px; font-size: .88rem; color: var(--ink-soft); white-space: nowrap; background: none; position: static; font-weight: 400; }
.glyph-row { font-family: var(--ethiopic); font-size: 1.8rem; letter-spacing: .2em; }
.htmx-request #results, #results.htmx-swapping { opacity: .55; transition: opacity .2s; }

/* =====================================================================
 * Ethiopian flag theme — green, yellow and red throughout the site
 * ===================================================================== */
::selection { background: var(--flag-yellow); color: #1b1307; }
:focus-visible { outline-color: var(--green); }
a { color: var(--green); }
a:hover, :root[data-theme="dark"] a:hover { color: var(--green-deep); }

/* Stripes: header, footer, hero */
.flag-band, .tilet { height: 12px; background: var(--flag-v); border: 0; }
.preview-banner { background: var(--flag-yellow); color: #1b1307; border-bottom: 0; }

/* Navigation and buttons */
.brand-mark { color: var(--green); }
.brand-am { color: var(--red); }
.site-nav a:hover { background: color-mix(in srgb, var(--flag-yellow) 32%, transparent); }
.site-nav a[aria-current="page"] { background: var(--btn); color: #fff; }
.chip-btn:hover { border-color: var(--green); }
.btn { background: var(--btn); border-color: var(--btn); color: #fff; }
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: #fff; }
.btn.ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn.ghost:hover { background: color-mix(in srgb, var(--flag-yellow) 28%, transparent); color: var(--green); }
.filter-chip[aria-current="page"], .filter-chip[aria-current="step"] { background: var(--btn); border-color: var(--btn); color: #fff; }
.filter-chip:hover { border-color: var(--green); }
.icon-btn:hover { border-color: var(--green); }

/* Flag stripe across the top of every card and panel */
.card, .today:not(.cal-day), .panel, .stop, .cal, .converter, .numerals, .glyph-card, .plan, .fidel-wrap, .tl-card, .cat-tile { position: relative; overflow: hidden; }
.card::before, .today:not(.cal-day)::before, .panel::before, .stop::before, .cal::before, .converter::before, .numerals::before,
.glyph-card::before, .plan::before, .fidel-wrap::before, .tl-card::before, .cat-tile::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--flag-h); z-index: 2;
}
.tag { color: var(--green); }
.eyebrow { color: var(--red); }
.ornament { color: var(--green); }
.ornament::before, .ornament::after { background: var(--flag-h); opacity: 1; height: 3px; border-radius: 2px; }
.details-list li::marker, .etiquette li::marker { color: var(--green); }
.callout { border-left: 6px solid; border-image: var(--flag-v) 1; border-radius: 0; }
.placeholder-dot { background: var(--flag-yellow); color: #1b1307; border-color: transparent; font-weight: 600; }

/* Timeline: green → yellow → red, with markers cycling through the flag */
.timeline::before { background: var(--flag-v); width: 5px; }
.tl-item::before { border-color: var(--flag-green); }
.tl-item:nth-child(3n+2)::before { border-color: var(--gold); }
.tl-item:nth-child(3n)::before { border-color: var(--flag-red); }
.tl-card.church { border: 2px solid var(--gold); }
.tl-year .geez { color: var(--green); }

/* Calendar: feasts yellow, fasts green, today red */
.cal-day.feast { background: color-mix(in srgb, var(--flag-yellow) 38%, var(--surface-2)); }
.cal-day.fast { background: color-mix(in srgb, var(--flag-green) 15%, var(--surface-2)); }
.cal-day.feast.fast { background: linear-gradient(135deg, color-mix(in srgb, var(--flag-yellow) 38%, var(--surface-2)) 50%, color-mix(in srgb, var(--flag-green) 15%, var(--surface-2)) 50%); }
.cal-day.today { border-color: var(--flag-red); box-shadow: inset 0 0 0 2px var(--flag-red); }
.legend .lg-feast { background: color-mix(in srgb, var(--flag-yellow) 60%, var(--surface-2)); }
.legend .lg-fast { background: color-mix(in srgb, var(--flag-green) 35%, var(--surface-2)); }
.legend .lg-today { border-color: var(--flag-red); }
.upcoming li { border-left: 5px solid var(--flag-green); }
.upcoming li:nth-child(3n+2) { border-left-color: var(--flag-yellow); }
.upcoming li:nth-child(3n) { border-left-color: var(--flag-red); }

/* Ge'ez script */
.fidel a:hover, .fidel a:focus-visible { background: color-mix(in srgb, var(--flag-yellow) 40%, transparent); color: var(--green); }
.fidel th { border-bottom: 3px solid var(--flag-green); }

/* Footer: deep green with the flag above it */
.site-footer { background: var(--footer-bg); color: #f6eedb; margin-top: 56px; }
.site-footer .footer-name { color: #fff; }
.footer-sub { color: #cfe3d3; margin: 0; }
.footer-meta { text-align: right; }
.footer-meta .footer-date { color: var(--flag-yellow); font-family: var(--ethiopic); margin: 0; }
.footer-credit { font-size: .8rem; color: #cfe3d3; margin: 4px 0 0; }
@media (max-width: 600px) { .footer-meta { text-align: left; } }

/* ===== Photographs ===== */
.hero-photo { position: relative; isolation: isolate; color: #fff; padding: 0; min-height: min(88vh, 780px); display: flex; align-items: flex-end; }
.hero-photo picture, .hero-photo .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-photo .hero-img { object-fit: cover; object-position: 60% 6%; }
.hero-shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8, 14, 6, .86) 0%, rgba(8, 14, 6, .6) 42%, rgba(8, 14, 6, .08) 78%),
              linear-gradient(0deg, rgba(8, 14, 6, .5), transparent 40%); }
.hero-photo .hero-grid { grid-template-columns: 1fr; width: min(1180px, 100% - 32px); padding: clamp(96px, 16vh, 180px) 0 clamp(64px, 10vh, 104px); }
.hero-photo .hero-text { max-width: 640px; }
.hero-photo h1 { color: #fff; text-shadow: 0 2px 22px rgba(0, 0, 0, .45); }
.hero-photo h1 .am { color: var(--flag-yellow); }
.hero-photo .eyebrow { color: var(--flag-yellow); }
.hero-photo .lead { color: rgba(255, 255, 255, .93); }
.hero-photo .btn.ghost { color: #fff; border-color: #fff; }
.hero-photo .btn.ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.hero-caption { position: absolute; right: 16px; bottom: 24px; margin: 0; font-size: .8rem; color: rgba(255, 255, 255, .88); text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.hero-photo .flag-band { position: absolute; left: 0; right: 0; bottom: 0; }
@media (max-width: 700px) {
  .hero-photo { min-height: 86vh; }
  .hero-photo .hero-img { object-position: 55% 0%; }
  .hero-shade { background: linear-gradient(0deg, rgba(8, 14, 6, .9) 8%, rgba(8, 14, 6, .55) 55%, rgba(8, 14, 6, .12) 100%); }
  .hero-caption { left: 16px; right: auto; }
}

.photo-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.photo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: center 15%; }
.photo figcaption { padding: 12px 16px; font-size: .95rem; color: var(--ink-soft); border-top: 5px solid; border-image: var(--flag-h) 1; }
.photo .credit { color: var(--muted); font-size: .85rem; }
.photo-banner { margin: 0 auto 30px; }
.photo-banner img { aspect-ratio: 21 / 9; object-position: center 45%; }
@media (max-width: 700px) { .photo-banner img { aspect-ratio: 4 / 3; } }
.stop-photo { margin: -24px -26px 18px; border: 0; border-radius: 0; box-shadow: none; }
.stop-photo img { aspect-ratio: 16 / 10; }

/* ===== Gallery ===== */
.gallery { padding-bottom: 40px; }
.gallery-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* =====================================================================
 * Admin area
 * ===================================================================== */
.admin-header { position: static; }
.admin-main { padding: 24px 0 40px; min-height: 60vh; }
.admin-main h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .3em; }
.admin-userbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9rem; color: var(--ink-soft); padding-top: 12px; }
.userbar-actions { display: flex; gap: 14px; align-items: center; }
form.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }
.role { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; }
.role-admin { background: var(--btn); color: #fff; }
.role-contributor { background: color-mix(in srgb, var(--flag-yellow) 55%, var(--surface)); color: #1b1307; }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--flag-red); color: #fff; font-size: .75rem; font-weight: 700; }
.page-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-bar h1 { margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.small { font-size: .85rem; }

/* status badges */
.status { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.status-draft { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.status-pending { background: color-mix(in srgb, var(--flag-yellow) 60%, var(--surface)); color: #1b1307; }
.status-approved { background: color-mix(in srgb, var(--flag-green) 18%, var(--surface)); color: var(--green); }
.status-rejected { background: color-mix(in srgb, var(--flag-red) 14%, var(--surface)); color: var(--red); }
.status-featured { background: var(--btn); color: #fff; }

/* alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; border: 1px solid var(--line); background: var(--surface); display: block; }
.alert-error { border-color: var(--flag-red); background: color-mix(in srgb, var(--flag-red) 9%, var(--surface)); color: var(--ink); }
.alert-ok { border-color: var(--flag-green); background: color-mix(in srgb, var(--flag-green) 10%, var(--surface)); }
.alert-info { border-color: var(--gold); background: color-mix(in srgb, var(--flag-yellow) 16%, var(--surface)); }
.alert-review { border-color: var(--gold); background: color-mix(in srgb, var(--flag-yellow) 30%, var(--surface)); color: var(--ink); text-decoration: none; }
a.alert-review:hover { color: var(--ink); filter: brightness(.98); }

/* forms */
.form { display: flex; flex-direction: column; gap: 4px; }
.edit-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .form-cols { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input:not([type=checkbox]), .field textarea, .field select {
  font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid color-mix(in srgb, var(--flag-green) 40%, transparent); border-color: var(--green); }
.field input[type=file] { padding: 8px; background: var(--surface-2); }
.req { color: var(--red); }
.hint { font-size: .85rem; color: var(--muted); margin: 0; }
.check { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--btn); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); margin-top: 8px; position: sticky; bottom: 0; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); z-index: 5; }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--flag-red); border-color: var(--flag-red); color: #fff; }
.danger-zone { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--line); }
.current-image img, .upload-preview { width: 100%; max-width: 360px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.current-image.large img { max-width: 560px; }
.upload-preview { margin-top: 8px; }
fieldset[disabled] .field input, fieldset[disabled] .field textarea, fieldset[disabled] .field select { background: var(--surface-2); color: var(--ink-soft); }

/* sign-in */
.auth-card { max-width: 480px; margin: 32px auto; padding: 28px 30px; }
.auth-card h1 { font-size: 2rem; }
.temp-pass dd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
code.temp { white-space: nowrap; font-size: 1.35rem; font-weight: 700; letter-spacing: .06em; background: var(--surface-2); padding: 4px 10px; border-radius: 8px; color: var(--green); }

/* dashboard */
.dash-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin: 20px 0; }
.dash-card h2 { font-size: 1.5rem; }
.dash-card h2 small { font-size: .9rem; color: var(--muted); font-family: var(--serif); font-weight: 400; }
.dash-stats { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-stats a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.dash-stats a:hover { outline: 2px solid var(--gold); color: var(--ink); }
.dash-stats .num { font-family: var(--serif-display); font-size: 1.7rem; font-weight: 700; min-width: 1.4em; }
.how ol { padding-left: 1.3em; margin: 0; }
.how li { margin-bottom: 6px; }
.dash-card, .how, .auth-card { padding: 22px 24px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin-table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; background: var(--surface-2); border-bottom: 3px solid var(--flag-green); white-space: nowrap; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.thumb-col { width: 88px; }
.thumb { display: block; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--art-bg); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .art { padding: 6px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { margin: 0; }
.users-layout { grid-template-columns: 1.7fr 1fr; }

/* photo grid (admin) */
.photo-admin-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.photo-admin-grid li { padding: 0; }
.photo-admin-link { display: block; text-decoration: none; color: var(--ink); }
.photo-admin-link img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-admin-meta { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; align-items: flex-start; }
.photo-admin-meta .caption { font-size: .95rem; }

/* review */
.review-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.review-card { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 18px; }
.review-media { background: var(--art-bg); border-radius: 10px; overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; }
.review-media img { width: 100%; height: 100%; object-fit: cover; }
.review-media .art { padding: 10px; }
.review-body h3 { margin: 0 0 4px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.reject-form { display: flex; gap: 8px; flex: 1; min-width: 260px; margin: 0; }
.reject-form input { flex: 1; font: inherit; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 0; }
.review-done { display: block; padding: 16px 20px; }
@media (max-width: 640px) { .review-card { grid-template-columns: 1fr; } .review-media { aspect-ratio: 16 / 10; } }
.action { font-weight: 600; }
.action-approved, .action-published, .action-created, .action-activated { color: var(--green); }
.action-rejected, .action-deleted, .action-deactivated, .action-failed { color: var(--red); }

/* The church's full official title (long; sized to wrap gracefully) */
.hero h1 .am.title-am { font-size: .4em; line-height: 1.45; margin-bottom: .45em; max-width: 30em; }
.footer-title { font-family: var(--ethiopic); color: var(--flag-yellow); font-size: 1.05rem; line-height: 1.5; margin: 0 0 4px; max-width: 40em; }
.church-title { font-family: var(--ethiopic); color: var(--red); font-weight: 700; line-height: 1.5; margin: 6px 0 14px; }
@media (max-width: 700px) { .hero h1 .am.title-am { font-size: .5em; } }

/* ===== The church's full title in the header ===== */
.brand { min-width: 0; }
.brand-am.brand-title { font-size: .95rem; line-height: 1.4; font-weight: 700; display: block; max-width: 40em; text-wrap: balance; }
.brand-title + .brand-en { font-size: 1rem; margin-top: 2px; }
/* Desktop: the title on its own row, the menu on the row below */
@media (min-width: 961px) {
  .header-inner { flex-wrap: wrap; row-gap: 0; padding: 8px 0 6px; }
  .header-inner > .brand { flex: 1 1 100%; }
  .header-inner > .site-nav { flex: 1 1 100%; justify-content: flex-end; }
}
/* Phones and tablets: smaller title wrapping beside the menu button */
@media (max-width: 960px) {
  .header-inner > .brand { flex: 1 1 auto; }
  .brand-am.brand-title { font-size: .78rem; line-height: 1.38; }
  .brand-title + .brand-en { font-size: .9rem; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-mark svg { width: 38px; height: 38px; }
}

/* =====================================================================
 * Daily content, sharing, photo viewer and phone layout
 * ===================================================================== */
.linkish { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.fast-chip { display: inline-block; font-size: .85rem; font-weight: 600; padding: 4px 12px; border-radius: 99px; margin: 6px 0; }
.fast-chip.is-fast { background: color-mix(in srgb, var(--flag-green) 16%, var(--surface)); color: var(--green); }
.fast-chip.no-fast { background: var(--surface-2); color: var(--ink-soft); }
.feast-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.feast-list li { padding-left: 14px; border-left: 4px solid var(--line); }
.feast-list li.major { border-left-color: var(--gold); }
.feast-list li span { display: block; color: var(--ink-soft); font-size: .95rem; }

/* Home: the Today card is one big link */
a.today-link { text-decoration: none; color: inherit; transition: transform .2s; }
a.today-link:hover { transform: translateY(-2px); color: inherit; }
.verse-line { font-style: italic; color: var(--ink-soft); margin: 4px 0; }

/* Today page */
.today-page { padding: 24px 0 40px; display: flex; flex-direction: column; gap: 20px; }
.today-page > .eyebrow { margin: 0; }
.day-card { display: grid; grid-template-columns: auto 1fr; gap: 26px; padding: 26px; align-items: center; }
.day-big { text-align: center; display: flex; flex-direction: column; padding-right: 26px; border-right: 1px solid var(--line); }
.day-big .num { font-family: var(--ethiopic); font-size: 5rem; line-height: 1; font-weight: 700; color: var(--red); }
.day-big .mon { font-family: var(--ethiopic); font-size: 1.5rem; font-weight: 700; }
.day-big .yr { font-family: var(--ethiopic); color: var(--muted); }
.day-info h1 { font-size: clamp(1.4rem, 3.4vw, 2.1rem); margin: 0 0 4px; line-height: 1.35; }
h2.mini { font-family: var(--serif); font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--red); margin: 14px 0 8px; }
.daily-post { padding: 24px 26px; }
.daily-post h2 { font-size: 1.8rem; }
.post-img { margin: 0 0 14px; border-radius: 10px; overflow: hidden; }
.post-img img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.today-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.today-grid .panel { padding: 22px 24px; text-decoration: none; color: inherit; display: block; }
.today-grid a.panel:hover { color: inherit; border-color: var(--gold); }
.verse blockquote { margin: 0 0 10px; font-family: var(--serif-display); font-size: 1.45rem; line-height: 1.35; font-weight: 600; }
.verse .ref { margin: 0; font-weight: 600; }
.treasure { display: grid !important; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; }
.treasure-art { background: var(--art-bg); border-radius: 10px; aspect-ratio: 4/5; overflow: hidden; display: grid; place-items: center; padding: 6px; }
.treasure-art img { width: 100%; height: 100%; object-fit: cover; }
.treasure h3 { margin: 0; }
.letter-row { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.letter-row .big { font-family: var(--ethiopic); font-size: 4.6rem; line-height: 1; color: var(--red); }
.letter-row h3 { margin: 0; }
.letter-row .glyph-row { font-size: 1.25rem; letter-spacing: .12em; margin: 0; }
.earlier details { padding: 14px 18px; margin-bottom: 10px; }
.earlier summary { cursor: pointer; }
.install { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px 22px; }
.install p { margin: 2px 0 0; }

/* Calendar: tappable days and the day panel */
a.cal-day { text-decoration: none; color: inherit; cursor: pointer; }
a.cal-day:hover, a.cal-day:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; color: inherit; }
.day-detail { padding: 18px 22px; margin-top: 12px; }
.day-detail h3 { margin: 0 0 2px; font-size: 1.25rem; line-height: 1.4; }

/* Share buttons */
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.share-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-right: 4px; }
.share-btn { font: inherit; font-size: .9rem; font-weight: 600; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; }
.share-btn:hover { border-color: var(--green); color: var(--ink); }
.share-btn.wa { border-color: #128c4b; color: #0b6b38; }
.share-btn.tg { border-color: #2481cc; color: #1b6aa8; }
.share-btn.fb { border-color: #1877f2; color: #1259b8; }
.share-btn.native { background: var(--btn); border-color: var(--btn); color: #fff; }
:root[data-theme="dark"] .share-btn.wa, :root[data-theme="dark"] .share-btn.tg, :root[data-theme="dark"] .share-btn.fb { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .share-btn.wa, :root:not([data-theme="light"]) .share-btn.tg, :root:not([data-theme="light"]) .share-btn.fb { color: var(--ink); } }

/* Photo viewer */
.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 8, 6, .96); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lb-stage { flex: 1; width: 100%; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: grab; }
.lb-media { max-width: 96vw; max-height: 82vh; width: auto; height: auto; transform-origin: center; transition: transform .08s linear; user-select: none; -webkit-user-drag: none; }
svg.lb-media { width: min(96vw, 66vh); height: 82vh; }
.lb-caption { color: #f4ead6; margin: 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; font-size: .95rem; min-height: 1.4em; }
.lb-close, .lb-nav { position: absolute; z-index: 2; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
.photo a[data-lightbox], .object-art[data-lightbox] { cursor: zoom-in; display: block; }

/* Offline notice */
.offline-bar { background: #3a2a12; color: #fde68a; text-align: center; font-size: .88rem; padding: 6px 12px; }

/* Bottom tab bar (phones) */
.tabbar { display: none; }
.banner-short { display: none; }
.ico { display: block; }

@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--surface); border-top: 3px solid; border-image: var(--flag-h) 1; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 20px -12px rgba(0, 0, 0, .5); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; min-height: 58px; justify-content: center;
    font-size: .68rem; font-weight: 600; text-decoration: none; color: var(--ink-soft); font-family: var(--serif); line-height: 1.1; text-align: center; }
  .tabbar a[aria-current="page"] { color: var(--green); }
  .tabbar a[aria-current="page"] .ico { stroke-width: 2.4; }
  .site-footer { margin-bottom: 0; }

  /* one-line banner */
  .banner-long { display: none; } .banner-short { display: inline; }
  .preview-banner { font-size: .78rem; padding: 5px 34px 5px 10px; }

  /* header slides away while reading */
  .site-header { transition: transform .25s ease; }
  .site-header.header-hidden { transform: translateY(-100%); }

  /* two objects per row */
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid .card-body { padding: 10px 12px 12px; }
  .grid .card-body h3 { font-size: 1.05rem; line-height: 1.2; }
  .grid .card-body .am { font-size: .82rem; }
  .grid .card-meta { font-size: .76rem; padding-top: 4px; }
  .grid .tag { font-size: .62rem; }
  .placeholder-dot { font-size: .58rem; padding: 1px 6px; top: 6px; right: 6px; }

  .day-card { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .day-big { flex-direction: row; align-items: baseline; justify-content: center; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
  .day-big .num { font-size: 3.4rem; }
  .verse blockquote { font-size: 1.25rem; }
  .treasure { grid-template-columns: 88px 1fr; }
  .filters { gap: 8px; }
  .filter-chip { padding: 9px 14px; }
  .search { max-width: none; flex-basis: 100%; margin-left: 0; }
  .section { padding: 32px 0; }
  .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } .lb-media { transition: none; } }

/* Ge'ez chart: the letter names stay visible while scrolling sideways */
.fidel th.name { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.fidel thead th:first-child { position: sticky; left: 0; z-index: 2; }

/* ===== Admin: daily messages, content editing, phone layout ===== */
.post-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.post-list li.panel { padding: 0; }
.post-list a { display: flex; gap: 14px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.post-list a:hover { color: var(--ink); background: color-mix(in srgb, var(--flag-yellow) 10%, transparent); }
.post-date { flex: none; width: 108px; font-family: var(--ethiopic); font-weight: 700; font-size: .92rem; line-height: 1.3; color: var(--ink-soft); }
.post-date small { display: block; font-family: var(--serif); font-weight: 400; font-size: .75rem; color: var(--muted); }
.post-date.is-today { color: var(--red); } .post-date.is-future { color: var(--green); }
.post-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.post-stamp { font-family: var(--ethiopic); font-weight: 700; color: var(--red); text-align: center; padding: 10px; }
.edit-form.narrow { max-width: 720px; }
a.link-card { text-decoration: none; color: inherit; display: block; }
a.link-card:hover { border-color: var(--gold); color: inherit; }
.shrink-note { color: var(--green); font-weight: 600; }
.admin .tabbar a span { font-size: .7rem; }
@media (max-width: 760px) {
  .admin-main { padding-top: 14px; }
  .admin-userbar { font-size: .8rem; }
  .form-actions { bottom: calc(60px + env(safe-area-inset-bottom)); padding: 12px 0; }
  .form-actions .btn { flex: 1; justify-content: center; }
  .field input:not([type=checkbox]), .field textarea, .field select { font-size: 16px; padding: 12px; }  /* 16px stops iOS zooming in */
  .post-date { width: 84px; font-size: .82rem; }
  .post-list a { flex-wrap: wrap; }
  .dash-stats { grid-template-columns: 1fr; }
  .page-bar .btn { width: 100%; justify-content: center; }
}
.form-section { font-size: 1.25rem; margin: 26px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
