/* glass.css · P40's page: the tiles and the app window's layout. Every colour,
   size of type and radius is a token of the design system; the glass itself is
   material.css. */

.gw { flex: 1; min-height: 0; overflow: auto; background: var(--paper); }
.gw-wrap { display: flex; flex-direction: column; gap: 24px; max-width: 1320px; margin: 0 auto; padding: 28px 32px 80px; box-sizing: border-box; }
.gw-head { display: flex; flex-direction: column; gap: 6px; max-width: 820px; }
.gw-head > h1 { margin: 0; font-size: var(--fs-16); line-height: var(--lh-16); font-weight: var(--fw-550); color: var(--ink); }
.gw-head > p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.gw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.gw-icon { display: inline-flex; }
.gw-icon[hidden] { display: none; }
.gw-dim { font-size: var(--fs-12); line-height: var(--lh-12); color: var(--ink-3); }
.gw-section { display: flex; flex-direction: column; gap: 16px; }
.gw-section > h2 { margin: 0; font-size: var(--fs-13); line-height: var(--lh-13); font-weight: var(--fw-550); color: var(--ink); }
.gw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 600px), 1fr)); gap: 28px 20px; }

/* a tile: its number and name, the window, a note */
.gw-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; }
.gw-tile > figcaption { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-13); line-height: var(--lh-13); }
.gw-tile > figcaption > span { font-size: var(--fs-11); line-height: var(--lh-11); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gw-tile > figcaption > b { font-weight: var(--fw-550); color: var(--ink); }
.gw-note { margin: 0; font-size: var(--fs-12); line-height: var(--lh-12); color: var(--ink-3); text-wrap: pretty; }
.gw-try { display: flex; flex-direction: column; gap: 16px; }
.gw-slider { max-width: 360px; }

/* the app window: the design system's shell in a frame of its own */
.gw-window { max-width: 100%; overflow-x: auto; }
.gw-frame { display: flex; min-width: 600px; height: 440px; border-radius: var(--r-contain); box-shadow: 0 0 0 var(--px) var(--line-3); overflow: hidden; }
.gw-shell { position: relative; flex: 1; min-width: 0; }
.gw-shell > [data-part="work"] { grid-column: 2; }
.gw-shell[data-sidebar="closed"] > [data-part="work"] > [data-r="panel"] { margin-left: 8px; }
.gw-shell > [data-r="sidebar"][data-floating] { width: var(--sidebar-w, 240px); }
/* the floating sidebar of a shell without states outweighs the glass in the design system's rules; the glass is put back with the design system's own tokens */
[data-r="shell"]:not([data-sidebar-states]) > [data-r="sidebar"][data-floating][data-material="glass"] { background-color: var(--material-fill); box-shadow: var(--material-edge), var(--e3); }

.gw-scroll { flex: 1; min-height: 0; overflow: auto; }
.gw-body { padding: 12px 0 24px; }
.gw-dock { position: absolute; left: 0; right: 0; bottom: calc(var(--status-bar) + 16px); display: flex; justify-content: center; pointer-events: none; }
.gw-dock > * { pointer-events: auto; }
/* with a floating sidebar the dock is centred in what the sidebar leaves free */
.gw-shell[data-sidebar="closed"] .gw-dock { left: var(--sidebar-w, 240px); }

/* what is behind the glass: the app's list, or stripes of the design system's colours */
.gw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 4px 16px 16px; }
.gw-rows { display: flex; flex-direction: column; gap: 1px; }
.gw-colours { display: none; height: 1400px;
  background: repeating-linear-gradient(135deg,
    var(--zone-1) 0 40px, var(--zone-3) 40px 80px, var(--zone-6) 80px 120px,
    var(--chart-2) 120px 160px, var(--chart-4) 160px 200px, var(--chart-5) 200px 240px,
    var(--chart-6) 240px 280px, var(--chart-1) 280px 320px, var(--chart-8) 320px 360px); }
#gw[data-under="colours"] .gw-colours { display: block; }
#gw[data-under="colours"] .gw-content { display: none; }

@media (max-width: 640px) {
  .gw-wrap { padding: 20px 16px 64px; }
}
