/* =====================================================================
   Thailand Accounting Challenge 2027 — Frontend design system
   Source of truth: "Thailand Accounting Challenge 2027 - Redesign.html"
   Loaded after Bootstrap 3 (grid, dropdown and form JS still rely on it).
   ===================================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: 'Prompt'; src: url(font/Prompt-Medium.ttf) format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Prompt'; src: url(font/Prompt-SemiBold.ttf) format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Prompt'; src: url(font/Prompt-Bold.ttf) format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Prompt'; src: url(font/Prompt-ExtraBold.ttf) format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --tac-navy: #0A2A82;
  --tac-blue: #0B5BEA;
  --tac-accent: #FF9A1F;
  --tac-accent-hover: #FFA940;
  --tac-ink: #0F1B3D;
  --tac-ink-2: #34477A;
  --tac-muted: #4A5878;
  --tac-bg: #F3F7FF;
  --tac-surface: #FFFFFF;
  --tac-tint: #EAF2FF;
  --tac-tint-2: #F7FAFF;
  --tac-line: #DCE5F5;
  --tac-line-2: #E2E9F7;
  --tac-input: #C9D6EE;
  --tac-dash: #9DB8F0;
  --tac-on-navy: #DCE6FF;
  --tac-on-blue: #E3EDFF;
  --tac-warm: #FFF6EA;
  --tac-warm-line: #FFD9A8;
  --tac-warm-chip: #FFF1E0;
  --tac-warm-ink: #9A4A00;
  --tac-warm-ink-2: #C25E00;
  --tac-warm-text: #5A3200;
  --tac-ok-bg: #E3F5EC;
  --tac-ok: #146C43;
  --tac-err-bg: #FDE8E8;
  --tac-err: #A3262A;
  --tac-font: 'IBM Plex Sans Thai', 'Prompt', system-ui, sans-serif;
  --tac-display: 'Prompt', 'IBM Plex Sans Thai', sans-serif;
  --tac-ring: 0 0 0 4px rgba(11, 91, 234, 0.22);
  --tac-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #9DB8F0 var(--tac-bg); }
html, body { padding: 0; margin: 0; }
body.tac {
  font-family: var(--tac-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tac-ink);
  background: var(--tac-bg);
  -webkit-font-smoothing: antialiased;
}
body.tac ::selection { background: #FFD9A8; color: var(--tac-ink); }
body.tac a { color: var(--tac-blue); text-underline-offset: 3px; }
body.tac a:hover, body.tac a:focus { color: var(--tac-navy); }
body.tac :focus-visible { outline: 3px solid var(--tac-blue); outline-offset: 2px; border-radius: 6px; }
body.tac h1, body.tac h2, body.tac h3, body.tac h4, body.tac h5, body.tac h6 {
  font-family: var(--tac-display);
  color: var(--tac-navy);
  line-height: 1.3;
}
body.tac h1, body.tac h2 { text-wrap: balance; }
body.tac h3, body.tac h4, body.tac h5, body.tac h6 { text-wrap: pretty; }
body.tac input[type="checkbox"], body.tac input[type="radio"] { accent-color: var(--tac-blue); }
.tac-num { font-variant-numeric: tabular-nums; }
.tac-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tac-ic { flex-shrink: 0; display: inline-block; vertical-align: middle; }

.tac-shell { min-height: var(--tac-vh, 100vh); display: flex; flex-direction: column; }
.tac-shell > main { flex: 1 0 auto; }

/* ---------- Header / navigation ---------- */
.tac-header { background: var(--tac-navy); position: sticky; top: 0; z-index: 40; }
.tac-nav {
  max-width: 1248px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
body.tac a.tac-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #FFFFFF; }
.tac-brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--tac-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tac-display); font-weight: 800; font-size: 20px; color: var(--tac-navy);
}
.tac-brand-name { font-family: var(--tac-display); font-weight: 700; font-size: 20px; letter-spacing: 0.5px; }
.tac-brand-name span { color: var(--tac-accent); }
.tac-nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, 0.12); color: #FFFFFF; align-items: center; justify-content: center; cursor: pointer;
}
.tac-nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
body.tac .tac-nav-link {
  color: #FFFFFF; text-decoration: none; padding: 10px 14px; border-radius: 10px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font: inherit; font-weight: 500;
  cursor: pointer; transition: background-color .2s var(--tac-ease);
}
body.tac .tac-nav-link:hover, body.tac .tac-nav-link:focus, body.tac .tac-nav-link.is-on { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
.tac-dd { position: relative; }
.tac-dd .tac-ic { transition: transform .25s var(--tac-ease); }
.tac-dd.is-open .tac-nav-link .tac-ic { transform: rotate(180deg); }
.tac-dd-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 320px; margin: 0; list-style: none;
  background: #FFFFFF; border-radius: 14px; padding: 8px; box-shadow: 0 16px 40px rgba(10, 42, 130, 0.25); z-index: 50;
}
.tac-dd.is-open .tac-dd-menu { display: block; }
@media (hover: hover) { .tac-dd:hover .tac-dd-menu { display: block; } .tac-dd:hover::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } }
body.tac .tac-dd-menu a {
  display: flex; min-height: 44px; align-items: center; padding: 0 14px; border-radius: 10px;
  color: var(--tac-ink); text-decoration: none; font-size: 15px;
}
body.tac .tac-dd-menu a:hover, body.tac .tac-dd-menu a:focus, body.tac .tac-dd-menu a.is-on { background: var(--tac-tint); color: var(--tac-navy); }
body.tac .tac-nav-cta {
  margin-left: 8px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--tac-accent); color: var(--tac-navy); font-weight: 600; text-decoration: none;
  transition: background-color .2s var(--tac-ease);
}
body.tac .tac-nav-cta:hover, body.tac .tac-nav-cta:focus { background: var(--tac-accent-hover); color: var(--tac-navy); }
.tac-user { margin-left: 8px; display: inline-flex; align-items: center; gap: 8px; color: #FFFFFF; font-size: 14px; }
body.tac .tac-nav-link.tac-user { padding: 4px 10px 4px 4px; font-size: 14px; }
.tac-user-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tac-dd--end .tac-dd-menu { left: auto; right: 0; min-width: 220px; }
body.tac .tac-dd-menu a .tac-ic { color: var(--tac-blue); }
.tac-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.18);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; text-transform: uppercase;
}

@media (max-width: 860px) {
  .tac-nav-toggle { display: inline-flex; }
  .tac-nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 8px; }
  .tac-header.is-open .tac-nav-links { display: flex; }
  body.tac .tac-nav-link { width: 100%; min-height: 44px; justify-content: space-between; }
  .tac-dd-menu { position: static; min-width: 0; box-shadow: none; margin-top: 4px; }
  @media (hover: hover) { .tac-dd:hover .tac-dd-menu { display: none; } .tac-dd.is-open:hover .tac-dd-menu { display: block; } }
  body.tac .tac-nav-cta, .tac-user { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Page scaffold ---------- */
.tac-main { max-width: 1248px; margin: 0 auto; padding: 28px 24px 72px; display: flex; flex-direction: column; gap: 32px; width: 100%; box-sizing: border-box; }
.tac-main--tight { gap: 28px; }
.tac-main--app { padding-top: 36px; gap: 28px; }
.tac-banner { display: block; width: 100%; height: auto; border-radius: 20px; }
.tac-page-head { display: flex; flex-direction: column; gap: 8px; }
body.tac .tac-page-head h1 { margin: 0; font-weight: 700; font-size: 32px; }
.tac-page-head p { margin: 0; font-size: 17px; color: var(--tac-muted); max-width: 72ch; }
.tac-card { background: var(--tac-surface); border: 1px solid var(--tac-line); border-radius: 20px; padding: 28px; }
.tac-card--flush { padding: 0; overflow: hidden; }
.tac-stack { display: flex; flex-direction: column; gap: 16px; }
.tac-stack-lg { display: flex; flex-direction: column; gap: 24px; }
body.tac .tac-h2 { margin: 0; font-weight: 600; font-size: 22px; color: var(--tac-navy); }
body.tac .tac-h3 { margin: 0; font-weight: 600; font-size: 18px; color: var(--tac-navy); }
.tac-muted { color: var(--tac-muted); }
.tac-divider { height: 1px; background: var(--tac-line-2); border: 0; margin: 0; }
.tac-two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.tac-aside { display: flex; flex-direction: column; gap: 16px; }
.tac-aside--sticky { position: sticky; top: 88px; }
@media (max-width: 900px) { .tac-two { grid-template-columns: minmax(0, 1fr); } .tac-aside--sticky { position: static; } }
@media (max-width: 600px) { .tac-card { padding: 20px; } body.tac .tac-page-head h1 { font-size: 26px; } }

/* ---------- Buttons ---------- */
body.tac .tac-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 12px; border: 1.5px solid transparent; font-family: inherit; font-weight: 600; font-size: 16px;
  line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--tac-ease), border-color .2s var(--tac-ease), color .2s var(--tac-ease);
}
body.tac .tac-btn[disabled], body.tac .tac-btn.is-disabled { opacity: .55; cursor: not-allowed; }
body.tac .tac-btn--lg { min-height: 52px; padding: 0 26px; font-family: var(--tac-display); font-size: 17px; }
body.tac .tac-btn--block { display: flex; width: 100%; }
body.tac .tac-btn--accent { background: var(--tac-accent); color: var(--tac-navy); }
body.tac .tac-btn--accent:hover, body.tac .tac-btn--accent:focus { background: var(--tac-accent-hover); color: var(--tac-navy); }
body.tac .tac-btn--blue { background: var(--tac-blue); color: #FFFFFF; }
body.tac .tac-btn--blue:hover, body.tac .tac-btn--blue:focus { background: var(--tac-navy); color: #FFFFFF; }
body.tac .tac-btn--line { background: #FFFFFF; border-color: var(--tac-input); color: var(--tac-ink); }
body.tac .tac-btn--line:hover, body.tac .tac-btn--line:focus { border-color: var(--tac-blue); color: var(--tac-blue); }
body.tac .tac-btn--ghost { border: 2px solid rgba(255, 255, 255, 0.7); color: #FFFFFF; background: transparent; font-weight: 500; }
body.tac .tac-btn--ghost:hover, body.tac .tac-btn--ghost:focus { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }

/* ---------- Badges ---------- */
.tac-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.tac-badge--pdf, .tac-badge--warn { background: var(--tac-warm-chip); color: var(--tac-warm-ink); }
.tac-badge--jpg, .tac-badge--info { background: #E6F0FF; color: #0A3FA8; }
.tac-badge--ok { background: var(--tac-ok-bg); color: var(--tac-ok); }
.tac-badge--err { background: var(--tac-err-bg); color: var(--tac-err); }
.tac-badge--lg { padding: 6px 14px; font-size: 14px; }

/* ---------- Notices ---------- */
.tac-note { background: var(--tac-warm); border: 1px solid var(--tac-warm-line); border-radius: 16px; padding: 18px 20px; display: flex; gap: 12px; color: var(--tac-warm-text); }
.tac-note .tac-ic { color: var(--tac-warm-ink); margin-top: 3px; }
.tac-note p, .tac-note ul, .tac-note ol { margin: 0; font-size: 15px; line-height: 1.7; }
.tac-note ol, .tac-note ul { padding-left: 20px; }
.tac-note strong { color: var(--tac-warm-ink); }
.tac-note--info { background: var(--tac-tint); border-color: #C9DBFB; color: var(--tac-ink); }
.tac-note--info .tac-ic, .tac-note--info strong { color: var(--tac-navy); }

/* ---------- Forms ---------- */
body.tac label, body.tac .col-form-label { font-size: 15px; font-weight: 600; color: var(--tac-ink); margin-bottom: 6px; }
.tac-field { display: flex; flex-direction: column; gap: 6px; }
.tac-field label { margin: 0; }
.tac-hint { font-size: 13px; color: var(--tac-muted); font-weight: 400; }
.tac-req { color: var(--tac-err); }
body.tac .form-control, body.tac .tac-input {
  display: block; width: 100%; height: 48px; box-sizing: border-box; padding: 0 14px;
  border-radius: 12px; border: 1.5px solid var(--tac-input); background: #FFFFFF; color: var(--tac-ink);
  font-family: inherit; font-size: 16px; line-height: 1.4; box-shadow: none;
  transition: border-color .2s var(--tac-ease), box-shadow .2s var(--tac-ease);
}
body.tac textarea.form-control { height: auto; min-height: 96px; padding: 12px 14px; }
body.tac select.form-control { padding-right: 36px; }
body.tac input[type="file"].form-control { height: auto; min-height: 48px; padding: 10px 12px; font-size: 15px; }
body.tac .form-control::placeholder, body.tac .tac-input::placeholder { color: #6B7895; }
body.tac .form-control:focus, body.tac .tac-input:focus { outline: none; border-color: var(--tac-blue); box-shadow: var(--tac-ring); }
body.tac .form-control.error, body.tac .input-validation-error { border-color: var(--tac-err); }
body.tac .form-control.error:focus { box-shadow: 0 0 0 4px rgba(163, 38, 42, 0.18); }
body.tac label.error, body.tac span.error, body.tac .error { color: var(--tac-err); font-weight: 500; }
body.tac label.error { display: block; margin: 6px 0 0; font-size: 14px; }
body.tac .form-group { margin-bottom: 18px; }

/* ---------- Loader ---------- */
.loader { display: none; position: fixed; inset: 0; z-index: 99999; }
.loader:before { content: ''; position: fixed; inset: 0; background: rgba(243, 247, 255, 0.72); }
.loader:after {
  content: ''; position: fixed; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; border: 6px solid var(--tac-tint); border-top-color: var(--tac-blue); animation: tac-spin 0.9s linear infinite;
}
@keyframes tac-spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.tac-footer { background: var(--tac-navy); color: var(--tac-on-navy); }
.tac-footer-in { max-width: 1248px; margin: 0 auto; padding: 28px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.tac-footer-in--home { padding: 32px 24px; gap: 16px; }
.tac-footer-org { display: flex; flex-direction: column; gap: 4px; }
.tac-footer-org b { font-family: var(--tac-display); font-weight: 600; font-size: 17px; color: #FFFFFF; }

/* =====================================================================
   Home
   ===================================================================== */
.tac-hero { background: var(--tac-blue); padding: 0 0 72px; }
.tac-hero-banner { max-width: 1440px; margin: 0 auto; }
.tac-hero-banner img { display: block; width: 100%; height: auto; }
.tac-hero-grid {
  max-width: 1248px; margin: 0 auto; padding: 48px 24px 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; align-items: center;
}
.tac-hero-copy { display: flex; flex-direction: column; gap: 16px; }
.tac-pill-on-blue { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #FFFFFF; font-size: 14px; font-weight: 500; }
.tac-eyebrow { font-family: var(--tac-display); font-weight: 600; font-size: 14px; letter-spacing: 1px; color: var(--tac-warm-ink-2); }
body.tac .tac-hero-copy h1 { text-wrap: wrap; }
body.tac .tac-hero-copy h1 { margin: 0; font-weight: 700; font-size: 42px; line-height: 1.25; color: #FFFFFF; }
.tac-hero-copy p { margin: 0; font-size: 18px; line-height: 1.7; color: var(--tac-on-blue); max-width: 60ch; }
.tac-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.tac-hero-actions .tac-btn { border-radius: 14px; }
.tac-event {
  background: #FFFFFF; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 20px 50px rgba(10, 42, 130, 0.35);
  animation: tac-rise .9s var(--tac-ease) both;
}
@keyframes tac-rise { from { transform: translateY(18px); box-shadow: 0 4px 12px rgba(10, 42, 130, 0.2); } to { transform: none; } }
.tac-event-date { display: flex; align-items: center; gap: 18px; }
.tac-cal { width: 92px; flex-shrink: 0; border-radius: 16px; background: var(--tac-tint); padding: 10px 0; text-align: center; font-size: 13px; color: var(--tac-ink-2); font-weight: 500; }
.tac-cal b { display: block; font-family: var(--tac-display); font-weight: 800; font-size: 40px; line-height: 1.1; color: var(--tac-blue); }
.tac-event-label { font-size: 14px; color: var(--tac-muted); }
.tac-event-value { font-family: var(--tac-display); font-weight: 600; font-size: 22px; color: var(--tac-ink); }
.tac-event-row { display: flex; gap: 14px; align-items: flex-start; }
.tac-event-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--tac-blue); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.tac-event-row strong { display: block; font-weight: 600; font-size: 18px; line-height: 1.6; }
.tac-event-row strong.tac-sm { font-size: 17px; }

.tac-section { max-width: 1248px; margin: 0 auto; padding: 72px 24px 24px; box-sizing: border-box; width: 100%; }
.tac-section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
body.tac .tac-section-head h2 { margin: 0; font-weight: 700; font-size: 32px; }
.tac-section-head p { margin: 0; font-size: 17px; color: var(--tac-muted); }
.tac-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
@media (max-width: 960px) and (min-width: 601px) { .tac-docs { grid-template-columns: 1fr 1fr; } }
body.tac a.tac-doc {
  display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 20px; background: #FFFFFF;
  border: 1px solid var(--tac-line); text-decoration: none; color: var(--tac-ink);
  transition: border-color .2s var(--tac-ease), box-shadow .25s var(--tac-ease), transform .25s var(--tac-ease);
}
body.tac a.tac-doc:hover, body.tac a.tac-doc:focus { border-color: var(--tac-blue); box-shadow: 0 10px 28px rgba(11, 91, 234, 0.14); transform: translateY(-2px); color: var(--tac-ink); }
.tac-doc-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--tac-tint); color: var(--tac-blue); display: flex; align-items: center; justify-content: center; }
.tac-doc-title { font-family: var(--tac-display); font-weight: 600; font-size: 18px; line-height: 1.5; flex: 1; }
.tac-doc-foot { display: flex; justify-content: space-between; align-items: center; }
.tac-doc-go { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--tac-blue); }

.tac-howto { background: #FFFFFF; border-radius: 28px; padding: 40px; border: 1px solid var(--tac-line); }
.tac-howto-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
body.tac .tac-howto-head h2 { margin: 0; font-weight: 700; font-size: 32px; }
.tac-howto ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.tac-howto li { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 20px; background: var(--tac-bg); }
.tac-howto li.is-final { background: var(--tac-warm); }
.tac-howto-num { width: 48px; height: 48px; border-radius: 50%; background: var(--tac-blue); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-family: var(--tac-display); font-weight: 700; font-size: 20px; }
.tac-howto li.is-final .tac-howto-num { background: var(--tac-accent); color: var(--tac-navy); }
body.tac .tac-howto h3 { margin: 0; font-family: var(--tac-font); font-size: 17px; font-weight: 500; line-height: 1.7; color: var(--tac-ink); }
.tac-howto h3 small { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--tac-muted); }
@media (max-width: 600px) { .tac-howto { padding: 24px; border-radius: 20px; } body.tac .tac-hero-copy h1 { font-size: 30px; } body.tac .tac-section-head h2, body.tac .tac-howto-head h2 { font-size: 26px; } .tac-section { padding-top: 48px; } }

.tac-quick-wrap { padding-top: 8px; padding-bottom: 80px; }
body.tac .tac-quick-wrap h2 { margin: 0 0 20px; font-weight: 700; font-size: 24px; }
.tac-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
body.tac a.tac-quick-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; padding: 12px 20px; line-height: 1.45;
  border-radius: 16px; background: #FFFFFF; border: 1px solid var(--tac-line); color: var(--tac-ink); font-weight: 600; text-decoration: none;
  transition: background-color .2s var(--tac-ease), color .2s var(--tac-ease);
}
body.tac a.tac-quick-link:hover, body.tac a.tac-quick-link:focus { background: var(--tac-blue); color: #FFFFFF; border-color: var(--tac-blue); }

/* =====================================================================
   Auth (login / reset / change password)
   ===================================================================== */
.tac-auth {
  width: 100%; max-width: 460px; margin: 0 auto; background: #FFFFFF; border-radius: 24px; padding: 40px; box-sizing: border-box;
  box-shadow: 0 20px 50px rgba(10, 42, 130, 0.10); display: flex; flex-direction: column; gap: 26px;
}
.tac-auth-head { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.tac-auth-icon { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 16px; background: var(--tac-tint); color: var(--tac-blue); display: flex; align-items: center; justify-content: center; }
body.tac .tac-auth-head h1 { margin: 0; font-weight: 700; font-size: 28px; }
.tac-auth-head p { margin: 0; font-size: 15px; color: var(--tac-muted); }
.tac-auth form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.tac-auth .form-group { margin: 0; }
.tac-auth-foot { margin: 0; text-align: center; font-size: 15px; color: var(--tac-muted); }
.tac-auth-foot a { font-weight: 600; }
.tac-captcha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.tac-captcha img { border-radius: 8px; border: 1px solid var(--tac-line); }
.tac-icon-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--tac-line); background: #FFFFFF; color: var(--tac-ink-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.tac-icon-btn:hover, .tac-icon-btn:focus { border-color: var(--tac-blue); color: var(--tac-blue); }
.tac-auth-state { text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.tac-auth-state .tac-auth-icon { margin: 0; }
.tac-auth-state--ok .tac-auth-icon { background: var(--tac-ok-bg); color: var(--tac-ok); }
.tac-auth-state--err .tac-auth-icon { background: var(--tac-err-bg); color: var(--tac-err); }
@media (max-width: 520px) { .tac-auth { padding: 28px 22px; } }

/* =====================================================================
   Content pages
   ===================================================================== */
/* Schedule */
.tac-sched-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 16px 8px; border-top: 1px solid var(--tac-line-2); align-items: start; }
.tac-sched-row:first-child { border-top: none; }
.tac-sched-row.is-break { background: var(--tac-warm); border-radius: 12px; border-top-color: transparent; }
.tac-sched-row.is-break + .tac-sched-row { border-top-color: transparent; }
.tac-time { font-family: var(--tac-display); font-weight: 600; color: var(--tac-blue); font-size: 16px; font-variant-numeric: tabular-nums; }
.tac-sched-row.is-break .tac-time { color: var(--tac-warm-ink); }
@media (max-width: 700px) { .tac-sched-row { grid-template-columns: 1fr; gap: 4px; } }
.tac-card-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Download list */
.tac-dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
body.tac a.tac-dl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 18px;
  border: 1px solid var(--tac-line); border-radius: 14px; background: #FFFFFF; color: var(--tac-ink); text-decoration: none; font-weight: 500;
}
body.tac a.tac-dl:hover, body.tac a.tac-dl:focus { border-color: var(--tac-blue); background: var(--tac-tint-2); color: var(--tac-ink); }
body.tac a.tac-dl.is-latest { border-color: var(--tac-blue); background: var(--tac-tint); }
.tac-dl b { font-weight: 600; color: var(--tac-navy); }
.tac-dl-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--tac-blue); font-size: 14px; }
@media (max-width: 400px) { .tac-dl-grid { grid-template-columns: 1fr; } }

/* News */
body.tac .tac-year { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-weight: 700; font-size: 22px; color: var(--tac-navy); }
.tac-year:before { content: ""; width: 6px; height: 26px; border-radius: 3px; background: var(--tac-accent); }
.tac-news-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 210px; gap: 16px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--tac-line-2); font-size: 15px; line-height: 1.6; }
.tac-news-row:first-child { border-top: none; }
.tac-news-row:hover { background: var(--tac-tint-2); }
.tac-news-date { font-size: 14px; color: var(--tac-muted); font-variant-numeric: tabular-nums; }
body.tac .tac-src {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--tac-input); background: #FFFFFF; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--tac-blue); justify-self: start;
}
body.tac a.tac-src:hover, body.tac a.tac-src:focus { border-color: var(--tac-blue); background: var(--tac-tint); }
body.tac .tac-src.is-pdf { color: var(--tac-warm-ink); border-color: var(--tac-warm-line); background: var(--tac-warm); }
body.tac .tac-src.is-none { color: var(--tac-muted); border-style: dashed; }
@media (max-width: 800px) { .tac-news-row { grid-template-columns: 1fr; gap: 6px; } }

/* Competition results */
.tac-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 420px) { .tac-result-grid { grid-template-columns: 1fr; } }
.tac-yc { background: #FFFFFF; border: 1px solid var(--tac-line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
body.tac .tac-yh { margin: 0; background: var(--tac-blue); color: #FFFFFF; padding: 14px 20px; font-weight: 600; font-size: 17px; }
.tac-rk { display: grid; grid-template-columns: 128px 1fr; gap: 10px; padding: 11px 20px; border-top: 1px solid var(--tac-line-2); font-size: 14px; line-height: 1.55; }
.tac-rk:first-of-type { border-top: none; }
.tac-rk > b { font-weight: 600; color: var(--tac-warm-ink); }
.tac-rk.is-win { background: var(--tac-warm); }
.tac-rk.is-win > b { color: var(--tac-warm-ink-2); }
.tac-rk-inst + .tac-rk-inst { margin-top: 6px; }
.tac-rk details { margin-top: 2px; }
.tac-rk summary { cursor: pointer; font-size: 13px; color: var(--tac-blue); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.tac-rk summary::-webkit-details-marker { display: none; }
.tac-rk summary .tac-ic { transition: transform .2s var(--tac-ease); }
.tac-rk details[open] summary .tac-ic { transform: rotate(90deg); }
.tac-rk details ul { margin: 6px 0 0; padding: 0; list-style: none; color: var(--tac-muted); font-size: 13px; }
.tac-lk { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--tac-line-2); margin-top: auto; }
body.tac .tac-lk a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; line-height: 1.4; border-radius: 10px; border: 1px solid var(--tac-input); font-size: 13px; font-weight: 600; text-decoration: none; }
body.tac .tac-lk a:hover, body.tac .tac-lk a:focus { border-color: var(--tac-blue); background: var(--tac-tint); }
.tac-lk .tac-empty { font-size: 13px; color: var(--tac-muted); }

/* People / organiser */
.tac-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.tac-org { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.tac-org img { width: 96px; height: 96px; object-fit: contain; border-radius: 50%; background: var(--tac-tint); padding: 8px; box-sizing: border-box; }
body.tac .tac-org h2 { margin: 0; font-weight: 600; font-size: 22px; }
.tac-org p { margin: 4px 0 0; color: var(--tac-muted); }

/* Sponsor */
.tac-sponsor img { display: block; width: 100%; height: auto; border-radius: 12px; }

/* Data table (announce list etc.) */
.tac-table-wrap { overflow-x: auto; }
body.tac table.tac-table { width: 100%; border-collapse: collapse; margin: 0; background: #FFFFFF; }
body.tac .tac-table th { padding: 14px 16px; text-align: left; font-size: 13px; font-weight: 600; color: var(--tac-muted); background: var(--tac-bg); white-space: nowrap; border: 0; }
body.tac .tac-table td { padding: 14px 16px; border-top: 1px solid var(--tac-line-2); font-size: 15px; vertical-align: top; }
body.tac .tac-table tbody tr:hover td { background: var(--tac-tint-2); }
.tac-member-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.tac-member-list .is-teacher { color: var(--tac-warm-ink); font-weight: 600; }
.dataTables_wrapper .dataTables_filter { padding: 16px 20px 0; }
.dataTables_wrapper .dataTables_filter input { height: 40px; border-radius: 10px; border: 1.5px solid var(--tac-input); padding: 0 12px; margin-left: 8px; }
.dataTables_wrapper .dataTables_info { padding: 14px 20px; color: var(--tac-muted); font-size: 14px; }

/* 404 */
.tac-empty-state { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 24px; }
body.tac .tac-empty-state h1 { margin: 0; font-size: 64px; font-weight: 800; color: var(--tac-blue); line-height: 1; }
.tac-empty-state p { margin: 0; font-size: 18px; color: var(--tac-muted); }

/* =====================================================================
   Applicant area (dashboard / print / upload)
   ===================================================================== */
.tac-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tac-steps li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--tac-line); color: var(--tac-muted); font-size: 15px; font-weight: 600; }
.tac-step-dot { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--tac-tint); color: var(--tac-navy); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tac-steps li.is-done { background: var(--tac-ok-bg); border-color: transparent; color: var(--tac-ok); }
.tac-steps li.is-done .tac-step-dot { background: var(--tac-ok); color: #FFFFFF; }
.tac-steps li.is-current { background: var(--tac-blue); border-color: transparent; color: #FFFFFF; }
.tac-steps li.is-current .tac-step-dot { background: #FFFFFF; color: var(--tac-navy); }

.tac-app-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
body.tac .tac-app-head h2 { margin: 0; font-weight: 600; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.tac-app-head h2 .tac-ic { color: var(--tac-blue); }
.tac-app-no { font-size: 14px; color: var(--tac-muted); }
.tac-app-no b { font-family: var(--tac-display); font-weight: 600; color: var(--tac-navy); font-size: 18px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.tac-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin: 0; }
.tac-facts div { display: flex; flex-direction: column; gap: 2px; }
.tac-facts dt { font-size: 13px; color: var(--tac-muted); font-weight: 500; }
.tac-facts dd { margin: 0; font-weight: 600; }
.tac-address { display: flex; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--tac-tint-2); border: 1px solid var(--tac-line); line-height: 1.8; }
.tac-address .tac-ic { color: var(--tac-blue); margin-top: 4px; }
.tac-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.tac-team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 420px) { .tac-team-grid { grid-template-columns: 1fr; } }
.tac-team { background: #FFFFFF; border: 1px solid var(--tac-line); border-radius: 20px; overflow: hidden; }
body.tac .tac-team-head { margin: 0; padding: 14px 20px; background: var(--tac-blue); color: #FFFFFF; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.tac-team-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.tac-person-row { padding: 12px 14px; border-radius: 14px; background: var(--tac-bg); display: flex; flex-direction: column; gap: 4px; }
.tac-person-row b { font-weight: 600; }
.tac-person-row span { font-size: 14px; color: var(--tac-muted); }
.tac-person-row.is-teacher { background: var(--tac-warm); }
.tac-person-row.is-teacher .tac-role { color: var(--tac-warm-ink); }
.tac-role { font-size: 13px; font-weight: 600; color: var(--tac-blue); }
.tac-person-row .tac-drop { margin-top: 8px; }

/* Drop zone (file input) */
.tac-drop {
  position: relative; border: 2px dashed var(--tac-dash); border-radius: 16px; background: var(--tac-tint-2);
  padding: 20px 24px; display: flex; align-items: center; gap: 16px; cursor: pointer; margin: 0;
  transition: border-color .2s var(--tac-ease), background-color .2s var(--tac-ease);
}
.tac-drop:hover, .tac-drop:focus-within, .tac-drop.is-dragover { border-color: var(--tac-blue); background: var(--tac-tint); }
.tac-drop.has-file { border-style: solid; border-color: #9BD3B5; background: var(--tac-ok-bg); }
.tac-drop.has-error { border-color: var(--tac-err); background: #FFF7F7; }
.tac-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tac-drop-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--tac-tint); color: var(--tac-blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tac-drop.has-file .tac-drop-icon { background: #FFFFFF; color: var(--tac-ok); }
.tac-drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tac-drop-text b { font-weight: 600; overflow-wrap: anywhere; }
.tac-drop-text span { font-size: 14px; color: var(--tac-muted); font-weight: 400; }
.tac-drop-field label.error { margin-top: 6px; }
.tac-upload-item { display: flex; flex-direction: column; gap: 8px; }
.tac-upload-item > .tac-label { font-weight: 600; font-size: 16px; }

/* Application sheet (print preview) */
.tac-sheet { background: #FFFFFF; border: 1px solid var(--tac-input); border-radius: 4px; box-shadow: 0 10px 30px rgba(10, 42, 130, 0.10); padding: 40px 44px; display: flex; flex-direction: column; gap: 22px; color: var(--tac-ink); }
.tac-sheet-head { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid var(--tac-navy); padding-bottom: 16px; }
.tac-sheet-head img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.tac-sheet-head div { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tac-sheet-head b { font-family: var(--tac-display); font-size: 18px; color: var(--tac-navy); }
.tac-sheet-head span { font-size: 15px; }
.tac-sheet-head small { font-size: 13px; color: var(--tac-muted); }
.tac-sheet-no { text-align: right; font-size: 13px; color: var(--tac-muted); white-space: nowrap; }
.tac-sheet-head > div:not(.tac-sheet-no) { flex: 1 1 0; min-width: 0; gap: 4px; }
.tac-sheet-head > .tac-sheet-no { flex: 0 0 auto; gap: 0; }
.tac-sheet-head span, .tac-sheet-head small { text-wrap: balance; line-height: 1.5; }
.tac-sheet-head small { display: flex; flex-wrap: wrap; column-gap: 8px; }
.tac-sheet-head small > i { font-style: normal; white-space: nowrap; }
.tac-sheet-no b { display: block; font-size: 15px; color: var(--tac-ink); font-family: var(--tac-font); font-variant-numeric: tabular-nums; }
.tac-sheet-sec { display: flex; flex-direction: column; gap: 8px; }
.tac-sheet-sec > b { font-size: 15px; }
.tac-sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.tac-sheet-grid .is-wide { grid-column: 1 / -1; }
.tac-sheet-grid span { font-size: 13px; color: var(--tac-muted); }
.tac-line { border-bottom: 1px dotted #8A97B5; min-height: 24px; padding: 2px 4px; }
.tac-sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tac-sheet th, .tac-sheet td { border: 1px solid var(--tac-input); padding: 8px; text-align: left; vertical-align: top; }
.tac-sheet th { background: var(--tac-bg); font-weight: 600; }
.tac-sign { display: flex; justify-content: flex-end; padding-top: 24px; }
.tac-sign div { width: 280px; text-align: center; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.tac-sign-line { border-bottom: 1px dotted #8A97B5; height: 44px; }
@media (max-width: 700px) {
  .tac-sheet { padding: 20px 14px; gap: 18px; }
  .tac-sheet-grid { grid-template-columns: 1fr; }
  .tac-sheet-head { flex-wrap: wrap; }
  .tac-sheet-head img { width: 48px; height: 48px; }
  .tac-sheet-head div { flex: 1 1 200px; }
  .tac-sheet-no { flex: 1 1 100%; text-align: left; display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: baseline; }
  .tac-sheet-no b { display: inline; }
  .tac-sheet table { min-width: 560px; }
  .tac-card:has(> .tac-sheet) { padding: 10px; }
}
@media (max-width: 600px) {
  .tac-steps { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tac-steps li { padding: 10px 12px; gap: 8px; font-size: 13px; line-height: 1.35; }
  .tac-step-dot { width: 26px; height: 26px; font-size: 13px; }
  .tac-drop { padding: 14px; gap: 12px; }
  .tac-drop-icon { width: 40px; height: 40px; }
  .tac-actions .tac-btn { flex: 1 1 100%; }
}
@media print { .tac-sheet table { min-width: 0; } }

/* =====================================================================
   Register (multi-step form) — restyles the existing msf markup
   ===================================================================== */
.tac-register .msf { margin: 0; }
.tac-register .msf-header { margin: 0; padding: 0; color: inherit; }
.tac-register .msf-header > .row { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; counter-reset: tacstep; }
.tac-register .msf-header > .row:before, .tac-register .msf-header > .row:after { display: none; }
.tac-register .msf-step {
  float: none; width: auto; padding: 14px 16px; border-radius: 14px; background: var(--tac-bg); color: var(--tac-muted);
  display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; text-align: left; counter-increment: tacstep;
}
.tac-register .msf-step:before {
  content: counter(tacstep); width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--tac-line); color: var(--tac-navy);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.tac-register .msf-header .msf-step i.fa { display: none; }
.tac-register .msf-step.msf-step-active { background: var(--tac-blue); color: #FFFFFF; }
.tac-register .msf-step.msf-step-active:before { background: #FFFFFF; color: var(--tac-navy); }
.tac-register .msf-step.msf-step-complete { background: var(--tac-ok-bg); color: var(--tac-ok); }
.tac-register .msf-step.msf-step-complete:before { content: "\2713"; background: var(--tac-ok); color: #FFFFFF; }
.tac-progress { display: flex; align-items: center; gap: 14px; }
.tac-register .progress { flex: 1; height: 10px; margin: 0; border-radius: 999px; background: var(--tac-line-2); box-shadow: none; }
.tac-register .progress-bar { min-width: 4%; border-radius: 999px; background: var(--tac-blue); background-image: none !important; box-shadow: none; transition: width .5s var(--tac-ease); }
.tac-progress-label { font-size: 14px; font-weight: 600; color: var(--tac-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tac-register .msf-content { margin-top: 28px; }
.msf-view { display: none; }
.tac-register .msf-view { background: #FFFFFF; border: 1px solid var(--tac-line); border-radius: 20px; padding: 28px 28px 10px; }
/* The design lays every field of a step out on one responsive grid.
   multi-step-form.js shows a step with an inline "display: block", so the
   visible step is switched to grid with !important. */
.tac-register .msf-view[style*="display: block"], .tac-register .msf-view[style*="display:block"],
.tac-register .team {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 16px; align-items: end;
}
.tac-register #team2[style*="display: none"], .tac-register #team2[style*="display:none"] { display: none !important; }
.tac-register .msf-view .form-row { display: contents; }
.tac-register .msf-view .clearfix { display: none; }
.tac-register .msf-view [class*="col-md-"] { float: none; width: auto; min-width: 0; padding: 0; }
.tac-register .msf-view .col-md-12, .tac-register .msf-view > .form-group.alert, .tac-register .team,
.tac-register .tac-sec-t, .tac-register .team h2 { grid-column: 1 / -1; }
body.tac .tac-register .tac-sec-t { margin: 0 0 18px; font-weight: 600; font-size: 20px; color: var(--tac-navy); }
.tac-register .col-form-label .tac-hint { display: block; margin-top: 2px; }
.tac-register .msf-view > .form-group.alert {
  float: none; width: auto; margin: 0 0 24px; padding: 16px 20px; border: 0; border-radius: 14px; background: var(--tac-tint);
  color: var(--tac-ink); font-size: 17px !important; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.tac-register .msf-view > .form-group.alert .col-form-label { margin: 0; font-size: 16px; }
.tac-register .radio-inline { font-weight: 500; font-size: 16px; padding-left: 26px; margin: 0; min-height: 32px; display: inline-flex; align-items: center; }
.tac-register .radio-inline input[type="radio"] { width: 18px; height: 18px; margin: 0 0 0 -26px; position: relative; }
.tac-register .team { margin: 4px 0 18px; padding: 22px 22px 6px; border-radius: 18px; background: var(--tac-tint); }
.tac-register #team1, .tac-register #team2 { background: var(--tac-tint); }
.tac-register .team h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.tac-register .team h5 { margin: 12px 0 14px; padding: 10px 14px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--tac-line); font-size: 16px; font-weight: 600; color: var(--tac-blue); }
.tac-register .team h5 u { text-decoration: none; }
.tac-register .team h5.tac-sub-teacher { background: var(--tac-warm); border-color: var(--tac-warm-line); color: var(--tac-warm-ink); }
.tac-register .msf-navigation { margin-top: 28px !important; }
.tac-register .msf-navigation > .row { margin: 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tac-register .msf-navigation > .row:before, .tac-register .msf-navigation > .row:after { display: none; }
.tac-register .msf-navigation [class*="col-"] { float: none; width: auto; padding: 0; margin: 0; }
.tac-register .msf-navigation [class*="col-"]:last-child { margin-left: auto; }
.msf-nav-button { display: none; }
.tac-register .msf-nav-button { min-height: 52px; padding: 0 26px; border-radius: 12px; font-family: inherit; font-weight: 600; font-size: 16px; border: 1.5px solid transparent; box-shadow: none; text-shadow: none; background-image: none; }
.tac-register .msf-nav-button .fa { font-size: 13px; }
.tac-register .msf-nav-button[data-type="back"] { background: #FFFFFF; border-color: var(--tac-input); color: var(--tac-ink); }
.tac-register .msf-nav-button[data-type="back"]:hover, .tac-register .msf-nav-button[data-type="back"]:focus { border-color: var(--tac-blue); color: var(--tac-blue); background: #FFFFFF; }
.tac-register .msf-nav-button[data-type="next"], .tac-register .msf-nav-button[data-type="submit"] { background: var(--tac-accent); color: var(--tac-navy); font-family: var(--tac-display); font-weight: 700; font-size: 17px; }
.tac-register .msf-nav-button[data-type="next"]:hover, .tac-register .msf-nav-button[data-type="next"]:focus,
.tac-register .msf-nav-button[data-type="submit"]:hover, .tac-register .msf-nav-button[data-type="submit"]:focus { background: var(--tac-accent-hover); color: var(--tac-navy); }
@media (max-width: 600px) {
  .tac-register .msf-view { padding: 20px 16px 4px; }
  .tac-register .msf-view[style*="display: block"], .tac-register .msf-view[style*="display:block"], .tac-register .team { grid-template-columns: 1fr; }
  .tac-register .team { padding: 16px 14px 4px; }
  .tac-register .msf-step { padding: 12px 14px; font-size: 15px; }
  .tac-progress { flex-wrap: wrap; gap: 8px; }
  .tac-register .msf-navigation [class*="col-"], .tac-register .msf-nav-button { width: 100%; }
}

/* =====================================================================
   Added pages (FAQ, contact, schedule, news detail, results by year,
   gallery, qualified teams, search, status, policies, error pages)
   ===================================================================== */
.tac-crumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--tac-muted); }
.tac-crumb li + li:before { content: "/"; margin-right: 6px; color: var(--tac-input); }
body.tac .tac-crumb a { color: var(--tac-muted); text-decoration: none; }
body.tac .tac-crumb a:hover { color: var(--tac-blue); }

/* Flash / alerts */
.tac-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; font-size: 15px; line-height: 1.6; }
.tac-alert .tac-ic { margin-top: 2px; }
.tac-alert--ok { background: var(--tac-ok-bg); color: var(--tac-ok); }
.tac-alert--err { background: var(--tac-err-bg); color: var(--tac-err); }
.tac-alert--info { background: var(--tac-tint); color: var(--tac-navy); }

/* Toolbar (search + filters above lists) */
.tac-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.tac-toolbar .tac-input-icon { flex: 1 1 280px; max-width: 420px; }
.tac-toolbar select.tac-input { width: auto; min-width: 170px; flex: 0 1 220px; }
.tac-toolbar-count { margin-left: auto; font-size: 14px; color: var(--tac-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .tac-toolbar .tac-input-icon, .tac-toolbar select.tac-input { max-width: none; flex: 1 1 100%; } .tac-toolbar-count { margin-left: 0; } }

/* Qualified teams list: stats, search + province + export menu, accordion rows (design "รายชื่อทีมที่ผ่าน") */
.tac-qstats { display: flex; align-items: center; gap: 28px; padding: 4px; flex-wrap: wrap; }
.tac-qstats > div { display: flex; align-items: baseline; gap: 8px; }
.tac-qstats b { font-size: 30px; font-weight: 700; color: var(--tac-blue); line-height: 1; }
.tac-qstats span { font-size: 15px; color: var(--tac-muted); }
.tac-qstats i { width: 1px; height: 24px; background: var(--tac-line); }
.tac-qlist.tac-card--flush { overflow: visible; border-radius: 24px; }
.tac-qbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 20px 24px; }
.tac-qsearch { flex: 1 1 280px; min-width: 240px; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--tac-input); background: var(--tac-bg); color: #8593AD; transition: border-color .2s var(--tac-ease), box-shadow .2s var(--tac-ease); }
.tac-qsearch:focus-within { border-color: var(--tac-blue); box-shadow: 0 0 0 3px rgba(11, 91, 234, .15); background: #FFFFFF; }
.tac-qsearch .tac-ic { flex: none; }
body.tac .tac-qsearch input[type="search"]:not(:disabled):not([readonly]) { background-color: transparent !important; }
body.tac .tac-qsearch input[type="search"] { flex: 1; min-width: 0; width: auto; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; outline: 0; box-shadow: none; background: transparent; -webkit-appearance: none; appearance: none; font: inherit; font-size: 15.5px; color: var(--tac-ink); }
.tac-qsearch input::placeholder { color: #8593AD; }
body.tac select.tac-qsel { flex: 0 0 auto; width: auto; min-width: 190px; height: 52px; padding: 0 46px 0 20px; border-radius: 999px; border: 1.5px solid var(--tac-input); background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234A5878' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; -webkit-appearance: none; -moz-appearance: none; appearance: none; font: inherit; font-size: 15px; color: #2B3A5C; cursor: pointer; }
body.tac select.tac-qsel:focus { outline: 0; border-color: var(--tac-blue); box-shadow: 0 0 0 3px rgba(11, 91, 234, .15); }
.tac-export { position: relative; }
.tac-export > summary { list-style: none; }
.tac-export > summary::-webkit-details-marker { display: none; }
.tac-qbtn { height: 52px; padding: 0 22px; border-radius: 999px; background: var(--tac-blue); color: #FFFFFF; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15.5px; cursor: pointer; box-shadow: 0 8px 18px rgba(11, 91, 234, .28); transition: background-color .2s var(--tac-ease); user-select: none; }
.tac-qbtn:hover { background: var(--tac-navy); }
body.tac a.tac-qbtn, body.tac a.tac-qbtn:hover { color: #FFFFFF; text-decoration: none; }
.tac-qbtn:focus-visible { outline: 3px solid rgba(11, 91, 234, .35); outline-offset: 2px; }
.tac-export[open] > .tac-qbtn { background: var(--tac-navy); }
.tac-export-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 300px; padding: 8px; border-radius: 18px; background: #FFFFFF; border: 1px solid var(--tac-line); box-shadow: 0 20px 44px rgba(11, 91, 234, .22); display: flex; flex-direction: column; gap: 2px; }
.tac-export-head { padding: 10px 12px 8px; font-weight: 600; font-size: 14.5px; color: var(--tac-navy); display: flex; flex-direction: column; }
.tac-export-head small { font-weight: 400; font-size: 12.5px; color: var(--tac-muted); }
.tac-export-menu a, .tac-export-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; font-family: inherit; text-decoration: none; color: var(--tac-ink); cursor: pointer; }
body.tac .tac-export-menu a, body.tac .tac-export-menu a:hover { color: var(--tac-ink); }
.tac-export-menu a:hover, .tac-export-menu a:focus-visible, .tac-export-menu button:hover, .tac-export-menu button:focus-visible { background: var(--tac-tint); outline: none; }
.tac-export-menu i { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--tac-tint); color: var(--tac-blue); display: flex; align-items: center; justify-content: center; font-style: normal; }
.tac-export-menu span { display: flex; flex-direction: column; }
.tac-export-menu b { font-size: 15px; font-weight: 600; }
.tac-export-menu small { font-size: 12.5px; color: var(--tac-muted); }

.tac-qtable { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tac-qtable thead th { width: auto; height: 44px; padding: 0 16px; background: #F4F8FF; border-top: 1px solid var(--tac-line-2); font-size: 13px; font-weight: 600; color: var(--tac-muted); text-align: left; }
.tac-qtable thead th:first-child { width: 96px; padding-left: 28px; }
.tac-qtable thead th:nth-child(2) { width: 118px; }
.tac-qtable thead th:nth-child(3) { width: 106px; }
.tac-qtable thead th:nth-child(5) { width: 200px; }
.tac-qtable thead th:nth-child(6) { width: 64px; padding-right: 28px; }
.tac-qr > td { height: 64px; padding: 0 16px; border-top: 1px solid var(--tac-line-2); font-size: 15.5px; color: var(--tac-ink); vertical-align: middle; }
.tac-qr > td:first-child { padding-left: 28px; }
.tac-qr > td:last-child { padding-right: 28px; }
.tac-qg:first-of-type .tac-qr > td { border-top: 1px solid var(--tac-line-2); }
.tac-qr:hover { background: #F8FAFF; }
.tac-qsq { color: var(--tac-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.tac-qno { font-weight: 600; color: var(--tac-navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tac-qtm u { text-decoration: none; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--tac-tint); color: var(--tac-blue); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tac-qin { font-weight: 500; }
.tac-qpv { color: var(--tac-muted); }
.tac-qch { text-align: center; }
.tac-qtoggle { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tac-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s var(--tac-ease), color .2s var(--tac-ease), background-color .2s var(--tac-ease); }
.tac-qtoggle:hover { background: var(--tac-tint); color: var(--tac-blue); }
.tac-qtoggle:focus-visible { outline: 3px solid rgba(11, 91, 234, .35); outline-offset: 1px; }
.tac-qg.is-open { background: #F8FAFF; }
.tac-qg.is-open .tac-qr > td { height: 60px; }
.tac-qg.is-open .tac-qtoggle { color: var(--tac-blue); transform: rotate(180deg); }
.tac-qd > td { padding: 0; }
.tac-qdt { margin: 0 28px 20px; padding: 16px 20px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--tac-line); display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.tac-qad { padding: 10px 14px; border-radius: 12px; background: var(--tac-tint); }
.tac-qad small { display: block; font-size: 12.5px; color: var(--tac-muted); margin-bottom: 4px; }
.tac-qad b { font-size: 15.5px; color: var(--tac-navy); font-weight: 600; }
.tac-qdt ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.tac-qdt li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.tac-qdt li span { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--tac-tint); color: var(--tac-blue); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
/* with JS the details start collapsed; without JS (and when printing) every team shows its names */
.tac-qlist.is-acc .tac-qd { display: none; }
.tac-qlist.is-acc .tac-qg.is-open .tac-qd { display: table-row; }
.tac-qft { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 28px; border-top: 1px solid var(--tac-line-2); font-size: 14px; color: var(--tac-muted); }
.tac-qft b { color: var(--tac-navy); }
.tac-qpg { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tac-qpg button { min-width: 40px; height: 40px; padding: 0 6px; border: 0; border-radius: 50%; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: #2B3A5C; font: inherit; font-size: 14.5px; cursor: pointer; }
.tac-qpg button:hover:not([disabled]):not(.on) { background: var(--tac-tint); }
.tac-qpg button.on { background: var(--tac-blue); color: #FFFFFF; font-weight: 600; cursor: default; }
.tac-qpg button[disabled] { opacity: .35; cursor: default; }
.tac-qpg button:focus-visible { outline: 3px solid rgba(11, 91, 234, .35); outline-offset: 1px; }
.tac-qpg span { padding: 0 4px; }
.tac-qhint { margin: 0; text-align: center; font-size: 13px; color: #8593AD; }
@media (max-width: 760px) {
  .tac-qstats { gap: 16px; }
  .tac-qstats b { font-size: 24px; }
  .tac-qbar { padding: 16px; }
  .tac-qsearch, .tac-export, body.tac select.tac-qsel { flex: 1 1 100%; width: 100%; min-width: 0; }
  .tac-qbtn { width: 100%; justify-content: center; box-sizing: border-box; }
  .tac-export-menu { left: 0; right: 0; width: auto; }
  .tac-qtable, .tac-qtable .tac-qg, .tac-qtable .tac-qd, .tac-qtable .tac-qd > td { display: block; }
  .tac-qtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tac-qlist.is-acc .tac-qd { display: none; }
  .tac-qlist.is-acc .tac-qg.is-open .tac-qd { display: block; }
  .tac-qr { display: grid; grid-template-columns: 1fr auto 40px; grid-template-areas: "no tm ch" "in in in" "pv pv pv"; gap: 4px 12px; align-items: center; padding: 14px 8px 14px 16px; border-top: 1px solid var(--tac-line-2); }
  .tac-qr > td, .tac-qg.is-open .tac-qr > td { display: block; height: auto; padding: 0; border: 0; }
  .tac-qr > td:first-child { padding-left: 0; }
  .tac-qr > td:last-child { padding-right: 0; }
  .tac-qtable .tac-qr > td.tac-qsq, .tac-qtable .tac-qg.is-open .tac-qr > td.tac-qsq { display: none; }
  .tac-qno { grid-area: no; }
  .tac-qtm { grid-area: tm; }
  .tac-qch { grid-area: ch; }
  .tac-qin { grid-area: in; margin-top: 4px; }
  .tac-qpv { grid-area: pv; font-size: 14px; }
  .tac-qdt { margin: 0 16px 16px; grid-template-columns: 1fr; }
  .tac-qdt ol { grid-template-columns: 1fr; }
  .tac-qft { padding: 16px; justify-content: center; }
}
/* pagination / filter visibility (kept last so they beat the mobile display:block rule) */
.tac-qlist .tac-qg[data-q-off] { display: none; }
.tac-qlist .tac-qg[hidden] { display: none !important; }
@media print {
  .tac-cookie { display: none !important; }
  .tac-qlist.tac-card--flush { overflow: visible; box-shadow: none; border: 0; }
  .tac-qtable { display: table; }
  .tac-qtable thead { display: table-header-group; position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  .tac-qtable .tac-qg { display: table-row-group; break-inside: avoid; page-break-inside: avoid; }
  .tac-qtable .tac-qr { display: table-row; }
  .tac-qtable .tac-qr > td { display: table-cell; height: auto; padding: 6px 10px; font-size: 13px; }
  .tac-qlist .tac-qg[data-q-off] { display: table-row-group; }
  .tac-qlist .tac-qg[hidden] { display: none !important; }
  .tac-qlist.is-acc .tac-qd, .tac-qtable .tac-qd { display: table-row; }
  .tac-qtable .tac-qd > td { display: table-cell; }
  .tac-qtable thead th { background: #F3F7FF !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tac-qtoggle { display: none; }
  .tac-qdt { margin: 0 0 10px; padding: 8px 12px; }
}

/* Chips (year / category switch) */
.tac-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
body.tac .tac-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--tac-input); background: #FFFFFF; color: var(--tac-ink); font: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: background-color .2s var(--tac-ease), border-color .2s var(--tac-ease), color .2s var(--tac-ease);
}
body.tac .tac-chip:hover, body.tac .tac-chip:focus { border-color: var(--tac-blue); color: var(--tac-blue); }
body.tac .tac-chip.is-on, body.tac .tac-chip[aria-pressed="true"], body.tac .tac-chip[aria-current] { background: var(--tac-navy); border-color: var(--tac-navy); color: #FFFFFF; }
.tac-chip small { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
.tac-chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tac-chips--scroll .tac-chip { flex-shrink: 0; }

/* Prose (CMS content) */
.tac-prose { font-size: 17px; line-height: 1.85; color: var(--tac-ink); max-width: 72ch; }
.tac-prose > :first-child { margin-top: 0; }
.tac-prose > :last-child { margin-bottom: 0; }
.tac-prose p, .tac-prose ul, .tac-prose ol, .tac-prose blockquote, .tac-prose table, .tac-prose figure { margin: 0 0 1em; }
body.tac .tac-prose h2 { font-size: 22px; font-weight: 600; margin: 1.6em 0 .5em; }
body.tac .tac-prose h3 { font-size: 19px; font-weight: 600; margin: 1.4em 0 .4em; }
.tac-prose ul, .tac-prose ol { padding-left: 1.4em; }
.tac-prose li + li { margin-top: .3em; }
.tac-prose img { max-width: 100%; height: auto; border-radius: 14px; }
.tac-prose blockquote { padding: 4px 0 4px 18px; border-left: 1px solid var(--tac-accent); color: var(--tac-ink-2); }
.tac-prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.tac-prose th, .tac-prose td { border: 1px solid var(--tac-line); padding: 8px 12px; text-align: left; }
.tac-prose th { background: var(--tac-bg); }
.tac-prose hr { border: 0; height: 1px; background: var(--tac-line-2); margin: 2em 0; }
.tac-updated { font-size: 14px; color: var(--tac-muted); }

/* FAQ */
.tac-faq-group + .tac-faq-group { margin-top: 28px; }
body.tac .tac-faq-group > h2 { margin: 0 0 12px; font-size: 20px; font-weight: 600; }
.tac-faq { background: #FFFFFF; border: 1px solid var(--tac-line); border-radius: 16px; overflow: hidden; }
.tac-faq + .tac-faq { margin-top: 10px; }
.tac-faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 20px; font-weight: 600; font-size: 16px; color: var(--tac-ink);
}
.tac-faq summary::-webkit-details-marker { display: none; }
.tac-faq summary:hover { background: var(--tac-tint-2); }
.tac-faq summary .tac-ic { color: var(--tac-blue); transition: transform .25s var(--tac-ease); }
.tac-faq[open] summary { color: var(--tac-navy); }
.tac-faq[open] summary .tac-ic { transform: rotate(180deg); }
.tac-faq-a { padding: 0 20px 18px; color: var(--tac-ink-2); font-size: 16px; line-height: 1.8; }
.tac-faq-a > :last-child { margin-bottom: 0; }
.tac-faq:target { border-color: var(--tac-blue); box-shadow: var(--tac-ring); }
.tac-faq-empty[hidden] { display: none; }

/* Info list (contact aside, venue) */
.tac-info { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.tac-info li { display: flex; gap: 14px; align-items: flex-start; }
.tac-info-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--tac-tint); color: var(--tac-blue); display: flex; align-items: center; justify-content: center; }
.tac-info small { display: block; font-size: 13px; color: var(--tac-muted); }
.tac-info b, .tac-info a { font-weight: 600; overflow-wrap: anywhere; }

/* Form grid */
.tac-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.tac-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tac-form-grid .is-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .tac-form-grid { grid-template-columns: 1fr; } }
body.tac .tac-field textarea.tac-input { height: auto; min-height: 150px; padding: 12px 14px; resize: vertical; }
.tac-field.has-error .tac-input { border-color: var(--tac-err); }
.tac-field-err { font-size: 14px; color: var(--tac-err); font-weight: 500; }
body.tac .tac-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; line-height: 1.6; margin: 0; }
body.tac .tac-check input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.tac-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Map */
.tac-map { position: relative; border-radius: 16px; overflow: hidden; background: var(--tac-tint); aspect-ratio: 16 / 9; border: 1px solid var(--tac-line); }
.tac-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tac-map-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%; color: var(--tac-muted); text-align: center; padding: 20px; }
.tac-list-plain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Event facts strip */
.tac-facts-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tac-fact { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 18px; background: #FFFFFF; border: 1px solid var(--tac-line); }
.tac-fact small { display: block; font-size: 13px; color: var(--tac-muted); }
.tac-fact b { font-family: var(--tac-display); font-weight: 600; font-size: 17px; line-height: 1.5; color: var(--tac-ink); }

/* News list + detail */
.tac-news-card { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 20px; padding: 18px 22px; border-top: 1px solid var(--tac-line-2); align-items: center; }
.tac-news-card:first-child { border-top: 0; }
.tac-news-thumb { width: 168px; aspect-ratio: 16 / 10; border-radius: 12px; background: var(--tac-tint); object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--tac-blue); }
.tac-news-card h3 { margin: 0 0 6px; font-family: var(--tac-font); font-size: 17px; font-weight: 600; line-height: 1.55; color: var(--tac-ink); }
body.tac .tac-news-card h3 a { color: inherit; text-decoration: none; }
body.tac .tac-news-card h3 a:hover { color: var(--tac-blue); text-decoration: underline; }
.tac-news-meta { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--tac-muted); }
.tac-news-meta .tac-src { min-height: 36px; }
@media (max-width: 640px) { .tac-news-card { grid-template-columns: 1fr; padding: 16px; } .tac-news-thumb { width: 100%; } }
.tac-article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
@media (max-width: 960px) { .tac-article { grid-template-columns: 1fr; } }
.tac-article-head { display: flex; flex-direction: column; gap: 12px; }
body.tac .tac-article-head h1 { margin: 0; font-size: 34px; font-weight: 700; line-height: 1.35; }
@media (max-width: 600px) { body.tac .tac-article-head h1 { font-size: 26px; } }
.tac-article-cover { width: 100%; height: auto; border-radius: 20px; display: block; }
.tac-share { display: flex; gap: 8px; flex-wrap: wrap; }
.tac-share .tac-icon-btn { width: auto; padding: 0 14px; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.tac-related { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
body.tac .tac-related a { display: block; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--tac-line); background: #FFFFFF; color: var(--tac-ink); text-decoration: none; font-weight: 500; line-height: 1.55; }
body.tac .tac-related a:hover { border-color: var(--tac-blue); }
.tac-related small { display: block; margin-top: 4px; color: var(--tac-muted); font-size: 13px; }

/* Pagination */
.tac-pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
body.tac .tac-pager a, .tac-pager span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--tac-line); background: #FFFFFF; color: var(--tac-ink); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums;
}
body.tac .tac-pager a:hover { border-color: var(--tac-blue); color: var(--tac-blue); }
.tac-pager [aria-current] { background: var(--tac-blue); border-color: var(--tac-blue); color: #FFFFFF; }
.tac-pager .is-gap { border: 0; background: none; min-width: 20px; }

/* Result year page */
.tac-podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tac-place { border-radius: 20px; padding: 22px; background: #FFFFFF; border: 1px solid var(--tac-line); display: flex; flex-direction: column; gap: 10px; }
.tac-place.is-1 { background: var(--tac-warm); border-color: var(--tac-warm-line); }
.tac-place-rank { display: inline-flex; align-items: center; gap: 8px; font-family: var(--tac-display); font-weight: 600; font-size: 15px; color: var(--tac-blue); }
.tac-place.is-1 .tac-place-rank { color: var(--tac-warm-ink-2); }
.tac-place h3 { margin: 0; font-family: var(--tac-display); font-weight: 700; font-size: 20px; line-height: 1.4; color: var(--tac-navy); }
.tac-place ul { margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--tac-ink-2); display: flex; flex-direction: column; gap: 2px; }
.tac-place .is-advisor { color: var(--tac-warm-ink); font-weight: 600; }
.tac-place-hidden { font-size: 13px; color: var(--tac-muted); }
.tac-stat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--tac-line-2); }
.tac-stat-row:first-child { border-top: 0; }
.tac-bar { height: 8px; border-radius: 999px; background: var(--tac-tint); overflow: hidden; margin-top: 6px; }
.tac-bar span { display: block; height: 100%; border-radius: 999px; background: var(--tac-blue); }

/* Gallery */
.tac-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
body.tac a.tac-album { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: #FFFFFF; border: 1px solid var(--tac-line); text-decoration: none; color: var(--tac-ink); transition: border-color .2s var(--tac-ease), transform .25s var(--tac-ease), box-shadow .25s var(--tac-ease); }
body.tac a.tac-album:hover, body.tac a.tac-album:focus { border-color: var(--tac-blue); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(11, 91, 234, 0.14); color: var(--tac-ink); }
.tac-album-cover { aspect-ratio: 4 / 3; background: var(--tac-tint); display: flex; align-items: center; justify-content: center; color: var(--tac-blue); }
.tac-album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tac-album-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.tac-album-body b { font-family: var(--tac-display); font-weight: 600; font-size: 17px; line-height: 1.45; }
.tac-album-body span { font-size: 14px; color: var(--tac-muted); }
.tac-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tac-photos button { display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--tac-tint); cursor: zoom-in; aspect-ratio: 1; }
.tac-photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--tac-ease); }
.tac-photos button:hover img { transform: scale(1.04); }
.tac-lightbox { border: 0; padding: 0; max-width: min(1100px, 94vw); width: 100%; background: transparent; }
.tac-lightbox::backdrop { background: rgba(6, 18, 56, 0.88); }
.tac-lightbox figure { margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.tac-lightbox img { max-width: 100%; max-height: 80vh; border-radius: 12px; display: block; }
.tac-lightbox figcaption { color: #FFFFFF; font-size: 15px; text-align: center; }
.tac-lightbox-bar { display: flex; justify-content: space-between; gap: 8px; width: 100%; margin-top: 8px; }
.tac-lightbox .tac-icon-btn { background: rgba(255, 255, 255, 0.14); border-color: transparent; color: #FFFFFF; }
.tac-lightbox .tac-icon-btn:hover { background: rgba(255, 255, 255, 0.24); color: #FFFFFF; }

/* Empty states inside cards */
.tac-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; color: var(--tac-muted); }
.tac-empty .tac-info-ic { width: 56px; height: 56px; border-radius: 16px; }
.tac-empty b { font-family: var(--tac-display); font-weight: 600; font-size: 18px; color: var(--tac-navy); }
.tac-empty p { margin: 0; max-width: 46ch; }

/* Search results */
.tac-results { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.tac-results li { border-top: 1px solid var(--tac-line-2); }
.tac-results li:first-child { border-top: 0; }
body.tac .tac-results a { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 22px; color: var(--tac-ink); text-decoration: none; }
body.tac .tac-results a:hover { background: var(--tac-tint-2); }
.tac-results mark { background: #FFE7C2; color: inherit; padding: 0 2px; border-radius: 3px; }
@media (max-width: 640px) { body.tac .tac-results a { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; } }

/* Status timeline */
.tac-timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.tac-timeline li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; position: relative; padding-bottom: 26px; }
.tac-timeline li:last-child { padding-bottom: 0; }
.tac-timeline li:not(:last-child):before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--tac-line); }
.tac-timeline li.is-done:not(:last-child):before { background: var(--tac-ok); }
.tac-tl-dot { width: 40px; height: 40px; border-radius: 50%; background: var(--tac-tint); color: var(--tac-navy); display: flex; align-items: center; justify-content: center; font-weight: 700; position: relative; z-index: 1; }
.tac-timeline li.is-done .tac-tl-dot { background: var(--tac-ok); color: #FFFFFF; }
.tac-timeline li.is-current .tac-tl-dot { background: var(--tac-blue); color: #FFFFFF; box-shadow: 0 0 0 6px rgba(11, 91, 234, 0.16); }
.tac-timeline li.is-problem .tac-tl-dot { background: var(--tac-err); color: #FFFFFF; box-shadow: 0 0 0 6px rgba(163, 38, 42, 0.14); }
.tac-tl-body { padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.tac-tl-body b { font-family: var(--tac-display); font-weight: 600; font-size: 17px; color: var(--tac-ink); }
.tac-timeline li:not(.is-done):not(.is-current):not(.is-problem) .tac-tl-body b { color: var(--tac-muted); }
.tac-tl-body span { font-size: 15px; color: var(--tac-muted); }

/* Success page */
.tac-success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 28px; }
.tac-success-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--tac-ok-bg); color: var(--tac-ok); display: flex; align-items: center; justify-content: center; animation: tac-pop .6s var(--tac-ease) both; }
@keyframes tac-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
body.tac .tac-success h1 { margin: 0; font-size: 30px; font-weight: 700; }
.tac-ref { display: inline-flex; flex-direction: column; gap: 2px; padding: 14px 28px; border-radius: 16px; background: var(--tac-tint); }
.tac-ref small { font-size: 13px; color: var(--tac-muted); }
.tac-ref b { font-family: var(--tac-display); font-size: 28px; font-weight: 700; color: var(--tac-navy); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.tac-next { text-align: left; margin: 0; padding: 0; list-style: none; counter-reset: tacnext; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 560px; }
.tac-next li { counter-increment: tacnext; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--tac-bg); }
.tac-next li:before { content: counter(tacnext); width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--tac-blue); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* Footer links */
.tac-footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
body.tac .tac-footer-links a { color: var(--tac-on-navy); text-decoration: none; font-size: 14px; }
body.tac .tac-footer-links a:hover, body.tac .tac-footer-links a:focus { color: #FFFFFF; text-decoration: underline; }
.tac-footer-col { display: flex; flex-direction: column; gap: 10px; }

/* Cookie notice */
.tac-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; max-width: 560px; margin: 0 auto; background: var(--tac-navy); color: var(--tac-on-navy); border-radius: 18px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; box-shadow: 0 20px 50px rgba(10, 42, 130, 0.35); font-size: 14px; line-height: 1.6; }
.tac-cookie[hidden] { display: none; }
.tac-cookie p { margin: 0; flex: 1 1 260px; }
body.tac .tac-cookie a { color: #FFFFFF; }
body.tac .tac-cookie .tac-btn { min-height: 44px; }

/* Maintenance */
.tac-maint { min-height: var(--tac-vh, 100vh); display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--tac-bg); }
.tac-maint-card { max-width: 520px; width: 100%; text-align: center; background: #FFFFFF; border-radius: 24px; padding: 44px 32px; box-shadow: 0 20px 50px rgba(10, 42, 130, 0.10); display: flex; flex-direction: column; gap: 16px; align-items: center; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tac-event, .loader:after { animation: none; }
  .tac-side, .tac-btn, .tac-dd .tac-ic, .tac-register .progress-bar { transition: none; }
}

/* ---------- Print ---------- */
@media print {
  .noprint, .tac-header, .tac-footer { display: none !important; }
  body.tac { background: #FFFFFF; }
  .tac-main { padding: 0; max-width: none; }
  .tac-two { display: block; }
  .tac-card { border: 0; padding: 0; }
  .tac-sheet { border: 0; box-shadow: none; padding: 0 8mm; }
  .tac-sheet th { background: #F3F7FF !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 12mm 10mm; }
  /* Balanced multi-team sheet: compact spacing, never split a team/table/signature across pages. */
  .tac-sheet { gap: 14px; font-size: 13px; }
  .tac-sheet-head { padding-bottom: 10px; }
  .tac-sheet-sec { gap: 6px; break-inside: avoid; page-break-inside: avoid; }
  .tac-sheet-sec > b { break-after: avoid; page-break-after: avoid; }
  .tac-sheet table { font-size: 13px; }
  .tac-sheet th, .tac-sheet td { padding: 5px 8px; }
  .tac-sheet tr, .tac-sheet-grid > div { break-inside: avoid; page-break-inside: avoid; }
  .tac-sheet-grid { gap: 6px 14px; }
  .tac-line { min-height: 22px; padding: 1px 4px; }
  .tac-sign { break-inside: avoid; page-break-inside: avoid; padding-top: 16px; }
}

/* Sponsors (CMS) + home countdown */
.tac-sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
body.tac .tac-sponsor-card { display: flex; align-items: center; justify-content: center; height: 120px; padding: 18px; border-radius: 18px; background: #FFFFFF; border: 1px solid var(--tac-line); text-align: center; color: var(--tac-navy); text-decoration: none; transition: border-color .2s var(--tac-ease), box-shadow .25s var(--tac-ease); }
body.tac a.tac-sponsor-card:hover, body.tac a.tac-sponsor-card:focus { border-color: var(--tac-blue); box-shadow: 0 10px 28px rgba(11, 91, 234, 0.12); }
.tac-sponsor-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tac-countdown { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.12); color: #FFFFFF; font-size: 15px; }
.tac-countdown b { font-family: var(--tac-display); font-weight: 700; font-size: 22px; color: var(--tac-accent); font-variant-numeric: tabular-nums; }
.tac-home-notice { max-width: 1248px; margin: 24px auto 0; padding: 0 24px; box-sizing: border-box; }

/* The hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

/* Search input with leading icon (public pages) */
.tac-input-icon { position: relative; }
.tac-input-icon > .tac-ic { position: absolute; left: 14px; top: 14px; color: var(--tac-muted); pointer-events: none; }
body.tac .tac-input-icon > .tac-input { padding-left: 44px; }
@media (max-width: 640px) { span.tac-news-thumb { display: none; } }

/* Shared layout corrections: public pages and result archives. */
.tac-main > *, .tac-two > *, .tac-rk > *, .tac-toolbar > * { min-width: 0; }
.tac-main img { max-width: 100%; height: auto; }
.tac-page-head h1 { overflow-wrap: anywhere; }
.tac-page-head p { line-height: 1.8; }
.tac-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
.tac-yc { border-radius: 16px; }
.tac-rk { grid-template-columns: 140px minmax(0, 1fr); padding: 16px 20px; gap: 16px; line-height: 1.8; }
.tac-rk > b { color: var(--tac-ink-2); }
.tac-rk-inst { overflow-wrap: anywhere; }
.tac-rk-inst + .tac-rk-inst { margin-top: 16px; }
.tac-rk summary { display: flex; align-items: center; gap: 6px; min-height: 44px; width: fit-content; color: var(--tac-blue); }
.tac-rk summary:hover { text-decoration: underline; }
.tac-rk details[open] summary svg { transform: rotate(90deg); }
.tac-rk details ul { padding-inline-start: 20px; margin-block: 8px; }
.tac-lk { margin-top: auto; flex-wrap: wrap; gap: 12px; }
.tac-table { font-variant-numeric: tabular-nums; }
.tac-table-wrap { max-width: 100%; overscroll-behavior-inline: contain; }
@media (max-width: 1000px) { .tac-result-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .tac-main { padding: 20px 16px 40px; gap: 24px; }
  .tac-toolbar { flex-wrap: wrap; }
  .tac-toolbar > *, .tac-toolbar .tac-input-icon { max-width: 100%; }
  .tac-rk { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px; }
  .tac-lk { padding: 16px; }
  .tac-footer-in { padding: 24px 16px; }
}
/* Shared badge/tag vocabulary from the supplied TAC 2027 style guide.
   Semantic success/error colors remain distinct for operational statuses. */
:root {
  --tac-tag-primary: #0D47FF;
  --tac-tag-warm-bg: #FFE5C4;
  --tac-tag-warm-ink: #9A4600;
  --tac-tag-new-bg: #D6F3FF;
  --tac-tag-new-ink: #00678A;
}
body.tac .tac-badge, body.tac span.label[class*="label-"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  max-width: 100%; padding: 4px 12px; border: 0; border-radius: 999px;
  font-family: var(--tac-display); font-size: 12px; font-weight: 500;
  line-height: 1.5; white-space: normal; overflow-wrap: anywhere;
  vertical-align: middle; text-align: center;
  background: var(--tac-tint); color: var(--tac-navy);
}
body.tac .tac-badge--info, body.tac span.label-primary, body.tac span.label-info {
  background: var(--tac-tag-primary); color: #FFFFFF;
}
body.tac .tac-badge--pdf, body.tac .tac-badge--warn, body.tac span.label-warning {
  background: var(--tac-tag-warm-bg); color: var(--tac-tag-warm-ink);
}
body.tac .tac-badge--jpg, body.tac .tac-badge--new { background: var(--tac-tag-new-bg); color: var(--tac-tag-new-ink); }
body.tac .tac-badge--ok, body.tac span.label-success { background: var(--tac-ok-bg); color: var(--tac-ok); }
body.tac .tac-badge--err, body.tac span.label-danger { background: var(--tac-err-bg); color: var(--tac-err); }
body.tac .tac-badge--muted, body.tac span.label-default { background: #EEF1F6; color: var(--tac-muted); }
body.tac .tac-badge--lg { padding: 6px 14px; font-size: 14px; }

/* Keyboard entry points shared by public and administrator layouts. */
.tac-skip-link{position:fixed;inset-block-start:12px;inset-inline-start:12px;z-index:100000;padding:12px 18px;border-radius:10px;background:var(--tac-navy);color:#fff!important;transform:translateY(-200%);font-weight:600}
.tac-skip-link:focus{transform:none;outline:3px solid var(--tac-accent);outline-offset:3px}
/* Password show/hide toggle (assets/js/tac2027-password.js). Input and button share grid cell 1/1,
   so a validation label inserted after the input drops to the next row. */
.tac-pw{display:grid;grid-template-columns:minmax(0,1fr);position:relative;width:100%}
.tac-pw > .tac-pw-input{grid-area:1/1;padding-right:48px!important}
.tac-pw > .tac-pw-input::-ms-reveal,.tac-pw > .tac-pw-input::-ms-clear{display:none}
.tac-pw > .tac-pw-btn{grid-area:1/1;justify-self:end;align-self:stretch;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:44px;margin:2px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--tac-muted);cursor:pointer}
.tac-pw > .tac-pw-btn:hover{color:var(--tac-navy);background:rgba(11,91,234,.08)}
.tac-pw > .tac-pw-btn:focus{outline:none}
.tac-pw > .tac-pw-btn:focus-visible{box-shadow:var(--tac-ring)}
.tac-pw > .tac-pw-btn[aria-pressed="true"]{color:var(--tac-blue)}
/* Character counter at / over the limit (assets/js/tac2027.js) */
.tac-hint.is-over{color:var(--tac-err);font-weight:500}

/* Large desktop monitors (27"): draw the whole site smaller so nothing looks oversized.
   html zoom shrinks every px value; the --tac-vh / --tac-svh / --tac-vw variables undo the
   shrink for viewport units so full-height layouts still fill the window. Phones, tablets and
   Laptops: Windows display scaling (125% / 150%) leaves a 1920px panel only ~1536 / 1280 CSS px
   wide, so every px value looks enlarged at browser zoom 100%. The steps below scale the page down
   by the width the browser reports, so the size stays comfortable on each device. Because the steps
   follow the width, a visitor who zooms the browser in drops under a threshold and the shrink is
   removed again. Phones and tablets (under 1100px) are untouched. Firefox before 126 ignores zoom. */
:root { --tac-vh: 100vh; --tac-svh: 100svh; --tac-vw: 1vw; }
@media (min-width: 1100px) {
  html { zoom: .95; }
  :root { --tac-vh: calc(100vh / .95); --tac-svh: calc(100svh / .95); --tac-vw: calc(1vw / .95); }
}
@media (min-width: 1280px) {
  html { zoom: .9; }
  :root { --tac-vh: calc(100vh / .9); --tac-svh: calc(100svh / .9); --tac-vw: calc(1vw / .9); }
}
@media (min-width: 1800px) {
  html { zoom: .85; }
  :root { --tac-vh: calc(100vh / .85); --tac-svh: calc(100svh / .85); --tac-vw: calc(1vw / .85); }
}
@media (min-width: 2300px) {
  html { zoom: .8; }
  :root { --tac-vh: calc(100vh / .8); --tac-svh: calc(100svh / .8); --tac-vw: calc(1vw / .8); }
}
