@import url('assets/fonts.css');

/* Sill site
   Palette: glacier page, ink text, taskbar glass, signal blue actions, amber accents.
   Type: Schibsted Grotesk (display), Hanken Grotesk (body), JetBrains Mono (versions, keys). */

:root {
  --glacier: #f3f6fb;
  --paper: #ffffff;
  --ink: #0b1322;
  --slate: #5b6678;
  --line: rgba(11, 19, 34, 0.1);
  --bar: #1e1e21;
  --bar-raised: #2c2d31;
  --bar-line: rgba(255, 255, 255, 0.09);
  --bar-text: #e8edf6;
  --blue: #1474ff;
  --blue-deep: #0b5ad6;
  --sky: #31b5ff;
  --amber: #ffb423;
  --wallpaper: linear-gradient(135deg, #1474ff 0%, #31b5ff 55%, #ffb423 100%);

  --display: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Hanken Grotesk', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --page: 1120px;
  --taskbar-height: 58px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--glacier);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--taskbar-height) + 8px);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-deep);
}

:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  color: var(--ink);
  margin: 0;
}

h1 {
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.032em;
  word-spacing: 0.04em;
}

h2 {
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h3 {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p {
  margin: 0;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--slate);
  max-width: 40rem;
}

.mono,
code,
kbd {
  font-family: var(--mono);
  font-size: 0.82em;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bar);
  color: var(--bar-text);
  font: 500 13px/1.6 var(--mono);
  overflow-x: auto;
}

/* ---------- Layout ---------- */

.page {
  width: min(var(--page), 100% - 40px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(40px, 5.5vw, 72px);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(20px, 3vw, 32px);
  max-width: 44rem;
}

.label {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 800 1.1rem/1 var(--display);
  letter-spacing: -0.02em;
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand:hover {
  color: var(--ink);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
}

.header-links a:not(.button) {
  color: var(--slate);
  text-decoration: none;
}

.header-links a:not(.button):hover {
  color: var(--ink);
}

.header-links a[aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
}

/* On a wallpaper background the header sits on color. */
.on-wallpaper .brand,
.on-wallpaper .brand:hover,
.on-wallpaper .header-links a:not(.button),
.on-wallpaper .header-links a[aria-current='page'] {
  color: #fff;
}

.on-wallpaper .header-links a:not(.button):hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 600 0.98rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--blue-deep);
  color: #fff;
}

.button:active {
  transform: translateY(1px);
}

.button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.button-quiet:hover {
  background: var(--paper);
  color: var(--ink);
}

.button-small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.button .mono {
  opacity: 0.75;
  font-weight: 500;
}

/* ---------- Desktop hero (index, download) ---------- */

.desktop {
  position: relative;
  background: var(--wallpaper);
  color: #fff;
  overflow: hidden;
}

/* Soft light across the wallpaper, like a real desktop background. */
.desktop::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(255, 255, 255, 0.28), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(11, 19, 34, 0.25), transparent 70%);
  pointer-events: none;
}

.desktop > * {
  position: relative;
}

.desktop-stage {
  display: grid;
  align-content: center;
  padding-block: clamp(20px, 4vw, 44px) clamp(40px, 6vw, 64px);
}

.window {
  width: min(760px, 100%);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(11, 19, 34, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding-left: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--slate);
}

.window-bar img {
  width: 16px;
  height: 16px;
}

.window-controls {
  margin-left: auto;
  display: flex;
  height: 100%;
}

.window-controls span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 100%;
  font: 400 15px/1 var(--body);
  color: var(--slate);
}

.window-controls span:last-child:hover {
  background: #e81123;
  color: #fff;
}

.window-body {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 4.5vw, 48px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.release-meta {
  color: var(--slate);
  font-size: 0.9rem;
}

.release-meta .mono {
  color: var(--ink);
}

.try-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(11, 19, 34, 0.35);
}

.try-hint svg {
  flex: none;
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  50% {
    transform: translateY(4px);
  }
}

/* ---------- Anatomy (what's on the bar) ---------- */

.anatomy {
  display: grid;
  gap: 0;
}

/* Replica and labels share one column template so each label sits under its part. */
.replica,
.anatomy-parts {
  --anatomy-cols: 0.8fr 1.55fr 1.45fr 0.9fr 0.75fr;
  /* Every leader line drops from this x-offset inside its column, and each bar
     piece is positioned so its center sits exactly there. */
  --leader-x: 31px;
}

.replica {
  display: grid;
  grid-template-columns: var(--anatomy-cols);
  align-items: stretch;
  height: 58px;
  margin-top: 150px; /* room for the popped-up window preview */
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bar);
  color: var(--bar-text);
}

.replica > * {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0;
}

/* Avatar is 30px wide: 16px + 15px = --leader-x. */
.replica-start {
  padding-left: calc(var(--leader-x) - 15px);
}

.replica-start .tb-avatar {
  flex: none;
}

/* App buttons are 50px wide: 6px + 25px = --leader-x. */
.replica .tb-app {
  flex: none;
  width: 50px;
}

.replica-apps,
.replica-preview {
  padding-left: calc(var(--leader-x) - 25px);
}

.replica-apps .tb-sep {
  margin: 0 0 0 8px;
}

.replica-popped {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.replica-card {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  width: 208px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(40, 41, 45, 0.98);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--bar-line);
  transform: translateX(-50%);
}

.replica-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.replica-card-head .tb-tile {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.replica-card-head .tb-tile svg {
  width: 11px;
  height: 11px;
}

.replica-card-head b {
  font-weight: 500;
}

.replica-close {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
}

.replica-thumb {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #f4f5f7;
}

.replica-thumb i {
  height: 6px;
  border-radius: 3px;
  background: #cfd4dc;
}

.replica-thumb i:first-child {
  width: 55%;
  background: #1f2330;
}

.replica-thumb i:nth-child(3) {
  width: 80%;
}

.tb-app.is-hover::before {
  background: rgba(255, 255, 255, 0.06);
}

.replica .replica-clock {
  display: grid;
  place-content: center start;
  justify-items: start;
  min-width: 0;
  padding: 0 0 0 calc(var(--leader-x) - 15px);
  text-align: left;
  cursor: default;
}

.replica-desk {
  justify-self: end;
  width: 10px;
  padding: 0;
  border-left: 1px solid var(--bar-line);
}

.anatomy-parts {
  display: grid;
  grid-template-columns: var(--anatomy-cols);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper);
}

/* Each part hangs off its piece of the bar with a leader line. */
.part {
  position: relative;
  padding: 26px 16px 22px;
}

.part::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(var(--leader-x) - 0.5px);
  width: 1px;
  height: 16px;
  background: var(--blue);
}

.part h3 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.part p {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.5;
}

.part {
  padding-left: 10px;
}

/* The sliver is the last 10px of the bar; the parts box has a 1px border. */
.part-desk::before {
  left: auto;
  right: 3.5px;
}

.settings-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.settings-chips li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9rem;
}

.settings-chips li:first-child {
  background: transparent;
  box-shadow: none;
  color: var(--slate);
  padding-left: 0;
}

/* ---------- Switching table ---------- */

.switch-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}

.switch-table th,
.switch-table td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.switch-table tr:last-child td {
  border-bottom: 0;
}

.switch-table thead th {
  font: 500 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate);
  background: var(--glacier);
}

.switch-table td:first-child {
  width: 42%;
  color: var(--slate);
}

/* ---------- Plans ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.plan {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.plan-price {
  font: 900 2.6rem/1 var(--display);
  letter-spacing: -0.04em;
}

.plan-price small {
  font: 500 0.9rem var(--body);
  letter-spacing: 0;
  color: var(--slate);
}

.plan .button {
  justify-self: start;
}

.plan ul {
  margin: 4px 0 8px;
  padding-left: 18px;
  color: var(--slate);
}

.plan-soon {
  background: repeating-linear-gradient(135deg, var(--paper) 0 14px, var(--glacier) 14px 28px);
}

.tag {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 180, 35, 0.18);
  color: #8a5a00;
  font: 500 12px/1.2 var(--mono);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}

/* Block, not grid: inline text and <strong> must flow as one paragraph. */
.steps li {
  counter-increment: step;
  display: block;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.95rem;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bar);
  color: #fff;
  font: 500 13px/1 var(--mono);
}

.steps strong {
  font-weight: 600;
}

.note {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(20, 116, 255, 0.07);
  font-size: 0.95rem;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font: 700 1.05rem/1.3 var(--display);
  letter-spacing: -0.01em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font: 400 1.4rem/1 var(--body);
  color: var(--slate);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > p {
  padding: 0 0 20px;
  color: var(--slate);
  max-width: 46rem;
}

/* ---------- Forms ---------- */

.form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(11, 19, 34, 0.16);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.4 var(--body);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 116, 255, 0.18);
}

.form-status {
  min-height: 1.5em;
  font-size: 0.92rem;
  color: var(--slate);
}

.form-status.is-error {
  color: #c2261a;
}

.form-status.is-success {
  color: #137a3a;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.panel {
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- Page header (inner pages) ---------- */

.page > main {
  padding-bottom: clamp(40px, 6vw, 72px);
}

.page-head {
  display: grid;
  gap: 12px;
  padding-block: clamp(36px, 6vw, 72px) clamp(24px, 4vw, 40px);
}

.page-head h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
}

/* ---------- Changelog ---------- */

.release {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
}

.release-id {
  display: grid;
  align-content: start;
  gap: 6px;
}

.release-id h2 {
  font: 500 1.35rem/1 var(--mono);
  letter-spacing: -0.02em;
}

.release-id time {
  color: var(--slate);
  font-size: 0.9rem;
}

.release-body h3 {
  margin: 0 0 6px;
  font: 500 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
}

.release-body ul {
  margin: 0 0 20px;
  padding-left: 18px;
}

.release-body li {
  margin-bottom: 6px;
}

.badge-latest {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.03em;
}

/* ---------- Account / Admin ---------- */

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(11, 19, 34, 0.06);
  margin-bottom: 20px;
}

.tabs button {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--slate);
  font: 600 0.92rem/1 var(--body);
  cursor: pointer;
}

.tabs button[aria-selected='true'] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(11, 19, 34, 0.12);
}

.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--wallpaper);
  color: #fff;
  font: 800 1.3rem/1 var(--display);
}

.list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.list li:last-child {
  border-bottom: 0;
}

.muted {
  color: var(--slate);
}

.banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(19, 122, 58, 0.1);
  color: #0f5c2d;
  margin-bottom: 18px;
}

.banner.is-warn {
  background: rgba(255, 180, 35, 0.16);
  color: #6d4700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.stat b {
  display: block;
  font: 900 2rem/1.1 var(--display);
  letter-spacing: -0.03em;
}

.stat span {
  color: var(--slate);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  font: 500 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
  background: var(--glacier);
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table .message {
  min-width: 260px;
  white-space: pre-wrap;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(11, 19, 34, 0.07);
  font: 500 11px/1.4 var(--mono);
}

.status-pill.is-new {
  background: rgba(20, 116, 255, 0.12);
  color: var(--blue-deep);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

/* ---------- Article (privacy, terms) ---------- */

.article {
  max-width: 46rem;
  padding-bottom: 64px;
}

.article h2 {
  font-size: 1.35rem;
  margin: 34px 0 8px;
}

.article p,
.article ul {
  color: #273245;
  margin: 0 0 12px;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--slate);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  color: var(--slate);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

/* ======================================================================
   The taskbar: the site's navigation, built like Sill (taskbar.js)
   ====================================================================== */

.taskbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  height: var(--taskbar-height);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(30, 30, 33, 0.97);
  border-top: 1px solid var(--bar-line);
  color: var(--bar-text);
  backdrop-filter: blur(16px);
  font: 400 13px/1.2 var(--body);
}

/* Start: the user's avatar, like the app (which shows the Mac account picture). */
.tb-start {
  display: grid;
  place-items: center;
  width: 62px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tb-start:hover,
.tb-start[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.07);
}

.tb-avatar {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #c9ced8, #8e96a5);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: #1e1e21;
  overflow: hidden;
}

.tb-avatar.has-initial {
  background: var(--wallpaper);
  color: #fff;
  font: 700 13px/1 var(--display);
}

.tb-avatar svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.tb-apps {
  display: flex;
  align-items: center;
  gap: 0;
  padding-left: 14px;
  flex: 1;
  min-width: 0;
}

.tb-sep {
  flex: none;
  width: 1px;
  height: 28px;
  margin: 0 8px;
  background: var(--bar-line);
}

.tb-app {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* Hover and "in front" get a rounded highlight behind the icon, like the app. */
.tb-app::before {
  content: '';
  position: absolute;
  inset: 6px 5px;
  border-radius: 10px;
  background: transparent;
  transition: background-color 0.15s ease;
}

.tb-app:hover::before {
  background: rgba(255, 255, 255, 0.06);
}

.tb-app[aria-current]::before,
.tb-app.is-front::before {
  background: rgba(255, 255, 255, 0.11);
}

/* Dark-mode style icons: graphite tile, light glyph. */
.tb-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(180deg, #45484f, #2c2e33);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px rgba(0, 0, 0, 0.4);
  color: #e9ebef;
}

.tb-tile svg {
  width: 17px;
  height: 17px;
}

/* Indicators: a grey dot for "running", a blue bar for the one in front. */
.tb-app::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: #a9afba;
  transform: translateX(-50%);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.tb-app.is-running::after {
  width: 5px;
}

.tb-app[aria-current]::after,
.tb-app.is-front::after {
  width: 22px;
  background: var(--blue);
}

.tb-tray {
  display: flex;
  align-items: stretch;
}

.tb-clock {
  display: grid;
  place-content: center;
  justify-items: end;
  min-width: 96px;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid var(--bar-line);
  background: transparent;
  color: inherit;
  text-align: right;
  font: 600 13px/1.3 var(--body);
  cursor: pointer;
}

.tb-clock:hover,
.tb-clock[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.06);
}

.tb-clock small {
  font-weight: 400;
  font-size: 11.5px;
  opacity: 0.72;
}

.tb-desktop {
  width: 10px;
  border: 0;
  border-left: 1px solid var(--bar-line);
  background: transparent;
  cursor: pointer;
}

.tb-desktop:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Popovers that open above the bar: launcher, previews, calendar. */
.tb-pop {
  position: fixed;
  bottom: calc(var(--taskbar-height) + 8px);
  z-index: 60;
  border-radius: 12px;
  background: rgba(40, 41, 45, 0.97);
  color: var(--bar-text);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--bar-line);
  backdrop-filter: blur(16px);
  animation: pop-in 0.14s ease-out;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.tb-menu {
  left: 8px;
  width: min(360px, calc(100vw - 16px));
  padding: 12px;
}

.tb-menu input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  color: #fff;
}

.tb-menu input::placeholder {
  color: rgba(232, 237, 246, 0.55);
}

.tb-menu input:focus {
  border-color: var(--sky);
  box-shadow: none;
}

.tb-results {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.tb-results a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.tb-results a small {
  display: block;
  opacity: 0.6;
  font-size: 12px;
}

.tb-results a[aria-selected='true'],
.tb-results a:hover {
  background: rgba(255, 255, 255, 0.09);
}

.tb-results .tb-tile {
  width: 28px;
  height: 28px;
  flex: none;
}

.tb-empty {
  padding: 10px;
  opacity: 0.7;
}

.tb-menu-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--bar-line);
  font-size: 12px;
  opacity: 0.75;
}

.tb-menu-foot kbd {
  background: rgba(255, 255, 255, 0.1);
  border-color: transparent;
  color: inherit;
}

.tb-preview {
  width: 220px;
  padding: 10px;
  pointer-events: none;
}

.tb-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.tb-preview-head .tb-tile {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.tb-preview-head .tb-tile svg {
  width: 11px;
  height: 11px;
}

.tb-preview-body {
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0.85;
}

.tb-calendar {
  right: 8px;
  width: 268px;
  padding: 14px;
}

.tb-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
}

.tb-cal-head button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}

.tb-cal-head button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.tb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  font-size: 12.5px;
}

.tb-cal-grid .dow {
  opacity: 0.55;
  font-size: 11px;
  padding-bottom: 4px;
}

.tb-cal-grid span {
  padding: 6px 0;
  border-radius: 7px;
}

.tb-cal-grid .today {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .replica,
  .anatomy-parts {
    grid-template-columns: 1fr;
  }

  .replica {
    display: none;
  }

  .anatomy-parts {
    border-top: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .part,
  .part-desk {
    padding: 18px 18px 18px 30px;
    border-bottom: 1px solid var(--line);
  }

  .part:last-child {
    border-bottom: 0;
  }

  .part::before,
  .part-desk::before {
    top: 22px;
    left: 16px;
    right: auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .header-links a:not(.button):not(.keep) {
    display: none;
  }

  .plans,
  .steps,
  .form-row {
    grid-template-columns: 1fr;
  }

  .switch-table td:first-child {
    width: 46%;
  }

  .switch-table th,
  .switch-table td {
    padding: 12px 14px;
  }

  .tb-app {
    width: 46px;
  }

  .tb-apps {
    padding-left: 4px;
  }

  .tb-clock {
    min-width: 0;
    padding: 0 10px;
  }

  .tb-clock small {
    display: none;
  }

  .window-controls span {
    width: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Support development ---------- */

.donate {
  display: grid;
  gap: 14px;
  align-content: start;
}

.donate-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.donate-amounts legend {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.donate-amounts label {
  position: relative;
}

.donate-amounts input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.donate-amounts span {
  display: inline-flex;
  align-items: center;
  min-width: 64px;
  min-height: 40px;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.donate-amounts input:checked + span {
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}

.donate-amounts input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.donate-custom {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.donate-custom[hidden] {
  display: none;
}

.donate .button {
  justify-self: start;
}

.donate .form-status:empty {
  display: none;
}

.donate-fine {
  font-size: 0.85rem;
}
