/* ============ Shaolin Training Worldwide · design system ============ */
:root {
  --red: #8B1E1E; --red-d: #5C1010; --red-dd: #3A0B0B; --saffron: #E39B2D; --gold: #C9A24A; --gold-l: #E4CE8F;
  --ink: #161412; --ink-2: #221E1B; --ink-3: #2E2925; --paper: #F4EDE1; --paper-2: #EDE3D2; --paper-3: #E4D7C2; --stone: #6E6A64; --stone-d: #57534E;
  --line: rgba(22, 20, 18, .12); --line-l: rgba(244, 237, 225, .14);
  --serif: 'Noto Serif SC', 'Songti SC', Georgia, serif; --sans: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --r: 18px; --r-sm: 10px; --shadow: 0 1px 2px rgba(22, 20, 18, .06), 0 12px 32px -12px rgba(60, 20, 10, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .38 0 0 0 0 .22 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23f)'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--paper); background-image: var(--grain), var(--fibre); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-d); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.005em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1.06; }
.h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.h3 { font-size: 1.4rem; }
.lead { font-size: 1.15rem; color: var(--stone-d); max-width: 62ch; }
.muted { color: var(--stone); } .small { font-size: .9rem; } .center { text-align: center; }
.container { width: min(1240px, 100% - 48px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 48px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 12px; }

/* eyebrow + brush divider */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: .82rem; font-weight: 600; letter-spacing: .08em; color: var(--red); margin-bottom: 18px; }
.eyebrow::before { content: ''; width: 34px; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 10'%3E%3Cpath d='M1 6c10-4 22-5 34-3s18 2 24-1c-6 4-16 6-26 5S9 5 1 6z' fill='%238B1E1E'/%3E%3C/svg%3E") center/contain no-repeat; }
.on-dark .eyebrow, .eyebrow.light { color: var(--gold-l); }
.on-dark .eyebrow::before, .eyebrow.light::before { filter: brightness(2.4) saturate(.6); }
.eyebrow-sm { font-size: .76rem; font-weight: 600; letter-spacing: .06em; color: var(--red); margin: 0 0 6px; }
.brush-rule { height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 22' preserveAspectRatio='none'%3E%3Cpath d='M2 13c60-6 140-10 230-8s170 7 250 3 90-5 116-4c-30 5-100 9-180 10S300 11 210 13 60 17 2 13z' fill='%23161412' opacity='.85'/%3E%3C/svg%3E") center/100% 100% no-repeat; opacity: .8; }

/* buttons */
.btn { --bg: var(--ink); --fg: var(--paper); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid transparent; background: var(--bg); color: var(--fg); font-weight: 600; font-size: .95rem; text-decoration: none; transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s; white-space: nowrap; }
.btn:hover { color: var(--fg); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-red { --bg: var(--red); --fg: #FBF5EA; box-shadow: 0 10px 24px -12px rgba(139, 30, 30, .7); }
.btn-red:hover { --bg: var(--red-d); }
.btn-gold { --bg: var(--saffron); --fg: var(--ink); }
.btn-gold:hover { --bg: #EFAE48; }
.btn-ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line); }
.btn-ghost:hover { --fg: var(--ink); border-color: var(--ink); }
.btn-line { --bg: transparent; --fg: var(--red); border-color: rgba(139, 30, 30, .35); }
.btn-line:hover { --bg: var(--red); --fg: #FBF5EA; }
.btn-light { --bg: rgba(244, 237, 225, .12); --fg: var(--paper); border-color: rgba(244, 237, 225, .4); backdrop-filter: blur(6px); }
.btn-light:hover { --bg: var(--paper); --fg: var(--ink); }
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: .88rem; }
.btn-xs { min-height: 34px; padding: 4px 12px; font-size: .8rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--red); }
.link-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* tags, stars, flags, seals */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: rgba(139, 30, 30, .07); color: var(--red-d); border: 1px solid rgba(139, 30, 30, .12); }
.tag-gold { background: rgba(227, 155, 45, .14); color: #7A4C0C; border-color: rgba(227, 155, 45, .3); }
.stars { display: inline-flex; align-items: center; gap: 2px; font-size: .85rem; }
.stars svg { width: 15px; height: 15px; fill: #D8CDBA; }
.stars svg.on { fill: var(--saffron); }
.stars b { margin-left: 6px; font-weight: 600; }
.flag { display: inline-block; width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); vertical-align: -2px; }
.date-seal { position: absolute; top: 14px; left: 14px; width: 62px; height: 66px; display: grid; place-content: center; text-align: center; background: var(--red); color: #FBF5EA; border-radius: 6px; font-family: var(--serif); line-height: 1; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5); }
.date-seal::after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(251, 245, 234, .55); border-radius: 3px; }
.date-seal b { font-size: 1.6rem; } .date-seal i { font-style: normal; font-size: .72rem; letter-spacing: .1em; margin-top: 4px; font-family: var(--sans); font-weight: 600; }
.verified-seal { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 6px; border-radius: 999px; background: rgba(22, 20, 18, .72); color: var(--paper); font-size: .74rem; font-weight: 600; backdrop-filter: blur(4px); }
.verified-seal svg { width: 18px; height: 18px; padding: 3px; border-radius: 4px; background: var(--red); stroke: #fff; fill: none; stroke-width: 3; }
.chip-new { position: absolute; top: 14px; left: 14px; padding: 4px 12px; border-radius: 999px; background: var(--saffron); color: var(--ink); font-size: .75rem; font-weight: 700; }
.sample-flag { position: absolute; bottom: 12px; right: 12px; font-size: .66rem; font-weight: 600; letter-spacing: .06em; padding: 2px 8px; border-radius: 4px; border: 1px dashed rgba(110, 106, 100, .6); color: var(--stone); background: rgba(244, 237, 225, .85); }
.sample-flag.static { position: static; }
.sample-badge { display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .06em; padding: 2px 8px; border-radius: 4px; border: 1px dashed currentColor; opacity: .75; }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 60; transition: background .35s, box-shadow .35s, color .35s; color: var(--ink); }
.site-header.scrolled { background: rgba(244, 237, 225, .9); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.hdr-inner { width: min(1340px, 100% - 40px); margin: auto; display: flex; align-items: center; gap: 24px; height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex-shrink: 0; }
.logo-seal { width: 44px; height: 44px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--serif); }
.brand-name b { font-size: 1.04rem; font-weight: 700; }
.brand-name span { font-size: .78rem; font-family: var(--sans); font-weight: 500; letter-spacing: .14em; opacity: .7; }
.main-nav { display: flex; gap: 2px; margin-left: auto; }
.main-nav a { color: inherit; text-decoration: none; font-size: .9rem; font-weight: 500; padding: 8px 12px; border-radius: 999px; position: relative; }
.main-nav a:hover { background: rgba(139, 30, 30, .08); }
.main-nav a[aria-current]::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 6px; height: 6px; margin-left: -3px; background: var(--red); transform: rotate(45deg); }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.nav-login { color: inherit; text-decoration: none; font-weight: 600; font-size: .9rem; padding: 8px 12px; }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: inherit; align-items: center; justify-content: center; }
.burger svg, .drawer-x svg, .modal-x svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.over-hero .site-header:not(.scrolled) { color: var(--paper); }
.over-hero .site-header:not(.scrolled) .burger { border-color: rgba(244, 237, 225, .35); }
.over-hero .site-header:not(.scrolled) .main-nav a:hover { background: rgba(244, 237, 225, .12); }
.over-hero .site-header:not(.scrolled) .main-nav a[aria-current]::after { background: var(--saffron); }
.acct { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(244, 237, 225, .6); border-radius: 999px; padding: 4px 12px 4px 4px; color: var(--ink); min-height: 44px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--serif); font-weight: 700; }
.chev { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; color: var(--ink); }
.acct-menu a, .acct-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; font-weight: 500; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--paper-2); }
.acct-meta { font-size: .8rem; color: var(--stone); padding: 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-meta span { color: var(--red); font-weight: 600; }
.drawer { position: fixed; inset: 0; background: rgba(22, 20, 18, .5); opacity: 0; transition: opacity .3s; }
.drawer.open { opacity: 1; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 90vw); background: var(--ink); color: var(--paper); padding: 24px; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s var(--ease); overflow: hidden; }
.drawer.open .drawer-panel { transform: none; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.drawer-x { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-l); background: none; color: var(--paper); display: grid; place-items: center; }
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a { color: var(--paper); text-decoration: none; font-family: var(--serif); font-size: 1.5rem; padding: 10px 0; border-bottom: 1px solid var(--line-l); }
.drawer nav a[aria-current] { color: var(--saffron); }
.drawer-foot { display: grid; gap: 10px; margin-top: 28px; }
.drawer-foot .btn-line, .drawer-foot .btn-ghost { --fg: var(--paper); border-color: var(--line-l); }
.drawer-hanzi { position: absolute; right: -30px; bottom: -40px; font-family: var(--serif); font-size: 200px; font-weight: 900; color: rgba(139, 30, 30, .35); writing-mode: vertical-rl; pointer-events: none; }

/* ---------- footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--ink); color: rgba(244, 237, 225, .78); padding: 90px 0 0; background-image: var(--grain); }
.ftr-hanzi { position: absolute; right: -2vw; bottom: -9vw; font-family: var(--serif); font-weight: 900; font-size: 32vw; line-height: 1; color: rgba(139, 30, 30, .22); pointer-events: none; letter-spacing: -.05em; }
.ftr-grid { position: relative; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 60px; }
.ftr-brand p { max-width: 32ch; margin: 18px 0 22px; }
.site-footer .brand { color: var(--paper); }
.site-footer h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; color: var(--gold); margin-bottom: 18px; font-weight: 600; }
.ftr-grid > div:not(.ftr-brand) a { display: block; color: rgba(244, 237, 225, .78); text-decoration: none; padding: 5px 0; }
.ftr-grid a:hover { color: var(--saffron); }
.ftr-bottom { position: relative; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 22px 0 28px; border-top: 1px solid var(--line-l); font-size: .85rem; }
.ftr-bottom p { margin: 0; }
.reset-demo { background: none; border: 0; color: var(--saffron); text-decoration: underline; padding: 0; font-size: inherit; }

/* ---------- cards ---------- */
.card { position: relative; background: #FBF7EF; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-3); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.22rem; margin: 0; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--red); }
.card-loc { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--stone-d); margin: 0; }
.card-loc svg { width: 16px; height: 16px; fill: none; stroke: var(--red); stroke-width: 2; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.card-person { text-align: center; background: transparent; border: 0; }
.card-person:hover { box-shadow: none; }
.person-arch { display: block; aspect-ratio: 3 / 3.7; border-radius: 999px 999px 14px 14px; overflow: hidden; position: relative; border: 1px solid rgba(201, 162, 74, .5); padding: 7px; }
.person-arch img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 9px 9px; transition: transform .8s var(--ease); }
.card-person:hover .person-arch img { transform: scale(1.04); }
.card-person .card-body { align-items: center; padding: 18px 8px; }
.card-person .card-loc { justify-content: center; }
.lineage-line { font-size: .9rem; color: var(--stone-d); margin: 0; }
.row-card { position: relative; display: grid; grid-template-columns: 220px 1fr auto; gap: 24px; background: #FBF7EF; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: box-shadow .3s; }
.row-card:hover { box-shadow: var(--shadow); }
.row-media img { width: 100%; height: 100%; object-fit: cover; min-height: 180px; }
.row-body { padding: 20px 0; display: flex; flex-direction: column; gap: 6px; }
.row-body h3 { font-size: 1.2rem; margin: 0; } .row-body h3 a { color: var(--ink); text-decoration: none; }
.row-body p.small { margin: 0; }
.row-side { padding: 20px 22px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .lbl { font-size: .85rem; font-weight: 600; color: var(--ink-3); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(22, 20, 18, .18); background: #FDFAF4; font: inherit; color: var(--ink); transition: border .2s, box-shadow .2s; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(139, 30, 30, .12); }
[aria-invalid="true"] { border-color: #B3261E !important; }
.err { color: #A3221B; font-size: .82rem; margin: 0; }
.hint { font-size: .8rem; color: var(--stone); margin: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); margin-top: 2px; flex-shrink: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--red); font-weight: 600; font-size: .82rem; padding: 8px 10px; min-height: 40px; }
.success-box { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 14px; background: rgba(201, 162, 74, .14); border: 1px solid rgba(201, 162, 74, .5); }
.success-box .seal-check { flex-shrink: 0; width: 40px; height: 40px; border-radius: 8px; background: var(--red); display: grid; place-items: center; }
.success-box svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2.5; }
.success-box p { margin: 0; }

/* ---------- toast + modal ---------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 14px; background: var(--ink); color: var(--paper); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .5); animation: rise .4s var(--ease); font-size: .92rem; }
.toast.out { opacity: 0; transform: translateY(10px); transition: .4s; }
.toast-seal { width: 30px; height: 30px; border-radius: 6px; background: var(--red); display: grid; place-items: center; }
.toast-seal svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.5; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.modal-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(22, 20, 18, .62); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--paper); background-image: var(--grain); border-radius: 22px; padding: 32px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); animation: rise .35s var(--ease); }
.modal-wide { width: min(1000px, 100%); padding: 0; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(22, 20, 18, .08); display: grid; place-items: center; color: var(--ink); z-index: 3; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stagger > .reveal:nth-child(2) { transition-delay: .08s; } .stagger > .reveal:nth-child(3) { transition-delay: .16s; } .stagger > .reveal:nth-child(4) { transition-delay: .24s; } .stagger > .reveal:nth-child(5) { transition-delay: .32s; } .stagger > .reveal:nth-child(6) { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* sections */
.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.on-dark { background: var(--ink); color: var(--paper); background-image: var(--grain); }
.on-dark .muted, .on-dark .lead { color: rgba(244, 237, 225, .7); }
.on-red { background: var(--red-d); color: var(--paper); background-image: var(--grain); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 48px; flex-wrap: wrap; }
.sec-head .h2 { margin: 0; max-width: 18ch; }
.sec-head p { margin: 0; max-width: 44ch; }

/* page hero (inner pages) */
.page-hero { position: relative; padding: 150px 0 70px; overflow: hidden; }
.page-hero .hanzi-bg { position: absolute; right: 4%; top: 60px; font-family: var(--serif); font-weight: 900; font-size: clamp(140px, 22vw, 300px); line-height: 1; color: rgba(139, 30, 30, .07); writing-mode: vertical-rl; pointer-events: none; }
.page-hero .h1 { max-width: 16ch; }
.crumbs { font-size: .85rem; color: var(--stone); margin-bottom: 18px; }
.crumbs a { color: var(--stone-d); }

/* tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 14px 16px; font-weight: 600; font-size: .92rem; color: var(--stone-d); border-bottom: 2px solid transparent; white-space: nowrap; min-height: 48px; }
.tabs button[aria-selected="true"] { color: var(--red); border-color: var(--red); }
.tabpanel { padding: 32px 0; }
.tabpanel[hidden] { display: none; }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #FBF7EF; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .74rem; letter-spacing: .08em; color: var(--stone); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: currentColor; }
.st-approved, .st-published, .st-replied, .st-active { background: rgba(46, 125, 80, .12); color: #2B6A44; }
.st-pending, .st-new { background: rgba(227, 155, 45, .18); color: #8A5609; }
.st-changes { background: rgba(60, 90, 160, .12); color: #34508F; }
.st-rejected, .st-suspended, .st-hidden { background: rgba(139, 30, 30, .1); color: var(--red); }
.st-draft, .st-closed { background: rgba(110, 106, 100, .14); color: var(--stone-d); }

/* accordion */
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; text-align: left; background: none; border: 0; padding: 22px 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: inherit; min-height: 56px; }
.acc-ico { flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; border: 1px solid currentColor; display: grid; place-items: center; transition: transform .3s, background .3s; opacity: .7; }
.acc-ico::before { content: '+'; font-family: var(--sans); font-size: 1.2rem; line-height: 1; }
.acc-item.open .acc-ico { transform: rotate(45deg); background: var(--red); color: #fff; border-color: var(--red); opacity: 1; }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.acc-body p { padding-bottom: 22px; max-width: 68ch; color: var(--stone-d); }
.on-dark .acc-item { border-color: var(--line-l); }
.on-dark .acc-body p { color: rgba(244, 237, 225, .72); }

/* ---------- dashboards ---------- */
.dash { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.dash-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--ink); background-image: var(--grain); color: var(--paper); padding: 22px 16px; display: flex; flex-direction: column; }
.dash-side .brand { color: var(--paper); padding: 4px 8px 22px; border-bottom: 1px solid var(--line-l); margin-bottom: 16px; }
.dash-side nav { display: flex; flex-direction: column; gap: 2px; }
.dash-side nav a, .dash-side nav button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: rgba(244, 237, 225, .75); text-decoration: none; font-size: .92rem; font-weight: 500; background: none; border: 0; text-align: left; width: 100%; min-height: 44px; }
.dash-side nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.dash-side nav a:hover, .dash-side nav button:hover { background: rgba(244, 237, 225, .07); color: var(--paper); }
.dash-side nav a[aria-current] { background: var(--red); color: #fff; }
.dash-side .nav-sep { height: 1px; background: var(--line-l); margin: 12px 0; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--saffron); color: var(--ink); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.dash-user { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--line-l); display: flex; gap: 10px; align-items: center; font-size: .85rem; }
.dash-user span { display: block; color: rgba(244, 237, 225, .55); font-size: .76rem; }
.dash-main { padding: 34px clamp(20px, 4vw, 52px) 80px; min-width: 0; }
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.dash-top h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; }
.dash-burger { display: none; }
.banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: 14px; margin-bottom: 24px; background: rgba(227, 155, 45, .14); border: 1px solid rgba(227, 155, 45, .45); }
.banner.blue { background: rgba(60, 90, 160, .08); border-color: rgba(60, 90, 160, .3); }
.banner.red { background: rgba(139, 30, 30, .07); border-color: rgba(139, 30, 30, .3); }
.banner p { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat { background: #FBF7EF; border: 1px solid var(--line); border-radius: 16px; padding: 20px; position: relative; overflow: hidden; }
.stat .k { font-size: .8rem; color: var(--stone); font-weight: 500; }
.stat .v { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; line-height: 1.1; margin-top: 6px; }
.stat .s { font-size: .75rem; color: var(--stone); }
.stat .glyph { position: absolute; right: 12px; bottom: -14px; font-family: var(--serif); font-size: 72px; color: rgba(139, 30, 30, .07); font-weight: 900; }
.stat.hot { background: var(--red); color: #fff; border-color: var(--red); }
.stat.hot .k, .stat.hot .s { color: rgba(255, 255, 255, .75); }
.stat.hot .glyph { color: rgba(255, 255, 255, .12); }
.panel { background: #FBF7EF; border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 22px; }
.panel h2 { font-size: 1.25rem; margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.progress { height: 10px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--saffron)); border-radius: 999px; }
.status-seal { display: inline-flex; align-items: center; gap: 14px; }
.status-seal .big { width: 70px; height: 70px; border-radius: 10px; display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; font-weight: 900; color: #fff; position: relative; transform: rotate(-4deg); }
.status-seal .big::after { content: ''; position: absolute; inset: 5px; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 6px; }
.empty { text-align: center; padding: 50px 20px; color: var(--stone); }
.empty .seal-big { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 12px; background: var(--red); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 2rem; font-weight: 900; transform: rotate(-5deg); box-shadow: inset 0 0 0 6px var(--red), inset 0 0 0 8px rgba(255, 255, 255, .55); }
.side-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--paper); z-index: 140; box-shadow: -20px 0 60px rgba(0, 0, 0, .3); padding: 30px; overflow-y: auto; animation: slidein .35s var(--ease); }
@keyframes slidein { from { transform: translateX(100%); } }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-picker label { cursor: pointer; }
.tag-picker input { position: absolute; opacity: 0; }
.tag-picker span { display: inline-flex; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; font-weight: 500; background: #FDFAF4; min-height: 40px; align-items: center; }
.tag-picker input:checked + span { background: var(--red); color: #fff; border-color: var(--red); }
.tag-picker input:focus-visible + span { outline: 2px solid var(--saffron); outline-offset: 2px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbs img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.mini-list li:last-child { border: 0; }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding-top: 10px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bar i { width: 100%; max-width: 46px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, var(--saffron), var(--red)); transition: height 1s var(--ease); }
.chart .bar span { font-size: .72rem; color: var(--stone); }
.chart .bar b { font-size: .8rem; }
.dsec[hidden] { display: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 50px; height: 28px; border-radius: 999px; background: var(--paper-3); position: relative; transition: background .2s; flex-shrink: 0; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + i { background: var(--red); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { outline: 2px solid var(--saffron); outline-offset: 2px; }

/* responsive (shared) */
@media (max-width: 1180px) { .main-nav { display: none; } .burger { display: inline-flex; } }
@media (max-width: 980px) {
  .ftr-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: fixed; z-index: 120; left: 0; width: 280px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .dash-side.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .4); }
  .dash-burger { display: inline-flex; }
  .row-card { grid-template-columns: 160px 1fr; }
  .row-side { grid-column: 1 / -1; flex-direction: row; align-items: center; border-top: 1px dashed var(--line); padding: 12px 18px; }
}
@media (max-width: 640px) {
  .container, .narrow { width: calc(100% - 32px); }
  .hide-sm { display: none !important; }
  .acct-name { display: none; }
  .ftr-grid { grid-template-columns: 1fr; gap: 28px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .v { font-size: 1.7rem; }
  .row-card { grid-template-columns: 1fr; gap: 0; }
  .row-media img { min-height: 160px; max-height: 200px; }
  .row-body { padding: 18px; }
  .modal { padding: 26px 20px; }
  .brand-name b { font-size: .95rem; }
}

#dBody:focus { outline: none; }
