:root {
  --ink: #0c1614;
  --ink-soft: #1a2e29;
  --surface: #f2f7f5;
  --surface-2: #e4efea;
  --line: rgba(12, 22, 20, 0.12);
  --muted: #4a635c;
  --accent: #0d9b82;
  --accent-deep: #076b5a;
  --accent-glow: #2dd4a8;
  --warn: #c45c26;
  --ok: #1a8f5c;
  --taskbar: rgba(10, 22, 20, 0.88);
  --win-shadow: 0 18px 50px rgba(6, 24, 20, 0.28), 0 2px 8px rgba(6, 24, 20, 0.12);
  --font-display: "Syne", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 10px;
  --z-boot: 1000;
  --z-window: 40;
  --z-taskbar: 80;
  --z-menu: 90;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: var(--accent-deep);
}

/* ——— Boot ——— */
.boot {
  position: fixed;
  inset: 0;
  z-index: var(--z-boot);
  display: grid;
  place-content: center;
  gap: 1.75rem;
  justify-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, #143d36 0%, transparent 55%),
    linear-gradient(165deg, #061512 0%, #0c221e 45%, #08201b 100%);
  color: #e8f5f1;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__mark {
  text-align: center;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.boot__logo {
  width: 72px;
  height: 72px;
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 8px 24px rgba(45, 212, 168, 0.25));
  animation: pulse-logo 2.4s ease-in-out infinite;
}

.boot__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.boot__tag {
  margin-top: 0.55rem;
  font-size: 0.95rem;
  color: rgba(232, 245, 241, 0.72);
  letter-spacing: 0.02em;
}

.boot__bar {
  width: min(280px, 70vw);
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.boot__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-glow));
  transition: width 0.15s linear;
}

.boot__status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(232, 245, 241, 0.55);
  letter-spacing: 0.04em;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-logo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ——— Desktop ——— */
.desktop {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0e2420;
  animation: desk-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.desktop[hidden] {
  display: none;
}

@keyframes desk-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.desktop__atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 70% 20%, rgba(45, 212, 168, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 15% 80%, rgba(13, 155, 130, 0.18) 0%, transparent 45%),
    linear-gradient(160deg, #0a1f1b 0%, #12352e 38%, #1a4a40 72%, #0e2a24 100%);
  pointer-events: none;
}

.desktop__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 245, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 245, 241, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
}

.desktop__hero {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) 0;
  max-width: 36rem;
  color: #eef8f4;
  pointer-events: none;
  animation: rise 0.85s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.desktop__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(238, 248, 244, 0.55);
  margin-bottom: 0.65rem;
}

.desktop__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-shadow: 0 4px 40px rgba(6, 24, 20, 0.4);
}

.desktop__lede {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: rgba(238, 248, 244, 0.78);
  letter-spacing: 0.06em;
}

/* Icons */
.icons {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.35rem 0.5rem;
  max-height: calc(100% - 11rem);
  padding: 1rem 0.85rem 5.5rem;
  width: max-content;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 88px;
  padding: 0.55rem 0.35rem;
  border-radius: 8px;
  color: #eef8f4;
  transition: background 0.15s ease, transform 0.15s ease;
}

.icon:hover,
.icon:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.icon:active {
  transform: scale(0.96);
}

.icon__glyph {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
}

.icon__glyph::after {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  opacity: 0.92;
}

.icon__glyph--token {
  background: linear-gradient(145deg, #2dd4a8, #0d9b82);
  color: #06241f;
}
.icon__glyph--token::after {
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.icon__glyph--risk {
  background: linear-gradient(145deg, #f0a060, #c45c26);
  color: #2a1408;
}
.icon__glyph--risk::after {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px currentColor;
  background: transparent;
  position: relative;
}
.icon__glyph--risk::before {
  content: "";
  position: absolute;
  width: 3px;
  height: 7px;
  background: #2a1408;
  top: 12px;
  border-radius: 1px;
  z-index: 1;
}

.icon__glyph--policies {
  background: linear-gradient(145deg, #7ec8b8, #2a6f62);
  color: #06241f;
}
.icon__glyph--policies::after {
  width: 14px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 3px 2px 0 rgba(6, 36, 31, 0.35);
}

.icon__glyph--migrate {
  background: linear-gradient(145deg, #5eb8e0, #1f6f8f);
  color: #062028;
}
.icon__glyph--migrate::after {
  width: 0;
  height: 0;
  background: transparent;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

.icon__glyph--wallet {
  background: linear-gradient(145deg, #c4b59a, #7a6a4e);
  color: #1f1a12;
}
.icon__glyph--wallet::after {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: inset -5px 0 0 rgba(31, 26, 18, 0.35);
}

.icon__glyph--docs {
  background: linear-gradient(145deg, #dfe8e4, #8fa39a);
  color: #1a2e29;
}
.icon__glyph--docs::after {
  width: 13px;
  height: 16px;
  border-radius: 1px;
  box-shadow: inset 0 3px 0 rgba(26, 46, 41, 0.25), inset 0 -3px 0 rgba(26, 46, 41, 0.15);
}

.icon__label {
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* Windows layer */
.windows {
  position: absolute;
  inset: 0 0 48px 0;
  z-index: var(--z-window);
  pointer-events: none;
}

.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 24px));
  height: min(420px, calc(100vh - 90px));
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--win-shadow);
  border: 1px solid rgba(255, 255, 255, 0.35);
  overflow: hidden;
  pointer-events: auto;
  animation: win-open 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.win.is-max {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

.win.is-min {
  display: none;
}

.win.is-active {
  box-shadow: var(--win-shadow), 0 0 0 1px rgba(13, 155, 130, 0.35);
}

@keyframes win-open {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.win__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem 0.45rem 0.9rem;
  background: linear-gradient(180deg, #fafcfb 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--line);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}

.win__titlebar:active {
  cursor: grabbing;
}

.win__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}

.win__controls {
  display: flex;
  gap: 2px;
}

.win__btn {
  width: 36px;
  height: 28px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--ink-soft);
  transition: background 0.12s ease;
}

.win__btn:hover {
  background: rgba(12, 22, 20, 0.08);
}

.win__btn--close:hover {
  background: #c43c2e;
  color: #fff;
}

.win__body {
  flex: 1;
  overflow: auto;
  padding: 1.15rem 1.25rem 1.4rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.win__body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.win__body .sub {
  color: var(--muted);
  margin-bottom: 1.1rem;
  font-size: 0.88rem;
}

.win__body p + p {
  margin-top: 0.75rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 1.1rem 0;
}

.stat {
  padding: 0.75rem 0.7rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat span {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  background: rgba(13, 155, 130, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 0.86rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 560;
  font-size: 0.86rem;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #06241f;
}

.btn--primary:hover {
  background: var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--ink);
  color: #b8e8d8;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  margin-top: 0.9rem;
  overflow-x: auto;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: rgba(13, 155, 130, 0.12);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.55rem;
}

.meter {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.35rem 0 0.9rem;
}

.meter > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-glow));
  border-radius: 4px;
  width: 0;
  animation: fill-meter 1.1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fill-meter {
  to { width: var(--w, 72%); }
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.policy-table th,
.policy-table td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

.policy-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 500;
}

.status-ok { color: var(--ok); font-weight: 600; }
.status-warn { color: var(--warn); font-weight: 600; }

/* Taskbar */
.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-taskbar);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.55rem;
  background: var(--taskbar);
  backdrop-filter: blur(16px);
  color: #e8f5f1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.taskbar__start {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.88rem;
  color: #e8f5f1;
  transition: background 0.12s ease;
}

.taskbar__start:hover,
.taskbar__start[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
}

.taskbar__pins {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.taskbar__pin {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 160px;
  padding: 0.35rem 0.65rem;
  border-radius: 7px;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 2px solid transparent;
}

.taskbar__pin.is-active {
  background: rgba(45, 212, 168, 0.18);
  border-bottom-color: var(--accent-glow);
}

.taskbar__pin:hover {
  background: rgba(255, 255, 255, 0.12);
}

.taskbar__tray {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(232, 245, 241, 0.75);
}

.taskbar__net {
  letter-spacing: 0.04em;
}

/* Start menu */
.start-menu {
  position: absolute;
  left: 0.55rem;
  bottom: 56px;
  z-index: var(--z-menu);
  width: min(300px, calc(100vw - 1.1rem));
  background: rgba(242, 247, 245, 0.96);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  box-shadow: var(--win-shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
  animation: win-open 0.22s ease both;
}

.start-menu[hidden] {
  display: none;
}

.start-menu__head {
  padding: 1rem 1.1rem 0.85rem;
  background: linear-gradient(135deg, #0d9b82, #076b5a);
  color: #e8f5f1;
}

.start-menu__head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.start-menu__head span {
  font-size: 0.72rem;
  opacity: 0.8;
}

.start-menu__list {
  list-style: none;
  padding: 0.4rem;
}

.start-menu__list button {
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-radius: 7px;
  font-size: 0.86rem;
  color: var(--ink);
}

.start-menu__list button:hover {
  background: rgba(13, 155, 130, 0.1);
}

.start-menu__x {
  display: block;
  padding: 0.75rem 1.1rem 1rem;
  font-size: 0.8rem;
  text-decoration: none;
  border-top: 1px solid var(--line);
  color: var(--accent-deep);
}

.start-menu__x:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .desktop__hero {
    padding-top: 1rem;
  }

  .desktop__title {
    font-size: 2.4rem;
  }

  .icons {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    width: 100%;
    padding-bottom: 5rem;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .win {
    left: 12px !important;
    top: 48px !important;
    width: calc(100vw - 24px) !important;
    height: calc(100vh - 110px) !important;
  }
}
