:root {
  color-scheme: dark;
  --ink: #f3f7ff;
  --muted: #9eabc0;
  --dim: #657086;
  --background: #09111f;
  --panel: #101b2d;
  --panel-strong: #15243a;
  --border: #263955;
  --accent: #79a9ff;
  --red: #ff6f7f;
  --green: #50dc9a;
  --blue: #6ea8ff;
  --result-color: #ad93b7;
  --result-ink: #10131a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(121, 169, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121, 169, 255, 0.035) 1px, transparent 1px),
    var(--background);
  background-size: 32px 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.site-footer,
.hub-shell,
.color-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}



.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.wordmark > span {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #41618d;
  background: #132540;
  color: #a8c7ff;
  font-family: "Arial Black", Impact, sans-serif;
  transform: rotate(-4deg);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header nav a {
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-header nav a[aria-current="page"] {
  background: var(--panel-strong);
  color: var(--ink);
  outline: none;
}

.hub-shell {
  padding-block: clamp(62px, 10vw, 120px) 90px;
}

.hub-intro {
  max-width: 760px;
  margin-bottom: clamp(44px, 7vw, 76px);
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  margin-bottom: 18px;
  font-family: "Arial Black", Impact, ui-sans-serif, sans-serif;
  font-size: clamp(3.4rem, 10vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.hub-intro > p:last-child,
.workspace-copy > p:last-child {
  max-width: 670px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(24px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  transition: transform 160ms ease, border-color 160ms ease;
}

a.tool-card:hover,
a.tool-card:focus-visible {
  border-color: #6f9fe5;
  transform: translateY(-4px);
  outline: none;
}

.tool-card--color {
  position: relative;
  isolation: isolate;
}

.tool-card--color::after {
  position: absolute;
  z-index: -1;
  right: -60px;
  bottom: -88px;
  width: 290px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 20deg, #ff5f70, #69df9d, #6ea8ff, #ff5f70);
  filter: blur(4px);
  opacity: 0.7;
  content: "";
}

.tool-card--muted {
  color: #aeb8c8;
  background: rgba(16, 27, 45, 0.7);
}

.tool-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.status {
  padding: 5px 8px;
  border: 1px solid #344762;
  border-radius: 999px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.77rem;
  font-weight: 800;
}

.status--live {
  border-color: rgba(80, 220, 154, 0.45);
  color: #8ff2bf;
  background: rgba(80, 220, 154, 0.08);
}

.tool-card h2 {
  max-width: 490px;
  margin-bottom: 14px;
  font-family: "Arial Black", Impact, ui-sans-serif, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.tool-card p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.tool-card__action {
  font-weight: 800;
}

.site-footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
}

.color-page {
  background:
    radial-gradient(circle at 76% 8%, color-mix(in srgb, var(--result-color) 26%, transparent), transparent 32rem),
    linear-gradient(rgba(121, 169, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121, 169, 255, 0.035) 1px, transparent 1px),
    var(--background);
  background-size: auto, 32px 32px, 32px 32px, auto;
  transition: background 180ms ease;
}

.color-shell {
  padding-block: clamp(48px, 8vw, 92px) 82px;
}

.color-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: clamp(34px, 7vw, 88px);
  align-items: end;
}

.workspace-copy {
  grid-column: 1;
}

.workspace-copy h1 {
  max-width: 700px;
  font-size: clamp(3rem, 7.5vw, 6.6rem);
}

.name-field {
  grid-column: 1;
  display: grid;
  gap: 10px;
}

.name-field > span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.name-field input {
  width: 100%;
  min-height: 66px;
  padding: 14px 18px;
  border: 1px solid #385073;
  border-radius: 11px;
  outline: 0;
  background: #0e192a;
  color: var(--ink);
  font: inherit;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 750;
}

.name-field input:focus {
  border-color: var(--result-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--result-color) 24%, transparent);
}

.color-result {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--result-color) 58%, #ffffff 10%);
  border-radius: 22px;
  background: #0d1727;
  box-shadow: 0 32px 80px color-mix(in srgb, var(--result-color) 23%, transparent);
}

.color-result__swatch {
  flex: 1;
  min-height: 230px;
  background: var(--result-color);
  transition: background-color 140ms ease;
}

.color-result__values {
  padding: 26px 30px 29px;
  background: var(--result-color);
  color: var(--result-ink);
  transition: background-color 140ms ease, color 140ms ease;
}

.color-result__label {
  margin-bottom: 4px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.68;
}

#hex-output {
  display: block;
  font-family: "Arial Black", Impact, ui-sans-serif, sans-serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

#rgb-output {
  margin: 10px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.72;
}

.breakdown {
  margin-top: clamp(68px, 10vw, 120px);
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 25px;
}

.section-heading h2 {
  max-width: 620px;
  margin-bottom: 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading code {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: var(--panel);
  font-size: 0.82rem;
  white-space: nowrap;
}

.channel-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.channel-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-top-width: 3px;
  border-radius: 13px;
  background: var(--panel);
}

.channel-card--r { border-top-color: var(--red); }
.channel-card--g { border-top-color: var(--green); }
.channel-card--b { border-top-color: var(--blue); }

.channel-card__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.channel-card__heading h3 {
  margin: 0;
  font-size: 1rem;
}

.channel-badge {
  display: grid;
  width: 30px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 7px;
  background: #213149;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 900;
}

.channel-card--r .channel-badge { color: var(--red); }
.channel-card--g .channel-badge { color: var(--green); }
.channel-card--b .channel-badge { color: var(--blue); }

.character-list {
  min-height: 85px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.character-chip {
  min-width: 45px;
  overflow: hidden;
  border: 1px solid #31445f;
  border-radius: 7px;
  background: #0d1828;
  text-align: center;
}

.character-chip__glyph,
.character-chip__value {
  display: block;
}

.character-chip__glyph {
  min-height: 35px;
  padding: 6px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.character-chip__value {
  padding: 3px 5px 4px;
  border-top: 1px solid #263750;
  color: var(--muted);
  background: #132136;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.character-list__empty {
  color: var(--dim);
  font-size: 0.88rem;
}

.channel-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.channel-total strong {
  color: var(--ink);
  font-size: 1.5rem;
}

@media (max-width: 760px) {
  .site-header,
  .site-footer,
  .hub-shell,
  .color-shell {
    width: min(100% - 28px, 680px);
  }

  .site-header {
    min-height: 68px;
  }

  .wordmark strong {
    display: none;
  }

  .tool-grid,
  .channel-list,
  .color-workspace {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 280px;
  }

  .workspace-copy,
  .name-field,
  .color-result {
    grid-column: 1;
  }

  .color-result {
    grid-row: auto;
    min-height: 340px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .channel-card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
.obfuscate {
  color: transparent;
  text-shadow: 0 0 4px var(--dim);
  font-family: monospace;
  user-select: none;
  white-space: pre;
}
.breakdown-disclosure {
  display: block;
  margin-top: clamp(6rem, 12vw, 10rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.breakdown-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--panel);
  cursor: pointer;
  list-style: none;
}

.breakdown-disclosure > summary::-webkit-details-marker {
  display: none;
}

.breakdown-disclosure .breakdown {
  margin-top: 0;
  padding-top: 2rem;
  border-top: 0;
}

.disclosure-arrow {
  transition: transform 160ms ease;
}

.breakdown-disclosure[open] .disclosure-arrow {
  transform: rotate(180deg);
}

.bmc-small {
  zoom: 0.5;
  margin-left: auto;
}