/* Six restrained color studies share Midnight's semantic surface tokens. */
:root[data-design="midnight"],
:root[data-palette="carbon"] {
  --bg: #101111;
  --surface: #202225;
  --surface-raised: #313439;
  --input: #15181c;
  --ink: #f3f1ed;
  --muted: #c6c3c7;
  --subtle: #b3b0b8;
  --line: #44454b;
  --accent: #c9bda6;
  --accent-ink: #25211b;
  --accent-tint: #3a3440;
  --blue: #a8bfd8;
  --amber: #c4afe8;
  --heading-surface: #292731;
  --form-surface: #262b31;
  --output-surface: #131619;
  --hero-surface: #27252a;
  --tile-word: #302a38;
  --tile-subnet: #28333f;
  --tile-key: #302f2c;
  --purple: var(--accent);
  --orange: var(--amber);
  --scrim: #030710bb;
}
:root[data-palette="slate"] {
  --bg: #1b2027;
  --surface: #28303b;
  --surface-raised: #364252;
  --input: #1c2531;
  --ink: #f3f5f8;
  --muted: #bfccd9;
  --subtle: #acbbcd;
  --line: #495565;
  --accent: #c4b4f0;
  --accent-ink: #231e32;
  --accent-tint: #42394e;
  --blue: #a5c5e7;
  --amber: #e5c494;
  --heading-surface: #343b4d;
  --form-surface: #2b3440;
  --output-surface: #1b2532;
  --hero-surface: #343039;
  --tile-word: #3b3547;
  --tile-subnet: #2d3e50;
  --tile-key: #34363a;
}
:root[data-palette="nebula"] {
  --bg: #0c1019;
  --surface: #1b2130;
  --surface-raised: #323447;
  --input: #111929;
  --ink: #f4effb;
  --muted: #bcc1d7;
  --subtle: #adb2cc;
  --line: #41465d;
  --accent: #ceb3f4;
  --accent-ink: #271535;
  --accent-tint: #3b294e;
  --blue: #87bdec;
  --amber: #e9b8a0;
  --heading-surface: #332640;
  --form-surface: #1b2c40;
  --output-surface: #11141f;
  --hero-surface: #222644;
  --tile-word: #38283f;
  --tile-subnet: #233a50;
  --tile-key: #302c39;
}
/* Pewter: silver-gray surfaces with steel blue and quiet lavender accents. */
:root[data-palette="pewter"] {
  --bg: #1b1f24;
  --surface: #292e34;
  --surface-raised: #3c444d;
  --input: #20252c;
  --ink: #f3f4f7;
  --muted: #c7cdd6;
  --subtle: #b1bbc9;
  --line: #505a65;
  --accent: #c3badb;
  --accent-ink: #241e30;
  --accent-tint: #3d384b;
  --blue: #b0c7dc;
  --amber: #d0c1ac;
  --heading-surface: #38404a;
  --form-surface: #252b31;
  --output-surface: #171c23;
  --hero-surface: #30363d;
  --tile-word: #383440;
  --tile-subnet: #2e3c48;
  --tile-key: #373737;
}
/* Dusk: warm charcoal, softened plum, and copper details. */
:root[data-palette="dusk"] {
  --bg: #191517;
  --surface: #292428;
  --surface-raised: #3d353c;
  --input: #201c20;
  --ink: #f8f0eb;
  --muted: #d1c3c3;
  --subtle: #beafb9;
  --line: #5a4953;
  --accent: #dbb79f;
  --accent-ink: #302019;
  --accent-tint: #47353a;
  --blue: #c2bddb;
  --amber: #d9bcab;
  --heading-surface: #3b303a;
  --form-surface: #2d2928;
  --output-surface: #1d1e23;
  --hero-surface: #30292c;
  --tile-word: #3a2d37;
  --tile-subnet: #2b323d;
  --tile-key: #393028;
}
/* Mineral: stone neutrals, slate blue panels, and dusty violet. */
:root[data-palette="mineral"] {
  --bg: #222322;
  --surface: #30332f;
  --surface-raised: #454a48;
  --input: #282c2e;
  --ink: #f5f3ee;
  --muted: #d1d0c9;
  --subtle: #c0c1c3;
  --line: #555d60;
  --accent: #c7bdd9;
  --accent-ink: #282131;
  --accent-tint: #46404e;
  --blue: #b7cadd;
  --amber: #d2c5ac;
  --heading-surface: #3a4550;
  --form-surface: #343633;
  --output-surface: #242b32;
  --hero-surface: #403b44;
  --tile-word: #45404b;
  --tile-subnet: #374653;
  --tile-key: #434139;
}
:root[data-design="midnight"][data-theme="light"],
:root[data-palette="carbon"][data-theme="light"] {
  --bg: #eeede9;
  --surface: #fffdfa;
  --surface-raised: #e8e6e2;
  --input: #faf9f7;
  --ink: #282829;
  --muted: #5b5960;
  --subtle: #635e67;
  --line: #cecad0;
  --accent: #65516f;
  --accent-ink: #fff;
  --accent-tint: #e6dee8;
  --blue: #48617e;
  --amber: #735098;
  --heading-surface: #e5dfe7;
  --form-surface: #fbfaf7;
  --output-surface: #e7e9ec;
  --hero-surface: #e7e2db;
  --tile-word: #e6dfea;
  --tile-subnet: #dfe6ee;
  --tile-key: #e7e3da;
  --purple: var(--accent);
  --orange: var(--amber);
  --scrim: #101b3499;
}
:root[data-palette="slate"][data-theme="light"] {
  --bg: #e7e8eb;
  --surface: #f7f8fa;
  --input: #fafbfe;
  --accent: #66527e;
  --accent-tint: #e2dae9;
  --blue: #425e80;
  --heading-surface: #d7dce5;
  --form-surface: #f4f5f7;
  --output-surface: #e3e8ef;
  --hero-surface: #e5dfe1;
  --tile-word: #e0d8e6;
  --tile-subnet: #d6e1ed;
  --tile-key: #e2e0df;
}
:root[data-palette="nebula"][data-theme="light"] {
  --bg: #eeedf4;
  --accent: #824da4;
  --accent-tint: #eedeef;
  --blue: #336491;
  --heading-surface: #e8ddef;
  --form-surface: #eef6fd;
  --output-surface: #fdfbff;
  --hero-surface: #dfe3f4;
  --tile-word: #eddef0;
  --tile-subnet: #daeaf7;
  --tile-key: #e6e0ec;
}

:root[data-palette="pewter"][data-theme="light"] {
  --bg: #e9edf0;
  --surface: #f9fafb;
  --surface-raised: #dfe5ec;
  --input: #fff;
  --ink: #242a33;
  --muted: #505b6a;
  --subtle: #566273;
  --line: #bec8d3;
  --accent: #68567f;
  --accent-tint: #e6dfed;
  --blue: #426481;
  --amber: #745c3d;
  --heading-surface: #dbe2e9;
  --form-surface: #f5f7f9;
  --output-surface: #e7edf3;
  --hero-surface: #e1e5e9;
  --tile-word: #e5dfeb;
  --tile-subnet: #dce7f0;
  --tile-key: #e7e5e1;
}
:root[data-palette="dusk"][data-theme="light"] {
  --bg: #eee8e5;
  --surface: #fffaf7;
  --surface-raised: #e7ddda;
  --input: #fffdfb;
  --ink: #35292d;
  --muted: #63545b;
  --subtle: #695861;
  --line: #d0bfc4;
  --accent: #875337;
  --accent-tint: #edddd4;
  --blue: #695883;
  --amber: #85523a;
  --heading-surface: #e6dbe3;
  --form-surface: #fcf6f0;
  --output-surface: #eeebef;
  --hero-surface: #e5d9d5;
  --tile-word: #e9dce4;
  --tile-subnet: #e0e3ec;
  --tile-key: #eddfd2;
}
:root[data-palette="mineral"][data-theme="light"] {
  --bg: #e7e6df;
  --surface: #f8f7f1;
  --surface-raised: #dcddd8;
  --input: #fdfdf8;
  --ink: #2d3234;
  --muted: #525e62;
  --subtle: #566068;
  --line: #bec5c4;
  --accent: #6b557f;
  --accent-tint: #e4dde9;
  --blue: #435f7a;
  --amber: #6f5d3e;
  --heading-surface: #d8e1e7;
  --form-surface: #f6f4eb;
  --output-surface: #e2e9eb;
  --hero-surface: #e1dce5;
  --tile-word: #e3dce9;
  --tile-subnet: #d5e1e8;
  --tile-key: #e6e0d3;
}

/* Compact illustrated intro replaces the former lower-page hero. */
.site-header {
  height: 70px;
}
.palette-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid #ffffff50;
  border-radius: 50%;
  flex: 0 0 auto;
}
.swatch-slate {
  background: linear-gradient(135deg, #c4b4f0 50%, #495565 50%);
}
.swatch-nebula {
  background: linear-gradient(135deg, #ceb3f4 50%, #233a50 50%);
}
.swatch-carbon {
  background: linear-gradient(135deg, #c9bda6 50%, #302a38 50%);
}
.swatch-pewter {
  background: linear-gradient(135deg, #c3badb 50%, #38404a 50%);
}
.swatch-dusk {
  background: linear-gradient(135deg, #dbb79f 50%, #3b303a 50%);
}
.swatch-mineral {
  background: linear-gradient(135deg, #b7cadd 50%, #403b44 50%);
}
.compact-hero.hero {
  margin: 0 0 18px;
  min-height: 120px;
  grid-template-columns: minmax(0, 1fr) 340px;
  padding: 15px 24px;
  gap: 20px;
  background: var(--hero-surface);
  overflow: hidden;
}
.compact-hero h1 {
  font-size: var(--text-31);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -1px;
}
.compact-hero h1 > span {
  color: var(--blue);
}
.compact-hero .eyebrow {
  color: var(--accent);
  margin-bottom: 5px;
}
.compact-hero .hero-description {
  margin-top: 8px;
  max-width: none;
  font-size: var(--text-12);
}
.compact-hero .hero-art {
  display: block;
  height: 90px;
}
.compact-hero .art-terminal {
  transform: translate(-50%, -50%) rotate(-5deg) scale(0.52);
  background: var(--input);
  border-color: var(--line);
}
.compact-hero .art-orbit {
  width: 140px;
  height: 140px;
  left: calc(50% - 70px);
  top: -25px;
}
.compact-hero .art-node {
  width: 26px;
  height: 26px;
  font-size: var(--text-14);
  color: var(--blue);
  background: var(--surface);
}
.compact-hero .node-one {
  top: 0;
  left: 16%;
}
.compact-hero .node-two {
  top: 5%;
  right: 14%;
}
.compact-hero .node-three {
  right: 24%;
  bottom: -5%;
  color: var(--accent);
}
.compact-hero .art-caption {
  display: none;
}
[data-design="midnight"] .tool-layout {
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
}
.tool-tile {
  text-decoration: none;
}
.tool-tile[data-tool="passphrases"] {
  background: var(--tile-word);
  --tile-accent: var(--accent);
}
.tool-tile[data-tool="subnets"] {
  background: var(--tile-subnet);
  --tile-accent: var(--blue);
}
.tool-tile[data-tool="keys"] {
  background: var(--tile-key);
  --tile-accent: var(--amber);
}
.tool-tile .tool-icon {
  color: var(--tile-accent);
  background: var(--input);
}
.tool-tile[aria-current="page"] {
  border-color: var(--tile-accent);
  box-shadow: inset 3px 0 var(--tile-accent);
}
.workspace-heading {
  background: var(--heading-surface);
}
.tool-form {
  background: var(--form-surface);
}
.output-panel {
  background: var(--output-surface);
}
.output-heading h3 {
  color: var(--blue);
}
.privacy-strip {
  margin-top: 16px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* One reusable copy action for keys, phrases, and labeled network fields. */
.copy-button {
  line-height: 1;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
}
.copy-button:hover {
  color: var(--accent);
  background: var(--accent-tint);
  border-color: var(--line);
}
.copy-button.is-copied {
  color: var(--blue);
  background: var(--surface-raised);
}
.copy-button.is-copied svg {
  display: none;
}
.copy-button.is-copied::after {
  content: "✓";
  font-size: var(--text-19);
}

/* Compact desktop rows retain a 24px copy target and all three labeled values. */

@media (max-width: 1050px) {
  [data-design="midnight"] .tool-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 14px;
  }
  .compact-hero.hero {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
  .compact-hero h1 {
    font-size: var(--text-27);
  }
}
@media (max-width: 820px) {
  [data-design="midnight"] .tool-layout {
    display: block;
  }
  .compact-hero.hero {
    padding: 14px 18px;
    min-height: 104px;
    grid-template-columns: minmax(0, 1fr) 160px;
  }
  .compact-hero .hero-description {
    font-size: var(--text-11);
  }
  .compact-hero .art-node {
    display: none;
  }
  .compact-hero .hero-art {
    height: 76px;
  }
  .tool-tile[aria-current="page"] {
    box-shadow: inset 0 3px var(--tile-accent);
  }
}
@media (max-width: 600px) {
  .site-header {
    height: 68px;
  }
  .compact-hero.hero {
    display: block;
    padding: 16px 18px;
    min-height: auto;
    margin-bottom: 18px;
  }
  .compact-hero h1 {
    font-size: var(--text-25);
    letter-spacing: -0.8px;
  }
  .compact-hero .hero-art {
    display: none;
  }
  .compact-hero .hero-description {
    max-width: 38ch;
    font-size: var(--text-12);
  }
  .copy-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
}
