:root {
  --bg: #040405;
  --bar: rgba(0, 0, 0, 0.75);
  --line: rgba(217, 217, 217, 0.10);
  --line2: rgba(255, 255, 255, 0.22);
  --white: #f4f5f7;
  --silver: #bdbdbd;
  --dim: #8f8f8f;
  --accent: #60ff78;
  --accentInk: #05070a;
  --amber: #fbbc05;
  --red: #ea4335;
  --card: rgba(0, 0, 0, 0.75);
  --field: #0e0e0e;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --sans: "Roboto", "Roboto Flex", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --barH: 52px;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.scene { height: 100%; overflow: hidden; overscroll-behavior: none; }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.8s ease;
}
#scene.ready { opacity: 1; }
#scene.dragging { cursor: grabbing; }

.backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  mask-image: radial-gradient(circle at 92% 92%, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 92% 92%, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 70%);
}
.backdrop[data-side="left"] {
  mask-image: radial-gradient(circle at 8% 92%, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 8% 92%, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 70%);
}
.backdrop.ready { opacity: 0.22; }

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 35%, transparent 45%, rgba(0, 0, 0, 0.65) 100%);
}

@media (max-width: 640px) {
  .vignette { display: none; }
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--barH) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) clamp(16px, 1.56vw, 24px) 0;
  display: flex;
  align-items: center;
  z-index: 10;
  background: var(--bar);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: padding 0.55s cubic-bezier(0.32, 0.72, 0.35, 1), background 0.4s, border-color 0.4s;
}
.topbar.scrolled {
  padding-left: max(16px, calc(50% - 350px));
  padding-right: max(16px, calc(50% - 350px));
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% + 48px);
  background: linear-gradient(to bottom, rgba(4, 4, 5, 0.92) 0%, rgba(4, 4, 5, 0));
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.4s;
}
.topbar.scrolled::before { opacity: 1; }

.path { display: flex; align-items: center; gap: 2px; min-width: 0; }
.chevron { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--dim); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sep { color: var(--dim); font-size: 16px; font-weight: 400; padding: 0 2px 0 6px; max-width: 1em; overflow: hidden; white-space: nowrap; transition: opacity 0.3s, max-width 0.5s cubic-bezier(0.32, 0.72, 0.35, 1), padding 0.5s cubic-bezier(0.32, 0.72, 0.35, 1); }
.topbar.scrolled .sep { max-width: 0; opacity: 0; padding: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  user-select: none;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.brand:hover { background: rgba(255, 255, 255, 0.05); }
.topbar.scrolled .brand:hover { background: transparent; }
.brandIcon { width: 32px; height: auto; object-fit: contain; }
.brandText {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-block;
  max-width: 10em;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.5s cubic-bezier(0.32, 0.72, 0.35, 1), opacity 0.3s 0.1s;
}
.topbar.scrolled .brandText { max-width: 0; opacity: 0; }
.brandText .w1 { color: var(--white); }
.brandText .dot { color: var(--accent); }
.brandText .w2 { color: var(--dim); }

.crumb {
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  max-width: 18em;
  overflow: hidden;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, max-width 0.5s cubic-bezier(0.32, 0.72, 0.35, 1), opacity 0.3s 0.1s, padding 0.5s cubic-bezier(0.32, 0.72, 0.35, 1);
}
.topbar.scrolled .crumb { max-width: 0; opacity: 0; padding-left: 0; padding-right: 0; }
.crumb:hover { background: rgba(255, 255, 255, 0.05); }

.links { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; white-space: nowrap; }
.links a {
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s, opacity 0.2s;
}
.links a:hover { background: rgba(255, 255, 255, 0.06); }

.page { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: calc(var(--barH) + env(safe-area-inset-top, 0px) + 56px) 16px 96px; }

::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--white); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.links .me { color: var(--dim); font-family: var(--mono); font-size: 13px; padding: 7px 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border-radius: 11px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font: 500 14px/1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, filter 0.15s, opacity 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn:focus-visible, .input:focus-visible, .tab:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.primary { background: var(--accent); color: var(--accentInk); }
.btn.primary:hover { opacity: 0.88; }
.btn.ghost { background: transparent; color: var(--silver); }
.btn.ghost:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); }
.btn.danger { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--red) 18%, transparent); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; height: 46px; font-size: 15.5px; border-radius: 12px; }
.btn[disabled], .btn.is-disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn svg, .iconBtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.iconBtn {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.iconBtn:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); }

.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 14px; font-weight: 500; color: var(--white); display: flex; justify-content: space-between; gap: 8px; }
.label .hint, .field .hint { color: var(--dim); font-weight: 400; font-size: 12.5px; }
.input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--field);
  color: var(--white);
  font: 400 15px/1.4 var(--sans);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--dim); }
.input:hover { background: #121213; }
.input:focus { outline: none; background: #121213; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
textarea.input { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
select.input { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5' fill='none' stroke='%23bdbdbd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; }
select.input option { background: #111114; }
.input.mono { font-family: var(--mono); font-size: 13.5px; }
.field.invalid .input { border-color: color-mix(in srgb, var(--red) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 14%, transparent); }
.fieldError { font-size: 12.5px; color: var(--red); min-height: 0; }
.fieldError:empty { display: none; }

.card { border-radius: 18px; background: rgba(255, 255, 255, 0.035); }

.formError {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: #f3b3b1;
  font-size: 13.5px;
  line-height: 1.5;
}
.formError[hidden] { display: none; }
.formError a { color: var(--white); }

.stateDot { --st: var(--dim); width: 8px; height: 8px; flex: none; border-radius: 2px; background: var(--st); }
.stateDot.up { --st: var(--accent); }
.stateDot.partial { --st: var(--amber); }
.stateDot.down { --st: var(--red); }
.stateDot.none { --st: var(--dim); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 50;
  transform: translate(-50%, 12px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(36, 36, 40, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 13.5px;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .stateDot { width: 6px; height: 6px; }

@media (max-width: 640px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  .crumb, .brandText { font-size: 15px; }
}

.page { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: calc(var(--barH) + env(safe-area-inset-top, 0px) + 56px) 16px 96px; }
.headline { font-size: clamp(34px, 7vw, 56px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.06; max-width: 620px; }
.accent { color: var(--accent); }
.lede { margin-top: 18px; max-width: 540px; color: var(--silver); font-size: 17px; line-height: 1.6; }
code { font-family: var(--mono); font-size: 0.86em; color: var(--white); background: rgba(255, 255, 255, 0.05); padding: 1px 5px; border-radius: 5px; }

.secret {
  position: fixed;
  left: 14px;
  bottom: 10px;
  z-index: 1;
  color: rgba(244, 245, 247, 0.08);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  transition: color 0.3s;
}
.secret:hover { color: var(--dim); }
.iconBtn[hidden], .btn[hidden] { display: none; }

.links a.navBtn { height: 33px; display: inline-flex; align-items: center; padding: 0 15px; border-radius: 10px; font-size: 14.5px; }
.links a.navBtn.fill { color: #000; background: rgba(96, 255, 120, 0.9); border: 1px solid var(--line2); }
.links a.navBtn.fill:hover { background: rgba(96, 255, 120, 0.9); opacity: 0.85; }
.links:has(.navBtn) { gap: 8px; }

@media (max-width: 640px) {
  .brandText { display: none; }
  .brandIcon { width: 32px; height: 20px; }
}

.siteFoot { position: relative; z-index: 1; margin-top: 140px; padding: 56px 0 40px; border-top: 1px solid var(--line); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.footGrid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footBrand p { margin-top: 12px; max-width: 260px; color: var(--dim); font-size: 14px; line-height: 1.55; }
.footBrand .brand { margin-left: -8px; }
.siteFoot nav { display: grid; gap: 10px; align-content: start; }
.siteFoot h4 { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.siteFoot nav a { color: var(--silver); font-size: 14px; text-decoration: none; }
.siteFoot nav a:hover { color: var(--white); }
.footBottom { margin-top: 48px; color: var(--dim); font-size: 13px; }
@media (max-width: 720px) {
  .footGrid { grid-template-columns: 1fr 1fr; }
  .footBrand { grid-column: 1 / -1; }
  .siteFoot .brandText { display: inline; }
}
