/* Shared interface ownership: frame, public header, portal navigation, public footer.
   No page-specific selectors. Editorial and form styling remain in site.css. */
:root {
  --tcp-frame-max:1500px;
  --tcp-frame-gutter:clamp(16px,3vw,40px);
  --tcp-content-width:min(1420px,calc(100% - 2 * var(--tcp-frame-gutter)));
  --tcp-nav-track-height:48px;
  --tcp-nav-segment-height:38px;
  --tcp-footer-spacing:8px;
}
/* Always reserve the browser's vertical scrollbar, including on short pages. */
html { overflow-y:scroll; }
.top { background:var(--red); color:#fff; position:relative; z-index:5; font-family:Inter,Arial,sans-serif; }
.top-inner { max-width:var(--tcp-frame-max); margin:0 auto; min-height:94px; padding:8px var(--tcp-frame-gutter); display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:18px; }
.top-left,.top-right { display:flex; align-items:center; gap:10px; min-width:0; }
.top-right { justify-content:flex-end; }
.brand { justify-self:center; }
.brand img { display:block; width:clamp(205px,27vw,385px); height:auto; max-height:77px; object-fit:contain; }
.date-strip { background:#171717; color:white; text-align:center; padding:5px; font:800 15px 'Barlow Condensed',Impact,sans-serif; }
.tcp-header-switch,.tcp-portal-switch { display:flex; align-items:stretch; gap:3px; height:var(--tcp-nav-track-height); padding:5px; border:0; border-radius:17px; background:#eaeaea; margin:0; white-space:nowrap; }
.tcp-header-switch a,.tcp-portal-switch a { display:flex; align-items:center; justify-content:center; gap:9px; height:var(--tcp-nav-segment-height); padding:0 13px; border:0; border-radius:12px; color:#505050; background:transparent; font:700 13px/1.15 Inter,Arial,sans-serif; text-decoration:none; white-space:nowrap; }
.tcp-header-switch a { min-width:70px; }
.tcp-header-switch a.selected,.tcp-portal-switch a.selected { background:var(--red); color:#fff; box-shadow:0 2px 8px #00000026; }
.tcp-header-switch a:focus-visible,.tcp-portal-switch a:focus-visible { outline:3px solid #111; outline-offset:2px; }

/* Public header: preserve the horizontal wordmark and existing control actions. */
.tcp-public-account { justify-self:end; width:max-content; max-width:100%; }
.tcp-public-account a { min-width:78px; font:800 12px/1.15 Arial,sans-serif; text-transform:uppercase; letter-spacing:.02em; }
.tcp-public-tools { display:flex; align-items:center; gap:3px; padding:5px; border-radius:17px; background:#eaeaea; height:var(--tcp-nav-track-height); }
.sections-trigger { display:flex; align-items:center; justify-content:center; gap:6px; height:var(--tcp-nav-segment-height); border:0; border-radius:12px; padding:0 12px; background:var(--red); color:white; font:800 13px Inter,Arial,sans-serif; white-space:nowrap; }
.sections-trigger .hamburger { font-size:19px; line-height:1; margin-left:7px; }
.header-icon { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:38px; height:var(--tcp-nav-segment-height); padding:7px; border:0; border-radius:12px; background:transparent; color:#111; }
.header-icon img { display:block; width:100%; height:100%; object-fit:contain; filter:brightness(0); }
.sections-trigger:hover,.sections-trigger:focus-visible,.tcp-public-account a[href="subscribe.php"]:hover,.tcp-public-account a[href="subscribe.php"]:focus-visible { background:white; color:#111; box-shadow:inset 0 0 0 1px #111; }
.sections-panel,.search-panel { position:absolute; top:100%; left:var(--tcp-frame-gutter); width:min(340px,calc(100vw - 32px)); padding:20px; border:0; border-radius:12px; background:#fff; color:#111; box-shadow:0 12px 30px #0003; z-index:20; --tcp-pointer-x:28px; }
.sections-panel[hidden],.search-panel[hidden] { display:none; }
.sections-panel p { font-size:12px; font-weight:800; }
.section-menu-item { display:block; padding:12px 4px; border-bottom:1px solid #ddd; font:800 23px 'Barlow Condensed',Impact,sans-serif; }
.search-panel { left:90px; }
.search-panel label { display:block; margin-bottom:8px; font-size:13px; }
.search-panel input { width:100%; padding:10px; }
.search-panel button { margin-top:10px; background:#111; color:#fff; border:0; padding:9px 15px; }
.sections-panel:not([hidden])::before,.search-panel:not([hidden])::before { content:""; position:absolute; top:-10px; left:clamp(12px,var(--tcp-pointer-x),calc(100% - 12px)); transform:translateX(-50%); width:0; height:0; border-left:9px solid transparent; border-right:9px solid transparent; border-bottom:10px solid white; pointer-events:none; }

/* Portal: fixed slots never derive their size from active text or page contents. */
.tcp-portal-top { max-width:1440px; gap:15px; }
.tcp-portal-brand { display:flex; align-items:center; justify-content:center; justify-self:start; width:61.5px; height:61.5px; padding:7.5px; border-radius:12px; background:#e5e5e5; text-decoration:none; }
.tcp-portal-brand img { display:block; width:100%; height:100%; object-fit:contain; }
.tcp-portal-switch { grid-column:2; justify-self:center; display:grid; grid-auto-flow:column; grid-auto-columns:128px; }
.tcp-portal-switch a { min-width:0; font-size:16px; }
.tcp-portal-switch img { display:block; width:20px; height:20px; object-fit:contain; filter:brightness(0); opacity:.65; }
.tcp-portal-switch a.selected img { filter:brightness(0) invert(1); opacity:1; }
.tcp-portal-top>.tcp-header-switch { grid-column:3; justify-self:end; }

/* Public footer: three bounded regions; existing mark and link anchor preserved. */
.footer { display:block; position:relative; margin:0; border:0; padding:22px 0 28px; background:#050505; color:white; }
.footer-columns { width:var(--tcp-content-width); max-width:1420px; margin:0 auto; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; align-items:start; container-type:inline-size; }
.footer-left,.footer-middle,.footer-ack { min-width:0; width:100%; max-width:100%; text-align:left; }
.footer-left { display:flex; flex-direction:column; align-items:flex-start; padding-right:24px; }
.footer-logo-square,.footer-logo-square img { display:block; width:67px; height:67px; object-fit:contain; padding:0; background:transparent; }
.footer-logo-square { margin:0 0 22px; }
.footer-description,.footer-middle,.footer-ack { font:400 14px/1.2 Arial,sans-serif; letter-spacing:.045em; }
.footer-description { margin:0 0 20px; width:100%; max-width:100%; overflow-wrap:anywhere; }
.footer-social { display:flex; flex-direction:column; align-items:flex-start; gap:16px; margin:0; font:700 13px Arial,sans-serif; letter-spacing:.03em; }
.footer-social-icons { display:flex; flex-wrap:wrap; align-items:center; gap:30px; }
.footer-social-icons a { display:inline-flex; align-items:center; justify-content:center; width:68px; height:68px; padding:0; border:0; background:transparent; }
.footer-social-icons img { display:block; width:46px; height:46px; object-fit:contain; padding:0; background:transparent; }
/* The original link anchor was 45% into min(1420px, viewport - 48px).
   Compensate for the shared header gutter without moving that anchor. */
.footer-middle { display:flex; flex-direction:column; align-items:flex-start; gap:var(--tcp-footer-spacing); padding:89px 0 0 calc(35% - (min(1420px,100vw - 48px) - 100cqw) / 20); }
.footer-middle a { max-width:100%; overflow-wrap:anywhere; text-decoration:none; }
.footer-middle a:hover,.footer-middle a:focus-visible { text-decoration:underline; }
.footer-ack { padding:89px 0 0 4%; }
.footer-ack strong { display:block; font-weight:700; margin:0 0 var(--tcp-footer-spacing); }
.footer-ack p { margin:0; max-width:100%; overflow-wrap:anywhere; }
.tcp-recaptcha-notice { width:var(--tcp-content-width); margin:30px auto 0; text-align:center; font:10px/1.5 Arial,sans-serif; color:#bbb; }
.tcp-recaptcha-notice a { text-decoration:underline; }


/* Reflow when the brand and controls no longer fit at readable sizes. */
@media(max-width:1000px){
 .top:not(.tcp-portal-header) .top-inner{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:12px var(--tcp-frame-gutter)}
 .top:not(.tcp-portal-header) .brand{grid-column:1 / -1;grid-row:1}
 .top:not(.tcp-portal-header) .brand img{width:clamp(205px,48vw,330px);max-width:100%;height:auto}
 .top:not(.tcp-portal-header) .top-left{grid-column:1;grid-row:2}
 .top:not(.tcp-portal-header) .tcp-public-account{grid-column:2;grid-row:2}
 .tcp-public-tools,.tcp-public-account{height:auto;min-height:54px}
 .sections-trigger,.header-icon,.tcp-public-account a{height:auto;min-height:44px}
 .header-icon{width:44px}
 .tcp-portal-top{grid-template-columns:minmax(0,1fr) auto;gap:12px}
 .tcp-portal-top>.tcp-header-switch{grid-column:2;grid-row:1}
 .tcp-portal-switch{grid-column:1 / -1;grid-row:2;grid-auto-columns:minmax(0,1fr);width:100%;height:auto}
 .tcp-portal-switch a{min-height:44px;height:auto;white-space:normal;overflow-wrap:anywhere}
 .tcp-portal-top>.tcp-header-switch{height:auto}.tcp-portal-top>.tcp-header-switch a{min-height:44px;height:auto}
}
@media(max-width:700px){
 .footer-columns{grid-template-columns:minmax(0,1fr);gap:26px}
 .footer-left,.footer-middle,.footer-ack{padding:0}
 .footer-description,.footer-ack p{font-size:14px;line-height:1.4}
 .footer-middle a{display:inline-flex;align-items:center;min-height:32px}
 .tcp-portal-switch a{padding:6px;font-size:14px;gap:6px;flex-wrap:wrap;text-align:center}
 .tcp-portal-switch img{flex-shrink:0}
}
@media(max-width:430px){
 .top:not(.tcp-portal-header) .top-inner{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding:12px 10px}
 .top:not(.tcp-portal-header) .brand{order:-1;flex:0 0 100%;display:flex;justify-content:center}
 .top:not(.tcp-portal-header) .top-left{flex:0 1 auto}
 .tcp-public-account{margin-left:auto;max-width:100%;flex-wrap:wrap}
 .tcp-public-account a{min-width:0;padding:0 10px;font-size:12px}
 .sections-trigger{padding:0 8px;font-size:12px;gap:3px}
 .sections-trigger .hamburger{margin-left:0}
 .tcp-portal-brand{width:50px;height:50px}
 .tcp-portal-top{padding:10px 12px}
 .tcp-header-switch a{padding:0 10px}
}
@media(max-width:600px){.footer-social-icons a{width:54px;height:54px}}
/* Menu coordinates are bounded by the visible viewport in site.js. */
.sections-panel,.search-panel{max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.search-panel input{min-width:0;font-size:16px}.search-panel button{min-height:44px}
.date-strip{overflow-wrap:anywhere}

@media(max-width:370px){.top:not(.tcp-portal-header) .top-left{flex-basis:100%;justify-content:center}.tcp-public-account{margin-inline:auto}}

/* Stable navigation positions across roles and active pages. */
.tcp-portal-top{grid-template-columns:minmax(90px,1fr) auto minmax(90px,1fr)}
.tcp-portal-switch{grid-auto-flow:unset;grid-auto-columns:unset;grid-template-columns:repeat(3,128px);width:384px}
.tcp-portal-switch [data-portal-slot="Admin"]{grid-column:1}
.tcp-portal-switch [data-portal-slot="Dashboard"]{grid-column:2}
.tcp-portal-switch [data-portal-slot="Workspace"]{grid-column:3}
@media(max-width:1000px){.tcp-portal-top{grid-template-columns:minmax(0,1fr) auto}.tcp-portal-switch{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;grid-column:1/-1;grid-row:2}}
@media(max-width:430px){.tcp-portal-switch{grid-template-columns:repeat(3,minmax(0,1fr))}.tcp-portal-switch a{font-size:12px}}

/* 19 Oct 2026: keep the existing navigation slots stable without empty segments. */
.tcp-portal-switch { grid-auto-flow:column; grid-auto-columns:auto; width:max-content; }
.tcp-portal-switch a { min-width:128px; box-sizing:border-box; }
.tcp-portal-top>.tcp-header-switch { height:var(--tcp-nav-track-height); }
.tcp-portal-top>.tcp-header-switch a, .tcp-public-account a { height:var(--tcp-nav-segment-height); min-height:0; box-sizing:border-box; }
.tcp-public-account a { font:700 13px/1.15 Inter,Arial,sans-serif; text-transform:none; letter-spacing:normal; min-width:70px; }
@media(min-width:1001px){.tcp-portal-switch { grid-template-columns:none; width:max-content; }}
@media(max-width:1000px){.tcp-portal-switch { width:max-content; max-width:100%; grid-column:1/-1; grid-row:2; justify-self:center; grid-template-columns:none; } .tcp-portal-switch a { min-width:0; } .tcp-portal-top>.tcp-header-switch { height:var(--tcp-nav-track-height); } .tcp-portal-top>.tcp-header-switch a { height:var(--tcp-nav-segment-height); min-height:0; }}
@media(max-width:430px){.tcp-portal-switch { width:max-content; max-width:100%; grid-template-columns:none; } .tcp-portal-switch a { min-width:0; } }
