:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #142033;
  --muted: #5f6f86;
  --line: #d9e1ec;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --success: #0f766e;
  --shadow: 0 20px 50px rgba(20, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(180deg, #eef4ff 0%, #f4f7fb 100%);
  padding: 72px 0 48px;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 4.4rem);
  max-width: 11ch;
  margin-bottom: 16px;
}

.lede {
  max-width: 640px;
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.primary-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  border: 0;
  padding: 0 20px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.primary-link:hover,
button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.tool-section,
.value-section,
.seo-section,
.faq-section {
  padding: 24px 0 64px;
}

.tool-grid,
.value-grid {
  display: grid;
  gap: 24px;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

label,
legend {
  font-weight: 600;
}

textarea {
  width: 100%;
  resize: vertical;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  font: inherit;
  min-height: 240px;
  color: var(--text);
}

.meta-row,
.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta-row {
  margin: 12px 0 18px;
}

.mode-picker {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 18px;
}

.mode-picker label {
  display: block;
  margin-top: 8px;
  font-weight: 500;
}

.fine-print,
.empty-state,
.seo-section p,
.faq-section p {
  color: var(--muted);
}

.results-list {
  display: grid;
  gap: 16px;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fbfdff;
}

.result-card h3 {
  margin-bottom: 8px;
}

.result-card p {
  white-space: pre-wrap;
}

.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.copy-button {
  background: #e8f0ff;
  color: var(--brand-dark);
}

.copy-button:hover {
  background: #d8e5ff;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.page-links a {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 600;
  background: #e8f0ff;
  padding: 10px 14px;
  border-radius: 999px;
}

.faq-section details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  margin-top: 12px;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 800px) {
  .tool-grid,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-top: 56px;
  }
}

@media (max-width: 375px) {
  .container {
    width: min(100% - 20px, 1120px);
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  textarea {
    min-height: 200px;
  }

  .result-actions,
  .meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .primary-link,
  button,
  .copy-button {
    width: 100%;
  }
}
