/* CHIKARA Shell Kit v1: tokens, five shells, premium features. Colour comes only from variables (Standards 1). */
/* ---------- skins (Standards 1.2a): brief = Health brief, gold = Style 1 Navigator, aurum = Style 2 ---------- */
.shell { --font-display: 'Cormorant Garamond', Georgia, serif; --font-body: 'Plus Jakarta Sans', system-ui, sans-serif; --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.25,.46,.45,.94); --density: 1; --halo-size: 75px; --island-h: 40px; --island-gap: 8px; --island-top: 10px; --island-strip: calc(var(--island-top) + var(--island-h) + var(--island-gap));
  --island-bg: #1A1208; --island-ink: #FBF5EA; --island-ok: #4ADE80; --island-warn: #FBBF24; --island-off: #F87171; }
.shell, .shell[data-skin="brief"] { --bg: #F5F0E4; --bg-alt: #EDE8DB; --surface: #FCFAF4; --ink: #1A1F1E; --muted: #5E6662; --primary: #0D7377; --primary-ink: #0A4F52; --on-primary: #fff; --accent: #C9A227; --accent-ink: #8A6E12; --line: rgba(10,79,82,.16); --ring1: #0D7377; --ring2: #C9A227; --ring3: #14919B; --state: #14919B; }
.shell[data-skin="gold"] { --bg: #F7F1E5; --bg-alt: #EFE7D6; --surface: #FCF8EE; --ink: #1A140C; --muted: #675F54; --primary: #C9973A; --primary-ink: #7A5A1E; --on-primary: #1A140C; --accent: #2A7A6E; --accent-ink: #1A524A; --line: rgba(122,90,30,.2); --ring1: #C9973A; --ring2: #2A7A6E; --ring3: #F0CF78; --state: #2A7A6E; }
.shell[data-skin="aurum"] { --bg: #F8F3EC; --bg-alt: #F0E8DC; --surface: #FFFFFF; --ink: #1D1917; --muted: #675F54; --primary: #8B1E3D; --primary-ink: #8B1E3D; --on-primary: #fff; --accent: #C9973A; --accent-ink: #765619; --line: rgba(139,30,61,.18); --ring1: #8B1E3D; --ring2: #C9973A; --ring3: #C44A6A; --state: #8B1E3D; }
.shell[data-mode="dark"] { --bg: #0F1010; --bg-alt: #171919; --surface: #171919; --ink: #F2EEE4; --muted: #A7A299; --line: rgba(255,255,255,.14); --on-primary: #0F1010; }
.shell[data-mode="dark"][data-skin="brief"] { --primary: #3FB5BD; --primary-ink: #3FB5BD; --accent-ink: #E0BC4A; }
.shell[data-mode="dark"][data-skin="gold"] { --primary: #F0CF78; --primary-ink: #F0CF78; --accent-ink: #5FC4B3; }
.shell[data-mode="dark"][data-skin="aurum"] { --primary: #D6436D; --primary-ink: #D6436D; --on-primary: #fff; --accent-ink: #E0BC4A; }
/* tenant white-label (premium): overrides the accent only, never the safety colours */
.shell[data-tenant="coastal"] { --accent: #2BA4A0; --accent-ink: #1A6B68; } .shell[data-tenant="highveld"] { --accent: #B5651D; --accent-ink: #8A4A12; }
.shell[data-density="compact"] { --density: .78; }

/* ---------- base ---------- */
.shell { position: relative; height: 100%; width: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55; display: grid; isolation: isolate; }
.shell *, .shell *::before, .shell *::after { box-sizing: border-box; }
.shell button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
.shell :focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.shell .i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shell .mono { font-family: var(--font-mono); } .shell .muted { color: var(--muted); }
.shell h1, .shell h2, .shell h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; color: var(--primary-ink); }
.shell .eyebrow { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.shell .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shell.has-island { padding-top: var(--island-strip); }
.shell.has-island::before { content: ''; position: absolute; inset: 0 0 auto 0; height: var(--island-strip); background: var(--bg); z-index: 40; pointer-events: none; }
.btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .5rem 1rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .82rem; }
.btn--primary { background: var(--primary); color: var(--on-primary); border-color: transparent; } .btn--ghost:hover { border-color: var(--primary-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: calc(1rem * var(--density)) 1.1rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 99px; border: 1px solid var(--line); color: var(--accent-ink); }
.sh-grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .3; mix-blend-mode: overlay; background-size: 320px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='2.4'%3E%3CfeDistantLight azimuth='42' elevation='52'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23g)'/%3E%3C/svg%3E"); }
.shell[data-mode="dark"] .sh-grain { opacity: .12; }

/* ---------- island (Standards 16, reference) ---------- */
.island { position: absolute; top: var(--island-top); left: 50%; transform: translateX(-50%); z-index: 90; width: max-content; max-width: min(440px, calc(100% - 2rem)); min-height: var(--island-h); background: var(--island-bg); color: var(--island-ink); border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.3); overflow: hidden; transition: border-radius .2s; }
.island[hidden] { display: none; } .island.expanded { border-radius: 22px; }
.island-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: calc(var(--island-h) - 2px); padding: 8px 18px; color: inherit; font-size: 13px; font-weight: 600; text-align: left; }
.island-toggle[aria-disabled="true"] { cursor: default; } .island-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .island.expanded .island-text { white-space: normal; }
.island-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.island-dot[data-state="ok"] { background: var(--island-ok); box-shadow: 0 0 0 3px rgba(74,222,128,.25); } .island-dot[data-state="warn"] { background: var(--island-warn); box-shadow: 0 0 0 3px rgba(251,191,36,.25); } .island-dot[data-state="off"] { background: var(--island-off); box-shadow: 0 0 0 3px rgba(248,113,113,.25); }
.island-detail { padding: 0 18px 12px 37px; font-size: 12px; font-weight: 500; color: #C3BCB2; }

/* ---------- shared pieces ---------- */
.sh-top { grid-area: top; position: relative; z-index: 20; display: flex; align-items: center; gap: .6rem; padding: 0 .9rem; min-height: 56px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.brand-btn { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .3rem; border-radius: 10px; }
.brand-btn img { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--accent); object-fit: cover; }
.brand-btn b { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .06em; color: var(--primary-ink); line-height: 1; } .brand-btn small { display: block; font-family: var(--font-mono); font-size: .5rem; letter-spacing: .2em; color: var(--accent-ink); }
.crumb { font-size: .8rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; min-width: 0; } .crumb b { color: var(--ink); font-weight: 600; } .crumb button { color: var(--primary-ink); font-size: .72rem; text-decoration: underline; }
.spacer { flex: 1; }
.ic-btn { position: relative; min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--primary-ink); } .ic-btn:hover { background: var(--bg-alt); }
.ic-btn .dot { position: absolute; top: 8px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--primary); color: var(--on-primary); font: 700 .6rem/16px var(--font-mono); text-align: center; }
.searchbtn { display: flex; align-items: center; gap: .6rem; min-height: 40px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: .8rem; min-width: 200px; } .searchbtn kbd { margin-left: auto; font-family: var(--font-mono); font-size: .62rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; }
.ws-btn { display: flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 .7rem; border-radius: 10px; border: 1px solid var(--line); font-size: .8rem; font-weight: 600; background: var(--surface); } .ws-btn i { width: 18px; height: 18px; border-radius: 5px; background: var(--accent); display: block; }
.sh-main { grid-area: main; position: relative; z-index: 5; overflow: auto; padding: calc(1.4rem * var(--density)) clamp(1rem, 3vw, 2.2rem) 7rem; min-width: 0; }
.view { display: none; } .view.on { display: block; animation: vin .35s var(--ease); } @keyframes vin { from { opacity: 0; transform: translateY(6px); } }
.view h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: .2rem 0 .6rem; } .grid { display: grid; gap: calc(1rem * var(--density)); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 1rem 0; }
.kpi b { display: block; font-family: var(--font-display); font-size: 2.2rem; color: var(--primary-ink); line-height: 1; } .kpi span { font-size: .78rem; color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; } .list li { display: flex; gap: .7rem; padding: calc(.55rem * var(--density)) 0; border-bottom: 1px dashed var(--line); font-size: .88rem; } .list time { font-family: var(--font-mono); font-size: .68rem; color: var(--accent-ink); min-width: 3.6rem; padding-top: .15rem; }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; } .tbl th { text-align: left; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); } .tbl td, .tbl th { padding: calc(.55rem * var(--density)) .6rem; border-bottom: 1px solid var(--line); }
.bubbles { display: grid; gap: .5rem; max-width: 560px; } .bubble { max-width: 85%; padding: .6rem .9rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); } .bubble.me { justify-self: end; background: var(--primary); color: var(--on-primary); border-color: transparent; }
.bubble.typing { display: inline-flex; gap: 5px; padding: .8rem 1rem; } .bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--state); animation: td 1.2s infinite; } .bubble.typing i:nth-child(2) { animation-delay: .18s; } .bubble.typing i:nth-child(3) { animation-delay: .36s; } @keyframes td { 50% { transform: translateY(-4px); } }
.bars { display: flex; align-items: flex-end; gap: .5rem; height: 140px; } .bars i { flex: 1; background: var(--primary); border-radius: 4px 4px 0 0; opacity: .85; }
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-alt), var(--line), var(--bg-alt)); background-size: 200% 100%; animation: sk 1.2s linear infinite; margin: .5rem 0; } @keyframes sk { to { background-position: -200% 0; } }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); } .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; } .seg button { padding: .4rem .8rem; font-size: .78rem; min-height: 36px; } .seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.check { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; font-size: .88rem; } .check i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--primary-ink); display: grid; place-items: center; } .check.done i { background: var(--primary); color: var(--on-primary); } .check.done span { text-decoration: line-through; color: var(--muted); }
.illus { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- shell A: Halo (canonical) ---------- */
.shell[data-shell="halo"] { grid-template-areas: "top" "main"; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); }
.shell[data-shell="halo"] .searchbtn { min-width: 0; } .shell[data-shell="halo"] .searchbtn span, .shell[data-shell="halo"] .searchbtn kbd { display: none; }
.halo { position: absolute; z-index: 60; width: var(--halo-size); height: var(--halo-size); border-radius: 50%; touch-action: none; user-select: none; cursor: grab; display: none; }
.shell[data-shell="halo"] .halo { display: block; } .halo.dragging { cursor: grabbing; }
.halo-ring { position: absolute; inset: -2px; border-radius: 50%; background: conic-gradient(from 0deg, var(--ring1), var(--ring2), var(--ring3), var(--ring2), var(--ring1)); animation: spin 3.4s linear infinite; } .halo.open .halo-ring { animation-duration: .7s; }
.halo-core { position: absolute; inset: 3px; border-radius: 50%; overflow: hidden; background: #0E1A14; } .halo-core img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.halo-backdrop { position: absolute; inset: 0; z-index: 55; background: rgba(10,8,4,.38); opacity: 0; pointer-events: none; transition: opacity .2s; } .halo-backdrop.open { opacity: 1; pointer-events: auto; }
.halo-petals { position: absolute; inset: 0; z-index: 58; pointer-events: none; } .petal { position: absolute; pointer-events: auto; width: calc(var(--halo-size) * .8); height: calc(var(--halo-size) * .8); border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); color: var(--primary-ink); box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); transition: transform .32s cubic-bezier(.16,1,.3,1), opacity .2s; }
.petal.show { opacity: 1; transform: none; } .petal[aria-current="page"] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary), 0 8px 24px rgba(0,0,0,.2); } .petal span { position: absolute; top: -1.5rem; font-size: .62rem; font-weight: 700; background: var(--island-bg); color: var(--island-ink); border-radius: 4px; padding: 0 .35rem; opacity: 0; } .petal:focus-visible span, .petal:hover span { opacity: 1; }
.halo-nav-off { display: none; }

/* ---------- shell B: Rail (command rail) ---------- */
.sh-rail { grid-area: rail; display: none; flex-direction: column; gap: .25rem; padding: .7rem .5rem; border-right: 1px solid var(--line); background: var(--bg-alt); z-index: 25; width: 64px; transition: width .25s var(--ease); overflow: hidden; }
.sh-rail button { display: flex; align-items: center; gap: .8rem; min-height: 44px; padding: 0 .85rem; border-radius: 10px; color: var(--muted); font-size: .86rem; font-weight: 600; white-space: nowrap; } .sh-rail button:hover { background: var(--surface); color: var(--ink); } .sh-rail button[aria-current="page"] { background: var(--surface); color: var(--primary-ink); box-shadow: inset 3px 0 0 var(--primary); }
.shell[data-shell="rail"] { grid-template-areas: "rail top" "rail main"; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; } .shell[data-shell="rail"] .sh-rail { display: flex; } .shell[data-shell="rail"] .sh-rail.open { width: 220px; }
.sh-rail .rail-foot { margin-top: auto; }

/* ---------- shell C: Dock ---------- */
.sh-dock { display: none; position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; gap: .3rem; padding: .45rem; border-radius: 22px; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.22); }
.shell[data-shell="dock"] { grid-template-areas: "top" "main"; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); } .shell[data-shell="dock"] .sh-dock { display: flex; }
.sh-dock button { position: relative; display: grid; justify-items: center; gap: 2px; min-width: 56px; min-height: 52px; padding: .4rem .5rem; border-radius: 16px; color: var(--muted); font-size: .6rem; font-weight: 700; letter-spacing: .04em; transition: transform .25s var(--ease), background .25s; } .sh-dock button:hover { transform: translateY(-5px) scale(1.08); color: var(--ink); } .sh-dock button[aria-current="page"] { color: var(--primary-ink); background: var(--bg-alt); } .sh-dock button[aria-current="page"]::after { content: ''; position: absolute; bottom: 2px; width: 14px; height: 3px; border-radius: 3px; background: var(--primary); }
.sh-dock .dock-act { background: var(--primary); color: var(--on-primary); border-radius: 50%; min-width: 52px; align-self: center; }  .sh-dock .dock-act:hover { color: var(--on-primary); }

/* ---------- shell D: Masthead (editorial) ---------- */
.sh-mast { grid-area: mast; display: none; text-align: center; padding: .9rem 1rem .4rem; border-bottom: 3px double var(--line); position: relative; z-index: 20; }
.sh-mast .mast-line { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); } .sh-mast h2 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: .12em; margin: .2rem 0; } .sh-mast h2 em { color: var(--accent-ink); }
.sh-tabs { grid-area: tabs; display: none; justify-content: center; gap: 1.6rem; padding: 0 1rem; border-bottom: 1px solid var(--line); z-index: 20; overflow-x: auto; } .sh-tabs button { min-height: 44px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; } .sh-tabs button[aria-current="page"] { color: var(--primary-ink); border-color: var(--primary); }
.shell[data-shell="masthead"] { grid-template-areas: "mast" "tabs" "main"; grid-template-rows: auto auto 1fr; grid-template-columns: minmax(0, 1fr); } .shell[data-shell="masthead"] .sh-mast, .shell[data-shell="masthead"] .sh-tabs { display: flex; flex-direction: column; } .shell[data-shell="masthead"] .sh-tabs { flex-direction: row; } .shell[data-shell="masthead"] .sh-top { display: none; }
.shell[data-shell="masthead"] .sh-main { max-width: 860px; margin: 0 auto; width: 100%; } .shell[data-shell="masthead"] .view h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }

/* ---------- shell E: Workbench (studio) ---------- */
.sh-tree, .sh-insp, .sh-status { display: none; }
.shell[data-shell="workbench"] { grid-template-areas: "top top top" "tree main insp" "status status status"; grid-template-columns: 210px minmax(0, 1fr) 250px; grid-template-rows: auto 1fr 30px; }
.shell[data-shell="workbench"] .sh-tree { display: block; grid-area: tree; border-right: 1px solid var(--line); background: var(--bg-alt); padding: .6rem; overflow: auto; z-index: 20; } .shell[data-shell="workbench"] .sh-insp { display: block; grid-area: insp; border-left: 1px solid var(--line); background: var(--bg-alt); padding: .9rem; overflow: auto; z-index: 20; font-size: .82rem; } .shell[data-shell="workbench"] .sh-status { display: flex; grid-area: status; align-items: center; gap: 1rem; padding: 0 .8rem; border-top: 1px solid var(--line); background: var(--primary); color: var(--on-primary); font-family: var(--font-mono); font-size: .62rem; letter-spacing: .06em; z-index: 20; }
.sh-tree button { display: flex; width: 100%; align-items: center; gap: .5rem; min-height: 36px; padding: 0 .6rem; border-radius: 6px; font-size: .82rem; color: var(--muted); text-align: left; } .sh-tree button[aria-current="page"] { background: var(--surface); color: var(--primary-ink); font-weight: 700; } .sh-tree .grp { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin: .7rem .4rem .2rem; }
.shell[data-shell="workbench"] .sh-main { padding-bottom: 2rem; }
.sh-insp h3 { font-size: 1.2rem; margin-bottom: .4rem; } .sh-insp dl { display: grid; grid-template-columns: 5.5rem 1fr; gap: .3rem .5rem; } .sh-insp dt { color: var(--muted); }

/* ---------- overlays: menu, palette, drawers, toast ---------- */
.pop { position: absolute; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.28); padding: .4rem; display: none; max-height: calc(100% - 90px); overflow: auto; min-width: 250px; } .pop.open { display: block; }
.pop .it { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 42px; padding: 0 .7rem; border-radius: 8px; font-size: .86rem; font-weight: 600; text-align: left; } .pop .it:hover, .pop .it:focus-visible { background: var(--bg-alt); } .pop .it .v { margin-left: auto; font-family: var(--font-mono); font-size: .66rem; color: var(--accent-ink); } .pop hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; } .pop .ttl { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: .4rem .7rem .1rem; }
.scrim { position: absolute; inset: 0; z-index: 70; background: rgba(10,8,4,.45); display: none; } .scrim.open { display: block; }
.cmdk { position: absolute; z-index: 85; left: 50%; top: calc(var(--island-strip) + 24px); transform: translateX(-50%); width: min(560px, calc(100% - 1.5rem)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.4); display: none; overflow: hidden; } .cmdk.open { display: block; } .cmdk input { width: 100%; min-height: 54px; padding: 0 1.1rem; font: inherit; font-size: 1rem; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); outline: none; } .cmdk ul { list-style: none; margin: 0; padding: .4rem; max-height: 300px; overflow: auto; } .cmdk li { display: flex; gap: .7rem; align-items: center; min-height: 42px; padding: 0 .7rem; border-radius: 8px; cursor: pointer; font-size: .88rem; } .cmdk li[aria-selected="true"] { background: var(--primary); color: var(--on-primary); } .cmdk li small { margin-left: auto; font-family: var(--font-mono); font-size: .6rem; opacity: .75; }
.drawer { position: absolute; z-index: 82; top: 0; right: 0; bottom: 0; width: min(380px, 92%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.3); transform: translateX(105%); transition: transform .3s var(--ease); padding: calc(var(--island-strip) + 6px) 1.1rem 1rem; overflow: auto; } .drawer.open { transform: none; } .drawer h2 { font-size: 1.7rem; margin-bottom: .6rem; }
.toast { position: absolute; z-index: 95; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--island-bg); color: var(--island-ink); border-radius: 10px; padding: .6rem 1rem; font-size: .82rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; } .toast.show { opacity: 1; }
.shell[data-shell="workbench"] .toast, .shell[data-shell="rail"] .toast, .shell[data-shell="masthead"] .toast { bottom: 44px; }
kbd { font-family: var(--font-mono); font-size: .7rem; border: 1px solid var(--line); border-radius: 4px; padding: .05rem .35rem; background: var(--bg-alt); }

/* ---------- narrow containers: every shell collapses to a phone-safe layout ---------- */
.stage { container-type: inline-size; }
@container (max-width: 760px) {
  .searchbtn span, .searchbtn kbd, .ws-btn span, .crumb { display: none; } .searchbtn { min-width: 44px; padding: 0; justify-content: center; }
  .shell[data-shell="workbench"] { grid-template-areas: "top" "main" "status"; grid-template-columns: minmax(0, 1fr); } .shell[data-shell="workbench"] .sh-tree, .shell[data-shell="workbench"] .sh-insp { display: none; }
  .shell[data-shell="rail"] { grid-template-areas: "top" "main" "rail"; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; } .shell[data-shell="rail"] .sh-rail { flex-direction: row; width: auto !important; border-right: 0; border-top: 1px solid var(--line); padding: .3rem; justify-content: space-around; } .shell[data-shell="rail"] .sh-rail button { flex-direction: column; gap: 0; min-height: 50px; font-size: .58rem; padding: 0 .4rem; } .shell[data-shell="rail"] .sh-rail span { font-size: .58rem; } .shell[data-shell="rail"] .rail-foot { display: none; } .shell[data-shell="rail"] .sh-main { padding-bottom: 1.4rem; }
  .sh-mast .mast-line span:nth-child(n+2) { display: none; } .sh-tabs { justify-content: flex-start; gap: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .shell *, .shell *::before, .shell *::after { animation: none !important; transition: none !important; } }
.sh-rail:not(.open) button span { display: none; }
.sh-rail button { justify-content: flex-start; }
@container (max-width: 760px) { .shell[data-shell="rail"] .sh-rail:not(.open) button span { display: block; } .shell[data-shell="rail"] .sh-rail button { justify-content: center; } }
.shell { box-sizing: border-box; }
.drawer { visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; } .drawer.open { visibility: visible; transition: transform .3s var(--ease); }
.shell { overflow: hidden; overflow: clip; }

/* ---------- skin: Great Zimbabwe (stone and gold). Anchored on the ecosystem's deep green #0A1A12. ---------- */
.shell[data-skin="stone"] { --bg: #EEE7D7; --bg-alt: #E4DBC7; --surface: #FAF6EC; --ink: #1C1812; --muted: #6B6250; --primary: #12503A; --primary-ink: #0F4631; --on-primary: #FAF6EC; --accent: #B8903A; --accent-ink: #7A5A1E; --line: rgba(122,90,30,.24); --ring1: #B8903A; --ring2: #12503A; --ring3: #E3C06C; --state: #12503A; }
.shell[data-mode="dark"][data-skin="stone"] { --bg: #0A1A12; --bg-alt: #0F2418; --surface: #12291C; --ink: #F1EBDC; --muted: #A9B0A2; --line: rgba(227,192,108,.22); --primary: #C9A24E; --primary-ink: #E3C06C; --on-primary: #0A1A12; --accent: #C9A24E; --accent-ink: #E3C06C; }

/* ---------- finish: opulent. A budget, not a style: gold stays under about 5 percent of the surface. ---------- */
.shell[data-finish="opulent"]::after { content: ''; position: absolute; inset: 7px; z-index: 30; pointer-events: none; border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 14px; box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5px color-mix(in srgb, var(--accent) 26%, transparent); }
.shell[data-finish="opulent"] .sh-top { border-bottom: 0; padding-bottom: 9px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8'%3E%3Cpath d='M0 7L6 1.5 12 7 18 1.5 24 7' fill='none' stroke='%23B8903A' stroke-width='1.1' opacity='.7'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-position: left bottom; margin: 0 8px; }
.shell[data-finish="opulent"] .view h1::after { content: ''; display: block; width: 88px; height: 1px; margin-top: .55rem; background: linear-gradient(90deg, var(--accent), transparent); }
.shell[data-finish="opulent"] .eyebrow::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: .6rem; vertical-align: .08em; background: var(--accent); transform: rotate(45deg); }
.shell[data-finish="opulent"] .card { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 55%, transparent), 0 10px 30px rgba(0,0,0,.06); border-radius: 10px; }
.shell[data-finish="opulent"] .brand-btn img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); border-color: transparent; }
.shell[data-finish="opulent"] .brand-btn b { background: linear-gradient(100deg, var(--primary-ink) 0%, var(--accent-ink) 45%, var(--primary-ink) 90%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 14s ease-in-out infinite; }
@keyframes foil { 50% { background-position: 100% 0; } }
.shell[data-finish="opulent"] .sh-rail button[aria-current="page"], .shell[data-finish="opulent"] .sh-tree button[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 20%, transparent); }
.shell[data-finish="opulent"] .sh-dock { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.shell[data-finish="opulent"] .btn--primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 0 1px color-mix(in srgb, var(--accent) 65%, transparent); }
.shell[data-finish="opulent"] .island { box-shadow: 0 0 0 1px var(--accent), 0 6px 24px rgba(0,0,0,.3); }
.shell[data-finish="opulent"] .petal { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.shell[data-finish="opulent"] .sh-main { padding-left: clamp(1.2rem, 3.4vw, 2.6rem); padding-right: clamp(1.2rem, 3.4vw, 2.6rem); }
.shell[data-finish="opulent"] .illus::before { content: ''; display: inline-block; width: 18px; height: 1px; margin-right: .5rem; vertical-align: middle; background: var(--accent); }

/* ---------- Sovereign: rail on wide containers, Halo on narrow ones (one product, two postures) ---------- */
.shell[data-variant="sovereign"] .halo { display: none; }
@container (max-width: 760px) {
  .shell[data-variant="sovereign"] { grid-template-areas: "top" "main"; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); }
  .shell[data-variant="sovereign"] .sh-rail { display: none; }
  .shell[data-variant="sovereign"] .halo { display: block; }
  .shell[data-variant="sovereign"] .sh-main { padding-bottom: 7rem; }
}
@media (prefers-reduced-motion: reduce) { .shell[data-finish="opulent"] .brand-btn b { animation: none; } }
.shell[data-finish="opulent"]::after { z-index: 45; }
.shell[data-mode="dark"][data-skin="stone"] { --state: #C9A24E; }

/* ---------- v2.0 experience layer: contextual Halo, material, and workspace modes ---------- */
.shell { --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem; --radius-control: 10px; --radius-panel: 14px; --shadow-soft: 0 8px 28px rgba(0,0,0,.08); --shadow-raised: 0 18px 48px rgba(0,0,0,.16); --motion-fast: 140ms; --motion-standard: 220ms; --motion-emphasis: 340ms; }
.halo { overflow: visible; }
.halo-hint { position:absolute; right:-7px; bottom:2px; padding:2px 5px; border-radius:5px; border:1px solid var(--line); background:var(--surface); color:var(--muted); font:600 8px/1.3 var(--font-mono); letter-spacing:.12em; opacity:0; transform:translateY(3px); transition:opacity var(--motion-standard),transform var(--motion-standard); pointer-events:none; }
.halo:hover .halo-hint, .halo:focus-visible .halo-hint { opacity:.95; transform:none; }
.halo.long-press-fired .halo-ring { animation:none; box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 24%,transparent); }
.drawer .halo-context-head { padding-right:1.7rem; margin-bottom:1rem; }
.drawer .halo-context-head h2 { margin:.35rem 0; }
.drawer .halo-memory-section { border-top:1px solid var(--line); padding:.9rem 0; }
.drawer .halo-memory-section h3 { font:700 .72rem/1.4 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin:0 0 .55rem; }
.halo-memory-row { display:flex; align-items:center; gap:.4rem; min-height:48px; border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent); }
.halo-memory-go,.halo-current-label { display:flex; align-items:center; gap:.7rem; min-height:44px; flex:1; min-width:0; text-align:left; border-radius:9px; padding:.4rem .55rem; color:var(--ink); }
.halo-memory-go:hover,.halo-context-action:hover { background:var(--bg-alt); }
.halo-memory-go span,.halo-current-label span { display:flex; flex-direction:column; min-width:0; font-weight:600; }
.halo-memory-go small { color:var(--muted); font-size:.68rem; font-weight:500; }
.halo-pin { flex:none; min-width:44px; min-height:44px; border:1px solid var(--line)!important; border-radius:10px; color:var(--accent-ink)!important; font-size:1.05rem!important; }
.halo-empty { margin:.25rem 0; color:var(--muted); font-size:.82rem; }
.halo-context-list { display:grid; gap:.35rem; }
.halo-context-action { display:grid; grid-template-columns:24px minmax(0,1fr); align-items:center; column-gap:.65rem; width:100%; min-height:48px; padding:.6rem .55rem; text-align:left; border-radius:10px; }
.halo-context-action span { font-weight:650; }
.halo-context-action small { grid-column:2; color:var(--muted); font-size:.7rem; }
.shell[data-workspace-mode="focus"] .sh-grain { opacity:.12; }
.shell[data-workspace-mode="focus"] .sh-main { padding-left:clamp(1.1rem,5vw,4rem); padding-right:clamp(1.1rem,5vw,4rem); }
.shell[data-workspace-mode="focus"] .sh-insp,.shell[data-workspace-mode="focus"] .sh-tree { opacity:.78; }
.shell[data-workspace-mode="command"] .sh-main { padding-top:1rem; }
.shell[data-workspace-mode="command"] .sh-insp { background:color-mix(in srgb,var(--surface) 86%,var(--bg-alt)); }
.shell[data-workspace-mode="command"] .sh-top { box-shadow:0 4px 18px rgba(0,0,0,.035); }
.shell[data-workspace-mode="standard"] .sh-main { scroll-behavior:smooth; }
.shell .card,.shell .btn,.shell .ic-btn,.shell .searchbtn { transition:background-color var(--motion-standard),border-color var(--motion-standard),box-shadow var(--motion-standard),transform var(--motion-fast); }
.shell button:active:not(:disabled) { transform:translateY(1px); }
@media (prefers-reduced-motion: reduce) { .halo-hint,.shell .card,.shell .btn,.shell .ic-btn,.shell .searchbtn { transition:none!important; } .halo-hint { transform:none; } }
@media (max-width:420px) { .halo-context-action { min-height:52px; } .drawer .halo-context-head p { font-size:.82rem; } }
