:root {
  color-scheme: light;
  font-family:
    Inter, Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --bg: #fff;
  --surface: #fff;
  --surface-2: #fff;
  --surface-3: #fff;
  --text: #09090b;
  --muted: #52525b;
  --faint: #71717a;
  --border: #e4e4e7;
  --border-soft: #ededed;
  --button: #09090b;
  --button-text: #fff;
  --button-hover-overlay: rgb(255 255 255 / 10%);
  --admin-borderless-hover-bg: rgb(9 9 11 / 6%);
  --shadow: 0 18px 48px rgb(0 0 0 / 10%);
  --topbar-height: 74px;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 780;
  --page-max: 1400px;
  --page-gutter: clamp(16px, 4vw, 56px);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #fff;
  --surface: #fff;
  --surface-2: #fff;
  --surface-3: #fff;
  --text: #09090b;
  --muted: #52525b;
  --faint: #71717a;
  --border: #e4e4e7;
  --border-soft: #ededed;
  --button: #09090b;
  --button-text: #fff;
  --button-hover-overlay: rgb(255 255 255 / 10%);
  --admin-borderless-hover-bg: rgb(9 9 11 / 6%);
  --shadow: 0 18px 48px rgb(0 0 0 / 10%);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #18181b;
  --surface-2: #18181b;
  --surface-3: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;
  --border: rgb(255 255 255 / 10%);
  --border-soft: rgb(255 255 255 / 8%);
  --button: #f5f5f5;
  --button-text: #09090b;
  --button-hover-overlay: rgb(9 9 11 / 8%);
  --admin-borderless-hover-bg: rgb(255 255 255 / 8%);
  --shadow: 0 16px 40px rgb(0 0 0 / 32%);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  appearance: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.page-shell {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  display: flex;
  width: min(100%, var(--page-max));
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  align-items: center;
  gap: clamp(8px, 0.9vw, 14px);
  margin: 0 auto;
  padding: 10px var(--page-gutter);
}

.header-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(16px, 2vw, 36px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: min(38vw, 540px);
  overflow: hidden;
  color: var(--text);
  font-size: 24px;
  font-weight: var(--weight-bold);
  letter-spacing: 0;
}

.brand img {
  box-sizing: border-box;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #050505;
  box-shadow: var(--shadow);
}

.brand > span:last-child {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 20px);
  margin-left: clamp(2px, 0.6vw, 12px);
}

.main-nav a {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 8px 6px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
  transition:
    background 0.24s ease,
    color 0.2s ease;
}

.main-nav a:hover {
  background: var(--admin-borderless-hover-bg);
}

.main-nav a.is-active::after {
  position: absolute;
  right: 50%;
  bottom: 3px;
  width: 58%;
  height: 2.5px;
  border-radius: 999px;
  background: var(--text);
  content: "";
  transform: translateX(50%);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.language-switcher {
  position: relative;
  display: inline-flex;
}

.language-menu,
.theme-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 28px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 174px;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px;
  box-shadow: 0 10px 26px rgb(0 0 0 / 14%);
}

.language-menu[hidden],
.theme-menu[hidden] {
  display: none;
}

.language-option,
.theme-option {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  font-size: 16px;
  font-weight: var(--weight-medium);
  line-height: 1.15;
  text-align: left;
  white-space: nowrap;
}

.language-option:hover,
.theme-option:hover {
  background: var(--admin-borderless-hover-bg);
}

.language-option.is-active,
.theme-option.is-active {
  background: transparent;
}

.theme-switcher {
  position: relative;
  display: inline-flex;
}

.language-option .check-icon,
.theme-option .check-icon {
  width: 16px;
  height: 16px;
  opacity: 0;
}

.language-option.is-active .check-icon,
.theme-option.is-active .check-icon {
  opacity: 1;
}

.search-trigger {
  display: inline-flex;
  width: min(24vw, 340px);
  min-width: 228px;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--faint);
  padding: 0 10px 0 14px;
  text-align: left;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.search-trigger:hover {
  background: var(--admin-borderless-hover-bg);
}

.search-trigger span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--faint);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-shortcut {
  display: inline-flex;
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn,
.btn,
.tab,
.tag-pill,
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.icon-btn {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.icon-btn:hover {
  background: var(--admin-borderless-hover-bg);
}

.main {
  min-height: calc(100vh - var(--topbar-height));
}

.container {
  width: min(100%, var(--page-max));
  margin: 0 auto;
  overflow: hidden;
  padding: 40px var(--page-gutter) 0;
}

.page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  align-items: start;
  gap: 28px;
  min-width: 0;
  padding: 16px 0 30px;
  text-align: left;
}

.page-title > div {
  min-width: 0;
}

.page-title h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 4.8vw, 82px);
  font-weight: var(--weight-heavy);
  line-height: 1.02;
}

.page-title p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.1vw, 19px);
  line-height: 1.6;
}

.hero-side-card {
  display: grid;
  width: 100%;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.hero-side-card strong {
  font-size: 15px;
}

.hero-side-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.tool-directory {
  display: grid;
  gap: 18px;
  margin-bottom: 42px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 2.4vw, 42px);
  font-weight: var(--weight-bold);
  line-height: 1.05;
}

.section-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

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

.directory-card {
  display: grid;
  min-width: 0;
  min-height: 292px;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 18px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.directory-card:hover,
.directory-card.is-active {
  border-color: var(--faint);
  background: var(--surface);
  transform: translateY(-2px);
}

.directory-card.is-active {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--text) 42%, transparent),
    0 2px 8px rgb(0 0 0 / 8%);
}

.directory-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.tool-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #050505;
  color: #fff;
}

.directory-card h3 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: var(--weight-bold);
  line-height: 1.25;
}

.directory-card p {
  display: -webkit-box;
  min-height: 88px;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.directory-action {
  width: 100%;
  margin-top: auto;
}

.tool-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 22px clamp(18px, 2vw, 28px);
  align-items: start;
}

.tool-main {
  order: 1;
  min-width: 0;
}

.tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 5px;
}

.tab {
  min-height: 36px;
  min-width: 148px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-size: 14px;
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.tab:hover {
  background: var(--admin-borderless-hover-bg);
  color: var(--text);
}

.tab.is-active {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.card,
.info-card,
.result-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.tool-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
}

.tool-preview {
  position: relative;
  display: grid;
  min-height: 168px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.tool-preview::after {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(
    90deg,
    #ff4f4f 0%,
    #ffd166 28%,
    #74f26d 52%,
    #52d7ff 76%,
    #4d8dff 100%
  );
  content: "";
}

.tool-preview-art {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.tool-preview-art::before,
.tool-preview-art::after {
  content: "";
}

.tool-preview-art::before {
  background:
    radial-gradient(circle at 26% 28%, rgb(255 63 145 / 22%), transparent 25%),
    radial-gradient(circle at 70% 82%, rgb(82 215 255 / 18%), transparent 32%),
    #fff;
}

.tool-preview-art::after {
  display: none;
}

html[data-theme="dark"] .tool-preview-art::before {
  background:
    radial-gradient(circle at 26% 28%, rgb(255 63 145 / 28%), transparent 25%),
    radial-gradient(circle at 70% 82%, rgb(82 215 255 / 24%), transparent 32%),
    #f8fafc;
}

.tool-preview-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 12px;
  width: min(100%, 760px);
  padding: clamp(22px, 4vw, 44px);
}

.tool-preview-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: var(--weight-bold);
}

.tool-preview-content h2 {
  margin: 0;
  color: #09090b;
  font-size: clamp(30px, 3vw, 48px);
  font-weight: var(--weight-heavy);
  line-height: 1.04;
}

.tool-preview-content p {
  max-width: 620px;
  margin: 0;
  color: #3f3f46;
  font-size: 16px;
  line-height: 1.55;
}

.card-header {
  display: none;
}

.card-content {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.input-wrap {
  position: relative;
  min-width: 0;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

input::placeholder {
  color: var(--faint);
}

input:focus {
  border-color: var(--text);
  background: var(--surface);
}

textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  font: inherit;
  line-height: 1.55;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

textarea::placeholder {
  color: var(--faint);
}

textarea:focus {
  border-color: var(--text);
  background: var(--surface);
}

#emailInput {
  min-height: 54px;
  padding-right: 46px;
  font-size: 18px;
}

#customTags {
  min-height: 44px;
  font-size: 15px;
}

.clear-input {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  transform: translateY(-50%);
}

.clear-input:hover {
  background: var(--admin-borderless-hover-bg);
  color: var(--text);
}

.clear-input .icon {
  width: 18px;
  height: 18px;
}

.btn {
  min-height: 42px;
  border-color: var(--border);
  background: transparent;
  color: var(--text);
  padding: 0 16px;
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.btn-primary {
  min-height: 54px;
  border-color: transparent;
  background: var(--button);
  color: var(--button-text);
  padding: 0 22px;
  font-size: 16px;
  font-weight: var(--weight-bold);
}

.btn-primary:hover {
  box-shadow: inset 0 0 0 999px var(--button-hover-overlay);
}

.btn-outline:hover {
  background: var(--admin-borderless-hover-bg);
}

.btn.is-success {
  border-color: #16a34a;
  color: #16a34a;
}

.normalization-controls {
  display: grid;
  gap: 10px;
}

.normalization-controls label {
  color: var(--text);
  font-size: 14px;
  font-weight: var(--weight-semibold);
}

.control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-actions .btn-primary {
  min-height: 44px;
}

.single-controls {
  display: grid;
  gap: 16px;
}

.btn:active,
.tab:active,
.result-row:active {
  transform: translateY(1px);
}

.option-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.option-block {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.option-block label,
.option-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: var(--weight-semibold);
}

.option-block p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.option-block .option-title {
  color: var(--text);
  font-size: 14px;
  font-weight: var(--weight-semibold);
}

.tag-cloud,
.tag-row,
.filter-list {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill,
.badge,
.filter-chip {
  min-height: 26px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 0 9px;
  font-size: 12px;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.tag-pill:hover,
.filter-chip:hover {
  background: var(--admin-borderless-hover-bg);
}

.helper-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.side-panel {
  order: 2;
  display: grid;
  align-content: start;
  gap: 14px;
}

.info-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.info-card h2,
.info-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

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

.metric-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.results {
  order: 3;
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  margin-top: 4px;
}

.results[hidden] {
  display: none;
}

.results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.results-heading {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.results-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  font-weight: var(--weight-bold);
  line-height: 1.05;
}

.count-badge {
  min-height: 30px;
  border-color: var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  font-size: 15px;
  font-weight: var(--weight-bold);
}

.results-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.results-helper {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 14px);
}

.result-row {
  display: grid;
  min-width: 0;
  min-height: 88px;
  padding: 14px 16px;
  text-align: left;
  box-shadow: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.result-row:hover {
  border-color: var(--faint);
  background: var(--surface);
  transform: translateY(-1px);
}

.result-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.result-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.result-index {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 5%, var(--surface));
  color: var(--text);
  font-size: 16px;
  font-weight: var(--weight-bold);
}

.result-content {
  min-width: 0;
}

.result-meta {
  display: none;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.email-text {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  margin-top: 0;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace,
    monospace;
  font-size: 15px;
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  word-break: normal;
}

.result-rules {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.result-copy {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.result-copy span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.result-copy .icon {
  width: 21px;
  height: 21px;
}

.result-row:hover .result-copy {
  background: var(--admin-borderless-hover-bg);
  color: var(--text);
}

.result-copy.is-copied {
  background: transparent;
  color: #16a34a;
}

.result-row:hover .result-copy.is-copied {
  color: #16a34a;
}

.kind-base {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.kind-plus {
  background: #16a34a;
  color: #fff;
}

.kind-dot {
  background: #2563eb;
  color: #fff;
}

.kind-normalize {
  border-color: var(--text);
  background: var(--surface);
  color: var(--text);
}

.prose {
  width: min(100%, 1080px);
  margin: 54px 0 0;
  padding-bottom: 28px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.78;
}

.prose p,
.prose ul,
.prose ol {
  margin: 18px 0;
}

.prose h2 {
  margin: 34px 0 14px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.22;
  font-weight: var(--weight-bold);
}

.prose ul,
.prose ol {
  padding-left: 1.35em;
}

.prose li + li {
  margin-top: 8px;
}

.prose a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose code {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace,
    monospace;
  font-size: 0.92em;
}

.site-footer {
  margin-top: 68px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  width: min(100%, var(--page-max));
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  margin: 0 auto;
  padding: 28px var(--page-gutter);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.footer-inner p,
.footer-inner a {
  margin: 0;
}

.footer-inner a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.footer-inner a:hover {
  color: var(--text);
}

@media (max-width: 1180px) {
  .search-trigger {
    display: none;
  }

  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-title {
    grid-template-columns: 1fr;
  }

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

  .results {
    order: 2;
  }

  .result-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel {
    order: 3;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 760px) {
  .header-inner {
    padding-inline: 16px;
  }

  .brand {
    max-width: 52px;
  }

  .brand > span:last-child {
    display: none;
  }

  .main-nav {
    gap: 4px;
  }

  .main-nav a {
    min-height: 36px;
    padding-inline: 6px;
    font-size: 14px;
  }

  .main-nav a:nth-child(n + 4) {
    display: none;
  }

  .header-actions {
    gap: 2px;
  }

  .icon-btn {
    flex-basis: 38px;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .container {
    padding: 26px 16px 0;
  }

  .page-title {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 28px;
  }

  .page-title h1 {
    font-size: 38px;
  }

  .hero-side-card {
    width: 100%;
    flex-basis: auto;
  }

  .tabs {
    width: 100%;
    flex-wrap: wrap;
  }

  .tab {
    flex: 1 1 160px;
    min-width: 0;
  }

  .input-row,
  .option-grid,
  .result-list,
  .directory-grid,
  .side-panel,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .btn-primary,
  .results-actions,
  .results-actions .btn {
    width: 100%;
  }

  .results-top {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-preview {
    min-height: 196px;
  }

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

  .tool-preview-art::after {
    display: none;
  }

  .tool-preview-content h2 {
    font-size: 34px;
  }

  .footer-inner {
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-inline: 16px;
  }
}

@media (max-width: 440px) {
  .main-nav a {
    font-size: 13px;
  }

  .page-title h1 {
    font-size: 32px;
  }

  .card-content,
  .info-card {
    padding: 14px;
  }

  .tool-preview-content {
    width: 100%;
    padding: 20px;
  }

  .tool-preview-content h2 {
    font-size: 30px;
  }

  .result-row {
    min-height: 78px;
    padding: 12px;
  }

  .result-inner {
    gap: 8px;
  }

  .result-main {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }

  .result-index {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .email-text {
    font-size: 13px;
  }

  .result-copy {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
}
