/* =========================================================
   syinOS 0.9.7 — a desktop with a slow hardware fault
   Type: Zpix (UI) + DM Mono (terminal)
   ========================================================= */

@font-face {
  font-family: "Zpix";
  src: url("../assets/fonts/zpix.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("../assets/fonts/dm-mono-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("../assets/fonts/dm-mono-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #12150f;
  --ink-soft: #2d3127;
  --paper: #e9e3cf;
  --paper-hi: #fbf7e8;
  --paper-lo: #c5bea7;
  --pool: #0d5f59;
  --pool-deep: #073a37;
  --night: #08182f;
  --alert: #c8442e;
  --amber: #d1a64a;
  --phosphor: #b8eda5;
  --term-bg: #08150f;
  --bevel-hi: #fffcf1;
  --bevel-mid: #b1ab95;
  --bevel-lo: #746f5c;
  --font-pixel: "Zpix", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "DM Mono", "Zpix", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --bar-h: 34px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --task-h: calc(44px + var(--safe-b));
  --shadow-hard: 5px 6px 0 rgba(0, 0, 0, 0.32);
  --focus: #e05334;
}

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

html {
  height: 100%;
  background: #071313;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: #071313;
  font-family: var(--font-pixel);
  font-size: 14.5px;
  line-height: 1.7;
  cursor: url("../assets/cursor.svg") 2 2, url("../assets/cursor.png") 2 2, auto;
}

body,
button,
a,
input {
  font-family: var(--font-pixel);
}

button,
a,
[role="button"] {
  cursor: url("../assets/cursor.svg") 2 2, url("../assets/cursor.png") 2 2, pointer;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--paper-hi);
  background: var(--pool);
}

::-moz-selection {
  color: var(--paper-hi);
  background: var(--pool);
}

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

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 6px;
  left: 8px;
  z-index: 1200;
  padding: 5px 9px;
  color: var(--paper-hi);
  background: var(--ink);
  border: 2px solid var(--paper-hi);
  font-size: 13.5px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------------------------------------------------------
   The cabinet
   --------------------------------------------------------- */

.machine {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 460px;
  overflow: hidden;
  isolation: isolate;
  background: var(--pool-deep);
}

.machine.is-faulting {
  animation: chassis-fault 620ms steps(2, end) both;
}

.wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--pool-deep);
}

.wallpaper__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 50%;
  image-rendering: pixelated;
  filter: saturate(0.92) contrast(1.02) brightness(1.03);
}

.wallpaper__wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(2, 17, 17, 0.43) 0%,
      rgba(2, 17, 17, 0.03) 22%,
      rgba(2, 17, 17, 0.015) 60%,
      rgba(1, 12, 13, 0.44) 100%),
    linear-gradient(90deg,
      rgba(2, 20, 20, 0.46) 0,
      rgba(2, 20, 20, 0.13) 220px,
      transparent 44%);
}

.wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    radial-gradient(rgba(225, 235, 194, 0.12) 0.75px, transparent 0.75px),
    radial-gradient(rgba(0, 0, 0, 0.3) 0.75px, transparent 0.75px);
  background-position: 0 0, 2px 2px;
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}

.wallpaper__wordmark {
  position: absolute;
  right: clamp(-14px, 1vw, 24px);
  bottom: clamp(28px, 7vh, 84px);
  color: rgba(233, 227, 204, 0.06);
  font-family: var(--font-pixel);
  font-size: clamp(96px, 17vw, 240px);
  line-height: 0.75;
  letter-spacing: -0.1em;
  user-select: none;
  pointer-events: none;
}

.wallpaper__note {
  position: absolute;
  left: 20px;
  bottom: 18px;
  margin: 0;
  color: rgba(239, 234, 214, 0.55);
  font-family: var(--font-pixel);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.asset-tag {
  position: absolute;
  right: 34px;
  bottom: 44px;
  width: 188px;
  padding: 15px 14px 11px;
  color: #25261e;
  background:
    linear-gradient(145deg, #e5dec6, #d6cfb5);
  border: 1px solid #151710;
  box-shadow:
    inset 1px 1px 0 rgba(255, 251, 234, 0.7),
    5px 6px 0 rgba(0, 0, 0, 0.28);
  transform: rotate(-2.4deg);
  user-select: none;
  pointer-events: none;
}

.asset-tag::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(20, 22, 16, 0.25);
  pointer-events: none;
}

.asset-tag__pin {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 58px;
  height: 17px;
  background: rgba(222, 214, 188, 0.76);
  border: 1px solid rgba(19, 21, 15, 0.22);
  transform: translateX(-50%) rotate(1.6deg);
}

.asset-tag__eyebrow,
.asset-tag__line {
  position: relative;
  z-index: 1;
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.08em;
}

.asset-tag strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 2px 0 4px;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.asset-tag__barcode {
  position: relative;
  z-index: 1;
  display: block;
  height: 13px;
  margin-top: 9px;
  background: repeating-linear-gradient(90deg,
    #1a1c15 0 1px,
    transparent 1px 3px,
    #1a1c15 3px 5px,
    transparent 5px 6px,
    #1a1c15 6px 7px,
    transparent 7px 10px);
  border-top: 1px solid rgba(20, 22, 16, 0.25);
  border-bottom: 1px solid rgba(20, 22, 16, 0.25);
}

[data-decay="2"] .wallpaper__image {
  filter: saturate(0.7) contrast(1.07) brightness(0.88);
}

[data-decay="3"] .wallpaper__image {
  filter: saturate(0.58) contrast(1.1) brightness(0.86);
}

/* ---------------------------------------------------------
   Top status bar
   --------------------------------------------------------- */

.system-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  height: var(--bar-h);
  padding: 0 8px 0 10px;
  gap: 12px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.1) 0 1px,
      transparent 1px 3px),
    var(--paper);
  border-bottom: 1px solid var(--ink);
  box-shadow:
    inset 0 -1px 0 rgba(255, 251, 235, 0.72),
    inset 0 1px 0 rgba(255, 251, 235, 0.8),
    0 2px 0 rgba(0, 0, 0, 0.2);
  user-select: none;
}

.system-bar__brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.brand-mark {
  display: block;
  width: 16px;
  height: 16px;
}

.brand-mark svg,
.start-button__mark svg,
.start-menu__rail-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-name {
  font-size: 14.5px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-version {
  align-self: flex-start;
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.system-bar__context {
  flex: 1;
  margin: 0;
  color: rgba(18, 21, 15, 0.58);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.system-bar__state {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.health-readout {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.health-readout strong {
  color: var(--ink);
  font-weight: 500;
}

.health-led {
  width: 5px;
  height: 5px;
  background: #5c8556;
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 251, 234, 0.55);
}

[data-decay="2"] .health-led {
  background: var(--amber);
}

[data-decay="3"] .health-led,
.health-readout.is-degraded .health-led {
  background: var(--alert);
  animation: led-wink 2.8s steps(1, end) infinite;
}

.text-mode-link {
  font-size: 11.5px;
  line-height: 1;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.text-mode-link:hover {
  color: var(--alert);
}

.help-button {
  display: grid;
  place-items: center;
  width: 19px;
  height: 18px;
  padding: 0;
  margin-left: -4px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1;
}

.help-button:hover,
.help-button:focus-visible {
  background: var(--paper-hi);
}

.help-button:active {
  box-shadow:
    inset -1px -1px 0 var(--bevel-hi),
    inset 1px 1px 0 var(--bevel-lo);
}

/* ---------------------------------------------------------
   Desktop and icons
   --------------------------------------------------------- */

.desktop:focus {
  outline: none;
}

.desktop {
  position: absolute;
  inset: var(--bar-h) 0 var(--task-h);
  z-index: 2;
  overflow: hidden;
}

.dead-pixels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.dead-pixel {
  position: absolute;
  width: 3px;
  height: 3px;
  opacity: 0.8;
  background: #f3e8b5;
  box-shadow: 0 0 3px currentColor;
}

.dead-pixel--red {
  color: #d15238;
  background: #d15238;
}

.dead-pixel--green {
  color: #a9d097;
  background: #a9d097;
}

.icon-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.desk-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 94px;
  min-height: 72px;
  padding: 3px 3px 4px;
  color: var(--paper-hi);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  text-align: center;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.desk-icon__art {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.3));
}

.desk-icon__art > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.desk-icon__label {
  display: inline-block;
  max-width: 100%;
  margin-top: 3px;
  padding: 0 2px;
  color: #f4f0dd;
  font-family: var(--font-pixel);
  font-size: 13.5px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-shadow:
    1px 0 0 #071b19,
    -1px 0 0 #071b19,
    0 1px 0 #071b19,
    0 -1px 0 #071b19,
    1px 1px 0 #071b19;
  overflow-wrap: anywhere;
}

.desk-icon:hover .desk-icon__label,
.desk-icon.is-selected .desk-icon__label {
  color: var(--paper-hi);
  background: var(--ink);
  text-shadow: none;
}

.desk-icon.is-selected .desk-icon__art {
  outline: 1px dotted rgba(247, 242, 222, 0.92);
  outline-offset: -3px;
}

.desk-icon.is-dragging {
  z-index: 60;
  opacity: 0.72;
}

.desk-icon.is-dragging .desk-icon__label {
  background: transparent;
  text-shadow:
    1px 0 0 #071b19,
    -1px 0 0 #071b19,
    0 1px 0 #071b19,
    0 -1px 0 #071b19;
}

.desk-icon:focus-visible {
  outline: 1px dotted var(--paper-hi);
  outline-offset: 1px;
}

.desk-icon.is-attention .desk-icon__art {
  animation: icon-attention 1.15s steps(2, end) 2;
}

.external-mark {
  position: absolute;
  left: -5px;
  bottom: -3px;
  display: block;
  width: 14px;
  height: 14px;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.35));
}

.external-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.new-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  color: #fff8e6;
  background: var(--alert);
  border: 1px solid #2a130e;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

/* ---------------------------------------------------------
   Window chrome
   --------------------------------------------------------- */

.window-layer {
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.window {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 20px));
  height: min(500px, calc(100vh - 110px));
  padding: 2px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo),
    var(--shadow-hard);
  pointer-events: auto;
}

.window[hidden] {
  display: none !important;
}

.window.is-opening {
  animation: window-on 120ms steps(3, end) both;
}

.window:focus,
.window:focus-visible {
  outline: none;
}

.window:focus-visible .window__title {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.window.is-active {
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo),
    6px 7px 0 rgba(0, 0, 0, 0.38);
}

.window:not(.is-active) {
  filter: saturate(0.9);
}

.window__frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.window__titlebar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 62px;
  align-items: center;
  flex: 0 0 27px;
  height: 27px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg,
      #e6dfc8 0,
      #e6dfc8 1px,
      #d7d0b9 1px,
      #d7d0b9 2px,
      #eee8d2 2px,
      #eee8d2 3px);
  border-bottom: 1px solid var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 251, 234, 0.75);
  user-select: none;
  touch-action: none;
}

.window.is-active .window__titlebar {
  color: #f4efda;
  background:
    repeating-linear-gradient(0deg,
      #0e4d49 0,
      #0e4d49 1px,
      #0a403d 1px,
      #0a403d 2px,
      #125752 2px,
      #125752 3px);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.window__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 0 7px;
  font-family: var(--font-pixel);
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window.is-active .window__title {
  color: #f4efda;
}

.window__title span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.window__title > svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.window__controls {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  padding-right: 4px;
}

.win-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 16px;
  height: 15px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo);
}

.win-button:active {
  box-shadow:
    inset -1px -1px 0 var(--bevel-hi),
    inset 1px 1px 0 var(--bevel-lo);
}

.win-button--close {
  margin-left: 5px;
  width: 15px;
  height: 14px;
}

.win-button--min span {
  display: block;
  width: 7px;
  height: 1px;
  margin-top: 6px;
  background: var(--ink);
}

.win-button--max span {
  display: block;
  width: 7px;
  height: 5px;
  border: 1px solid var(--ink);
  border-top-width: 2px;
}

.win-button--close span {
  display: block;
  width: 7px;
  height: 7px;
  background:
    linear-gradient(45deg,
      transparent 0 39%,
      var(--ink) 39% 55%,
      transparent 55% 100%),
    linear-gradient(-45deg,
      transparent 0 39%,
      var(--ink) 39% 55%,
      transparent 55% 100%);
}

.window.is-active .win-button {
  background: var(--paper-hi);
}

.window.is-maximized {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo);
}

.window.is-dragging {
  user-select: none;
}

.window.is-dragging .window__titlebar {
  cursor: url("../assets/cursor.svg") 2 2, url("../assets/cursor.png") 2 2, grabbing;
}

.window__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--bevel-lo);
  border-top: 0;
  background: var(--paper-hi);
}

.window__body--paper {
  background:
    repeating-linear-gradient(0deg,
      rgba(18, 21, 15, 0.014) 0,
      rgba(18, 21, 15, 0.014) 1px,
      transparent 1px,
      transparent 4px),
    var(--paper-hi);
}

.window__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 22px;
  height: 22px;
  padding: 0 6px;
  color: var(--ink-soft);
  background: var(--paper);
  border-top: 1px solid var(--bevel-hi);
  box-shadow: inset 0 1px 0 rgba(18, 21, 15, 0.08);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.window__footer a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.window__footer a:hover {
  color: var(--alert);
}

/* ---------------------------------------------------------
   README
   --------------------------------------------------------- */

#win-readme .window__body {
  background-color: #e9e3ce;
  background-image:
    linear-gradient(90deg, transparent 0 41px, rgba(179, 68, 48, 0.19) 41px 42px, transparent 42px),
    repeating-linear-gradient(0deg,
      rgba(18, 21, 15, 0.016) 0 1px,
      transparent 1px 4px);
}

.readme-sheet {
  position: relative;
  max-width: 620px;
  padding: 20px 25px 26px 58px;
}

.readme-sheet::after {
  content: "READ ME";
  position: absolute;
  top: 68px;
  right: 24px;
  padding: 3px 5px;
  color: rgba(185, 62, 42, 0.62);
  border: 2px solid rgba(185, 62, 42, 0.5);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: 0.12em;
  transform: rotate(-6deg);
}

.readme-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 15px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(18, 21, 15, 0.42);
  color: rgba(18, 21, 15, 0.64);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
}

.readme-sheet h1 {
  position: relative;
  max-width: 390px;
  margin: 17px 0 10px;
  color: #1c2119;
  font-size: 29px;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.readme-sheet p {
  max-width: 46em;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.93;
}

.readme-lede {
  color: #164b45 !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
}

.readme-sheet h2 {
  margin: 20px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(18, 21, 15, 0.58);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.readme-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.readme-list li {
  position: relative;
  margin: 0 0 5px;
  padding-left: 15px;
  font-size: 13.5px;
  line-height: 1.8;
}

.readme-list li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 2px;
  width: 4px;
  height: 4px;
  background: var(--alert);
}

.readme-sheet code {
  padding: 0 3px;
  background: rgba(11, 87, 83, 0.09);
  border-bottom: 1px dotted rgba(18, 21, 15, 0.4);
  font-family: var(--font-mono);
  font-size: 12px;
}

.readme-challenge {
  margin: 22px 0 17px;
  padding: 13px 14px 14px;
  background:
    repeating-linear-gradient(135deg,
      rgba(18, 21, 15, 0.022) 0 1px,
      transparent 1px 5px),
    #dbd4bc;
  border: 1px solid rgba(18, 21, 15, 0.78);
  box-shadow:
    inset 1px 1px 0 rgba(255, 251, 234, 0.72),
    inset -1px -1px 0 rgba(103, 98, 81, 0.2);
}

.readme-challenge h2 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--alert);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.readme-challenge h2 span:last-child {
  color: rgba(18, 21, 15, 0.5);
}

.readme-challenge p {
  font-size: 13.5px;
  line-height: 1.83;
}

.readme-challenge blockquote {
  max-width: 34em;
  margin: 9px 0 11px;
  padding: 6px 0 6px 12px;
  color: #123e39;
  border-left: 3px solid var(--alert);
  font-size: 16px;
  line-height: 1.65;
}

.challenge-footnote {
  margin: 9px 0 0 !important;
  color: rgba(18, 21, 15, 0.6);
  font-size: 10px !important;
  line-height: 1.6 !important;
}

.run-command {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 3px;
  padding: 5px 9px;
  color: var(--phosphor);
  background: var(--term-bg);
  border: 1px solid #050a06;
  box-shadow:
    inset 1px 1px 0 rgba(184, 237, 165, 0.18),
    2px 2px 0 rgba(18, 21, 15, 0.22);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.4;
}

.run-command > span:first-child {
  color: var(--amber);
}

.run-command__arrow {
  margin-left: 6px;
  color: var(--phosphor);
}

.run-command:hover {
  color: #07120d;
  background: var(--phosphor);
}

.run-command:hover > span:first-child,
.run-command:hover .run-command__arrow {
  color: #07120d;
}

.readme-coda {
  color: rgba(18, 21, 15, 0.65);
  font-size: 11px !important;
  line-height: 1.8 !important;
}

.readme-sign {
  margin-top: 20px !important;
  color: #164b45;
  font-family: var(--font-mono);
  font-size: 13px !important;
  text-align: right;
}

/* ---------------------------------------------------------
   About window
   --------------------------------------------------------- */

#win-about .window__body {
  padding: 20px 22px 22px;
  background-color: #e3ddc6;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(18, 21, 15, 0.018) 0 1px,
      transparent 1px 4px);
}

.about-file {
  position: relative;
  max-width: 610px;
  margin: 0 auto;
}

.about-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: start;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--ink);
}

.about-portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 91px;
  overflow: hidden;
  color: var(--paper-hi);
  background:
    repeating-linear-gradient(0deg,
      rgba(184, 237, 165, 0.12) 0 1px,
      transparent 1px 3px),
    var(--pool-deep);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 rgba(184, 237, 165, 0.18),
    2px 2px 0 rgba(18, 21, 15, 0.16);
}

.about-portrait__mark {
  position: relative;
  z-index: 1;
  font-family: var(--font-pixel);
  font-size: 57px;
  line-height: 1;
}

.about-portrait__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 39%;
  height: 1px;
  background: var(--phosphor);
  box-shadow: 0 3px 0 rgba(184, 237, 165, 0.23);
  opacity: 0.7;
  animation: portrait-scan 7s steps(2, end) infinite;
}

.about-id {
  align-self: center;
  min-width: 0;
}

.doc-kicker {
  margin: 0 0 4px;
  color: rgba(18, 21, 15, 0.58);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.about-id h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.about-role {
  margin: 2px 0 0;
  color: var(--pool);
  font-size: 14.5px;
  line-height: 1.5;
}

.about-stamp {
  display: inline-block;
  margin-top: 7px;
  padding: 4px 5px;
  color: var(--alert);
  border: 2px solid currentColor;
  font-family: var(--font-pixel);
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.09em;
  transform: rotate(7deg);
  opacity: 0.82;
}

.about-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  margin: 13px 0 15px;
  padding: 0;
  border-bottom: 1px dashed rgba(18, 21, 15, 0.45);
}

.about-fields > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dotted rgba(18, 21, 15, 0.28);
}

.about-fields > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.about-fields dt {
  color: rgba(18, 21, 15, 0.58);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.8;
}

.about-fields dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  text-align: right;
}

.about-copy p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.95;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 16px;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-width: 92px;
  padding: 6px 8px;
  color: var(--ink);
  background: #d8d1b8;
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 rgba(255, 251, 234, 0.65),
    2px 2px 0 rgba(18, 21, 15, 0.15);
  font-size: 12.5px;
  line-height: 1.2;
  text-decoration: none;
}

.about-links a:hover,
.about-links a:focus-visible {
  color: var(--paper-hi);
  background: var(--pool);
  text-decoration: none;
}

.about-links a span {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.about-footnote {
  margin: 0;
  color: rgba(18, 21, 15, 0.52);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------
   Works window
   --------------------------------------------------------- */

#win-works .window__body {
  background-color: #dfd1a9;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(18, 21, 15, 0.022) 0 1px,
      transparent 1px 4px);
}

.works-doc {
  padding: 21px 23px 22px;
}

.works-head {
  padding-bottom: 13px;
  border-bottom: 2px solid var(--ink);
}

.works-head h1 {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.works-head > p:last-child {
  max-width: 48em;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
}

.works-list {
  border-bottom: 1px solid rgba(18, 21, 15, 0.5);
}

.work-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 13px 5px;
  color: var(--ink);
  border-bottom: 1px solid rgba(18, 21, 15, 0.34);
  text-decoration: none;
}

.work-row:last-child {
  border-bottom: 0;
}

.work-row:not(.work-row--local):hover,
.work-row:not(.work-row--local):focus-visible {
  color: var(--paper-hi);
  background: var(--pool);
  outline: none;
}

.work-glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--paper-hi);
  background: var(--pool);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 rgba(255, 251, 234, 0.24),
    2px 2px 0 rgba(18, 21, 15, 0.18);
  font-family: var(--font-mono);
  font-size: 19px;
  line-height: 1;
}

.work-glyph--dark {
  color: var(--paper-hi);
  background: var(--ink);
}

.work-glyph--terminal {
  color: var(--phosphor);
  background: var(--term-bg);
  font-size: 12.5px;
}

.work-main {
  display: block;
  min-width: 0;
}

.work-path {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.4;
}

.work-desc {
  display: block;
  color: rgba(18, 21, 15, 0.68);
  font-size: 12.5px;
  line-height: 1.6;
}

.work-row:hover .work-desc,
.work-row:focus-visible .work-desc {
  color: rgba(244, 240, 221, 0.78);
}

.work-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(18, 21, 15, 0.66);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  white-space: nowrap;
}

.work-row:hover .work-action,
.work-row:focus-visible .work-action {
  color: var(--paper-hi);
}

.work-action--status {
  color: var(--pool);
}

.status-dot {
  width: 5px;
  height: 5px;
  background: #4f7e51;
  border: 1px solid var(--ink);
}

.works-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding-top: 13px;
  color: rgba(18, 21, 15, 0.68);
  font-size: 11.5px;
  line-height: 1.6;
}

.inline-link {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px dotted var(--ink);
  font-size: 11.5px;
  line-height: 1.6;
}

.inline-link:hover {
  color: var(--alert);
  border-color: var(--alert);
}

/* ---------------------------------------------------------
   Trash
   --------------------------------------------------------- */

.window--trash .window__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #d1cab2;
}

.trash-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 32px;
  padding: 0 10px;
  background: #d9d2bb;
  border-bottom: 1px solid var(--bevel-lo);
  box-shadow: inset 0 1px 0 rgba(255, 251, 234, 0.62);
}

.trash-count {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1;
  white-space: nowrap;
}

.trash-toolbar__rule {
  flex: 1;
  height: 1px;
  margin: 0 2px;
  background: rgba(18, 21, 15, 0.22);
}

.mini-button {
  min-height: 21px;
  padding: 2px 7px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo);
  font-family: var(--font-pixel);
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.mini-button:hover {
  background: var(--paper-hi);
}

.mini-button:active {
  box-shadow:
    inset -1px -1px 0 var(--bevel-hi),
    inset 1px 1px 0 var(--bevel-lo);
}

.trash-quote {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 13px 8px;
  color: rgba(18, 21, 15, 0.7);
  font-size: 11.5px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(18, 21, 15, 0.13);
}

.trash-main {
  display: grid;
  grid-template-columns: minmax(220px, 0.92fr) minmax(0, 1.08fr);
  gap: 8px;
  flex: 1;
  min-height: 0;
  padding: 8px 10px 10px;
}

.trash-list {
  margin: 0;
  padding: 3px;
  overflow: auto;
  list-style: none;
  background: #c7bfa6;
  border: 1px solid var(--bevel-lo);
  box-shadow:
    inset 1px 1px 0 rgba(18, 21, 15, 0.18),
    inset -1px -1px 0 rgba(255, 251, 234, 0.48);
}

.trash-file {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 6px 5px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
}

.trash-file + .trash-file {
  margin-top: 1px;
}

.trash-file:hover {
  background: rgba(255, 251, 234, 0.42);
  border-color: rgba(18, 21, 15, 0.18);
}

.trash-file.is-selected {
  color: var(--paper-hi);
  background: var(--pool);
  border-color: var(--ink);
  box-shadow:
    inset 1px 1px 0 rgba(255, 251, 234, 0.24),
    inset -1px -1px 0 rgba(0, 0, 0, 0.28);
}

.trash-file__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 29px;
  color: var(--ink);
  background: #e4dec8;
  border: 1px solid var(--ink);
  box-shadow:
    inset -2px -2px 0 rgba(18, 21, 15, 0.12),
    1px 1px 0 rgba(255, 251, 234, 0.4);
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1;
}

.trash-file__icon--image {
  background: #c7b08c;
}

.trash-file__icon--text {
  background: #d9d4c0;
}

.trash-file__icon--zip {
  background: #b7a26e;
}

.trash-file__icon--md {
  background: #cda48e;
}

.trash-file__icon--log {
  color: var(--phosphor);
  background: #183027;
}

.trash-file.is-selected .trash-file__icon {
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.32);
}

.trash-file__text {
  display: block;
  min-width: 0;
}

.trash-file__name {
  display: block;
  overflow: hidden;
  font-family: var(--font-pixel);
  font-size: 12.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-file__meta {
  display: block;
  margin-top: 1px;
  color: #504b3d;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
}

.trash-file.is-selected .trash-file__meta {
  color: rgba(244, 240, 221, 0.82);
}

.trash-preview {
  min-width: 0;
  overflow: auto;
  background:
    repeating-linear-gradient(0deg,
      rgba(18, 21, 15, 0.025) 0 1px,
      transparent 1px 4px),
    #e0d9c3;
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 rgba(255, 251, 234, 0.6),
    inset -1px -1px 0 rgba(18, 21, 15, 0.13);
}

.trash-preview__sheet {
  padding: 12px 13px 15px;
}

.preview-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  color: rgba(18, 21, 15, 0.55);
  border-bottom: 1px dashed rgba(18, 21, 15, 0.32);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
}

.trash-preview h2 {
  margin: 8px 0 7px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.preview-lede {
  margin: 0 0 9px;
  font-size: 12.5px;
  line-height: 1.8;
}

.preview-note {
  margin: 9px 0 0;
  padding-top: 8px;
  color: rgba(18, 21, 15, 0.61);
  border-top: 1px dotted rgba(18, 21, 15, 0.35);
  font-size: 11.5px;
  line-height: 1.7;
}

.preview-art {
  display: block;
  width: 100%;
  height: auto;
  margin: 10px 0 0;
  image-rendering: pixelated;
  border: 1px solid var(--ink);
  box-shadow:
    3px 3px 0 rgba(18, 21, 15, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.preview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 15px;
  margin: 0;
}

.preview-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  padding: 3px 0;
  border-bottom: 1px dotted rgba(18, 21, 15, 0.22);
}

.preview-meta dt,
.preview-meta dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.7;
}

.preview-meta dt {
  color: rgba(18, 21, 15, 0.55);
}

.color-ledger {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 7px 8px;
  margin: 11px 0 13px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
}

.color-ledger__chip {
  width: 14px;
  height: 14px;
  background: var(--chip);
  border: 1px solid var(--ink);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.25);
}

.color-ledger__chip--paper {
  --chip: #e8e2cc;
}

.color-ledger__chip--midnight {
  --chip: #0a1830;
  outline: 2px solid var(--alert);
  outline-offset: 1px;
}

.color-ledger__chip--fault {
  --chip: #0b5954;
}

.pet-stage {
  position: relative;
  display: grid;
  place-items: center;
  margin: 10px 0 11px;
  padding: 16px;
  background:
    repeating-linear-gradient(0deg,
      rgba(184, 237, 165, 0.06) 0 1px,
      transparent 1px 3px),
    #07120d;
  border: 2px inset #555042;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

.pet-art {
  width: 128px;
  height: 96px;
  image-rendering: pixelated;
  animation: pet-breathe 4.6s steps(2, end) infinite;
}

.pet-led {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 4px;
  height: 4px;
  background: var(--alert);
  box-shadow: 0 0 4px rgba(200, 68, 46, 0.8);
  animation: pet-led 2.4s steps(1, end) infinite;
}

.idea-list {
  margin: 12px 0 9px;
  padding: 0;
  list-style: none;
}

.idea-list li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 13px;
  font-size: 12.5px;
  line-height: 1.65;
}

.idea-list li::before {
  content: "×";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--alert);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.idea-list span {
  color: rgba(18, 21, 15, 0.55);
  font-size: 11.5px;
}

.bug-log {
  margin: 11px 0;
  padding: 9px;
  color: var(--phosphor);
  background: var(--term-bg);
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.avatar-stage {
  display: grid;
  place-items: center;
  width: min(100%, 180px);
  aspect-ratio: 1;
  margin: 12px auto;
  background:
    conic-gradient(#c0b9a0 25%, #d7d0ba 0 50%, #c0b9a0 0 75%, #d7d0ba 0);
  background-size: 16px 16px;
  border: 1px solid var(--ink);
  box-shadow: inset 2px 2px 0 rgba(18, 21, 15, 0.13);
}

.avatar-stage span {
  width: 5px;
  height: 5px;
  background: var(--ink);
  box-shadow:
    0 0 0 3px #d7d0ba,
    0 0 0 4px var(--ink);
}

/* ---------------------------------------------------------
   Terminal
   --------------------------------------------------------- */

.window--terminal {
  background: #26271f;
}

.window--terminal .window__titlebar {
  background:
    repeating-linear-gradient(0deg,
      #d8d0b9 0 1px,
      #c5bea8 1px 2px,
      #e5dec7 2px 3px);
}

.window--terminal.is-active .window__titlebar {
  color: var(--paper-hi);
  background:
    repeating-linear-gradient(0deg,
      #0c4744 0 1px,
      #08312f 1px 2px,
      #10524e 2px 3px);
}

.window__body--terminal {
  display: flex;
  padding: 3px;
  overflow: hidden;
  background: #171913;
  border-color: #050705;
}

.terminal-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 8px 10px 6px;
  color: var(--phosphor);
  background-color: var(--term-bg);
  background-image:
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.24) 0,
      rgba(0, 0, 0, 0.24) 1px,
      transparent 1px,
      transparent 3px),
    radial-gradient(ellipse at 50% 0%, rgba(126, 174, 107, 0.06), transparent 70%);
  border: 2px solid;
  border-color: #020603 #3a443c #3a443c #020603;
  box-shadow:
    inset 0 0 35px rgba(0, 0, 0, 0.78),
    inset 0 0 4px rgba(184, 237, 165, 0.09);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  text-shadow: 0 0 4px rgba(184, 237, 165, 0.14);
}

.terminal-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background:
    repeating-linear-gradient(90deg,
      transparent 0 2px,
      rgba(0, 0, 0, 0.45) 2px 3px);
}

.term-output {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-color: #334036 #0b110c;
}

.term-output > div {
  min-height: 1.6em;
}

.term-prompt {
  flex: 0 0 auto;
  color: #dfbf70;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: nowrap;
}

.term-form {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 23px;
  border-top: 1px solid rgba(184, 237, 165, 0.1);
  padding-top: 3px;
}

.term-form.is-password .term-prompt {
  color: #ee7960;
}

.term-input {
  flex: 1;
  min-width: 0;
  padding: 0;
  color: var(--paper-hi);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  caret-color: var(--phosphor);
  cursor: url("../assets/cursor.svg") 2 2, url("../assets/cursor.png") 2 2, text;
}

.term-input::placeholder {
  color: rgba(184, 237, 165, 0.35);
}

.term-form:focus-within {
  box-shadow: 0 -1px 0 rgba(184, 237, 165, 0.34);
}

.term-output:focus-visible {
  outline: 1px dashed rgba(196, 242, 178, 0.72);
  outline-offset: -3px;
}

.term-quick {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 23px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(184, 237, 165, 0.15);
  overflow: hidden;
}

.term-quick__label {
  margin-right: 2px;
  color: rgba(184, 237, 165, 0.35);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.term-quick button {
  padding: 1px 5px;
  color: rgba(184, 237, 165, 0.72);
  background: rgba(184, 237, 165, 0.035);
  border: 1px solid rgba(184, 237, 165, 0.22);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.5;
  white-space: nowrap;
}

.term-quick button:hover,
.term-quick button:focus-visible {
  color: var(--term-bg);
  background: var(--phosphor);
  border-color: var(--phosphor);
  outline: 0;
}

.window__footer--terminal {
  color: #a5afa1;
  background: #1a1c16;
  border-top: 1px solid #060806;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.term-line {
  display: block;
}

.term-line + .term-line {
  margin-top: 1px;
}

.term-dim {
  color: rgba(184, 237, 165, 0.56);
}

.term-faint {
  color: rgba(184, 237, 165, 0.35);
}

.term-amber {
  color: #e4c477;
}

.term-red {
  color: #ef8069;
}

.term-white {
  color: #f1ecd7;
}

.term-ok {
  color: #d2ffc0;
}

.term-cmd {
  color: #f1ecd7;
}

.term-heading {
  color: #e4c477;
  letter-spacing: 0.04em;
}

.term-pre {
  white-space: pre;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.35;
}

.term-rule {
  color: rgba(184, 237, 165, 0.28);
}

.term-link {
  color: #d8ca8b;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.term-link:hover {
  color: #fff4ca;
}

.term-block {
  margin: 5px 0 6px;
}

.term-password-note {
  color: #e4c477;
}

#win-terminal.is-password .term-prompt {
  color: #ef8069;
}

/* ---------------------------------------------------------
   Taskbar
   --------------------------------------------------------- */

.taskbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 500;
  display: flex;
  align-items: stretch;
  height: var(--task-h);
  padding: 3px 4px calc(3px + var(--safe-b));
  gap: 4px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.1) 0 1px,
      transparent 1px 3px),
    var(--paper);
  border-top: 1px solid var(--bevel-hi);
  box-shadow:
    inset 0 1px 0 rgba(255, 251, 234, 0.75),
    0 -1px 0 var(--ink);
  user-select: none;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 78px;
  padding: 0 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo);
  font-family: var(--font-pixel);
  font-size: 14.5px;
  line-height: 1;
}

.start-button:hover {
  background: var(--paper-hi);
}

.start-button[aria-expanded="true"],
.start-button:active {
  box-shadow:
    inset -1px -1px 0 var(--bevel-hi),
    inset 1px 1px 0 var(--bevel-lo);
  background: var(--paper-lo);
}

.start-button__mark {
  display: block;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.task-divider {
  flex: 0 0 1px;
  margin: 3px 1px;
  background: var(--bevel-lo);
  border-right: 1px solid var(--bevel-hi);
}

.task-list {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.task-list::-webkit-scrollbar {
  display: none;
}

.task-button {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 1 auto;
  width: 160px;
  min-width: 0;
  padding: 0 7px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo);
  font-family: var(--font-pixel);
  font-size: 11.5px;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.task-button:hover {
  background: var(--paper-hi);
}

.task-button.is-active {
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.05) 0 1px,
      transparent 1px 3px),
    var(--pool);
  color: var(--paper-hi);
  box-shadow:
    inset 1px 1px 0 rgba(0, 0, 0, 0.28),
    inset -1px -1px 0 rgba(255, 251, 234, 0.18);
}

.task-button svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.task-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tray {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 144px;
  padding: 0 7px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-lo),
    inset -1px -1px 0 var(--bevel-hi);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
}

.tray-activity {
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(18, 21, 15, 0.38);
}

.tray-activity span {
  display: block;
  width: 4px;
  height: 4px;
  background: rgba(18, 21, 15, 0.34);
}

.tray-activity.is-active span {
  background: var(--alert);
}

.tray-health {
  color: #4d493b;
  font-size: 9px;
  white-space: nowrap;
}

.tray-clock {
  color: var(--ink);
  font-size: 10px;
  white-space: nowrap;
}

/* ---------------------------------------------------------
   Start menu
   --------------------------------------------------------- */

.start-menu {
  position: absolute;
  left: 4px;
  bottom: calc(var(--task-h) + 3px);
  z-index: 600;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  width: min(294px, calc(100vw - 8px));
  max-height: calc(100vh - var(--task-h) - 50px);
  padding: 2px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo),
    5px 5px 0 rgba(0, 0, 0, 0.34);
  animation: start-menu-in 90ms steps(2, end) both;
}

.start-menu__rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0 6px;
  color: var(--paper-hi);
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.06) 0 1px,
      transparent 1px 3px),
    var(--pool);
}

.start-menu__rail-mark {
  width: 15px;
  height: 15px;
  filter: invert(1);
}

.start-menu__rail-text {
  display: block;
  color: var(--paper-hi);
  font-family: var(--font-pixel);
  font-size: 13.5px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.start-menu__rail-text span {
  color: var(--amber);
}

.start-menu__rail-foot {
  color: rgba(241, 236, 215, 0.55);
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.05em;
}

.start-menu__panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: calc(100vh - var(--task-h) - 62px);
  overflow-y: auto;
}

.start-menu__items {
  display: flex;
  flex-direction: column;
  padding: 3px;
}

.start-menu__items button,
.start-menu__items a {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 27px;
  padding: 3px 7px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--font-pixel);
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.start-menu__items button:hover,
.start-menu__items button:focus-visible,
.start-menu__items a:hover,
.start-menu__items a:focus-visible {
  color: var(--paper-hi);
  background: var(--pool);
  border-color: var(--ink);
  outline: 0;
}

.start-menu__items svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.start-menu__ext {
  margin-left: auto;
  color: rgba(18, 21, 15, 0.55);
  font-family: var(--font-mono);
  font-size: 10px;
}

.start-menu__items a:hover .start-menu__ext,
.start-menu__items a:focus-visible .start-menu__ext {
  color: var(--paper-hi);
}

.start-menu__sep {
  height: 1px;
  margin: 2px 7px;
  background: var(--bevel-lo);
  border-bottom: 1px solid var(--bevel-hi);
}

.start-menu__pixel {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--ink);
  border: 1px solid rgba(18, 21, 15, 0.35);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1;
}

.start-menu__pixel--red {
  color: var(--alert);
}

.start-menu__items button:hover .start-menu__pixel {
  color: var(--paper-hi);
  border-color: rgba(244, 240, 221, 0.5);
}

.start-menu__note {
  margin: auto 7px 5px;
  padding: 7px 4px 3px;
  color: #514d3e;
  border-top: 1px dotted rgba(18, 21, 15, 0.34);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.55;
}

/* ---------------------------------------------------------
   Screen age, CRT glass, fault effects
   --------------------------------------------------------- */

.crt-effects {
  position: fixed;
  inset: 0;
  z-index: 700;
  overflow: hidden;
  pointer-events: none;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background: repeating-linear-gradient(0deg,
    rgba(0, 0, 0, 0.27) 0,
    rgba(0, 0, 0, 0.27) 1px,
    transparent 1px,
    transparent 3px);
}

.crt-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 240, 0.05), transparent 27%),
    radial-gradient(ellipse at center,
      transparent 46%,
      rgba(0, 8, 7, 0.19) 82%,
      rgba(0, 5, 5, 0.43) 100%);
}

.crt-flickr {
  position: absolute;
  inset: 0;
  background: rgba(221, 255, 209, 0.018);
  animation: crt-flicker 13s steps(1, end) infinite;
}

body[data-decay="2"] .crt-scanlines {
  opacity: 0.21;
}

body[data-decay="3"] .crt-scanlines {
  opacity: 0.27;
}

.fault-flash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.fault-flash.is-active {
  animation: fault-flash 1.05s steps(2, end) both;
}

.fault-band {
  position: absolute;
  left: -4%;
  width: 108%;
  height: 13%;
  opacity: 0;
  mix-blend-mode: screen;
}

.fault-band--one {
  top: 18%;
  background:
    linear-gradient(90deg,
      transparent 0 7%,
      rgba(223, 245, 209, 0.5) 7% 30%,
      rgba(6, 20, 17, 0.8) 30% 33%,
      rgba(193, 56, 40, 0.66) 33% 55%,
      transparent 55%);
  box-shadow: 0 14px 0 rgba(231, 220, 170, 0.14), 0 -20px 0 rgba(224, 55, 36, 0.22);
}

.fault-band--two {
  top: 63%;
  height: 17%;
  background:
    linear-gradient(90deg,
      rgba(21, 91, 83, 0.45) 0 18%,
      transparent 18% 42%,
      rgba(235, 234, 193, 0.44) 42% 75%,
      rgba(194, 54, 35, 0.4) 75% 84%,
      transparent 84%);
}

.fault-flash.is-soft {
  animation-duration: 0.36s;
}

.fault-flash.is-soft .fault-band {
  height: 4%;
  opacity: 0.45;
}

.fault-word {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 5px 10px;
  color: #f6efd8;
  background: #ba3f2b;
  border: 2px solid #f6efd8;
  font-family: var(--font-mono);
  font-size: clamp(16px, 4vw, 36px);
  line-height: 1;
  letter-spacing: 0.18em;
  opacity: 0;
}

.fault-flash.is-active .fault-word {
  animation: fault-word 1.05s steps(2, end) both;
}

[data-decay="3"] .window.is-active .window__titlebar {
  animation: title-flicker 9s steps(1, end) infinite;
}

.power-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--phosphor);
  background: rgba(0, 8, 6, 0.97);
}

.power-panel {
  width: min(390px, 100%);
  padding: 22px;
  background:
    repeating-linear-gradient(0deg,
      rgba(184, 237, 165, 0.035) 0 1px,
      transparent 1px 4px),
    #06100b;
  border: 2px solid;
  border-color: #354038 #050805 #050805 #354038;
  box-shadow:
    inset 0 0 28px rgba(0, 0, 0, 0.72),
    0 0 0 1px #030604;
  font-family: var(--font-mono);
}

.power-kicker {
  margin: 0 0 14px;
  color: rgba(184, 237, 165, 0.45);
  font-size: 9px;
  letter-spacing: 0.11em;
}

.power-panel h2 {
  margin: 0 0 8px;
  color: #e8d08a;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
}

.power-message {
  margin: 0 0 16px;
  color: rgba(184, 237, 165, 0.7);
  font-size: 12.5px;
  line-height: 1.8;
}

.power-panel.is-error h2 {
  color: #ef8069;
}

.power-panel.is-error .power-message {
  color: rgba(239, 128, 105, 0.8);
}

.power-back {
  color: var(--phosphor);
  background: #0b1710;
  border-color: #546356;
  box-shadow:
    inset 1px 1px 0 rgba(184, 237, 165, 0.12),
    inset -1px -1px 0 rgba(0, 0, 0, 0.4);
  font-family: var(--font-mono);
}

.noscript-card {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1100;
  width: min(520px, calc(100vw - 28px));
  padding: 22px;
  color: var(--ink);
  background: var(--paper-hi);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
}

.noscript-card h1 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.45;
}

.noscript-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
}

.noscript-card a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------
   Focus and scrollbars
   --------------------------------------------------------- */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--bevel-lo) var(--paper-lo);
}

::-webkit-scrollbar {
  width: 13px;
  height: 13px;
  background: var(--paper);
  border-left: 1px solid var(--bevel-hi);
}

::-webkit-scrollbar-track {
  background: var(--paper-lo);
  border: 1px solid var(--bevel-hi);
}

::-webkit-scrollbar-thumb {
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-hi),
    inset -1px -1px 0 var(--bevel-lo);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--paper-hi);
}

.window__body ::-webkit-scrollbar,
.term-output::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

/* ---------------------------------------------------------
   Motion
   --------------------------------------------------------- */

@keyframes crt-power-on {
  0% {
    opacity: 0;
    filter: brightness(2.2) saturate(0.2);
    transform: scaleY(0.008);
  }
  24% {
    opacity: 1;
    filter: brightness(1.7) saturate(0.45);
    transform: scaleY(1);
  }
  42% {
    filter: brightness(1.25) saturate(0.8);
  }
  53% {
    filter: brightness(0.92);
  }
  70% {
    filter: brightness(1.05);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@keyframes window-on {
  0% {
    opacity: 0;
    transform: scale(0.975) translateY(3px);
    filter: brightness(1.4);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes start-menu-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes icon-attention {
  0%,
  100% {
    transform: translateY(0);
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.3));
  }
  50% {
    transform: translateY(-3px);
    filter: drop-shadow(2px 5px 0 rgba(0, 0, 0, 0.18)) brightness(1.15);
  }
}

@keyframes led-wink {
  0%,
  86%,
  100% {
    opacity: 1;
  }
  87%,
  92% {
    opacity: 0.2;
  }
}

@keyframes crt-flicker {
  0%,
  6.9%,
  7.2%,
  31.9%,
  32.2%,
  68.9%,
  69.1%,
  100% {
    opacity: 0.2;
  }
  7%,
  32% {
    opacity: 0.34;
  }
  69% {
    opacity: 0.12;
  }
}

@keyframes chassis-fault {
  0% {
    transform: translate(0, 0);
    filter: none;
  }
  13% {
    transform: translate(-3px, 1px) skewX(-0.4deg);
    filter: invert(0.04) hue-rotate(8deg);
  }
  25% {
    transform: translate(4px, -2px);
    filter: saturate(1.6) hue-rotate(-9deg);
  }
  38% {
    transform: translate(-2px, 0) skewX(0.3deg);
    filter: none;
  }
  51% {
    transform: translate(2px, 1px);
    filter: brightness(1.14);
  }
  66% {
    transform: translate(-1px, -1px);
    filter: none;
  }
  81% {
    transform: translate(1px, 0);
  }
  100% {
    transform: none;
    filter: none;
  }
}

@keyframes fault-flash {
  0% {
    opacity: 0;
  }
  8% {
    opacity: 0.96;
    background: rgba(217, 239, 202, 0.09);
  }
  19% {
    opacity: 0.35;
    background: rgba(194, 59, 39, 0.18);
  }
  28% {
    opacity: 0.95;
    background: rgba(0, 8, 7, 0.22);
  }
  43% {
    opacity: 0.45;
    background: rgba(209, 232, 194, 0.07);
  }
  58% {
    opacity: 0.88;
    background: rgba(20, 74, 66, 0.2);
  }
  76% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    background: transparent;
  }
}

@keyframes fault-word {
  0%,
  14%,
  48%,
  75%,
  100% {
    opacity: 1;
    transform: translateX(0);
  }
  20% {
    opacity: 0;
    transform: translateX(-8px);
  }
  23% {
    opacity: 1;
    transform: translateX(5px);
  }
  50% {
    opacity: 0;
    transform: translateX(3px);
  }
  53% {
    opacity: 1;
    transform: translateX(-4px);
  }
}

@keyframes title-flicker {
  0%,
  92%,
  100% {
    filter: none;
  }
  92.4% {
    filter: brightness(1.5) contrast(1.2);
  }
  92.8% {
    filter: none;
  }
}

@keyframes portrait-scan {
  0%,
  89%,
  100% {
    transform: translateY(0);
  }
  90% {
    transform: translateY(15px);
  }
  94% {
    transform: translateY(31px);
  }
  97% {
    transform: translateY(-5px);
  }
}

@keyframes pet-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.02);
  }
}

@keyframes pet-led {
  0%,
  65%,
  100% {
    opacity: 1;
  }
  66%,
  84% {
    opacity: 0.2;
  }
}

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

@media (max-width: 900px) {
  .system-bar__context {
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .asset-tag {
    right: 20px;
    transform: rotate(-2.4deg) scale(0.9);
    transform-origin: right bottom;
  }
}

@media (max-width: 720px) {
  :root {
    --bar-h: 34px;
    --task-h: calc(43px + var(--safe-b));
  }

  .system-bar {
    padding: 0 6px;
    gap: 7px;
  }

  .brand-version {
    display: none;
  }

  .system-bar__context {
    display: none;
  }

  .system-bar__brand {
    flex: 1;
  }

  .system-bar__state {
    gap: 8px;
  }

  .health-label {
    display: none;
  }

  .health-readout {
    font-size: 8.5px;
  }

  .text-mode-link {
    font-size: 10px;
  }

  .help-button {
    width: 18px;
    height: 17px;
  }

  .window {
    width: calc(100vw - 12px);
    height: min(500px, calc(100svh - var(--bar-h) - var(--task-h) - 12px));
  }

  .window__titlebar {
    flex-basis: 31px;
    height: 31px;
    grid-template-columns: 34px minmax(0, 1fr) 66px;
  }

  .win-button {
    width: 20px;
    height: 19px;
  }

  .win-button--close {
    width: 19px;
    height: 18px;
  }

  .window__controls {
    gap: 3px;
    padding-right: 5px;
  }

  .text-mode-link {
    padding: 5px 2px;
    margin: -5px 0;
  }

  .help-button {
    width: 22px;
    height: 22px;
  }

  .start-menu__items button,
  .start-menu__items a {
    min-height: 32px;
  }

  .mini-button {
    min-height: 26px;
    padding: 3px 8px;
  }

  .trash-file {
    padding: 8px 6px;
  }

  .term-quick {
    flex-basis: 28px;
  }

  .term-quick button {
    min-height: 22px;
    padding: 3px 6px;
    font-size: 9.5px;
  }

  .window__footer {
    flex-basis: 21px;
    height: 21px;
    font-size: 9.5px;
  }

  .desk-icon {
    width: 94px;
    min-height: 66px;
  }

  .desk-icon__art {
    width: 42px;
    height: 42px;
  }

  .desk-icon__label {
    font-size: 12.5px;
  }

  .asset-tag {
    display: none;
  }

  .wallpaper__note {
    left: 12px;
    bottom: 9px;
    font-size: 10px;
  }

  .wallpaper__wordmark {
    right: -10px;
    bottom: 12%;
    font-size: 104px;
  }

  .readme-sheet {
    padding: 16px 18px 22px 38px;
  }

  .readme-sheet::after {
    top: 59px;
    right: 16px;
    font-size: 9px;
  }

  .readme-sheet h1 {
    font-size: 25px;
  }

  #win-about .window__body {
    padding: 15px;
  }

  .about-head {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 11px;
  }

  .about-portrait {
    width: 64px;
    height: 80px;
  }

  .about-portrait__mark {
    font-size: 48px;
  }

  .about-id h1 {
    font-size: 28px;
  }

  .about-stamp {
    font-size: 10px;
  }

  .about-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .about-fields > div:nth-last-child(-n + 2) {
    border-bottom: 1px dotted rgba(18, 21, 15, 0.28);
  }

  .about-fields > div:last-child {
    border-bottom: 0;
  }

  .works-doc {
    padding: 16px;
  }

  .works-head h1 {
    font-size: 34px;
  }

  .work-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
  }

  .work-action {
    grid-column: 2;
    margin-top: 4px;
  }

  .work-glyph {
    width: 34px;
    height: 34px;
  }

  .window--trash .window__body {
    overflow-y: auto;
  }

  .trash-main {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: auto;
    gap: 7px;
  }

  .trash-list {
    max-height: 218px;
    flex: 0 0 auto;
  }

  .trash-preview {
    min-height: 260px;
    flex: 0 0 auto;
    overflow: visible;
  }

  .trash-toolbar {
    flex-wrap: wrap;
    flex-basis: auto;
    padding: 5px 8px;
    gap: 5px;
  }

  .trash-count {
    flex: 1;
  }

  .trash-toolbar__rule {
    display: none;
  }

  .trash-quote {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .start-menu {
    width: min(310px, calc(100vw - 8px));
  }

  .task-button {
    width: 36px;
    min-width: 36px;
    justify-content: center;
    padding: 0;
  }

  .task-label {
    display: none;
  }

  .tray {
    min-width: 0;
    gap: 5px;
    padding: 0 5px;
  }

  .tray-health {
    display: none;
  }

  .tray-activity {
    width: 10px;
    height: 10px;
  }

  .start-button {
    min-width: 62px;
    gap: 4px;
    padding: 0 6px;
    font-size: 13.5px;
  }

  .start-button__mark {
    width: 15px;
    height: 15px;
  }

  .term-quick button[data-quick="open blog"] {
    display: none;
  }

  .terminal-screen {
    font-size: 13px;
    padding: 7px 8px 5px;
  }

  .term-input {
    font-size: 13px;
  }

  .term-pre {
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .brand-name {
    font-size: 13.5px;
  }

  .health-readout {
    display: none;
  }

  .system-bar__state {
    gap: 7px;
  }

  .window__title {
    font-size: 11.5px;
  }

  .readme-meta span:last-child {
    display: none;
  }

  .readme-sheet {
    padding-left: 30px;
  }

  .readme-sheet h1 {
    font-size: 22px;
  }

  .about-head {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .about-portrait {
    width: 56px;
    height: 72px;
  }

  .about-stamp {
    display: none;
  }

  .work-action {
    white-space: normal;
  }

  .trash-main {
    padding: 7px;
  }

  .preview-meta {
    grid-template-columns: 1fr;
  }

  .term-quick {
    gap: 3px;
  }

  .term-quick__label {
    display: none;
  }

  .term-quick button {
    padding: 1px 4px;
  }

  .taskbar {
    gap: 3px;
  }

  .task-divider {
    margin: 3px 0;
  }

  .start-button {
    min-width: 58px;
    font-size: 12.5px;
  }

  .tray {
    padding: 0 4px;
  }
}

@media (max-height: 560px) {
  .wallpaper__note {
    display: none;
  }

  .asset-tag {
    display: none;
  }

  .window {
    height: calc(100svh - var(--bar-h) - var(--task-h) - 8px);
  }
}

/* Devices without hover get no desktop-style hover reversal */
@media (hover: none) {
  .desk-icon:hover .desk-icon__label {
    color: #f4f0dd;
    background: transparent;
    text-shadow:
      1px 0 0 #071b19,
      -1px 0 0 #071b19,
      0 1px 0 #071b19,
      0 -1px 0 #071b19,
      1px 1px 0 #071b19;
  }

  .work-row:hover {
    color: var(--ink);
    background: transparent;
  }

  .work-row:hover .work-desc,
  .work-row:hover .work-action {
    color: inherit;
  }
}

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

  .machine,
  .machine.is-faulting,
  .window.is-opening,
  .start-menu,
  .crt-flickr,
  .desk-icon.is-attention .desk-icon__art,
  .about-portrait__scan,
  .pet-art,
  .pet-led,
  .health-readout.is-degraded .health-led,
  [data-decay="3"] .health-led,
  [data-decay="3"] .window.is-active .window__titlebar {
    animation: none !important;
  }

  .fault-flash.is-active {
    animation: fault-reduced 0.5s steps(2, end) both;
  }

  .fault-flash.is-active .fault-band {
    display: none;
  }

  .fault-flash.is-active .fault-word {
    animation: none;
    opacity: 1;
  }
}

@keyframes fault-reduced {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0.8;
    background: rgba(194, 59, 39, 0.12);
  }
  60% {
    opacity: 0.5;
    background: rgba(0, 8, 7, 0.18);
  }
  100% {
    opacity: 0;
  }
}

/* ---------------------------------------------------------
   Additions: startup, fetch output, system notices
   --------------------------------------------------------- */

.machine.is-booting {
  animation: crt-power-on 560ms steps(6, end) both;
}

.icon-layer:not(.is-ready) .desk-icon {
  visibility: hidden;
}

body.is-dragging-icon,
body.is-dragging-icon * {
  cursor: url("../assets/cursor.svg") 2 2, url("../assets/cursor.png") 2 2, grabbing !important;
}

.system-notice {
  position: absolute;
  right: 16px;
  bottom: calc(var(--task-h) + 10px);
  z-index: 650;
  width: min(360px, calc(100vw - 24px));
  padding: 9px 11px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg,
      rgba(18, 21, 15, 0.025) 0 1px,
      transparent 1px 4px),
    #e8dfad;
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 rgba(255, 251, 234, 0.7),
    4px 4px 0 rgba(0, 0, 0, 0.3);
  font-family: var(--font-pixel);
  font-size: 12.5px;
  line-height: 1.65;
  animation: start-menu-in 100ms steps(2, end) both;
}

.system-notice::before {
  content: "SYSTEM";
  display: block;
  margin-bottom: 3px;
  color: rgba(18, 21, 15, 0.5);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0.1em;
}

.term-fetch {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 5px 0 7px;
  white-space: normal;
}

.term-ascii {
  flex: 0 0 auto;
  margin: 0;
  color: rgba(184, 237, 165, 0.66);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.32;
  white-space: pre;
}

.term-facts {
  display: grid;
  gap: 1px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
}

.term-facts > div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 7px;
}

.term-fact-label {
  color: #d7bd79;
}

.term-fact-value {
  color: #e9e5cf;
  overflow-wrap: anywhere;
}

.term-output::-webkit-scrollbar {
  width: 11px;
  background: #07120d;
  border-left: 1px solid rgba(184, 237, 165, 0.12);
}

.term-output::-webkit-scrollbar-track {
  background: #0a140e;
  border: 0;
}

.term-output::-webkit-scrollbar-thumb {
  background: #26332b;
  border: 1px solid #48534a;
  box-shadow: inset 1px 1px 0 rgba(184, 237, 165, 0.15);
}

.term-input[type="password"] {
  letter-spacing: 0.2em;
}

.fault-flash.is-soft .fault-word {
  animation: none !important;
  opacity: 0 !important;
}

@media (max-width: 720px) {
  .system-notice {
    right: 8px;
    bottom: calc(var(--task-h) + 8px);
    width: calc(100vw - 16px);
    font-size: 11.5px;
  }

  .term-fetch {
    gap: 9px;
  }

  .term-facts {
    gap: 2px;
    font-size: 9.5px;
  }

  .term-facts > div {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .machine.is-booting {
    animation: none !important;
  }
}

/* ---------------------------------------------------------
   Desktop service note
   --------------------------------------------------------- */

.desk-note {
  position: absolute;
  top: 46px;
  right: 34px;
  width: 252px;
  padding: 22px 17px 30px;
  color: #26241a;
  background:
    repeating-linear-gradient(0deg,
      transparent 0,
      transparent 23px,
      rgba(93, 80, 34, 0.13) 23px,
      rgba(93, 80, 34, 0.13) 24px),
    linear-gradient(155deg, #e7d894, #d9c77c);
  border: 1px solid rgba(30, 27, 17, 0.55);
  box-shadow:
    inset 1px 1px 0 rgba(255, 250, 206, 0.45),
    5px 6px 0 rgba(0, 0, 0, 0.28);
  transform: rotate(1.3deg);
  user-select: none;
  pointer-events: none;
}

.desk-note__tape {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 76px;
  height: 21px;
  background: rgba(227, 220, 192, 0.74);
  border: 1px solid rgba(28, 27, 18, 0.18);
  transform: translateX(-50%) rotate(-2deg);
}

.desk-note__kicker {
  display: block;
  margin-bottom: 12px;
  color: rgba(38, 36, 26, 0.58);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.08em;
}

.desk-note strong {
  display: block;
  margin-bottom: 7px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
}

.desk-note p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.95;
}

.desk-note em {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-style: normal;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.desk-note__clue {
  margin-top: 8px !important;
  padding-top: 7px;
  border-top: 1px dashed rgba(38, 36, 26, 0.36);
}

.desk-note__clue b {
  color: #963a28;
  font-weight: 400;
}

.desk-note__stamp {
  position: absolute;
  right: 13px;
  bottom: 9px;
  padding: 1px 4px;
  color: rgba(150, 52, 36, 0.72);
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

.wallpaper__note {
  bottom: calc(var(--task-h) + 14px);
}

#win-readme .readme-sheet {
  padding-top: 17px;
}

#win-readme .readme-sheet h1 {
  max-width: none;
  margin-top: 13px;
  font-size: 26px;
}

#win-readme .readme-sheet::after {
  top: 50px;
}

@media (max-width: 900px) {
  .desk-note {
    display: none;
  }
}

@media (max-width: 720px) {
  #win-readme .readme-sheet h1 {
    font-size: 22px;
  }
}

/* ---------------------------------------------------------
   Window resizing
   --------------------------------------------------------- */

.window__footer {
  padding-right: 24px;
}

.window-resize {
  position: absolute;
  z-index: 24;
  display: block;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.window-resize--e,
.window-resize--w {
  top: 27px;
  bottom: 18px;
  width: 5px;
  cursor: ew-resize;
}

.window-resize--e {
  right: 0;
}

.window-resize--w {
  left: 0;
}

.window-resize--s {
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 5px;
  cursor: ns-resize;
}

.window-resize--se,
.window-resize--sw {
  bottom: 0;
  width: 18px;
  height: 18px;
}

.window-resize--se {
  right: 0;
  cursor: nwse-resize;
}

.window-resize--sw {
  left: 0;
  cursor: nesw-resize;
}

.window-resize--se::before {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 3px;
  height: 3px;
  color: var(--ink-soft);
  background: currentColor;
  box-shadow:
    -4px 0 currentColor,
    0 -4px currentColor,
    -8px 0 currentColor,
    -4px -4px currentColor,
    0 -8px currentColor;
  opacity: 0.52;
  pointer-events: none;
}

.window-resize--se:hover::before {
  opacity: 0.85;
}

.window--terminal .window-resize--se::before {
  color: rgba(196, 242, 178, 0.76);
  opacity: 0.9;
}

.window.is-resizing {
  user-select: none;
}

.window.is-maximized .window-resize {
  display: none;
}

.window.is-maximized .window__footer {
  padding-right: 6px;
}

@media (max-width: 720px) {
  .window__footer {
    padding-right: 28px;
  }

  .window-resize--e,
  .window-resize--w {
    width: 8px;
  }

  .window-resize--s {
    height: 8px;
  }

  .window-resize--se,
  .window-resize--sw {
    width: 24px;
    height: 24px;
  }

  .window-resize--e,
  .window-resize--w {
    top: 31px;
  }
}
