/* A solid paper canvas beneath iOS chrome. The system owns its status-bar effects.
   Insets are zero on ordinary desktop pages and grow only when the browser exposes them. */
:root{--telos-safe-top:env(safe-area-inset-top,0px)}
html{background:#f4efe3}
body{background:#f4efe3;padding-top:var(--telos-safe-top)}
body::before{content:"";position:fixed;inset:0 0 auto;height:var(--telos-safe-top);background:#f4efe3;pointer-events:none;z-index:10}
.header,.app-header{background:#f4efe3}
.skip:focus{top:calc(10px + var(--telos-safe-top))}

/* Public header only: keep folded-screen navigation outside reported side
   system insets. Zero insets leave ordinary phones unchanged; Open Book
   uses .app-header and is not part of this rule. */
@media(max-width:599px) and (orientation:portrait){
 .header{margin-right:max(0px,calc(env(safe-area-inset-right,0px) - 4px));margin-left:max(0px,calc(env(safe-area-inset-left,0px) - 4px))}
}

/* Shared gateway: approved compact, repaired Greek-key ring (Figma 307:602).
   Each part has its own opacity; the entire ring rotates around (74.5203266, 28).
   The rust/seam exports contain .55/.35 opacity. Their wrappers apply ratios,
   so rendered resting values are exactly .40/.27, with no overall fade. */
@font-face{font-family:Marcellus;src:url('/marcellus-regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
.site-gateway{position:relative;display:block;flex:none;width:140px;height:56px;padding:0;border:0;border-radius:4px;background:var(--paper,#f4efe3);color:var(--rust,#aa5035);font:400 22px/28px Marcellus,Georgia,serif;letter-spacing:normal;text-decoration:none;white-space:nowrap;isolation:isolate;-webkit-tap-highlight-color:transparent}
.gateway-ring{position:absolute;display:block;left:47.7922153px;top:1.2718887px;width:53.4562226px;height:53.4562226px;transform-origin:26.7281113px 26.7281113px;pointer-events:none;user-select:none}
.gateway-ring img{position:absolute;display:block;max-width:none;pointer-events:none;user-select:none}
.gateway-ring-olive{position:absolute;left:-2.2718896px;top:-2.2721595px;width:58px;height:58px;opacity:.15;mask:url('/gateway-ring-mask.svg') 0 0/58px 58px no-repeat;mask-mode:alpha}
.gateway-ring-rust{left:-4.7955699px;top:5.1629105px;transform-origin:0 0;transform:rotate(-15deg);opacity:.7272727273}
.gateway-ring-seam{left:0;top:0;opacity:.7714285714}
.site-gateway[data-gateway="together"]>.gateway-ring{transform:rotate(60deg)}
.site-gateway .gateway-label{position:absolute;left:4px;top:14px;width:116px;text-align:center;pointer-events:none}
.site-gateway .gateway-chevron{position:absolute;left:128px;top:15px;font:400 20px/24px var(--sans,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif);pointer-events:none}
.site-gateway[data-gateway="together"] .gateway-label{left:14px}
.site-gateway:hover .gateway-label{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.site-gateway:focus-visible{outline:3px solid var(--rust,#aa5035);outline-offset:3px}
.header .wordmark,.app-header .wordmark{font-family:Marcellus,Georgia,serif;align-items:center}
.wordmark .brand-period{color:#aa5035}
.app-nav .flock-icon{display:block;max-width:none;flex:none;stroke-width:1.45}
/* Align the whole brand block with the switcher, not separate text baselines. */
@media(max-width:849px){
 .app-header{height:80px;min-height:80px;position:relative}
 .header.has-account{align-items:center;padding-top:12px}
 .header.has-account .wordmark,.app-header .wordmark{font-size:28px;line-height:34px;letter-spacing:normal;gap:6px}
 .header.has-account .wordmark small,.app-header .wordmark small{font-size:7px;line-height:10px;letter-spacing:normal;margin-top:0;max-width:none;white-space:nowrap;color:var(--muted)}
 .header.has-account .permanent-logo,.app-header .seal{width:38px;height:43px}
 .header.has-account .nav{margin-top:8px}
 .app-header .pilot-label{position:absolute;right:0;top:66px;font-size:9px}
}
@media(max-width:359px){
 .header.has-account .wordmark small,.app-header .wordmark small{font-size:6px}
 .header.has-account .wordmark,.app-header .wordmark{font-size:25px;gap:4px}
 .header.has-account .permanent-logo,.app-header .seal{width:30px;height:35px}
}
/* Let enlarged text reflow in the ordinary phone header. The gateway's artwork
   keeps its approved size and pivot; only its text box grows with the type.
   Rail gateways live outside this header and retain their own geometry. */
@media(max-width:849px){
 .app-header{height:auto;flex-wrap:wrap;gap:8px;padding:11px 0;box-sizing:border-box}
 .app-header .wordmark{min-width:0;line-height:max(34px,1.2142857em)}
 .app-header .wordmark>span{min-width:0}
 .app-header .wordmark small{white-space:normal;line-height:1.4285714}
 .app-header .portal-account{margin-left:auto;max-width:100%}
 .app-header .site-gateway{width:max(140px,6.3636364em);height:max(56px,2.5454546em);max-width:100%}
 .app-header .site-gateway>.gateway-ring{left:calc(50% - 22.2077847px);top:calc(50% - 26.7281113px)}
 .app-header .site-gateway .gateway-label{width:calc(100% - 24px);top:50%;margin-top:-.6363636em;line-height:1.2727273}
 .app-header .site-gateway .gateway-chevron{left:auto;right:3.75px;top:50%;margin-top:-.6em;line-height:1.2}
 .app-header:has(.pilot-label:not([hidden])){padding-bottom:max(24px,1.4em)}
 .app-header .pilot-label{top:auto;bottom:8px}
}
/* Existing native C2 rotation and label tracks; 10 + 330 + 10 + 120 = 470ms.
   Only artwork, pivot and explicitly approved per-part opacity changed. */
@property --gateway-rotate-transform{syntax:'<angle>';initial-value:0rad;inherits:false}
.gateway-travel{display:none;transform:rotate(var(--gateway-rotate-transform,0rad))}
.site-gateway.is-crossing>.gateway-ring:not(.gateway-travel){visibility:hidden}
.site-gateway.is-crossing .gateway-travel{display:block;animation-duration:.47s;animation-timing-function:linear;animation-iteration-count:1;animation-fill-mode:both;will-change:transform}
.site-gateway.is-crossing[data-gateway="together"] .gateway-travel{transform:rotate(var(--gateway-rotate-transform,0rad));animation-name:telos_gateway_forward_rotate_0}
.site-gateway.is-crossing[data-gateway="my-part"] .gateway-travel{transform:rotate(calc(60deg + var(--gateway-rotate-transform,0rad)));animation-name:telos_gateway_return_rotate_0}
.site-gateway.is-crossing .gateway-travel .gateway-ring-olive{animation:telos_gateway_olive_0 .47s linear 1 both}
.site-gateway.is-crossing .gateway-travel .gateway-ring-rust{animation:telos_gateway_rust_0 .47s linear 1 both}
.site-gateway.is-crossing .gateway-travel .gateway-ring-seam{animation:telos_gateway_seam_0 .47s linear 1 both}
.site-gateway.is-crossing[data-gateway="together"] .gateway-label{left:4px;animation:telos_gateway_label_0 .47s linear 1 both}
@keyframes telos_gateway_olive_0{0%{opacity:.24}2.128%{animation-timing-function:ease-out;opacity:.24}72.34%{opacity:.19}74.468%{animation-timing-function:ease-out;opacity:.19}100%{opacity:.15}}
@keyframes telos_gateway_rust_0{0%{opacity:1}2.128%{animation-timing-function:ease-out;opacity:1}72.34%{opacity:.8363636364}74.468%{animation-timing-function:ease-out;opacity:.8363636364}100%{opacity:.7272727273}}
@keyframes telos_gateway_seam_0{0%{opacity:1}2.128%{animation-timing-function:ease-out;opacity:1}72.34%{opacity:1}74.468%{animation-timing-function:ease-out;opacity:1}100%{opacity:.7714285714}}
@keyframes telos_gateway_forward_rotate_0{0%{--gateway-rotate-transform:0rad}2.128%{animation-timing-function:ease-out;--gateway-rotate-transform:0rad}72.34%{--gateway-rotate-transform:1.1rad}74.468%{animation-timing-function:ease-out;--gateway-rotate-transform:1.1rad}100%{--gateway-rotate-transform:1.047rad}}
@keyframes telos_gateway_return_rotate_0{0%{--gateway-rotate-transform:0rad}2.128%{animation-timing-function:ease-out;--gateway-rotate-transform:0rad}72.34%{--gateway-rotate-transform:-1.1rad}74.468%{animation-timing-function:ease-out;--gateway-rotate-transform:-1.1rad}100%{--gateway-rotate-transform:-1.047rad}}
@keyframes telos_gateway_label_0{0%{translate:0px 0px}2.128%{animation-timing-function:ease-out;translate:0px 0px}72.34%{translate:10px 0px}100%{translate:10px 0px}}
@media(prefers-reduced-motion:reduce){.site-gateway.is-crossing>.gateway-ring:not(.gateway-travel){visibility:visible}.site-gateway.is-crossing .gateway-travel{display:none;animation:none}.site-gateway.is-crossing[data-gateway="together"] .gateway-label{left:14px;animation:none;translate:none}}

/* Signed-in public reciprocal switch; same reviewed geometry as My Part. */
.public-inset-probe{position:fixed;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.site-account.folded-public-gateway{position:fixed;top:var(--public-gateway-top,262px);right:var(--public-gateway-right,16px);width:52px;height:52px;margin:0;padding:0;z-index:6}
.folded-public-gateway .site-gateway{width:52px;height:52px;border-radius:14px;background:#dde1c9}
.folded-public-gateway .site-gateway>.gateway-ring{left:-.728111px;top:-.728111px;scale:.75}
.folded-public-gateway .site-gateway:not(.is-crossing)>.gateway-ring .gateway-ring-olive{opacity:.34}
.folded-public-gateway .site-gateway:not(.is-crossing)>.gateway-ring .gateway-ring-rust{opacity:.85}
.folded-public-gateway .site-gateway .gateway-chevron{display:block;left:0;top:12px;width:52px;text-align:center;font-size:26px;line-height:28px}
.folded-public-gateway .gateway-label{position:absolute!important;left:0!important;top:0!important;width:1px!important;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
body:has(dialog[open]) .folded-public-gateway{visibility:hidden}

.header:has(.folded-public-gateway) .wordmark{flex:1 0 100%}
body:has(.folded-public-gateway) .wrap{width:auto;margin-left:max(16px,env(safe-area-inset-left));margin-right:calc(var(--public-gateway-inset) + 12px)}
body:has(.folded-public-gateway) .header{margin-left:0;margin-right:0}
