/* Denski glass, round 9: Denski in Aura's look (2026-11-25).
   Colby: "make Denski look exactly like Aura". Aura (tools/herdr-glass/console) is cool smoky glass slabs on a soft
   blue/purple light: 22px rounded panels with a 10px gap, a plain 8% hairline, a 1px top highlight, a deep soft shadow,
   pill buttons, a solid system-blue primary with a glow, a green switch, press scale .97 and spring sheets.
   This file loads after every other stylesheet and re-tunes the material sections-polish.css built:
     1. tokens   2. the light behind the glass   3. desktop slabs   4. sheets, menus, toasts
     5. controls (buttons, composer, switch, fields, segments)   6. type   7. press   8. fallbacks
   A web page can't show other apps through itself (that needs a native window); this is the look on Denski's own
   ambient light, the same way Aura looks in a plain browser. */

/* ---------- 1. tokens (Aura's) ---------- */
:root {
  /* blue as a fill (buttons, the sent bubble) is Aura's #0a84ff; blue as text, icons and rings is the lighter
     Aura link blue so it reads at 4.5:1 even over the brightest glow */
  --go: #0a84ff; --accent: #55aaff; --glow: #0a84ff; --goInk: #fff; --link: #4da3ff;
  --ink: #f2f2f5; --dim: #b4b4bc; --faint: #a3a3ac;
  --accent-soft: rgb(10 132 255 / .18);
  --good: #30d158; --warn: #ffc233; --stop: #ff5f57; --rec: #ff5f57; --idle: #78787f;
  --panel-2: rgb(255 255 255 / .045); --hair: rgb(255 255 255 / .08); --line: rgb(255 255 255 / .08);
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --r-sm: 9px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --gap: 10px;
  /* Aura's .glass: rgba(20,20,24,.46) + blur(30px) saturate(160%) */
  --glass-thin-tint: rgb(20 20 24 / .46);
  --glass-thin-filter: blur(30px) saturate(160%);
  --glass-card-tint: rgb(255 255 255 / .045);
  --glass-card-filter: blur(20px) saturate(160%);
  --glass-thick-tint: rgb(34 34 38 / .86);
  --glass-thick-filter: blur(40px) saturate(170%);
  --glass-in: inset 0 1px 0 rgb(255 255 255 / .05);
  --glass-out-card: 0 12px 32px rgb(0 0 0 / .28);
  --glass-out-thick: 0 30px 80px rgb(0 0 0 / .5);
  --slab-out: 0 20px 50px rgb(0 0 0 / .35);
  --rim: linear-gradient(var(--hair), var(--hair));   /* Aura's edge is a plain hairline, not a lit rim */
  --spec: none;
  --grain: none;
  --mine: var(--accent-soft);
  --eyebrow: #8e8e96;
}
html, body { background: #0b0b0f; }

/* ---------- 2. the light behind the glass: Aura's three soft fields, no halo arc, no grain ---------- */
.ambient .b1 { width: 80vmax; height: 70vmax; left: -22vmax; top: -30vmax; right: auto; bottom: auto;
  background: radial-gradient(closest-side, rgb(10 132 255 / .26), rgb(10 132 255 / .1) 50%, transparent); filter: blur(20px); }
.ambient .b2 { width: 70vmax; height: 80vmax; right: -20vmax; bottom: -34vmax; left: auto; top: auto;
  background: radial-gradient(closest-side, rgb(191 90 242 / .14), rgb(191 90 242 / .05) 55%, transparent); filter: blur(20px); }
.ambient .b3 { width: 60vmax; height: 60vmax; right: -8vmax; top: -24vmax; left: auto; bottom: auto;
  background: radial-gradient(closest-side, rgb(48 209 88 / .07), transparent 70%); filter: blur(20px); }
.ambient .halo { display: none; }
.ambient::after { content: none; }
@media (max-width: 760px) {
  .ambient .b1 { left: -40vmax; top: -36vmax; }
  .ambient .b3 { right: -30vmax; }
}

/* ---------- 3. desktop: floating slabs, Aura's 10px gap and plain hairline edge ---------- */
@media (min-width: 761px) {
  .shell { gap: var(--gap); padding: var(--gap); }
  .rail { border-radius: var(--r-xl); border: 1px solid var(--hair); box-shadow: var(--glass-in), var(--slab-out); }
  .railbtn.on::before { left: -5px; }
  .sections { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--hair); }
  /* chat: channels, the room and members are three panels with the same gap */
  body[data-section="chat"] .sections { border-radius: 0; overflow: visible; border: 0; }
  .app { column-gap: var(--gap); }
  .app.nomembers { grid-template-columns: var(--side) minmax(0, 1fr); }
  .side, .members { border-radius: var(--r-xl); border: 1px solid var(--hair); box-shadow: var(--glass-in), var(--slab-out); }
  .side { overflow: hidden; }
  .main { border-radius: var(--r-xl); overflow: hidden; position: relative; border: 1px solid var(--hair);
    background: var(--glass-thin-tint); -webkit-backdrop-filter: var(--glass-thin-filter); backdrop-filter: var(--glass-thin-filter);
    box-shadow: var(--glass-in), var(--slab-out); }
  .sidehead { border-bottom-color: var(--hair); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .app:not(.showmembers) { grid-template-columns: var(--side) minmax(0, 1fr); }
}
/* every lit rim from round 7/8 becomes Aura's plain hairline (the border above), so hide the painted rims */
.rail::after, .side::after, .members::after, .sections::after, .main::before { content: none !important; }

/* ---------- 4. sheets, menus, toasts: Aura's thick glass, spring in ---------- */
@keyframes glass-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes glass-up { from { opacity: .4; transform: translateY(56px); } }
@keyframes glass-pop { from { opacity: 0; transform: scale(.95); } }
.sheetwrap, .moresheet { background: rgb(0 0 0 / .52); }
.sheetwrap .sheet, .sheetwrap .sheet.mediasheet, .moresheet .sheet.moresheetbody {
  background: var(--glass-thick-tint); -webkit-backdrop-filter: var(--glass-thick-filter); backdrop-filter: var(--glass-thick-filter);
  border: 1px solid rgb(255 255 255 / .1); box-shadow: var(--glass-out-thick); }
.sheetfoot { background: linear-gradient(180deg, rgb(34 34 38 / 0), rgb(34 34 38 / .7) 40%); }
@media (min-width: 761px) {
  .sheetwrap .sheet { border-radius: 26px; animation: glass-in 300ms var(--spring); }
  #mediaSheet .sheet.mediasheet { border-radius: 26px 0 0 26px; animation: drawerin 280ms var(--ease); }  /* an edge drawer never bounces off its edge */
}
@media (max-width: 760px) {
  .sheetwrap .sheet { border-radius: 26px 26px 0 0; animation: glass-up 360ms var(--spring); }
  .moresheet .sheet { border-radius: 26px; animation: glass-up 340ms var(--spring); }
}
.popover, .ctlmenu, .sec-agents .ag-menu, .sec-files .fx-menu, .dm-menu {
  border-radius: var(--r-lg); background: var(--glass-thick-tint); -webkit-backdrop-filter: var(--glass-thick-filter); backdrop-filter: var(--glass-thick-filter);
  border: 1px solid rgb(255 255 255 / .1); box-shadow: 0 20px 50px rgb(0 0 0 / .45); animation: glass-pop 200ms var(--spring); }
.toast { border-radius: 999px; background: rgb(44 44 50 / .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--hair); font-size: 13px; }

/* ---------- 5. controls ---------- */
/* primary: Aura's solid blue pill with a soft blue glow and a 1px top light */
.primary, .pillbtn.go, .sendbtn, .btn.go, button.go {
  background: var(--go); color: #fff; border: 0; border-radius: 999px;
  box-shadow: 0 6px 18px rgb(10 132 255 / .4), inset 0 1px 0 rgb(255 255 255 / .25); }
:is(.primary, .pillbtn.go, .sendbtn, .btn.go, button.go):hover { filter: brightness(1.08); }
:is(.primary, .pillbtn.go, .sendbtn, .btn.go, button.go):disabled { background: rgb(255 255 255 / .1); color: var(--faint); box-shadow: none; filter: none; }
.sendbtn { border-radius: 50%; }
/* quiet buttons: Aura's ghost pill */
.pillbtn:not(.go), .ghostbtn, .btn.quiet { border-radius: 999px; }
/* the composer: Aura's 24px pill, blue ring when you're typing */
.composer { border-radius: 24px; background: rgb(255 255 255 / .06); border: 1px solid var(--hair);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.composer:focus-within { border-color: rgb(10 132 255 / .55); box-shadow: 0 0 0 4px var(--accent-soft); }
/* fields */
.gatepane input, .sheet input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .sheet select, .sheet textarea {
  border-radius: var(--r-md); background: rgb(255 255 255 / .05); border: 1px solid var(--hair); }
:is(input, textarea, select):focus-visible, button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid rgb(10 132 255 / .7); outline-offset: 2px; }
/* switch: Aura's green, the knob lands on a spring */
.switch i { background: rgb(255 255 255 / .16); border-color: transparent; }
.switch i::after { background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .35); transition: transform 260ms var(--spring); }
.switch input:checked + i { background: var(--good); border-color: transparent; }
/* selected rows and cards: Aura's soft blue fill with a 1px blue inner ring */
.chan.on, .morerow.on, .sec-agents .ag-row.on, .sec-terminals .tm-card.on, .den-vrow.on {
  background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgb(10 132 255 / .35); }
.railbtn.on { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgb(10 132 255 / .35); }
.railbtn.on svg { color: var(--accent); }
/* segmented controls: Aura's grey thumb, not a coloured one */
.sec-agents .ag-segbtn.on, .sec-files .fx-tab.on, .cr-segbtn.on {
  color: var(--ink); background: rgb(255 255 255 / .13); box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
/* hover: Aura's faint lift */
@media (hover: hover) {
  :is(.chan, .morerow, .sec-terminals .tm-card, .sec-agents .ag-row):not(.on):hover { background: var(--panel-2); }
}

/* ---------- 6. type: Aura's tight headings and small caps group labels ---------- */
h1, h2, h3, .sechead h2, .sheethead h3 { font-weight: 650; letter-spacing: -.01em; }
:root .eyebrow, :root .sec-ops .ops-lbl, :root .setgroup h3, :root .mgroup {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--eyebrow); }
body { -webkit-font-smoothing: antialiased; }

/* ---------- 7. press: everything you tap gives a little ---------- */
:is(.morerow, .tm-card, .card-link, a.chan, .chan[role="button"], .ag-row, .pillbtn, .primary, .chip):active { transform: scale(.97); }
.sendbtn:not(:disabled):active { transform: scale(.92); }
:is(.tm-card, a.chan, .chan[role="button"], .ag-row) { transition: transform 140ms var(--ease), background-color 160ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  :is(.morerow, .tm-card, .card-link, a.chan, .chan[role="button"], .ag-row, .pillbtn, .primary, .chip, .sendbtn):active { transform: none; }
  .sheetwrap .sheet, .moresheet .sheet, #mediaSheet .sheet.mediasheet, .popover, .ctlmenu, .sec-agents .ag-menu, .sec-files .fx-menu, .dm-menu { animation: none; }
}

/* ---------- 8. no backdrop-filter / reduced transparency: solid slabs, same layout ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .main, .sheetwrap .sheet, .popover, .dm-menu { background: #16161a; } }
@media (prefers-reduced-transparency: reduce) { .main, .sheetwrap .sheet, .popover, .dm-menu { background: #16161a; } }

/* ---------- 9. Aura details ---------- */
/* the switch knob stays white on green, like Aura's */
.switch input:checked + i::after { background: #fff; }
/* "Needs you now": Aura's needs bar, a warm-yellow wash with a yellow action, not a blue one */
.hhero.warn { background: rgb(255 194 51 / .1); border-color: rgb(255 194 51 / .3); box-shadow: var(--glass-in); }
.hhero.warn::before { background: var(--warn); }
.hhero.warn .hlabel, .hhero.warn .hicon { color: var(--warn); }
.hhero.warn .hicon { background: rgb(255 194 51 / .12); box-shadow: inset 0 0 0 1px rgb(255 194 51 / .25); }
.hhero.warn .pillbtn.go { background: var(--warn); color: #2a1f00; box-shadow: 0 6px 18px rgb(255 194 51 / .3), inset 0 1px 0 rgb(255 255 255 / .35); }

/* ---------- 10. Denski's own window (desktop/Denski.exe): real see-through glass, like Aura's ---------- */
/* web/native.js adds html.native only inside that window. The page goes clear, Windows blurs the apps behind it,
   and a smoky tint keeps text crisp (Aura's native values). In a browser none of this applies. */
#titlebar { display: none; }
html.native, html.native body { background: transparent !important; }
html.native body { background: rgb(12 12 16 / .42) !important; }
html.native .ambient { opacity: .45; }
html.native {
  --glass-thin-tint: rgb(26 26 30 / .62);
  --glass-card-tint: rgb(255 255 255 / .05);
  --glass-thick-tint: rgb(34 34 38 / .9);
}
html.native #titlebar { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 34px; align-items: center; gap: 8px;
  padding: 0 16px; z-index: 200; app-region: drag; -webkit-app-region: drag; }
html.native #titlebar .light { width: 13px; height: 13px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  app-region: no-drag; -webkit-app-region: no-drag; box-shadow: inset 0 0 0 .5px rgb(0 0 0 / .35);
  transition: filter 140ms var(--ease), transform 140ms var(--ease); }
html.native #titlebar .light svg { opacity: 0; transition: opacity 120ms var(--ease); }
html.native #titlebar:hover .light svg, html.native #titlebar .light:focus-visible svg { opacity: .75; }
html.native #titlebar .light:active { transform: scale(.88); filter: brightness(.85); }
html.native #titlebar .light.c { background: #ff5f57; }
html.native #titlebar .light.m { background: #febc2e; }
html.native #titlebar .light.x { background: #28c840; }
html.native #titlebar .tname { margin: 0 auto; font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: .02em; transform: translateX(-30px); pointer-events: none; }
/* the app sits under the strip */
html.native .shell { padding-top: 34px; }
@media (min-width: 761px) { html.native .shell { padding-top: 38px; } }
/* fixed sheets and the phone-width header start below the strip too */
html.native .sheetwrap, html.native .moresheet { top: 34px; }
/* the traffic lights are 13px dots: Denski's 44px tap minimum (polish.css) must not stretch them */
html.native #titlebar .light { width: 13px !important; height: 13px !important; min-width: 0 !important; min-height: 0 !important; flex: none; }
/* Aura's scrollbars: thin and faint, never the chunky white Windows ones */
* { scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .12) transparent; }
/* in the window Windows already blurs what's behind, so the page's own panel blurs are wasted GPU work that makes
   scrolling and the Aura tab feel laggy. Panels drop theirs; sheets, menus and popovers keep it (they sit over content). */
html.native :is(.rail, .sections, .sechead, .pghead, .glass, .side, .main, .members, .tabbar, .composer, .hpanel, #controls, .netbar) {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.native .ambient > i { animation: none; }
