/* ============================================
   WORD COUNTER — page-specific styles
   Unique layout: full-width header → editor+stats → content
   ============================================ */

/* ---- Global box-sizing for this page ---- */
.wc-page *,
.wc-page *::before,
.wc-page *::after {
  box-sizing: border-box;
}

/* ---- Page wrapper ---- */
.wc-page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ============================================
   PAGE HEADER (full-width above tool)
   ============================================ */
.wc-page-header {
  margin-bottom: 40px;
}

.calc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.calc-breadcrumb a { color: var(--text-dim); transition: color var(--transition); }
.calc-breadcrumb a:hover { color: var(--accent); }
.calc-breadcrumb i { font-size: 10px; }

.calc-page-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 8px;
  background: var(--blue-dim);
  border: 1px solid rgba(91,156,246,0.22);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
body.light-theme .calc-page-tag {
  background: var(--blue-dim);
  border-color: rgba(37,99,235,0.2);
  color: var(--blue);
}
.calc-page-tag i { font-size: 13px; }

.calc-page-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 16px;
}
.calc-page-title span { color: var(--blue); }
body.light-theme .calc-page-title span { color: var(--accent); }

.calc-page-desc {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 24px;
}

.calc-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.calc-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.calc-feature-pill i { color: var(--accent); font-size: 12px; }

/* ============================================
   TOOL AREA: textarea (left) + stats (right)
   ============================================ */
.wc-tool {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  margin-bottom: 64px;
}

/* ---- Editor column ---- */
.wc-editor-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wc-textarea-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-width: 0;
  width: 100%;
}

/* Textarea toolbar */
.wc-textarea-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.wc-toolbar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wc-toolbar-label i { color: var(--blue); font-size: 13px; }
body.light-theme .wc-toolbar-label i { color: var(--accent); }
.wc-toolbar-actions { display: flex; gap: 8px; }
.wc-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.wc-toolbar-btn:hover {
  background: var(--bg-3);
  border-color: var(--border-hover);
  color: var(--text);
}
.wc-toolbar-btn i { font-size: 12px; }

/* Textarea */
.wc-textarea {
  width: 100%;
  min-height: 320px;
  padding: 18px 20px;
  background: var(--surface);
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.75;
  resize: vertical;
  display: block;
  transition: background var(--transition);
}
.wc-textarea::placeholder { color: var(--text-dim); }
.wc-textarea:focus { background: var(--surface); }

/* Live stat footer below textarea */
.wc-textarea-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 16px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.wc-live-stat {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}
.wc-live-stat strong {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}
body.light-theme .wc-live-stat strong { color: var(--accent); }
.wc-live-stat i { font-size: 12px; color: var(--text-dim); }

/* ---- Keywords section ---- */
.wc-keywords {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.wc-keywords-header {
  padding: 14px 18px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.wc-keywords-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.wc-keywords-title i { color: var(--blue); font-size: 13px; }
body.light-theme .wc-keywords-title i { color: var(--accent); }
.wc-keywords-sub {
  font-size: 12px;
  color: var(--text-dim);
}

.wc-keywords-table-wrap {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.wc-keywords-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.wc-keywords-table thead {
  position: sticky;
  top: 0;
  background: var(--bg-3);
  z-index: 1;
}
.wc-keywords-table th {
  padding: 8px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.wc-keywords-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}
.wc-keywords-table tr:last-child td { border-bottom: none; }
.wc-keywords-table tbody tr:hover td { background: var(--surface-2); }

.wc-kw-rank {
  font-size: 12px;
  color: var(--text-dim);
  width: 28px;
}
.wc-kw-word {
  font-weight: 600;
  color: var(--text);
}
.wc-kw-count {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  width: 50px;
}
.wc-kw-density {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--blue);
  text-align: right;
  width: 60px;
}
body.light-theme .wc-kw-density { color: var(--accent); }
.wc-kw-bar-cell { width: 120px; padding-right: 16px; }
.wc-kw-bar-outer {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}
.wc-kw-bar-inner {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.3s ease;
  min-width: 2px;
}
body.light-theme .wc-kw-bar-inner { background: var(--accent); }

.wc-keywords-empty td {
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  padding: 20px;
}

/* ============================================
   STATS PANEL (right column)
   ============================================ */
.wc-stats-col {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  min-width: 0;
  width: 100%;
}

.wc-stats-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 60px var(--accent-dim);
}

.wc-stats-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.wc-stats-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--blue-dim);
  border: 1px solid rgba(91,156,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--blue);
  flex-shrink: 0;
}
body.light-theme .wc-stats-icon {
  background: var(--accent-dim);
  border-color: rgba(37,99,235,0.2);
  color: var(--accent);
}
.wc-stats-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px;
}
.wc-stats-sub { font-size: 11px; color: var(--text-dim); }

/* Stat groups */
.wc-stat-group { padding: 12px 0; }
.wc-stat-divider {
  height: 1px;
  background: var(--border);
  margin: 0 16px;
}

.wc-stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  transition: background var(--transition);
}
.wc-stat-row:hover { background: var(--bg-2); }

.wc-stat-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.wc-stat-text { flex: 1; min-width: 0; }
.wc-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wc-stat-note {
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.7;
}
.wc-stat-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.2;
}
.wc-stat-primary .wc-stat-value {
  font-size: 22px;
}

/* Time header inside group */
.wc-time-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}
.wc-time-header i { font-size: 12px; }

/* ============================================
   CHARACTER LIMIT BARS
   ============================================ */
.wc-limits-grid {
  padding: 4px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wc-limit-item { display: flex; align-items: center; gap: 10px; }
.wc-limit-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  width: 60px;
  flex-shrink: 0;
}
.wc-limit-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}
.wc-limit-bar {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.2s ease, background 0.2s ease;
  max-width: 100%;
}
.wc-limit-bar.over { background: var(--pink); }
body.light-theme .wc-limit-bar { background: var(--accent); }
body.light-theme .wc-limit-bar.over { background: #dc2626; }
.wc-limit-count {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  width: 56px;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}
.wc-limit-count.over { color: var(--pink); font-weight: 700; }

/* ============================================
   CONTENT AREA (below tool)
   ============================================ */
.wc-content { margin-top: 8px; }

.content-block { margin-bottom: 40px; }
.content-block h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 14px;
}
.content-block h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  margin-top: 20px;
}
.content-block p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.content-block strong { color: var(--text); font-weight: 600; }

/* Use-case cards */
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.use-case-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}
.use-case-card:hover { border-color: var(--border-hover); }
.use-case-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue-dim);
  border: 1px solid rgba(91,156,246,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--blue);
  margin-top: 1px;
}
body.light-theme .use-case-icon {
  background: var(--accent-dim);
  border-color: rgba(37,99,235,0.18);
  color: var(--accent);
}
.use-case-text { display: flex; flex-direction: column; gap: 4px; }
.use-case-text strong { font-size: 14px; font-weight: 700; color: var(--text); }
.use-case-text span { font-size: 13px; line-height: 1.6; color: var(--text-muted); }

/* Formula box */
.formula-box {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
}
body.light-theme .formula-box { background: var(--surface-2); border-left-color: var(--accent); }
.formula-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--blue-dim);
  border-bottom: 1px solid var(--border);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.light-theme .formula-title { background: var(--accent-dim); color: var(--accent); }
.formula-body {
  padding: 18px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-muted);
}
.formula-var { color: var(--blue); font-weight: 600; }
body.light-theme .formula-var { color: var(--accent); }
.formula-note {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  font-family: 'DM Sans', sans-serif;
}

/* Table */
.units-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
}
.units-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.units-table thead { background: var(--bg-3); }
.units-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.units-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.units-table tr:last-child td { border-bottom: none; }
.units-table tbody tr:nth-child(even) td { background: var(--bg-2); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }
.faq-question i { font-size: 12px; color: var(--text-dim); transition: transform var(--transition), color var(--transition); flex-shrink: 0; }
.faq-item.open .faq-question i { transform: rotate(180deg); color: var(--accent); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
  padding: 0 18px;
}
.faq-item.open .faq-answer { max-height: 500px; padding: 0 18px 16px; }

/* People also search */
.also-search-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.also-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.also-search-chip:hover {
  background: var(--blue-dim);
  border-color: var(--blue);
  color: var(--blue);
}
body.light-theme .also-search-chip:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.also-search-chip i { font-size: 12px; }

/* ============================================
   AD SLOT
   ============================================ */
.ad-slot {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 40px;
}
.ad-slot > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ============================================
   TOPIC CLUSTER
   ============================================ */
.topic-cluster-section {
  position: relative;
  z-index: 1;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.topic-cluster-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}
.topic-cluster-header { max-width: 680px; margin-bottom: 40px; }
.topic-cluster-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 8px;
  background: var(--purple-dim);
  border: 1px solid rgba(167,139,250,0.22);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.topic-cluster-header h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text);
  margin-bottom: 12px;
}
.topic-cluster-header p { font-size: 15px; line-height: 1.75; color: var(--text-muted); }

.cluster-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-bottom: 40px;
  align-items: start;
}
.cluster-primary {
  background: var(--surface);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
body.light-theme .cluster-primary { border-color: var(--accent); }
.cluster-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--blue-dim) 0%, transparent 60%);
  pointer-events: none;
}
.cluster-primary-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 10px;
}
body.light-theme .cluster-primary-label { color: var(--accent); }
.cluster-primary h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  position: relative;
}
.cluster-primary p { font-size: 13px; line-height: 1.65; color: var(--text-muted); margin-bottom: 14px; position: relative; }
.cluster-keywords { display: flex; flex-wrap: wrap; gap: 6px; position: relative; }
.cluster-keywords span {
  padding: 3px 9px;
  background: var(--blue-dim);
  border: 1px solid rgba(91,156,246,0.2);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
}
body.light-theme .cluster-keywords span {
  background: var(--accent-dim);
  border-color: rgba(37,99,235,0.2);
  color: var(--accent);
}
.cluster-links {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cluster-links h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.cluster-link-list { display: flex; flex-direction: column; }
.cluster-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.cluster-link-item:last-child { border-bottom: none; }
.cluster-link-item:hover { background: var(--surface-2); }
.cluster-link-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--blue);
}
body.light-theme .cluster-link-icon { background: var(--accent-dim); color: var(--accent); }
.cluster-link-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cluster-link-text strong { font-size: 14px; font-weight: 600; color: var(--text); }
.cluster-link-text span { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.cluster-link-arrow { color: var(--text-dim); font-size: 12px; transition: transform var(--transition), color var(--transition); }
.cluster-link-item:hover .cluster-link-arrow { transform: translateX(3px); color: var(--blue); }
.cluster-link-all { background: var(--bg-2); }
.cluster-link-all .cluster-link-icon { background: var(--purple-dim); color: var(--purple); }

.cluster-crosslinks { padding-top: 32px; border-top: 1px solid var(--border); }
.cluster-crosslinks h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 6px;
}
.cluster-crosslinks > p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.crosslink-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.crosslink-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.crosslink-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
body.light-theme .crosslink-card:hover { border-color: var(--accent); }
.crosslink-card i { font-size: 20px; color: var(--blue); }
body.light-theme .crosslink-card i { color: var(--accent); }
.crosslink-card strong { font-family: 'Bricolage Grotesque', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); }
.crosslink-card span { font-size: 12px; line-height: 1.5; color: var(--text-dim); }

/* ============================================
   FADE-UP ANIMATION
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.1s;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .wc-tool {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
  /* Break editor col apart so stats can sit between textarea and keywords */
  .wc-editor-col {
    display: contents;
  }
  .wc-textarea-wrap {
    order: 1;
  }
  .wc-stats-col {
    position: static;
    order: 2;
  }
  .wc-keywords {
    order: 3;
  }
  .cluster-grid { grid-template-columns: 1fr; }
  .crosslink-grid { grid-template-columns: 1fr 1fr; }
  .use-cases-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wc-page { padding: 24px 16px 48px; }
  .use-cases-grid { grid-template-columns: 1fr; }
  .crosslink-grid { grid-template-columns: 1fr 1fr; }
  .topic-cluster-inner { padding: 36px 16px; }
  .wc-textarea { min-height: 240px; }
  .wc-kw-bar-cell { display: none; }
  .crosslink-grid { grid-template-columns: 1fr; }

  /* Table columns: drop fixed widths so they flex to available space */
  .wc-keywords-table { font-size: 12px; }
  .wc-keywords-table th,
  .wc-keywords-table td { padding: 8px 8px; }
  .wc-kw-rank  { width: auto; }
  .wc-kw-count { width: auto; }
  .wc-kw-density { width: auto; }

  /* Stats card: slightly tighter on very small screens */
  .wc-stat-row { padding: 8px 12px; }
  .wc-stat-primary .wc-stat-value { font-size: 18px; }
  .wc-stat-value { font-size: 15px; }
}
