/* Glance's workbench, as each of its skins draws it in the dark: quick launch as
   a rail along the panel's edge, the time, the station and the notes beside it.
   On glass each a piece of glass, on chart paper one slab, on Windows 11 one
   acrylic sheet. Glass is drawn by default, the others under html[data-look]
   below. Sizes are Glance's DIPs at panel size 1 (see bench.js). */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
/* Chart paper's face: Archivo with its weight and width axes, as Glance ships it (gfx.rs `ARCHIVO`). */
@font-face {
  font-family: "Archivo Variable";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* The skin's colours and faces, for the workbench (.gb) and for search and quick look (.gs, find.css) alike. */
.gb, .gs {
  /* How frosted the glass is (0 to 1): measured, as Glance measures it, from the desk's wallpaper where it lies
     (desk.js `frostOver`, skins.rs `frost`). Before that, clear, as Glance with no desktop to see. */
  --gb-frost: 0;
  /* The skin's colours (theme.rs `glass`, dark), and what is drawn on its ink (view.rs `ink_on`). */
  --gb-text: rgba(255, 255, 255, 0.95);
  --gb-text2: rgba(255, 255, 255, 0.68);
  --gb-text3: rgba(255, 255, 255, 0.46);
  --gb-track: rgba(255, 255, 255, 0.16);
  --gb-hover: rgba(255, 255, 255, 0.1);
  --gb-rule: rgba(255, 255, 255, 0.1);
  --gb-trace: #3d9bff;
  --gb-on-trace: #fff;
  /* The user's accent in the dark theme's shade (theme.rs `accent`), as the site takes it (Windows 11's trace below),
     a to-do's tick and the box it is in (view/todo.rs `mark`: glass's white on dark glass), and a time due by today
     (`soon`). */
  --gb-accent: #99ebff;
  --gb-mark: #fff;
  --gb-on-mark: #1b1b22;
  --gb-soon: var(--gb-accent);
  /* How round its controls are (theme.rs `control_radius`). */
  --gb-control: 16px;
  --gb-slide: 0.22s cubic-bezier(0.33, 1, 0.68, 1);
  color: var(--gb-text);
  font-family: "Inter", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: normal;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}
.gb { position: relative; display: flex; align-items: stretch; }
:is(.gb, .gs) *, :is(.gb, .gs) *::before, :is(.gb, .gs) *::after { box-sizing: border-box; }
:is(.gb, .gs) :where(button) { all: unset; box-sizing: border-box; cursor: default; }
:is(.gb, .gs) :where(button, [role="button"]):focus-visible { outline: 1.5px solid var(--gb-text2); outline-offset: 1px; border-radius: 12px; }
:is(.gb, .gs) svg { display: block; overflow: visible; }
:is(.gb, .gs) .ic { position: absolute; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- a piece of glass: the desktop through it, its tint, light inside its edge, its rim, its shadow (a lane's, and
   search's sheet and quick look's, glass sheets as a lane is: skins.rs `glass_sheet`) ---- */
.gb-piece, .gs-glass {
  position: relative;
  flex: none;
  border-radius: 24px;
  background: rgba(20, 20, 26, calc(0.16 + 0.68 * var(--gb-frost)));
  -webkit-backdrop-filter: blur(calc(9px * var(--gb-frost))) saturate(1.3);
  backdrop-filter: blur(calc(9px * var(--gb-frost))) saturate(1.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.5), inset 0 -1px 2px rgba(255, 255, 255, 0.12),
    inset 0 0 18px rgba(255, 255, 255, 0.07);
}
.gb-piece::after, .gs-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.25px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.2) 22%,
    rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.08) 78%, rgba(255, 255, 255, 0.22) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.gb-col { display: flex; flex-direction: column; flex: none; }

/* ---- words: each line box at its top, as Glance lays a line out ---- */
:is(.gb, .gs) .tx { position: absolute; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(.gb, .gs) .title { font-size: 13px; font-weight: 650; color: var(--gb-text); }
:is(.gb, .gs) .small { font-size: 12px; font-weight: 500; }
:is(.gb, .gs) .faint { color: var(--gb-text3); }
:is(.gb, .gs) .soft { color: var(--gb-text2); }
.gb-headline { position: absolute; display: flex; align-items: flex-start; gap: 8px; white-space: nowrap; }
.gb-headline .small { margin-top: 1px; color: var(--gb-text3); }

/* ---- buttons: a plate under the pointer ---- */
.gb-btn { position: absolute; color: var(--gb-text2); }
.gb-btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: transparent; }
.gb-btn:hover { color: var(--gb-text); }
.gb-btn:hover::before { background: var(--gb-hover); }

/* ---- the time ---- */
.gb-figure { position: absolute; font-weight: 600; letter-spacing: -0.035em; white-space: nowrap; color: var(--gb-text); }

/* ---- quick launch, as the rail ---- */
.gb-apps { position: absolute; overflow: hidden; }
.gb-app { position: absolute; width: 46px; height: 46px; }
/* (Its plate concentric with its picture's corners on glass: view.rs `app_plate`.) */
.gb-app::before { content: ""; position: absolute; left: 2px; top: 2px; width: 42px; height: 42px; border-radius: 13px; }
.gb-app:hover::before { background: var(--gb-hover); }
.gb-app :is(svg, img) { position: absolute; left: 7px; top: 7px; width: 32px; height: 32px; }
.gb-adder { position: absolute; width: 32px; height: 32px; color: var(--gb-text3); }
.gb-adder .plus { color: var(--gb-text2); }
.gb-adder:hover { color: var(--gb-text2); }
.gb-adder:hover .plus { color: var(--gb-text); }
.gb-foot { width: 32px; height: 32px; border-radius: var(--gb-control); }

/* ---- the station's head: its pages, the one shown on a pill of glass ---- */
.gb-tabs { position: absolute; display: flex; }
.gb-tab { position: relative; display: flex; align-items: flex-start; gap: 5px;
  font-size: 13px; font-weight: 650; color: var(--gb-text2); white-space: nowrap; }
.gb-tab .n { position: relative; z-index: 1; }
.gb-tab .c { position: relative; z-index: 1; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--gb-text3); }
.gb-tab::before, .gb-view::before { content: ""; position: absolute; left: 0; right: 0; top: var(--gb-row); height: 24px; border-radius: 12px; }
.gb-tab:hover, .gb-tab[aria-selected="true"] { color: var(--gb-text); }
.gb-tab:hover:not([aria-selected="true"])::before { background: rgba(255, 255, 255, 0.06); }
.gb-pill { position: absolute; height: 24px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); pointer-events: none;
  transition: left var(--gb-slide), width var(--gb-slide); }
.gb-pill::after { content: ""; position: absolute; inset: 0.5px; border-radius: inherit; padding: 1px;
  background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.gb-view { position: absolute; color: var(--gb-text2); }
.gb-view::before { border-radius: min(var(--gb-control), 12px); }
.gb-view:hover { color: var(--gb-text); }
.gb-view:hover::before { background: var(--gb-hover); }

/* ---- what is on the station: a card each ---- */
.gb-page { position: absolute; overflow: hidden; }
.gb-tile { position: absolute; }
.gb-tile::before { content: ""; position: absolute; left: -4px; top: -4px; right: -4px; bottom: -2px; border-radius: var(--gb-round); }
.gb-tile:hover::before { background: var(--gb-hover); }
.gb-face { position: absolute; left: 0; top: 0; }
.gb-plate { position: absolute; inset: 0; border-radius: 10px; background: var(--gb-track); overflow: hidden; }
.gb-plate img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gb-plate .tx { left: 5px; font-size: 11px; font-weight: 500; color: var(--gb-text2); }
.gb-badge { position: absolute; height: 16px; min-width: 16px; padding: 0 6px; border-radius: 8px; background: var(--gb-text2);
  color: #111; font-size: 10.5px; font-weight: 700; line-height: normal; text-align: center; white-space: nowrap; }
.gb-pinned { position: absolute; width: 16px; height: 16px; border-radius: 8px; background: var(--gb-trace); color: var(--gb-on-trace); }
.gb-name { color: var(--gb-text); }
.gb-empty { position: absolute; left: 0; width: 100%; text-align: center; color: var(--gb-text2); }

/* ---- the notes' head ---- */
.gb-shows { position: absolute; }
.gb-show { position: absolute; top: 0; width: 26px; height: 24px; border-radius: 12px; color: var(--gb-text3); }
.gb-show::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.gb-show:hover:not([aria-pressed="true"])::before { background: rgba(255, 255, 255, 0.06); }
.gb-show[aria-pressed="true"] { color: var(--gb-text); }
.gb-new { border-radius: min(var(--gb-control), 12px); }

/* ---- the notes: panes of coloured glass ---- */
.gb-notes { position: absolute; overflow: hidden; }
.gb-clip { position: absolute; overflow: hidden; }
.gb-card { position: absolute; overflow: hidden;
  box-shadow: 0 0 0 0.75px var(--rim), inset 0 0 0 0.75px var(--rim), 0 8px 24px rgba(0, 0, 0, var(--far)), 0 2px 6px rgba(0, 0, 0, 0.1125);
  --rim: rgba(255, 255, 255, 0.22); --far: 0.0875;
  transition: transform 0.12s ease-out; }
.gb-card:hover { --rim: rgba(255, 255, 255, 0.45); --far: 0.15; }
.gb-card.strip:hover { transform: translateY(-3px); }
.gb-card > .under { position: absolute; filter: blur(7px) saturate(1.3); }
.gb-card > .under > div { position: absolute; border-radius: 12px; }
.gb-card > .tint { position: absolute; inset: 0; border-radius: inherit; }
.gb-card > .band { position: absolute; left: 0; right: 0; top: 0; height: 4px; }
.gb-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; }
.gb-strip { position: absolute; left: 0; right: 0; display: flex; align-items: flex-start; gap: 10px; padding: 0 14px; white-space: nowrap; }
.gb-strip b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13px; }
.gb-strip span { margin-left: auto; margin-top: 1px; flex: none; font-size: 12px; }
.gb-row { position: absolute; left: 0; height: 40px; }
.gb-row::before { content: ""; position: absolute; left: -4px; right: -4px; top: 1px; bottom: 1px; border-radius: 8px; }
.gb-row:hover::before { background: var(--gb-hover); }
.gb-row .band { position: absolute; border-radius: 2px; }
.gb-row .words { position: absolute; right: 0; top: 4px; display: flex; align-items: flex-start; gap: 9px; }
.gb-row .lines { flex: 0 1 auto; min-width: 0; }
.gb-row .lines > div { height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-row .lines > div:first-child { font-weight: 600; color: var(--gb-text); }
.gb-row .lines > div + div { font-size: 12px; color: var(--gb-text3); }
.gb-row .when { margin-left: auto; margin-top: 8px; flex: none; font-size: 12px; color: var(--gb-text3); white-space: nowrap; }

/* ---- the search box: what it searches and the keys that open it from anywhere across its middle, the whole lane lit
   under the pointer (view.rs `paint_search`) ---- */
.gb-search::before { content: ""; position: absolute; inset: 0; border-radius: var(--gb-search-round); }
.gb-search:hover::before { background: var(--gb-hover); }
.gb-search .ic { color: var(--gb-text2); }
.gb-said, .gb-keys { position: absolute; top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gb-text3); }

/* ---- the to-dos (view/todo.rs): the field to write in, the rows, the line of those done ---- */
.gb-field { position: absolute; background: var(--gb-track); color: var(--gb-text3); }
.gb-field:hover { background: var(--gb-hover); }
.gb-line { position: absolute; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.gb-todos { position: absolute; overflow: hidden; }
.gb-todo-row { position: absolute; display: flex; align-items: center; white-space: nowrap; }
.gb-box { position: absolute; left: 0; box-shadow: inset 0 0 0 1.6px var(--gb-text3); color: var(--gb-on-mark); }
.gb-todo-row:hover .gb-box { box-shadow: inset 0 0 0 1.6px var(--gb-mark); }
.gb-todo-row.done .gb-box { background: var(--gb-mark); box-shadow: none; }
.gb-words { position: relative; flex: 0 1 auto; min-width: 0; margin-right: 4px; overflow: hidden; text-overflow: ellipsis; color: var(--gb-text); }
.gb-todo-row.done .gb-words { color: var(--gb-text3); }
/* (Struck through across the words shown, 1.2 thick, half a DIP under the row's middle.) */
.gb-todo-row.done .gb-words::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% + 0.5px); height: 1.2px; background: currentColor; }
.gb-when { flex: none; margin-left: auto; padding: 0 6px; color: var(--gb-text2); }
.gb-when.soon { font-weight: 600; color: var(--gb-soon); }
.gb-todo-row.done .gb-when { color: var(--gb-text3); }
.gb-done { position: absolute; display: flex; align-items: center; padding-top: 2px; box-shadow: inset 0 3px 0 -2px var(--gb-rule); color: var(--gb-text2); }
.gb-done-n { font-weight: 600; }
.gb-done svg.ic { position: static; flex: none; width: 12px; height: 12px; margin-left: 6px; }
.gb-clear { margin-left: auto; padding: 0 8px; color: var(--gb-text3); }

/* ---------- chart paper: one slab of chart paper flush with the screen edge (skins.rs `paper`), its corners on the
   screen's side beyond it, ringed by its rule. Each lane ruled off below, the rail ruled off from the columns
   (view.rs `paint`, `paint_rail`). One ink, the face Archivo ---------- */
[data-look="paper"] :is(.gb, .gs) {
  --gb-text: #e7eee7;
  --gb-text2: #a1b0a8;
  --gb-text3: #6b7b73;
  --gb-track: rgba(231, 238, 231, 0.08);
  --gb-hover: rgba(231, 238, 231, 0.07);
  --gb-rule: #263732;
  --gb-trace: #e7eee7;
  --gb-on-trace: #111;
  /* Its signal (theme.rs `paper`): a to-do's tick and a time due by today. */
  --gb-mark: #ff7b4a;
  --gb-on-mark: #14231f;
  --gb-soon: #ff7b4a;
  --gb-control: 6px;
  font-family: "Archivo Variable", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
}
[data-look="paper"] .gb {
  border-radius: 0 16px 16px 0;
  background: #14231f;
  box-shadow: 0 0 0 1px var(--gb-rule), 0 18px 40px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
}
[data-look="paper"] .gb-piece, [data-look="win11"] .gb-piece {
  border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
}
[data-look="paper"] .gb-piece::after, [data-look="win11"] .gb-piece::after { content: none; }
[data-look="paper"] .gb-lane { box-shadow: inset 0 -1px var(--gb-rule); }
[data-look="paper"] .gb-rail { box-shadow: 1px 0 var(--gb-rule); }
/* (A column after another ruled off from it, down the columns' height: view.rs `paint`.) */
[data-look="paper"] .gb-col + .gb-col { box-shadow: inset 1px 0 var(--gb-rule); }
[data-look="paper"] .gb-figure { font-weight: 620; font-stretch: 66%; letter-spacing: -0.01em; }

/* ---------- Windows 11: one acrylic sheet (skins.rs `fluent`): the desktop blurred and a little more saturated, a
   luminosity layer that evens out how bright it is, a thin tint. A hairline round it and a soft shadow. The desktop
   and the luminosity layer are laid under the sheet, that the layer blends with the desktop (desk.css keeps the edge
   from walling it off) ---------- */
[data-look="win11"] :is(.gb, .gs) {
  --gb-text: #fff;
  --gb-text2: rgba(255, 255, 255, 0.76);
  --gb-text3: rgba(255, 255, 255, 0.5);
  --gb-track: rgba(255, 255, 255, 0.14);
  --gb-hover: rgba(255, 255, 255, 0.06);
  --gb-rule: rgba(255, 255, 255, 0.06);
  /* The user's accent in the dark theme's shade, Windows' default blue where the system does not say (theme.rs `accent`). */
  --gb-trace: #99ebff;
  --gb-on-trace: #111;
  /* Its accent, the tick black in it (view/todo.rs `mark`). */
  --gb-mark: var(--gb-accent);
  --gb-on-mark: #000;
  --gb-control: 4px;
  font-family: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
}
[data-look="win11"] .gb {
  border-radius: 8px;
  background: rgba(44, 44, 44, 0.15);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
}
[data-look="win11"] .gb::before, [data-look="win11"] .gb::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
}
[data-look="win11"] .gb::before { -webkit-backdrop-filter: blur(30px) saturate(1.25); backdrop-filter: blur(30px) saturate(1.25); }
[data-look="win11"] .gb::after { background: #2c2c2c; mix-blend-mode: luminosity; opacity: 0.96; }
[data-look="win11"] :is(.gb, .gs) .title, [data-look="win11"] .gb-tab { font-size: 14px; font-weight: 600; }
[data-look="win11"] .gb-figure { font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; letter-spacing: -0.02em; }

/* ---------- chart paper and Windows 11 alike: plates square-cornered, ruled round, what is chosen marked under it
   (view.rs `choice_mark`), the others' names faint ---------- */
:is([data-look="paper"], [data-look="win11"]) .gb-app::before,
:is([data-look="paper"], [data-look="win11"]) .gb-tile::before,
:is([data-look="paper"], [data-look="win11"]) .gb-row::before { border-radius: 6px; }
:is([data-look="paper"], [data-look="win11"]) .gb-plate { box-shadow: 0 0 0 0.5px var(--gb-rule), inset 0 0 0 0.5px var(--gb-rule); }
:is([data-look="paper"], [data-look="win11"]) .gb-tab { color: var(--gb-text3); }
:is([data-look="paper"], [data-look="win11"]) .gb-tab:hover, :is([data-look="paper"], [data-look="win11"]) .gb-tab[aria-selected="true"] { color: var(--gb-text); }
[data-look="paper"] .gb-tab:hover:not([aria-selected="true"])::before { background: none; }
[data-look="win11"] .gb-tab::before { border-radius: 4px; }
[data-look="win11"] .gb-tab:hover:not([aria-selected="true"])::before { background: rgba(255, 255, 255, 0.036); }
:is([data-look="paper"], [data-look="win11"]) .gb-pill { border-radius: 0; background: var(--gb-text); }
:is([data-look="paper"], [data-look="win11"]) .gb-pill::after { content: none; }
[data-look="paper"] .gb-pill { height: 2px; }
[data-look="win11"] .gb-pill { height: 3px; border-radius: 1.5px; background: var(--gb-trace); }
:is([data-look="paper"], [data-look="win11"]) .gb-show { border-radius: var(--gb-control); }
:is([data-look="paper"], [data-look="win11"]) .gb-show:hover:not([aria-pressed="true"])::before { background: var(--gb-hover); }
/* A note's card: Windows 11's ruled round, the note's colour round it under the pointer, a soft shadow under it.
   Chart paper's ruled round in its rule, lit all over under the pointer (view.rs `note_card_rim`). */
[data-look="win11"] .gb-card { --rim: var(--gb-rule); --rim-w: 0.5px;
  box-shadow: 0 0 0 var(--rim-w) var(--rim), inset 0 0 0 var(--rim-w) var(--rim), 0 2px 8px rgba(0, 0, 0, 0.3); }
[data-look="win11"] .gb-card:hover { --rim: rgba(var(--mark), 0.8); --rim-w: 0.75px; }
[data-look="paper"] .gb-card, [data-look="paper"] .gb-card:hover { --rim: var(--gb-rule);
  box-shadow: 0 0 0 0.5px var(--rim), inset 0 0 0 0.5px var(--rim); }
[data-look="paper"] .gb-card:hover > .tint { background-image: linear-gradient(var(--gb-hover), var(--gb-hover)); }
