:root {
  --red: #d4242a;
  --red-dark: #be1f25;
  --red-50: #fdf3f3;
  --red-100: #fbe3e4;
  --red-200: #f5c4c6;
  --navy: #1e2a4a;
  --navy-dark: #161f36;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg-gray: #f8fafc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.center { text-align: center; }
.accent { color: var(--red); }

/* topbar */
.topbar {
  background: var(--red); color: #fff; text-align: center;
  font-size: .82rem; padding: 8px 16px;
}
.topbar a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 1.3rem; font-weight: 800; color: var(--red); letter-spacing: -.5px; }
.brand span { font-size: .7rem; color: #94a3b8; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 14px; font-weight: 600; font-size: .92rem; color: var(--body); border-radius: 8px; }
.nav a:hover { color: var(--red); }
.nav .nav-cta { background: var(--navy); color: #fff; }
.nav .nav-cta:hover { background: var(--navy-dark); color: #fff; }
/* mobile menu (hidden on desktop) */
.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; cursor: pointer; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; padding: 13px 26px; border-radius: 12px; cursor: pointer; border: 2px solid transparent; transition: background .15s, color .15s; font-size: 1rem; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-text { color: var(--red); font-weight: 700; padding: 13px 8px; }
.btn-sm { padding: 9px 18px; font-size: .9rem; border-radius: 10px; }
.block { display: block; width: 100%; }

/* sections */
.section { padding: 64px 0; }
.section-gray { background: var(--bg-gray); }
.eyebrow { color: var(--red); font-size: .78rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 10px; }
.rule { width: 56px; height: 4px; background: var(--red); margin: 16px 0; border-radius: 2px; }
.center-rule { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.12rem; color: var(--body); line-height: 1.8; }

/* hero */
.hero { background: #fff; border-bottom: 1px solid var(--line); padding: 64px 0; }
.hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: 2.6rem; letter-spacing: -1px; margin: 18px 0; }
.badge { display: inline-block; background: var(--red-50); border: 1px solid var(--red-200); color: var(--red-dark); font-weight: 700; font-size: .8rem; border-radius: 999px; padding: 6px 16px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.center-row { justify-content: center; }

/* section headers with side link */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.sec-head h2, .section h2 { font-size: 1.8rem; margin: 0; }
.see-all { color: var(--red); font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* grids + cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: border-color .15s, box-shadow .15s; height: 100%; }
.card:hover { border-color: var(--red-200); box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.chip { font-size: .72rem; font-weight: 700; color: var(--red-dark); background: var(--red-50); border-radius: 999px; padding: 4px 12px; }
.card-title { font-size: 1.12rem; margin: 0 0 10px; }
.card-desc { font-size: .9rem; color: var(--muted); margin: 0 0 18px; flex: 1; }
.card-link { color: var(--red); font-weight: 700; font-size: .9rem; }

/* topics */
.topics { margin-top: 8px; }
.topic { display: flex; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: #fff; }
.topic:hover { border-color: var(--red-200); box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.topic h3 { margin: 0 0 6px; }
.topic p { margin: 0; color: var(--muted); font-size: .9rem; }
.topic .arrow { color: var(--red-200); font-size: 1.3rem; }
.topic:hover .arrow { color: var(--red); }

.big-num { font-size: 4rem; font-weight: 900; color: var(--red-100); line-height: 1; }

/* page head */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.page-head h1 { font-size: 2.2rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips a { font-size: .85rem; font-weight: 600; color: var(--body); background: #f1f5f9; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; }
.chips a:hover { background: var(--navy); color: #fff; }
.cat-block { margin-bottom: 56px; scroll-margin-top: 90px; }
.cat-block h2 { font-size: 1.5rem; margin: 0 0 4px; }

/* article */
.article { padding: 48px 0; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 24px; }
.crumbs a:hover { color: var(--red); }
.article-head h1 { font-size: 2.3rem; letter-spacing: -.5px; margin: 14px 0; }
.cover { width: 100%; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 32px; }
.toc { border: 1px solid var(--line); background: var(--bg-gray); border-radius: 12px; padding: 20px 24px; margin: 32px 0; }
.toc-h { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin: 6px 0; }
.toc a { font-size: .92rem; color: var(--body); }
.toc a:hover { color: var(--red); }

/* markdown body */
.md { color: var(--body); font-size: 1.05rem; line-height: 1.85; }
.md > * + * { margin-top: 1.25rem; }
.md h2 { font-size: 1.5rem; padding-top: 1.5rem; scroll-margin-top: 90px; }
.md h3 { font-size: 1.15rem; color: var(--red-dark); padding-top: .5rem; }
.md strong { color: var(--ink); font-weight: 600; }
.md a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; }
.md ul, .md ol { padding-left: 1.5rem; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li + li { margin-top: .5rem; }
.md blockquote { border-left: 4px solid var(--red); background: var(--red-50); padding: 16px 22px; border-radius: 0 8px 8px 0; margin: 0; }
.md code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.table-wrap { overflow-x: auto; }
.md table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 420px; }
.md th, .md td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
.md th { font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--red); }
.md td:first-child { color: var(--ink); font-weight: 500; }

/* faq */
.faq { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--red); }
.faq .plus { color: var(--red); font-size: 1.5rem; font-weight: 300; transition: transform .2s; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq p { padding: 0 40px 24px 0; font-size: .92rem; color: var(--muted); margin: 0; }

/* soft cta */
.soft-cta { margin-top: 56px; border: 1px solid var(--line); background: var(--bg-gray); border-radius: 16px; padding: 28px; text-align: center; }
.soft-cta .cta-title { font-weight: 700; font-size: 1.1rem; color: var(--ink); margin: 0 0 8px; }
.soft-cta p { color: var(--muted); font-size: .92rem; max-width: 460px; margin: 0 auto; }
.soft-cta .btn { margin-top: 18px; }
.related-h { font-size: 1.25rem; margin: 0 0 24px; }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 320px; gap: 60px; align-items: start; margin-top: 24px; }
.about-grid article p { line-height: 1.85; }
.about-grid .sub, .sub { font-size: 1.1rem; color: var(--red-dark); margin-top: 36px; }
.big-stat { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.big-stat .big-num { font-size: 7rem; }
.big-stat-title { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin: 0; }
.cred { background: var(--bg-gray); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cred-h { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 18px 24px; margin: 0; border-bottom: 1px solid var(--line); }
.cred ul { list-style: none; margin: 0; padding: 0; }
.cred li { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.cred li:last-child { border-bottom: none; }
.cred li strong { display: block; color: var(--ink); font-size: .92rem; }
.cred li span { font-size: .8rem; color: var(--muted); }

/* testimonials */
.quote-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.quote-mark { font-size: 3rem; color: var(--red-100); line-height: 0; height: 24px; font-weight: 900; }
.quote-card blockquote { margin: 0; font-size: .9rem; color: var(--body); flex: 1; }
.quote-card footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.t-name { font-weight: 700; color: var(--ink); font-size: .9rem; margin: 0; }
.t-right { text-align: right; }
.t-result { color: var(--red); font-weight: 900; font-size: 1.05rem; margin: 0; }

/* contact */
.contact-card { background: var(--bg-gray); border: 1px solid var(--line); border-radius: 16px; padding: 36px; margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact-emoji { font-size: 2.4rem; }
.contact-card h3 { margin: 0; }
.contact-card p { margin: 0; color: var(--muted); max-width: 420px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; align-items: stretch; }
.contact-grid .contact-card { margin-top: 0; padding: 32px 28px; }
.contact-qr { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
@media (max-width: 680px) { .contact-grid { grid-template-columns: 1fr; } }

/* IELTS 9.0 credential badge */
.band9-pill { display: flex; width: fit-content; align-items: center; gap: 9px; text-decoration: none; margin: 6px 0 14px;
  padding: 6px 14px 6px 7px; border-radius: 999px; background: linear-gradient(135deg, #1e2a4a, #2c3e6b);
  box-shadow: 0 2px 10px rgba(30,42,74,.18); transition: box-shadow .15s; }
.band9-pill:hover { box-shadow: 0 4px 14px rgba(30,42,74,.3); }
.band9-pill .b9-num { flex: none; font-weight: 800; font-size: 1rem; color: #1e2a4a; background: #f5c451;
  border-radius: 999px; padding: 2px 11px; letter-spacing: -0.5px; }
.band9-pill .b9-label { color: #fff; font-weight: 600; font-size: 0.85rem; }
.band9-pill .b9-go { color: #aebbd6; font-size: 0.78rem; }
.band9-pill:hover .b9-go { color: #fff; }
.hero .band9-pill { margin: 16px auto 4px; }

/* Pagoda official-profile verification */
.pagoda-verify { display: flex; width: fit-content; align-items: center; gap: 12px; text-decoration: none; margin: 4px 0 20px;
  padding: 11px 16px; border: 1px solid #cdd6e6; border-radius: 12px; background: #f4f7fc; transition: border-color .15s, box-shadow .15s; }
.pagoda-verify:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(30,42,74,.1); }
.pagoda-verify .pv-check { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #0a7d2c; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.pagoda-verify .pv-text { display: flex; flex-direction: column; line-height: 1.35; }
.pagoda-verify .pv-text strong { color: var(--navy); font-size: 0.95rem; }
.pagoda-verify .pv-sub { color: var(--muted); font-size: 0.82rem; }
.pagoda-verify .pv-arrow { margin-left: auto; color: var(--navy); font-weight: 700; }
.pagoda-verify-link { display: inline-flex; align-items: center; gap: 7px; color: var(--navy); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; }
.pagoda-verify-link:hover { border-bottom-color: var(--navy); }
.pagoda-verify-link .pv-check { width: 20px; height: 20px; border-radius: 50%; background: #0a7d2c; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; }

/* tutoring service / pricing */
.svc-grid { display: grid; grid-template-columns: 360px 1fr; gap: 32px; align-items: start; margin-top: 26px; }
.price-card { background: linear-gradient(160deg, #1e2a4a, #2c3e6b); color: #fff; border-radius: 18px; padding: 28px; box-shadow: 0 10px 30px rgba(30,42,74,.22); }
.pc-plan { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #aebbd6; margin: 0 0 8px; }
.pc-price { font-size: 2.4rem; font-weight: 900; margin: 0; letter-spacing: -1.5px; }
.pc-unit { font-size: 1rem; font-weight: 600; color: #c5cde0; letter-spacing: 0; }
.pc-basis { color: #c5cde0; font-size: .92rem; margin: 4px 0 18px; }
.pc-deal { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 16px; }
.pc-badge { display: inline-block; background: #f5c451; color: #1e2a4a; font-weight: 800; font-size: .8rem; border-radius: 999px; padding: 4px 12px; }
.pc-month { font-size: 1.5rem; font-weight: 800; margin: 10px 0 0; }
.pc-permo { font-size: .82rem; font-weight: 600; color: #c5cde0; }
.pc-was { font-size: .82rem; color: #aebbd6; margin: 2px 0 0; }
.pc-guarantee { background: #fff; color: #0a7d2c; font-weight: 700; border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin: 18px 0; text-align: center; }
.benefit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.benefit { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.benefit .bf-ic { font-size: 1.5rem; flex: none; line-height: 1.2; }
.benefit strong { display: block; color: var(--ink); margin-bottom: 3px; font-size: .98rem; }
.benefit p { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.5; }
.benefit-wide { grid-column: 1 / -1; }
@media (max-width: 820px) { .svc-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .benefit-grid { grid-template-columns: 1fr; } }

/* student portal — login gate */
.portal-gate { padding: 72px 0; }
.gate-card { max-width: 400px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 40px 34px; text-align: center; box-shadow: 0 14px 40px rgba(15,23,42,.06); }
.gate-mark { display: inline-block; font-weight: 800; color: var(--red); font-size: 1.05rem; letter-spacing: -.3px; margin-bottom: 18px; }
.gate-card h1 { font-size: 1.5rem; margin: 0 0 8px; }
.gate-card .muted { font-size: .92rem; }
.gate-input { margin-top: 18px; text-align: center; letter-spacing: .15em; }
.gate-card .btn { margin-top: 12px; }
.gate-quote { margin: 22px 0 0; font-size: .82rem; color: #94a3b8; }

/* student portal — greeting hero */
.portal-gate-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 44px 0 30px; }
.portal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.portal-hi { color: var(--red); font-weight: 700; font-size: .85rem; margin: 0 0 4px; }
.portal-gate-hero h1 { font-size: 1.95rem; margin: 0; letter-spacing: -.5px; }
.portal-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.portal-quote { margin: 20px 0 0; color: var(--body); font-size: .98rem; border-left: 3px solid var(--red-200); padding-left: 14px; font-style: italic; }
.quote-by { display: block; margin-top: 6px; font-size: .78rem; color: #94a3b8; font-style: normal; font-weight: 600; }
.portal-body { background: var(--bg-gray); padding: 26px 0 72px; }

/* student portal — (legacy) */
.portal-login { max-width: 420px; margin: 20px auto; }
.portal-login .contact-emoji { font-size: 2.2rem; }
.portal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.portal-block { margin-bottom: 48px; scroll-margin-top: 80px; }
.portal-block > h2 { font-size: 1.5rem; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--red); }
.portal-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
.portal-card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.portal-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.portal-card .md { font-size: 1rem; }
.portal-card .btn { margin-top: 14px; }
.due-chip { font-size: .78rem; font-weight: 700; color: var(--red-dark); background: var(--red-50); border: 1px solid var(--red-200); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.video-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; margin: 6px 0 4px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* curriculum: two tracks × days */
.track-block { margin-bottom: 40px; }
.track-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.track-tag { font-weight: 800; font-size: 1.05rem; color: #fff; padding: 6px 14px; border-radius: 8px; letter-spacing: .5px; }
.track-lcrc .track-tag { background: var(--navy); }
.track-wrsp .track-tag { background: var(--red); }
.track-tag.alt { background: #475569; }
.track-sub { color: var(--muted); font-size: .9rem; font-weight: 600; }
.day-list { display: flex; flex-direction: column; gap: 10px; }
.day-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.day-card:not(.empty):hover { border-color: #cdd6e6; box-shadow: 0 4px 16px rgba(15,23,42,.05); }
.day-card.empty { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-style: dashed; background: transparent; }
.day-card summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; }
.day-card summary::-webkit-details-marker { display: none; }
.day-card summary:hover { background: var(--bg-gray); }
.day-badge { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; color: #fff; background: var(--red); }
.track-lc .day-badge, .track-rc .day-badge { background: var(--navy); }
.day-badge.ghost { background: transparent; color: #b4bccb; border: 2px dashed #d7dde7; }
.day-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.day-title { font-weight: 700; color: var(--ink); }
.day-meta { font-size: .8rem; color: var(--red-dark); font-weight: 600; }
.day-up { color: #94a3b8; font-size: .9rem; }
.day-caret { color: #cbd5e1; font-size: 1.5rem; font-weight: 700; line-height: 1; transition: transform .2s; }
.day-card[open] .day-caret { transform: rotate(90deg); }
.day-body { padding: 4px 20px 22px 20px; }
.day-body h4 { margin: 18px 0 6px; font-size: .88rem; font-weight: 800; letter-spacing: .02em; color: var(--navy); }
.day-body .hw-h { color: var(--red-dark); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-empty-note { color: var(--muted); text-align: center; padding: 8px 0 16px; }
.month-chips a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.cohort-line { margin: 14px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cohort-badge { background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem; border-radius: 999px; padding: 5px 14px; }

/* portal tab menu */
.ptabs { position: relative; }
.pt-radio { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tabbar { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: 62px; z-index: 20; background: var(--bg-gray); padding: 12px 0; margin-bottom: 22px; }
.tabbar label { cursor: pointer; display: flex; flex-direction: column; line-height: 1.15; padding: 10px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; color: var(--body); transition: background .15s, color .15s, border-color .15s; }
.tabbar label .t-sub { font-size: .68rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
.tabbar label .t-count { font-size: .64rem; font-weight: 800; opacity: .6; margin-top: 3px; letter-spacing: .02em; }
.tabbar label:hover { border-color: var(--navy); }
.tab-panel { display: none; }
#pt-lc:checked ~ .p-lc, #pt-rc:checked ~ .p-rc, #pt-wr:checked ~ .p-wr, #pt-sp:checked ~ .p-sp, #pt-videos:checked ~ .p-videos, #pt-materials:checked ~ .p-materials { display: block; }
/* LC·RC grouped navy, WR·SP grouped red */
#pt-lc:checked ~ .tabbar .tab-lc, #pt-rc:checked ~ .tabbar .tab-rc { background: var(--navy); border-color: var(--navy); }
#pt-wr:checked ~ .tabbar .tab-wr, #pt-sp:checked ~ .tabbar .tab-sp { background: var(--red); border-color: var(--red); }
#pt-videos:checked ~ .tabbar label[for="pt-videos"], #pt-materials:checked ~ .tabbar label[for="pt-materials"] { background: #475569; border-color: #475569; }
#pt-lc:checked ~ .tabbar .tab-lc, #pt-lc:checked ~ .tabbar .tab-lc .t-sub,
#pt-rc:checked ~ .tabbar .tab-rc, #pt-rc:checked ~ .tabbar .tab-rc .t-sub,
#pt-wr:checked ~ .tabbar .tab-wr, #pt-wr:checked ~ .tabbar .tab-wr .t-sub,
#pt-sp:checked ~ .tabbar .tab-sp, #pt-sp:checked ~ .tabbar .tab-sp .t-sub,
#pt-videos:checked ~ .tabbar label[for="pt-videos"], #pt-videos:checked ~ .tabbar label[for="pt-videos"] .t-sub,
#pt-materials:checked ~ .tabbar label[for="pt-materials"], #pt-materials:checked ~ .tabbar label[for="pt-materials"] .t-sub { color: #fff; }
@media (max-width: 600px) { .tabbar { gap: 6px; } .tabbar label { flex: 1; padding: 8px 10px; align-items: center; text-align: center; } }

.lang-switch { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; }
.lang-switch a { display: inline-flex; line-height: 0; border-radius: 3px; opacity: .4; transition: opacity .15s; }
.lang-switch a:hover { opacity: .85; }
.lang-switch a.on { opacity: 1; outline: 2px solid var(--navy); outline-offset: 2px; }
.lang-switch img { width: 24px; height: 16px; display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }

/* footer */
.site-footer { background: var(--navy-dark); border-top: 4px solid var(--red); padding: 56px 0 36px; color: #94a3b8; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { font-size: 1.1rem; font-weight: 800; color: #fff; margin: 0 0 12px; }
.footer-text { font-size: .85rem; line-height: 1.7; max-width: 360px; }
.footer-text a { color: #fff; text-decoration: underline; }
.footer-h { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #64748b; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 10px 0; }
.site-footer li a { font-size: .88rem; color: #94a3b8; }
.site-footer li a:hover { color: var(--red-200); }
.footer-bottom { margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom p { font-size: .75rem; color: #64748b; line-height: 1.7; }

/* admin */
.admin { background: var(--bg-gray); }
.admin-wrap { padding: 40px 24px 80px; max-width: 880px; }
.login-box { max-width: 380px; margin: 60px auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; text-align: center; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-nav { margin-bottom: 24px; color: var(--muted); }
.admin-nav a { color: var(--red); font-weight: 600; }
.admin-dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.dash-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.dash-card:hover { border-color: var(--red-200); box-shadow: 0 8px 24px rgba(15,23,42,.07); transform: translateY(-2px); }
.dash-icon { font-size: 1.9rem; }
.dash-label { font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.dash-sub { font-size: .82rem; color: var(--muted); }
.dash-back { margin: 0 0 20px; font-size: .9rem; }
.dash-back a { color: var(--red); font-weight: 700; }
@media (max-width: 680px) { .admin-dash { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .admin-dash { grid-template-columns: 1fr; } }
.admin-sec { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-bottom: 28px; scroll-margin-top: 20px; }
.admin-sec h2 { margin-top: 0; }
.admin-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: none; }
.admin-row .muted { display: block; }
.admin-row-actions { display: flex; gap: 12px; align-items: center; }
.admin-row-actions a { color: var(--navy); font-weight: 600; font-size: .9rem; }
.editor { display: flex; flex-direction: column; }
.lbl { font-weight: 600; font-size: .9rem; color: var(--ink); margin: 16px 0 6px; }
.fld { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--ink); }
.fld:focus { outline: none; border-color: var(--red); }
.fld.short { width: 120px; }
.fld.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.editor .btn { margin-top: 22px; align-self: flex-start; }
.t-row { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; display: grid; gap: 8px; }
.link-btn { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--red); }
.link-btn.danger:hover { color: var(--red); }
.flash { background: var(--red-50); border: 1px solid var(--red-200); color: var(--ink); padding: 12px 16px; border-radius: 10px; font-size: .9rem; }
.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 12px 16px; border-radius: 10px; font-size: .9rem; }
.notice { background: var(--bg-gray); border: 1px solid var(--line); padding: 16px; border-radius: 10px; font-size: .88rem; color: var(--body); }
.admin code, .flash code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .85em; }

/* ============ responsive ============ */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
}

/* tablet / mobile menu */
@media (max-width: 768px) {
  .header-inner { position: relative; height: 60px; }
  .nav-burger { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(15,23,42,.08);
    padding: 10px 16px 18px; display: none;
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav a { padding: 13px 10px; font-size: 1rem; border-radius: 8px; }
  .nav .nav-cta { margin-top: 6px; text-align: center; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .lang-switch { margin: 12px 0 2px; }
}

/* phones */
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .section { padding: 48px 0; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 1.95rem; }
  .lead { font-size: 1.04rem; line-height: 1.7; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sec-head h2, .section h2 { font-size: 1.5rem; }
  .article { padding: 32px 0; }
  .article-head h1 { font-size: 1.7rem; }
  .md { font-size: 1rem; }
  .md h2 { font-size: 1.3rem; }
  .big-stat .big-num { font-size: 4.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .topbar { font-size: .72rem; padding: 7px 14px; line-height: 1.5; }
  .quote-card, .topic, .card { padding: 20px; }
}
