/* texttocolor.com — utility-first design system */

:root {
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --bg: #f9fafb;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #0ea5e9;
  --success: #166534;
  --warning-bg: #fef3c7;
  --warning-ink: #78350f;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 8px 24px rgb(16 24 40 / 0.08);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-hover-bg: #f3f4f6;
  --nav-link-fg: var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

.shell {
  width: min(1140px, calc(100% - 32px));
  margin-inline: auto;
}

#main {
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  padding: 10px 14px;
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: conic-gradient(#2563eb, #22c55e, #eab308, #ec4899, #2563eb);
  flex-shrink: 0;
}

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

.site-nav.open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  padding: 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: min(75vh, 28rem);
  overflow-y: auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav-plain {
  display: block;
  padding: 10px 12px;
  color: var(--nav-link-fg, var(--ink));
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 8px;
}

.nav-group .nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  color: var(--nav-link-fg, var(--ink));
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 8px;
}

.nav-chevron {
  flex-shrink: 0;
  opacity: 0.72;
  transition: transform 0.18s ease;
}

.nav-group:hover .nav-chevron,
.nav-group:focus-within .nav-chevron {
  transform: rotate(180deg);
}

.nav-plain:hover,
.nav-trigger:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-link-fg, var(--ink));
}

.nav-group-menu a:hover {
  background: #f3f4f6;
  color: var(--ink);
}

.nav-group {
  position: relative;
}

.nav-group-menu {
  display: none;
}

.site-nav.open .nav-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.site-nav.open .nav-group-menu {
  display: block;
  position: static;
  min-width: 0;
  max-height: none;
  margin: 0 0 8px;
  padding: 4px 0 8px 12px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.site-nav.open .nav-group-menu a {
  padding: 8px 10px;
}

@media (hover: hover) and (pointer: fine) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    gap: 4px 10px;
    max-height: none;
    overflow: visible;
  }

  .nav-group::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
    display: none;
  }

  .nav-group:hover::after,
  .nav-group:focus-within::after {
    display: block;
  }

  .nav-group-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    max-height: min(70vh, 420px);
    overflow: auto;
    padding: 8px;
    margin: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 60;
  }

  .site-nav.open .nav-group-menu {
    display: none;
  }

  .nav-group:hover .nav-group-menu,
  .nav-group:focus-within .nav-group-menu {
    display: block;
  }

  .site-nav.open .nav-group:hover .nav-group-menu,
  .site-nav.open .nav-group:focus-within .nav-group-menu {
    display: block;
  }

  .nav-group-menu a {
    display: block;
    padding: 9px 12px;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
  }

  .nav-category-link {
    font-weight: 700 !important;
    color: var(--primary) !important;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0 !important;
  }
}

/* Typography */

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin: 0 0 14px;
}

h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 12px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.intro,
.section-lead,
p {
  color: var(--muted);
}

.section-lead {
  margin: 0;
  max-width: 62ch;
  line-height: 1.65;
}

.content-panel .section-lead {
  margin-bottom: 4px;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--muted);
}

/* Hero */

.hero {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.25rem, 3vw, 2rem);
}

.hero-home-wrap {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgb(37 99 235 / 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgb(236 72 153 / 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgb(34 197 94 / 0.1), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2rem, 4vw, 2.75rem);
}

.hero-home-inner {
  display: grid;
  gap: 1.75rem;
}

.hero-home-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.hero-home-copy h1 {
  max-width: 16ch;
}

.hero-intro {
  margin: 0;
  max-width: 48ch;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-eyebrow {
  color: var(--primary);
}

.hero-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.25rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.06);
}

.hero-chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chip-color, var(--primary));
}

.hero-home-aside {
  display: grid;
  gap: 12px;
}

.hero-swatch-deck {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  background: rgb(255 255 255 / 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.hero-swatch-deck span {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgb(0 0 0 / 0.06);
  min-height: 2rem;
}

.hero-home-aside .home-word-tool {
  margin-top: 0;
  max-width: none;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(10px);
}

.value-props-hero {
  margin-top: 0;
  max-width: none;
}

.hero-search {
  margin-top: 0;
  max-width: 640px;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hero-search--copy {
  margin-top: 1.35rem;
  max-width: min(100%, 520px);
  box-shadow: 0 1px 3px rgb(16 24 40 / 0.06);
}

.category-intro {
  margin: 0;
  max-width: 52ch;
}

.search-tools {
  margin-top: 28px;
  max-width: 560px;
}

.search-tools label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}

.search-row {
  display: grid;
  gap: 10px;
}

.search-hint {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.search-hint a {
  color: var(--primary);
}

.hero-pitch {
  margin: 0.75rem 0 0;
  max-width: 52ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.value-props {
  display: grid;
  gap: 12px;
  margin-top: 1.5rem;
  max-width: 720px;
}

.value-prop {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.value-prop strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.value-prop span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* 首页分区与层次 */

.page-home {
  --home-band-pad: clamp(2.25rem, 5vw, 3.5rem);
}

.home-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px 16px;
  background: rgb(255 255 255 / 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.05);
}

.home-metric {
  display: grid;
  gap: 2px;
  text-align: center;
  padding: 8px 6px;
}

.home-metric strong {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  color: var(--primary);
  line-height: 1.1;
}

.home-metric span {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.value-props-hero {
  grid-template-columns: 1fr;
}

.value-prop--accent-1 {
  border-left: 4px solid #2563eb;
  background: linear-gradient(90deg, rgb(37 99 235 / 0.06), var(--card) 40%);
}

.value-prop--accent-2 {
  border-left: 4px solid #0f766e;
  background: linear-gradient(90deg, rgb(15 118 110 / 0.08), var(--card) 40%);
}

.value-prop--accent-3 {
  border-left: 4px solid #a855f7;
  background: linear-gradient(90deg, rgb(168 85 247 / 0.08), var(--card) 40%);
}

.home-band {
  padding: var(--home-band-pad) 0;
}

.home-band--tint {
  background:
    linear-gradient(180deg, rgb(248 250 252 / 0.9) 0%, rgb(241 245 249 / 0.5) 100%);
  border-block: 1px solid var(--line);
}

.home-band--steps {
  background:
    radial-gradient(ellipse 70% 80% at 0% 50%, rgb(37 99 235 / 0.08), transparent 55%),
    radial-gradient(ellipse 60% 70% at 100% 40%, rgb(168 85 247 / 0.07), transparent 50%),
    #fff;
}

.home-section-head {
  margin-bottom: 1.25rem;
}

.home-section-head .eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.home-section-head h2 {
  margin: 0 0 0.35rem;
}

.home-hub-grid {
  display: grid;
  gap: 1.25rem;
}

.home-hub-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.home-hub-gradient {
  height: 6px;
  width: 100%;
}

.home-hub-strip {
  display: flex;
  gap: 0;
  height: 28px;
}

.home-hub-strip span {
  flex: 1;
  min-width: 0;
}

.home-hub-body {
  padding: 1.35rem 1.4rem 1.5rem;
  display: grid;
  gap: 0.65rem;
}

.home-hub-body h3 {
  margin: 0;
  font-size: 1.2rem;
}

.home-hub-body > p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-hub-links {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.home-hub-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.home-hub-links a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hub-accent, var(--primary));
  flex-shrink: 0;
}

.home-hub-links a:hover {
  color: var(--hub-accent, var(--primary));
}

.home-hub-cta {
  margin-top: 0.5rem;
  justify-self: start;
}

.home-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
  counter-reset: home-step;
}

.home-step-card {
  position: relative;
  margin: 0;
  padding: 1.25rem 1.3rem 1.3rem 1.3rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgb(16 24 40 / 0.06);
  display: grid;
  gap: 6px;
}

.home-step-card strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
}

.home-step-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.home-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  background: rgb(37 99 235 / 0.1);
  border: 1px solid rgb(37 99 235 / 0.2);
  margin-bottom: 2px;
}

.homepage-faq .content-panel details {
  border-radius: 12px;
}

@media (min-width: 600px) {
  .home-hero-metrics {
    grid-template-columns: repeat(4, 1fr);
  }

  .value-props-hero {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-hub-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  .home-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-word-tool {
  margin-top: 1.75rem;
  padding: 1.35rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 640px;
}

.home-word-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.home-word-lead {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.home-word-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.88rem;
}

.home-word-result {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.home-word-label {
  margin: 0;
  font-size: 0.9rem;
}

.home-mini-main {
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 800;
  font-family: var(--font-display);
}

.home-mini-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-mini-swatch {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: 1px solid rgb(0 0 0 / 0.08);
}

.home-mini-codes {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.home-word-more {
  margin: 14px 0 0;
}

.context-band {
  padding: 0 0 8px;
}

.context-links {
  margin: 0;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  font-size: 0.92rem;
  color: #1e3a5f;
  line-height: 1.55;
}

.context-links a {
  color: var(--primary);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
  margin: 12px 0 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.choose-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--card);
  margin: 0;
}

.choose-table th,
.choose-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.choose-table th {
  background: #f3f4f6;
  font-weight: 700;
}

.choose-table tr:last-child td {
  border-bottom: 0;
}

.choose-table a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.room-board {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
}

/* Category hub pages */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.category-hero {
  margin-top: 0;
  padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  background:
    var(--category-gradient, var(--bg)),
    radial-gradient(ellipse 90% 70% at 100% 0%, color-mix(in srgb, var(--category-accent, #2563eb) 22%, transparent), transparent 55%);
  border-bottom: 1px solid var(--line);
}

.category-hero-inner {
  display: grid;
  gap: 1rem;
}

.category-hero-copy h1 {
  max-width: 18ch;
}

.category-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.25rem;
}

.category-hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.category-hero-figure {
  margin: 0;
}

.category-hero-figure img,
.category-hero-figure svg {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgb(0 0 0 / 0.06);
}

.category-palette-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
}

.category-palette-strip span {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  border: 1px solid rgb(0 0 0 / 0.08);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.category-eyebrow {
  color: var(--category-accent, var(--primary));
}

.category-mosaic-block {
  padding: 1.25rem 0 0.5rem;
}

.category-mosaic {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.category-mosaic span {
  flex: 1 1 2.5rem;
  min-width: 2.25rem;
  max-width: 3.5rem;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgb(255 255 255 / 0.5);
}

.category-feature {
  padding: 1rem 0 1.5rem;
}

.category-feature-card {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: linear-gradient(135deg, var(--card) 70%, color-mix(in srgb, var(--feature-accent, #2563eb) 12%, #fff));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.category-feature-colors {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.category-feature-colors span {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid rgb(0 0 0 / 0.06);
}

.category-feature-copy h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.category-feature-copy p {
  margin: 0 0 14px;
}

.category-feature-thumb {
  display: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  width: 100%;
  max-width: 200px;
  height: auto;
}

.category-panel {
  margin-bottom: 0.25rem;
}

.card-grid-rich .tool-card-rich {
  overflow: hidden;
  border-top: 3px solid var(--card-accent, var(--primary));
}

.tool-card-visual {
  display: flex;
  height: 3rem;
  margin: -1.25rem -1.35rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.tool-card-visual i {
  flex: 1;
  display: block;
  min-width: 0;
}

.category-faq details {
  border-color: color-mix(in srgb, var(--category-accent, var(--line)) 25%, var(--line));
}

/* Text effects category — dark hero */

.category-theme-effects .category-hero--dark {
  border-bottom-color: #4c1d95;
}

.category-theme-effects .category-hero--dark h1,
.category-theme-effects .category-hero--dark .intro,
.category-theme-effects .category-hero--dark .category-breadcrumb,
.category-theme-effects .category-hero--dark .category-breadcrumb a {
  color: #f8fafc;
}

.category-theme-effects .category-hero--dark .category-breadcrumb a {
  opacity: 0.85;
}

.category-theme-effects .category-eyebrow {
  color: #67e8f9;
}

.category-theme-effects {
  --nav-hover-bg: rgb(255 255 255 / 0.14);
  --nav-link-fg: #f8fafc;
}

.category-theme-effects .site-header {
  background: rgb(15 23 42 / 0.92);
  border-color: #312e81;
}

.category-theme-effects .brand {
  color: #f8fafc;
}

.category-theme-effects .nav-toggle {
  color: #f8fafc;
  background: rgb(255 255 255 / 0.08);
  border-color: #475569;
}

.category-theme-effects .nav-group:hover .nav-trigger,
.category-theme-effects .nav-group:focus-within .nav-trigger {
  background: var(--nav-hover-bg);
  color: var(--nav-link-fg);
}

@media (min-width: 760px) {
  .hero-home-grid {
    grid-template-columns: 1.05fr minmax(300px, 420px);
    gap: 2rem 2.5rem;
    align-items: stretch;
  }

  .hero-home-inner > .home-hero-metrics {
    grid-column: 1 / -1;
  }

  .category-hero-grid {
    grid-template-columns: 1fr minmax(240px, 420px);
    gap: 2rem;
  }

  .category-feature-card {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .category-feature-thumb {
    display: block;
  }
}

/* Forms */

.field {
  display: grid;
  gap: 6px;
}

.field-unit {
  font-weight: 500;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 88px;
}

input[type="color"] {
  padding: 4px;
  height: 44px;
  cursor: pointer;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

label,
legend {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

/* Buttons */

.button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.button.small {
  padding: 7px 11px;
  font-size: 0.8rem;
}

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

.primary-actions {
  margin-top: 6px;
  padding-top: 4px;
}

/* Tool layout */

.tool-hero {
  padding-top: 28px;
  padding-bottom: 8px;
}

.tool-shell {
  display: grid;
  gap: 18px;
  padding: 8px 0 36px;
}

.tool-panel,
.result-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.tool-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.84rem;
  color: var(--muted);
}

.example {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 6px 11px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--ink);
}

.example:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 56px 16px;
}

/* Palette results */

.palette-main {
  border-radius: var(--radius);
  min-height: 200px;
  display: grid;
  align-content: end;
  padding: 18px;
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.swatch {
  border-radius: 12px;
  padding: 14px;
  min-height: 100px;
  display: flex;
  align-content: flex-end;
  align-items: flex-end;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  text-align: left;
  transition: transform 0.12s ease;
}

.swatch:hover {
  transform: translateY(-2px);
}

.formats {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.format-row {
  display: grid;
  grid-template-columns: minmax(4.5rem, 5.5rem) minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  font-size: 0.82rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.format-row:last-child {
  border-bottom: 0;
}

.format-role {
  font-size: 0.8rem;
  line-height: 1.3;
}

.format-codes {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.format-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.palette-tip {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.palette-tip em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 520px) {
  .format-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 0;
  }

  .format-actions {
    justify-content: flex-start;
  }
}

@media (min-width: 900px) {
  .format-row {
    grid-template-columns: minmax(4.5rem, 5.5rem) minmax(0, 1fr) auto;
  }
}

.status {
  min-height: 24px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--success);
}

.birthday-note {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #0c4a6e;
}

/* Text effects */

.preview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  overflow: auto;
  min-height: 160px;
}

.text-preview {
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
}

.preview-segment {
  cursor: pointer;
  border-radius: 4px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: inherit;
}

.preview-segment[aria-pressed="true"] {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

textarea.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
  min-height: 140px;
}

.preview-controls {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Cards */

.section-block {
  padding-bottom: clamp(2.25rem, 5vw, 3.25rem);
}

.section-block h2 {
  margin: 0 0 12px;
  line-height: 1.25;
}

/* 分类页 / 首页等内容模块统一内边距，避免文案贴边 */
.content-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.04);
}

.content-panel > :first-child {
  margin-top: 0;
}

.content-panel > :last-child {
  margin-bottom: 0;
}

.content-panel--plain {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding-inline: clamp(0.25rem, 2vw, 0.5rem);
  padding-block: 0;
}

.category-listing {
  padding-top: 0.25rem;
}

.category-section {
  margin-top: 0.5rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  color: var(--ink);
  display: grid;
  gap: 0.65rem;
  height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow);
}

.tool-card-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.tool-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Content sections */

.article-grid {
  display: grid;
  gap: 24px;
  padding: 36px 0;
}

.faq-section {
  padding-bottom: 40px;
}

details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

details p {
  margin: 10px 0 0;
}

.related-tools {
  padding-bottom: 52px;
}

.steps-section {
  padding: 8px 0 40px;
}

.steps-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  display: grid;
  gap: 12px;
}

.steps-list strong {
  color: var(--ink);
}

/* Previews */

.role-grid {
  display: grid;
  gap: 10px;
}

.role-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
}

.brand-preview,
.website-preview,
.wedding-board {
  margin-top: 16px;
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--line);
}

.wedding-board-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.wedding-role {
  border-radius: 10px;
  padding: 14px;
  min-height: 72px;
  font-size: 0.82rem;
  font-weight: 700;
}

.site-header-demo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.demo-nav {
  display: flex;
  gap: 10px;
  font-size: 0.85rem;
}

.hero-demo {
  margin: 22px 0 16px;
  font-size: 1.4rem;
  line-height: 1.2;
  font-family: var(--font-display);
}

.demo-button {
  display: inline-block;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  border: 0;
  margin-right: 8px;
  margin-bottom: 8px;
}

.cards-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.demo-card {
  border-radius: 10px;
  padding: 14px;
  font-size: 0.9rem;
}

.contrast-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.contrast-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.84rem;
  background: #f9fafb;
  border: 1px solid var(--line);
}

.warning {
  background: var(--warning-bg);
  color: var(--warning-ink);
  border-color: #fcd34d;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: clamp(2.5rem, 5vw, 3.25rem) 0 clamp(1.5rem, 3vw, 2rem);
  color: var(--muted);
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-grid > div {
  min-width: 0;
}

.footer-brand strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-family: var(--font-display);
}

.footer-brand p {
  margin: 0;
  max-width: 36ch;
  line-height: 1.65;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

footer li {
  margin-top: 10px;
}

footer li:first-child {
  margin-top: 0;
}

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

footer a:hover {
  color: var(--primary);
}

footer strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.footer-note {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.footer-note p {
  margin: 0;
}

.info-hero {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 1.25rem;
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgb(37 99 235 / 0.1), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.info-intro {
  margin: 0;
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.65;
}

.info-hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
}

.info-hero-strip span {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  border: 1px solid rgb(0 0 0 / 0.08);
}

.info-panel h2 {
  margin-top: 0;
}

.info-panel p,
.info-panel li {
  color: var(--muted);
  line-height: 1.65;
}

.info-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.65rem;
}

.info-list a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.info-list a:hover {
  text-decoration: underline;
}

.info-contact-email {
  font-size: 1.25rem;
  font-weight: 700;
}

.info-contact-email a {
  color: var(--primary);
}

.info-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0.5rem 0 1rem;
}

.info-related a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.info-related a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.info-back {
  margin: 0;
  font-size: 0.9rem;
}

.info-back a {
  color: var(--primary);
  font-weight: 600;
}

.info-panel details p a {
  color: var(--primary);
}

/* Responsive */

@media (min-width: 640px) {
  .value-props,
  .value-props-hero {
    grid-template-columns: repeat(3, 1fr);
  }

  .search-row {
    grid-template-columns: 1fr auto;
  }

  .palette-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wedding-board-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 760px) {
  .tool-shell {
    grid-template-columns: minmax(300px, 380px) 1fr;
    align-items: start;
  }

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

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 2.5rem;
  }

  .site-nav.open {
    flex-direction: row;
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}

@media (min-width: 1000px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
    gap: 2rem 1.75rem;
  }

  .palette-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
