/* 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}
/* no blue flash when anything is tapped on a phone – links, buttons, chips, the floating buttons, calendar days
   (the property is inherited, so set on the page itself); a mouse click leaves no focus ring, the keyboard keeps the red one */
html{-webkit-tap-highlight-color:transparent}
:focus:not(:focus-visible){outline:none}
.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:1px solid var(--accent);box-shadow:inset 0 0 0 1px var(--accent),var(--card-shadow)}
.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%}
/* the admin editor wraps each list item in <p>: no paragraph gaps inside lists */
.prose li > p{margin:0}
.prose li > p + p{margin-top:.5em}

/* 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)}
/* phones: round icon buttons (the label stays for screen readers) so they cover less of the page */
@media (max-width:760px){.quick{right:16px;bottom:16px}.quick a{width:48px;height:48px;padding:0;justify-content:center}
.quick a span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.quick a svg{width:22px;height:22px}}

/* 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 .y::before{content:"";position:absolute;left:115px;top:50%;width:11px;height:11px;margin-top:-5.5px;border-radius:50%;background:var(--band-accent)}
.life .y{position:relative;align-self:start;margin-top:6px;text-box:trim-both cap alphabetic;grid-row:span 2;text-align:right;font-size:22px;line-height:32px;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 .y::before{left:-31px}.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 0 0 5px;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}
/* the dot is centred on the year's digits (text-box trims the space above / below the figures) */
.tl .y{position:relative;align-self:flex-start;font-size:13px;line-height:20px;font-weight:600;letter-spacing:.12em;color:var(--accent);text-box:trim-both cap alphabetic}
.tl .y::before{content:"";position:absolute;left:-30px;top:50%;width:11px;height:11px;margin-top:-5.5px;border-radius:50%;background: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:0;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:stretch}
.more::details-content{width:100%}
.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:minmax(0,1fr)}}
.offer-bank .btn{white-space:normal;text-align:center;height:auto;min-height:44px;line-height:1.35;padding-top:10px;padding-bottom:10px}
.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}}

/* 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 li > p{padding-left:0}
.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}

/* home › Hoạt động chính v3: staggered photo pair (tall + overlapping inset), list centred, text like the about paragraph,
   title like the "TRỤ TRÌ" label */
.act-sub{align-items:center}
.act-photos{position:relative;display:block;padding:0 0 56px 0;max-width:520px}
.act-photos .act-photo{margin:0;border-radius:var(--radius);overflow:hidden;box-shadow:var(--card-shadow)}
.act-photos .act-photo img{width:100%;height:100%;object-fit:cover;display:block}
.act-photos .act-photo.main{width:74%;aspect-ratio:4/5}
.act-photos .act-photo.inset{position:absolute;right:0;bottom:0;width:56%;aspect-ratio:4/3;outline:8px solid var(--bg)}
.act-sub-title{font-size:12px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);line-height:1.5}
.act-sub .act-list li{padding:12px 0;gap:16px;grid-template-columns:44px minmax(0,1fr)}
.act-sub .act-list li:first-child{padding-top:12px}
.act-sub .act-list p{font-size:16px;line-height:1.6;color:var(--text2)}
.act-sub .activity-icon{width:44px;height:44px}
.act-sub .activity-icon svg{width:20px;height:20px}
@media (max-width:900px){.act-photos{max-width:none;padding-bottom:40px}.act-photos .act-photo.main{width:70%}}
.act-photos .act-photo.main{position:relative}.act-photos .act-photo img{position:absolute;inset:0}
/* home › Hoạt động chính v4: same photo pattern as "Về thiền viện" – two columns, the second shifted down, no overlap */
.act-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding:0;max-width:none}
.act-photos .act-photo.main,.act-photos .act-photo.inset{position:relative;inset:auto;width:auto;aspect-ratio:auto;height:380px;outline:none}
.act-photos .act-photo.inset{margin-top:64px}
@media (max-width:900px){.act-photos .act-photo.main,.act-photos .act-photo.inset{height:260px}.act-photos .act-photo.inset{margin-top:40px}}
@media (max-width:560px){.act-photos{gap:16px}.act-photos .act-photo.main,.act-photos .act-photo.inset{height:200px}.act-photos .act-photo.inset{margin-top:32px}}
/* phones: both photo pairs in "Về thiền viện" the same height */
@media (max-width:560px){
  #thien-vien .split .ph{height:240px !important}
  #thien-vien .split .ph.alt{margin-top:32px !important}
  .act-photos .act-photo.main,.act-photos .act-photo.inset{height:240px}
}
.hero .h1 em{white-space:nowrap}@media (max-width:420px){.hero .h1 em{white-space:normal}}
.rules-link{color:var(--accent);font-weight:600;text-decoration:underline;text-underline-offset:3px}

/* editor shortcuts (only rendered for logged-in admins) */
.edit-page{position:fixed;left:24px;bottom:24px;z-index:70;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 20px;border-radius:999px;background:#1f2937;color:#fff;font-size:14px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.edit-page:hover{background:#111827;color:#fff}
.edit-item{position:absolute;top:8px;right:8px;z-index:5;display:none;padding:4px 10px;border-radius:999px;background:#1f2937;color:#fff !important;font-size:12px;font-weight:600;line-height:1.6;text-decoration:none;box-shadow:0 4px 12px rgba(0,0,0,.2)}
[data-edit]:hover > .edit-item,[data-edit]:focus-within > .edit-item{display:inline-block}
@media (hover:none){.edit-item{display:inline-block}}

/* 404 page */
.nf{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;padding:48px 0 80px}
.nf-code{margin:0;font-size:clamp(96px,14vw,168px);font-weight:200;line-height:1;letter-spacing:-.04em;color:var(--accent);opacity:.85}
.nf .lead{max-width:600px}
.nf-links{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:16px}

/* header name: "THIỀN VIỆN" above "Phước Sơn" (also on phones, beside the logo) */
.brand .brand-text{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:inherit;letter-spacing:normal;line-height:normal}
@media (max-width:760px){.brand .brand-text{align-items:flex-start;gap:3px}.brand small{font-size:9px;letter-spacing:.3em}.brand .brand-name{font-size:22px}}
/* admin "Sửa trang này" button: desktop only */
@media (max-width:760px){.edit-page{display:none}}

/* ---- top bar on phones: one row (announcement + language), scrolling announcement, theme button in the footer */
.band-top .announce{display:block;overflow:hidden;white-space:nowrap}
.band-top .announce-track{display:inline-flex;gap:48px}
.lang-pick{display:none}
.theme-bottom{display:none}
@media (max-width:760px){
  .band-top{flex-wrap:nowrap;gap:12px}
  .band-top > a:first-child{flex:1 1 auto;min-width:0}
  .band-top .lang,.band-top .theme-top{display:none}
  .lang-pick{display:block}
  .band-top .announce.marquee{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 12px,#000 calc(100% - 12px),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 12px,#000 calc(100% - 12px),transparent 100%);text-overflow:clip}
  .band-top .announce.marquee .announce-track{animation:ps-marquee var(--marquee-s,16s) linear infinite}
  .theme-bottom{display:inline-flex;width:auto;height:40px;gap:8px;padding:0 16px;border-radius:999px;border-color:var(--line);color:var(--text);font:inherit;font-size:13px;order:99}
}
@keyframes ps-marquee{from{transform:translateX(0)}to{transform:translateX(calc(-50% - 24px))}}
@media (prefers-reduced-motion:reduce){.band-top .announce.marquee .announce-track{animation:none}.band-top .announce-track > span + span{display:none}}
/* phones: room under the footer for the floating "Gọi văn phòng / Facebook" buttons */
@media (max-width:760px){.ftr{padding-bottom:150px}}

/* phones: language menu (VI ▾ → small card) */
.lang-pick{position:relative}
.lang-pick summary{list-style:none;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 12px;border:1px solid var(--band-line);border-radius:999px;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--on-band);cursor:pointer;user-select:none}
.lang-pick summary::-webkit-details-marker{display:none}
.lang-pick[open] summary svg{transform:rotate(180deg)}
.lang-pick summary svg{transition:transform .15s}
.lang-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:80;min-width:170px;margin:0;padding:6px;list-style:none;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.18);animation:ps-pop .12s ease-out}
.lang-menu a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 12px;border-radius:8px;color:var(--text);font-size:15px;letter-spacing:normal;text-decoration:none}
.lang-menu a:hover{background:var(--surface)}
.lang-menu a small{font-size:11px;font-weight:600;letter-spacing:.08em;color:var(--text2)}
.lang-menu a[aria-current]{font-weight:600;color:var(--accent)}
.lang-menu a[aria-current] small::before{content:"✓ ";color:var(--accent)}
@keyframes ps-pop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

/* ---- course calendar on phones: whole month fits, thin course bars, tap a day → its courses below */
.cal-day-panel{display:none}
@media (max-width:640px){
  .cal{overflow:visible}
  .cal-grid{grid-template-columns:repeat(7,minmax(0,1fr));min-width:0}
  .cal-grid .wd{padding:10px 0;font-size:10px;letter-spacing:.06em}
  .cal-grid .day{min-height:62px;padding:4px 2px 6px;gap:3px;cursor:pointer;align-items:stretch}
  .cal-grid .day[aria-hidden]{cursor:default}
  .cal-grid .day-head{flex-direction:column;align-items:center;gap:0}
  .cal-grid .d{padding:0;font-size:14px;line-height:24px;width:24px;text-align:center}
  .cal-grid .day.today .d{align-self:center}
  .cal-grid .lunar{font-size:9px;gap:2px}
  .cal-grid .lunar .moon{width:6px;height:6px}
  .cal-grid .moon-name{display:none}
  .cal-grid .ev{height:5px;padding:0;border-radius:3px;font-size:0;line-height:0;pointer-events:none}
  .cal-grid .day.picked{background:color-mix(in srgb,var(--accent) 10%,transparent);box-shadow:inset 0 0 0 2px var(--accent)}
  .cal-month{min-width:0;font-size:20px}
  .cal-day-panel:not([hidden]){display:block;margin-top:-16px;padding:16px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line)}
  .cal-day-h{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0 0 8px;font-size:15px}
  .cal-day-h span{font-size:12px;color:var(--text2)}
  .cal-day-panel ul{list-style:none;margin:0;padding:0}
  .cal-day-panel li + li{border-top:1px solid var(--line)}
  .cal-day-panel a{display:flex;align-items:center;gap:12px;padding:12px 0;color:var(--text);text-decoration:none}
  .cal-day-panel a i{flex:none;width:6px;align-self:stretch;border-radius:3px;background:var(--ev,var(--accent))}
  .cal-day-panel a span{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
  .cal-day-panel a strong{font-size:15px;line-height:1.35}
  .cal-day-panel a small{font-size:12px;color:var(--text2)}
  .cal-day-panel a b{font-size:22px;color:var(--text2);font-weight:400}
  .cal-day-panel .muted{margin:0;font-size:14px}
}
/* Hình ảnh page: captions always visible (also on phones, where there is no hover) */
.gallery-page figcaption{opacity:1;padding:32px 12px 10px;font-size:13px;line-height:1.4;background:linear-gradient(transparent,rgba(0,0,0,.65))}

/* Quỹ tu học › Tăng Ni được hỗ trợ (Views/Fund.cshtml) */
.fund-monks{max-width:820px;width:100%;margin:0 auto;background:var(--surface,#fff);border-radius:var(--radius);box-shadow:var(--card-shadow);padding:8px 32px}
.fund-monks .honor-list li:last-child{border-bottom:0}
@media (max-width:600px){.fund-monks .honor-sub{display:block;line-height:1.5}.fund-monks .honor-sub .dot{margin:0 6px}.fund-monks{padding:0 18px}.fund-monks .honor-list li{grid-template-columns:28px minmax(0,1fr) 28px;gap:12px;padding:18px 0}.fund-monks .honor-text strong{font-size:18px}}

/* phones: tabs as pill buttons – Trụ trì, Giáo thọ… */
@media (max-width:700px){
  .tab-bar{flex-wrap:wrap;justify-content:center;gap:8px;overflow:visible;border-bottom:0;padding-bottom:4px}
  .tab{padding:8px 14px;font-size:12px;letter-spacing:.04em;border:1px solid var(--line);border-radius:999px;line-height:1.3}
  .tab[aria-selected="true"]{box-shadow:none;background:var(--accent);border-color:var(--accent);color:var(--bg)}
  /* continuous reading (site.js): all sections one after another, one sticky row of pills that follows the scroll */
  .tabs.flow .tab-bar{position:sticky;top:0;z-index:20;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;
    margin:0 calc(-1 * clamp(16px,5vw,80px));padding:10px clamp(16px,5vw,80px);background:var(--surface);box-shadow:0 1px 0 var(--line)}
  .tabs.flow .tab-bar::-webkit-scrollbar{display:none}
  .tabs.flow .tab{flex:none;transition:background .2s,color .2s,border-color .2s}
  .tabs.flow .tab-panel{scroll-margin-top:calc(var(--tab-bar-h,52px) + 8px);padding-top:32px}
  .tabs.flow .tab-panel + .tab-panel{border-top:1px solid var(--line);margin-top:32px}
}

/* Pháp học: views (Kinh sách / Tác giả), filter bar, active filters (Views/Library.cshtml) */
.lib-views{display:flex;justify-content:center;gap:32px;border-bottom:1px solid var(--line);margin-bottom:-16px}
.lib-views a{padding:12px 2px;font-size:14px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text2);box-shadow:inset 0 -2px 0 transparent}
.lib-views a small{font-size:12px;font-weight:500;letter-spacing:0;opacity:.7;margin-left:4px}
.lib-views a[aria-current]{color:var(--accent);box-shadow:inset 0 -2px 0 var(--accent)}
.lib-filter{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,240px) minmax(0,200px);gap:12px;align-items:end;width:100%;max-width:1000px;margin:0 auto;padding:16px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.lib-search{position:relative;display:block}
.lib-search svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text2);pointer-events:none}
.lib-search input,.lib-select select{box-sizing:border-box;width:100%;height:48px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);color:var(--text);font:inherit;font-size:15px}
.lib-search input{padding:0 14px 0 42px}
.lib-select{display:flex;flex-direction:column;gap:4px;min-width:0}
.lib-select span{font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--text2)}
.lib-select select{padding:0 36px 0 14px;appearance:none;-webkit-appearance:none;cursor:pointer;text-overflow:ellipsis;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center}
.lib-search input:focus,.lib-select select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
.lib-status{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin-top:-16px;font-size:14px;color:var(--text2)}
.lib-status strong{color:var(--text);font-weight:600;margin-right:4px}
.lib-tag{display:inline-flex;align-items:center;gap:6px;padding:4px 10px 4px 12px;border-radius:999px;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);font-weight:600;font-size:13px}
.lib-tag span{font-size:16px;line-height:1}
.lib-tag:hover{background:color-mix(in srgb,var(--accent) 20%,transparent)}
.lib-clear{color:var(--text2);text-decoration:underline;font-size:13px}
.pager .gap{border:0;width:auto;padding:0 4px}
@media (max-width:700px){
  .lib-views{gap:24px}
  .lib-filter{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:12px;gap:10px}
  .lib-search{grid-column:1 / -1}
  .lib-select select{font-size:14px;padding-left:12px}
  .pager a,.pager span{width:40px;height:40px}
}
.lib-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;width:16px;height:16px;cursor:pointer;opacity:.6;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='%23888' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat}
.lib-search input::-webkit-search-cancel-button:hover{opacity:1}

/* Giới thiệu › Phòng ban (one open/close panel each) and Tham khảo (link groups) – Views/About.cshtml */
.dept-list{max-width:960px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.dept{background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.dept summary{list-style:none;display:flex;align-items:center;gap:20px;padding:22px 28px;cursor:pointer}
.dept summary::-webkit-details-marker{display:none}
.dept-num{font-size:14px;font-weight:600;letter-spacing:.08em;color:var(--accent);font-variant-numeric:tabular-nums}
.dept-name{flex:1;font-size:20px;font-weight:500;line-height:1.35}
.dept-chev{flex:none;color:var(--text2);transition:transform .2s}
.dept[open] .dept-chev{transform:rotate(180deg)}
.dept summary:hover .dept-name{color:var(--accent)}
.dept-body{display:flex;flex-direction:column;gap:20px;padding:0 28px 28px 62px}
.dept-body .prose{max-width:none;margin:0}
.dept-photos{grid-template-columns:repeat(auto-fill,minmax(min(180px,100%),1fr))}
/* Tham khảo: one full-width row per group – name on the left, its links on the right (no cards of uneven height) */
.ref-grid{max-width:1080px;width:100%;margin:0 auto;display:flex;flex-direction:column;border-top:1px solid var(--line)}
.ref-card{display:grid;grid-template-columns:minmax(0,280px) minmax(0,1fr);gap:16px 48px;padding:32px 0;border-bottom:1px solid var(--line)}
.ref-card h3{margin:0;font-size:20px;font-weight:500;line-height:1.4;color:var(--accent)}
.ref-card .prose{font-size:15px;max-width:none;margin:0}
.ref-card .prose ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px}
.ref-card .prose li{padding:12px 0;border-top:1px dashed color-mix(in srgb,var(--line) 70%,transparent);line-height:1.55}
.ref-card .prose li:nth-child(-n+2){border-top:0;padding-top:0}
.ref-card .prose a{overflow-wrap:anywhere;font-weight:600;text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--accent) 35%,transparent)}
.ref-card .prose a:hover{border-bottom-color:var(--accent)}
.ref-card .prose a::after{content:" ↗";font-weight:400}
@media (max-width:900px){.ref-card .prose ul{grid-template-columns:minmax(0,1fr)}.ref-card .prose li:nth-child(2){border-top:1px dashed color-mix(in srgb,var(--line) 70%,transparent);padding-top:12px}}
@media (max-width:600px){
  .dept summary{padding:18px 18px;gap:14px}
  .dept-name{font-size:18px}
  .dept-body{padding:0 18px 20px}
  .ref-card{grid-template-columns:minmax(0,1fr);gap:12px;padding:24px 0}
}
@media (max-width:600px){.dept-photos{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}
.dept-head{display:flex;align-items:center;gap:20px;padding:22px 28px}
@media (max-width:600px){.dept-head{padding:18px;gap:14px}}
.dept-photos.few{grid-template-columns:repeat(var(--n,2),minmax(0,420px));justify-content:center}
@media (max-width:600px){.dept-photos.few{grid-template-columns:minmax(0,1fr);justify-content:stretch}}

/* ---- main menu: Khóa thiền submenu (hover / keyboard focus on desktop, indented in the phone drawer) ---- */
.nav .has-sub{display:flex}
.nav .has-sub .caret{transition:transform .2s ease}
.nav .has-sub:hover .caret,.nav .has-sub:focus-within .caret{transform:rotate(180deg)}
.nav .has-sub::after{content:"";position:absolute;left:-16px;right:-16px;top:100%;height:12px} /* hover bridge */
.nav .sub{top:calc(100% + 8px);gap:2px;padding:8px;border-radius:0 0 12px 12px;text-transform:none;letter-spacing:normal;min-width:290px}
.nav .has-sub:hover .sub,.nav .has-sub:focus-within .sub{display:flex}
.nav .sub a{display:flex;flex-direction:column;gap:2px;padding:12px 16px;border-radius:8px;font-size:15px;font-weight:600;white-space:normal}
.nav .sub a small{font-size:13px;font-weight:400;color:var(--text2)}
.nav .sub a:hover,.nav .sub a[aria-current="page"]{background:var(--bg);color:var(--accent);box-shadow:none}
.nav .has-sub > .top[aria-current="page"]{color:var(--accent);box-shadow:inset 0 -2px 0 var(--accent)}
@media (max-width:760px){
  .nav .has-sub,.nav .has-sub.active{flex-direction:column;align-items:stretch;border-bottom:1px solid var(--line);box-shadow:none;padding-left:0}
  .nav .has-sub::after{display:none}
  .nav .has-sub > .top{padding:16px 0;font-size:15px}
  .nav .has-sub > .top[aria-current="page"]{box-shadow:none;padding-left:0}
  .nav .has-sub .caret{display:none}
  .nav .sub{display:flex;position:static;transform:none;min-width:0;padding:0 0 12px;text-align:left;align-items:stretch;margin:0;background:none;border:none;box-shadow:none;border-radius:0}
  .nav .sub a{padding:10px 0 10px 16px;border-radius:0;font-size:14px;border-left:1px solid var(--line)}
  .nav .sub a small{display:none}
  .nav .sub a:hover{background:none}
  .nav .sub a[aria-current="page"]{background:none;box-shadow:none;padding-left:16px}
}

/* ---- Lớp Phật học online ---------------------------------------------------------------------- */
.oc-hero{padding-top:96px;padding-bottom:136px;overflow:hidden;position:relative}
.oc-hero::before{content:"";position:absolute;right:-180px;top:-180px;width:560px;height:560px;border-radius:50%;border:1px solid var(--band-line,rgba(246,239,227,.18));box-shadow:0 0 0 60px rgba(246,239,227,.03),0 0 0 140px rgba(246,239,227,.025);pointer-events:none}
.oc-hero-grid{position:relative;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:64px;align-items:center}
.oc-hero .h1{color:var(--on-band)}
.oc-cohort{margin:0;display:inline-flex;align-self:flex-start;padding:6px 16px;border:1px solid var(--band-accent);border-radius:999px;color:var(--band-accent);font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
.oc-hero .btn.oc-ghost{border-color:var(--on-band2);color:var(--on-band)}
.oc-hero .btn.oc-ghost:hover{background:var(--on-band);border-color:var(--on-band);color:var(--band)}
.oc-tonight{display:flex;flex-direction:column;gap:16px;padding:32px;border-radius:24px;background:var(--surface);color:var(--text);box-shadow:0 24px 60px rgba(0,0,0,.25);transform:rotate(1.2deg)}
.oc-tonight-label{margin:0;display:flex;align-items:center;gap:10px;font-size:12px;font-weight:700;letter-spacing:.24em;text-transform:uppercase;color:var(--accent)}
.oc-live{width:10px;height:10px;border-radius:50%;background:#c0392b;box-shadow:0 0 0 0 rgba(192,57,43,.6);animation:oc-pulse 2s infinite}
@keyframes oc-pulse{70%{box-shadow:0 0 0 10px rgba(192,57,43,0)}100%{box-shadow:0 0 0 0 rgba(192,57,43,0)}}
@media (prefers-reduced-motion:reduce){.oc-live{animation:none}}
.oc-tonight-item{display:flex;flex-direction:column;gap:2px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.oc-tonight-item strong{font-size:24px;font-weight:400;line-height:1.25}
.oc-tonight-item span:last-child{color:var(--text2);font-size:15px}
.oc-time{font-variant-numeric:tabular-nums;font-size:13px;font-weight:700;letter-spacing:.06em;color:var(--accent)}
.oc-week{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.oc-week span{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border-radius:50%;font-size:12px;font-weight:700;color:var(--text2);border:1px dashed var(--line)}
.oc-week span.on{border-style:solid;border-color:var(--accent);color:var(--accent)}
.oc-week span.now{background:var(--accent);color:var(--surface)}
.oc-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:64px;align-items:start}
.oc-points ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;counter-reset:pt}
.oc-points li{counter-increment:pt;display:flex;flex-direction:column;gap:12px;padding:24px;border-radius:16px;background:var(--surface);border:1px solid var(--line)}
.oc-points li::before{content:counter(pt,decimal-leading-zero);font-size:13px;font-weight:700;letter-spacing:.12em;color:var(--accent)}
.oc-points li p{margin:0}
.oc-timetable{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px}
.oc-day{display:flex;flex-direction:column;gap:10px;padding:16px 12px;border-radius:16px;background:var(--bg);border:1px solid var(--line);min-height:220px}
.oc-day.today{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent) inset}
.oc-day-name{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;font-size:13px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}
.oc-today{padding:2px 8px;border-radius:999px;background:var(--accent);color:var(--surface);font-size:10px;letter-spacing:.08em}
.oc-slot{display:flex;flex-direction:column;gap:4px;padding:12px;border-radius:12px;background:var(--surface);font-size:14px;line-height:1.35;transition:transform .15s ease}
.oc-slot:hover{transform:translateY(-2px);color:inherit}
.oc-slot strong{font-weight:600}
.oc-slot .muted{font-size:13px}
.oc-free{margin:auto 0;text-align:center;color:var(--text2);font-size:13px}
.oc-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:24px}
.oc-note{margin:0;display:flex;align-items:center;justify-content:center;gap:10px;padding:16px 24px;border-radius:16px;background:var(--surface);border:1px dashed var(--line);font-size:15px;color:var(--text2);text-align:left}
.oc-note svg{flex:none;color:var(--accent)}
.oc-subjects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
.oc-subject{display:grid;grid-template-columns:auto minmax(0,1fr);gap:24px;padding:32px;border-radius:20px;background:var(--surface);border:1px solid var(--line);scroll-margin-top:24px}
.oc-subject:target{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent) inset}
.oc-num{min-width:1.25em;font-size:44px;font-weight:200;line-height:1;color:var(--accent);font-variant-numeric:tabular-nums}
.oc-subject-body{display:flex;flex-direction:column;gap:8px;min-width:0}
.oc-subject h3{margin:0;font-size:24px;font-weight:400;line-height:1.25}
.oc-by{margin:0;font-weight:600}
.oc-by a{color:var(--accent);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.oc-when{margin:0;font-size:14px;color:var(--text2)}
.oc-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.oc-play{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border-radius:999px;background:var(--accent);color:var(--surface);font-size:13px;font-weight:600}
.oc-play:hover{background:var(--hover);color:var(--surface)}
.oc-mats{margin-top:8px;border-top:1px solid var(--line)}
.oc-mats summary{display:flex;align-items:center;gap:8px;padding:14px 0 6px;cursor:pointer;list-style:none;font-size:14px;font-weight:600;letter-spacing:.04em}
.oc-mats summary::-webkit-details-marker{display:none}
.oc-mats summary::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s ease}
.oc-mats[open] summary::after{transform:rotate(-135deg)}
.oc-mats summary span{min-width:24px;padding:0 8px;border-radius:999px;background:var(--bg);font-size:12px;text-align:center}
.oc-mats .prose{margin:0;max-width:none;font-size:15px}
.oc-mats .prose ul{margin:8px 0 12px;padding-left:20px}
.oc-mats .prose li{margin:4px 0}
.oc-mats .prose a{color:var(--accent);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.oc-mats .prose p{margin:12px 0 4px;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--text2)}
.oc-modes{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:24px;align-items:stretch}
.oc-mode{display:flex;flex-direction:column;gap:12px;padding:40px;border-radius:24px;background:var(--bg);border:1px solid var(--line)}
.oc-mode.main{border-color:var(--accent);border-width:2px}
.oc-mode h3{margin:0;font-size:30px;font-weight:300}
.oc-mode .prose{margin:0;max-width:none;font-size:16px}
.oc-mode .prose ul{margin:0;padding-left:20px}
.oc-mode .prose li{margin:8px 0}
.oc-badge{margin:0;align-self:flex-start;padding:4px 12px;border-radius:999px;background:var(--accent);color:var(--surface);font-size:11px;font-weight:700;letter-spacing:.16em;text-transform:uppercase}
.oc-badge.alt{background:none;border:1px solid var(--line);color:var(--text2)}
.oc-ladder{display:flex;flex-wrap:wrap;align-items:center;gap:16px 40px;padding:32px 40px;border-radius:24px;background:var(--band);color:var(--on-band)}
.oc-step{display:flex;align-items:center;gap:16px;font-size:17px}
.oc-step + .oc-step::before{content:"→";margin-right:24px;color:var(--band-accent);font-size:24px}
.oc-credit{display:flex;flex-direction:column;align-items:center;justify-content:center;width:84px;height:84px;flex:none;border-radius:50%;border:1px solid var(--band-accent);font-size:30px;font-weight:300;line-height:1;color:var(--band-accent)}
.oc-credit small{font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;margin-top:4px}
.oc-ladder-note{flex-basis:100%;margin:0;color:var(--on-band2)!important;font-size:14px}
.oc-teachers{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:32px 24px}
.oc-teachers a{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.oc-teachers a:not([href]){cursor:default}
.oc-teachers a[href]:hover .oc-avatar{box-shadow:0 0 0 3px var(--accent)}
.oc-teachers strong{font-weight:600;line-height:1.35}
.oc-teachers .muted{font-size:14px;line-height:1.4}
.oc-avatar{display:flex;align-items:center;justify-content:center;width:120px;height:120px;margin-bottom:8px;border-radius:50%;overflow:hidden;background:var(--ph1);color:var(--accent);font-size:34px;font-weight:300;letter-spacing:.04em;transition:box-shadow .2s ease}
.oc-avatar img{width:100%;height:100%;object-fit:cover;object-position:50% 22%}
.oc-fund{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:64px;align-items:start}
.oc-fund-body{margin:0;max-width:none;color:var(--on-band2)}
.oc-fund-body ul{padding-left:20px}
.oc-fund-body li{margin:8px 0}
.oc-fund .h2{color:var(--on-band)}
@media (max-width:1100px){
  .oc-timetable{grid-template-columns:repeat(4,minmax(0,1fr))}
  .oc-subjects{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:900px){
  .oc-hero-grid,.oc-overview,.oc-modes,.oc-fund{grid-template-columns:minmax(0,1fr);gap:40px}
  .oc-tonight{transform:none}
}
@media (max-width:700px){
  .oc-hero{padding-top:56px;padding-bottom:72px}
  .oc-tonight{padding:24px}
  .oc-points ul{grid-template-columns:minmax(0,1fr)}
  /* timetable becomes a vertical agenda: day on the left, classes on the right */
  .oc-timetable{grid-template-columns:minmax(0,1fr);gap:8px}
  .oc-day{display:grid;grid-template-columns:72px minmax(0,1fr);gap:8px 12px;min-height:0;padding:12px}
  .oc-day-name{flex-direction:column;align-items:flex-start;justify-content:flex-start;grid-row:span 3}
  .oc-free{margin:0;text-align:left}
  .oc-subject{grid-template-columns:minmax(0,1fr);gap:8px;padding:24px}
  .oc-num{font-size:32px}
  .oc-mode{padding:28px 24px}
  .oc-ladder{padding:24px;gap:20px}
  .oc-step + .oc-step::before{display:none}
  .oc-teachers{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oc-avatar{width:96px;height:96px}
}

/* ---- Giáo thọ khóa thiền (/giao-tho/) ---- */
.tc-all{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:40px 24px;margin-top:16px}
.tc-all .oc-avatar{width:136px;height:136px}
.tc-all strong{max-width:200px}
@media (max-width:700px){.tc-all{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 12px}.tc-all .oc-avatar{width:112px;height:112px}}

/* ---- phone drawer: footer details + Đường đến at the bottom (a small contact card, rows like the menu) ---- */
.nav-foot{display:none}
@media (max-width:760px){
  .nav-foot{display:flex;flex-direction:column;gap:4px;margin-top:auto;margin-bottom:8px;padding:4px 16px 14px;border-radius:14px;background:var(--bg);text-transform:none;letter-spacing:normal;font-size:13px;line-height:1.5;color:var(--text2)}
  .nav-foot p{margin:0}
  .nav-foot p a{color:var(--accent);font-weight:600}
  .nav-foot .nav-way{display:flex;align-items:center;gap:10px;margin:0 0 6px;padding:12px 0;border-bottom:1px solid var(--line);color:var(--text);font-size:14px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;box-shadow:none}
  .nav-foot .nav-way svg{flex:none;color:var(--accent)}
  .nav-foot .nav-way::after{content:"";margin-left:auto;width:7px;height:7px;border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;transform:rotate(45deg);opacity:.6}
  .nav-foot .nav-way:hover,.nav-foot .nav-way[aria-current="page"]{color:var(--accent);background:none;box-shadow:none;padding-left:0}
}

/* Đăng ký: the selected course has its accent border on all 4 sides (the card rule removes the top border) */
.course-pick a[aria-current]{border:1px solid var(--accent);border-top:1px solid var(--accent)}
.reg-info-card{margin-top:0}

/* ---- Đăng ký: "Dùng lại thông tin đã nhập lần trước" + "Ghi nhớ thông tin" ---- */
.reuse{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:0 0 20px;padding:14px 18px;border-radius:14px;background:var(--bg);border:1px dashed var(--accent);font-size:15px}
.reuse[hidden]{display:none}
.reuse > svg{flex:none;color:var(--accent)}
.reuse-text{flex:1;min-width:200px}
.reuse-btns{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.reuse .reuse-fill{min-height:40px;padding:8px 20px;font-size:13px}
.reuse-forget{padding:8px 0;background:none;border:none;font:inherit;font-size:13px;color:var(--text2);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.reuse-forget:hover{color:var(--accent)}
.reuse.done{flex-wrap:nowrap;border-style:solid;color:var(--accent);font-weight:600}
.reuse.done .reuse-text{min-width:0}
/* centred caption below the send button: box and text on one centre line, even space around */
.check.remember{display:flex;align-items:center;justify-content:center;gap:10px;margin:16px 0 0;font-size:14px;line-height:1.4;color:var(--text2);text-align:left;cursor:pointer}
.check.remember input{flex:none;width:18px;height:18px;margin:0;align-self:center}
.check.remember span{max-width:520px}
/* Đăng ký: the course list sits in the same 24px rhythm as the boxes below it (no extra fieldset margin) */
.form-wrap > .stack > fieldset{margin-bottom:0}
/* Lớp Sơ Cấp Online › Thiện pháp: the class's bank account card (from Cúng dường › Tịnh tài) */
.oc-fund-side{gap:32px}
.oc-account{display:flex;flex-direction:column;gap:12px;padding:24px;border-radius:20px;background:var(--surface);color:var(--text)}
.oc-account-title{margin:0;font-size:13px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--accent)}
/* floating buttons: Đăng ký (main call to action) on top, then call / Facebook */
.quick a.reg{background:var(--accent);color:var(--surface);border:1px solid var(--accent);box-shadow:0 0 0 2px var(--surface),0 8px 24px var(--shadow)}
.quick a.reg:hover{background:var(--hover);border-color:var(--hover);color:var(--surface)}
.quick a.alt:hover{background:var(--accent);color:var(--surface)}
.quick a.fb svg{color:#1877f2}
.quick a.fb:hover svg{color:currentColor}
/* phone drawer: the current page is shown by its red text only – no left bar, no indent */
@media (max-width:760px){
  .nav > a[aria-current="page"],.nav > a.active,.nav .has-sub > .top[aria-current="page"]{box-shadow:none;padding-left:0}
  .nav .sub a[aria-current="page"]{box-shadow:none;padding-left:16px}
}
/* course page › Địa điểm: name, address, link to Đường đến */
.course-place{display:flex;flex-direction:column;gap:2px}
.course-place .muted{font-size:14px;line-height:1.5}
.course-place .place-link{margin-top:4px;font-size:14px;font-weight:600;color:var(--accent)}
.course-place .place-link:hover{text-decoration:underline;text-underline-offset:3px}
/* Quỹ tu học › Các khoản chi */
.fund-expenses{max-width:880px;width:100%;margin:0 auto;overflow-x:auto}
.fund-expenses table{width:100%;border-collapse:collapse;font-size:15px;background:var(--surface);border-radius:var(--radius);overflow:hidden}
.fund-expenses th,.fund-expenses td{padding:14px 18px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
.fund-expenses th{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text2)}
.fund-expenses .num{text-align:right}
.fund-expenses .nowrap{white-space:nowrap}
/* "Xem tất cả" (Ban Giáo thọ, …): the button stays centred, the opened list uses the full width like the one above */
/* …and continues that grid: the same 16px gap as between the cards, not the section spacing */
.stack-lg > details.more[open]:has(> .teacher-grid){margin-top:-32px}

/* ---- Từ điển (/tu-dien/, Views/Dictionary.cshtml) */
.dict-filter{grid-template-columns:minmax(0,1fr) minmax(0,300px)}
.dict-letters{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.dict-letters a{min-width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;border:1px solid var(--line);font-size:13px;font-weight:600;color:var(--text2)}
.dict-letters a:hover{border-color:var(--accent);color:var(--accent)}
.dict-letters a[aria-current]{background:var(--accent);border-color:var(--accent);color:var(--surface)}
.dict-results{display:flex;flex-direction:column;gap:24px;width:100%;max-width:1000px;margin:0 auto}
.dict-results .lib-status{margin-top:0}
.dict-near{margin:0;text-align:center;color:var(--text2)}
.dict-books{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:16px}
.dict-book{display:flex;flex-direction:column;gap:8px;padding:24px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.dict-book:hover{box-shadow:var(--card-shadow-hover)}
.dict-book .t{font-size:20px;line-height:1.3}
.dict-book .a{color:var(--text2);font-size:14px}
.dict-book .n{margin-top:auto;padding-top:8px;font-size:13px;font-weight:600;color:var(--accent)}
.dict-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.dict-entry{background:var(--surface);border-radius:var(--radius);box-shadow:var(--card-shadow)}
.dict-entry summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 16px;padding:16px 20px;cursor:pointer;list-style:none}
.dict-entry summary::-webkit-details-marker{display:none}
.dict-entry .hw{font-size:20px;font-weight:600;color:var(--accent);overflow-wrap:anywhere}
.dict-entry .src{align-self:center;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text2);text-align:right;max-width:220px}
.dict-entry .snip{grid-column:1 / -1;color:var(--text2);font-size:15px;line-height:1.5}
.dict-entry[open] .snip{display:none}
.dict-entry .body{padding:0 20px 8px;border-top:1px solid var(--line);font-size:16px;line-height:1.65}
.dict-entry .body p{margin:12px 0 0}
.dict-entry .body p.li{margin-top:4px;padding-left:calc(16px + var(--ind,0) * 4px)}
.dict-entry .foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin:0;padding:12px 20px 16px;font-size:13px;color:var(--text2)}
.dict-entry .foot a{text-decoration:underline}
.dict-entry mark{background:color-mix(in srgb,var(--band-accent) 55%,transparent);color:inherit;border-radius:2px}
.dict-results[aria-busy="true"]{opacity:.55;transition:opacity .15s}
@media (max-width:700px){
  .dict-filter{grid-template-columns:minmax(0,1fr)}
  .dict-letters a{min-width:32px;height:32px}
  .dict-entry summary{grid-template-columns:minmax(0,1fr);padding:14px 16px}
  .dict-entry .src{text-align:left;max-width:none}
  .dict-entry .body{padding:0 16px 8px}
  .dict-entry .foot{padding:12px 16px 14px}
}
.dict-entry .body.en{border-top:1px dashed var(--line);color:var(--text2);font-size:15px}
.dict-entry .body .lbl{font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent)}

/* phone drawer: Khóa thiền / Pháp học – name opens the page, the arrow on the right opens the sub-links (closed at first);
   sub-links sit in a soft panel below instead of a long left line */
.sub-toggle{display:none}
@media (max-width:760px){
  .nav .has-sub{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center}
  .nav .has-sub > .top{grid-column:1}
  .sub-toggle{display:flex;grid-column:2;align-items:center;justify-content:center;width:44px;height:44px;margin-right:-10px;padding:0;border:0;border-radius:50%;background:none;color:var(--text2);cursor:pointer}
  .sub-toggle{-webkit-tap-highlight-color:transparent;outline:none}
  .sub-toggle:hover{background:var(--bg);color:var(--accent)}
  /* keyboard only: a ring in the site colour instead of the browser's blue square (none after a tap / click) */
  .sub-toggle:focus-visible{background:var(--bg);color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
  .sub-toggle svg{transition:transform .2s ease}
  .has-sub.open > .sub-toggle svg{transform:rotate(180deg)}
  @media (prefers-reduced-motion:reduce){.nav .has-sub > .sub,.sub-toggle svg{transition:none !important}}
  /* slides open / closed (height 0 → its content), padding and margin animate with it */
  .nav .has-sub > .sub,.nav .has-sub:hover > .sub,.nav .has-sub:focus-within > .sub{grid-column:1 / -1;display:flex;gap:2px;max-height:0;overflow:hidden;margin:0;padding:0 6px;border-radius:10px;background:var(--bg);opacity:0;visibility:hidden;
    transition:max-height .28s ease,padding .28s ease,margin .28s ease,opacity .2s ease,visibility 0s linear .28s}
  /* only the arrow decides: the desktop "open on hover / focus" must not keep it open after a tap */
  .nav .has-sub.open > .sub{max-height:240px;margin:0 0 12px;padding:6px;opacity:1;visibility:visible;transition:max-height .28s ease,padding .28s ease,margin .28s ease,opacity .2s ease .05s,visibility 0s}
  .nav .sub a,.nav .sub a[aria-current="page"]{padding:10px 12px;border-left:none;border-radius:8px;font-size:14px}
  .nav .sub a[aria-current="page"]{background:var(--surface);color:var(--accent)}
}
/* Từ điển: tabs → search card → letters → results all 32px apart (the section spacing is 48px) */
.dict-letters,.dict-letters + .dict-results{margin-top:-16px}
/* Lịch khóa thiền, phones: the 3 filters on one full-width row (no lonely chip on a second line) */
@media (max-width:760px){
  .cal-filter{display:grid;grid-template-columns:auto minmax(0,1fr) auto;width:100%}
  .cal-filter .chip{justify-content:center;min-height:40px;padding:0 14px;font-size:13px;letter-spacing:.02em}
}
/* Lịch khóa thiền: a short fade while the next month / filter loads in place */
.cal{transition:opacity .15s ease}.cal[aria-busy="true"]{opacity:.55}
/* …and the calendar sits 24px from the month bar above, like the legend / day panel below it (the page gap is 40px) */
.cal{margin-top:-16px}
/* Đăng ký: the guide steps, the "Chọn khóa thiền" box and the Phiếu đăng ký boxes share one 24px padding */
.reg-guide .reg-steps li,.form-wrap fieldset{padding:24px}
/* steps: the number is centred on the text's FIRST line – one line: centred with the number; several lines: the
   first one is (text pushed down by half of "circle − one line"; 1lh = the text's line height) */
.reg-steps li{--n:32px;align-items:flex-start}
.reg-steps li > .reg-step-n{width:var(--n);height:var(--n)}
.reg-steps li > .reg-step-n + span{padding-top:max(0px,calc((var(--n) - 1lh) / 2))}
/* Phiếu đăng ký: fields 16px apart, a group heading 24px below the field above it */
.form-wrap form fieldset{gap:16px}
.form-wrap form fieldset > .group-title{margin-top:8px}
/* checkboxes (agree, remember me): centred on the FIRST line of their text, like the step numbers
   (one line: centred with the text; several lines: with the first one). 1lh = the label's line height */
.check,.check.remember{align-items:flex-start}
.check > input,.check.remember > input{align-self:flex-start;font:inherit;line-height:inherit;margin-top:calc((1lh - 20px) / 2)}
.check.remember > input{margin-top:calc((1lh - 18px) / 2)}
/* radio / checkbox lists outside a .field (Chọn buổi tham dự): no browser margin (3px on top pushed the radio below the text) */
.choices label{display:flex;align-items:center;gap:8px}
.choices label > input[type=radio],.choices label > input[type=checkbox]{flex:none;margin:0}
/* Đăng ký, desktop: the form area uses the same 3 columns as the guide steps above – "Chọn khóa thiền" / the form span
   steps 1–2 (ends where step 2 ends), "Khóa đã chọn" sits under step 3 */
@media (min-width:901px){
  .form-wrap{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .form-wrap > .stack{grid-column:span 2}
}
/* Đăng ký › Khóa đã chọn: the course name and "Xem chi tiết" open the course page */
.aside-box .picked-name{font-size:20px;font-weight:500;color:var(--text);text-decoration:none}
.aside-box .picked-name:hover{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.aside-box .more-link{font-size:14px;font-weight:600;color:var(--accent);text-decoration:none}
.aside-box .more-link:hover{text-decoration:underline;text-underline-offset:3px}
/* Thiền viện hero: a dark dim so the white title / intro read on any photo – strongest on the left where the
   text sits, plus the bottom fade; phones (text across the whole width) get an even dim */
.about-hero::after{background:
  linear-gradient(90deg,rgba(26,18,16,.82) 0%,rgba(26,18,16,.62) 40%,rgba(26,18,16,.28) 75%,rgba(26,18,16,.18) 100%),
  linear-gradient(180deg,rgba(26,18,16,0) 45%,rgba(26,18,16,.55) 100%)}
.about-hero-text .h1,.about-hero-text .lead,.about-hero-text .eyebrow{text-shadow:0 1px 2px rgba(0,0,0,.35),0 2px 18px rgba(0,0,0,.35)}
@media (max-width:760px){
  .about-hero::after{background:linear-gradient(180deg,rgba(26,18,16,.45) 0%,rgba(26,18,16,.62) 45%,rgba(26,18,16,.85) 100%)}
}
/* Từ điển › Pháp số: a cross-reference "[98] Ratanattaya" opens that entry */
.dict-entry .body a.dict-ref{color:var(--accent);font-weight:600;text-decoration:none}
.dict-entry .body a.dict-ref:hover{text-decoration:underline;text-underline-offset:3px}
/* Thiền viện hero, desktop: the title uses the room on the right – two balanced lines instead of three narrow ones
   ("…giữa ba / mươi…"), the intro a little wider too */
@media (min-width:901px){
  .about-hero-text .h1{max-width:1120px;text-wrap:balance}
  .about-hero-text .lead{max-width:820px;text-wrap:balance}
}
/* Đăng ký: the Cloudflare check sits full width above the send button */
.reg-captcha{min-height:65px;margin:8px 0 16px}
/* a course that registers through an outside form: only the "Mở phiếu đăng ký" button */
.reg-external{margin:0;display:flex;justify-content:center}
/* Lớp Sơ Cấp Online › Văn bằng, desktop: the two steps and the note centred in the band */
@media (min-width:761px){
  .oc-ladder{justify-content:center}
  .oc-ladder-note{text-align:center}
}
/* Đăng ký: a field that still needs something – red border and a short message under it */
.field.invalid input,.field.invalid textarea,.field.invalid select{border-color:#b42318 !important;box-shadow:0 0 0 3px rgba(180,35,24,.12)}
.field-error{display:block;margin-top:6px;color:#b42318;font-size:14px;line-height:1.4}
.check.invalid{flex-wrap:wrap}
.check.invalid > .field-error{flex-basis:100%;margin:2px 0 0 36px}
fieldset.invalid > .field-error{margin-top:8px}
.reg-captcha.invalid{outline:2px solid #b42318;outline-offset:4px;border-radius:6px}
.reg-captcha.invalid > .field-error{margin-top:10px}
button.sending{opacity:.75;cursor:progress}
