/* The site is a Mac app window: a translucent sidebar over the desktop, and
   a pane that scrolls, in macOS's system colours with Alfred's purple as
   the accent. */

:root {
  color-scheme: dark;
  /* A soft wallpaper for the window to sit on. */
  --desktop: radial-gradient(120% 90% at 15% 10%, #3b2358 0%, transparent 60%),
    radial-gradient(90% 80% at 90% 90%, #173055 0%, transparent 60%), #121016;
  --sidebar: rgba(40, 38, 46, 0.72);
  --pane: #1e1e20;
  --toolbar: rgba(30, 30, 32, 0.82);
  --group: #2a2a2d;
  --sheet: #29292c;
  --field: rgba(255, 255, 255, 0.07);
  --button: rgba(255, 255, 255, 0.13);
  --fg: #f5f5f7;
  --muted: rgba(235, 235, 245, 0.66);
  --faint: rgba(235, 235, 245, 0.55);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --separator: rgba(255, 255, 255, 0.09);
  --panel: rgba(255, 255, 255, 0.06);
  --hover: rgba(255, 255, 255, 0.07);
  /* Alfred's hat-band purple, sampled from the app icon. */
  --accent: #602090;
  --accent-top: #7433a8;
  --accent-fg: #fff;
  /* The accent lifted enough to read as a line or ring on dark grey. */
  --accent-line: #b28ae3;
  --focus: rgba(178, 138, 227, 0.6);
  --window-edge: 0 0 0 1px rgba(255, 255, 255, 0.1);
  --window-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.8), 0 24px 70px rgba(0, 0, 0, 0.55);
  /* SF Pro and SF Mono on a Mac; each platform's own UI font elsewhere. */
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --desktop: radial-gradient(120% 90% at 15% 10%, #e3d4f5 0%, transparent 60%),
      radial-gradient(90% 80% at 90% 90%, #cfe0f7 0%, transparent 60%), #eeeaf3;
    --sidebar: rgba(238, 236, 242, 0.7);
    --pane: #f5f5f7;
    --toolbar: rgba(245, 245, 247, 0.85);
    --group: #fff;
    --sheet: #f6f6f8;
    --field: rgba(0, 0, 0, 0.05);
    --button: #fff;
    --fg: #1d1d1f;
    --muted: rgba(0, 0, 0, 0.64);
    --faint: rgba(0, 0, 0, 0.56);
    --border: rgba(0, 0, 0, 0.12);
    --border-strong: rgba(0, 0, 0, 0.22);
    --separator: rgba(0, 0, 0, 0.09);
    --panel: rgba(0, 0, 0, 0.04);
    --hover: rgba(0, 0, 0, 0.05);
    --accent-line: #602090;
    --focus: rgba(96, 32, 144, 0.45);
    --window-edge: 0 0 0 0.5px rgba(0, 0, 0, 0.2);
    --window-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 24px 70px rgba(40, 20, 70, 0.22);
  }
}

* { box-sizing: border-box; }

code, kbd, pre { font-family: var(--mono); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Some elements below set display, which would beat the browser's own
   [hidden] rule. */
[hidden] { display: none !important; }

/* flow-root keeps the window's margin inside the body; collapsed through
   it, the page would be a margin taller than the viewport and scroll. */
body {
  display: flow-root;
  min-height: 100dvh;
  margin: 0;
  background: var(--desktop);
  background-attachment: fixed;
  color: var(--fg);
  font: 13px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 20;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
}

.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The window. */

.window {
  display: grid;
  grid-template-columns: 216px 1fr;
  width: calc(100% - 64px);
  max-width: 1180px;
  height: calc(100dvh - 64px);
  margin: 32px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--window-edge), var(--window-shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* 20px down centres the traffic lights on the pane's 52px toolbar. */
  padding: 20px 10px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--separator);
  background: var(--sidebar);
  backdrop-filter: blur(40px) saturate(1.6);
}

.traffic-lights { display: flex; gap: 8px; padding: 0 8px 20px; }

.traffic-lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2);
  background-position: center;
  background-repeat: no-repeat;
}

.traffic-lights span:nth-child(1) { background-color: #ff5f57; }
.traffic-lights span:nth-child(2) { background-color: #febc2e; }
.traffic-lights span:nth-child(3) { background-color: #28c840; }

/* Their glyphs appear on hover, as on a Mac. */
.traffic-lights:hover span:nth-child(1) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 1.5l5 5M6.5 1.5l-5 5' stroke='%234d0000' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.traffic-lights:hover span:nth-child(2) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1.2 4h5.6' stroke='%23995700' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.traffic-lights:hover span:nth-child(3) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 4.8V1.5h3.3zM6.5 3.2v3.3H3.2z' fill='%23006500'/%3E%3C/svg%3E");
}

/* What a click on a traffic light says: a macOS tooltip that floats off. */
.traffic-lights span { cursor: default; }

.huh {
  position: fixed;
  z-index: 100;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--sheet);
  box-shadow: 0 0 0 0.5px var(--border-strong), 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--fg);
  font-size: 11px;
  pointer-events: none;
  translate: -50% -50%;
  animation: huh 1.6s ease-out forwards;
}

@keyframes huh {
  from { opacity: 0; transform: scale(0.8); }
  12% { opacity: 1; transform: scale(1); }
  70% { opacity: 1; }
  to { opacity: 0; transform: translateY(-10px); }
}

/* App chrome isn't text to select. */
.sidebar, .toolbar, .card, .group-title, .row-detail { -webkit-user-select: none; user-select: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.mark { display: block; }

/* The hat is nearly black; a faint rim keeps it off the dark sidebar. */
@media (prefers-color-scheme: dark) {
  .mark { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.55)); }
}

.sidebar nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar nav a,
.sidebar-source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 7px;
  text-decoration: none;
}

.sidebar nav a:hover,
.sidebar-source:hover { background: var(--hover); }

/* The current page is selected, as a sidebar row is in the key window. */
.sidebar nav a[aria-current] { background: var(--accent); color: var(--accent-fg); }

.sidebar-source { margin-top: auto; color: var(--muted); }

/* System Settings' coloured icon tiles. */
.nav-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--tile);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
}

.nav-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pane { position: relative; overflow-y: auto; background: var(--pane); scrollbar-width: thin; }

/* app.js swaps the pane's contents on navigation, and the list for a detail
   view; the new ones fade in. Not on first load, before any swap. */
.pane[data-swapped] > * { animation: fade-in 150ms ease-out; }

@keyframes fade-in {
  from { opacity: 0; }
}

/* The pane's toolbar: its title, and its search field on the right. */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--separator);
  background: var(--toolbar);
  backdrop-filter: blur(20px) saturate(1.5);
}

.toolbar h1 { overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.toolbar-title { display: flex; align-items: center; gap: 4px; min-width: 0; }

/* A borderless toolbar button, as System Settings' back button. */
.back {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: default;
}

.back:hover { background: var(--hover); color: var(--fg); }

.back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-field { position: relative; width: 220px; max-width: 50%; }

/* The shortcut, shown only while the field is empty and unfocused. */
.shortcut {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 0 4px;
  transform: translateY(-50%);
  border-radius: 4px;
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
  color: var(--faint);
  font: 11px/16px var(--sans);
  pointer-events: none;
}

.search-field:focus-within .shortcut,
#filter:not(:placeholder-shown) + .shortcut { display: none; }

@media (hover: none), (max-width: 720px) {
  .shortcut { display: none; }
}

#filter {
  width: 100%;
  height: 28px;
  padding: 0 10px 0 28px;
  border: 0;
  border-radius: 7px;
  box-shadow: inset 0 0 0 0.5px var(--border);
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3Cpath d='M10.5 10.5l3.5 3.5' stroke='%23888' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 9px center;
  color: inherit;
  font: inherit;
}

/* The clear button as macOS draws it: a grey circle with a white ×. */
#filter::-webkit-search-cancel-button {
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='7' fill='%23999'/%3E%3Cpath d='M4.7 4.7l4.6 4.6M9.3 4.7L4.7 9.3' stroke='%23fff' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  cursor: default;
  -webkit-appearance: none;
}

.page { max-width: 900px; margin: 0 auto; padding: 20px 24px 48px; }

.intro { margin-bottom: 20px; color: var(--muted); }
.intro a { color: var(--fg); }

/* Centred in the pane, as Finder and System Settings show no results. */
.empty { padding: 72px 0; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 4px; color: var(--fg); font-size: 17px; }

/* Sections; gap rather than margins, so hidden ones leave no space. */

.sections { display: flex; flex-direction: column; gap: 24px; }
.category + .category { margin-top: 24px; }
.sections .category + .category { margin-top: 0; }

.group-title { margin: 0 0 8px 4px; color: var(--muted); font-size: 13px; font-weight: 600; }

/* Workflows: an inset grouped list, as in System Settings. */

.group {
  overflow: hidden;
  border-radius: 10px;
  background: var(--group);
  box-shadow: 0 0 0 0.5px var(--border), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card {
  display: flex;
  position: relative;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.card-workflow { padding: 10px 14px; }

/* Separators span the row, icon included, and only between visible rows. */
.card-workflow:not([hidden]) ~ .card-workflow:not([hidden])::before {
  content: "";
  position: absolute;
  top: 0;
  right: 14px;
  left: 14px;
  height: 1px;
  background: var(--separator);
}

.card .icon { display: block; flex: none; }
.card-body { flex: 1; min-width: 0; }
.card-body h3 { font-size: 13px; font-weight: 500; }

/* Rows and tiles are app content: the arrow cursor, not a link's hand. */
a.card { cursor: default; }
.card-body p { color: var(--muted); }

/* A released workflow's row opens its install page. */
a.card-workflow:hover { background: var(--hover); }
a.card-workflow:focus-visible { outline-offset: -3px; }

/* The version and a disclosure chevron, as System Settings rows that open
   something have. */
.row-detail {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 12px;
}

.row-detail svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Searches: a Finder icon view in each of System Settings' grouped panels,
   the keyword shown as Finder's grey item info. */

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 2px;
  padding: 8px;
}

a.card.search {
  flex-direction: column;
  gap: 2px;
  padding: 10px 4px 8px;
  border-radius: 8px;
  text-align: center;
}

a.card.search .icon { margin-bottom: 4px; }

a.card.search:hover { background: var(--hover); }
a.card.search:focus-visible { outline-offset: -3px; }

/* A hairline ring so dark icons (GitHub) don't vanish; the radius matches
   the one baked into the SVGs. */
.search .icon,
#add .detail-header img,
.drag-tile {
  border-radius: 24.4%;
  box-shadow: 0 0 0 0.5px var(--border), 0 1px 3px rgba(0, 0, 0, 0.12);
}

.tile-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tile-keyword { color: var(--faint); font: 11px/1.4 var(--mono); }

/* About. */

.prose { max-width: 680px; font-size: 14px; line-height: 1.6; }
.prose h1 { margin-bottom: 16px; font-size: 22px; }
.prose h2 { margin: 28px 0 8px; font-size: 15px; }
.prose p { margin: 0 0 12px; color: var(--muted); }
.prose strong { color: var(--fg); }
.prose a { color: var(--fg); }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.prose li + li { margin-top: 2px; }
.prose code { color: var(--fg); font: 12px/1.5 var(--mono); }

/* Controls. */

.btn {
  display: inline-block;
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--button);
  box-shadow: 0 0 0 0.5px var(--border-strong), 0 1px 1px rgba(0, 0, 0, 0.06);
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { filter: brightness(0.97); }

/* The default button, in the accent. */
.btn-primary {
  background: linear-gradient(var(--accent-top), var(--accent));
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25), inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
  color: var(--accent-fg);
}

.btn-primary:hover { filter: brightness(1.1); }

.btn-small { padding: 2px 10px; font-size: 12px; }

.btn:has(.btn-icon) { display: inline-flex; align-items: center; gap: 5px; }

.btn-icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A segmented control. */
.tabs {
  display: flex;
  align-self: flex-start;
  gap: 2px;
  padding: 2px;
  border-radius: 7px;
  background: var(--panel);
  box-shadow: inset 0 0 0 0.5px var(--border);
}

.tabs [role="tab"] {
  padding: 2px 12px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.tabs [role="tab"]:hover { color: var(--fg); }

.tabs [role="tab"][aria-selected="true"] {
  background: var(--button);
  box-shadow: 0 0 0 0.5px var(--border), 0 1px 2px rgba(0, 0, 0, 0.12);
  color: var(--fg);
}

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span, .field-head label { color: var(--muted); font-size: 12px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; }
.field-head a { color: var(--faint); font-size: 12px; text-decoration: none; }
.field-head a:hover { color: var(--fg); }

.options { display: flex; flex-direction: column; gap: 12px; }
.options:empty { display: none; }

.field input,
.field select {
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--group);
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
  color: inherit;
  font: inherit;
}

.field select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* Detail views: a card's page in place of the list, as System Settings
   opens a row. */

.detail .page { display: flex; flex-direction: column; gap: 20px; max-width: 800px; }
#add .page { max-width: 560px; }

.detail-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.detail-header h2 { font-size: 17px; }
.detail-header p { margin-top: 2px; color: var(--faint); }
.header-meta { display: flex; gap: 12px; }
.header-meta a { color: var(--muted); text-decoration: none; }
.header-meta a:hover { color: var(--fg); }

/* The workflow's pages, centred under its header as in System Settings. */
.page-tabs { align-self: center; }

/* A section's title, with its tabs on the right. */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h3 { font-size: 13px; font-weight: 700; }
#install-panel-install .section-head { margin-bottom: 18px; }
#install-panel-install .requirements .section-head { margin-bottom: 8px; }
.requirements { margin-bottom: 28px; }
.requirements .prose ul { margin-bottom: 0; }

/* Separate so the rounded border holds; hairlines divide the rows. */
.prose table {
  width: 100%;
  margin: 0 0 12px;
  overflow: hidden;
  border-spacing: 0;
  border-collapse: separate;
  border-radius: 8px;
  background: var(--group);
  box-shadow: 0 0 0 0.5px var(--border);
  font-size: 13px;
  line-height: 1.5;
}

.prose th,
.prose td { padding: 6px 12px; text-align: left; vertical-align: baseline; }

.prose thead th {
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.prose tbody tr > * { border-top: 1px solid var(--separator); }
.prose tbody th { white-space: nowrap; font-weight: 500; }
.prose td { color: var(--muted); }

.drag-tile { display: block; margin-top: 10px; cursor: grab; }
.drag-tile:active { cursor: grabbing; }

.fields { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

/* A real sequence: numbered circles joined by a rail. */
.steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li { position: relative; padding-left: 34px; counter-increment: step; }

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.steps li:has(~ li:not([hidden]))::after {
  content: "";
  position: absolute;
  top: 26px;
  bottom: -12px;
  left: 10px;
  width: 1px;
  background: var(--separator);
}

.steps h3 { font-size: 13px; line-height: 20px; }
.steps p { margin-top: 2px; color: var(--muted); }
.steps .fallback { margin-top: 8px; color: var(--faint); font-size: 12px; }
.steps a:not(.btn) { color: var(--fg); }
.steps .command { margin: 8px 0 0; }
.steps .btn.step-action { display: flex; width: fit-content; margin-top: 8px; }

.command {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 10px;
  border-radius: 7px;
  background: var(--group);
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
}

.command code {
  flex: 1;
  overflow-x: auto;
  color: var(--fg);
  font: 12px/1.5 var(--mono);
  white-space: pre;
}

/* The download URL is too long for one line; copying is unaffected. */
#install-script { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Phones: the window fills the screen, and the sidebar becomes a top bar. */

@media (max-width: 720px) {
  body { background: var(--pane); }

  .window {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
  }

  /* The sidebar becomes the window's title bar: traffic lights, the name and
     a Source toolbar button, then the pages as a segmented control. */
  .sidebar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--separator);
    background: var(--toolbar);
  }

  .traffic-lights, .brand { padding: 0; }

  .sidebar-source {
    grid-row: 1;
    grid-column: 3;
    margin: 0;
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--button);
    box-shadow: 0 0 0 0.5px var(--border-strong), 0 1px 1px rgba(0, 0, 0, 0.06);
    color: var(--fg);
    font-size: 12px;
  }

  .sidebar nav {
    grid-row: 2;
    grid-column: 1 / -1;
    flex-direction: row;
    padding: 2px;
    border-radius: 8px;
    background: var(--panel);
    box-shadow: inset 0 0 0 0.5px var(--border);
  }

  .sidebar nav a { flex: 1; justify-content: center; padding: 3px 6px; border-radius: 6px; font-size: 12px; }
  .sidebar .nav-icon { display: none; }
  .sidebar nav a:hover { background: none; }

  .sidebar nav a[aria-current] {
    background: var(--button);
    box-shadow: 0 0 0 0.5px var(--border), 0 1px 2px rgba(0, 0, 0, 0.12);
    color: var(--fg);
  }

  .pane { overflow: visible; }
  .toolbar { padding: 0 16px; }
  .page { padding: 16px 16px 40px; }
}
