:root { --tn-header-height: 68px; }
html { scroll-padding-top: calc(var(--tn-header-height) + 16px); }
body.tn-nav-open { overflow: hidden; }

.tn-skip-link { background: #111827; border-radius: 0 0 8px 8px; color: #fff !important; font-weight: 700; left: 16px; padding: 12px 16px; position: fixed; top: 0; transform: translateY(-120%); transition: transform .15s ease; z-index: 1000; }
.tn-skip-link:focus { outline: 3px solid #f5a623; outline-offset: 2px; transform: translateY(0); }

.tn-site-header { background: rgba(255, 255, 255, .98); border-bottom: 1px solid #dce3ec; color: #1f2937; position: sticky; top: 0; z-index: 100; }
.tn-site-header *, .tn-site-footer *, .tn-site-header *::before, .tn-site-header *::after { box-sizing: border-box; }
.tn-nav-shell { align-items: center; display: flex; gap: 24px; height: var(--tn-header-height); margin-inline: auto; max-width: 1200px; padding-inline: 20px; }
.tn-brand { align-items: center; color: #111827 !important; display: inline-flex; flex: 0 0 auto; font-size: 1.35rem; font-weight: 800; gap: 9px; letter-spacing: -.035em; text-decoration: none; }
.tn-brand > span:last-child > span { color: #2446d8; }
.tn-brand__mark { align-items: center; background: #2446d8; border-radius: 9px; color: #fff; display: inline-flex; height: 36px; justify-content: center; width: 36px; }
.tn-site-header a:focus-visible, .tn-site-header button:focus-visible, .tn-site-header summary:focus-visible, .tn-site-footer a:focus-visible { outline: 3px solid #f5a623; outline-offset: 3px; }

.tn-desktop-nav { align-items: center; display: flex; flex: 1 1 auto; gap: 2px; justify-content: flex-end; min-width: 0; }
.tn-desktop-nav > a, .tn-nav-disclosure > summary { align-items: center; border-radius: 8px; color: #334155; display: inline-flex; font-size: .93rem; font-weight: 650; gap: 4px; min-height: 44px; padding: 10px 11px; text-decoration: none; white-space: nowrap; }
.tn-desktop-nav > a:hover, .tn-nav-disclosure > summary:hover { background: #f3f6fb; color: #1736af; }
.tn-desktop-nav > a[aria-current="page"] { background: #eef2ff; color: #1736af; }
.tn-nav-disclosure { position: relative; }
.tn-nav-disclosure > summary { cursor: pointer; list-style: none; }
.tn-nav-disclosure > summary::-webkit-details-marker { display: none; }
.tn-nav-disclosure[open] > summary { background: #f3f6fb; color: #1736af; }
.tn-nav-disclosure[open] > summary svg { transform: rotate(180deg); }
.tn-nav-popover { background: #fff; border: 1px solid #d7dfea; border-radius: 11px; box-shadow: 0 16px 40px rgba(15, 23, 42, .14); display: grid; min-width: 210px; padding: 7px; position: absolute; right: 0; top: calc(100% + 7px); }
.tn-nav-popover a, .tn-nav-popover button { background: transparent; border: 0; border-radius: 7px; color: #334155; cursor: pointer; display: flex; font: inherit; font-size: .91rem; min-height: 42px; padding: 10px 11px; text-align: left; text-decoration: none; width: 100%; }
.tn-nav-popover a:hover, .tn-nav-popover button:hover, .tn-nav-popover a[aria-current="page"] { background: #f2f5fa; color: #1736af; }
.tn-nav-popover__label { color: #64748b; font-size: .72rem; font-weight: 800; letter-spacing: .08em; padding: 9px 11px 4px; text-transform: uppercase; }

.tn-account-nav { align-items: center; border-left: 1px solid #dce3ec; display: flex; flex: 0 0 auto; gap: 4px; padding-left: 14px; }
.tn-login-link, .tn-signup-link { align-items: center; border-radius: 8px; display: inline-flex; font-size: .92rem; font-weight: 700; justify-content: center; min-height: 44px; padding: 9px 12px; text-decoration: none; }
.tn-login-link { color: #334155 !important; }
.tn-login-link:hover { background: #f3f6fb; color: #1736af !important; }
.tn-signup-link { border: 1px solid #9aa8ba; color: #243247 !important; }
.tn-signup-link:hover { background: #f5f7fa; border-color: #64748b; }
.tn-account-popover { max-height: min(72vh, 620px); overflow-y: auto; right: 0; width: 240px; }
.tn-account-popover__upgrade { color: #1736af !important; font-weight: 750 !important; }
.tn-account-popover form { border-top: 1px solid #e2e8f0; margin-top: 5px; padding-top: 5px; }

.tn-menu-button { align-items: center; background: #fff; border: 1px solid #9aa8ba; border-radius: 8px; color: #26354a; cursor: pointer; display: none; font: inherit; font-size: .92rem; font-weight: 750; gap: 8px; justify-content: center; min-height: 44px; padding: 8px 11px; }
.tn-mobile-nav[hidden] { display: none !important; }
.tn-mobile-nav { inset: 0; position: fixed; z-index: 300; }
.tn-mobile-nav__backdrop { background: rgba(15, 23, 42, .55); inset: 0; position: absolute; }
.tn-mobile-nav__panel { background: #fff; display: flex; flex-direction: column; height: 100%; margin-left: auto; max-width: 410px; position: relative; width: min(92vw, 410px); }
.tn-mobile-nav__header { align-items: center; border-bottom: 1px solid #dce3ec; display: flex; flex: 0 0 auto; justify-content: space-between; min-height: 68px; padding: 10px 16px 10px 22px; }
.tn-mobile-nav__header h2 { color: #172033; font-size: 1.15rem; font-weight: 780; }
.tn-mobile-nav__close { align-items: center; background: #fff; border: 1px solid #9aa8ba; border-radius: 8px; color: #26354a; cursor: pointer; display: inline-flex; height: 44px; justify-content: center; width: 44px; }
.tn-mobile-nav__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px max(24px, env(safe-area-inset-bottom)); }
.tn-mobile-nav__links { display: grid; }
.tn-mobile-nav__links a { align-items: center; border-bottom: 1px solid #e5eaf1; color: #253349; display: flex; font-size: 1.02rem; font-weight: 700; min-height: 50px; padding: 11px 5px; text-decoration: none; }
.tn-mobile-nav__links a[aria-current="page"] { background: #eef2ff; color: #1736af; padding-inline: 10px; }
.tn-mobile-account { border-top: 2px solid #ccd6e3; display: grid; gap: 6px; margin-top: 18px; padding-top: 18px; }
.tn-mobile-account > a, .tn-mobile-account button { align-items: center; background: #fff; border: 1px solid #9aa8ba; border-radius: 8px; color: #243247; display: flex; font: inherit; font-weight: 750; justify-content: center; min-height: 46px; padding: 10px 14px; text-decoration: none; width: 100%; }
.tn-mobile-account__signup { background: #eef2ff !important; border-color: #aebcf2 !important; color: #1736af !important; }
.tn-mobile-account h3 { color: #64748b; font-size: .77rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tn-mobile-account__staff { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-bottom: 12px; }
.tn-mobile-account__staff a { align-items: center; color: #334155; display: flex; font-size: .88rem; min-height: 44px; padding: 7px 2px; }
.tn-mobile-account__upgrade { color: #1736af !important; }

.tn-site-footer { background: #f8fafc; border-top: 1px solid #dce3ec; color: #475569; font-size: .91rem; }
.tn-footer-shell { margin-inline: auto; max-width: 1200px; padding: 48px 20px 28px; }
.tn-footer-grid { display: grid; grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 1fr)); gap: 34px; }
.tn-footer-brand p { color: #536277; line-height: 1.65; margin-top: 16px; max-width: 300px; }
.tn-footer-group h2 { color: #27364b; font-size: .78rem; font-weight: 800; letter-spacing: .08em; margin-bottom: 12px; text-transform: uppercase; }
.tn-footer-group ul { list-style: none; margin: 0; padding: 0; }
.tn-footer-group li { margin: 2px 0; }
.tn-footer-group a { color: #4b5a6d; display: inline-flex; min-height: 36px; padding: 7px 0; text-decoration: none; }
.tn-footer-group a:hover { color: #1736af; text-decoration: underline; }
.tn-footer-disclosure { border-top: 1px solid #dce3ec; color: #536277; line-height: 1.65; margin-top: 34px; padding-top: 22px; }
.tn-footer-disclosure a { color: #27364b; font-weight: 700; }
.tn-footer-bottom { align-items: center; border-top: 1px solid #dce3ec; display: flex; justify-content: space-between; gap: 24px; margin-top: 24px; padding-top: 22px; }
.tn-footer-social { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tn-footer-social a { color: #475569; min-height: 36px; padding: 7px 0; }

@media (max-width: 1090px) {
  .tn-nav-shell { gap: 12px; }
  .tn-desktop-nav > a, .tn-nav-disclosure > summary { padding-inline: 8px; }
}

@media (max-width: 1023px) {
  .tn-desktop-nav, .tn-account-nav { display: none; }
  .tn-nav-shell { justify-content: space-between; }
  .tn-menu-button { display: inline-flex; }
  .tn-footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .tn-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .tn-nav-shell { padding-inline: 16px; }
  .tn-brand { font-size: 1.18rem; }
  .tn-brand__mark { height: 34px; width: 34px; }
  .tn-footer-shell { padding: 38px 16px 24px; }
  .tn-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 22px; }
  .tn-footer-brand, .tn-footer-group:last-child { grid-column: 1 / -1; }
  .tn-footer-bottom { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 360px) {
  .tn-menu-button { gap: 5px; padding-inline: 9px; }
  .tn-mobile-nav__panel { width: 100%; }
  .tn-mobile-account__staff, .tn-footer-grid { grid-template-columns: 1fr; }
  .tn-footer-brand, .tn-footer-group:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .tn-skip-link { transition: none; }
}
