/* Panel's lobes' layer: what every root wears. Ported from pretorio-docs/design/components/pretorio.css, declaration by
   declaration, for the classes Panel's look draws. A tree holds no `i`, `b` or `aria-pressed` (SCREEN-2), so what the
   source styles by those is styled here by a class of the same block: `.p-rail a` is `.p-rail .p-rail-item`, `[aria-pressed]`
   is `[aria-current]`; a class is lowercase letters, digits and dashes, so `p-unit__row` is `p-unit-row`. Every selector
   names a class (LOOK-3). */

/* ---------- Base ---------- */
/* The ground of whatever root wears Panel: a page of parts stands on the chassis, never on the document's white. */
:host { display: block; background: var(--c-chassis); color: var(--c-ink); }
.p-app { container-type: inline-size; container-name: app tablet desk; box-sizing: border-box; display: block; background: var(--c-chassis); color: var(--c-ink); font-style: normal; font-weight: 450; font-size: var(--t-sm); line-height: 1.45; font-family: var(--font-body); font-optical-sizing: auto; font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.p-app--screen { min-height: 100%; min-height: 100dvh; display: flex; flex-direction: column; }
.p-app--screen > .p-shell { flex: 1; }
/* LOOK-13, SCREEN-9. What the home told the draw: the class of the screen's size names which of the sizes below the
   root may take, whatever its width, so a phone's app on its side stays a pocket and a tablet's never takes a desk's
   rail; with none told, the root's width alone decides. Met as an app, the root keeps clear of the device's edges and
   corners: the screen inside the safe area, its rail at the foot clear of the bottom's. */
.p-size-compact { container-name: app; }
.p-size-medium { container-name: app tablet; }
.p-size-expanded { container-name: app tablet desk; }
.p-app--screen.p-met-app { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
.p-met-app .p-rail { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.p-app *, .p-app *::before, .p-app *::after { box-sizing: border-box; }
.p-app h1, .p-app h2, .p-app h3, .p-app h4, .p-app p, .p-app ol, .p-app ul, .p-app dl, .p-app dd, .p-app figure { margin: 0; padding: 0; }
.p-app ol, .p-app ul { list-style: none; }
.p-app button, .p-app input, .p-app textarea, .p-app select { font: inherit; color: inherit; letter-spacing: inherit; }
.p-app button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.p-app a { color: inherit; -webkit-tap-highlight-color: transparent; }
.p-app :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
.p-app ::selection { background: var(--c-accent-soft); color: var(--c-ink); }
.p-app * { scrollbar-width: none; }
.p-app *::-webkit-scrollbar { display: none; }
.p-icon { width: 20px; height: 20px; flex: none; display: block; }
.p-mono { font-family: var(--font-mono); font-feature-settings: normal; }
.p-icon--s { width: 16px; height: 16px; }
.p-num { font-variant-numeric: tabular-nums; }
.p-st, .p-small { font-size: var(--t-xs); color: var(--c-muted); }
.p-small { line-height: 1.5; }
.p-muted { color: var(--c-muted); }
.p-eyebrow { font-size: var(--t-xs); font-weight: 550; color: var(--c-muted); letter-spacing: .01em; }
.p-cap { text-transform: capitalize; }

/* ---------- Layout ---------- */
.p-stack { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.p-stack--wide { gap: var(--s-4); }
.p-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-width: 0; }
.p-between { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); min-width: 0; }

/* ---------- Type ---------- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 240px), 100%), 1fr)); gap: var(--gap, var(--s-3)); }
.p-display { font-family: var(--font-display); font-size: clamp(40px, 9cqw, var(--t-display)); font-weight: 650; letter-spacing: -.035em; line-height: .98; text-wrap: balance; }
.p-title { font-family: var(--font-display); font-size: var(--t-xl); font-weight: 650; letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
.p-heading { font-size: var(--t-md); font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
.p-lede { font-size: var(--t-md); color: var(--c-muted); line-height: 1.5; text-wrap: pretty; }

/* ---------- Brand ---------- */
.p-mark { width: 28px; height: 28px; flex: none; display: block; }
.p-mark-tile { fill: var(--c-brand-tile); }
.p-mark-stem { fill: var(--c-brand-stem); }
.p-mark-lit { fill: var(--c-brand-lit); }
.p-logo { display: inline-flex; align-items: center; gap: 10px; min-height: var(--press); color: var(--c-ink) !important; text-decoration: none; }
.p-logo-word { height: 20px; width: auto; flex: none; display: block; fill: currentColor; }

/* ---------- The shell ---------- */
.p-shell { display: flex; flex-direction: column; min-height: 100%; }
.p-rail { order: 2; position: sticky; bottom: 0; z-index: 5; display: flex; gap: 2px; padding: 6px var(--s-2) 10px; background: var(--c-glass); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 -1px 0 var(--c-hair); }
.p-rail-brand { display: none; }
.p-rail-brand .p-mark { width: 22px; height: 22px; }
.p-rail .p-rail-item { flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--c-muted); font-size: 11.5px; font-weight: 550; letter-spacing: .005em; text-decoration: none; position: relative; border-radius: var(--r-inner); }
.p-rail .p-rail-item > .p-icon { width: 22px; height: 22px; padding: 0; transition: color .15s; }
.p-rail .p-rail-item[aria-current] { color: var(--c-accent); }
.p-rail .p-rail-item[aria-current] > .p-icon { stroke-width: 2; }
.p-main { order: 1; flex: 1; min-width: 0; padding: var(--s-4) var(--s-4) var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); }
.p-content { width: 100%; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-5); }
.p-content--read { max-width: 600px; }
.p-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding-top: var(--s-2); }
.p-live { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-xs); color: var(--c-muted); font-weight: 500; }
.p-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-ok-glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-ok-glow) 20%, transparent); animation: p-breathe 2.4s ease-in-out infinite; }
.p-live--off .p-live-dot { background: var(--c-idle); box-shadow: none; animation: none; }
.p-section { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.p-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); font-size: var(--t-sm); font-weight: 600; letter-spacing: -.005em; color: var(--c-ink); }
.p-section-aside { font-size: var(--t-xs); font-weight: 500; color: var(--c-muted); }
.p-bar { display: flex; align-items: center; gap: var(--s-2); justify-content: space-between; padding: 0 var(--s-4); min-height: 60px; background: var(--c-glass); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 1px 0 var(--c-hair); position: sticky; top: 0; z-index: 6; }

/* ---------- Modules: one edge, drawn inside, so nothing shifts ---------- */
.p-mod, .p-unit, .p-list, .p-feed-list { background: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair), var(--c-lift); border: 0; border-radius: var(--r-module); }
.p-mod { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; text-decoration: none; text-align: left; }
.p-mod--sunk { background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); }

/* ---------- Actions ---------- */
.p-btn { min-height: var(--press); padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); border: 0; border-radius: var(--r-inner); font-weight: 550; letter-spacing: -.005em; text-decoration: none; white-space: nowrap; background: var(--c-accent); color: var(--c-on-accent) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px color-mix(in srgb, var(--c-accent) 30%, transparent); transition: background-color .15s, box-shadow .15s; }
.p-btn:hover { background: color-mix(in srgb, var(--c-accent) 90%, var(--c-ink)); }
.p-btn--secondary { background: var(--c-module); color: var(--c-ink) !important; box-shadow: inset 0 0 0 1px var(--c-hair-strong), var(--c-lift); }
.p-btn--secondary:hover { background: var(--c-sunk); }
.p-btn--quiet { background: transparent; color: var(--c-accent) !important; box-shadow: none; padding: 0 var(--s-3); }
.p-btn--quiet:hover { background: var(--c-accent-soft); }
.p-btn--danger { background: var(--c-alert); color: var(--c-on-alert) !important; box-shadow: none; }
.p-btn--danger:hover { background: color-mix(in srgb, var(--c-alert) 88%, var(--c-ink)); }
.p-btn--block { width: 100%; }
.p-btn[disabled] { opacity: .4; cursor: default; pointer-events: none; }
.p-btn:active, .p-nub:active { transform: scale(.985); }
.p-nub { min-height: var(--press); display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-nub); background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); font-weight: 550; font-size: var(--t-sm); }
.p-nub:hover { box-shadow: inset 0 0 0 1px var(--c-hair-strong); }
.p-nub--big { font-size: 22px; font-weight: 400; }
.p-nub--on { background: var(--c-accent); color: var(--c-on-accent); box-shadow: none; }
.p-nub--wide { width: 100%; }
.p-nub[disabled] { color: var(--c-faint); cursor: default; }
.p-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.p-seg { display: flex; gap: 2px; padding: 3px; background: var(--c-sunk); border-radius: var(--r-inner); box-shadow: inset 0 0 0 1px var(--c-hair); max-width: 100%; }
.p-seg button { flex: 1; min-width: 0; min-height: 38px; padding: 0 var(--s-3); border: 0; border-radius: 8px; background: transparent; color: var(--c-muted); font-weight: 550; line-height: 1.2; text-wrap: balance; transition: color .15s, background-color .15s; }
.p-seg button:hover { color: var(--c-ink); }
.p-seg button[aria-current="true"] { background: var(--c-module); color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-hair), 0 1px 2px rgba(14,20,36,.06); }

/* ---------- Inputs ---------- */
.p-field { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-xs); font-weight: 550; color: var(--c-ink); min-width: 0; }
.p-field input, .p-field textarea, .p-field select { min-height: var(--press); width: 100%; padding: 10px var(--s-3); border: 0; border-radius: var(--r-inner); background: var(--c-module); box-shadow: inset 0 0 0 1px var(--c-hair-strong), var(--c-lift); font: inherit; font-size: var(--t-sm); font-weight: 450; color: var(--c-ink); transition: box-shadow .15s; resize: vertical; }
.p-field input::placeholder, .p-field textarea::placeholder { color: var(--c-faint); }
.p-field input:focus, .p-field textarea:focus, .p-field select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--c-accent), 0 0 0 3px var(--c-accent-soft); }
.p-field small { font-size: var(--t-xs); font-weight: 450; color: var(--c-muted); }

/* ---------- Feedback ---------- */
.p-banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: 14px var(--s-4); border-radius: var(--r-module); background: var(--c-accent-soft); color: var(--c-ink); line-height: 1.5; }
.p-banner > .p-icon { margin-top: 1px; color: var(--c-accent); }
.p-banner-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-banner-body strong { font-weight: 600; }
.p-banner-text { color: var(--c-muted); }
.p-banner--plain { background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); }
.p-banner--plain > .p-icon { color: var(--c-muted); }
.p-banner--alert { background: color-mix(in srgb, var(--c-alert-glow) 8%, var(--c-module)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-alert-glow) 30%, transparent); }
.p-banner--alert > .p-icon { color: var(--c-alert); }
.p-empty { padding: var(--s-7) var(--s-5); text-align: center; display: flex; flex-direction: column; gap: var(--s-2); align-items: center; }
.p-empty .p-muted { max-width: 40ch; }

/* ---------- Lights ---------- */
.p-led { width: 7px; height: 7px; border-radius: 50%; background: var(--c-idle); flex: none; display: inline-block; }
.is-heat .p-led { background: var(--c-heat-glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-heat-glow) 22%, transparent); animation: p-breathe 2.4s ease-in-out infinite; }
.is-cool .p-led { background: var(--c-cool-glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-cool-glow) 22%, transparent); animation: p-breathe 2.4s ease-in-out infinite; }
.is-fine .p-led, .p-led.is-fine { background: var(--c-ok-glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-ok-glow) 20%, transparent); }
.is-alert .p-led, .p-led.is-alert { background: var(--c-alert-glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-alert-glow) 22%, transparent); animation: p-breathe 1.6s ease-in-out infinite; }
.is-heat .p-st { color: var(--c-heat); }
.is-cool .p-st { color: var(--c-cool); }
.p-hatched { background-image: repeating-linear-gradient(135deg, var(--c-hatch) 0 5px, transparent 5px 10px); }

/* ---------- A device ---------- */
.p-bank { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.p-unit { position: relative; overflow: hidden; min-height: 156px; padding: var(--s-4); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-3); min-width: 0; grid-column: span 2; transition: background-color .4s, box-shadow .15s; }
.p-unit--wide { grid-column: span 4; }
.p-unit-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 var(--s-2); min-width: 0; }
/* A tile's name shrinks to its ellipsis beside the light; a reading and its word wrap where large text leaves no room. */
.p-unit-row > .p-unit-name { flex: 1 1 0; min-width: 0; }
.p-unit-name { font-weight: 550; font-size: var(--t-sm); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-read { font-size: var(--t-reading); font-weight: 550; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.p-word { font-size: var(--t-lg); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.p-unit.is-heat { background: color-mix(in srgb, var(--c-heat-glow) 7%, var(--c-module)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-heat-glow) 22%, var(--c-hair)), var(--c-lift); }
.p-unit.is-cool { background: color-mix(in srgb, var(--c-cool-glow) 7%, var(--c-module)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-cool-glow) 22%, var(--c-hair)), var(--c-lift); }
.p-unit.p-hatched { background-color: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair-strong); }
.is-heat .p-nub, .is-cool .p-nub { background: color-mix(in srgb, var(--c-module) 75%, transparent); }

/* ---------- Showing data ---------- */
.p-list { overflow: hidden; }
.p-lrow { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); min-height: 60px; text-decoration: none; box-shadow: 0 1px 0 var(--c-hair); width: 100%; border: 0; background: transparent; text-align: left; transition: background-color .15s; }
.p-lrow--go:hover { background: var(--c-sunk); }
.p-lrow:last-child { box-shadow: none; }
.p-lrow-l { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.p-lrow-title { display: block; font-weight: 550; }
.p-lrow-meta { display: block; font-size: var(--t-xs); color: var(--c-muted); line-height: 1.45; }
.p-lrow-go { color: var(--c-faint); width: 18px; height: 18px; }
.p-kv { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 10px var(--s-3); }
.p-kv > dt { color: var(--c-muted); }
.p-kv > dd { font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.p-code { padding: 10px var(--s-3); border-radius: var(--r-inner); background: var(--c-sunk); box-shadow: inset 0 0 0 1px var(--c-hair); font-family: var(--font-mono); font-size: var(--t-xs); overflow-wrap: anywhere; color: var(--c-ink); }

@keyframes p-breathe { 50% { opacity: .45; } }

/* ---------- The app's screen sizes ---------- */
@container tablet (min-width: 720px) {
  .p-shell { flex-direction: row; }
  .p-rail { order: 0; position: static; align-self: stretch; width: 84px; flex: none; flex-direction: column; gap: 4px; padding: var(--s-4) 10px; background: var(--c-module); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 1px 0 0 var(--c-hair); }
  .p-rail-brand { display: flex; justify-content: center; margin: 0 0 var(--s-4); min-height: 40px; align-items: center; }
  .p-rail-brand .p-logo-word { display: none; }
  .p-rail-brand .p-logo { min-height: 60px; }
  .p-rail .p-rail-item { flex: none; min-height: 60px; }
  .p-rail .p-rail-item[aria-current] { background: var(--c-accent-soft); }
  .p-main { padding: var(--s-6) var(--s-6) var(--s-7); }
  .p-title { font-size: 32px; }
  .p-bank { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@container desk (min-width: 1200px) {
  .p-rail { width: 248px; padding: var(--s-5) var(--s-3); gap: 2px; }
  .p-rail-brand { justify-content: flex-start; padding: 0 var(--s-2); margin-bottom: var(--s-5); }
  .p-rail-brand .p-logo-word { display: block; }
  .p-rail-brand .p-logo { gap: var(--s-3); padding: 0 var(--s-3); min-height: 40px; }
  .p-rail-brand .p-mark { width: 20px; height: 20px; }
  .p-rail .p-rail-item { flex-direction: row; justify-content: flex-start; gap: var(--s-3); min-height: 40px; padding: 0 var(--s-3); font-size: 14px; font-weight: 550; letter-spacing: -.005em; }
  .p-rail .p-rail-item > .p-icon { width: 20px; height: 20px; }
  .p-rail .p-rail-item:hover { background: var(--c-sunk); color: var(--c-ink); }
  .p-rail .p-rail-item[aria-current] { background: var(--c-sunk); color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-hair); }
  .p-rail .p-rail-item[aria-current] > .p-icon { color: var(--c-accent); }
  .p-bank { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .p-unit { grid-column: span 3; }
  .p-unit--wide { grid-column: span 6; }
}
@media (prefers-reduced-motion: reduce) { .p-app *, .p-app *::before, .p-app *::after { animation: none !important; transition: none !important; } .p-btn:active, .p-nub:active { transform: none; } }

/* What a site's own script hides stays hidden, whatever display a block wears. */
.p-app [hidden] { display: none !important; }
