:root {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #0f172a;
}

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

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  line-height: 1.6;
}

.wrapper {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

.wc-header {
  border-bottom: 1px solid #e2e8f0;
  background: #ffffffd9;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
}

.brand-name {
  font-weight: 700;
}

.brand-sub {
  color: #475569;
  font-size: 0.9rem;
}

.cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ghost-link {
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 0.15s ease;
}

.ghost-link:hover {
  background: #f1f5f9;
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.secondary-btn {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.wc-hero {
  padding: 52px 0 32px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2563eb;
  font-weight: 800;
  font-size: 0.85rem;
  margin: 0 0 8px;
}

.wc-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  line-height: 1.2;
}

.subtitle {
  margin: 0 0 12px;
  color: #475569;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span {
  background: #eff6ff;
  color: #1d4ed8;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.hero-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.hero-card h3 {
  margin: 0 0 10px;
}

.hero-card ul {
  padding-left: 18px;
  margin: 0;
  color: #475569;
}

.wc-main {
  padding: 20px 0 60px;
}

.wc-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: start;
}

.panel {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head.mini {
  justify-content: space-between;
}

.panel-head h2,
.panel-head h3,
.panel-head h4 {
  margin: 0;
}

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

.icon-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
}

.icon-btn:hover {
  background: #e2e8f0;
}

.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  margin: 12px 0;
}

.progress.hidden {
  display: none;
}

.progress-bar {
  width: 120px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.progress-bar::before {
  content: '';
  position: absolute;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  animation: load 1.4s infinite;
}

@keyframes load {
  0% {
    left: -40%;
  }
  50% {
    left: 60%;
  }
  100% {
    left: 120%;
  }
}

textarea {
  width: 100%;
  min-height: 260px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 14px;
  font-size: 1rem;
  resize: vertical;
  background: #f8fafc;
}

textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.counts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #475569;
  font-weight: 600;
}

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

.preview {
  background: #f8fafc;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
}

.preview-head h3 {
  margin: 0;
}

.preview-box {
  margin-top: 10px;
  min-height: 120px;
  background: #ffffff;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  line-height: 1.6;
}

.preview-box .token {
  padding: 2px 4px;
  border-radius: 6px;
}

.token.highlighted {
  background: #fef3c7;
}

.sentence-short {
  background: rgba(34, 197, 94, 0.12);
}

.sentence-medium {
  background: rgba(59, 130, 246, 0.12);
}

.sentence-long {
  background: rgba(239, 68, 68, 0.12);
}

.metrics-panel .sticky {
  position: sticky;
  top: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.metric h3 {
  margin: 4px 0 0;
}

.metric small {
  color: #475569;
}

.pill {
  background: #eef2ff;
  color: #4338ca;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.panel-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
}

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

.chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.chip:hover {
  border-color: #2563eb;
  background: #eef2ff;
}

.charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.chart-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  min-height: 260px;
  position: relative;
}

.chart-card canvas {
  width: 100% !important;
  height: 240px !important;
}

.score-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.ring {
  max-height: 180px;
  height: 180px !important;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.heat {
  padding: 8px 10px;
  border-radius: 10px;
  color: #0f172a;
  font-weight: 600;
}

.wc-seo {
  margin-bottom: 60px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.wc-checklist {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 16px;
  margin-bottom: 32px;
}

.wc-checklist ul {
  padding-left: 18px;
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}

.wc-use-cases {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
}

.wc-faq {
  margin-bottom: 60px;
}

.wc-faq-header p {
  color: #475569;
  margin-top: -6px;
}

.wc-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.wc-faq-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

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

.wc-faq-card p {
  margin-top: 6px;
  color: #334155;
}

.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.hidden {
  display: none;
}

@media (max-width: 1024px) {
  .hero-inner,
  .wc-grid {
    grid-template-columns: 1fr;
  }
  .wc-checklist {
    grid-template-columns: 1fr;
  }
}

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

  textarea {
    min-height: 200px;
  }

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

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions button {
    flex: 1;
  }
}
