/* ==========================================================================
   The System only (src/pages/system/index.html). Loaded after site.css.
   Source: P-System mockup. Tokens and components come from site.css.
   No raw hex here: var(--token) only.
   ========================================================================== */

/* 1. Hero ----------------------------------------------------------------- */
.sys-hero{min-height:640px}
.sys-hero .display{max-width:none;font-size:clamp(3rem, 5.6vw, 4.75rem)}
.sys-hero .display strong{display:block}
.sys-hero__beam{right:22%;top:200px;width:78%;height:200px}
.sys-hero__orb{right:6%;top:30px;width:520px;height:520px}
.sys-hero__fog-a{left:-15%;top:340px;width:90%;height:320px}
.sys-hero__fog-b{right:-20%;top:420px;width:80%;height:280px}

/* Frosted phase index. Static: no reveal, no transition on the card itself. */
.sys-phases{
  position:absolute;z-index:3;
  right:max(4%, calc((100% - var(--wrap)) / 2 + var(--gutter)));
  top:340px;width:360px;max-width:90%;
  padding:22px 24px;display:flex;flex-direction:column;gap:4px;
}
.sys-phases__head{font-size:.9375rem;font-weight:500;color:var(--text-muted);padding-bottom:8px}
.sys-phases__link{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding:10px;border-radius:12px;border-top:1px solid var(--line);text-decoration:none;font-size:1.1875rem;font-weight:600;transition:background-color var(--dur-ui) ease-out}
.sys-phases__link:hover{background:color-mix(in srgb, var(--white) 70%, transparent)}
.sys-phases__link .mono{font-size:.8125rem;font-weight:400;color:var(--blue-text-strong)}

/* 2. Gear body: sticky index + three phases -------------------------------- */
.sys-body{background:linear-gradient(180deg, var(--fog-deep) 0%, var(--mist) 30%)}
.sys-body__inner{display:flex;flex-wrap:wrap;gap:56px;padding-top:72px;padding-bottom:96px}

.sys-index{flex:0 1 240px;min-width:0;position:sticky;top:24px;align-self:flex-start;display:flex;flex-direction:column;gap:2px}
.sys-index__head{font-size:.9375rem;font-weight:500;color:var(--text-muted);padding:0 10px 10px}
.sys-index__list{list-style:none;display:flex;flex-direction:column;gap:2px}
.sys-index__list a{display:flex;gap:12px;align-items:baseline;min-height:44px;padding:11px 10px;border-radius:12px;text-decoration:none;color:var(--text-soft);font-size:1.0625rem;font-weight:500;transition:background-color var(--dur-ui) ease-out, color var(--dur-ui) ease-out}
.sys-index__list a:hover{background:color-mix(in srgb, var(--white) 70%, transparent);color:var(--text)}
.sys-index__list .mono{font-size:.8125rem;color:var(--blue-text-strong)}

.sys-phases-col{flex:999 1 560px;min-width:0;display:flex;flex-direction:column;gap:56px}
.sys-phase{display:flex;flex-direction:column;gap:18px}
.sys-phase__title{font-size:clamp(2.5rem, 4.6vw, 3.875rem);line-height:1.04;max-width:none;padding-bottom:8px}

/* Gear card */
.sys-gear{display:flex;flex-wrap:wrap;gap:28px;padding:clamp(1.5rem, 3vw, 2.25rem)}
.sys-gear__num{flex:0 1 120px;font-family:var(--font-mono);font-weight:400;letter-spacing:-.02em;font-size:4.5rem;line-height:.9;color:var(--blue-text);font-variant-numeric:tabular-nums}
.sys-gear__body{flex:1 1 420px;min-width:0;display:flex;flex-direction:column;gap:18px}
.sys-gear__name{font-size:2rem;font-weight:600;line-height:1.15}
.sys-gear__question{font-size:1.375rem;line-height:1.45;font-weight:300}
.sys-gear__does{font-size:1.125rem;line-height:1.6;color:var(--text-soft);max-width:60ch}

.sys-gear__facts{display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:18px;margin:0;padding-top:18px;border-top:1px solid var(--line)}
.sys-gear__facts > div{display:flex;flex-direction:column;gap:6px}
.sys-gear__facts dt{font-size:.875rem;font-weight:500;color:var(--text-muted)}
.sys-gear__facts dd{margin:0;font-size:1rem;line-height:1.5;color:var(--text-soft)}
.sys-gear__facts dd.sys-gear__keep{display:flex;gap:10px;align-items:baseline;font-size:1.0625rem;font-weight:600;color:var(--text)}

.sys-prods{list-style:none;display:flex;flex-wrap:wrap;gap:6px}
.sys-prod{display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:8px 14px;border-radius:var(--radius-pill);background:color-mix(in srgb, var(--white) 70%, transparent);font-size:.9375rem;font-weight:600;color:var(--text);text-decoration:none;transition:background-color var(--dur-ui) ease-out, box-shadow var(--dur-ui) ease-out}
.sys-prod::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--acc)}
/* Oct 16, 2026 polish: Beacon pillar chips carry no product colour, so no empty dot slot;
   the pillar row spans the card so its chips sit on one line instead of stacking. */
.sys-prod:not([class*="acc-"])::before{content:none}
.sys-prod:not([class*="acc-"]){--acc:var(--line-strong, var(--text-muted))}
.sys-gear__facts > div:has(a[href^="/pillar-"]){grid-column:1 / -1}
@media (min-width: 900px){
  .sys-gear__facts{grid-template-columns:minmax(170px, 1fr) minmax(140px, .8fr) minmax(230px, 1.4fr)}
}
.sys-prod:hover{background:var(--white);box-shadow:inset 0 0 0 1px var(--acc)}

/* Beacon article inside each gear (beacon-gear-art partial, data from beacon_feed.json).
   The title link is stretched over the box; the citation link sits above it. */
.sys-art{position:relative;display:flex;flex-direction:column;gap:4px;padding:16px 18px;border-radius:16px;background:color-mix(in srgb, var(--white) 55%, transparent);transition:transform var(--dur-ui) ease-out, background-color var(--dur-ui) ease-out}
.sys-art:hover{background:color-mix(in srgb, var(--white) 85%, transparent)}
@media (hover:hover) and (pointer:fine){.sys-art:hover{transform:translateY(-2px)}}
.sys-art__from{font-size:.8125rem;font-weight:500;color:var(--blue-text-strong)}
.sys-art__figure{font-size:clamp(1.75rem, 3vw, 2.25rem);font-weight:500;line-height:1.1;letter-spacing:-.01em;color:var(--text)}
.sys-art__title{display:flex;align-items:center;min-height:44px;font-size:1.0625rem;font-weight:500;line-height:1.4;color:var(--text);text-decoration:none}
.sys-art__title::after{content:"";position:absolute;inset:0;border-radius:inherit}
.sys-art:hover .sys-art__title{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.sys-art__title:focus-visible{outline:none}
.sys-art:has(.sys-art__title:focus-visible){outline:2px solid var(--focus, var(--blue));outline-offset:3px}
.sys-art__cite{font-size:.875rem;color:var(--text-muted)}
.sys-art__cite a{position:relative;z-index:1;display:inline-flex;align-items:center;min-height:44px;color:inherit;text-decoration:underline;text-decoration-color:color-mix(in srgb, currentColor 35%, transparent);text-underline-offset:4px}
.sys-art__cite a:hover{text-decoration-color:currentColor}

/* 3. Closing band --------------------------------------------------------- */
.page-system .band{background:linear-gradient(180deg, var(--mist) 0%, var(--fog-deep) 100%)}
.sys-band__orb{left:50%;top:50%;width:860px;height:860px;margin:-430px 0 0 -430px}
.sys-band__fog{left:-10%;bottom:-60px;width:120%;height:240px}
.sys-band__actions{justify-content:center}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 980px){
  .sys-hero{min-height:0}
  .sys-hero__beam{display:none} /* would cross the lead text once the column narrows */
  .sys-phases{max-width:none}
}
@media (max-width: 900px){
  .sys-index{position:static;flex-basis:100%}
  .sys-index__list{display:grid;grid-template-columns:repeat(auto-fill, minmax(220px, 1fr))}
  .sys-body__inner{gap:40px;padding-top:56px}
}
@media (max-width: 719.98px){
  .sys-hero__orb{right:-30%;top:10px;width:400px;height:400px}
  .sys-gear__num{font-size:3.5rem;flex-basis:100%}
  .sys-gear__name{font-size:1.75rem}
}
