/* 72IT company website: "72OS Glass", a desktop metaphor in the browser.
   Layers (z-index): wallpaper -2, edge rail 1, lion 2, windows 10+ (JS keeps
   them in stacking order), legal line 5, dock 9000, menubar 9100, popovers
   9200, search 9300, toast 9400.
   The dark tokens are written once in the @dark-tokens block; build.py emits
   them for the system preference and for the manual switch. */

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

:root {
  color-scheme: light dark;
  --ink: #192138;
  --muted: #5a647d;
  --glass: rgba(250, 252, 255, 0.82);
  --panel: rgba(255, 255, 255, 0.62);
  --line: rgba(70, 83, 125, 0.16);
  --blue: #2f55dc;
  --cta: #2f55dc;
  --shadow: 0 35px 90px #17265338, 0 2px 8px #192d5922;
  --shadow-active: 0 42px 100px #192b6250, 0 5px 16px #192b6225;
  --edge: #ffffff90;
  --menubar-bg: #e8edff91;
  --menubar-ink: #25324d;
  --label-ink: #243353;
  --widget-bg: linear-gradient(140deg, #ffffff87, #eef2ff32);
  --widget-warm: linear-gradient(135deg, #fff0dca0, #e8bb8640);
  --widget-ink: #233352;
  --dock-bg: #f6f8ff55;
  --dock-dot: #334265;
  --rail: linear-gradient(90deg, #ffffffb0, #ffffff40);
  --wall-filter: none;
  --wall-filter-alt: hue-rotate(85deg) saturate(0.78);
  --em: linear-gradient(100deg, #3f52dd, #9a4bbd);
  --field: #ffffffc7;
  --solid: #f4f6ff;
  --field-line: rgba(70, 83, 125, 0.34);
  --danger: #b3261e;
  --ok: #0f7446;
  --lion-h: clamp(240px, 42vh, 440px);
  --lion-w: calc(var(--lion-h) * 0.5739);
  --lion-clear: 0px;
  --widget-clear: 0px;
}

@media (prefers-color-scheme: dark) {
:root:not(.light) {
  --ink: #edf1ff;
  --muted: #b9c3da;
  --glass: rgba(23, 28, 48, 0.9);
  --panel: rgba(66, 75, 112, 0.32);
  --line: #c3d1ff24;
  --blue: #a3baff;
  --cta: #3a62ea;
  --shadow: 0 35px 90px #0008, 0 2px 8px #0004;
  --shadow-active: 0 42px 100px #000a, 0 5px 16px #0006;
  --edge: #ffffff25;
  --menubar-bg: #131a32a8;
  --menubar-ink: #ffffff;
  --label-ink: #e6eaff;
  --widget-bg: #17233b88;
  --widget-warm: #4c342c88;
  --widget-ink: #e8edff;
  --dock-bg: #19233f91;
  --dock-dot: #e8edff;
  --rail: linear-gradient(90deg, #2a3560c0, #1a234580);
  --wall-filter: brightness(0.48) saturate(1.25);
  --wall-filter-alt: hue-rotate(85deg) brightness(0.48);
  --em: linear-gradient(100deg, #b7c2ff, #f0a1ff);
  --field: #0c1226b0;
  --solid: #171c30;
  --field-line: #c3d1ff4d;
  --danger: #ffa0a6;
  --ok: #86e3b8;
}
}

:root.dark {
  --ink: #edf1ff;
  --muted: #b9c3da;
  --glass: rgba(23, 28, 48, 0.9);
  --panel: rgba(66, 75, 112, 0.32);
  --line: #c3d1ff24;
  --blue: #a3baff;
  --cta: #3a62ea;
  --shadow: 0 35px 90px #0008, 0 2px 8px #0004;
  --shadow-active: 0 42px 100px #000a, 0 5px 16px #0006;
  --edge: #ffffff25;
  --menubar-bg: #131a32a8;
  --menubar-ink: #ffffff;
  --label-ink: #e6eaff;
  --widget-bg: #17233b88;
  --widget-warm: #4c342c88;
  --widget-ink: #e8edff;
  --dock-bg: #19233f91;
  --dock-dot: #e8edff;
  --rail: linear-gradient(90deg, #2a3560c0, #1a234580);
  --wall-filter: brightness(0.48) saturate(1.25);
  --wall-filter-alt: hue-rotate(85deg) brightness(0.48);
  --em: linear-gradient(100deg, #b7c2ff, #f0a1ff);
  --field: #0c1226b0;
  --solid: #171c30;
  --field-line: #c3d1ff4d;
  --danger: #ffa0a6;
  --ok: #86e3b8;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  height: 100dvh;
  overflow: hidden;
  background: #a5b6ea;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #527fff;
  outline-offset: 3px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 9500;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--cta);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.skip:focus {
  top: 44px;
}

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

/* ── Wallpaper ─────────────────────────────────────────────────────────── */
.wall {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  filter: var(--wall-filter);
  transition: filter 0.65s;
}

.alt-wall .wall {
  filter: var(--wall-filter-alt);
}

/* ── Menubar ───────────────────────────────────────────────────────────── */
.menubar {
  position: relative;
  z-index: 9100;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 36px;
  padding: 0 23px;
  background: var(--menubar-bg);
  backdrop-filter: blur(35px);
  border-bottom: 1px solid #fff6;
  color: var(--menubar-ink);
  font-size: 12px;
  font-weight: 600;
}

.menubar nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.menubar a,
.menubar button {
  padding: 5px 0;
  color: inherit;
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand:hover {
  text-decoration: none;
}

.brand i {
  font-style: normal;
  color: var(--blue);
}

.brand small {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
  opacity: 0.75;
}

.menubar .right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.mini-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Desktop ───────────────────────────────────────────────────────────── */
.desktop {
  position: absolute;
  inset: 36px 0 0;
}

/* The lion peeks out from behind this rail: the picture's cut edge sits
   exactly on the rail's right side, the paws reach around it. */
.desktop::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--lion-h) * 0.0467);
  background: var(--rail);
  border-right: 1px solid var(--edge);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.lion {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 50%;
  height: var(--lion-h);
  width: var(--lion-w);
  translate: 0 -50%;
  transition: translate 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  animation: peek 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s backwards;
}

.lion:hover,
.lion:focus-visible {
  translate: 7px -50%;
}

.lion img {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(8px 14px 18px #17265340);
}

@keyframes peek {
  from {
    opacity: 0;
    translate: -16px -50%;
  }
}

/* Tagline and launcher. On wide screens they form one column with the lion,
   so the first window never covers them. */
.intro {
  position: absolute;
  left: max(4.4%, calc(var(--lion-h) * 0.0467 + 22px));
  top: 5%;
  display: grid;
  justify-items: start;
  gap: 14px;
}

.desktop-label {
  margin: 0;
  color: var(--label-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.desktop-label span {
  display: block;
  margin-top: 5px;
  font-size: clamp(32px, 5vw, 75px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.desktop-launch {
  font-size: 12px;
}

.widgets {
  position: absolute;
  right: 3.4%;
  top: 9%;
  display: grid;
  gap: 13px;
  width: clamp(195px, 19vw, 275px);
}

.widget {
  display: block;
  padding: 21px;
  border: 1px solid #fff8;
  border-radius: 25px;
  background: var(--widget-bg);
  box-shadow: 0 10px 40px #30437520, inset 0 1px 0 #fff9;
  backdrop-filter: blur(30px);
  color: var(--widget-ink);
  transition: translate 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.widget:hover {
  text-decoration: none;
  translate: 0 -3px;
}

.widget:last-child {
  background: var(--widget-warm);
}

.widget .eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  opacity: 0.78;
}

.widget strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.widget small {
  display: block;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.86;
}

.widget .line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
}

.widget .orbit {
  display: block;
  position: relative;
  height: 87px;
  margin: 4px 0 7px;
  overflow: hidden;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  inset: 9px 23px;
  border: 1px solid #5e73b777;
  border-radius: 50%;
  transform: rotate(-25deg);
}

.orbit::after {
  transform: rotate(25deg);
}

.orb {
  position: absolute;
  top: 21px;
  left: calc(50% - 21px);
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, #8faafa 30%, #4644a2 85%);
  box-shadow: 0 7px 22px #4e52a975;
}

.orb::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px solid #fff8;
  border-radius: 50%;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25b87c;
  box-shadow: 0 0 0 4px #25b87c19;
}

/* Beside the dock, which is centred: two short lines fit on every width
   this is shown at. Each page repeats the links at the end of its content. */
.legal {
  position: absolute;
  z-index: 5;
  left: max(4%, calc(var(--lion-h) * 0.0467 + 16px));
  bottom: 22px;
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--label-ink);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Windows ───────────────────────────────────────────────────────────── */
.window {
  position: absolute;
  z-index: 10;
  left: max(var(--x, 12%), var(--lion-clear));
  top: var(--y, 12%);
  display: flex;
  flex-direction: column;
  width: var(--w, 720px);
  height: var(--h, 530px);
  min-width: 300px;
  max-width: calc(100% - var(--lion-clear) - var(--widget-clear) - 24px);
  max-height: calc(100% - 105px);
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(42px) saturate(1.35);
  box-shadow: var(--shadow), inset 0 1px 0 #fff7;
  animation: appear 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition: box-shadow 0.2s;
}

.window.active {
  box-shadow: var(--shadow-active), inset 0 1px 0 #fff8;
}

.window.moved {
  max-width: calc(100% - 24px);
}

.window.max {
  inset: 8px 12px 103px !important;
  width: auto !important;
  height: auto !important;
  max-width: none;
  max-height: none;
}

@keyframes appear {
  from {
    opacity: 0;
    scale: 0.965;
    translate: 0 9px;
  }
}

.window[data-app="home"] {
  --x: 8%;
  --y: 11%;
  --w: 890px;
  --h: 670px;
}
.window[data-app="backup"] {
  --x: 17%;
  --y: 8%;
  --w: 810px;
  --h: 690px;
}
.window[data-app="cloud"] {
  --x: 19%;
  --y: 10%;
  --w: 730px;
  --h: 600px;
}
.window[data-app="resilience"] {
  --x: 20%;
  --y: 9%;
  --w: 730px;
  --h: 640px;
}
.window[data-app="operations"] {
  --x: 18%;
  --y: 11%;
  --w: 740px;
  --h: 600px;
}
.window[data-app="linux"] {
  --x: 18%;
  --y: 12%;
  --w: 700px;
  --h: 560px;
}
.window[data-app="security"] {
  --x: 17%;
  --y: 9%;
  --w: 720px;
  --h: 590px;
}
.window[data-app="incident"] {
  --x: 15%;
  --y: 10%;
  --w: 730px;
  --h: 580px;
}
.window[data-app="partner"] {
  --x: 21%;
  --y: 12%;
  --w: 730px;
  --h: 600px;
}
.window[data-app="remote"] {
  --x: 21%;
  --y: 12%;
  --w: 660px;
  --h: 500px;
}
.window[data-app="contact"] {
  --x: 26%;
  --y: 6%;
  --w: 610px;
  --h: 720px;
}
.window[data-app="imprint"] {
  --x: 24%;
  --y: 10%;
  --w: 600px;
  --h: 600px;
}
.window[data-app="privacy"] {
  --x: 22%;
  --y: 8%;
  --w: 720px;
  --h: 680px;
}
.window[data-app="terminal"] {
  --x: 25%;
  --y: 20%;
  --w: 660px;
  --h: 380px;
}
.window[data-app="settings"] {
  --x: 30%;
  --y: 15%;
  --w: 540px;
  --h: 500px;
}
.window[data-app="game"] {
  --x: 24%;
  --y: 7%;
  --w: 620px;
  --h: 652px;
}

.titlebar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-height: 49px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.titlebar:active {
  cursor: grabbing;
}

.lights {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 55px;
}

.light {
  position: relative;
  width: 13px;
  height: 13px;
  padding: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #0002;
}

/* Larger hit area than the 13px circle. */
.light::before {
  content: "";
  position: absolute;
  inset: -8px -4px;
}

.light.red {
  background: #ff6159;
}
.light.yellow {
  background: #ffbd2f;
}
.light.green {
  background: #28c840;
}

.lights:hover .light::after,
.light:focus-visible::after {
  content: attr(data-symbol);
  position: absolute;
  inset: -2px 0 0;
  color: #0009;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.window-title {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.title-extra {
  min-width: 55px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.window-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

/* Receives focus when a window opens; the window frame already shows where. */
.window-body:focus-visible {
  outline: none;
}

/* ── Overview window ───────────────────────────────────────────────────── */
.finder {
  display: flex;
  height: 100%;
}

.sidebar {
  flex-shrink: 0;
  width: 190px;
  padding: 19px 10px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--panel);
  scrollbar-width: thin;
}

.side-label {
  margin: 8px 10px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
}

.side-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 2px 0;
  padding: 9px 10px;
  border-radius: 8px;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.side-button:hover,
.side-button[aria-current="page"] {
  background: #667cd41b;
  color: var(--blue);
  text-decoration: none;
}

.side-button svg {
  width: 17px;
  height: 17px;
}

.side-button svg,
.feature svg,
.popover svg {
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.welcome-main {
  flex: 1;
  overflow: auto;
  padding: 24px 32px 23px;
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.welcome-main h1 {
  margin: 17px 0 16px;
  font-size: clamp(36px, 3.7vw, 53px);
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  background: var(--em);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.lead {
  max-width: 540px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.launch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 5px;
}

.cta,
.secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  transition: translate 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 4px 12px #335de733;
}

.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.cta:hover,
.secondary:hover {
  translate: 0 -2px;
  text-decoration: none;
}

.cta:active,
.secondary:active {
  translate: 0 0;
}

.cta[disabled] {
  opacity: 0.6;
  cursor: progress;
  translate: none;
}

.section-label {
  display: flex;
  justify-content: space-between;
  margin: 22px 0 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.app-tile {
  display: block;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  color: inherit;
  transition: translate 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
}

.app-tile:hover {
  translate: 0 -3px;
  background: var(--glass);
  text-decoration: none;
}

.app-tile .app-icon {
  width: 37px;
  height: 37px;
  margin-bottom: 9px;
  border-radius: 10px;
}

.app-tile .app-icon svg {
  width: 65%;
  height: 65%;
}

.app-tile strong {
  display: block;
  font-size: 12.5px;
  letter-spacing: -0.02em;
}

.app-tile small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.app-tile.featured {
  display: grid;
  grid-column: span 2;
  grid-template-columns: 45px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  gap: 4px 10px;
  border-color: #c67b2639;
  background: linear-gradient(115deg, #f4cc9b44, #ffd7a811);
}

.app-tile.featured .app-icon {
  grid-row: span 2;
  width: 43px;
  height: 43px;
  margin: 0;
}

.app-tile.featured strong {
  font-size: 15px;
}

.app-tile.featured small {
  margin: 0;
}

/* ── App icons ─────────────────────────────────────────────────────────── */
.app-icon {
  position: relative;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 15px;
  color: #fff;
  box-shadow: inset 0 1px 1px #fff9, inset 0 -1px 2px #0002, 0 4px 9px #20336028;
}

.app-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #fff4, transparent 47%);
  pointer-events: none;
}

.app-icon svg {
  position: relative;
  width: 58%;
  height: 58%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-home {
  background: linear-gradient(145deg, #81d4ff, #3964ed);
}
.i-linux {
  background: linear-gradient(145deg, #ffcf61, #f07935);
}
.i-cloud {
  background: linear-gradient(145deg, #61d8ff, #087bc9);
}
.i-security {
  background: linear-gradient(145deg, #78e5bd, #119259);
}
.i-backup {
  background: linear-gradient(145deg, #ffc96c, #cf661d 75%, #a74515);
}
.i-terminal {
  background: linear-gradient(145deg, #4c576c, #101725);
}
.i-contact {
  background: linear-gradient(145deg, #ad9aff, #6851d9);
}
.i-remote {
  background: linear-gradient(145deg, #f9a1c4, #b84d94);
}
.i-settings {
  background: linear-gradient(145deg, #c7cfdc, #737e99);
}
.i-operations {
  background: linear-gradient(145deg, #8296c4, #354568);
}
.i-resilience {
  background: linear-gradient(145deg, #a88cff, #6451db);
}
.i-incident {
  background: linear-gradient(145deg, #ffb279, #e53a42);
}
.i-partner {
  background: linear-gradient(145deg, #72c9ff, #3765b8);
}
.i-game {
  background: linear-gradient(145deg, #ffe08a, #e2812a 60%, #8a3f12);
}
.i-imprint,
.i-privacy {
  background: linear-gradient(145deg, #b9c4d8, #5b6884);
}

/* ── Dock ──────────────────────────────────────────────────────────────── */
.dock-wrap {
  position: absolute;
  z-index: 9000;
  bottom: 13px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 18px);
  translate: -50% 0;
}

.dock {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 9px 14px 10px 12px;
  border: 1px solid #fff8;
  border-radius: 24px;
  background: var(--dock-bg);
  backdrop-filter: blur(35px) saturate(1.35);
  box-shadow: 0 12px 34px #17265335, inset 0 1px 0 #fff8;
}

.dock-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  transform-origin: bottom;
  transition: transform 0.23s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-button:hover,
.dock-button:focus-visible {
  transform: translateY(-9px) scale(1.16);
  text-decoration: none;
}

.dock .app-icon {
  width: 48px;
  height: 48px;
}

.dock-button::after {
  content: "";
  position: absolute;
  bottom: -7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dock-dot);
  opacity: 0;
}

.dock-button.running::after {
  opacity: 1;
}

.dock-tip {
  position: absolute;
  bottom: calc(100% + 17px);
  padding: 6px 10px;
  border: 1px solid #fff7;
  border-radius: 8px;
  background: var(--glass);
  box-shadow: 0 4px 15px #0002;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.dock-button:hover .dock-tip,
.dock-button:focus-visible .dock-tip {
  opacity: 1;
}

.dock-divider {
  flex-shrink: 0;
  width: 1px;
  height: 43px;
  margin: 0 2px;
  background: #6473984a;
}

/* ── Detail pages ──────────────────────────────────────────────────────── */
.detail {
  padding: 29px 33px;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 22px;
}

.detail-head .app-icon {
  width: 65px;
  height: 65px;
  border-radius: 19px;
}

.detail-head h1 {
  margin: 5px 0;
  font-size: 33px;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-wrap: balance;
}

.detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.detail h2 {
  margin: 24px 0 8px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.detail h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.detail > p,
.detail > ul {
  max-width: 68ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.detail > ul {
  padding-left: 20px;
}

.detail > p a,
.detail > ul a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.feature {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.feature svg {
  width: 22px;
  height: 22px;
  margin-bottom: 9px;
  color: var(--blue);
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Tools of the trade: a quiet list, not a second card grid. */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 20px;
  padding: 0;
  list-style: none;
}

.stack li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.seg button {
  flex: 1;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 650;
}

.seg button[aria-pressed="true"] {
  background: var(--glass);
  box-shadow: 0 1px 5px #0002;
  color: var(--blue);
}

.result {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  font-size: 13.5px;
  line-height: 1.55;
}

.result strong {
  display: block;
  margin-bottom: 3px;
}

.footnote {
  color: var(--muted);
  font-size: 12px !important;
  line-height: 1.5;
}

.page-legal {
  margin: 26px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px !important;
}

.welcome-main .page-legal {
  margin-top: 18px;
}

.page-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* lionbackup */
.backup-hero {
  position: relative;
  margin: 0 0 18px;
  padding: 24px;
  overflow: hidden;
  border-radius: 19px;
  background: linear-gradient(125deg, #241d32, #3d3548 60%, #8c5638);
  color: #fff;
}

.backup-hero::after {
  content: "";
  position: absolute;
  top: -75px;
  right: -75px;
  width: 210px;
  height: 210px;
  border: 1px solid #ffcd8755;
  border-radius: 50%;
  box-shadow: 0 0 0 22px #ffcd8710, 0 0 0 44px #ffcd870b;
  pointer-events: none;
}

.backup-hero small {
  color: #ffc888;
  font-size: 10.5px;
  letter-spacing: 0.12em;
}

.backup-hero b {
  display: block;
  max-width: 440px;
  margin: 8px 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.backup-hero p {
  max-width: 460px;
  margin: 0;
  color: #f2e6dc;
  font-size: 13.5px;
  line-height: 1.6;
}

.flow-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin: 15px 0;
  padding: 0;
  list-style: none;
  font-size: 11.5px;
  font-weight: 700;
}

.flow-line li {
  flex: 1;
  padding: 12px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
}

.flow-line li + li {
  position: relative;
  margin-left: 14px;
}

.flow-line li + li::before {
  content: "→";
  position: absolute;
  left: -19px;
  top: 50%;
  translate: 0 -50%;
  color: var(--muted);
}

/* Failover demo */
.res-demo {
  display: flex;
  gap: 9px;
  margin: 12px 0;
}

.node-card {
  flex: 1;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.node-card .dot {
  display: block;
  margin: 0 auto 10px;
}

.node-card.failed {
  opacity: 0.6;
}

.node-card.failed .dot {
  background: #eb5050;
  box-shadow: none;
}

.node-card.active-node {
  border-color: #25b87c;
}

/* ── Contact ───────────────────────────────────────────────────────────── */
.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  font-size: 14px;
  font-weight: 650;
}

.form {
  display: grid;
  gap: 14px;
  margin: 6px 0 14px;
}

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

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

.field label {
  font-size: 12.5px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--field);
  font-size: 14px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline-offset: 1px;
  border-color: #527fff;
}

.field [aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
}

/* Spam trap: off-screen, not display:none, so simple bots still fill it. */
.field-trap {
  position: absolute;
  left: -200vw;
}

.form-status {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  font-size: 13.5px;
  line-height: 1.55;
}

.form-status.ok {
  border-color: var(--ok);
}

.form-status.error {
  border-color: var(--danger);
}

.form-status strong {
  display: block;
}

/* ── Terminal ──────────────────────────────────────────────────────────── */
.term {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 20px;
  background: #10182b;
  color: #d8e6ff;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.term-log {
  flex: 1;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.term form {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}

.term input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: #fff;
}

.term input:focus-visible {
  outline: none;
}

.term form:focus-within {
  box-shadow: 0 1px 0 #8de7bd88;
}

.term .prompt {
  color: #8de7bd;
}

.term button {
  padding: 5px 9px;
  border-radius: 6px;
  background: #ffffff18;
  color: #fff;
}

/* ── Game ──────────────────────────────────────────────────────────────── */
.game {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 18px 20px 20px;
  background: #0d1428;
  color: #dbe6ff;
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  font-size: 13px;
  font-weight: 650;
}

.game-hud b {
  color: #ffd27a;
  font-variant-numeric: tabular-nums;
}

.game-hud .game-title {
  margin: 0 auto 0 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.game-stage {
  position: relative;
  align-self: center;
  width: 100%;
  max-width: 560px;
}

.game canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #0a1022;
  touch-action: none;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 20px;
  border-radius: 14px;
  background: #0a1022d9;
  text-align: center;
}

.game-overlay h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.game-overlay p {
  max-width: 34ch;
  margin: 0 auto;
  color: #b9c6e8;
  font-size: 13.5px;
  line-height: 1.55;
}

.game-overlay .cta {
  justify-self: center;
  margin-top: 6px;
}

.game-pad {
  display: none;
  grid-template: repeat(2, 46px) / repeat(3, 46px);
  justify-content: center;
  gap: 6px;
}

.game-pad button {
  border-radius: 12px;
  background: #ffffff1c;
  color: #fff;
  font-size: 17px;
}

.game-pad button:active {
  background: #ffffff38;
}

.game-pad [data-dir="up"] {
  grid-column: 2;
}
.game-pad [data-dir="left"] {
  grid-column: 1;
  grid-row: 2;
}
.game-pad [data-dir="down"] {
  grid-column: 2;
  grid-row: 2;
}
.game-pad [data-dir="right"] {
  grid-column: 3;
  grid-row: 2;
}

.game-help {
  margin: 0;
  color: #9fb0d8;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

@media (pointer: coarse) {
  .game-pad {
    display: grid;
  }
}

/* ── Popovers, search, toast ───────────────────────────────────────────── */
.popover {
  position: absolute;
  z-index: 9200;
  top: 43px;
  left: 10px;
  width: 250px;
  padding: 10px;
  border: 1px solid #fff8;
  border-radius: 17px;
  background: var(--glass);
  backdrop-filter: blur(40px);
  box-shadow: var(--shadow);
}

.popover a,
.popover button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 9px;
  color: inherit;
  font-size: 13px;
  text-align: left;
}

.popover a:hover,
.popover button:hover {
  background: var(--panel);
  text-decoration: none;
}

.popover svg {
  width: 19px;
  height: 19px;
}

.popover .sep {
  height: 1px;
  margin: 5px;
  background: var(--line);
}

.popover p {
  margin: 0;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.menu-list {
  max-height: 70vh;
  overflow: auto;
}

.control {
  left: auto;
  right: 15px;
  width: 285px;
}

.control h2 {
  margin: 8px 10px;
  font-size: 14px;
}

.control .toggle {
  justify-content: space-between;
}

.switch {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 20px;
  background: #8b96ad;
}

.switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: translate 0.2s;
}

.toggle[aria-pressed="true"] .switch {
  background: #3764ec;
}

.toggle[aria-pressed="true"] .switch::after {
  translate: 15px 0;
}

.spotlight {
  position: absolute;
  z-index: 9300;
  top: 15%;
  left: 50%;
  width: min(540px, calc(100% - 24px));
  overflow: hidden;
  translate: -50% 0;
  border: 1px solid #fff9;
  border-radius: 21px;
  background: var(--glass);
  backdrop-filter: blur(45px);
  box-shadow: var(--shadow);
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 19px;
  border-bottom: 1px solid var(--line);
}

.searchbox input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.searchbox input:focus-visible {
  outline: none;
}

.searchbox button {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
}

.searchresults {
  max-height: 55vh;
  padding: 9px;
  overflow: auto;
}

.searchresults button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px;
  border-radius: 10px;
  text-align: left;
}

.searchresults button:hover,
.searchresults button:focus-visible {
  background: var(--panel);
}

.searchresults .app-icon {
  width: 35px;
  height: 35px;
  border-radius: 10px;
}

.searchresults b {
  font-size: 14px;
}

.searchresults small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.searchresults p {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: absolute;
  z-index: 9400;
  top: 48px;
  right: 18px;
  padding: 14px 18px;
  border: 1px solid #fff8;
  border-radius: 15px;
  background: var(--glass);
  backdrop-filter: blur(30px);
  box-shadow: var(--shadow);
  font-size: 13px;
}

/* ── Settings ──────────────────────────────────────────────────────────── */
.wall-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 15px 0;
}

.wall-option {
  min-height: 100px;
  border: 2px solid #fff5;
  border-radius: 15px;
  background: radial-gradient(ellipse at 15% 5%, #f7d3ec, transparent 60%),
    linear-gradient(145deg, #b1bffc, #3c59ac);
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 6px #1b2a6699;
}

.wall-option.alt {
  filter: hue-rotate(85deg);
}

.wall-option[aria-pressed="true"] {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* Window content still loading. */
.loading {
  display: grid;
  gap: 12px;
  padding: 29px 33px;
}

.loading i {
  height: 14px;
  border-radius: 7px;
  background: var(--panel);
}

.loading i:first-child {
  width: 55%;
  height: 30px;
}

.loading i:last-child {
  width: 70%;
}

/* ── Wide desktops: keep lion, window and widgets side by side ─────────── */
@media (min-width: 1180px) {
  :root {
    --lion-clear: calc(var(--lion-w) + 12px);
    --widget-clear: calc(clamp(195px, 19vw, 275px) + 3.4% + 8px);
  }

  .intro {
    left: calc(var(--lion-h) * 0.0467 + 20px);
    width: calc(var(--lion-w) - var(--lion-h) * 0.0467 - 20px);
  }

  .desktop-label {
    font-size: 10.5px;
    letter-spacing: 0.14em;
    line-height: 1.55;
  }

  .desktop-label span {
    font-size: clamp(30px, calc(var(--lion-w) * 0.215), 48px);
  }
}

@media (min-width: 761px) and (max-height: 780px) {
  /* Low screens: start higher and end above the dock. */
  .window {
    top: 4% !important;
    max-height: calc(96% - 96px);
  }

  .desktop-label span {
    font-size: 34px;
  }

  .desktop-launch {
    display: none;
  }

  .widgets {
    top: 6%;
  }
}

@media (max-width: 1000px) {
  .widgets {
    right: 2%;
    width: 190px;
  }

  .widget {
    padding: 16px;
  }

  .widget strong {
    font-size: 22px;
  }

  .legal {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --lion-h: clamp(150px, 25vh, 210px);
  }

  .menubar {
    gap: 14px;
    height: 38px;
    padding: 0 12px;
  }

  .menubar nav {
    gap: 14px;
  }

  .menubar .nav-secondary,
  .menubar .date {
    display: none;
  }

  .menubar .right {
    gap: 10px;
  }

  .desktop {
    inset: 38px 0 0;
  }

  .intro {
    left: 22px;
    top: 24px;
    gap: 12px;
  }

  .desktop-label span {
    font-size: 36px;
  }

  .widgets {
    z-index: 3;
    top: 190px;
    left: 22px;
    right: 14px;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    width: auto;
  }

  .widget {
    padding: 15px;
    border-radius: 19px;
  }

  .widget:last-child {
    grid-column: span 2;
  }

  .widget .orbit {
    height: 64px;
  }

  .orb {
    top: 12px;
  }

  .widget strong {
    font-size: 20px;
  }

  .widget small {
    font-size: 12px;
  }

  /* Below the widgets, above the dock. */
  .lion {
    top: auto;
    bottom: 84px;
    translate: 0 0;
  }

  .lion:hover,
  .lion:focus-visible {
    translate: 5px 0;
  }

  @keyframes peek {
    from {
      opacity: 0;
      translate: -16px 0;
    }
  }

  /* Full-screen sheets: less see-through than on the desktop, the text
     behind would otherwise show between the lines. */
  .window,
  .window.max {
    inset: 10px 9px 92px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    max-width: none;
    max-height: none;
    border-radius: 18px;
    background: color-mix(in srgb, var(--solid) 93%, transparent);
  }

  .titlebar {
    min-height: 44px;
    padding: 0 12px;
    cursor: default;
  }

  .title-extra {
    min-width: 40px;
  }

  .finder {
    display: block;
    height: auto;
  }

  .sidebar {
    display: flex;
    gap: 4px;
    width: auto;
    padding: 7px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .side-label {
    display: none;
  }

  .side-button {
    gap: 5px;
    width: auto;
    padding: 9px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .side-button svg {
    width: 14px;
    height: 14px;
  }

  .welcome-main {
    padding: 22px 19px;
    overflow: visible;
  }

  .welcome-main h1 {
    font-size: 40px;
  }

  .lead {
    font-size: 14px;
  }

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

  .app-tile {
    padding: 10px;
  }

  .dock-wrap {
    bottom: 12px;
    max-width: calc(100% - 12px);
  }

  .dock-wrap::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 0;
    bottom: 6px;
    width: 20px;
    border-radius: 0 17px 17px 0;
    background: linear-gradient(90deg, transparent, var(--dock-bg));
    pointer-events: none;
  }

  .dock {
    gap: 7px;
    padding: 8px 9px 10px;
    overflow-x: auto;
    border-radius: 20px;
    scrollbar-width: none;
  }

  .dock .app-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .dock-button {
    flex-shrink: 0;
  }

  .dock-button:hover {
    transform: none;
  }

  .dock-tip {
    display: none;
  }

  .dock-divider {
    height: 28px;
    margin: 0;
  }

  .detail {
    padding: 20px 18px;
  }

  .detail-head h1 {
    font-size: 27px;
  }

  .detail-head .app-icon {
    width: 52px;
    height: 52px;
  }

  .feature-grid {
    gap: 8px;
  }

  .feature {
    padding: 12px;
  }

  .backup-hero {
    padding: 18px;
  }

  .backup-hero b {
    font-size: 23px;
  }

  .flow-line li {
    padding: 9px 4px;
  }

  .contact-links,
  .form-row {
    grid-template-columns: 1fr;
  }

  .spotlight {
    top: 70px;
  }

  .popover {
    top: 45px;
  }

  .term {
    padding: 12px;
    font-size: 12.5px;
  }

  .game {
    padding: 12px;
  }

  .loading {
    padding: 20px 18px;
  }
}

@media (max-width: 420px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .dock {
    gap: 5px;
  }

  .dock .app-icon {
    width: 31px;
    height: 31px;
  }

  .menubar .right {
    gap: 8px;
  }
}

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

@media (prefers-reduced-transparency: reduce) {
  .menubar,
  .window,
  .dock,
  .widget,
  .popover,
  .spotlight,
  .toast {
    background: var(--solid);
  }

  .menubar,
  .window,
  .dock,
  .widget,
  .popover,
  .spotlight,
  .toast,
  .desktop::before {
    backdrop-filter: none;
  }
}

/* Without JavaScript the page is one window per URL with plain links. */
@media (scripting: none) {
  .js-only {
    display: none !important;
  }
}
