@import url("system.css") layer(system);
/* The gate's panel (app/pages_panel.py). The page has no background of its
   own: the Mac app draws native glass behind the web view, and only a pane
   that holds found context turns solid. System colors, so light, dark and
   increased contrast follow the Mac. */
:root {
  color-scheme: light dark;
  --ink: CanvasText;
  --soft: color-mix(in srgb, CanvasText 78%, transparent);
  --faint: color-mix(in srgb, CanvasText 14%, transparent);
  --well: color-mix(in srgb, CanvasText 7%, transparent);
  /* a chosen row or chip. Separate from --faint, which Increase Contrast makes the ink itself */
  --chosen: color-mix(in srgb, CanvasText 14%, transparent);
  /* the accent stepped toward the ink, so a word in it clears 4.5:1 on the glass over any wallpaper */
  --link: light-dark(color-mix(in srgb, var(--accent) 50%, black), color-mix(in srgb, var(--accent) 35%, white));
  /* the one prominent fill: the accent a step deeper, so the system's white on the default blue clears 4.5:1 */
  --prominent: color-mix(in srgb, var(--accent) 90%, black);
  /* a control floating on the one glass: a flat fill, an edge and a soft lift, and never a second blur. The fill
     leans to a fixed neutral, so its ink holds whatever the wallpaper does */
  --cap-fill: light-dark(rgb(255 255 255 / .62), rgb(72 72 76 / .6));
  --cap-over: light-dark(rgb(255 255 255 / .84), rgb(92 92 96 / .68));
  --cap-edge: inset 0 .5px 0 light-dark(transparent, rgb(255 255 255 / .16)), 0 0 0 .5px light-dark(rgb(0 0 0 / .1), rgb(0 0 0 / .32)),
    0 1px 3px light-dark(rgb(0 0 0 / .08), rgb(0 0 0 / .28)), 0 3px 10px light-dark(rgb(0 0 0 / .07), rgb(0 0 0 / .18));
  --solid: color-mix(in srgb, Canvas 88%, transparent);
  --accent: AccentColor;
  --pad: 16px;
  /* a step done and a step left to look at: the system's green and orange, as the HIG prints them where the
     browser has no system colour for them */
  --done: light-dark(rgb(52 199 89), rgb(48 209 88));
  --warn: light-dark(rgb(255 149 0), rgb(255 159 10));
  /* the scale's names this sheet, home.css and glass.css time with (system.css). The curves are written out
     because pages_panel.py's selftest reads them here: --ease is --os-ease, and --e-exit is the window's own
     leave (GatePanel.swift) */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --e-exit: cubic-bezier(.4, 0, 1, 1);
  --t-fade: var(--os-d-short); --t-swap: var(--os-d-short); --t-enter: var(--os-d-standard); --t-quick: var(--os-d-standard); --t-step: var(--os-d-long);
}
@supports (color: -apple-system-green) { :root { --done: -apple-system-green; --warn: -apple-system-orange; } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: transparent; overflow: hidden; }
body {
  font: 13px/1.38 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none; cursor: default;
}
#panel { display: block; }
/* said to VoiceOver alone (panel.js announce) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The answer bar is always in view. What is above it scrolls once the panel
   is as tall as the screen lets it be. */
.call { position: relative; padding: 14px 0 12px; max-height: 100vh; display: flex; flex-direction: column; gap: 12px; }
.call > * { margin-left: var(--pad); margin-right: var(--pad); flex: none; }
.scroll { flex: 1 1 auto; min-height: 0; margin: 0 0 -12px; padding: 0 var(--pad) 12px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px;
  -webkit-mask-image: linear-gradient(to top, transparent, black 12px); mask-image: linear-gradient(to top, transparent, black 12px); }
.scroll > * { flex: none; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.who { margin: 0; font-size: 12px; color: var(--soft); flex: 1 1 auto; min-width: 60%; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* The reported name is the app's claim, so it is set apart from Samskara's own words: in
   quotation marks, in the line's own face, never a second typeface in the line read first. */
.claim { font: inherit; font-weight: 600; color: var(--ink); quotes: '\201C' '\201D'; }
.stack { display: flex; align-items: center; gap: 4px; flex: none; max-width: 40%; overflow: hidden; }
.stack .count { font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums; margin-left: 2px; }
.stack button { all: unset; width: 14px; height: 4px; border-radius: var(--os-r-full); background: var(--faint); cursor: default; }
.stack button.on { background: var(--ink); }
.stack button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ask { display: flex; flex-direction: column; gap: 6px; }
.ask-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
h1 { margin: 0; font-size: 17px; line-height: 1.24; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
h1 .claim { font-weight: 600; }
.arrow {
  flex: none; width: 24px; height: 24px; border-radius: var(--os-r-full); display: grid; place-items: center;
  color: var(--ink); background: var(--well); text-decoration: none; font-size: 13px; line-height: 1;
}
.arrow:hover { background: var(--chosen); }
.arrow:active { transform: scale(.94); }
.arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.head { margin: 0; font-size: 12px; color: var(--soft); overflow-wrap: anywhere; }
.said { margin: 4px 0 0; padding: 9px 11px; border-radius: var(--os-r-control); background: var(--well); }
.said figcaption { font-size: 12px; color: var(--soft); margin-bottom: 2px; }
.said blockquote { margin: 0; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.said blockquote.open { display: block; -webkit-line-clamp: unset; }
.all { all: unset; margin-top: 4px; font-size: 11px; font-weight: 500; color: var(--link); cursor: default; }
.all[hidden] { display: none; }
.all:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rest { margin: 0; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--soft); }
.rest button { border: 0; border-radius: var(--os-r-full); min-height: 24px; padding: 3px 11px; font: 500 12px/1.2 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; color: var(--ink); background: var(--cap-fill); box-shadow: var(--cap-edge); white-space: nowrap; }
.rest button:disabled, .rest button[data-wait] { opacity: .45; }

.searched { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 12px; color: var(--soft); }
.searched code { font: 500 12px/1.3 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; color: var(--ink); padding: 2px 7px; border-radius: var(--os-r-small); background: var(--well); overflow-wrap: anywhere; }


/* One section per line of the offering: a header, then that line's pane
   (/pane, documentation/panes.md). A line is clear until its pane has
   something to show, then it turns solid. With several lines one is open. */
/* Each line is a section of the one glass, with a hairline between lines: the replica content (bubbles, a mail,
   a photo) is the only filled shape on the pane. */
.lines { display: flex; flex-direction: column; gap: 0; margin: 0 calc(var(--pad) * -1); }
.line { overflow: hidden; background: transparent; box-shadow: inset 0 .5px 0 var(--faint); }
.line:first-child { box-shadow: none; }
.line-head { padding-left: var(--pad) !important; padding-right: calc(var(--pad) - 6px); }
/* A header too narrow for the app, a few letters of the title and the count sends Show and Open in Samskara
   to a row of their own, at the same trailing edge, so nothing runs under them. */
.line-head { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0 8px; min-height: 40px; padding: 0 8px 0 14px; }
/* the name never leaves the ring's row: at most the row less the ring, so a long title wraps inside it */
.line-name { all: unset; flex: 1 1 auto; min-width: 0; min-height: 40px; display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: default; }
.line-head:has(> .line-ring) > .line-name { max-width: calc(100% - 32px); }
/* All and Review hide the ring, so the name keeps the whole row */
.lv-all .line-head > .line-name, .lv-preview .line-head > .line-name { max-width: none; }
.line-name b { flex: none; font-weight: 600; }
/* the title reads whole: it asks the header for its full width, so a long one sends Show and Open in
   Samskara under it, and one longer than the row wraps onto the next line */
.line-title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--soft);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.line-count { flex: none; font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums; }
button.line-name:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--os-r-control); }
/* the pane's rings line up under the header's ring, and its fills stop at the pane's margins */
/* one length, so an opening line grows from 0 in one motion: a separate min-height would snap in first */
.well { height: clamp(220px, 56vh, 460px); padding: 0 6px; box-sizing: border-box; }
.well { transition: height var(--t-quick) var(--ease); }
.line:not(.open) .well { height: 0 !important; min-height: 0 !important; visibility: hidden; box-shadow: none; }
/* what was found sits on a solid ground, and only the chrome around it is glass (DESIGN.md, Glass and Appearance) */
.line.open .well { background: var(--ground); }
/* and it floats on the glass as one rounded sheet, its rings still under the header's ring */
.line.open .well { margin: 0 8px 8px; padding: 0; border-radius: calc(var(--os-r-window) - 8px); overflow: hidden; box-shadow: 0 0 0 .5px var(--faint); }
/* a pane held under its own height (room() keeps every line's header in view) fades at its foot, so the cut reads
   as more to scroll and not as a row sliced in half */
.line.open .well.is-held { -webkit-mask-image: linear-gradient(to top, transparent, black 16px); mask-image: linear-gradient(to top, transparent, black 16px); }
.line-face { flex: none; width: 20px; height: 20px; border-radius: var(--os-r-full); object-fit: cover; }
/* a person the archive has no picture of: their initials on a plain disc, as Contacts draws them */
.line-initials { display: grid; place-items: center; font: 600 9.5px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-style: normal; letter-spacing: .02em; color: var(--ink); background: color-mix(in srgb, CanvasText 16%, transparent); }
/* Show and Open in Samskara sit together at the end of a line's header */
.line-acts { flex: none; display: flex; align-items: center; gap: 6px; margin-block: 4px; }
.line-acts:empty { display: none; }
.lines.many .line-name { overflow: hidden; } .lines.many .line-name.app-said b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* a row whose app has no mark of its own says the app's name in the plain weight before the title */
.lines.many .line-name:not(.app-said) b { font-weight: 600; color: var(--ink); }
.lines.many .line-name:not(.app-said) .line-title { font-weight: 400; }
.lines.many .line-title { color: var(--ink); font-weight: 600; } .lines.many .line-title { min-width: 3ch; } .lines.many .line-head { padding-left: 10px; }
.line-ring { all: unset; flex: none; width: 20px; height: 20px; margin: 0 2px; border-radius: var(--os-r-full); box-shadow: inset 0 0 0 1.5px var(--soft); font: 700 12px/20px var(--sans, system-ui); text-align: center; color: #fff; cursor: default; }
.line-ring[aria-checked="true"], .line-ring[aria-checked="mixed"] { background: var(--accent); box-shadow: none; }
.line-ring[aria-checked="true"]::before { content: "\2713"; }
.line-ring[aria-checked="mixed"]::before { content: "\2013"; }
.line-ring:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-contrast: more) { .line-ring { box-shadow: inset 0 0 0 2px var(--ink, currentColor); } }
@media (prefers-reduced-motion: reduce) { .well { transition: none; } }
/* the panel comes forward in one fade (GatePanel.swift); a pane that loads after that fades in where it sits */
.pane-frame { display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: light dark; opacity: 0; transition: opacity var(--t-fade) var(--ease); }
.line.solid .pane-frame { opacity: 1; }
/* a pane is one stop for the keyboard: its frame shows the ring, and the arrow keys move inside it (pane.js) */
.line.open .well:focus-within { box-shadow: 0 0 0 2px var(--accent); }
/* the bar comes first in the page, for the keyboard (panel.js buildPane); on screen the requests sit above it */
.call.offer > .nav { order: -2; }
.call.offer > .scroll { order: -1; }
.late { margin: 0 var(--pad); font-size: 12px; color: var(--soft); }
.late[hidden] { display: none; }


.after { padding: 16px 0 14px; }
.done { margin: 0 var(--pad); font-size: 15px; line-height: 1.34; font-weight: 500; overflow-wrap: anywhere; text-wrap: pretty; }
.done .claim { font-weight: 600; }
.after .rest { margin: 0 var(--pad); align-items: center; }
.after .rest span { overflow-wrap: anywhere; }

/* Approve is the one prominent action, in the accent, and takes the room. Reject, Allow Again in This Chat and
   Review are plain. A click or one Return answers once the bar has armed (keyPress in panel.js). */
.bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bar button {
  flex: 1 1 auto; min-width: 0; min-height: 34px; padding: 5px 14px; border: 0; border-radius: var(--os-r-full);
  font: 500 13px/1.2 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; color: var(--ink);
  background: var(--cap-fill); box-shadow: var(--cap-edge); white-space: nowrap;
  transition: transform var(--t-swap) var(--ease), opacity var(--t-quick) var(--ease), background-color var(--t-quick) var(--ease);
}
.bar button:hover:not(:disabled):not([data-wait]) { background: var(--cap-over); }
.bar button[data-act="deny"] { flex: 0 1 auto; }
/* the longer allow sits on a row of its own under the three answers, so the bar keeps one shape with it or without it */
.bar button[data-act="standing"] { flex: 1 0 100%; min-height: 28px; background: none; box-shadow: none; color: var(--accent); }

/* AccentColorText resolves black in WebKit; the system's own text on the accent is white, as on a native prominent button */
.bar button[data-act="once"] { flex: 1 1 auto; background: var(--prominent); color: #fff; color: -apple-system-alternate-selected-text; font-weight: 600; }
.bar button[data-act="once"]:hover:not(:disabled):not([data-wait]) { background: color-mix(in srgb, var(--prominent) 88%, CanvasText); }
.bar button:active:not(:disabled):not([data-wait]) { transform: scale(.97); }
.bar button:disabled, .bar button[data-wait] { opacity: .45; }
.bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.foot { margin: 0 var(--pad); display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums;
  transition: color var(--t-fade) ease; }
/* a request's last minute: the orange is deepened in Light so the line clears 4.5:1 */
.foot.is-late { color: light-dark(color-mix(in srgb, var(--warn) 65%, black), var(--warn)); }
.elsewhere { color: var(--link); text-decoration: none; font-weight: 500; }
.elsewhere:hover { text-decoration: underline; }
.elsewhere:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--os-r-small); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.msg { margin: 0 var(--pad); font-size: 12px; color: var(--soft); }
.msg.lost { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; color: var(--ink); }
.msg.lost[hidden] { display: none; }

@media (prefers-reduced-transparency: reduce) {
  :root { --solid: Canvas; --cap-fill: color-mix(in srgb, Canvas 90%, CanvasText); --cap-over: color-mix(in srgb, Canvas 82%, CanvasText);
    --cap-edge: 0 0 0 .5px color-mix(in srgb, CanvasText 22%, transparent); }
}
@media (prefers-contrast: more) {
  :root { --soft: CanvasText; --faint: CanvasText; --solid: Canvas; --chosen: color-mix(in srgb, CanvasText 24%, transparent);
    --cap-fill: Canvas; --cap-over: color-mix(in srgb, Canvas 82%, CanvasText); --cap-edge: 0 0 0 1px CanvasText; }
  .open-in, .chip, .back, .more-lines, .arrow, .searched code { box-shadow: inset 0 0 0 1px var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .line, .pane-frame { transition: none; }
  .bar button, .arrow { transition: none; transform: none !important; }
}

.line-logo { flex: none; width: 18px; height: 18px; min-width: 18px; max-width: 18px; max-height: 18px; border-radius: var(--os-r-mark); object-fit: contain; }
.line-name b, .line-count, .line-head .arrow { flex: none; white-space: nowrap; }
.line-title { min-width: 6ch; }
/* nothing waits: one line on the glass */
.call.empty { padding: 18px 0; }
.call.empty .none { margin: 0; font-size: 13px; color: var(--soft); text-align: center; }
/* An app with several lines in a request across apps is one row that opens to them (panel.js foldRows). Its
   chevron stands where a line's ring does, so the names line up down the request. */
.fold { box-shadow: inset 0 .5px 0 var(--faint); }
.lines > .fold:first-child { box-shadow: none; }
.fold-body > .line:first-child { box-shadow: inset 0 .5px 0 var(--faint); }
.fold-head { min-height: 40px; }
.fold-chev { flex: none; position: relative; width: 20px; height: 20px; margin: 0 2px; }
.lv-all .fold-chev { display: none; }
.fold-chev::before { content: ''; position: absolute; left: 6px; top: 6px; width: 6px; height: 6px; border-right: 1.5px solid var(--soft);
  border-bottom: 1.5px solid var(--soft); transform: rotate(-45deg); transition: transform var(--t-quick) var(--ease); }
.fold.open .fold-chev::before { transform: translate(1px, -2px) rotate(45deg); }
.lines.many .line-name.fold-name b { font-weight: 600; color: var(--ink); }
/* an open fold's lines stand one step in, under its name, and leave the app's mark to the fold's own row; the pane
   moves in with its header, so its rings still line up under the header's ring */
.fold-body > .line > .line-head { padding-left: calc(var(--pad) + 24px) !important; }
.fold-body > .line.open .well { margin-left: 32px; }
.fold-body .line-logo { display: none; }
.lv-grown .fold-body > .line > .line-head, .lv-preview .fold-body > .line > .line-head { padding-left: var(--pad) !important; }
.lv-grown .fold-body > .line.open .well, .lv-preview .fold-body > .line.open .well { margin-left: 8px; }
.lines.many .fold-name .line-title { font-weight: 400; color: var(--soft); }
.lv-app .fold:not(.open) > .fold-body, .lv-all .fold-body, .lv-grown .fold-head, .lv-preview .fold-head { display: none; }
.lv-preview .fold:not(:has(.line.kept)) { display: none; }
.lv-grown .fold:not(:has(.line.open)) { display: none; }
@media (prefers-reduced-motion: reduce) { .fold-chev::before { transition: none; } }
/* what will be sent, over the buttons: the sentence a press decides on, in the full ink */
.goes { margin-bottom: -4px; font-size: 13px; line-height: 1.34; color: var(--ink); overflow-wrap: anywhere; text-wrap: pretty; }
.goes[hidden] { display: none; }
/* a status line sits with the countdown, on the pane's leading edge in the same type */
.files { margin: -6px var(--pad) 0; font-size: 12px; color: var(--soft); text-align: left; white-space: pre-line; }

/* The gallery (/panel/gallery, preview only): every source's panel, one at the panel's width or all at half size. */
body.gallery { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100%; overflow: hidden; background: var(--ground); -webkit-user-select: auto; user-select: auto; }
.g-nav { padding: 20px 12px; overflow-y: auto; box-shadow: inset -.5px 0 0 var(--faint); }
.g-nav h1 { margin: 0 8px 12px; font-size: 15px; font-weight: 700; }
.g-views { display: flex; gap: 4px; margin: 0 4px 12px; padding: 2px; border-radius: var(--os-r-control); background: var(--well); }
.g-views a { flex: 1 1 0; padding: 5px 0; border-radius: calc(var(--os-r-control) - 2px); font-size: 12px; text-align: center; color: var(--ink); text-decoration: none; }
.g-views a[aria-current] { background: Canvas; box-shadow: 0 0 0 .5px var(--faint), 0 1px 2px rgba(0, 0, 0, .12); font-weight: 600; }
.g-card { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px; border-radius: var(--os-r-control); color: var(--ink); text-decoration: none; }
.g-card b { flex: 1 1 auto; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-card b i { margin-left: 4px; font-style: normal; font-weight: 400; color: var(--soft); }
.g-card span:last-child { font-size: 11px; color: var(--soft); font-variant-numeric: tabular-nums; }
.g-card:hover { background: var(--well); }
.g-card[aria-current] { background: var(--chosen); }
.g-card.off b { color: var(--soft); }
.g-card:focus-visible, .g-views a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.g-stage { overflow: auto; padding: 28px; display: grid; justify-items: center; align-content: start; background: light-dark(#dfe5f2, #10162c); }
.g-wall { width: 440px; height: 780px; border-radius: var(--os-r-window); overflow: hidden; background: light-dark(rgba(255, 255, 255, .78), rgba(34, 38, 58, .82)); box-shadow: 0 0 0 .5px var(--faint), 0 18px 50px rgba(0, 0, 0, .28); }
.g-frame { display: block; width: 440px; height: 780px; border: 0; background: transparent; color-scheme: light dark; }
.g-none { margin: 0; padding: 40px 24px; text-align: center; color: var(--soft); }
.g-stage.all { grid-template-columns: repeat(auto-fill, 220px); gap: 24px; justify-content: center; }
.g-cell { margin: 0; width: 220px; height: 420px; }
.g-cell figcaption { display: flex; align-items: center; gap: 6px; height: 30px; font-size: 12px; }
.g-cell .g-wall { transform: scale(.5); transform-origin: 0 0; }
@media (prefers-contrast: more) { .g-card[aria-current], .g-views a[aria-current] { outline: 2px solid var(--ink); outline-offset: -2px; } }

/* The one pane (panel.js draw): a section per waiting request, each with a ring when there are several. */
.pane-title { margin: 0; }
.pane-title[hidden], .sec-ring[hidden] { display: none; }
.sec { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
.sec + .sec { box-shadow: inset 0 .5px 0 var(--faint); }
.sec-head { display: flex; align-items: flex-start; gap: 8px; }
.sec-ring { all: unset; flex: none; width: 20px; height: 20px; border-radius: var(--os-r-full); box-shadow: inset 0 0 0 1.5px var(--soft); font: 700 12px/20px system-ui; text-align: center; color: #fff; }
.sec-ring[aria-checked="true"] { background: var(--accent); box-shadow: none; }
.sec-ring[aria-checked="true"]::before { content: "\2713"; }
.sec-ring:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pane.many .sec h1 { font-size: 14px; }
.sec .lines, .sec .ask, .sec .searched, .grp-body { transition: opacity var(--t-fade) var(--ease); }
.sec.off .lines, .sec.off .ask, .sec.off .searched { opacity: .45; }

/* The pane's three levels (panel.js go): the overview of every app that asks (lv-all), one app's requests
   (lv-app) and one item grown in place (lv-grown); Review (lv-preview) shows what Approve sends. */
.grp { display: flex; flex-direction: column; }
.grp + .grp { box-shadow: inset 0 .5px 0 var(--faint); padding-top: 4px; }
.grp-head { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.grp-name { all: unset; flex: 1 1 auto; min-width: 0; min-height: 32px; display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: default; border-radius: var(--os-r-control); }
.grp-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-go { flex: none; margin-left: auto; padding: 0 4px; color: var(--soft); }
.reported { flex: none; font-size: 11px; color: var(--soft); white-space: nowrap; }
.unverified { flex: none; font-size: 11px; color: var(--soft); padding: 1px 6px; border-radius: var(--os-r-small); box-shadow: inset 0 0 0 .5px var(--soft); }
.app-mark { flex: none; width: 18px; height: 18px; border-radius: var(--os-r-mark); background: var(--ink); -webkit-mask: var(--mark) center / 15px no-repeat; mask: var(--mark) center / 15px no-repeat; }
.m-cursor { --mark: url(/static/app-cursor.svg); }
.m-codex { --mark: url(/static/app-codex.svg); }
.m-claudecode { --mark: url(/static/app-claudecode.svg); }
.m-gemini { --mark: url(/static/app-gemini.svg); }
.m-zed { --mark: url(/static/app-zed.svg); }
.m-warp { --mark: url(/static/app-warp.svg); }
.m-qwen { --mark: url(/static/app-qwen.svg); }
.m-claude, .m-chatgpt { background: center / contain no-repeat; -webkit-mask: none; mask: none; }
.m-claude { background-image: url(/static/source-claude.png); }
.m-chatgpt { background-image: url(/static/source-chatgpt.svg); }
.grp.off .grp-body { opacity: .45; }
.pane.single .grp-go, .pane.single .grp-ring { display: none; }
.pane.single .grp-name { pointer-events: none; }

/* Show and Open in Samskara: on each line, and on the item grown */
.open-in { flex: none; padding: 3px 9px; border-radius: var(--os-r-full); font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--ink); background: var(--well); text-decoration: none; white-space: nowrap; }
.open-in:hover { background: var(--chosen); }
.open-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.open-in[hidden] { display: none; }

/* the row above the requests: Back, where the pane is, and Show and Open in Samskara on an item grown */
.nav { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.nav[hidden] { display: none; }
.back-mark { display: inline-block; margin-right: 5px; vertical-align: -1px; }
.back { all: unset; flex: none; padding: 5px 12px 5px 10px; border-radius: var(--os-r-full); font-size: 13px; font-weight: 500; color: var(--ink); background: var(--cap-fill); box-shadow: var(--cap-edge); white-space: nowrap; cursor: default; }
.back:hover { background: var(--cap-over); }
.back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-title { flex: 1 1 auto; min-width: 0; text-align: center; font-size: 12px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more { margin: 0; font-size: 12px; color: var(--soft); }
.more[hidden], .chips[hidden], .preview[hidden], .secs[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { all: unset; flex: 0 1 auto; min-width: 0; max-width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--os-r-full); font-size: 12px; color: var(--ink); background: var(--well); white-space: nowrap; cursor: default; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip small { flex: none; font-size: 11px; color: var(--soft); }
.chip[aria-current] { background: var(--chosen); font-weight: 600; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the overview: each app's requests as headers only, no pane open */
.lv-all .well, .lv-all .line.open .well { height: 0 !important; min-height: 0 !important; margin: 0; visibility: hidden; box-shadow: none; }
.lv-all .line-ring { display: none; }
.lv-all .lines > :nth-child(n+5) { display: none; }
.more-lines { all: unset; align-self: flex-start; margin: 2px 0 0 26px; padding: 3px 9px; border-radius: var(--os-r-full); font-size: 12px; color: var(--soft); background: var(--well); cursor: default; }
.more-lines:hover { background: var(--chosen); }
.more-lines:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pane:not(.lv-all) .more-lines { display: none; }
/* one app: the other apps leave and this one fades in where it sits */
.lv-app .grp:not(.on), .lv-grown .grp:not(.on) { display: none; }
.pane:not(.single).lv-app .grp-head { display: none; }
.lv-app .grp.on { animation: across var(--t-fade) var(--ease); }
@keyframes across { from { opacity: 0; } }
/* grown: the open line alone, its pane as tall as the glass lets it be */
.lv-grown .grp-head, .lv-grown .sec-head, .lv-grown .searched, .lv-grown .ask, .lv-grown .late,
.lv-grown .line:not(.open), .lv-grown .line.open .line-head, .lv-grown .sec:not(.has-open) { display: none; }
.lv-grown .sec { padding: 0; }
/* Review's panes refit as each one draws what leaves, on the well's own transition; grown fills at once */
.lv-grown .well, .shift .well { transition: none; }
.lv-grown .line.open { box-shadow: none; }

/* Review: the panes already seen, each showing only what leaves (pane-dark.js draws it), with nothing to press */
.lv-preview .line:not(.kept), .lv-preview .sec:not(:has(.line.kept)), .lv-preview .grp:not(:has(.line.kept)),
.lv-preview .sec-head, .lv-preview .searched, .lv-preview .late, .lv-preview .grp-ring, .lv-preview .grp-go,
.lv-preview .line-ring, .lv-preview .line-acts, .lv-preview .more-lines { display: none; }
.lv-preview .grp-name, .lv-preview .line-name { pointer-events: none; }
.pane.single.lv-preview .grp-head { display: none; }
.preview { display: flex; flex-direction: column; gap: 8px; }
.pv-none { margin: 0; font-size: 12px; color: var(--soft); }
.bar button[data-act="review"] { flex: 0 1 auto; }
.bar button[data-act="review"][aria-pressed="true"] { background: var(--cap-over); box-shadow: 0 0 0 1.5px var(--ink); }
/* a pane that failed to load says so where it would be, with Try Again and Remove Item; Approve waits meanwhile */
.well { position: relative; }
.pane-fail { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; font-size: 13px; color: var(--ink); }
.pane-fail[hidden], .unshown[hidden] { display: none; }
.pane-fail p { margin: 0; max-width: 30ch; }
.pane-fail div, .unshown { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.unshown { justify-content: flex-start; margin-top: -4px; }
.pane-fail button, .unshown button { border: 0; border-radius: var(--os-r-full); min-height: 28px; padding: 4px 12px; font: 500 12px/1.2 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; color: var(--ink); background: var(--cap-fill); box-shadow: var(--cap-edge); white-space: nowrap; }
.pane-fail button:focus-visible, .unshown button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Every control a person decides with takes a press at least 28 points tall. The small ones keep the size they
   are drawn at and reach that through a larger hit box around them. */
.line-ring, .sec-ring, .open-in, .back, .chip, .more-lines, .all, .stack button { position: relative; }
.line-ring::after, .sec-ring::after { content: ''; position: absolute; inset: -4px; border-radius: var(--os-r-full); }
.back::after { content: ''; position: absolute; inset: -2px; }
.open-in::after, .chip::after { content: ''; position: absolute; inset: -3px 0; }
.more-lines::after { content: ''; position: absolute; inset: -4px 0; }
.all::after { content: ''; position: absolute; inset: -7px -4px; }
.stack button::after { content: ''; position: absolute; inset: -12px -2px; }
.rest button { min-height: 28px; }

@media (prefers-reduced-motion: reduce) {
  .lv-app .grp.on { animation: none; }
}

/* Show and Open in Samskara belong to the line that is open; a closed line is its name and its count */
.line:not(.open) .line-acts { display: none; }
.after .dismiss {
 display: block; width: max-content; margin: 10px var(--pad) 0; min-height: 28px; padding: 4px 14px; border: 0; border-radius: var(--os-r-full); background: var(--cap-fill); box-shadow: var(--cap-edge); color: inherit; font: inherit; font-size: 13px; font-weight: 500; }

/* Opened as a page in a browser there is no native glass behind the web

   view, so the page stands in for it: a ground, and the panel as one sheet
   with its tip. The Mac app never sets this class. */
html.browser, html.browser body { height: auto; overflow: auto; }
html.browser { min-height: 100%; background: radial-gradient(90% 60% at 12% 0%, #2a4c9c, transparent 70%), radial-gradient(70% 60% at 100% 20%, #5d4a92, transparent 70%), radial-gradient(90% 50% at 40% 110%, #a8765c, transparent 70%), #101b37; background-attachment: fixed; }
html.browser body { padding: 22px 8px 28px; }
html.browser #panel { position: relative; width: min(var(--w, 440px), 100%); margin: 0 auto; border-radius: var(--os-r-window); background: var(--glass-tint); box-shadow: inset 0 0 0 .5px var(--glass-rim), inset 0 1px 0 var(--glass-hi), var(--glass-lift); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
html.browser #panel:empty { display: none; }
/* the line after an answer leaves as the Mac app's window does (GatePanel.swift, Self.fade): one fade on ease-in */
html.browser #panel.is-leaving { opacity: 0; transition: opacity var(--t-fade) var(--e-exit); }
html.browser #panel::before { content: ''; position: absolute; top: -6px; left: calc(50% - 6px); width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px 0 0 0; background: var(--glass-tint); box-shadow: inset .5px .5px 0 var(--glass-rim); }
html.browser .call { max-height: calc(100vh - 50px); }
@media (prefers-color-scheme: light) {
  html.browser { background: radial-gradient(90% 60% at 12% 0%, #93baf4, transparent 70%), radial-gradient(70% 60% at 100% 20%, #c6b7e8, transparent 70%), radial-gradient(90% 50% at 40% 110%, #efc1a9, transparent 70%), #c3d5f2; background-attachment: fixed; }
}
@media (prefers-reduced-transparency: reduce) {
  html.browser #panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--ground); }
}
@media (max-width: 420px) { .line-title { min-width: 8ch; } }

