/* =========================================================
   Noctura Roleplay — website theme
   Matches shop.sublimerp.uk: purple on black, sharp corners,
   angled cuts like the logo. Michroma headings, Barlow body.
   ========================================================= */
:root {
  --bg: #0a0a0a; --surface: #141414; --surface-2: #1a1a1a; --surface-3: #222;
  --line: #262626; --line-2: #333;
  --ink: #f5f5f5; --ink-2: #c9c9c9; --ink-3: #9a9a9a;
  --acc: #a62bff; --acc-2: #8b1fe0; --acc-3: #6c16b0; --acc-ink: #ffffff;
  --warn: #fbbf24; --bad: #f87171; --info: #60a5fa;
  --f-head: 'Michroma', 'Barlow', system-ui, sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, sans-serif;
  --cut: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
  --corner: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  --max: 1200px;
}

* { box-sizing: border-box; border-radius: 0; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--acc); color: var(--bg); }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2 { font-family: var(--f-head); font-weight: 400; letter-spacing: .01em; line-height: 1.2; margin: 0 0 .5em; color: #fff; }
h3, h4 { font-family: var(--f-body); font-weight: 700; margin: 0 0 .4em; }
p { margin: 0 0 1em; color: var(--ink-3); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }
.acc { color: var(--acc); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--acc); color: var(--acc-ink); padding: 8px 12px; z-index: 999; }

/* angled purple tag, like the shop hero */
.sb-tag {
  display: inline-block; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 12px;
  letter-spacing: .2em; padding: 8px 24px; text-transform: uppercase; margin-bottom: 24px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--acc); font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 10px; height: 18px; background: var(--acc); clip-path: polygon(0 0, 40% 0, 100% 100%, 60% 100%); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 30px; border: 0;
  background: #262626; color: var(--ink); cursor: pointer; font: 700 13px var(--f-body); text-transform: uppercase;
  letter-spacing: .1em; white-space: nowrap; transition: background .15s, color .15s; clip-path: var(--cut);
}
.btn:hover { background: #333; color: #fff; }
.btn-primary { background: var(--acc); color: var(--acc-ink); }
.btn-primary:hover { background: #bd66ff; color: var(--acc-ink); }
/* outlined second button: fills purple on hover */
.btn-ghost { position: relative; isolation: isolate; background: var(--acc); color: var(--acc); }
.btn-ghost::before { content: ""; position: absolute; inset: 2px; z-index: -1; background: var(--bg); clip-path: var(--cut); transition: background .2s; }
.btn-ghost:hover { background: var(--acc); color: var(--acc-ink); }
.btn-ghost:hover::before { background: var(--acc); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
.btn svg { width: 17px; height: 17px; }
.btn-sm { padding: 8px 18px; font-size: 11.5px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,10,10,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 26px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; font: 400 16px var(--f-head); color: #fff; }
.brand img { height: 38px; width: auto; transition: transform .2s; }
.brand:hover img { transform: scale(1.06); }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a:not(.btn) { padding: 6px 0; color: rgba(245,245,245,.75); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; transition: color .15s; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-links a.active { color: #fff; font-weight: 600; border-bottom-color: var(--acc); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; margin-left: auto; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--acc); color: var(--acc-ink); user-select: none; }
.tk-track { display: flex; width: max-content; animation: tk-left 40s linear infinite; }
.ticker:hover .tk-track { animation-play-state: paused; }
.tk-track span { flex: none; padding: 10px 0; margin-right: 56px; font: 800 13.5px var(--f-body); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
@keyframes tk-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: 90px 0 90px; }
.sb-shape { position: absolute; background: var(--acc); clip-path: polygon(0 0, 86% 0, 100% 100%, 14% 100%); pointer-events: none; }
.sb-shape-1 { top: -60px; right: -80px; width: 760px; height: 380px; opacity: .1; }
.sb-shape-2 { top: 280px; right: 160px; width: 620px; height: 260px; opacity: .06; }
.hero .container { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
.hero .container > * { min-width: 0; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.15; }
.hero p.lead { font-size: 18px; max-width: 580px; margin: 18px 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.hero-logo { width: min(240px, 60%); filter: drop-shadow(0 0 40px rgba(166,43,255,.25)); }

.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); margin-left: 14px; vertical-align: top; clip-path: var(--cut); }
.dot { width: 9px; height: 9px; background: var(--ink-3); flex: none; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.dot.on { background: var(--acc); animation: blink 2s ease-in-out infinite; }
.dot.off { background: var(--bad); }
@keyframes blink { 50% { opacity: .35; } }

.hero-card { background: var(--surface); border: 1px solid var(--line); padding: 24px; width: 100%; max-width: 420px; position: relative; clip-path: var(--corner); }
.hero-card::before { content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 60px; background: var(--acc); }
.hero-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface-2); padding: 14px 16px; position: relative; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc-3); }
.stat b { display: block; font: 400 20px var(--f-head); color: #fff; }
.stat span { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.connect-box { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line-2); border-left: 3px solid var(--acc); padding: 8px 8px 8px 14px; font: 12.5px ui-monospace, Consolas, monospace; color: var(--acc); }
.connect-box code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 0 48px; position: relative; padding-left: 22px; }
.section-head::before { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 30px; background: var(--acc); clip-path: polygon(0 0, 40% 0, 100% 100%, 60% 100%); }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); }
.section-head p { margin: 0; }
.alt { background: #0e0e0e; border-block: 1px solid var(--line); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { position: relative; background: var(--surface); padding: 28px; clip-path: var(--corner); transition: transform .2s, background .2s; }
.card::before { content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 0; background: var(--acc); transition: width .3s ease; }
.card::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--line); pointer-events: none; clip-path: var(--corner); }
.card:hover { transform: translateY(-4px); background: #171717; }
.card:hover::before { width: 100%; }
.card:hover h3 { color: var(--acc); }
.card h3 { font-size: 18px; text-transform: uppercase; letter-spacing: .04em; transition: color .2s; }
.card p { margin: 0; font-size: 15px; }
.icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(166,43,255,.08); border: 1px solid rgba(166,43,255,.35); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.icon svg { width: 22px; height: 22px; stroke: var(--acc); }

/* Departments */
.dept .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line-2); color: var(--ink-3); margin-bottom: 18px; }
.dept .tag.open { color: var(--acc); border-color: rgba(166,43,255,.6); }
.dept .abbr { font: 400 26px var(--f-head); color: var(--acc); margin-bottom: 8px; display: block; }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.feature-visual {
  aspect-ratio: 4 / 3; position: relative; overflow: hidden; display: grid; place-items: center; clip-path: var(--corner);
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(166,43,255,.16), transparent 60%),
    linear-gradient(rgba(166,43,255,.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(166,43,255,.05) 1px, transparent 1px) 0 0 / 28px 28px,
    #101010;
}
.feature-visual img { width: 34%; opacity: .9; filter: drop-shadow(0 0 30px rgba(166,43,255,.3)); }
.check-list { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 12px; align-items: center; padding: 11px 14px; background: var(--surface); font-weight: 500; color: var(--ink-2); }
.check-list li::before { content: ""; width: 10px; height: 10px; background: var(--acc); clip-path: polygon(0 0, 70% 0, 100% 100%, 30% 100%); flex: none; }

/* Steps */
.steps { counter-reset: step; }
.step b { display: block; font: 400 28px var(--f-head); color: var(--acc); margin-bottom: 12px; }
.step a { color: var(--acc); }

/* FAQ */
.faq { max-width: 860px; display: grid; gap: 8px; }
.faq-item { background: var(--surface); border-left: 3px solid var(--line-2); transition: border-color .2s; }
.faq-item.open { border-left-color: var(--acc); }
.faq-q { width: 100%; background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer; padding: 18px 22px; font: 600 16px var(--f-body); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q::after { content: "+"; font: 400 20px var(--f-head); color: var(--acc); transition: transform .25s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 22px 18px; margin: 0; }
.faq-item.open .faq-a { max-height: 400px; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: var(--acc); color: var(--acc-ink); padding: 56px; clip-path: var(--corner); display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: var(--acc-ink); font-size: clamp(22px, 3vw, 32px); margin: 0 0 6px; }
.cta-band p { color: rgba(10,10,10,.7); margin: 0; font-weight: 500; }
.cta-band .btn { background: var(--acc-ink); color: var(--acc); }
.cta-band .btn:hover { background: #1f1f1f; }
.cta-band .btn-ghost::before { background: var(--acc); }
.cta-band .btn-ghost { background: var(--acc-ink); color: var(--acc-ink); }
.cta-band .btn-ghost:hover { color: var(--acc); }
.cta-band .btn-ghost:hover::before { background: var(--acc-ink); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding: 80px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(28px, 4.4vw, 46px); }
.page-hero p { max-width: 720px; font-size: 17px; }

/* ---------- Rules ---------- */
.rules-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; padding-top: 50px; padding-bottom: 100px; }
.rules-nav { position: sticky; top: 96px; display: grid; gap: 4px; }
.rules-nav a { padding: 10px 14px; color: var(--ink-2); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--surface); border-left: 3px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.rules-nav a:hover { background: var(--surface-3); color: #fff; border-left-color: var(--acc); }
.search { width: 100%; padding: 14px 16px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: inherit; margin-bottom: 24px; outline: none; transition: border-color .15s; }
.search:focus { border-color: var(--acc); }
.rule-section { background: var(--surface); border-top: 3px solid var(--acc); padding: 28px 30px; margin-bottom: 22px; scroll-margin-top: 96px; }
.rule-section > h2 { font-size: 20px; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.rule-section > h2 span { font: 700 12px var(--f-body); letter-spacing: .1em; padding: 5px 12px; background: var(--acc); color: var(--acc-ink); clip-path: var(--cut); }
.rule-section > p { margin-bottom: 18px; }
.rule { padding: 16px 18px; background: var(--surface-2); border-left: 3px solid var(--line-2); margin-bottom: 8px; transition: border-color .2s; }
.rule:hover { border-left-color: var(--acc); }
.rule h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: #fff; display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.rule h3 em { font: 400 12px var(--f-head); font-style: normal; color: var(--acc); flex: none; }
.rule p, .rule li { color: var(--ink-2); font-size: 15px; }
.rule p { margin: 0 0 6px; }
.rule p:last-child { margin-bottom: 0; }
.rule ul { margin: 6px 0 0; padding-left: 18px; }
.rule li { margin-bottom: 4px; }
.rule li::marker { color: var(--acc); }
.limits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.limits div { background: var(--bg); padding: 10px 12px; border-left: 2px solid var(--acc-3); }
.limits b { display: block; font: 400 18px var(--f-head); color: var(--acc); }
.limits span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.notice { background: var(--surface); border: 1px solid var(--line-2); border-left: 3px solid var(--acc); padding: 16px 20px; margin-bottom: 24px; color: var(--ink-2); }
.notice b { color: var(--acc); }
.no-results { display: none; padding: 30px; text-align: center; color: var(--ink-3); background: var(--surface); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 50px 0 40px; }
.footer-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--acc); }
.footer-grid p { margin-top: 14px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .dot.on, .tk-track { animation: none; }
}

/* ---------- 404 ---------- */
.error-page { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.error-page h1 { font-size: clamp(64px, 14vw, 130px); color: var(--acc); margin: 0; }
.error-page img { width: 80px; margin: 0 auto 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero .container, .split { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
  .hero-side { align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 22px 20px; display: none; margin: 0; }
  .nav-links.open { display: flex; }
  .nav-links li a:not(.btn) { display: block; padding: 12px 0; }
  .nav-links .btn { margin-top: 10px; width: 100%; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .limits { grid-template-columns: 1fr; }
  section { padding: 66px 0; }
  .hero { padding: 60px 0; }
  .status-pill { margin: 0 0 16px; }
  .cta-band { padding: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .rule-section { padding: 22px 18px; }
  .sb-shape-1 { width: 420px; }
}

/* =========================================================
   App UI: account menu, apply page, admin panel
   ========================================================= */
.muted { color: var(--ink-3); }
.loading, .empty { padding: 60px 0; text-align: center; color: var(--ink-3); }
.account { position: relative; }
.userbtn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; color: var(--ink); font: 600 14px var(--f-body); padding: 0; }
.avatar { width: 32px; height: 32px; object-fit: cover; flex: none; background: var(--surface-3); clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)); }
.avatar.lg { width: 52px; height: 52px; }
.menu { position: absolute; right: 0; top: 46px; background: var(--surface); border: 1px solid var(--line-2); border-top: 2px solid var(--acc); padding: 6px 0; min-width: 220px; box-shadow: 0 20px 50px rgba(0,0,0,.6); display: none; z-index: 60; }
.menu.on { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 16px; cursor: pointer; color: var(--ink-2); font: 500 14px var(--f-body); }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--acc); }
.menu .who { padding: 8px 16px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }

.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--info); padding: 12px 16px; max-width: 380px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toastin .2s; font-weight: 500; }
.toast.ok { border-left-color: var(--acc); } .toast.warn { border-left-color: var(--warn); } .toast.bad { border-left-color: var(--bad); }
@keyframes toastin { from { opacity: 0; transform: translateX(12px); } }

/* link cards + dept cards */
.link-card { display: flex; flex-direction: column; }
.link-card .abbr, .dept .abbr { font: 400 22px var(--f-head); color: var(--acc); margin-bottom: 10px; display: block; }
.link-card .go { margin-top: auto; padding-top: 16px; color: var(--acc); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.dept { display: flex; flex-direction: column; }
.dept .tag { align-self: flex-start; }
.dept .btn { align-self: flex-start; margin-top: 18px; }
.mini-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.mini-list li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.mini-list li::before { content: ""; width: 8px; height: 8px; background: var(--acc); clip-path: polygon(0 0, 70% 0, 100% 100%, 30% 100%); flex: none; }
.step .btn { margin-top: 16px; }

/* segmented tabs */
.seg { display: flex; gap: 8px; margin-bottom: 26px; overflow: auto; padding-bottom: 2px; }
.seg button { padding: 11px 26px; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; font: 700 12.5px var(--f-body); white-space: nowrap; text-transform: uppercase; letter-spacing: .1em; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 12px 100%); transition: background .15s, color .15s; }
.seg button:hover { background: var(--surface-3); color: #fff; }
.seg button.on { background: var(--acc); color: var(--acc-ink); }
.seg button em { font-style: normal; margin-left: 6px; opacity: .7; }

/* fields */
.f { width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: inherit; outline: none; transition: border-color .15s; }
.f:focus { border-color: var(--acc); }
textarea.f { min-height: 120px; resize: vertical; line-height: 1.5; }
select.f { cursor: pointer; }
.fl { display: flex; flex-direction: column; gap: 7px; }
.fl > span { font-weight: 600; font-size: 13px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.fl > span i { color: var(--acc); font-style: normal; }
.fl .hint { font-size: 13px; color: var(--ink-3); }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); cursor: pointer; font-size: 15px; }
.check input { accent-color: var(--acc); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn-bad { background: rgba(248,113,113,.14); color: var(--bad); }
.btn-bad:hover { background: rgba(248,113,113,.26); color: #fff; }
.btn-warn { background: rgba(251,191,36,.14); color: var(--warn); }
.btn-warn:hover { background: rgba(251,191,36,.26); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.pending { color: var(--ink-2); }
.pill.interview { border-color: rgba(251,191,36,.6); color: var(--warn); }
.pill.accepted, .pill.open { border-color: rgba(166,43,255,.6); color: var(--acc); }
.pill.denied, .pill.closed { border-color: rgba(248,113,113,.6); color: var(--bad); }

/* panel */
.panel { background: var(--surface); border: 1px solid var(--line); position: relative; }
.panel + .panel { margin-top: 18px; }
.panel .ph { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel .ph h3 { font-size: 13.5px; flex: 1; text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.panel .ph h3::before { content: ""; display: inline-block; width: 8px; height: 12px; background: var(--acc); margin-right: 10px; clip-path: polygon(0 0, 60% 0, 100% 100%, 40% 100%); vertical-align: -1px; }
.panel .pb { padding: 20px; }

/* apply: form cards */
.forms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.form-card { cursor: pointer; display: flex; flex-direction: column; text-align: left; border: 0; color: inherit; font: inherit; }
.form-card .abbr { font: 400 22px var(--f-head); color: var(--acc); margin-bottom: 10px; display: block; }
.form-card .foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); margin-top: 18px; }
.form-card.closed { opacity: .55; cursor: default; }
.form-card.closed:hover { transform: none; }
.apply-wrap { max-width: 820px; }
.apply-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.apply-head > div { flex: 1; min-width: 240px; }
.apply-head h2 { margin-bottom: 6px; }
.signin-box { background: var(--surface); padding: 40px 30px; text-align: center; position: relative; clip-path: var(--corner); max-width: 520px; margin: 0 auto; }
.signin-box::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--acc); }
.signin-box img { width: 56px; margin: 0 auto 16px; }
.signin-box h2 { font-size: 20px; }
.blocked { padding: 16px 20px; background: var(--surface); border-left: 3px solid var(--warn); color: var(--ink-2); margin-bottom: 20px; }
.q-block { background: var(--surface); padding: 20px 22px; border-left: 3px solid var(--line-2); transition: border-color .2s; }
.q-block:focus-within { border-left-color: var(--acc); }
.q-block.err { border-left-color: var(--bad); }
.my-app { background: var(--surface); padding: 20px 22px; margin-bottom: 12px; border-left: 3px solid var(--line-2); }
.my-app.accepted { border-left-color: var(--acc); } .my-app.denied { border-left-color: var(--bad); } .my-app.interview { border-left-color: var(--warn); }
.my-app .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.my-app h3 { margin: 0; flex: 1; font-size: 17px; }
.response { margin-top: 14px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line-2); border-left: 3px solid var(--acc); white-space: pre-wrap; color: var(--ink-2); }
.response b { display: block; color: var(--ink-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
details.answers { margin-top: 12px; }
details.answers summary { cursor: pointer; color: var(--acc); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.qa { margin-top: 12px; display: grid; gap: 12px; }
.qa dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.qa dd { margin: 0; white-space: pre-wrap; word-break: break-word; color: var(--ink); }

/* admin layout */
.admin-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 70px); }
.admin-side { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 70px; height: calc(100vh - 70px); overflow: auto; }
.admin-side .who { display: flex; align-items: center; gap: 12px; padding: 0 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.admin-side .who b { display: block; line-height: 1.2; }
.admin-side nav { display: grid; gap: 3px; }
.admin-side nav a { padding: 10px 12px; color: var(--ink-2); font-weight: 600; font-size: 14px; border-left: 3px solid transparent; display: flex; justify-content: space-between; align-items: center; }
.admin-side nav a:hover { background: var(--surface-2); color: #fff; }
.admin-side nav a.on { background: var(--surface-2); color: var(--acc); border-left-color: var(--acc); }
.admin-side nav a em { font-style: normal; background: var(--acc); color: var(--acc-ink); font-size: 11px; font-weight: 800; padding: 1px 7px; }
.admin-main { padding: 34px 34px 80px; min-width: 0; }
.admin-main h1 { font-size: 24px; margin-bottom: 6px; }
.page-top { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.page-top > div { flex: 1; }
.page-top p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats .stat { cursor: default; }
.stats a.stat { cursor: pointer; transition: background .15s; }
.stats a.stat:hover { background: var(--surface-3); }
.stat.warn::before { background: var(--warn); } .stat.bad::before { background: var(--bad); } .stat.ok::before { background: var(--acc); }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar .f { width: auto; min-width: 160px; }
.toolbar .f.grow { flex: 1; min-width: 200px; }
.tw { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14.5px; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
tr.click:hover td:first-child { box-shadow: inset 3px 0 0 var(--acc); }
.who-cell { display: flex; align-items: center; gap: 10px; }
.who-cell span { display: flex; flex-direction: column; line-height: 1.25; }
.who-cell small { color: var(--ink-3); font-size: 12.5px; }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.detail-grid .side { position: sticky; top: 90px; display: grid; gap: 18px; }
.decision-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.decision-btns .btn { padding: 11px 10px; }
.note { padding: 12px 14px; background: var(--surface-2); border-left: 2px solid var(--line-2); margin-bottom: 8px; }
.note .meta { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.note p { margin: 0; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { font-size: 13.5px; color: var(--ink-2); padding-left: 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; background: var(--acc-3); }
.timeline small { display: block; color: var(--ink-3); }
.kv { display: grid; gap: 8px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.kv span { color: var(--ink-3); }
.back { display: inline-flex; gap: 8px; color: var(--ink-3); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; cursor: pointer; background: none; border: 0; padding: 0; }
.back:hover { color: var(--acc); }

/* form builder */
.qb { background: var(--surface-2); padding: 16px; border-left: 3px solid var(--acc-3); display: grid; gap: 10px; }
.qb + .qb { margin-top: 10px; }
.qb .qb-top { display: grid; grid-template-columns: 1fr 160px auto; gap: 8px; align-items: center; }
.qb .qb-tools { display: flex; gap: 4px; }
.qb .qb-tools button { background: var(--surface-3); border: 0; color: var(--ink-2); width: 34px; height: 38px; cursor: pointer; font-size: 15px; }
.qb .qb-tools button:hover { color: var(--acc); }
.qb .qb-tools button.del:hover { color: var(--bad); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(3px); display: none; align-items: flex-start; justify-content: center; z-index: 90; overflow: auto; padding: 8vh 16px; }
.modal-bg.on { display: flex; }
.modal { background: var(--surface); border-top: 3px solid var(--acc); width: 100%; max-width: 520px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.modal .mh { padding: 20px 22px 0; display: flex; gap: 12px; align-items: flex-start; }
.modal .mh h2 { font-size: 17px; flex: 1; margin: 0; }
.modal .mb { padding: 16px 22px; }
.modal .mf { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.x { background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 24px; line-height: 1; padding: 0 4px; }
.x:hover { color: var(--acc); }

@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .side { position: static; }
}
@media (max-width: 860px) {
  .account { margin-top: 10px; }
  .menu { position: static; display: none; box-shadow: none; margin-top: 8px; }
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side nav { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .admin-main { padding: 24px 18px 60px; }
  .grid2 { grid-template-columns: 1fr; }
  .qb .qb-top { grid-template-columns: 1fr; }
}
