:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #eef4ff;
  --blush-soft: #ffeaf2;
  --blush: #ffc8db;
  --blush-strong: #ff9fbb;
  --line: #d7e2f0;
  --line-strong: #b9cadf;
  --text: #142033;
  --muted: #5f7088;
  --primary: #0f6fff;
  --primary-strong: #0b57c7;
  --accent: #0ea5a4;
  --success: #0f9f6e;
  --warning: #b7791f;
  --danger: #c2410c;
  --badge-live: #e9f7f0;
  --badge-live-text: #0f7a53;
  --badge-planned: #fff4dd;
  --badge-planned-text: #8a5b06;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 14px 32px rgba(15, 23, 42, 0.05);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --header-height: 74px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  font-size: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--blush-soft);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560' viewBox='0 0 560 560'%3E%3Cg fill='none' fill-rule='evenodd' opacity='.52'%3E%3Cpath fill='%23ffffff' d='M74 74c6 24 8 26 32 32-24 6-26 8-32 32-6-24-8-26-32-32 24-6 26-8 32-32zm376 62c5 21 7 23 28 28-21 5-23 7-28 28-5-21-7-23-28-28 21-5 23-7 28-28zm-92 220c4 17 6 19 22 22-16 4-18 6-22 22-4-16-6-18-22-22 16-3 18-5 22-22zm-248 132c5 20 7 22 27 27-20 5-22 7-27 27-5-20-7-22-27-27 20-5 22-7 27-27z'/%3E%3Ccircle fill='%23ffffff' cx='186' cy='284' r='7' opacity='.66'/%3E%3Ccircle fill='%23ffffff' cx='476' cy='322' r='5' opacity='.52'/%3E%3Ccircle fill='%23ffffff' cx='96' cy='406' r='6' opacity='.56'/%3E%3Ccircle fill='%23ffffff' cx='420' cy='86' r='4' opacity='.52'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(120% 76% at 8% 2%, rgba(255, 142, 169, 0.39) 0%, rgba(255, 184, 200, 0.25) 35%, transparent 58%),
    radial-gradient(108% 72% at 100% 16%, rgba(255, 135, 165, 0.34) 0%, rgba(255, 192, 210, 0.2) 35%, transparent 60%),
    radial-gradient(120% 74% at 50% 100%, rgba(255, 165, 187, 0.32) 0%, rgba(255, 210, 223, 0.16) 36%, transparent 60%),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.5) 20%, rgba(255, 235, 242, 0.36) 40%, transparent 62%),
    linear-gradient(180deg, #fff4f8 0%, var(--blush-soft) 52%, #ffe3ed 100%);
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 560px 560px, auto, auto, auto, auto, auto;
  background-position: center top, left top, right top, center bottom, center 12%, center;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

input,
textarea,
select {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
}

input[type="color"] {
  min-height: 56px;
  padding: 0.35rem;
}

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

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(15, 111, 255, 0.22);
  outline-offset: 2px;
  border-color: rgba(15, 111, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 111, 255, 0.12);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(255, 234, 241, 0.92);
  border-bottom: 1px solid rgba(236, 216, 224, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand span:last-child {
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background-color: transparent;
  background-image: url("../../favicon.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: transparent;
  box-shadow: var(--shadow-soft);
  font-size: 0;
  letter-spacing: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary-strong);
  background: rgba(15, 111, 255, 0.08);
}

.hero {
  padding: 5.5rem 0 3.5rem;
}

.hero-card,
.page-hero,
.card,
.tool-shell,
.search-panel,
.ad-placeholder,
.sidebar-card,
.stat-card,
.category-card,
.tool-card,
.mini-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(215, 226, 240, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 2rem;
  padding: clamp(1.6rem, 4vw, 3rem);
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 167, 188, 0.45), transparent 66%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 111, 255, 0.08);
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.9rem;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.lead {
  margin: 0 0 1.3rem;
  max-width: 65ch;
  color: var(--muted);
  font-size: 1.05rem;
}

p,
li,
.muted,
.status,
.field-help,
.search-result-link span,
.tool-card p,
.section-heading p,
.output-preview {
  overflow-wrap: anywhere;
}

.hero-actions,
.card-actions,
.tool-actions,
.filter-row,
.chip-row,
.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.88rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button {
  background: linear-gradient(135deg, #0f6fff 0%, #1489ff 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 111, 255, 0.24);
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button-secondary {
  background: #fff;
  color: var(--primary-strong);
  border-color: rgba(15, 111, 255, 0.18);
}

.button-ghost {
  background: rgba(15, 111, 255, 0.06);
  color: var(--primary-strong);
}

.hero-stats,
.stats-grid,
.category-grid,
.tool-grid,
.mini-grid,
.footer-grid,
.category-links,
.info-grid {
  display: grid;
  gap: 1rem;
}

.hero-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.stat-card {
  padding: 1.2rem;
}

.stat-number {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.6rem;
  font-weight: 800;
}

.section {
  padding: 1.5rem 0 3rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 1.25rem;
}

.section-heading p {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-card,
.tool-card,
.mini-card,
.card,
.sidebar-card,
.search-panel,
.page-hero {
  padding: 1.35rem;
}

.category-card h3,
.tool-card h3,
.mini-card h3 {
  margin-bottom: 0.55rem;
}

.meta-line,
.page-meta,
.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-live {
  background: var(--badge-live);
  color: var(--badge-live-text);
}

.badge-planned {
  background: var(--badge-planned);
  color: var(--badge-planned-text);
}

.search-panel {
  position: relative;
  padding: 1rem;
}

.search-form {
  display: grid;
  gap: 0.8rem;
}

.search-results {
  display: none;
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: calc(100% - 0.2rem);
  z-index: 20;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-height: min(22rem, 70vh);
  overflow: auto;
}

.search-results.is-open {
  display: grid;
  gap: 0.5rem;
}

.search-result-link {
  display: block;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
}

.search-result-link:hover {
  background: rgba(15, 111, 255, 0.06);
  text-decoration: none;
}

.search-result-link strong {
  display: block;
  margin-bottom: 0.2rem;
}

.ad-placeholder {
  padding: 1.2rem 1.35rem;
  border-style: dashed;
  box-shadow: none;
  color: var(--muted);
}

.ad-placeholder p {
  margin: 0.3rem 0 0;
}

.page-hero {
  margin-top: 2rem;
}

.breadcrumbs {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumbs li::after {
  content: "/";
  margin-left: 0.55rem;
  color: var(--line-strong);
}

.breadcrumbs li:last-child::after {
  content: none;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1.2rem;
  align-items: start;
}

.content-stack {
  display: grid;
  gap: 1rem;
}

.sidebar-stack {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}

.tool-ui {
  display: grid;
  gap: 1rem;
}

.tool-grid-columns,
.example-grid,
.stats-grid,
.mini-grid,
.category-links {
  display: grid;
  gap: 1rem;
}

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

.field-group {
  display: grid;
  gap: 0.45rem;
}

.field-group label {
  font-weight: 700;
  font-size: 0.95rem;
}

.field-help,
.status,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.code-block,
pre {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #0f172a;
  color: #d6e3ff;
  max-width: 100%;
  overflow: auto;
}

code,
pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.93rem;
}

.card ul,
.card ol {
  padding-left: 1.2rem;
  margin: 0.7rem 0 0;
}

.faq-list {
  display: grid;
  gap: 0.9rem;
}

.faq-item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.75);
}

.tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
}

.tool-card .card-link {
  margin-top: auto;
  font-weight: 700;
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.chip-row button,
.chip-row a,
.chip-row label {
  display: inline-flex;
  align-items: center;
  padding: 0.62rem 0.92rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  gap: 0.45rem;
}

.chip-row button.is-active {
  color: var(--primary-strong);
  border-color: rgba(15, 111, 255, 0.22);
  background: rgba(15, 111, 255, 0.08);
}

.empty-state {
  display: none;
  padding: 1rem;
  border-radius: 18px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}

.footer {
  margin-top: 2rem;
  padding: 2.4rem 0 3rem;
  border-top: 1px solid rgba(236, 216, 224, 0.95);
  background: rgba(255, 231, 239, 0.95);
}

.footer-grid {
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  align-items: start;
}

.footer h3 {
  margin-bottom: 0.65rem;
  font-size: 1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.hero-summary-list,
.trust-list {
  display: grid;
  gap: 0.85rem;
  padding-left: 1.1rem;
}

.tool-summary {
  display: grid;
  gap: 0.75rem;
}

.example-panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.8);
}

.example-panel h3 {
  font-size: 0.98rem;
}

.interface-note {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: rgba(14, 165, 164, 0.08);
  color: var(--text);
}

.output-preview {
  min-height: 180px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.card table,
.tool-ui table,
.output-preview table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

th,
td {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .hero-card,
  .layout-grid,
  .tool-grid-columns,
  .example-grid,
  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-stack {
    position: static;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1rem;
    left: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-height) - 1.5rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    width: 100%;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .sidebar-ad {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--max-width), calc(100% - 1.25rem));
  }

  .hero {
    padding-top: 4.5rem;
  }

  .section {
    padding: 1.1rem 0 2.35rem;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .lead {
    font-size: 1rem;
  }

  .brand {
    max-width: calc(100% - 4.25rem);
    gap: 0.65rem;
    font-size: 0.98rem;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .nav-toggle {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }

  .site-nav {
    left: 0.625rem;
    right: 0.625rem;
    padding: 0.75rem;
  }

  .section-heading {
    align-items: start;
  }

  .hero-actions > *,
  .tool-actions > *,
  .card-actions > * {
    flex: 1 1 100%;
  }

  .page-hero,
  .card,
  .sidebar-card,
  .search-panel,
  .tool-card,
  .category-card {
    padding: 1.15rem;
  }

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

  .chip-row button,
  .chip-row a,
  .chip-row label {
    width: 100%;
    justify-content: center;
  }

  pre,
  .code-block {
    white-space: pre-wrap;
    word-break: break-word;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(var(--max-width), calc(100% - 1rem));
  }

  .hero-card,
  .page-hero,
  .card,
  .search-panel,
  .tool-card,
  .category-card,
  .sidebar-card {
    padding: 1rem;
    border-radius: 20px;
  }

  .button,
  .button-secondary,
  .button-ghost {
    width: 100%;
  }
}
