/* Contender Lab shared stylesheet (style plan step 3). Linked FIRST in <head> by every page that uses the shared shell.
   Tokens are the values in docs/brand/style-guide.md. Components: .site-header, .site-nav, .site-nav-btn, .site-footer,
   .cl-btn-ink, .cl-btn-orange, .cl-panel. Selectors are plain classes so page CSS linked after this file can add layout.
   The header and footer markup is generated by main-app/tools/sync-shell.mjs from main-app/site-shell/.
   Admin and the Development Center must never load this file (main-app/tests/shell.test.mjs). */

:root{
  --cl-ink:#111827;--cl-ink-raised:#374151;--cl-surface:#f3f4f6;--cl-panel:#fff;--cl-line:#c4cbd4;
  --cl-text-muted:#334155;--cl-text-eyebrow:#344054;
  --cl-orange:#ff5400;--cl-orange-deep:#cf4400;--cl-orange-text:#b33c00;--cl-orange-on-ink:#ff965f;--cl-orange-label-on-ink:#ffa36e;
  --cl-on-ink:#fff;--cl-on-ink-muted:#d9e2ef;--cl-footer-text:#e2e8f0;
  --cl-disabled-fill:#e2e8f0;--cl-disabled-text:#243247;--cl-disabled-border:#64748b;
  --cl-font-sans:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --cl-radius-xs:3px;--cl-radius-sm:5px;--cl-radius-md:6px;--cl-radius-lg:7px;--cl-radius-xl:8px;
  --cl-gutter:5%;--cl-gap-sm:12px;--cl-pad-panel:22px;--cl-gap-lg:30px;--cl-section-y:50px;--cl-hero-y:60px;
  --cl-shadow-panel:0 8px 30px #11182708;
}
body{margin:0;background:var(--cl-surface)}

/* Header: white bar, 5px orange top rule. Left: logo. Middle: .site-nav. Right: optional .site-header-slot for page controls
   (Account, Sign out, Admin, Model Lab, Workbench). The slot sits in the same flex row at 1101px and up; below that it takes its own
   right-aligned row. Its height is reserved (44px) so the bar is the same height empty or filled (proved in step 4a, Chrome and WebKit).
   Headers with more than one nav item carry .site-header-multi (variants default, lab, public). */
.site-header,.site-header *,.site-footer,.site-footer *,.cl-btn-ink,.cl-btn-orange,.cl-panel{box-sizing:border-box}
.site-header,.site-footer{font-family:var(--cl-font-sans);line-height:1.55;color-scheme:light}
.site-header{display:flex;align-items:center;justify-content:space-between;background:var(--cl-panel);color:var(--cl-ink);border-top:5px solid var(--cl-orange);border-bottom:1px solid var(--cl-line);padding:22px var(--cl-gutter);gap:18px;font-size:15px}
.site-header a{color:inherit;text-decoration:none;font:inherit}
.site-header .brand{font-weight:800;align-items:center;font-size:18px;letter-spacing:-.7px;gap:7px;display:block;line-height:0;flex:0 1 285px;min-width:0}
.site-header .cl-real-logo{display:block;width:100%;max-width:285px}
.site-nav{display:flex;gap:23px;align-items:center;font-size:13px;font-weight:600}
.site-nav-btn,.site-header .site-nav-btn{font:inherit;line-height:inherit;border-radius:var(--cl-radius-sm);background:var(--cl-ink);color:var(--cl-on-ink);border:1px solid var(--cl-ink);font-weight:700;padding:11px 18px;white-space:nowrap}
.site-header-slot{display:flex;align-items:center;justify-content:flex-end;gap:2px 8px;flex:none;min-width:0;font-size:13px;font-weight:600;min-height:44px}
@media(max-width:1100px){.site-header:has(.site-header-slot){flex-wrap:wrap}.site-header-slot{flex:1 0 100%}}
@media(max-width:700px){
  .site-header .brand{flex-basis:235px;font-size:14px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:0;min-height:44px}
  .site-header{gap:16px;flex-wrap:wrap}
  .site-nav{gap:14px;flex-wrap:wrap}
  .site-nav .site-nav-extra{display:none}
  .site-nav-btn,.site-header .site-nav-btn{padding:10px 14px}
}
@media(max-width:400px){
  .site-header{padding-left:16px;padding-right:16px;gap:12px}
  .site-header .brand{flex-basis:190px}
  .site-nav-btn,.site-header .site-nav-btn{font-size:12px;padding:10px}
}

/* Multi-item headers (variants default, lab, public): nav items are 44px tall tap targets; on phones the logo and nav share one row. */
.site-header-multi .site-nav{min-height:44px}
.site-header-multi .site-nav a{min-height:44px;display:inline-flex;align-items:center}
.site-header.site-header-multi .brand{flex:0 0 285px}
@media(max-width:700px){
  .site-header.site-header-multi{padding-top:14px;padding-bottom:14px;gap:8px 12px;flex-wrap:wrap}
  .site-header.site-header-multi .brand{flex:1 1 0;min-width:120px;max-width:190px}
  .site-header-multi .site-nav{flex:none;flex-wrap:nowrap;gap:10px}
}

/* Right-hand slot items: plain links and buttons in the nav's type, one ink button (Sign out). Items marked data-auth show only once the
   page script has set class cl-signed-in on <html>; items with the hidden attribute are shown by the page scripts (Admin, Account, Sign out). */
.site-header [hidden]{display:none !important}
.site-header-slot .site-slot-item{font:inherit;line-height:inherit;color:var(--cl-ink);text-decoration:none;display:inline-flex;align-items:center;min-height:44px;padding:0 6px;white-space:nowrap;cursor:pointer}
.site-header-slot .site-slot-item:not(.site-nav-btn){background:none;border:0}
.site-header-slot .site-slot-item:not(.site-nav-btn):hover{text-decoration:underline;text-underline-offset:4px}
.site-header-slot .site-slot-item[aria-current="page"]{font-weight:700;text-decoration:underline;text-decoration-color:var(--cl-orange);text-decoration-thickness:2px;text-underline-offset:6px}
.site-header-slot .site-nav-btn{padding:0 18px;color:var(--cl-on-ink);background:var(--cl-ink);border:1px solid var(--cl-ink)}
.site-header-slot [data-auth]{display:none}
.cl-signed-in .site-header-slot [data-auth]{display:inline-flex}
.site-header-slot .site-account-label{display:none !important}
.cl-signed-in .site-header-multi .site-nav .site-nav-signin,.cl-signed-in .site-header-multi .site-nav .site-nav-signedout{display:none}
.site-header-multi a:focus-visible,.site-header-slot .site-slot-item:focus-visible{outline:3px solid var(--cl-ink);outline-offset:2px}
@media(max-width:700px){
  .site-header-slot{gap:0 2px;flex-wrap:wrap}
  .site-header-slot .site-slot-item{padding:0 5px;font-size:12px}
  .site-header-slot .site-nav-btn{padding:0 10px}
}

/* Buttons. Ink: the main call to action; a "Coming soon" action stays ink with an orange-on-ink label. The disabled rule keeps
   its !important and -webkit-text-fill-color on purpose: iPhone Safari greys disabled buttons through its own styles. */
.cl-btn-ink{font:inherit;padding:13px 21px;border-radius:var(--cl-radius-sm);background:var(--cl-ink);color:var(--cl-orange-on-ink);-webkit-text-fill-color:var(--cl-orange-on-ink);border:1px solid var(--cl-ink);font-weight:700;opacity:1}
.cl-btn-ink:disabled,.cl-btn-ink[aria-disabled="true"]{background:var(--cl-ink) !important;color:var(--cl-orange-on-ink) !important;-webkit-text-fill-color:var(--cl-orange-on-ink);border:1px solid var(--cl-ink);opacity:1 !important;cursor:not-allowed;font-weight:700}
.cl-btn-orange{font:inherit;color:var(--cl-ink);text-decoration:none;padding:12px 17px;border:1px solid var(--cl-orange-deep);font-weight:700;border-radius:var(--cl-radius-sm);background:var(--cl-orange)}

/* Panel: white card with a line border. Pages add their own radius, padding and layout. */
.cl-panel{background:var(--cl-panel);border:1px solid var(--cl-line)}

/* Footer: ink band holding the legal block (markup in main-app/site-shell/footer.tpl; the text layout for the legal block is below,
   moved here from the per-page inline #legal-footer-style, which the homepage still carries with the same values). */
.site-footer{padding:20px var(--cl-gutter);border-top:1px solid var(--cl-line);display:flex;justify-content:space-between;gap:20px;background:var(--cl-ink);color:var(--cl-footer-text);font-size:12px}
.site-footer .legal-footer{flex:0 0 100%;font-size:12px;line-height:1.6;text-align:center;overflow-wrap:anywhere}
.site-footer .legal-footer p,.site-footer .legal-footer address{max-width:640px;margin:0 auto 6px;font-style:normal}
.site-footer .legal-footer-home{flex:1 1 auto;text-align:left}
.site-footer .legal-footer-home p,.site-footer .legal-footer-home address{margin:0 0 6px}
.site-footer .legal-footer-side{max-width:420px}
.site-footer .legal-footer-side p{margin:0 0 10px;line-height:1.6}
@media(max-width:700px){.site-footer{flex-direction:column}.site-footer .legal-footer-side{max-width:none}}

/* 404 page (dist/404.html, served by the web01 Caddy for any unknown path). Layout only: header and footer are the shared ones.
   The wrapper keeps the footer at the bottom of short pages; min-width:0 and overflow-wrap keep long text from scrolling sideways. */
.cl-404{min-height:100vh;display:flex;flex-direction:column;background:var(--cl-surface);color:var(--cl-ink);font-family:var(--cl-font-sans);font-size:15px;line-height:1.55;color-scheme:light}
.cl-404 .site-footer{margin-top:auto}
.cl-404-main{flex:1 0 auto;padding:var(--cl-hero-y) var(--cl-gutter);max-width:760px;min-width:0;width:100%;box-sizing:border-box}
.cl-404-eyebrow{font-size:11px;font-weight:700;letter-spacing:1.7px;text-transform:uppercase;color:var(--cl-text-eyebrow);margin:0 0 17px}
.cl-404-title{font-size:clamp(36px,5vw,59px);line-height:1.03;font-weight:800;letter-spacing:-2px;margin:0 0 23px;overflow-wrap:anywhere}
.cl-404-title .brand-dot{color:var(--cl-orange)}
.cl-404-lead{font-size:17px;color:var(--cl-text-muted);max-width:410px;margin:0 0 26px}
.cl-404-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.cl-404-link{color:var(--cl-ink);font-weight:700;text-decoration:underline;text-underline-offset:3px;padding:12px 4px}

/* Legal links in the shared footer, the /terms/ and /privacy/ pages (Mike, 18 Nov 2026). */
.site-footer .legal-links{margin:6px 0 0}
.site-footer .legal-links a{color:inherit;text-decoration:underline;text-underline-offset:3px;display:inline-block;padding:10px 0}
.site-footer .legal-links a:focus-visible{outline:2px solid var(--cl-orange-on-ink);outline-offset:2px}
.cl-legal{min-height:100vh;display:flex;flex-direction:column;background:var(--cl-surface);color:var(--cl-ink);font-family:var(--cl-font-sans);font-size:16px;line-height:1.65;color-scheme:light}
.cl-legal .site-footer{margin-top:auto}
.cl-legal-main{flex:1 0 auto;padding:var(--cl-section-y) var(--cl-gutter);max-width:820px;min-width:0;width:100%;box-sizing:border-box}
.cl-legal-eyebrow{font-size:11px;font-weight:700;letter-spacing:1.7px;text-transform:uppercase;color:var(--cl-text-eyebrow);margin:0 0 12px}
.cl-legal-title{font-size:clamp(32px,4.5vw,48px);line-height:1.05;font-weight:800;letter-spacing:-1.5px;margin:0 0 12px;overflow-wrap:anywhere}
.cl-legal-title .brand-dot{color:var(--cl-orange)}
.cl-legal-dates{color:var(--cl-text-muted);font-size:14px;margin:0 0 32px}
.cl-legal-main h2{font-size:20px;line-height:1.3;margin:36px 0 10px;letter-spacing:-.3px}
.cl-legal-main p,.cl-legal-main li{max-width:72ch}
.cl-legal-main ul{padding-left:22px}
.cl-legal-main li{margin:0 0 6px}
.cl-legal-main a{color:var(--cl-orange-text);text-underline-offset:3px}
.cl-legal-main a:focus-visible{outline:2px solid var(--cl-orange);outline-offset:2px}
.cl-legal-table{overflow-x:auto;margin:0 0 16px}
.cl-legal-main table{border-collapse:collapse;width:100%;background:var(--cl-panel);font-size:14px}
.cl-legal-main th,.cl-legal-main td{border:1px solid var(--cl-line);padding:8px 10px;text-align:left;vertical-align:top}
.cl-legal-main th{background:var(--cl-surface)}

/* Page transitions (style plan step 5). Progressive enhancement: browsers with cross-document View Transitions fade the page
   content in about 150 ms when moving between shell pages; others navigate as before. The header and footer get their own names only
   while a transition is active (a permanent name changed footer text pixels in Chrome), so they stay in place and only the content between them fades. Off under reduced motion. Admin and the Development Center
   do not load this file. Each name is used once per page (main-app/tests/transitions.test.mjs). */
/* The Terms pop-up (terms-gate.js) (Mike, 18 Nov 2026). */
.cl-terms-dialog{max-width:520px;width:calc(100% - 32px);overflow-wrap:break-word;box-sizing:border-box;border:1px solid var(--cl-line);border-top:5px solid var(--cl-orange);border-radius:var(--cl-radius-xl);padding:var(--cl-pad-panel);background:var(--cl-panel);color:var(--cl-ink);font-family:var(--cl-font-sans);font-size:15px;line-height:1.55;color-scheme:light}
.cl-terms-dialog::backdrop{background:#111827cc}
.cl-terms-dialog h2{margin:0 0 10px;font-size:22px;letter-spacing:-.4px}
.cl-terms-dialog p{margin:0 0 12px;font-size:15px;line-height:1.55;color:inherit}
.cl-terms-links{margin:0 0 12px;padding-left:24px}
.cl-terms-links li{padding:2px 0}
.cl-terms-step-status{font-size:13px;font-weight:700;white-space:nowrap}
.cl-terms-step-opened{color:#05603a}
.cl-terms-step-pending{color:var(--cl-text-muted)}
.cl-terms-dialog .cl-terms-about{font-size:13px;color:var(--cl-text-muted)}
.cl-terms-dialog .cl-terms-hint{margin:10px 0 0;line-height:1.55;font-size:14px;font-weight:600}
.cl-terms-links a{color:var(--cl-orange-text);font-weight:700;text-underline-offset:3px;display:inline-block;padding:6px 0}
.cl-terms-agree{display:flex;gap:10px;align-items:flex-start;margin:0 0 10px;cursor:pointer}
.cl-terms-agree:has(input:disabled){cursor:not-allowed;color:var(--cl-text-muted)}
.cl-terms-agree input:disabled{cursor:not-allowed;opacity:.5}
/* Specificity 0,3,1 beats styles.css `dialog input:not([type=file])` (0,1,2) and `input[type=checkbox]` (0,1,1). */
.cl-terms-dialog .cl-terms-agree input[type=checkbox]{width:20px;height:20px;min-width:0;padding:0;margin:2px 0 0;border:0;background:none;box-shadow:none;flex:0 0 auto;accent-color:var(--cl-orange)}
.cl-terms-agree span{flex:1 1 auto;min-width:0}
.cl-terms-dialog .cl-terms-message{color:#b42318;min-height:1em}
.cl-terms-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.cl-terms-actions button{min-height:44px}
.cl-terms-actions .cl-btn-orange[disabled]{opacity:.55;cursor:not-allowed}
.cl-terms-signout{background:none;border:0;color:var(--cl-ink);font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:3px;padding:10px 4px;cursor:pointer}
.cl-terms-dialog :focus-visible{outline:2px solid var(--cl-orange);outline-offset:2px}
.cl-terms-dialog .cl-terms-version{font-size:12px;color:var(--cl-text-muted);margin:12px 0 0}

@view-transition{navigation:auto}
@media(prefers-reduced-motion:reduce){@view-transition{navigation:none}}
html:active-view-transition .site-header{view-transition-name:cl-header}
html:active-view-transition .site-footer{view-transition-name:cl-footer}
::view-transition-group(root),::view-transition-old(root),::view-transition-new(root){animation-duration:150ms}
::view-transition-old(cl-header),::view-transition-old(cl-footer){display:none}
::view-transition-new(cl-header),::view-transition-new(cl-footer){animation:none}
::view-transition-group(cl-header),::view-transition-group(cl-footer){animation-duration:0s}
