:root {
  --bg: #07110d;
  --panel: #0d1b15;
  --panel-2: #10231b;
  --ink: #ecfff5;
  --muted: #95b6a7;
  --line: rgba(151, 255, 194, 0.18);
  --grid: rgba(151, 255, 194, 0.08);
  --green: #76ffb2;
  --green-2: #19c37d;
  --amber: #f7c948;
  --danger: #ff7b72;
  --white: #ffffff;
  --header-bg: rgba(7, 17, 13, 0.88);
  --field-bg: rgba(13, 27, 21, 0.94);
  --dropdown-bg: rgba(7, 17, 13, 0.96);
  --surface-bg: rgba(13, 27, 21, 0.86);
  --button-bg: rgba(16, 35, 27, 0.9);
  --badge-bg: rgba(7, 17, 13, 0.9);
  --soft-green: rgba(118, 255, 178, 0.1);
  --soft-amber: rgba(247, 201, 72, 0.13);
  --shadow: rgba(0, 0, 0, 0.22);
  --strong-shadow: rgba(0, 0, 0, 0.32);
  --logo-glow: rgba(118, 255, 178, 0.16);
  --primary-ink: #04100b;
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

:root[data-theme="bright"] {
  --bg: #f5fff9;
  --panel: #ffffff;
  --panel-2: #eaf8f0;
  --ink: #07110d;
  --muted: #49675a;
  --line: rgba(13, 108, 72, 0.18);
  --grid: rgba(13, 108, 72, 0.08);
  --green: #087d54;
  --green-2: #18b976;
  --amber: #b88700;
  --danger: #b42318;
  --header-bg: rgba(245, 255, 249, 0.9);
  --field-bg: rgba(255, 255, 255, 0.94);
  --dropdown-bg: rgba(255, 255, 255, 0.98);
  --surface-bg: rgba(255, 255, 255, 0.88);
  --button-bg: rgba(234, 248, 240, 0.94);
  --badge-bg: rgba(255, 255, 255, 0.94);
  --soft-green: rgba(24, 185, 118, 0.12);
  --soft-amber: rgba(184, 135, 0, 0.13);
  --shadow: rgba(31, 76, 55, 0.14);
  --strong-shadow: rgba(31, 76, 55, 0.2);
  --logo-glow: rgba(24, 185, 118, 0.22);
  --primary-ink: #04100b;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5fff9;
    --panel: #ffffff;
    --panel-2: #eaf8f0;
    --ink: #07110d;
    --muted: #49675a;
    --line: rgba(13, 108, 72, 0.18);
    --grid: rgba(13, 108, 72, 0.08);
    --green: #087d54;
    --green-2: #18b976;
    --amber: #b88700;
    --danger: #b42318;
    --header-bg: rgba(245, 255, 249, 0.9);
    --field-bg: rgba(255, 255, 255, 0.94);
    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --surface-bg: rgba(255, 255, 255, 0.88);
    --button-bg: rgba(234, 248, 240, 0.94);
    --badge-bg: rgba(255, 255, 255, 0.94);
    --soft-green: rgba(24, 185, 118, 0.12);
    --soft-amber: rgba(184, 135, 0, 0.13);
    --shadow: rgba(31, 76, 55, 0.14);
    --strong-shadow: rgba(31, 76, 55, 0.2);
    --logo-glow: rgba(24, 185, 118, 0.22);
    --primary-ink: #04100b;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(118, 255, 178, 0.18), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(247, 201, 72, 0.12), transparent 30%),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 56px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(235px, 30vw, 355px);
  height: auto;
  filter: drop-shadow(0 0 18px var(--logo-glow));
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
}

nav a {
  text-decoration: none;
}

nav a:hover,
nav a.active {
  color: var(--green);
}
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-bg);
}

.theme-switcher button {
  min-width: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  padding: 8px 10px;
  text-transform: uppercase;
}

.theme-switcher button:hover,
.theme-switcher button.active {
  background: var(--soft-green);
  color: var(--green);
}

.theme-switcher button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.hero,
.page-hero,
.tools-section,
.tool-shell,
.content-section {
  padding: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 56px);
}

.hero {
  display: flex;
  align-items: center;
  min-height: min(680px, calc(72vh - 84px));
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.9fr);
  gap: clamp(16px, 4vw, 64px);
  min-height: auto;
  padding-bottom: clamp(8px, 2vw, 18px);
}

.hero-signal-card {
  position: relative;
  align-self: center;
  min-height: clamp(190px, 22vw, 236px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 18%, var(--soft-green), transparent 34%),
    linear-gradient(145deg, var(--surface-bg), var(--field-bg));
  box-shadow: 0 28px 80px var(--shadow);
  padding: clamp(14px, 2.2vw, 24px);
}

.signal-orbit {
  position: absolute;
  inset: auto -74px -96px auto;
  width: 190px;
  height: 190px;
  border: 1px solid var(--line);
  border-radius: 999px;
  animation: signalSpin 18s linear infinite;
}

.signal-orbit::before,
.signal-orbit::after {
  position: absolute;
  border-radius: 999px;
  content: "";
}

.signal-orbit::before {
  inset: 42px;
  border: 1px dashed var(--line);
}

.signal-orbit::after {
  top: 18px;
  left: 50%;
  width: 14px;
  height: 14px;
  background: var(--amber);
  box-shadow: 0 0 24px var(--amber);
}

.signal-frame {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
}

.signal-frame img {
  width: clamp(72px, 8vw, 92px);
  height: clamp(72px, 8vw, 92px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px var(--shadow);
}

.signal-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signal-frame h2 {
  max-width: 100%;
  font-size: clamp(1.25rem, 2.2vw, 2.15rem);
  line-height: 1.02;
}

.signal-frame p:last-child {
  max-width: 100%;
  color: var(--muted);
  line-height: 1.65;
}

.signal-refresh {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--green);
  cursor: pointer;
  font-weight: 950;
  padding: 10px 14px;
}

.signal-refresh::before {
  content: "↻";
  font-size: 1rem;
}

.signal-refresh:hover {
  border-color: var(--green);
  background: var(--soft-green);
}

@keyframes signalSpin {
  to {
    transform: rotate(360deg);
  }
}

.page-hero {
  max-width: 1180px;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4.05rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.8rem);
  line-height: 1;
}

h3 {
  margin: 9px 0;
  font-size: 1.22rem;
}

.hero-text,
.page-text,
.tool-card p,
.tool-panel p,
.content-section p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-text,
.page-text {
  max-width: 760px;
  font-size: 1.12rem;
  margin-bottom: 18px;
}

.search-box {
  position: relative;
  display: flex;
  max-width: 740px;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field-bg);
  box-shadow: 0 22px 60px var(--shadow);
}

.tool-finder {
  position: relative;
  width: 100%;
  min-width: 0;
}

.search-box input,
textarea,
select,
input[type="file"] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--dropdown-bg);
  color: var(--ink);
  padding: 13px;
  outline: 0;
}

.search-box input {
  border: 0;
  background: transparent;
  padding: 14px;
}

textarea {
  resize: vertical;
}

.tool-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  z-index: 40;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--dropdown-bg);
  box-shadow: 0 24px 50px var(--strong-shadow);
}

.suggestion-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 13px 14px;
  text-align: left;
}

.suggestion-item:last-child {
  border-bottom: 0;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: var(--soft-green);
}

.suggestion-item strong,
.suggestion-item small {
  display: block;
}

.suggestion-item small {
  color: var(--muted);
  font-weight: 700;
}

.suggestion-status,
.tag {
  width: fit-content;
  border-radius: 999px;
  background: rgba(118, 255, 178, 0.12);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
  padding: 6px 9px;
  text-transform: uppercase;
}

.suggestion-status.planned,
.tag.planned {
  background: var(--soft-amber);
  color: var(--amber);
}

button,
.button,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  padding: 11px 14px;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

button:hover,
.button:hover,
.download-link:hover {
  border-color: rgba(118, 255, 178, 0.68);
}

.primary {
  border-color: rgba(118, 255, 178, 0.65);
  background: linear-gradient(135deg, var(--green-2), #0f8f62);
  color: var(--primary-ink);
}

.tool-panel,
.tool-card,
.ad-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-bg);
  box-shadow: 0 22px 60px var(--shadow);
}

.ad-band {
  display: grid;
  min-height: 48px;
  margin: 0 clamp(18px, 4vw, 56px) clamp(8px, 1.5vw, 16px);
  place-items: center;
  border-style: dashed;
  color: var(--muted);
  font-weight: 900;
}


.category-tabs,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.category-tabs {
  margin-bottom: 24px;
}

.category-tabs .active {
  border-color: rgba(118, 255, 178, 0.68);
  color: var(--green);
}

.home-tools-section {
  padding-top: clamp(4px, 1vw, 12px);
}

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

.tool-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 220px;
  padding: 18px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.tool-card:hover {
  border-color: rgba(118, 255, 178, 0.62);
  box-shadow: 0 24px 70px rgba(118, 255, 178, 0.11);
  transform: translateY(-2px);
}



.tool-card-action {
  display: inline-grid;
  align-self: end;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(118, 255, 178, 0.35);
  border-radius: 8px;
  background: var(--soft-green);
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.tool-card:hover .tool-card-action {
  border-color: rgba(118, 255, 178, 0.8);
  background: rgba(118, 255, 178, 0.18);
  transform: translateX(2px);
}

.tool-card-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.tool-shell {
  display: grid;
  gap: 12px;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1.55fr);
  gap: 24px;
  padding: clamp(18px, 3vw, 30px);
}

.tool-controls {
  display: grid;
  gap: 12px;
}

.code-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-action-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--green);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 950;
  padding: 8px 12px;
  text-transform: none;
}

.code-action-row button:hover {
  border-color: var(--green);
  background: var(--soft-green);
}

.output-box {
  min-height: 92px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--dropdown-bg);
  color: var(--ink);
  padding: 12px;
  white-space: pre-wrap;
}

.notepad-input {
  min-height: 58vh;
  line-height: 1.65;
}

.notepad-shell {
  padding-top: clamp(16px, 3vw, 32px);
}

.notepad-panel {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: clamp(14px, 2vw, 20px);
}

.notepad-summary {
  max-width: 980px;
}

.notepad-summary h1 {
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  line-height: 1.05;
}

.notepad-summary p {
  max-width: 920px;
  margin: 6px 0 0;
  line-height: 1.5;
}

.notepad-panel .tool-controls {
  gap: 8px;
}

.notepad-panel .notepad-input {
  min-height: min(78vh, 900px);
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.content-section {
  max-width: 980px;
}

.content-section ul {
  color: var(--muted);
  line-height: 1.8;
}


.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--green);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    gap: clamp(14px, 3vw, 34px);
  }

  .hero-signal-card {
    align-self: stretch;
  }

  .signal-frame {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .site-header,
  .site-footer,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

  .hero,
  .home-hero,
  .tool-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero,
  .page-hero,
  .tools-section,
  .tool-shell,
  .content-section {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .home-hero {
    gap: 16px;
    padding-bottom: 8px;
  }

  .hero-signal-card {
    min-height: auto;
  }

  .signal-frame {
    grid-template-columns: 1fr;
  }

  .home-tools-section {
    padding-top: 4px;
  }

  .notepad-shell {
    padding-top: 12px;
  }

  .notepad-panel {
    gap: 8px;
    padding: 10px;
  }

  .notepad-summary p {
    margin-top: 3px;
  }

  .notepad-panel .notepad-input {
    min-height: 76vh;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}

.bottom-ad {
  margin-top: clamp(8px, 2vw, 18px);
  margin-bottom: clamp(14px, 3vw, 28px);
}


@media (max-width: 640px) {
  .hero-signal-card {
    padding: 14px;
  }

  .signal-frame {
    grid-template-columns: auto 1fr;
  }

  .signal-refresh {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .signal-frame {
    grid-template-columns: 1fr;
  }
}
