/* =============================================================================
   whittled.dev · clearshot.css
   ClearShot's page only, linked after site.css. Almost all of it draws the
   product renderings: each <figure class="shot"> holds one inline SVG whose
   viewBox is the stage in macOS points (ui-spec.md), so the drawing scales with
   its column and the figure's --view-* variables crop it on phones. Shapes
   take their colours from the classes below, built on the --mac-* tokens that
   site.css scopes to .shot, so every rendering follows the theme switch:
   macOS's light appearance on the light page, its dark one on the dark page.
   Overlay pieces that are dark in both appearances (the dimming, the
   selection toolbar, tags) use the theme-independent tokens.

   Contents
     1. Rendering tokens (extra to site.css section 11)
     2. The stage and the sprite
     3. Paint classes
     4. Page additions (shortcut note, permissions, closing panel)
   ============================================================================= */


/* 1. Rendering tokens --------------------------------------------------------- */

.shot {
  --cs-titlebar: #F6F6F6;          /* a window's toolbar and title bar */
  --cs-panel: #F2F2F2;             /* inspector and bottom bar backgrounds */
  --cs-winline: rgba(0, 0, 0, .14);
  --cs-control: #FFFFFF;           /* bordered buttons and pop-ups */
  --cs-control-line: rgba(0, 0, 0, .16);
  --cs-field: #FFFFFF;
  --cs-field-line: rgba(0, 0, 0, .18);
  --cs-track: rgba(0, 0, 0, .10);
  --cs-knob: #FFFFFF;
  --cs-seg-track: rgba(0, 0, 0, .06);
  --cs-seg-on: #FFFFFF;
  --cs-toast-line: rgba(0, 0, 0, .10);
  --cs-editor-icon: #4A5462;
  --cs-accent-tint: rgba(0, 122, 255, .15);
  --cs-wave: rgba(255, 255, 255, .16);
  --cs-wave-2: rgba(255, 255, 255, .10);
  --cs-wave-3: rgba(255, 255, 255, .12);
}
html[data-theme="dark"] .shot {
  --cs-titlebar: #2C2C2E;
  --cs-panel: #282828;
  --cs-winline: rgba(255, 255, 255, .16);
  --cs-control: rgba(255, 255, 255, .14);
  --cs-control-line: rgba(255, 255, 255, .06);
  --cs-field: rgba(255, 255, 255, .06);
  --cs-field-line: rgba(255, 255, 255, .14);
  --cs-track: rgba(255, 255, 255, .14);
  --cs-knob: #CFCFD2;
  --cs-seg-track: rgba(255, 255, 255, .08);
  --cs-seg-on: rgba(255, 255, 255, .22);
  --cs-toast-line: rgba(255, 255, 255, .12);
  --cs-editor-icon: #6B7686;
  --cs-accent-tint: rgba(10, 132, 255, .22);
  --cs-wave: rgba(140, 200, 255, .07);
  --cs-wave-2: rgba(140, 200, 255, .05);
  --cs-wave-3: rgba(140, 200, 255, .06);
}


/* 2. The stage and the sprite ------------------------------------------------- */

/* The Tide wallpaper behind every ClearShot rendering (ui-spec 2.4). */
.cs-stage { background: var(--wall-tide); }

.cs-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-mac);
  text-rendering: geometricPrecision;
}
.cs-svg .tn { font-variant-numeric: tabular-nums; }

/* The symbol sheet: present for <use>, never painted or announced. */
.cs-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }


/* 3. Paint classes --------------------------------------------------------------
   Single-class selectors only: shapes inside <symbol> are painted through
   <use>, where only the element's own class can be matched. */

/* macOS appearance (follows the theme) */
.f-content { fill: var(--mac-content); }
.f-window { fill: var(--mac-window); }
.f-canvas { fill: var(--mac-canvas); }
.f-titlebar { fill: var(--cs-titlebar); }
.f-panel { fill: var(--cs-panel); }
.f-label { fill: var(--mac-label); }
.f-label2 { fill: var(--mac-label-2); }
.f-label3 { fill: var(--mac-label-3); }
.f-sep { fill: var(--mac-separator); }
.f-fill4 { fill: var(--mac-fill-4); }
.f-accent { fill: var(--mac-accent); }
.f-accent-tint { fill: var(--cs-accent-tint); }
.f-red { fill: var(--mac-red); }
.f-green { fill: var(--mac-green); }
.f-wood { fill: var(--wood); }
.f-material { fill: var(--mac-material); }
.f-menubar { fill: var(--mac-menubar); }
.f-control { fill: var(--cs-control); }
.f-field { fill: var(--cs-field); }
.f-track { fill: var(--cs-track); }
.f-knob { fill: var(--cs-knob); }
.f-seg-track { fill: var(--cs-seg-track); }
.f-seg-on { fill: var(--cs-seg-on); }
.f-editor-icon { fill: var(--cs-editor-icon); }
.f-handle { fill: #FFFFFF; }
.f-tide { fill: url(#cs-tide-light); }
html[data-theme="dark"] .f-tide { fill: url(#cs-tide-dark); }
.f-wave { fill: var(--cs-wave); }
.f-wave2 { fill: var(--cs-wave-2); }
.f-wave3 { fill: var(--cs-wave-3); }

.s-sep { stroke: var(--mac-separator); }
.s-label2 { stroke: var(--mac-label-2); }
.s-label3 { stroke: var(--mac-label-3); }
.s-accent { stroke: var(--mac-accent); }
.s-red { stroke: var(--mac-red); }
.s-wall { stroke: var(--wall); }
.s-winline { stroke: var(--cs-winline); }
.s-control { stroke: var(--cs-control-line); }
.s-field { stroke: var(--cs-field-line); }
.s-toastline { stroke: var(--cs-toast-line); }
.s-white { stroke: #FFFFFF; }

/* Glyphs are drawn in currentColor */
.c-label { color: var(--mac-label); }
.c-label2 { color: var(--mac-label-2); }
.c-accent { color: var(--mac-accent); }
.c-white { color: #FFFFFF; }

/* ClearShot's overlay: dark in both appearances (ui-spec 2.2) */
.f-dim { fill: var(--dim); }
.f-hud { fill: var(--hud-material); }
.f-hud-hover { fill: var(--hud-hover); }
.f-hud-on { fill: var(--hud-on); }
.f-hud-accent { fill: var(--hud-accent); }
.f-hud-divider { fill: rgba(255, 255, 255, .10); }
.f-hud-field { fill: rgba(255, 255, 255, .06); }
.s-hud-field { stroke: rgba(255, 255, 255, .15); }
.s-hudline { stroke: rgba(255, 255, 255, .10); }
.f-meter { fill: rgba(255, 255, 255, .20); }
.f-tag { fill: var(--tag); }
.f-qa { fill: var(--qa-control); }
.f-qa-dim { fill: var(--qa-dim); }
.f-white { fill: #FFFFFF; }
.f-white55 { fill: rgba(255, 255, 255, .55); }
.f-white40 { fill: rgba(255, 255, 255, .40); }

/* Window controls, the pointer and the QR code look the same in both appearances */
.f-tl-close { fill: #FF5F57; }
.f-tl-min { fill: #FEBC2E; }
.f-tl-zoom { fill: #28C840; }
.f-tl-off { fill: var(--mac-inactive-light); }
.f-tl-dot { fill: rgba(77, 0, 0, .55); }
.cs-pointer { fill: #000000; stroke: #FFFFFF; stroke-width: 1.6; stroke-linejoin: round; paint-order: stroke; }
.f-qr-bg { fill: #FFFFFF; }
.f-qr { fill: #000000; }


/* 4. Page additions ------------------------------------------------------------- */

/* The two lines under the keycaps. */
.cs-keys-note {
  max-width: var(--measure);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  color: var(--text-2);
}
.cs-keys-note > * + * { margin-top: .5em; }

/* Permissions under Requirements: a plain list with hairlines, like the facts above it. */
.cs-permissions { margin-top: var(--s-3); border-top: 1px solid var(--line); }
.cs-permissions > li { padding-block: 12px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.cs-permissions strong { font-weight: 500; color: var(--text); }

/* The closing panel's small print: version, requirements and how to verify. */
.cs-get .cs-get__fine { display: grid; gap: var(--s-2); justify-items: center; }
.cs-get .cs-get__fine .link { color: var(--text); white-space: nowrap; }


/* A feature's guide line (.feature__detail; site.css places it in the wide
   Screen Recording row). Its short links never break. */
.feature__detail .link { white-space: nowrap; }
/* Two guides: spaced apart where they share a line, stacked flush on phones. */
@media (min-width: 600px) { .feature__detail .link + .link { margin-inline-start: var(--s-4); } }
