:root {
  --bg: #151a1e;
  --panel: #232b32;
  --panel-soft: #1d262e;
  --border: #323e48;
  --border-strong: #496e8b;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-soft: rgba(88, 166, 255, 0.18);
  --gold: #ebc94d;
  --gold-bg: #875f22;
  --cyan: #29d6ff;
  --warm: #f9d49c;
  --red: #f85149;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}

/* Clockworks gear chain, top-right background ambience. Static: the site has stopped. */
.gears-bg {
  position: fixed;
  top: 0;
  right: 0;
  width: min(60vw, 520px);
  height: calc(min(60vw, 520px) * 420 / 360);
  pointer-events: none;
  z-index: -1;
  color: var(--text);
  opacity: 0.1;
  -webkit-mask-image: radial-gradient(ellipse at top right, black 80%, transparent 100%);
  mask-image: radial-gradient(ellipse at top right, black 80%, transparent 100%);
}

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

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font: 14px/1.4 "Bahnschrift", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  isolation: isolate;
}

header {
  padding: 28px 24px 8px;
  position: relative;
  text-align: center;
}

header h1 {
  margin: -0.3em auto;
  font-size: clamp(22px, 7.5vw, 96px);
  line-height: 1;
  font-weight: 1000;
  font-variation-settings: "wght" 1000;
  font-style: italic;
  text-transform: uppercase;
  color: rgba(76, 102, 116, 0.7);
  text-shadow: 0 0 16px rgba(76, 102, 116, 0.18);
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0.4) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0.4) 100%);
  user-select: none;
}

.tagline {
  margin: clamp(8px, 4vw, 48px) 0 0;
  font-size: 32px;
  font-weight: 200;
  font-stretch: condensed;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
  opacity: 0.275;
}

main {
  flex: 1 1 auto;
  padding: 32px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* The notice panel: same chrome as the old tool cards, red wash from the top-left. */
.notice {
  position: relative;
  width: 100%;
  max-width: 800px;
  padding: 22px 26px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  --card-hue: var(--red);
  --card-tint: rgba(248, 81, 73, 0.32);
}

.notice::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-tint) 0%, transparent 55%);
  opacity: 0.35;
  pointer-events: none;
}

.notice > * {
  position: relative;
  z-index: 1;
}

.notice h2 {
  margin: 0 0 12px;
  font-size: 26.4px;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--red);
}

.notice p {
  margin: 0 0 12px;
  font-size: 16.8px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
}

/* Inline links in the notice text: cyan like the archive card title, no underline. */
.notice p a:not(.archive-link) {
  color: var(--cyan);
  font-weight: 500;
  text-decoration: none;
}

.notice p a:not(.archive-link):hover {
  text-decoration: underline;
}

/* External-link marker after the text, scaled to the line and baseline-aligned. */
.notice p a:not(.archive-link)::after {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.3em;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask: url("/OpenInTab.png") center / contain no-repeat;
  mask: url("/OpenInTab.png") center / contain no-repeat;
}

.notice .thanks {
  margin: 18px 0 0;
  font-size: 16px;
  color: var(--muted);
}

/* Archive call-to-action: a card-shaped link with the energy-cyan accent. */
.archive-link {
  display: block;
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--panel-soft);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  --card-hue: var(--cyan);
  transition: transform 0.12s ease-out, border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.archive-link:hover {
  border-color: var(--card-hue);
  background: #28323a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.archive-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.archive-link:active {
  transform: translateY(0);
}

.archive-link-title {
  display: block;
  font-size: 21.6px;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--card-hue);
  margin-bottom: 4px;
}

.archive-link-sub {
  display: block;
  font-size: 15.6px;
  color: var(--muted);
  line-height: 1.35;
}

/* footer: grid anchors disclaimer + robot to the bottom edge naturally */
.page-footer {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
}

.offline-bg {
  position: absolute;
  bottom: 0;
  right: 83px;
  z-index: 1;
  font-size: 75px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  font-family: "Bahnschrift", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-transform: uppercase;
  color: rgba(95, 102, 108, 0.35);
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.1) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.1) 100%);
}

.robot-bg {
  grid-column: 2;
  display: block;
  width: 72px;
  height: auto;
  margin-right: 16px;
  z-index: 10;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.6)) grayscale(0.6);
}

.brand {
  position: absolute;
  bottom: 0;
  right: 80px;
  z-index: 11;
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

.disclaimer {
  padding: 0 16px 8px;
  max-width: 800px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  user-select: none;
}

.disclaimer p {
  margin: 0 0 3px;
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  header {
    padding: 20px 16px 6px;
  }

  header h1 {
    -webkit-mask-image: none;
    mask-image: none;
  }

  main {
    padding: 20px 12px;
  }

  .notice {
    padding: 16px 16px 18px;
  }

  .notice h2 { font-size: 21.6px; }
  .notice p { font-size: 15.6px; }

  .offline-bg,
  .robot-bg,
  .brand {
    display: none;
  }

  .disclaimer {
    max-width: none;
    padding: 4px 16px 16px;
  }
}
