/* Thiền viện Phước Sơn — design "B · Hoàng Y" (Manrope, parchment + deep red, light/dark) */
:root{--bg:#f1e9db;--surface:#f8f1e4;--ph1:#e2d5bf;--ph2:#d9c9ae;--line:#cdbfa8;--text:#2a1d18;--text2:#5a4a3f;--accent:#6e1f1f;--hover:#8a2a22;--band:#5c1a1a;--on-band:#f6efe3;--on-band2:#e9dcc8;--band-accent:#e3c99a;--band-line:#a35a4f;--shadow:rgba(60,20,15,.18)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#1a1210;--surface:#231815;--ph1:#33241f;--ph2:#3b2a24;--line:#45332c;--text:#f1e9db;--text2:#cbbba8;--accent:#e3b27a;--hover:#f0cfa3;--band:#4a1616;--shadow:rgba(0,0,0,.4)}}
:root[data-theme="dark"]{--bg:#1a1210;--surface:#231815;--ph1:#33241f;--ph2:#3b2a24;--line:#45332c;--text:#f1e9db;--text2:#cbbba8;--accent:#e3b27a;--hover:#f0cfa3;--band:#4a1616;--shadow:rgba(0,0,0,.4)}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:'Manrope',system-ui,sans-serif;font-size:16px;line-height:1.7}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}a:hover{color:var(--hover)}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.wrap{max-width:1280px;margin:0 auto}
.pad{padding-left:clamp(16px,5vw,80px);padding-right:clamp(16px,5vw,80px)}

/* type */
.eyebrow{margin:0;font-size:12px;font-weight:600;letter-spacing:.32em;color:var(--accent);text-transform:uppercase}
.h1{margin:0;font-weight:300;font-size:clamp(36px,4.4vw,60px);line-height:1.1;letter-spacing:-.02em;text-wrap:balance}
.h1.xl{font-size:clamp(40px,5.2vw,76px);max-width:1000px}
.h1 em{color:var(--accent);font-style:normal}
.h2{margin:0;font-weight:300;font-size:clamp(30px,3.4vw,46px);line-height:1.2;letter-spacing:-.01em;text-wrap:balance}
.lead{margin:0;max-width:600px;font-size:18px;color:var(--text2)}
.muted{color:var(--text2)}
.meta{font-size:13px;font-weight:600;letter-spacing:.12em;color:var(--accent);text-transform:uppercase}
.center{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:16px 40px;border-radius:999px;font:inherit;font-weight:600;font-size:14px;letter-spacing:.08em;cursor:pointer;border:1px solid var(--accent);background:var(--accent);color:var(--surface);text-align:center}
.btn:hover{background:var(--hover);border-color:var(--hover);color:var(--surface)}
.btn.ghost{background:none;color:var(--accent)}
.btn.ghost:hover{background:var(--accent);color:var(--surface)}
.btn.light{background:var(--on-band);border-color:var(--on-band);color:var(--band)}
.btns{display:flex;flex-wrap:wrap;gap:16px}
.chip{display:inline-flex;align-items:center;min-height:44px;padding:0 24px;border:1px solid var(--line);border-radius:999px;font-size:14px;font-weight:600;letter-spacing:.04em}
.chip[aria-current],.chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--surface)}

/* top band + header */
.band-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 24px;padding-top:8px;padding-bottom:8px;background:var(--band);color:var(--on-band);font-size:13px;letter-spacing:.04em}
.band-top a{color:var(--on-band)}
.theme-btn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;padding:0;background:none;border:1px solid var(--band-line);border-radius:50%;color:var(--on-band);cursor:pointer}
.hdr{display:flex;flex-direction:column;align-items:center;gap:24px;padding-top:32px}
.brand{display:flex;flex-direction:column;align-items:center;gap:8px}
.brand small{font-size:11px;font-weight:600;letter-spacing:.36em;color:var(--accent)}
.brand span{font-size:36px;line-height:1.1;letter-spacing:.08em}
.menu-btn{display:none;min-height:44px;align-items:center;justify-content:center;gap:8px;padding:0 24px;background:none;border:1px solid var(--accent);border-radius:999px;color:var(--accent);font:inherit;font-weight:600;font-size:14px;letter-spacing:.08em;cursor:pointer}
.nav{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px 40px;width:100%;padding:8px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:14px;font-weight:500;letter-spacing:.08em;text-transform:uppercase}
.nav > a,.nav .top{display:flex;align-items:center;gap:8px;padding:16px 0}
.nav [aria-current="page"],.nav .active > .top{color:var(--accent);box-shadow:inset 0 -2px 0 var(--accent)}
.nav .cta{padding:8px 24px;background:var(--accent);color:var(--surface);border-radius:999px}
.nav .cta:hover{background:var(--hover);color:var(--surface)}
.has-sub{position:relative}
.sub{display:none;position:absolute;top:100%;left:50%;transform:translateX(-50%);z-index:30;flex-direction:column;min-width:250px;padding:8px 0;background:var(--surface);border-top:3px solid var(--accent);box-shadow:0 16px 40px var(--shadow);font-size:15px;letter-spacing:.02em;text-transform:none;text-align:left}
@media (max-width:760px){
  .menu-btn{display:flex}
  .nav{display:none;flex-direction:column;gap:0}
  .hdr.open .nav{display:flex}
  .has-sub{display:flex;flex-direction:column;align-items:center}
  .sub{display:flex;position:static;transform:none;min-width:0;padding:0 0 8px;background:none;border-top:none;box-shadow:none;text-align:center;color:var(--text2)}
  .sub a{padding:8px 24px}
  .hide-m{display:none!important}
}

/* sections */
.section{padding-top:120px;padding-bottom:120px}
.section.tint{background:var(--surface)}
.section.band{background:var(--band);color:var(--on-band)}
.section.band .eyebrow{color:var(--band-accent)}
.section.band .lead,.section.band .muted{color:var(--on-band2)}
.main{padding-top:72px;padding-bottom:112px}
.stack{display:flex;flex-direction:column;gap:24px}
.stack-lg{display:flex;flex-direction:column;gap:48px}
.split{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(420px,100%),1fr));gap:72px;align-items:center}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(var(--min,340px),100%),1fr));gap:24px}
.ph{border-radius:16px;background:var(--ph1);overflow:hidden;display:flex;align-items:flex-end;justify-content:center}
.ph.alt{background:var(--ph2)}
.ph img{width:100%;height:100%;object-fit:cover}

/* hero */
.hero{display:flex;flex-direction:column;align-items:center;gap:32px;padding-top:88px;text-align:center}
.hero-imgs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:24px;width:100%;max-width:1280px;margin-top:40px;align-items:end}
.hero-imgs .ph{height:380px}.hero-imgs .ph.big{height:500px}

/* cards */
.card{display:flex;flex-direction:column;background:var(--bg);border-top:3px solid var(--accent)}
.tint .card{background:var(--bg)}.card.on-surface{background:var(--surface)}
.card .card-img{padding:32px 32px 0}.card .card-img .ph{height:220px}
.card .card-body{flex:1;display:flex;flex-direction:column;gap:8px;padding:24px 32px}
.card h3{margin:0;font-weight:400;font-size:24px;line-height:1.25}
.card .card-link{margin:0 32px;padding:16px 0 24px;font-weight:600;font-size:14px;color:var(--accent);border-top:1px solid var(--line)}
.post{display:flex;flex-direction:column;gap:16px}
.post .ph{height:230px}
.post .t{font-size:22px;line-height:1.35}
.feature{display:flex;flex-wrap:wrap;background:var(--surface);border-top:3px solid var(--accent)}
.feature .ph{flex:1 1 480px;min-height:400px}
.feature .feature-body{flex:1 1 420px;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:16px;padding:clamp(32px,4vw,64px)}
.list-links a{display:flex;justify-content:space-between;align-items:baseline;gap:24px;padding:24px 0;border-top:1px solid var(--line);font-size:26px}
.list-links a:last-child{border-bottom:1px solid var(--line)}
.list-links span:last-child{color:var(--accent)}
.steps{margin:0 auto;padding:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:40px;max-width:1280px}
.steps li{display:flex;flex-direction:column;gap:16px;padding-top:24px;border-top:1px solid var(--band-line)}
.steps .n{font-style:italic;font-size:40px;line-height:1;color:var(--band-accent)}
.steps strong{font-weight:600;font-size:18px}
.steps span:last-child{color:var(--on-band2)}
.panel{padding:clamp(32px,5vw,72px);border:1px solid var(--line);border-top:3px solid var(--accent)}
.boxed{background:var(--surface);border-top:3px solid var(--accent);padding:32px}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:24px;padding-top:32px;border-top:1px solid var(--line)}
.facts a,.facts div{display:flex;flex-direction:column;gap:8px}
.facts .k{font-size:12px;font-weight:600;letter-spacing:.16em;color:var(--accent)}
.facts .v{font-size:22px}

/* calendar */
.cal-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding-top:24px;border-top:1px solid var(--line)}
.cal-nav{display:flex;align-items:center;gap:16px}
.circle{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--accent);border-radius:50%;color:var(--accent);font-size:18px}
.circle:hover{background:var(--accent);color:var(--surface)}
.cal-month{min-width:200px;text-align:center;font-size:24px;font-weight:300}
.cal{background:var(--surface);border-top:3px solid var(--accent);overflow-x:auto}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(96px,1fr));min-width:700px}
.cal-grid .wd{padding:16px 0;font-size:12px;font-weight:600;letter-spacing:.16em;color:var(--accent);text-align:center}
.cal-grid .day{min-height:116px;padding:8px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px;min-width:0}
.cal-grid .day.today .d{color:var(--surface);background:var(--accent);border-radius:999px;align-self:flex-start}
.cal-grid .d{padding:0 8px;font-size:15px}
.ev{display:block;height:24px;padding:0 8px;border-radius:8px;background:var(--accent);color:var(--surface);font-size:12px;font-weight:600;line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ev:hover{color:var(--surface);background:var(--hover)}
.ev.short{border:1px solid var(--accent);background:var(--bg);color:var(--accent);line-height:22px}
.ev.short:hover{background:var(--accent);color:var(--surface)}

/* forms */
.form-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,360px);gap:48px;align-items:start}
@media (max-width:900px){.form-wrap{grid-template-columns:1fr}}
fieldset{margin:0 0 32px;padding:32px;border:none;background:var(--surface);border-top:3px solid var(--accent);display:flex;flex-direction:column;gap:24px}
legend{float:left;width:100%;padding:0 0 8px;font-size:24px;font-weight:300}
legend small{display:block;font-size:12px;font-weight:600;letter-spacing:.24em;color:var(--accent)}
.field{display:flex;flex-direction:column;gap:8px;font-weight:500}
.field .help{font-size:13px;font-weight:400;color:var(--text2)}
.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea{width:100%;min-height:48px;padding:16px 16px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--text);font:inherit;font-weight:400}
.field textarea{min-height:120px;resize:vertical}
.check{display:flex;gap:16px;align-items:flex-start;font-weight:400}
.check input{width:20px;height:20px;margin-top:8px;accent-color:var(--accent)}
.choices{display:flex;flex-wrap:wrap;gap:8px 24px;font-weight:400}
.choices label{display:flex;gap:8px;align-items:center;min-height:44px}
.choices input{width:20px;height:20px;accent-color:var(--accent)}
.req{color:var(--accent)}
.group-title{margin:8px 0 0;font-size:20px;font-weight:300;padding-top:16px;border-top:1px solid var(--line)}
.course-pick{display:flex;flex-direction:column;gap:8px}
.course-pick a{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 24px;padding:16px 24px;border:1px solid var(--line);border-radius:16px;background:var(--bg)}
.course-pick a[aria-current]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.course-pick strong{font-weight:600}
.course-pick .w{color:var(--accent);font-weight:600;font-size:14px}
.notice{padding:24px 32px;border-radius:16px;background:var(--surface);border:1px solid var(--line)}
.notice.err{border-color:var(--accent);color:var(--accent)}
.done{padding:48px;background:var(--surface);border-top:3px solid var(--accent);display:flex;flex-direction:column;gap:16px}
.aside-box{position:sticky;top:24px;padding:32px;background:var(--surface);border-top:3px solid var(--accent);display:flex;flex-direction:column;gap:16px}
.aside-box ul{margin:8px 0 0;padding-left:24px;color:var(--text2)}

/* rich text from the CMS */
.prose{max-width:800px;margin:0 auto;font-size:17px;overflow-wrap:anywhere}
.prose img{height:auto;border-radius:12px;margin:16px auto}
.prose a{color:var(--accent);text-decoration:underline}
.prose h1,.prose h2,.prose h3{font-weight:400;line-height:1.3}
.prose table{border-collapse:collapse;width:100%;display:block;overflow-x:auto}
.prose td,.prose th{border:1px solid var(--line);padding:8px}
.prose iframe{max-width:100%}

/* library */
.books{--min:240px}
.book{display:flex;flex-direction:column;gap:8px;padding:24px;background:var(--surface);border-top:3px solid var(--accent)}
.book .t{font-size:18px;line-height:1.4}
.book .a{font-size:14px;color:var(--text2)}
.book .go{margin-top:auto;padding-top:16px;font-size:13px;font-weight:600;letter-spacing:.08em;color:var(--accent)}
.pager{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;font-weight:600}
.pager a,.pager span{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--line)}
.pager [aria-current]{background:var(--accent);border-color:var(--accent);color:var(--surface)}

/* people, timeline, gallery, fund */
.people{--min:220px}
.person{display:flex;flex-direction:column;gap:16px}
.person .ph{aspect-ratio:4/5}
.person .n{font-size:20px;line-height:1.3}
.timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.timeline li{display:grid;grid-template-columns:120px 1fr;gap:24px;padding:24px 0;border-top:1px solid var(--line)}
.timeline li span:first-child{font-size:22px;color:var(--accent)}
blockquote.quote{margin:0 auto;max-width:900px;font-size:clamp(24px,2.6vw,34px);font-weight:300;line-height:1.4;text-align:center}
.gallery{columns:3 280px;column-gap:24px}
.gallery figure{margin:0 0 24px;break-inside:avoid;border-radius:16px;overflow:hidden;background:var(--ph1)}
.gallery img{width:100%;height:auto}
.embed{width:100%;min-height:560px;border:0;border-radius:16px;background:var(--surface)}
.map{width:100%;height:420px;border:0;border-radius:16px;background:var(--ph1)}
.info{display:flex;flex-direction:column;gap:16px;padding:32px;background:var(--surface);border-top:3px solid var(--accent)}
.info .k{display:block;font-size:12px;font-weight:600;letter-spacing:.16em;color:var(--accent)}

/* footer + quick contact */
.ftr{display:flex;flex-direction:column;align-items:center;gap:16px;padding-top:56px;padding-bottom:96px;border-top:1px solid var(--line);text-align:center;font-size:13px;color:var(--text2)}
.ftr .name{font-size:28px;letter-spacing:.08em;color:var(--text)}
.ftr nav{display:flex;flex-wrap:wrap;justify-content:center;gap:0 32px;font-size:14px;font-weight:500}
.ftr nav a{padding:8px 0}
.quick{position:fixed;right:24px;bottom:24px;z-index:20;display:flex;flex-direction:column;gap:8px}
.quick a{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 24px;border-radius:999px;font-weight:600;font-size:14px;letter-spacing:.04em;box-shadow:0 8px 24px var(--shadow);background:var(--accent);color:var(--surface)}
.quick a.alt{background:var(--surface);color:var(--accent);border:1px solid var(--accent)}
@media (max-width:760px){.quick{right:16px;bottom:16px}.quick a{padding:0 16px}}

/* abbot: life timeline band, tabs, tab layouts */
.life{list-style:none;margin:0 auto;padding:0;max-width:960px;position:relative}
.life::before{content:"";position:absolute;left:120px;top:8px;bottom:8px;width:1px;background:var(--band-line)}
.life li{position:relative;display:grid;grid-template-columns:96px 1fr;gap:8px 48px;padding:24px 0}
.life li::before{content:"";position:absolute;left:115px;top:30px;width:11px;height:11px;border-radius:50%;background:var(--band-accent)}
.life .y{grid-row:span 2;text-align:right;font-size:22px;font-weight:300;color:var(--band-accent);font-variant-numeric:tabular-nums}
.life strong{font-weight:600}
.life span:last-child{color:var(--on-band2)}
@media (max-width:600px){.life::before{left:6px}.life li{grid-template-columns:1fr;padding-left:32px}.life li::before{left:1px;top:28px}.life .y{text-align:left;grid-row:auto}}
.tab-bar{display:flex;gap:8px 32px;overflow-x:auto;border-bottom:1px solid var(--line);scrollbar-width:thin}
.tab{flex:none;padding:16px 0;font-size:14px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text2);white-space:nowrap}
.tab[aria-selected="true"]{color:var(--accent);box-shadow:inset 0 -2px 0 var(--accent)}
.tab-panel{padding-top:40px;display:flex;flex-direction:column;gap:32px}
.tab-panel:focus{outline:none}
.tab-title{margin:0;font-size:28px;font-weight:300}
.tabs.js .tab-panel[hidden]{display:none}
.tabs:not(.js) .tab-panel + .tab-panel{border-top:1px solid var(--line);margin-top:40px}
.fact-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:0 32px;margin:0}
.fact-grid div{display:flex;flex-direction:column;gap:8px;padding:16px 0;border-top:1px solid var(--line)}
.fact-grid dt{font-size:12px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--accent)}
.fact-grid dd{margin:0;font-size:17px}
.tl{list-style:none;margin:0;padding:0 0 0 24px;border-left:1px solid var(--line);display:flex;flex-direction:column;gap:24px;max-width:860px}
.tl li{position:relative;display:flex;flex-direction:column;gap:8px}
.tl li::before{content:"";position:absolute;left:-30px;top:8px;width:11px;height:11px;border-radius:50%;background:var(--accent)}
.tl .y{font-size:13px;font-weight:600;letter-spacing:.12em;color:var(--accent)}
.tiles{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:16px}
.tiles li{padding:24px 24px;background:var(--bg);border-top:3px solid var(--accent);line-height:1.5}

/* photo grid (gallery page + grouped images inside articles) */
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));grid-auto-flow:dense;gap:16px}
.photo-grid > *{margin:0;position:relative;aspect-ratio:4/3;border-radius:12px;overflow:hidden;background:var(--ph1)}
.photo-grid .big{grid-column:span 2;grid-row:span 2}
@media (max-width:560px){.photo-grid{grid-template-columns:repeat(2,1fr)}.photo-grid .big{grid-column:span 2;grid-row:span 1}}
.photo-grid img,.prose .photo-grid img{width:100%;height:100%;object-fit:cover;margin:0;border-radius:0;transition:transform .4s ease}
.photo-grid figcaption{position:absolute;left:0;right:0;bottom:0;padding:24px 16px 8px;font-size:12px;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.55));opacity:0;transition:opacity .2s}
.photo-grid > *:hover img{transform:scale(1.04)}
.photo-grid > *:hover figcaption{opacity:1}
[data-zoom]{cursor:zoom-in}
.prose figure{margin:24px 0}
.prose figcaption{font-size:14px;color:var(--text2);text-align:center}

/* lightbox */
.lb{position:fixed;inset:0;z-index:100;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:rgba(15,8,6,.94);color:#f6efe3;overscroll-behavior:contain}
.lb::backdrop{background:rgba(15,8,6,.94)}
.lb-stage{position:absolute;inset:56px 0 64px;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none}
.lb-img{max-width:94vw;max-height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none;transform-origin:0 0;cursor:zoom-in;will-change:transform}
.lb.zoomed .lb-img{cursor:grab}.lb.dragging .lb-img{cursor:grabbing}
.lb-top{position:absolute;top:0;left:0;right:0;height:56px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 8px 0 24px;font-size:14px;letter-spacing:.06em}
.lb-cap{position:absolute;bottom:0;left:0;right:0;min-height:64px;display:flex;align-items:center;justify-content:center;padding:8px 72px;text-align:center;font-size:14px;color:#e9dcc8}
.lb button{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:#f6efe3;cursor:pointer}
.lb button:hover{background:rgba(255,255,255,.18)}
.lb-tools{display:flex;gap:8px}
.lb-prev,.lb-next{position:absolute;top:50%;transform:translateY(-50%);z-index:2}
.lb-prev{left:12px}.lb-next{right:12px}
.lb.single .lb-prev,.lb.single .lb-next{display:none}
@media (max-width:600px){.lb-prev,.lb-next{top:auto;bottom:8px;transform:none}.lb-cap{padding:8px 64px}}

/* alignment fixes: centred reading column for tab panels and article images */
.tab-panel{width:100%;max-width:960px;margin:0 auto}
.tab-panel .prose{max-width:none;margin:0}
.tab-bar{justify-content:safe center}
.tl,.fact-grid,.tiles{width:100%}
.prose figure,.prose .wp-block-image{margin:32px auto;text-align:center}
.prose img{width:auto;max-width:100%;max-height:70vh;margin:0 auto;object-fit:contain}
.prose figure img{display:inline-block}
.prose .alignleft,.prose .alignright{float:none;margin-left:auto;margin-right:auto}
.prose .wp-block-gallery{display:grid;margin:32px 0}
.prose .wp-block-gallery > figure{margin:0}
.prose .wp-block-gallery figure figcaption{margin:0}
.prose .photo-grid{grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr))}

/* ---- typography & alignment pass ---------------------------------------------------------- */
p,li,dd,.lead{text-wrap:pretty}
h1,h2,h3,.h1,.h2,.t,.c-title,.book .t{text-wrap:balance}
.btn,.chip,.tab,.nav a,.sub a,.meta,.eyebrow,.badge,.pager a,.cal-month,.ftr nav a,.quick a,.band-top a{white-space:nowrap}
.nw-soft{white-space:normal}
.t-a,.t-b{display:inline-block}            /* each side of "A – B" wraps as a unit */
.badge{display:inline-flex;align-items:center;height:24px;padding:0 8px;border-radius:999px;background:var(--accent);color:var(--surface);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}

/* course cards: same rows across a grid row (subgrid) */
.grid:has(> .card.course){row-gap:24px}
.card.course{display:grid;grid-template-rows:subgrid;grid-row:span 5;gap:0}
.card.course .card-img{padding:32px 32px 0;display:block}
.card.course .ph.sq{aspect-ratio:1/1;height:auto;width:100%}
.card.course .c-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 8px;padding:24px 32px 0;align-content:start}
.card.course .c-meta .meta{font-size:12.5px;letter-spacing:.1em;line-height:1.5}
.card.course .meta-sub{flex-basis:100%;font-size:13px;font-weight:600;color:var(--text2)}
.card.course .c-title{margin:0;padding:8px 32px 0;font-weight:400;font-size:24px;line-height:1.25;align-self:start}
.card.course .c-sub{margin:0;padding:8px 32px 0;font-size:15px;color:var(--text2);align-self:start}
.card.course .card-link{align-self:end;margin:24px 32px 0;padding:16px 0 24px}
@supports not (grid-template-rows:subgrid){.card.course{display:flex;flex-direction:column}.card.course .card-link{margin-top:auto}}

/* news posts: image, meta, title aligned */
.grid:has(> .post){row-gap:48px}
.grid > .post{display:grid;grid-template-rows:subgrid;grid-row:span 3;gap:16px}
.post .t{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* library: meta, title (≤3 lines), author, link aligned */
.grid.books > .book{display:grid;grid-template-rows:subgrid;grid-row:span 4;gap:8px}
.book .t{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.book .a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.book .go{align-self:end}

/* register list: name left, schedule as two short right-aligned lines */
.course-pick a{align-items:center}
.course-pick .w{display:flex;flex-direction:column;align-items:flex-end;gap:0;text-align:right}
.course-pick .w span{white-space:nowrap}
@media (max-width:600px){.course-pick .w{align-items:flex-start;text-align:left}.course-pick .w span{white-space:normal}}

/* teacher chip (course card, course page, register list) */
.teachers{display:flex;flex-wrap:wrap;gap:8px 16px}
.teacher{display:inline-flex;align-items:center;gap:8px;min-height:44px;color:var(--text)}
a.teacher:hover .tn{color:var(--hover);text-decoration:underline;text-underline-offset:3px}
.teacher .av{flex:none;width:40px;height:40px;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--ph2);color:var(--accent);font-weight:600;font-size:15px;border:1px solid var(--line)}
.teacher .av img{width:100%;height:100%;object-fit:cover}
.teacher .tx{display:flex;flex-direction:column;line-height:1.3}
.teacher .tn{font-size:15px;font-weight:500}
.teacher .tr{font-size:12px;color:var(--text2)}
a.teacher .tr{color:var(--accent)}
.teachers.compact{margin-top:8px}
.teachers.compact .av{width:28px;height:28px;font-size:12px}
.teachers.compact .tn{font-size:14px}
.course-pick .teacher{min-height:32px}

/* travel guide (Đường đến) */
.travel-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:16px}
.travel-nav a{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 24px 0 16px;border:1px solid var(--line);border-radius:999px;background:var(--bg);font-weight:600;font-size:14px;white-space:nowrap}
.ti{display:inline-flex;width:28px;height:28px;color:var(--accent)}
.ti.big{width:56px;height:56px;padding:16px;border-radius:50%;background:var(--bg);border:1px solid var(--line);box-sizing:border-box}
.travel{list-style:none;margin:0 auto;padding:0;max-width:960px;width:100%;display:flex;flex-direction:column}
.travel-item{display:grid;grid-template-columns:56px minmax(0,1fr);gap:24px;padding:32px 0;border-top:1px solid var(--line);scroll-margin-top:24px}
.travel-item:last-child{border-bottom:1px solid var(--line)}
.travel-item h3{margin:0;font-size:24px;font-weight:400}
.travel-item .num{color:var(--accent)}
.travel-body{max-width:none;margin:0;font-size:16px}
.travel-body p{margin:8px 0}
.travel-body ul{margin:8px 0 16px;padding-left:24px}
.travel-body li{margin:8px 0}
@media (max-width:560px){.travel-item{grid-template-columns:1fr;gap:16px}}

/* "Đang diễn ra" on top of the poster */
.card.course .ph.sq{position:relative}
.badge.on-poster{position:absolute;top:12px;left:12px;gap:8px;height:28px;padding:0 16px;font-size:11.5px;box-shadow:0 4px 14px rgba(0,0,0,.25)}
.badge .dot{width:7px;height:7px;border-radius:50%;background:#f6efe3;animation:ps-pulse 1.6s ease-in-out infinite}
@keyframes ps-pulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.badge .dot{animation:none}}
.badge.len{background:var(--surface);color:var(--accent);border:1px solid var(--accent)}
.badge.on-poster.len{left:auto;right:12px}

/* opening hours */
.hours-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr));gap:24px;max-width:960px;margin:0 auto}
.hours-card{display:grid;grid-template-columns:56px minmax(0,1fr);gap:24px;padding:32px;background:var(--surface);border-top:3px solid var(--accent)}
.hours-card .k{font-size:12px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--accent)}
.big-time{font-size:32px;font-weight:300;line-height:1.2;font-variant-numeric:tabular-nums}
.hours-rows{margin:0;display:flex;flex-direction:column;gap:8px}
.hours-rows div{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid var(--line)}
.hours-rows dt{color:var(--text2)}
.hours-rows dd{margin:0;font-size:20px;font-weight:400;font-variant-numeric:tabular-nums;white-space:nowrap}
.status{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;margin-top:8px;padding:8px 16px;border-radius:999px;font-size:13px;font-weight:600;border:1px solid var(--line)}
.status::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.status.open{color:#2f6b3a;border-color:#2f6b3a}
.status.closed{color:var(--text2)}
:root[data-theme="dark"] .status.open{color:#9fd3a8;border-color:#9fd3a8}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .status.open{color:#9fd3a8;border-color:#9fd3a8}}
.hours-notes{max-width:960px;margin:24px auto 0;padding-left:24px;color:var(--text2);display:flex;flex-direction:column;gap:8px}
@media (max-width:480px){.hours-card{grid-template-columns:1fr}}

.hours-note{margin:16px 0 0;padding-top:16px;border-top:1px solid var(--line);font-size:15px;color:var(--text2);line-height:1.6}
.hours-card > .stack{height:100%}

/* home introduction video */
.video{position:relative;margin:0 auto;width:100%;max-width:1120px;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:#140c0a;border-top:3px solid var(--accent);box-shadow:0 24px 60px var(--shadow)}
.video video{display:block;width:100%;height:100%;object-fit:cover;background:#140c0a}
.video-play{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;border:0;padding:0;cursor:pointer;color:#fff;
  background:linear-gradient(180deg,rgba(20,12,10,.05) 40%,rgba(20,12,10,.55));font:inherit}
.video-btn{width:88px;height:88px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding-left:8px;background:var(--accent);color:var(--surface);
  box-shadow:0 12px 32px rgba(0,0,0,.35);transition:transform .2s ease,background .2s}
.video-play:hover .video-btn,.video-play:focus-visible .video-btn{transform:scale(1.08);background:var(--hover)}
.video-meta{padding:8px 16px;border-radius:999px;background:rgba(20,12,10,.55);font-size:14px;font-weight:600;letter-spacing:.06em}
.video.playing .video-play{display:none}
@media (max-width:600px){.video-btn{width:64px;height:64px}.video-btn svg{width:24px;height:24px}}

/* course note above the registration form */
.callout{display:grid;grid-template-columns:24px minmax(0,1fr);gap:16px;align-items:start;padding:24px 24px;border-radius:16px;background:var(--surface);border:1px solid var(--accent);color:var(--text)}
.callout-i{color:var(--accent);margin-top:0}
.callout strong{display:block;font-size:12px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--accent)}
.callout p{margin:8px 0 0;font-size:16px}

/* course page */
.badges{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.course-top{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:40px;align-items:start;max-width:1120px;margin:0 auto;width:100%}
@media (max-width:860px){.course-top{grid-template-columns:1fr}}
.course-poster{margin:0;aspect-ratio:1/1;border-radius:16px;overflow:hidden;background:var(--ph1);border-top:3px solid var(--accent)}
.course-poster img{width:100%;height:100%;object-fit:contain;background:var(--ph1)}
.facts-card{display:flex;flex-direction:column;gap:24px;padding:32px;background:var(--surface);border-top:3px solid var(--accent)}
.facts-list{margin:0;display:flex;flex-direction:column}
.facts-list > div{display:grid;grid-template-columns:150px minmax(0,1fr);gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}
.facts-list > div:first-child{padding-top:0}
.facts-list dt{font-size:12px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);padding-top:0}
.facts-list dd{margin:0;font-size:16px}
@media (max-width:480px){.facts-list > div{grid-template-columns:1fr;gap:8px}}
.sessions{margin:0;padding-left:16px}
.reading{width:100%;max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:24px}
.reading .prose{max-width:none;margin:0}
.h2.sm{font-size:clamp(26px,2.6vw,34px)}
.reading fieldset{padding:32px}

/* language switch */
.lang{display:flex;align-items:center;gap:8px}
.lang a{padding:8px 0;opacity:.75}
.lang a[aria-current]{opacity:1;font-weight:600;text-decoration:underline;text-underline-offset:4px}

/* course page: details left, facts table right (sticky) */
.course-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,380px);gap:48px;align-items:start;width:100%}
.course-main{display:flex;flex-direction:column;gap:48px;min-width:0}
.course-main .prose{max-width:none;margin:0}
.course-main .course-poster{aspect-ratio:auto;max-width:720px;width:100%;background:none}
.course-main .course-poster img{height:auto;object-fit:contain}
.course-side{position:sticky;top:24px}
.course-side .facts-card{padding:32px;gap:16px}
.course-side .facts-list > div{grid-template-columns:1fr;gap:8px;padding:16px 0}
.course-side .btn{width:100%}
.side-link{font-weight:600;font-size:14px;color:var(--accent)}
@media (max-width:900px){
  .course-layout{grid-template-columns:1fr;gap:32px}
  .course-side{position:static;order:-1}
}

/* article content on a surface card */
.article-card{width:100%;max-width:880px;margin:0 auto;box-sizing:border-box;padding:clamp(24px,4vw,56px);background:var(--surface);border-top:3px solid var(--accent)}
.article-card .prose{max-width:none;margin:0}
.article-card .prose > :first-child{margin-top:0}
.article-card .prose > :last-child{margin-bottom:0}
.course-main .article-card{max-width:none}
@media (max-width:560px){.article-card{padding:24px 16px}}

/* banner inside the article card, centred */
.card-banner{margin:0 auto 32px;display:flex;justify-content:center}
.card-banner img{display:block;max-width:100%;width:auto;max-height:640px;height:auto;border-radius:12px;object-fit:contain}
.card-banner.portrait img{max-height:520px}
.card-banner:last-child{margin-bottom:0}
/* course: details card and facts card start on the same line */
.course-main > section:first-child .article-card{margin-top:0}
.course-side .facts-card,.course-main .article-card{border-top-width:3px}
/* course: same top padding on the details card and the facts card */
.course-side .facts-card{padding:32px}
.course-main .article-card{padding:32px clamp(24px,3.2vw,40px) clamp(32px,3.2vw,40px)}

/* home: "joining a retreat" — An Trú layout (intro left, step cards right) in Hoàng Y colours */
.attend{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr));gap:40px 64px;align-items:center;padding:clamp(32px,5vw,72px);background:var(--surface);border-radius:28px;border-top:3px solid var(--accent)}
.attend-intro{display:flex;flex-direction:column;align-items:flex-start;gap:24px}
.attend-steps{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:16px}
.attend-steps li{display:flex;align-items:center;gap:24px;padding:24px 24px;background:var(--bg);border-radius:20px}
.attend-steps .num{flex:none;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--accent);color:var(--surface);font-weight:600;font-size:17px}
.attend-steps .txt{display:flex;flex-direction:column;gap:0}
.attend-steps strong{font-weight:600;font-size:17px}
.attend-steps .txt span{color:var(--text2)}

/* home: smaller news card titles */
#tin-tuc .post .t{font-size:18px;line-height:1.45}
#tin-tuc .post{gap:16px}

/* "joining a retreat" on the deep-red band (previous colours) with the An Trú layout */
.band .attend{background:none;border-top:none;border-radius:0;padding:0}
.band .attend-intro .h2{color:var(--on-band)}
.band .attend-steps li{background:rgba(246,239,227,.06);border:1px solid var(--band-line)}
.band .attend-steps .num{background:var(--band-accent);color:var(--band)}
.band .attend-steps strong{color:var(--on-band)}
.band .attend-steps .txt span{color:var(--on-band2)}

/* course cards: rounded 8px, poster full-bleed on top, shadow, surface background */
.card.course,.card.course.on-surface{background:var(--surface);border-top:none;border-radius:8px;overflow:hidden;
  box-shadow:0 1px 2px rgba(60,20,15,.06),0 8px 24px rgba(60,20,15,.08);transition:box-shadow .2s ease,transform .2s ease}
.card.course:hover{box-shadow:0 2px 4px rgba(60,20,15,.08),0 14px 36px rgba(60,20,15,.14);transform:translateY(-2px)}
.card.course .card-img{padding:0}
.card.course .ph.sq{border-radius:0}
.card.course .c-meta{padding-top:24px}
.card.course .card-link{margin-top:16px}
:root[data-theme="dark"] .card.course{box-shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.35)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .card.course{box-shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.35)}}
@media (prefers-reduced-motion:reduce){.card.course,.card.course:hover{transition:none;transform:none}}

/* ---- one card style: 8px radius, one shadow, surface background (8px spacing grid) ------------ */
:root{--radius:8px;--card-shadow:0 1px 2px rgba(60,20,15,.06),0 8px 24px rgba(60,20,15,.08);--card-shadow-hover:0 2px 4px rgba(60,20,15,.08),0 16px 40px rgba(60,20,15,.14)}
:root[data-theme="dark"]{--card-shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.35);--card-shadow-hover:0 2px 4px rgba(0,0,0,.35),0 16px 40px rgba(0,0,0,.45)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--card-shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.35);--card-shadow-hover:0 2px 4px rgba(0,0,0,.35),0 16px 40px rgba(0,0,0,.45)}}

.card,.card.course,.card.course.on-surface,.article-card,.facts-card,.book,.hours-card,.boxed,.info,.panel,.done,
fieldset,.aside-box,.feature,.cal,.course-pick a,.tiles li,.attend-steps li,.notice,.callout,.travel-nav a{
  border-radius:var(--radius);box-shadow:var(--card-shadow);background:var(--surface);border-top:none}
.notice,.callout{border:1px solid var(--line)}
.callout{border-color:var(--accent)}
.panel{border:none}
.card.course:hover,.book:hover,a.card:hover,.feature:hover{box-shadow:var(--card-shadow-hover)}
/* cards sitting on a surface-coloured section use the page colour so they still read as cards */
.tint .card,.tint .book,.tint .hours-card,.tint .boxed,.tint .info,.tint .tiles li,.tint .facts-card,.tint fieldset,.tint .article-card{background:var(--bg)}
/* steps on the dark band: translucent tiles, same radius, no shadow on the dark background */
.band .attend-steps li{background:rgba(246,239,227,.06);box-shadow:none;border:1px solid var(--band-line)}
.band .attend{box-shadow:none}

/* images and media inside cards and pages: same radius */
.ph,.ph img,.card-banner img,.course-poster,.photo-grid > *,.gallery figure,.video,.map,.embed,.prose img,.person .ph,.post .ph{border-radius:var(--radius)}
.card.course .ph.sq,.card.course .card-img{border-radius:0}
.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea{border-radius:var(--radius)}

.video{box-shadow:var(--card-shadow);border-top:none}

/* contact card: centre its content against the map height instead of leaving space at the bottom */
.info{justify-content:center}

/* ---- about (Thiền viện) ------------------------------------------------------------------- */
.about-hero{position:relative;min-height:clamp(480px,64vh,720px);display:flex;align-items:flex-end;overflow:hidden;background:var(--band)}
.about-hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.about-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(26,18,16,.1) 30%,rgba(26,18,16,.78))}
.about-hero-text{position:relative;z-index:1;width:100%;max-width:1280px;margin:0 auto;padding-top:96px;padding-bottom:64px;display:flex;flex-direction:column;gap:16px;color:#f6efe3}
.about-hero-text .eyebrow{color:var(--band-accent)}
.about-hero-text .h1{max-width:900px}
.about-hero-text .lead{color:#e9dcc8;max-width:680px}
.facts-strip{margin:-48px auto 0;position:relative;z-index:2;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.facts-strip div{display:flex;flex-direction:column-reverse;gap:8px;padding:24px 32px;border-left:1px solid var(--line)}
.facts-strip div:first-child{border-left:none}
.facts-strip dd{margin:0;font-size:clamp(24px,2.4vw,32px);font-weight:300;line-height:1.2;color:var(--accent)}
.facts-strip dt{font-size:12px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--text2)}
@media (max-width:640px){.facts-strip div{border-left:none;border-top:1px solid var(--line)}.facts-strip div:first-child{border-top:none}}
.about-video{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:48px;align-items:center}
@media (max-width:900px){.about-video{grid-template-columns:1fr}}
.channels{display:flex;flex-wrap:wrap;gap:8px}
.history{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);gap:48px;align-items:start}
.history-head{position:sticky;top:24px;display:flex;flex-direction:column;gap:16px}
.history .article-card{max-width:none;margin:0}
@media (max-width:900px){.history{grid-template-columns:1fr;gap:24px}.history-head{position:static}}
.leaders{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(420px,100%),1fr));gap:24px}
.leader{display:grid;grid-template-columns:120px minmax(0,1fr);gap:24px;align-items:center;padding:32px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.leader h3{margin:0;font-size:28px;font-weight:300;line-height:1.2}
.leader-photo{width:120px;height:120px;border-radius:50%;object-fit:cover}
.initials{display:flex;align-items:center;justify-content:center;background:var(--ph2);color:var(--accent);font-size:40px;font-weight:300;letter-spacing:.04em}
.teacher-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));gap:16px}
.teacher-card{display:grid;grid-template-columns:64px minmax(0,1fr);gap:16px;align-items:center;padding:16px;background:var(--bg);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.teacher-card:hover{box-shadow:var(--card-shadow-hover);color:inherit}
.tc-photo{width:64px;height:64px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;background:var(--ph2);color:var(--accent);font-size:20px;font-weight:500}
.tc-photo img{width:100%;height:100%;object-fit:cover}
.tc-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.tc-text strong{font-weight:600;font-size:16px;line-height:1.35}
.tc-text span{font-size:13px;color:var(--text2);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.more{display:flex;flex-direction:column;align-items:center}
.more > summary{list-style:none;align-self:center;cursor:pointer}
.more > summary::-webkit-details-marker{display:none}
.more[open] > summary{display:none}
.activity .card-body{gap:8px}
.activity strong{font-size:20px;font-weight:500}
/* about photo strip: fixed columns so the big tile + 4 photos always fill complete rows */
.about-photos{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:560px){.about-photos{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---- calendar: lunar dates + one colour per course ----------------------------------------- */
.cal-grid .day-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.lunar{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--text2);white-space:nowrap}
.moon{display:inline-block;width:10px;height:10px;border-radius:50%;flex:none}
.moon.new{border:1.5px solid var(--accent)}
.moon.full{background:#c9962b;box-shadow:0 0 0 2px rgba(201,150,43,.25)}
.moon-name{font-weight:600;color:var(--accent)}
.day.moon-new .lunar,.day.moon-full .lunar{color:var(--accent);font-weight:600}
.day.moon-full{background:color-mix(in srgb,#c9962b 8%,transparent)}
.ev,.ev.short{border:none;background:var(--ev,var(--accent));color:#fff;line-height:24px}
.ev:hover,.ev.short:hover{color:#fff;background:var(--ev,var(--accent));filter:brightness(1.15)}
.cal-legend{display:flex;flex-wrap:wrap;gap:8px 24px;justify-content:center;margin:-16px 0 0;font-size:13px}
.cal-legend span{display:inline-flex;align-items:center;gap:8px}
.cal-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--ev);margin-right:8px;vertical-align:middle}
@media (max-width:640px){.lunar .moon-name{display:none}}
/* announcement bar: the course link is long — let it shrink with an ellipsis instead of widening the page */
.band-top > a:first-child{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}
@media (max-width:640px){.band-top > a:first-child{flex:1 1 100%}}
@media (max-width:640px){.eyebrow{white-space:normal;overflow-wrap:anywhere}}
/* partner retreats on the calendar page */
.partner{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:24px 48px;align-items:start;padding:32px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow);margin-top:40px}
.partner-head{display:flex;flex-direction:column;gap:8px}
.partner-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;counter-reset:p}
.partner-list li{counter-increment:p;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;padding:16px 0;border-top:1px solid var(--line)}
.partner-list li:first-child{border-top:none;padding-top:0}
.partner-list strong{font-size:18px;font-weight:500}
.partner-list strong::before{content:counter(p) ". ";color:var(--accent)}
.partner-list .badge{white-space:normal}
.partner > .btn{grid-column:2;justify-self:start}
@media (max-width:900px){.partner{grid-template-columns:1fr;padding:24px}.partner > .btn{grid-column:1}}
/* no photo → no placeholder circle, the text takes the full width */
.leader.no-photo,.teacher-card.no-photo{grid-template-columns:minmax(0,1fr)}
.teacher-card.no-photo{min-height:96px}
/* article / profile titles are often full sentences: smaller than page titles, comfortable line length */
.h1.article-title{font-size:clamp(26px,2.4vw,34px);line-height:1.3;letter-spacing:-.01em;max-width:960px;margin-left:auto;margin-right:auto}
@media (max-width:640px){.h1.article-title{font-size:22px;line-height:1.35}}

/* ---- news card: same format as the course card (home + news list) ---------------------------- */
.news-grid{--min:300px;gap:24px}
.card.news{display:grid;grid-template-rows:subgrid;grid-row:span 4;gap:0;background:var(--surface);border-top:none;border-radius:var(--radius);overflow:hidden;box-shadow:var(--card-shadow);transition:box-shadow .2s,transform .2s}
.card.news:hover{box-shadow:var(--card-shadow-hover);transform:translateY(-2px)}
.card.news .card-img{padding:0;display:block}
.card.news .ph{display:block;height:auto;aspect-ratio:16/10;border-radius:0}
.card.news .ph img{width:100%;height:100%;object-fit:cover;border-radius:0}
.card.news .c-meta{padding:24px 32px 0}
.card.news .c-meta .meta{font-size:12px;letter-spacing:.16em;line-height:1.5}
.card.news .c-title{margin:0;padding:8px 32px 0;font-weight:400;font-size:20px;line-height:1.4;align-self:start;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.card.news .c-title a{color:inherit}
.card.news .card-link{align-self:end;margin:16px 32px 0;padding:16px 0 24px}
.tint .card.news{background:var(--bg)}
@supports not (grid-template-rows:subgrid){.card.news{display:flex;flex-direction:column}.card.news .card-link{margin-top:auto}}
@media (prefers-reduced-motion:reduce){.card.news,.card.news:hover{transition:none;transform:none}}
/* home and news list: the same 3-column layout (2 on tablets, 1 on phones) */
.news-grid{grid-template-columns:repeat(auto-fill,minmax(max(280px,calc((100% - 48px) / 3)),1fr))}
.card.news .ph-empty{display:flex;align-items:center;justify-content:center;background:var(--ph2)}
.card.news .ph-empty span{font-size:28px;font-weight:300;letter-spacing:.04em;color:var(--accent);opacity:.45}

/* calendar hover: the whole course lights up, others fade, tooltip follows the pointer */
.ev{transition:opacity .15s,box-shadow .15s}
.cal.has-hl .ev:not(.hl){opacity:.28}
.cal .ev.hl{filter:none;box-shadow:0 0 0 2px var(--surface),0 0 0 3px var(--ev)}
.cal .ev.hl-session{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--ev),0 6px 16px rgba(60,20,15,.25)}
.cal-tip{position:fixed;z-index:60;max-width:320px;display:flex;flex-direction:column;gap:4px;padding:16px;border-radius:var(--radius);background:var(--surface);color:var(--text);box-shadow:var(--card-shadow-hover);border-top:4px solid var(--ev,var(--accent));pointer-events:none;font-size:13px;line-height:1.45}
.cal-tip[hidden]{display:none}
.cal-tip .t{font-size:15px;font-weight:600;line-height:1.35}
.cal-tip .w{color:var(--ev,var(--accent));font-weight:600}
.cal-tip .p{color:var(--text2)}
.cal-tip .h{margin-top:4px;font-size:12px;color:var(--text2);opacity:.8}
@media (prefers-reduced-motion:reduce){.ev{transition:none}}

/* ---- mobile header: hamburger left, drawer from the left ------------------------------------ */
.nav-head,.nav-backdrop{display:none}
@media (max-width:760px){
  .hdr{flex-direction:row;justify-content:center;position:relative;gap:0;padding-top:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}
  .brand{gap:4px}
  .brand span{font-size:28px}
  .brand small{font-size:10px}
  .menu-btn{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:44px;height:44px;min-height:0;padding:0;border-radius:50%;border-color:var(--line)}
  .menu-btn:hover{border-color:var(--accent)}
  .nav{display:flex;position:fixed;top:0;bottom:0;left:0;z-index:100;width:min(320px,86vw);flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;gap:0;
       padding:0 24px 32px;background:var(--surface);border:none;box-shadow:16px 0 48px rgba(26,18,16,.25);overflow-y:auto;overscroll-behavior:contain;
       transform:translateX(-100%);visibility:hidden;transition:transform .28s ease,visibility 0s linear .28s}
  .hdr.open .nav{transform:none;visibility:visible;transition:transform .28s ease}
  .nav > a{padding:16px 0;border-bottom:1px solid var(--line);font-size:15px}
  .nav [aria-current="page"],.nav .active{color:var(--accent);box-shadow:inset 3px 0 0 var(--accent);padding-left:16px}
  .nav .cta{margin-top:24px;justify-content:center;padding:16px 24px;border-bottom:none}
  .nav-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 0 16px;border-bottom:1px solid var(--line);text-transform:none;letter-spacing:normal}
  .nav-brand{display:flex;flex-direction:column;gap:4px}
  .nav-brand small{font-size:10px;font-weight:600;letter-spacing:.36em;color:var(--accent)}
  .nav-brand span{font-size:24px;font-weight:400;letter-spacing:.08em}
  .nav-close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border-radius:50%;border:1px solid var(--line);background:none;color:var(--text);cursor:pointer}
  .nav-close:hover{border-color:var(--accent);color:var(--accent)}
  .nav-backdrop{display:block;position:fixed;inset:0;z-index:99;background:rgba(26,18,16,.5);opacity:0;pointer-events:none;transition:opacity .28s ease}
  .hdr.open .nav-backdrop{opacity:1;pointer-events:auto}
  html.menu-open{overflow:hidden}
}
@media (prefers-reduced-motion:reduce){.nav,.hdr.open .nav,.nav-backdrop{transition:none}}
/* consent checkbox and option lists: box centred on the label text */
.check{align-items:center;gap:16px;line-height:1.5}
.check input{flex:none;width:20px;height:20px;margin:0}
.field fieldset label,.opts label,.field .choices label{display:inline-flex;align-items:center;gap:8px}
.field fieldset label input,.opts label input,.field .choices label input{margin:0;flex:none;width:18px;height:18px;accent-color:var(--accent)}
/* home intro video: muted autoplay with a "turn on sound" button */
.video.autoplaying .video-play{display:none}
.video.autoplaying video{cursor:pointer}
.video-unmute{position:absolute;right:16px;bottom:16px;z-index:2;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px 0 12px;border:0;border-radius:999px;background:rgba(20,12,10,.6);color:#fff;font:inherit;font-size:14px;font-weight:600;letter-spacing:.04em;cursor:pointer;backdrop-filter:blur(6px)}
.video-unmute:hover,.video-unmute:focus-visible{background:var(--accent)}
.video-unmute[hidden]{display:none}

/* ---- Cúng dường (offering) page ------------------------------------------------------------ */
.offer-layout{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:24px 40px;align-items:start}
.offer-layout > :only-child{grid-column:1 / -1;max-width:560px;justify-self:center;width:100%}
@media (max-width:900px){.offer-layout{grid-template-columns:1fr}}
.offer-letter{display:flex;flex-direction:column;gap:16px;max-width:none;margin:0}
.offer-letter .h2{font-size:clamp(24px,2.4vw,32px)}
.offer-sign{display:flex;flex-direction:column;gap:4px;align-items:flex-end;margin-top:8px;padding-top:24px;border-top:1px solid var(--line);text-align:right}
.offer-bank{position:sticky;top:24px}
@media (max-width:900px){.offer-bank{position:static}}
.offer-qr{margin:0;display:flex;flex-direction:column;align-items:center;gap:8px}
.offer-qr img{width:100%;max-width:240px;aspect-ratio:1;object-fit:contain;background:#fff;border-radius:var(--radius);padding:8px;cursor:zoom-in}
.offer-qr figcaption{font-size:13px;color:var(--text2)}
.copy-row{display:flex;align-items:center;justify-content:space-between;gap:16px}
.copy-btn{flex:none;min-height:36px;padding:0 16px;border:1px solid var(--accent);border-radius:999px;background:none;color:var(--accent);font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.copy-btn:hover{background:var(--accent);color:var(--surface)}
.offer-report{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:24px 40px;margin-top:40px}
.facts-list .copy-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px}
.facts-list .copy-row > span{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.facts-list .copy-row dd{overflow-wrap:anywhere}
.facts-list .copy-btn{width:auto;align-self:center}

/* honour list of donors (Cúng dường page): numbered rows in one card, check mark on the right */
.honor-card{max-width:880px;width:100%;margin:0 auto;padding:16px 40px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow);display:flex;flex-direction:column;gap:16px}
.honor-card .more{padding-bottom:24px}
.honor-list{list-style:none;margin:0;padding:0;counter-reset:honor}
.honor-list[start]{counter-reset:honor 20}
.honor-list li{counter-increment:honor;display:grid;grid-template-columns:40px minmax(0,1fr) 32px;gap:16px;align-items:center;padding:24px 0;border-bottom:1px solid var(--line)}
.honor-list li::before{content:counter(honor);font-size:16px;color:var(--text2);font-variant-numeric:tabular-nums;align-self:start;padding-top:2px}
.honor-text{display:flex;flex-direction:column;gap:8px;min-width:0}
.honor-text strong{font-size:20px;font-weight:600;line-height:1.35}
.honor-sub{display:flex;flex-wrap:wrap;gap:4px 8px;font-size:15px;color:var(--text2)}
.honor-sub .dot{opacity:.6}
.honor-check{color:#2f7d5b;justify-self:end}
:root[data-theme="dark"] .honor-check{color:#6fc39a}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .honor-check{color:#6fc39a}}
.more > .honor-list{width:100%;margin-top:0}
.honor-card .more[open]{padding-bottom:0}
@media (max-width:640px){.honor-card{padding:8px 24px}.honor-list li{grid-template-columns:28px minmax(0,1fr) 28px;gap:8px 12px;padding:16px 0}.honor-text strong{font-size:17px}.honor-sub{font-size:14px}}

/* ---- Cúng dường v2: numbered sections, one card per bank account --------------------------- */
.offer-nav{justify-content:center;gap:8px;margin-top:8px}
.offer-section{display:flex;flex-direction:column;gap:24px;padding-top:40px;margin-top:16px;border-top:1px solid var(--line);scroll-margin-top:24px}
.offer-section-head{display:flex;gap:16px;align-items:flex-start}
.offer-num{flex:none;width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--surface);font-size:20px;font-weight:500}
.offer-section-head .h2{font-size:clamp(24px,2.6vw,34px)}
.offer-section-head .eyebrow{margin:0 0 8px}
.accounts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(340px,100%),1fr));gap:24px;align-items:start}
.account{display:flex;flex-direction:column;gap:16px}
.account-head{display:flex;flex-direction:column;gap:8px;padding-bottom:16px;border-bottom:3px solid var(--accent)}
.account-head h3{margin:0;font-size:20px;font-weight:500;line-height:1.35}
.account-head p{margin:0;font-size:14px}
.account.bare{gap:16px}
.account-example{margin:0;padding:16px;border-radius:var(--radius);background:var(--bg);font-size:14px;color:var(--text2)}
.offer-bank .btn{width:100%;justify-content:center}
#tri-an,#cong-khai{scroll-margin-top:24px}

/* account cards: shared 9-row subgrid so every field lines up across the row of cards */
.accounts{grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));align-items:stretch;row-gap:24px}
.accounts > .account{display:grid;grid-template-rows:subgrid;grid-row:span 9;gap:0;padding:32px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.accounts .account-fields{display:contents}
.accounts .account-field{padding:16px 0;border-bottom:1px solid var(--line);align-self:stretch;display:flex;align-items:center}
.accounts .account-field > span{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.accounts .account-field.empty{padding:0;border:none}
.accounts .account-qr:empty,.accounts .account-ex:empty{display:block}
.accounts .account-qr:not(:empty){padding:16px 0}
.accounts .account-ex:not(:empty){padding-top:16px}
.accounts .account-head{align-self:start;padding-bottom:16px;margin-bottom:0}
.accounts .account-foot{align-self:end;padding-top:16px}
.accounts .account-foot:empty{padding:0}
.accounts .account-foot .card-link{display:block;margin:0;padding:16px 0 0;border-top:1px solid var(--line)}
.account dt{font-size:12px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.account dd{margin:0;font-size:16px;overflow-wrap:anywhere}
.account.bare .account-fields{display:flex;flex-direction:column;margin:0}
.account.bare .account-field{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}
.account.bare .account-field.empty{display:none}
.account.bare .account-field > span{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
@supports not (grid-template-rows:subgrid){.accounts > .account{display:flex;flex-direction:column}.accounts .account-foot{margin-top:auto}}
/* honour list per purpose */
.honor-tabs .tab-bar{justify-content:center;flex-wrap:wrap}
.tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;margin-left:8px;padding:0 8px;border-radius:999px;background:var(--ph2);font-size:12px;font-weight:600}
.honor-purpose{margin:16px 0 0;font-size:18px;font-weight:500;color:var(--accent)}
.honor-tabs.js .honor-purpose{display:none}
.honor-tabs .tab-panel.honor-card{padding:16px 40px;gap:16px;margin-top:24px}@media (max-width:640px){.honor-tabs .tab-panel.honor-card{padding:8px 24px}}
/* donor list popup */
.honor-dialog{width:min(720px,calc(100vw - 32px));max-height:min(86vh,900px);padding:0;border:none;border-radius:var(--radius);background:var(--surface);color:var(--text);box-shadow:0 24px 80px rgba(26,18,16,.35);overflow:hidden;display:none;flex-direction:column}
.honor-dialog[open]{display:flex}
.honor-dialog::backdrop{background:rgba(26,18,16,.55)}
.honor-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:32px 40px 16px;border-bottom:1px solid var(--line)}
.honor-dialog-title{margin:0;font-size:clamp(20px,2.2vw,26px);font-weight:400;line-height:1.3}
.honor-dialog .nav-close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border-radius:50%;border:1px solid var(--line);background:none;color:var(--text);cursor:pointer}
.honor-dialog .nav-close:hover{border-color:var(--accent);color:var(--accent)}
.honor-search{display:block;padding:16px 40px 0}
.honor-search input{width:100%;min-height:48px;padding:0 16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);color:var(--text);font:inherit}
.honor-dialog .honor-list{overflow-y:auto;padding:0 40px 16px;overscroll-behavior:contain}
.honor-dialog .honor-list li[hidden]{display:none}
.honor-empty{margin:0;padding:24px 40px}
@media (max-width:640px){.honor-dialog-head{padding:24px 24px 16px}.honor-search{padding:16px 24px 0}.honor-dialog .honor-list{padding:0 24px 16px}.honor-empty{padding:24px}}
.offer-letter-top{max-width:880px !important;width:100%;margin:0 auto !important}
/* account card: note moved to the bottom (row 9 of 10) so the titles line up */
.accounts > .account{grid-row:span 10}
.accounts .account-note:not(:empty){padding-top:16px}
.callout-lite{margin:0;padding:16px;border:1px solid var(--line);border-left:none;border-radius:var(--radius);font-size:14px;line-height:1.6;color:var(--text2);background:transparent}
.account.bare .account-note:empty{display:none}
/* copy button: fixed size, icon + label centred; "copied" state is a light green, same size */
.copy-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:112px;height:36px;min-height:36px;padding:0 16px;border:1px solid var(--accent);border-radius:999px;background:none;color:var(--accent);font:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:none;transition:background .15s,color .15s,border-color .15s}
.copy-btn:hover{background:var(--accent);color:var(--surface)}
.copy-btn .i-done{display:none}
.copy-btn.is-copied,.copy-btn.is-copied:hover{background:color-mix(in srgb,#2f7d5b 12%,transparent);border-color:#2f7d5b;color:#2f7d5b}
.copy-btn.is-copied .i-copy{display:none}
.copy-btn.is-copied .i-done{display:block}
:root[data-theme="dark"] .copy-btn.is-copied{border-color:#6fc39a;color:#6fc39a}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .copy-btn.is-copied{border-color:#6fc39a;color:#6fc39a}}
.copy-btn svg{flex:none}
@media (prefers-reduced-motion:reduce){.copy-btn{transition:none}}
/* section heads on the Cúng dường page: title left, donor-list button right */
.offer-section-head > div{flex:1;min-width:0}
.donor-btn{flex:none;align-self:center;gap:8px;min-height:44px;padding:0 24px}
@media (max-width:640px){.offer-section-head{flex-wrap:wrap}.donor-btn{width:100%;justify-content:center}}
/* account QR (uploaded or generated): centred, white tile so every scanner reads it */
.account-qr .offer-qr{padding:8px 0 0}
.account-qr .offer-qr img{width:200px;height:200px;max-width:100%;object-fit:contain;background:#fff;border-radius:var(--radius);padding:8px;box-shadow:0 0 0 1px var(--line);cursor:zoom-in}
.account-qr figcaption{text-align:center;line-height:1.5}
.account-qr figcaption .muted{font-size:12px}
.account.bare .account-qr:empty{display:none}
/* the example sits inside the "Nội dung chuyển khoản" row, under the template */
.accounts > .account{grid-row:span 9}
.account-field .account-example{margin:8px 0 0;padding:8px 16px;font-size:13px;line-height:1.55;border-radius:var(--radius);background:var(--bg);color:var(--text2)}
.account-field.copy-row{align-items:flex-start}
.account-field.copy-row .copy-btn{margin-top:4px}
/* account cards – tighter rhythm (8px grid): smaller QR, 12px field padding, empty rows take no space */
.accounts > .account{padding:24px 32px}
.accounts .account-head{padding-bottom:16px}
.accounts .account-qr:not(:empty){padding:16px 0 8px}
.account-qr .offer-qr{gap:8px;padding:0}
.account-qr .offer-qr img{width:168px;height:168px;padding:4px}
.account-qr figcaption{font-size:12px}
.accounts .account-field{padding:12px 0}
.accounts .account-field.empty{height:0;min-height:0;padding:0;margin:0;border:0;overflow:hidden}
.account-field .account-example{margin-top:8px}
.accounts .account-note:not(:empty){padding-top:16px}
.accounts .account-note .callout-lite{padding:12px 16px}
.accounts .account-foot:not(:empty){padding-top:16px}
.accounts .account-foot:empty,.accounts .account-note:empty{height:0;padding:0}
.account.bare .account-field{padding:12px 0}
.accounts .account-foot.is-empty,.accounts .account-note.is-empty{padding:0}
/* quote box inside article text (e.g. the Quỹ tu học support request) */
.prose blockquote{margin:16px 0;padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);font-style:normal;display:flex;flex-direction:column;gap:16px}
.prose blockquote p{margin:0}
.prose blockquote .btn{display:inline-flex;color:var(--surface);text-decoration:none}
.prose ul ul{margin-top:8px}
.prose ul.muted,.prose p.muted{color:var(--text2)}
.honor-empty-list{margin:0;padding:32px 40px;color:var(--text2);text-align:center}
/* example spans the full card width under "Nội dung chuyển khoản"; note: no border, "Lưu ý:" label */
.accounts .account-field{flex-wrap:wrap;column-gap:16px}
.account-field .account-example{flex:1 1 100%;margin:8px 0 0}
.account-notice{margin:0;font-size:14px;line-height:1.6;color:var(--text2)}
.account-notice strong{color:var(--accent);font-weight:600}
.accounts{row-gap:0}.accounts > .account{margin-bottom:24px;row-gap:0}

/* home: "Hoạt động chính" – 5 cards, icon + text, same card style as elsewhere */
.activities{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:24px}
.activities li{display:flex;flex-direction:column;gap:16px;padding:32px 24px;background:var(--bg);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.activities p{margin:0;font-size:16px;line-height:1.6}
.activity-icon{width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--surface);color:var(--accent);box-shadow:0 0 0 1px var(--line)}
@media (min-width:1100px){.activities{grid-template-columns:repeat(5,minmax(0,1fr))}}

/* home "Hoạt động chính" v2: heading + photo left (sticky), numbered list right */
.act-layout{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:40px 80px;align-items:start}
.act-head{position:sticky;top:24px;display:flex;flex-direction:column;gap:16px}
.act-head .eyebrow{margin:0}
.act-photo{margin:16px 0 0;aspect-ratio:4/3;border-radius:var(--radius);overflow:hidden;box-shadow:var(--card-shadow)}
.act-photo img{width:100%;height:100%;object-fit:cover}
.act-list{list-style:none;margin:0;padding:0;counter-reset:none}
.act-list li{display:grid;grid-template-columns:72px minmax(0,1fr);gap:24px;align-items:baseline;padding:32px 0;border-bottom:1px solid var(--line)}
.act-list li:first-child{padding-top:8px}
.act-list li:last-child{border-bottom:none}
.act-num{font-size:40px;font-weight:300;line-height:1;color:var(--accent);font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.act-list p{margin:0;font-size:clamp(17px,1.5vw,20px);line-height:1.6;color:var(--text)}
@media (max-width:900px){.act-layout{grid-template-columns:1fr;gap:24px}.act-head{position:static}.act-photo{display:none}.act-list li{grid-template-columns:48px minmax(0,1fr);gap:16px;padding:24px 0}.act-num{font-size:28px}}
/* two plain sections in a row share one gap (no doubled 120 + 120px) */
.section:not(.tint):not(.band) + .section:not(.tint):not(.band){padding-top:0}
/* home "Đường đến": the address is a line of text, not a page heading */
.home-address{margin:0;font-size:clamp(20px,2vw,26px);font-weight:400;line-height:1.4;letter-spacing:0}
/* activities list: round icon instead of a number, vertically centred with its text */
.act-list li{grid-template-columns:56px minmax(0,1fr);align-items:center;padding:24px 0}
.act-list .activity-icon{background:var(--bg)}
@media (max-width:900px){.act-list li{grid-template-columns:48px minmax(0,1fr)}.act-list .activity-icon{width:48px;height:48px}}

/* home "Về thiền viện" › Hoạt động chính (subsection): icon items in two columns */
.act-sub{margin-top:64px;padding-top:48px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:24px}
.act-sub-title{margin:0;font-size:clamp(22px,2.2vw,28px);font-weight:400;line-height:1.3}
.act-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 48px}
.act-grid li{display:grid;grid-template-columns:48px minmax(0,1fr);gap:16px;align-items:center}
.act-grid .activity-icon{width:48px;height:48px;background:var(--surface)}
.act-grid p{margin:0;font-size:16px;line-height:1.6}
@media (max-width:760px){.act-grid{grid-template-columns:1fr}}
/* Về thiền viện › Hoạt động chính: photo left, icon list with dividers right; "Đọc thêm" at the end */
.act-sub{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:24px 64px;align-items:center;margin-top:64px;padding-top:64px;border-top:1px solid var(--line)}
.act-sub .act-photo{margin:0}
.act-body{display:flex;flex-direction:column;gap:8px}
.act-sub .act-list li{padding:16px 0}
.act-sub .act-list li:first-child{padding-top:16px}
.about-more{margin-top:48px;display:flex;justify-content:center}
@media (max-width:900px){.act-sub{grid-template-columns:1fr}.act-sub .act-photo{display:block;aspect-ratio:16/9}}

/* logo mark: header (above the name), drawer, footer */
.brand-mark{width:auto;height:72px;margin-bottom:8px}
.ftr-mark{width:auto;height:56px}
.nav-brand{flex-direction:row !important;align-items:center;gap:12px}
.nav-brand img{width:auto;height:36px}
.nav-brand-text{display:flex;flex-direction:column;gap:4px}
@media (max-width:760px){.brand{flex-direction:row;align-items:center;gap:12px}.brand-mark{height:40px;margin:0}.brand small,.brand span{text-align:left}.brand > small{display:none}}

/* registration guide: numbered steps in a row (wraps); "after" = last 3 steps on the thank-you panel */
.reg-guide{display:flex;flex-direction:column;gap:16px}
.course-info-title{margin:0;font-size:clamp(20px,2vw,24px);font-weight:500;line-height:1.3}
.reg-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:16px}
.reg-steps li{display:flex;gap:12px;align-items:flex-start;padding:16px;border-radius:var(--radius);background:var(--surface);box-shadow:var(--card-shadow);font-size:15px;line-height:1.5}
.reg-step-n{flex:none;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--surface);font-size:13px;font-weight:600}
.reg-steps.after{grid-template-columns:1fr;gap:8px}
.reg-steps.after li{box-shadow:none;background:var(--bg);padding:12px 16px}
.article-card .reg-steps{grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))}
.article-card .reg-steps li{background:var(--bg);box-shadow:none}
/* "Thông tin khóa tu": expandable panels */
.course-info{display:flex;flex-direction:column;gap:0}
.course-info .course-info-title{margin-bottom:8px}
.info-item{border-bottom:1px solid var(--line)}
.info-item summary{display:flex;align-items:center;gap:12px;padding:16px 0;cursor:pointer;list-style:none;font-weight:600;font-size:16px}
.info-item summary::-webkit-details-marker{display:none}
.info-item summary::after{content:"+";margin-left:auto;font-size:22px;font-weight:300;color:var(--accent);line-height:1}
.info-item[open] summary::after{content:"–"}
.info-n{flex:none;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid var(--accent);color:var(--accent);font-size:13px}
.info-item .prose{padding:0 0 16px 40px;font-size:15px}
.info-item .prose ul{margin:0}
.course-guide{display:flex;flex-direction:column;gap:32px}
main .wrap > .course-info{max-width:880px;width:100%;margin:0 auto}
/* steps: 3 per row on wide screens so each step reads in 1–2 lines */
.reg-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
.article-card .reg-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
.reg-steps.after{grid-template-columns:1fr}
@media (max-width:900px){.reg-steps,.article-card .reg-steps{grid-template-columns:1fr}}
/* bigger step cards */
.reg-steps{gap:24px}
.reg-steps li{gap:16px;padding:24px;min-height:120px;align-items:flex-start;font-size:17px;line-height:1.55}
.reg-step-n{width:40px;height:40px;font-size:16px}
.reg-step-text{display:flex;flex-direction:column;gap:4px}
.reg-step-text small{font-size:12px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.article-card .reg-steps{gap:16px}
.article-card .reg-steps li{min-height:0;padding:20px}
.reg-steps.after li{min-height:0;padding:16px 20px;font-size:16px}
.reg-steps.after .reg-step-n{width:32px;height:32px;font-size:14px}

/* "Thông tin khóa tu" v2: grid of open cards */
.course-info{gap:24px}
main .wrap > .course-info{max-width:none}
.info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.info-card{display:flex;flex-direction:column;gap:16px;padding:24px;border-radius:var(--radius);background:var(--surface);box-shadow:var(--card-shadow)}
.info-card header{display:flex;align-items:center;gap:16px}
.info-card .activity-icon{width:48px;height:48px;flex:none;background:var(--bg)}
.info-card h3{margin:0;font-size:18px;font-weight:600;line-height:1.35}
.info-card .prose{font-size:15px;line-height:1.6}
.info-card .prose ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px}
.info-card .prose p{margin:0}
.info-card .prose strong{color:var(--accent)}
.article-card .info-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.article-card .info-card{background:var(--bg);box-shadow:none;border:1px solid var(--line)}
.article-card .info-card .activity-icon{background:var(--surface)}
@media (max-width:1000px){.info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.info-grid,.article-card .info-grid{grid-template-columns:1fr}}
/* course page: guide + course info as a full-width block under the two columns */
.course-guide-full{display:flex;flex-direction:column;gap:48px;margin-top:40px;padding-top:48px;border-top:1px solid var(--line);scroll-margin-top:24px}
.guide-pointer{margin:0;padding:16px 24px;border-radius:var(--radius);background:var(--surface);box-shadow:var(--card-shadow);font-size:15px}
.guide-pointer a{color:var(--accent);font-weight:600}
.info-card .prose{margin:0;width:100%;max-width:none}
/* "Thông tin khóa tu" cards: aligned text – one indent for lists and paragraphs, even spacing */
.info-card{gap:0}
.info-card header{padding-bottom:16px;border-bottom:1px solid var(--line)}
.info-card .prose{padding-top:16px;font-size:15px;line-height:1.6}
.info-card .prose ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.info-card .prose li{position:relative;margin:0;padding-left:16px}
.info-card .prose li::before{content:"";position:absolute;left:0;top:.68em;width:6px;height:6px;border-radius:50%;background:var(--accent);opacity:.7}
.info-card .prose p{margin:0;padding-left:16px}
.info-card .prose > * + *{margin-top:8px}
/* Trụ trì tabs (and any tile list on a tinted band): clear card edges – page colour + border + shadow */
.tint .tiles li{background:var(--bg);border:1px solid var(--line);box-shadow:0 1px 2px rgba(60,20,15,.06),0 4px 12px rgba(60,20,15,.06);font-size:15px}
:root[data-theme="dark"] .tint .tiles li{border-color:#5a4238;box-shadow:none}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .tint .tiles li{border-color:#5a4238;box-shadow:none}}

/* back to the first versions: one row of small step cards; Thông tin khóa tu as a collapsible list */
.reg-steps,.article-card .reg-steps{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
.reg-steps li{gap:12px;padding:16px;min-height:0;font-size:15px;line-height:1.5}
.reg-step-n{width:28px;height:28px;font-size:13px}
@media (max-width:1100px){.reg-steps,.article-card .reg-steps{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:640px){.reg-steps,.article-card .reg-steps{grid-template-columns:1fr}}
.reg-steps.after{grid-template-columns:1fr}
.course-info.acc{gap:0;max-width:880px;width:100%;margin:0 auto}
.course-info.acc .info-item .prose{padding:0 0 16px 40px;font-size:15px;margin:0;max-width:none}
.course-info.acc .info-item .prose ul{margin:0;padding-left:20px}
/* home › Hoạt động chính: two photos stacked on the left, both columns aligned to the top */
.act-sub{align-items:start}
.act-photos{display:grid;grid-template-columns:1fr;gap:16px}
.act-photos .act-photo{aspect-ratio:3/2}
.act-body .act-sub-title{margin-top:0}
.act-sub .act-list li:first-child{padding-top:8px}
@media (max-width:900px){.act-photos{grid-template-columns:1fr 1fr}.act-photos .act-photo{display:block}}
/* Thiền viện › Ban Giáo thọ: teacher cards on the tinted band – border + soft shadow like the Trụ trì tiles */
.tint .teacher-card{background:var(--bg);border:1px solid var(--line);box-shadow:0 1px 2px rgba(60,20,15,.06),0 4px 12px rgba(60,20,15,.06)}
.tint .teacher-card:hover{border-color:var(--accent);box-shadow:0 2px 4px rgba(60,20,15,.08),0 8px 20px rgba(60,20,15,.1)}
:root[data-theme="dark"] .tint .teacher-card{border-color:#5a4238;box-shadow:none}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .tint .teacher-card{border-color:#5a4238;box-shadow:none}}
/* hours cards: even space above and below the note divider */
.hours-card .hours-note{margin-top:8px;padding-top:16px}

/* guide / info / rules – first design, readable sizes */
.reg-steps,.article-card .reg-steps{gap:16px}
.reg-steps li{padding:20px;gap:12px;font-size:16px;line-height:1.55}
.reg-step-n{width:32px;height:32px;font-size:14px}
.course-info-title{font-size:clamp(22px,2.2vw,26px);font-weight:500}
/* Thông tin khóa tu (left, collapsible) + Nội quy khóa tu (right) side by side */
.guide-info{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:32px 48px;align-items:start}
.guide-info .course-info.acc{max-width:none;margin:0}
.course-info.acc .info-item summary{font-size:18px;font-weight:500;padding:20px 0;gap:16px}
.course-info.acc .info-n{width:32px;height:32px;font-size:14px}
.course-info.acc .info-item .prose{font-size:16px;line-height:1.65;padding:0 0 20px 48px}
.course-info.acc .info-item .prose ul{display:flex;flex-direction:column;gap:6px}
.course-rules{display:flex;flex-direction:column;gap:16px;padding:24px 28px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);scroll-margin-top:24px}
.course-rules .prose{font-size:16px;line-height:1.65;margin:0;max-width:none}
.course-rules .prose ul{margin:8px 0 16px;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.course-rules .prose p{margin:0}
.article-card .course-rules{background:var(--bg)}
@media (max-width:900px){.guide-info{grid-template-columns:1fr}}
/* course page: everything in one card */
.course-guide-full.article-card{max-width:none;margin-top:40px;border-top:none;padding:40px}
@media (max-width:640px){.course-guide-full.article-card{padding:24px}}
/* steps: 3 per row so each step reads in 1–2 lines (same card style) */
.reg-steps,.article-card .reg-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:900px){.reg-steps,.article-card .reg-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.reg-steps,.article-card .reg-steps{grid-template-columns:1fr}}
.reg-steps.after{grid-template-columns:1fr}
/* hours cards: schedule line as the subtitle of each card's title */
.hours-head{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
.hours-sub{font-size:15px;color:var(--text2)}
/* hours: same row style in both cards; no line under the last row (the note has its own divider) */
.hours-rows div:last-child{border-bottom:none}
.hours-rows div{align-items:baseline}
.hours-card .hours-note{margin-top:0}
