@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f3f6fc;
  --bg-panel: #ffffff;
  --bg-soft: #f8fbff;
  --text: #0f172a;
  --muted: #5b6780;
  --border: rgba(148, 163, 184, 0.25);
  --line: rgba(148, 163, 184, 0.15);
  --primary: #3b82f6;
  --primary-strong: #1d4ed8;
  --primary-soft: rgba(59, 130, 246, 0.12);
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --shadow-soft: 0 16px 32px rgba(15, 23, 42, 0.08);
  --shadow-lift: 0 22px 44px rgba(15, 23, 42, 0.14);
  --shadow-primary: 0 18px 36px rgba(37, 99, 235, 0.22);
  --container: 1200px;
  --ease: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-title: "Poppins", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(circle at 7% -8%, rgba(59, 130, 246, 0.18), transparent 24%),
    radial-gradient(circle at 94% 2%, rgba(59, 130, 246, 0.1), transparent 24%),
    linear-gradient(180deg, #fafdff 0%, var(--bg) 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

textarea {
  resize: vertical;
}

[id] {
  scroll-margin-top: 6rem;
}

.skip-link {
  position: absolute;
  top: -3.2rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  font-weight: 700;
  transition: top var(--ease);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  background: rgba(248, 251, 255, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.3rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  box-shadow: var(--shadow-primary);
}

.site-nav ul,
.footer-links,
.sidebar-links,
.hero-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.38rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  color: #334155;
  font-weight: 600;
  transition: color var(--ease), background var(--ease), transform var(--ease);
}

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

.site-nav a:hover {
  transform: translateY(-1px);
}

.site-nav a:focus-visible,
.btn:focus-visible,
.action-btn:focus-visible,
.faq-item summary:focus-visible,
.social-link:focus-visible,
.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-email:focus-visible,
.utility-mode-btn:focus-visible,
.article-toc a:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.26);
  outline-offset: 2px;
}

.hero-section,
.tool-section,
.info-section,
.faq-section,
.content-section {
  padding: 2.2rem 0 0;
}

.hero-grid,
.main-layout,
.tool-page-grid,
.tool-workspace,
.info-grid,
.stats-grid,
.editor-toolbar,
.editor-footer,
.editor-actions,
.footer-grid,
.contact-grid,
.page-grid,
.utility-mode-grid,
.utility-output-actions,
.workspace-metrics {
  display: grid;
  gap: 1rem;
}

.eyebrow,
.section-tag,
.hero-card-tag,
.tool-link-tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  color: var(--primary-strong);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--primary-soft);
}

.hero-copy h1,
.section-heading h2,
.page-hero h1,
.analysis-card h3,
.sidebar-card h2,
.page-card h2,
.contact-page-card h2,
.tool-primary-card h2,
.tool-primary-card h3,
.utility-output-title {
  margin: 0;
  font-family: var(--font-title);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-copy h1 {
  margin-top: 1rem;
  font-size: clamp(2.2rem, 6vw, 4.1rem);
}

.hero-text,
.section-heading p,
.hero-card p,
.stat-note,
.analysis-meta,
.analysis-empty,
.info-card p,
.faq-item p,
.sidebar-card p,
.page-card p,
.site-footer p,
.editor-help,
.editor-toolbar-note,
.editor-actions-text,
.editor-status,
.utility-output-copy {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.45rem;
}

.btn,
.action-btn,
.contact-email,
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform var(--ease),
    box-shadow var(--ease),
    border-color var(--ease),
    background var(--ease),
    color var(--ease);
}

.btn:hover,
.action-btn:hover,
.contact-email:hover,
.social-link:hover {
  transform: translateY(-2px);
}

.btn {
  min-width: 12rem;
  padding: 0.9rem 1.25rem;
}

.btn-primary,
.action-btn-primary,
.contact-submit {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: var(--shadow-primary);
}

.btn-secondary,
.action-btn,
.contact-email {
  border-color: var(--border);
  background: #fff;
}

.hero-card,
.tool-shell,
.analysis-card,
.info-card,
.sidebar-card,
.page-card,
.contact-page-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.hero-card,
.tool-shell,
.page-card,
.contact-page-card,
.analysis-card,
.sidebar-card,
.info-card {
  padding: 1.2rem;
}

.hero-card-title {
  margin: 0.85rem 0 0.6rem;
  font-size: 1.42rem;
  font-family: var(--font-title);
  font-weight: 700;
}

.hero-feature-list {
  display: grid;
  gap: 0.55rem;
}

.hero-feature-list li {
  position: relative;
  padding-left: 1.2rem;
}

.hero-feature-list li::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 0;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  background: var(--primary);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 1.45rem;
}

.section-heading h2,
.page-hero h1 {
  margin-top: 0.7rem;
  font-size: clamp(1.85rem, 4.2vw, 2.95rem);
}

.section-heading.section-heading-compact h2 {
  font-size: clamp(1.55rem, 3.3vw, 2.2rem);
}

.page-hero .container,
.hero-section .container {
  padding: clamp(1.25rem, 2vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-xl) + 2px);
  background:
    linear-gradient(135deg, rgba(227, 238, 255, 0.78), rgba(255, 255, 255, 0.95)),
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.12), transparent 45%);
  box-shadow: var(--shadow-soft);
}

.main-layout {
  grid-template-columns: minmax(0, 1fr);
}

.tool-shell {
  background: rgba(255, 255, 255, 0.9);
}

.tool-page-shell,
.workspace-shell {
  position: relative;
  border-radius: calc(var(--radius-xl) + 2px);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 40%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.workspace-sidebar {
  padding: 1.2rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.workspace-sidebar-kicker,
.workspace-main-kicker,
.editor-actions-kicker,
.tool-primary-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 0.26rem 0.64rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
}

.workspace-sidebar h3 {
  margin: 0.65rem 0 0.2rem;
  font-size: 1.18rem;
  font-family: var(--font-title);
}

.workspace-tool-list {
  display: grid;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
  gap: 0.28rem;
}

.workspace-tool-list a {
  display: block;
  padding: 0.52rem 0.7rem;
  border-radius: var(--radius-sm);
  color: #334155;
  font-weight: 600;
  transition: background var(--ease), color var(--ease);
}

.workspace-tool-list a:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.workspace-sidebar-cta {
  width: 100%;
}

.workspace-main {
  padding: 1.2rem;
}

.workspace-main-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1rem;
}

.workspace-main-head h3 {
  margin: 0.52rem 0 0.45rem;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

.workspace-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
}

.workspace-editor textarea {
  width: 100%;
  min-height: 176px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  line-height: 1.62;
  color: #0f172a;
  background: #ffffff;
}

.workspace-editor-status {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.workspace-metrics {
  margin-top: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workspace-metric {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.workspace-metric span {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
}

.workspace-metric strong {
  margin-top: 0.32rem;
  display: block;
  font-size: 1.44rem;
  font-family: var(--font-title);
  letter-spacing: -0.02em;
}

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

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

.tool-link-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.tool-link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(59, 130, 246, 0.25);
}

.tool-link-card h3 {
  margin: 0.66rem 0 0.45rem;
  font-size: 1.25rem;
  font-family: var(--font-title);
}

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

.tool-link-card-active {
  border-color: rgba(59, 130, 246, 0.44);
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
}

.main-column > * + * {
  margin-top: 1rem;
}

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

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

.editor-panel,
.utility-output-panel,
.tool-primary-card,
.analysis-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.editor-panel,
.utility-output-panel,
.tool-primary-card,
.analysis-card {
  padding: 1rem;
}

.editor-toolbar-title {
  display: block;
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.editor-toolbar-note,
.editor-actions-text {
  margin: 0.4rem 0 0;
}

.editor-actions-shell {
  margin: 0.85rem 0 0.8rem;
  padding: 0.95rem;
  border: 1px dashed rgba(59, 130, 246, 0.38);
  border-radius: var(--radius-md);
  background: #f8fbff;
}

.editor-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 0.8rem;
}

.action-btn {
  width: 100%;
  align-items: flex-start;
  text-align: left;
  flex-direction: column;
  border-radius: var(--radius-sm);
  border-color: var(--border);
  padding: 0.72rem 0.8rem;
  background: #fff;
}

.action-btn-primary {
  border-color: transparent;
}

.action-btn-ghost {
  background: #f8fbff;
}

.action-btn-label {
  font-weight: 700;
}

.action-btn-note {
  margin-top: 0.22rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.editor-stage textarea {
  width: 100%;
  min-height: 190px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  color: #0f172a;
  padding: 0.95rem 1rem;
  line-height: 1.6;
}

.editor-stage textarea:read-only {
  background: #f8fbff;
}

.editor-help,
.editor-status {
  margin: 0;
}

.editor-status {
  font-weight: 700;
}

.editor-status[data-state="success"] {
  color: var(--success);
}

.editor-status[data-state="warning"] {
  color: var(--warning);
}

.editor-status[data-state="error"] {
  color: var(--danger);
}

.tool-primary-card h2,
.tool-primary-card h3 {
  margin-top: 0.65rem;
  font-size: 1.38rem;
}

.tool-primary-value {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-family: var(--font-title);
}

.tool-primary-note {
  margin: 0.42rem 0 0;
  color: var(--muted);
}

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

.stat-card {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.stat-card-featured {
  border-color: rgba(59, 130, 246, 0.3);
  background: linear-gradient(180deg, #ffffff, #f4f9ff);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.stat-value {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.72rem;
  font-family: var(--font-title);
  letter-spacing: -0.03em;
}

.stat-note {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
}

.analysis-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.analysis-meta,
.analysis-empty {
  margin: 0;
}

.analysis-card h4 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-family: var(--font-title);
}

.top-words-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.top-words-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.62rem;
  background: #fff;
}

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

.word-count {
  color: var(--muted);
  font-weight: 600;
}

#tool-highlight-paragraphs,
#tool-highlight-syllables {
  display: grid;
  gap: 0.45rem;
}

.highlight-paragraph {
  margin: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  color: #1e293b;
}

.highlight-paragraph.color-1 {
  background: #eff6ff;
}

.highlight-paragraph.color-2 {
  background: #f0fdf4;
}

.highlight-paragraph.color-3 {
  background: #fff7ed;
}

.highlight-paragraph.color-4 {
  background: #faf5ff;
}

.syllable-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.38rem 0.38rem 0;
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: #eef5ff;
  font-weight: 700;
  color: #1e3a8a;
}

.syllable-chip em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-style: normal;
  font-size: 0.77rem;
  font-weight: 800;
}

.highlight-note {
  margin: 0;
  color: var(--muted);
}

.utility-workbench {
  display: grid;
  gap: 1rem;
}

.utility-output-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.utility-mode-grid {
  margin-top: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.utility-mode-btn[data-active="true"] {
  border-color: rgba(59, 130, 246, 0.55);
  background: #edf4ff;
}

.utility-stat-list {
  display: grid;
  gap: 0.55rem;
}

.utility-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
}

.utility-stat-item span {
  color: var(--muted);
}

.utility-stat-item strong {
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.utility-empty {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.article-page-card {
  padding: 1.2rem;
}

.article-page-card section + section {
  margin-top: 1.2rem;
}

.article-page-card h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.article-page-card h3 {
  margin: 0.55rem 0 0.4rem;
  font-size: clamp(1.12rem, 2vw, 1.34rem);
  font-family: var(--font-title);
}

.article-page-card p {
  margin: 0.5rem 0 0;
}

.article-page-card a {
  color: var(--primary-strong);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.article-example-box {
  margin-top: 0.7rem;
  padding: 0.9rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  background: #f3f8ff;
}

.article-example-box strong {
  display: block;
  margin-top: 0.42rem;
  font-weight: 800;
}

.article-example-box strong:first-child {
  margin-top: 0;
}

.article-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.article-inline-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: #eef5ff;
  font-weight: 700;
  text-decoration: none;
}

.article-meta {
  margin-bottom: 1rem;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.article-meta-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.62rem 0.7rem;
  background: #f8fbff;
}

.article-meta-item span {
  display: block;
  font-size: 0.77rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-meta-item strong {
  margin-top: 0.24rem;
  display: block;
  font-family: var(--font-title);
  font-size: 0.98rem;
}

.sticky-toc {
  position: sticky;
  top: 6.2rem;
}

.article-toc {
  display: grid;
  gap: 0.2rem;
}

.article-toc a {
  display: block;
  padding: 0.4rem 0.52rem;
  border-radius: 0.55rem;
  color: #334155;
  font-weight: 600;
  font-size: 0.93rem;
  transition: background var(--ease), color var(--ease);
}

.article-toc a.toc-level-3 {
  margin-left: 0.72rem;
  font-size: 0.88rem;
}

.article-toc a:hover,
.article-toc a.is-active {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.guide-mini-tool {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 1rem;
}

.guide-mini-tool h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-title);
}

.guide-mini-tool p {
  margin: 0.4rem 0 0;
}

.guide-mini-tool textarea {
  width: 100%;
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 98px;
  padding: 0.65rem 0.75rem;
}

.guide-mini-stats {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-mini-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbff;
  padding: 0.55rem;
}

.guide-mini-stat span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.guide-mini-stat strong {
  display: block;
  margin-top: 0.24rem;
  font-family: var(--font-title);
  font-size: 1rem;
}

.article-sources ul {
  margin: 0.7rem 0 0;
  padding-left: 1.15rem;
}

.article-sources li + li {
  margin-top: 0.4rem;
}

/* ===== Editorial look (solo articulos/guías) ===== */
.guide-page .content-section {
  padding-top: 1.35rem;
}

.guide-page .main-layout {
  grid-template-columns: minmax(0, 1fr);
}

.guide-page .main-column {
  max-width: 920px;
  margin: 0 auto;
}

.guide-page .article-page-card {
  padding: clamp(1.3rem, 2.2vw, 2rem) clamp(1.1rem, 2.4vw, 2.2rem);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: none;
  background: #ffffff;
}

.guide-page .article-page-card section + section {
  margin-top: 1.8rem;
  padding-top: 1.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.guide-page .article-page-card h2 {
  margin: 0 0 0.72rem;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.22;
}

.guide-page .article-page-card h3 {
  margin: 0.9rem 0 0.42rem;
  font-size: clamp(1.08rem, 1.8vw, 1.34rem);
  line-height: 1.3;
}

.guide-page .article-page-card p {
  margin: 0.7rem 0 0;
  color: #334155;
  font-size: 1.03rem;
  line-height: 1.82;
}

.guide-page .article-page-card ul,
.guide-page .article-page-card ol {
  margin: 0.85rem 0 0;
  padding-left: 1.25rem;
  color: #334155;
}

.guide-page .article-page-card li + li {
  margin-top: 0.32rem;
}

.guide-page .article-example-box {
  margin-top: 0.95rem;
  padding: 1rem 1rem 0.95rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
}

.guide-page .article-inline-links {
  margin-top: 1.05rem;
}

.guide-page .article-inline-link {
  background: #f8fbff;
  border-color: rgba(59, 130, 246, 0.24);
}

.guide-page .section-heading {
  margin-bottom: 1rem;
}

.guide-page .tool-links-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.guide-page .tool-link-card {
  border-radius: 12px;
  box-shadow: none;
  background: #ffffff;
}

.guide-page .tool-link-card h3 {
  margin: 0.45rem 0 0.36rem;
  font-size: 1.06rem;
  line-height: 1.32;
}

.guide-page .tool-link-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
  font-size: 0.95rem;
}

.guide-page .faq-section {
  margin-top: 0.35rem;
}

.guide-page .faq-list {
  max-width: 860px;
  margin-inline: auto;
}

.guide-page .faq-item {
  border-radius: 12px;
  box-shadow: none;
}

.guide-page .faq-item summary {
  font-size: 1.01rem;
}

.guide-page .sidebar-column {
  max-width: 920px;
  margin: 0.75rem auto 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .guide-page .tool-links-grid {
    grid-template-columns: 1fr;
  }

  .guide-page .sidebar-column {
    grid-template-columns: 1fr;
  }
}

.sidebar-column {
  display: grid;
  align-content: start;
  gap: 0.95rem;
}

.sidebar-card h2 {
  font-size: 1.1rem;
}

.sidebar-links {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.25rem;
}

.sidebar-links a {
  display: block;
  border-radius: 0.55rem;
  padding: 0.38rem 0.5rem;
  color: #334155;
  font-weight: 600;
  transition: background var(--ease), color var(--ease);
}

.sidebar-links a:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 980px;
  margin-inline: auto;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  position: relative;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 255, 0.98));
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 0.82rem;
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  margin: 0;
  padding: 0 1.1rem 1rem;
}

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

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

.page-card h2,
.contact-page-card h2 {
  font-size: 1.2rem;
}

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

.contact-form {
  display: grid;
  gap: 0.75rem;
}

.form-row {
  display: grid;
  gap: 0.3rem;
}

.form-row label {
  font-weight: 700;
  color: #334155;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.75rem;
  background: #ffffff;
}

.contact-form textarea {
  min-height: 120px;
}

.contact-email {
  width: fit-content;
  margin: 0.5rem 0 0.25rem;
  padding: 0.65rem 0.95rem;
  color: var(--primary-strong);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
}

.social-link {
  gap: 0.52rem;
  padding: 0.5rem 0.74rem;
  border-radius: 999px;
  border-color: var(--border);
  background: #fff;
}

.social-badge {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.76rem;
}

.site-footer {
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.brand-footer {
  margin-bottom: 0.4rem;
}

.footer-links {
  display: grid;
  gap: 0.28rem;
}

.footer-links a {
  color: #334155;
  font-weight: 600;
}

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

.print-mode .site-header,
.print-mode .site-footer,
.print-mode .sidebar-column,
.print-mode .hero-actions,
.print-mode .editor-actions-shell,
.print-mode .tool-links-grid,
.print-mode .faq-section {
  display: none !important;
}

.print-mode .main-layout,
.print-mode .tool-page-grid {
  grid-template-columns: 1fr !important;
}

.print-mode .tool-page-shell,
.print-mode .analysis-card,
.print-mode .editor-panel {
  box-shadow: none;
  border-color: #cbd5e1;
}

.print-target {
  break-inside: avoid;
}

/* Cookie consent */
.cookie-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  max-width: 1020px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-lift);
  padding: 1rem;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent h2 {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--font-title);
}

.cookie-consent p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.cookie-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-action-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.cookie-action-btn.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.cookie-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
}

.cookie-modal[hidden] {
  display: none !important;
}

.cookie-modal-card {
  width: min(640px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  padding: 1.15rem 1.15rem 1rem;
}

.cookie-modal-card h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.25rem;
}

.cookie-modal-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.cookie-option {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.86rem 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.76);
}

.cookie-option strong {
  font-size: 0.97rem;
}

.cookie-option p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

.cookie-manage-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
}

body.cookie-modal-open {
  overflow: hidden;
}

.cookie-manage-btn[hidden] {
  display: none !important;
}

/* Enhanced visual hierarchy for page shells */
.page-shell .page-hero .container,
.page-shell .hero-section .container,
.page-shell .tool-shell,
.page-shell .page-card,
.page-shell .sidebar-card,
.page-shell .analysis-card,
.page-shell .contact-page-card {
  backdrop-filter: blur(2px);
}

/* Home focused on word counter */
.home-word-counter .site-header {
  background: rgba(255, 255, 255, 0.92);
}

.home-topbar .header-inner {
  gap: 1rem;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.theme-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: var(--shadow-soft);
}

.theme-toggle-icon {
  font-size: 1rem;
}

.home-counter-hero {
  padding-bottom: 1.15rem;
}

.home-counter-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.section-heading-center {
  text-align: center;
}

.about-web-section {
  padding-top: 1.55rem;
  padding-bottom: 1.25rem;
}

.about-web-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about-web-inner h2 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about-web-copy {
  max-width: 700px;
  margin: 0.9rem auto 0;
  color: #444;
  line-height: 1.78;
}

.about-web-badges {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.62rem;
}

.about-web-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.56rem 0.64rem;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.32;
}

.about-web-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #dbeafe;
  font-size: 0.86rem;
}

.ah-home-blog {
  padding-top: 0.45rem;
  padding-bottom: 1.55rem;
}

.ah-home-blog-shell {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ah-home-blog-head {
  max-width: 760px;
  margin: 0 auto 1.7rem;
  text-align: center;
}

.ah-home-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.ah-home-blog-card {
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.ah-home-blog-card .blog-card-link {
  height: 100%;
}

.ah-home-blog-card .blog-card-body {
  display: grid;
  gap: 0.58rem;
  min-height: 248px;
}

.ah-home-blog-card-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.18rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ah-home-blog-card .blog-card p {
  margin: 0;
}

.ah-home-blog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.ah-home-blog-meta {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
}

.ah-home-blog-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
}

.ah-home-blog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.8rem 1.45rem;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
  color: #1d4ed8;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.1);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), color var(--ease);
}

.ah-home-blog-button:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.45);
  color: #1e3a8a;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.14);
}

.blog-hub-page .ah-nav > a.is-current {
  color: #1d4ed8;
  font-weight: 800;
}

.blog-hub-hero .container {
  text-align: center;
  max-width: 880px;
}

.blog-hub-section {
  padding-top: 0.65rem;
}

.blog-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.blog-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-soft);
}

.blog-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.blog-card-media {
  position: relative;
  min-height: 172px;
  max-height: 172px;
  overflow: hidden;
  background: #eaf1ff;
}

.blog-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.34s ease, filter 0.34s ease;
}

.blog-card-link:hover .blog-card-image {
  transform: scale(1.05);
  filter: saturate(1.04) contrast(1.02);
}

.blog-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 16, 43, 0.02) 0%, rgba(7, 16, 43, 0.15) 100%);
}

.blog-card-body {
  padding: 0.88rem 0.9rem 1rem;
}

.blog-card-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.24rem 0.56rem;
  border: 1px solid rgba(59, 130, 246, 0.26);
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.blog-card h2 {
  margin: 0.56rem 0 0.44rem;
  font-family: var(--font-title);
  font-size: 1.03rem;
  line-height: 1.32;
}

.blog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
  font-size: 0.95rem;
}

.blog-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.82rem;
  padding: 0.45rem 0.84rem;
  border-radius: 9px;
  border: 1px solid rgba(59, 130, 246, 0.34);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  transition: transform var(--ease), border-color var(--ease), background-color var(--ease), color var(--ease);
}

.blog-card-link:hover .blog-card-cta {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.52);
  background: #dbeafe;
  color: #1e3a8a;
}

.home-counter-layout {
  grid-template-columns: 1fr;
}

.home-counter-layout .main-column {
  max-width: 1100px;
  margin: 0 auto;
}

.home-editor-stage textarea {
  min-height: 300px;
}

.home-metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.home-word-counter .stat-card {
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.home-word-counter .stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow-soft);
}

.top-words-table-wrap {
  overflow-x: auto;
}

.top-words-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.top-words-table th,
.top-words-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.62rem 0.55rem;
  text-align: left;
}

.top-words-table th {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 980px) {
  .about-web-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .about-web-badges {
    grid-template-columns: 1fr;
  }

  .blog-hub-grid {
    grid-template-columns: 1fr;
  }
}

.top-words-table td:nth-child(2),
.top-words-table td:nth-child(3) {
  font-weight: 700;
}

.top-words-table tbody tr:hover td {
  background: #f8fbff;
}

.highlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.highlight-toggle-btn {
  min-width: 180px;
}

.highlight-toggle-btn.is-off {
  opacity: 0.86;
  filter: saturate(0.7);
}

.highlight-block[hidden] {
  display: none !important;
}

.ad-slot {
  margin-top: 0.95rem;
  border: 1px dashed rgba(59, 130, 246, 0.45);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  padding: 1rem;
  text-align: center;
}

.ad-slot span {
  color: #4b5563;
  font-weight: 600;
}

.ad-slot-between,
.ad-slot-final {
  margin-top: 0;
  margin-bottom: 0;
}

.seo-section {
  padding-top: 1.35rem;
}

.seo-section-inner {
  max-width: 1020px;
}

.seo-section-inner h2 {
  margin-top: 0;
}

.seo-cases-grid {
  margin-top: 0.5rem;
}

.roadmap-section .page-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.modern-footer {
  margin-top: 2.2rem;
}

.modern-footer-top {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  padding: 1.7rem 0 1.2rem;
}

.modern-footer-brand h2 {
  margin: 0;
  font-size: 1.5rem;
}

.modern-footer-brand p {
  margin: 0.55rem 0 0;
  max-width: 560px;
}

.modern-footer-column h3 {
  margin: 0;
  font-size: 1.12rem;
}

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

.modern-footer-column a {
  color: #334155;
  font-weight: 600;
}

.modern-footer-column a:hover {
  color: var(--primary-strong);
}

.modern-footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modern-footer-bottom p {
  margin: 0;
}

.modern-footer-langs {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.modern-footer-langs a {
  font-weight: 700;
}

.modern-footer-langs a[aria-current="true"] {
  color: var(--primary-strong);
}

/* Theme */
:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-panel: #111a2b;
  --bg-soft: #0f172a;
  --text: #e5ecff;
  --muted: #a7b4ce;
  --border: rgba(148, 163, 184, 0.28);
  --line: rgba(148, 163, 184, 0.18);
  --primary-soft: rgba(59, 130, 246, 0.22);
  --shadow-soft: 0 16px 32px rgba(2, 6, 23, 0.4);
  --shadow-lift: 0 22px 44px rgba(2, 6, 23, 0.55);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 7% -8%, rgba(59, 130, 246, 0.24), transparent 24%),
    radial-gradient(circle at 94% 2%, rgba(59, 130, 246, 0.16), transparent 24%),
    linear-gradient(180deg, #0a1120 0%, #0b1220 100%);
}

:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .tool-shell,
:root[data-theme="dark"] .page-card,
:root[data-theme="dark"] .analysis-card,
:root[data-theme="dark"] .editor-panel,
:root[data-theme="dark"] .tool-primary-card,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .faq-item,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .cookie-consent,
:root[data-theme="dark"] .cookie-modal-card,
:root[data-theme="dark"] .theme-toggle-btn,
:root[data-theme="dark"] .ad-slot {
  background: #111a2b;
}

:root[data-theme="dark"] .tool-link-card,
:root[data-theme="dark"] .top-words-list li,
:root[data-theme="dark"] .editor-stage textarea,
:root[data-theme="dark"] .contact-form input,
:root[data-theme="dark"] .contact-form textarea,
:root[data-theme="dark"] .top-words-table tbody tr:hover td {
  background: #0f172a;
}

/* Responsive */
@media (max-width: 1080px) {
  .modern-footer-top {
    grid-template-columns: 1fr;
  }

  .modern-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace-metrics {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-topbar .header-inner {
    align-items: stretch;
  }

  .theme-toggle-btn {
    width: 100%;
    justify-content: center;
  }

  .site-nav ul {
    justify-content: flex-start;
  }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-column {
    order: -1;
  }

  .sticky-toc {
    position: static;
  }

  .tool-page-grid {
    grid-template-columns: 1fr;
  }

  .guide-mini-stats {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
}

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

  .hero-copy h1 {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .section-heading h2,
  .page-hero h1 {
    font-size: clamp(1.55rem, 6.2vw, 2.2rem);
  }

  .btn {
    min-width: auto;
    width: 100%;
  }

  .hero-actions,
  .workspace-main-actions,
  .cookie-actions,
  .highlight-actions {
    flex-direction: column;
  }

  .tool-links-grid,
  .page-grid,
  .info-grid,
  .stats-grid.tool-secondary-grid {
    grid-template-columns: 1fr;
  }

  .cookie-consent {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
  }
}

/* ===== App Home (contador principal) ===== */
.app-home {
  background:
    radial-gradient(circle at 7% -8%, rgba(59, 130, 246, 0.14), transparent 24%),
    radial-gradient(circle at 94% 2%, rgba(59, 130, 246, 0.09), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
  color: #0f172a;
}

.app-home .container {
  width: min(1260px, calc(100% - 1.6rem));
}

.ah-topbar {
  position: sticky;
  top: 0;
  z-index: 140;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.ah-topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.9rem;
}

.ah-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.64rem;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ah-brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.ah-brand-text {
  font-family: var(--font-title);
  font-size: 1.2rem;
}

.ah-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  margin-right: 0.2rem;
}

.ah-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0.42rem 0.74rem;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color var(--ease), background var(--ease);
}

.ah-nav a:hover {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}

.ah-nav-dropdown {
  position: relative;
  z-index: 150;
}

.ah-nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 2.3rem;
  padding: 0.42rem 0.74rem;
  border: 0;
  border-radius: 999px;
  color: #334155;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--ease), background var(--ease);
}

.ah-nav-dropdown-trigger:hover {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}

.ah-nav-dropdown-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transform: translateY(1px);
}

.ah-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 220;
  min-width: 240px;
  display: grid;
  gap: 0.2rem;
  padding: 0.44rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.995);
  box-shadow:
    0 24px 46px rgba(15, 23, 42, 0.18),
    0 6px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
}

.ah-nav-dropdown-menu a {
  min-height: 2.05rem;
  border-radius: 9px;
  font-size: 0.95rem;
  background: transparent;
}

.ah-nav-dropdown.is-open .ah-nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.ah-theme-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.ah-theme-icon {
  width: 1rem;
  height: 1rem;
  color: #64748b;
}

.ah-theme-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ah-theme-icon svg circle {
  fill: currentColor;
}

.ah-theme-switch {
  width: 50px;
  height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  background: #dbeafe;
  padding: 3px;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}

.ah-theme-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: block;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.25);
  transition: transform var(--ease);
}

.ah-theme-switch[aria-checked="true"] .ah-theme-thumb {
  transform: translateX(22px);
}

.ah-workspace {
  padding: 1.2rem 0 0.55rem;
}

.ah-shell {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
}

.ah-shell.is-expanded {
  grid-template-columns: 236px minmax(0, 1fr);
}

.ah-sidebar {
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.4rem 0.26rem;
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
  overflow: hidden;
}

.ah-sidebar-toggle {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #ffffff;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.2rem;
  cursor: pointer;
}

.ah-sidebar-logo-text {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.92rem;
  display: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

.ah-hamburger-icon {
  width: 22px;
  height: 16px;
  display: inline-grid;
  gap: 3px;
  align-content: center;
}

.ah-hamburger-icon span {
  height: 2px;
  border-radius: 999px;
  background: #1d4ed8;
  width: 100%;
}

.ah-menu {
  display: grid;
  gap: 0.32rem;
}

.ah-sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 0.32rem;
}

.ah-menu-link {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  color: #334155;
  font-weight: 700;
  padding: 0.2rem;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.ah-menu-link:hover {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
}

.ah-menu-link.is-active {
  color: #0f172a;
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
}

.ah-menu-icon {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
  flex: 0 0 auto;
}

.ah-menu-label {
  display: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
  max-width: 160px;
}

.ah-shell.is-expanded .ah-menu-label {
  display: inline;
}

.ah-shell.is-expanded .ah-menu-link {
  justify-content: flex-start;
  padding-left: 0.42rem;
}

.ah-main {
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.ah-main-head h1 {
  margin: 0.5rem 0 0.2rem;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-family: var(--font-title);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.ah-main-head p {
  margin: 0;
  color: #5b6780;
}

.ah-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 0.85rem;
  align-items: start;
}

.ah-left-stack {
  display: grid;
  gap: 0.48rem;
  align-content: start;
}

.ah-editor-pane {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #ffffff;
  padding: 0.86rem;
  height: fit-content;
}

.ah-editor-stack {
  position: relative;
}

.ah-editor-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 0.85rem 0.92rem;
  border-radius: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-size: 1.02rem;
  font-family: var(--font-body);
  font-weight: 400;
  color: #0f172a;
  pointer-events: none;
  opacity: 0;
}

.ah-editor-overlay.is-visible {
  opacity: 1;
}

.ah-editor-pane textarea {
  width: 100%;
  min-height: min(46vh, 510px);
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  padding: 0.85rem 0.92rem;
  font-size: 1.02rem;
  line-height: 1.6;
  background: transparent;
  color: #0f172a;
  position: relative;
  z-index: 2;
}

.ah-editor-stack.is-overlay-mode textarea {
  color: transparent;
  caret-color: #0f172a;
  text-shadow: none;
}

.ah-editor-stack.is-overlay-mode textarea::selection {
  background: rgba(59, 130, 246, 0.22);
}

.ah-editor-pane textarea:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.22);
  outline-offset: 1px;
}

.ah-status {
  margin: 0.15rem 0 0;
  color: #5b6780;
  font-weight: 700;
  font-size: 0.92rem;
  min-height: 0;
}

.ah-status[data-state="ok"] {
  color: #166534;
}

.ah-status[data-state="warn"] {
  color: #b45309;
}

.ah-panel {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #ffffff;
  padding: 0.86rem;
  display: grid;
  align-content: start;
  gap: 0.72rem;
  height: fit-content;
}

.ah-actions {
  display: grid;
  gap: 0.48rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ah-actions button {
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}

.ah-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.45);
  color: #1d4ed8;
  background: linear-gradient(180deg, #f9fcff 0%, #e8f1ff 100%);
}

.ah-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ah-actions button.is-active {
  border-color: rgba(59, 130, 246, 0.5);
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 45%, #1d4ed8 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.ah-metrics {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ah-metrics article {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 0.48rem 0.58rem;
  background: #f8fbff;
}

.ah-metrics span {
  display: block;
  font-size: 0.79rem;
  color: #64748b;
}

.ah-metrics strong {
  display: block;
  margin-top: 0.14rem;
  font-size: 1.04rem;
  font-family: var(--font-title);
  letter-spacing: -0.02em;
}

.ah-analysis {
  display: grid;
  gap: 0.48rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.ah-analysis article {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 11px;
  background: #ffffff;
  padding: 0.62rem 0.75rem;
}

.ah-analysis span {
  display: block;
  color: #64748b;
  font-size: 0.84rem;
}

.ah-analysis strong {
  margin-top: 0.2rem;
  display: block;
  font-family: var(--font-title);
  font-size: 1.15rem;
}

.ah-analysis-inline {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.98rem;
}

.keyword-density-list {
  list-style: none;
  padding: 0;
  margin: 0.45rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.keyword-density-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.keyword-density-list li:last-child {
  border-bottom: none;
}

.keyword-density-list .kw-word {
  color: #0f172a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0.5rem;
}

.keyword-density-list .kw-count {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.75rem;
}

.keyword-density-list .kw-empty {
  color: #94a3b8;
  font-style: italic;
}

.ah-mark-paragraph {
  border-radius: 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.ah-mark-paragraph-1 {
  background: rgba(14, 165, 233, 0.24);
}

.ah-mark-paragraph-2 {
  background: rgba(59, 130, 246, 0.2);
}

.ah-mark-paragraph-3 {
  background: rgba(34, 197, 94, 0.18);
}

.ah-mark-paragraph-4 {
  background: rgba(250, 204, 21, 0.2);
}

.ah-mark-paragraph-5 {
  background: rgba(244, 114, 182, 0.18);
}

.ah-mark-paragraph-6 {
  background: rgba(168, 85, 247, 0.16);
}

.ah-mark-keyword {
  color: #166534;
  font-weight: 800;
  background: rgba(34, 197, 94, 0.26);
  border-radius: 4px;
}

.spell-lang-control {
  display: grid;
  gap: 0.3rem;
}

.spell-lang-control label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
}

.spell-lang-control select {
  width: 100%;
  min-height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  color: #0f172a;
  font-weight: 600;
  padding: 0 0.7rem;
}

.spell-overlay {
  z-index: 3;
  pointer-events: none;
}

.spell-editor {
  position: relative;
  z-index: 2;
}

.spell-overlay.is-visible {
  pointer-events: auto;
}

.ah-mark-error {
  border-radius: 4px;
  background: rgba(254, 226, 226, 0.92);
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: #dc2626;
  text-decoration-thickness: 1.5px;
  text-decoration-skip-ink: none;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  transition: background-color var(--ease), text-decoration-color var(--ease);
}

.ah-mark-error:hover {
  background: rgba(254, 202, 202, 0.96);
}

.spell-popup {
  position: absolute;
  z-index: 1200;
  width: min(280px, calc(100vw - 1.5rem));
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.spell-popup-header {
  padding: 0.56rem 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.spell-popup-list {
  display: grid;
  gap: 0.35rem;
  padding: 0.62rem;
}

.spell-popup-list button {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: #0f172a;
  font-weight: 700;
  text-align: left;
  padding: 0 0.6rem;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}

.spell-popup-list button:hover {
  border-color: rgba(59, 130, 246, 0.52);
  color: #1d4ed8;
  background: linear-gradient(180deg, #f8fbff 0%, #eaf2ff 100%);
}

.spell-popup-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.ah-mark-syllable-group {
  display: inline;
}

.ah-mark-syllable {
  border-radius: 4px;
  padding: 0 0.12rem;
  border: 1px solid transparent;
  font-weight: 800;
  color: #0f172a;
}

.ah-mark-syllable-1 {
  background: rgba(59, 130, 246, 0.26);
  border-color: rgba(29, 78, 216, 0.24);
}

.ah-mark-syllable-2 {
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(5, 150, 105, 0.24);
}

.ah-mark-syllable-3 {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(217, 119, 6, 0.24);
}

.ah-mark-syllable-4 {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(220, 38, 38, 0.2);
}

.ah-mark-syllable-5 {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(109, 40, 217, 0.24);
}

.ah-mark-syllable-6 {
  background: rgba(20, 184, 166, 0.22);
  border-color: rgba(13, 148, 136, 0.24);
}

.ah-syllable-sep {
  margin: 0 0.08rem;
  color: #2563eb;
  font-weight: 700;
}

.ah-content {
  padding: 1.15rem 0 0.1rem;
}

.ah-info-text {
  padding-top: 1rem;
  padding-bottom: 0.2rem;
}

.ah-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.ah-info-grid-vertical {
  grid-template-columns: 1fr;
}

.ah-info-card {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  padding: 1.05rem 1.1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.ah-info-head h2 {
  margin: 0.5rem 0 0.6rem;
  font-family: var(--font-title);
  font-size: clamp(1.26rem, 2.1vw, 1.58rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.ah-info-card p {
  margin: 0.58rem 0;
  color: #4b5973;
  font-size: 0.97rem;
  line-height: 1.66;
}

.ah-info-list {
  margin: 0.72rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.42rem;
}

.ah-info-list li {
  position: relative;
  padding-left: 1.05rem;
  color: #334155;
  font-size: 0.93rem;
  line-height: 1.55;
}

.ah-info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.53rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
}

/* Sorter page */
.sorter-workspace {
  padding-bottom: 0.4rem;
}

.sorter-main {
  gap: 0.9rem;
}

.sorter-main-head h1 {
  margin-bottom: 0.2rem;
}

.case-main {
  gap: 0.9rem;
}

.case-workbench {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.95));
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  padding: 0.92rem;
  display: grid;
  gap: 0.72rem;
}

.case-head h2 {
  margin: 0 0 0.28rem;
  font-family: var(--font-title);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.case-head p {
  margin: 0;
  color: #4b5973;
}

.case-focus-btn {
  margin-top: 0.62rem;
  min-width: 0;
  padding: 0.58rem 0.9rem;
}

.case-input,
.case-output {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 11px;
  background: #ffffff;
  padding: 0.78rem 0.88rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #0f172a;
}

.case-input {
  min-height: clamp(220px, 35vh, 340px);
  resize: vertical;
}

.case-output {
  min-height: 180px;
  resize: none;
}

.case-input:focus-visible,
.case-output:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}

.case-actions {
  margin-top: 0.1rem;
  gap: 0.72rem;
}

.case-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
}

.case-mode-grid {
  margin-top: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.52rem;
}

.case-output-actions {
  margin-top: 0.1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
}

.case-meta-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.62rem;
  margin-top: 0.1rem;
}

.case-stats-card h3 {
  margin: 0 0 0.52rem;
  font-family: var(--font-title);
  font-size: 1rem;
}

.case-stat-list {
  gap: 0.45rem;
}

.sorter-toolbar {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.62rem;
}

.sorter-toolbar-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
}

.sorter-toolbar-group:first-child {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sorter-btn {
  min-height: 2.55rem;
  padding: 0.45rem 0.68rem;
  border: 1px solid rgba(148, 163, 184, 0.33);
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  color: #1f2937;
  font-weight: 700;
  font-size: 0.91rem;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.sorter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.42);
}

.sorter-btn.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 45%, #1d4ed8 100%);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.sorter-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.52rem;
}

.sorter-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.sorter-options input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2563eb;
}

.sorter-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.sorter-panel {
  border: 1px solid rgba(148, 163, 184, 0.23);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.72rem;
}

.sorter-panel h2 {
  margin: 0 0 0.48rem;
  font-family: var(--font-title);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

#sort-input,
#summary-input,
.sort-output,
#summary-output {
  width: 100%;
  height: clamp(340px, 56vh, 520px);
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 11px;
  background: #ffffff;
  padding: 0.78rem 0.88rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #0f172a;
}

#sort-input {
  resize: none;
}

#summary-input {
  resize: none;
}

#sort-input:focus-visible,
#summary-input:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}

.sort-output {
  overflow: auto;
}

.sort-output-empty {
  margin: 0;
  color: #64748b;
}

.summary-controls {
  display: grid;
  gap: 0.78rem;
  margin-bottom: 0.82rem;
}

.summary-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
}

.summary-slider-row label {
  font-weight: 700;
  color: #1e293b;
}

#summary-ratio {
  width: 100%;
  accent-color: #2563eb;
  appearance: none;
  height: 1.15rem;
  background: transparent;
}

#summary-ratio::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.3), rgba(37, 99, 235, 0.75));
}

#summary-ratio::-webkit-slider-thumb {
  appearance: none;
  margin-top: -5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.36);
}

#summary-ratio::-moz-range-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.3), rgba(37, 99, 235, 0.75));
}

#summary-ratio::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.36);
}

.summary-toolbar-group {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-options {
  display: grid;
  gap: 0.52rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 2.2rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.48rem 0.62rem;
  color: #334155;
  font-weight: 600;
}

.summary-options input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
}

.summary-meta {
  display: grid;
  gap: 0.46rem;
  margin-top: 0.64rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-meta article {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.48rem 0.58rem;
}

.summary-meta span {
  display: block;
  font-size: 0.79rem;
  color: #64748b;
}

.summary-meta strong {
  display: block;
  margin-top: 0.14rem;
  font-size: 1.04rem;
  font-family: var(--font-title);
  letter-spacing: -0.02em;
}

.summary-loader {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1d4ed8;
  font-weight: 700;
}

.summary-loader::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-top-color: #2563eb;
  animation: summary-spin 700ms linear infinite;
}

.summary-status {
  margin: 0.42rem 0 0;
}

@keyframes summary-spin {
  to {
    transform: rotate(360deg);
  }
}

.sort-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 0.4rem;
  margin-bottom: 0.26rem;
}

.sort-line:last-child {
  margin-bottom: 0;
}

.sort-index {
  color: #475569;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sort-index.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.sort-word {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 0.05rem 0.34rem;
  border-radius: 6px;
  color: #0f172a;
  font-weight: 600;
  word-break: break-word;
}

.sorter-seo {
  padding-top: 0.7rem;
}

.sorter-seo .ah-info-grid-vertical {
  margin-bottom: 1.1rem;
}

.sorter-seo-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.95));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.05rem;
}

.sorter-seo-card h2 {
  margin: 1.15rem 0 0.56rem;
  font-family: var(--font-title);
  font-size: 1.15rem;
}

.sorter-seo-card h2:first-of-type {
  margin-top: 0.2rem;
}

.sorter-seo-card p {
  margin: 0 0 0.7rem;
  color: #4b5973;
}

.sorter-seo-card .ah-steps,
.sorter-seo-card .sorter-why-grid,
.sorter-seo-card .ah-extra-grid,
.sorter-seo-card .ah-info-list {
  margin-bottom: 1.05rem;
}

.sorter-why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
  margin-bottom: 0.8rem;
}

.summary-feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-feature-grid .sorter-why-card {
  padding: 0.72rem 0.62rem;
}

.summary-feature-grid .sorter-why-card h3 {
  font-size: 0.92rem;
}

.summary-feature-grid .sorter-why-card p {
  font-size: 0.88rem;
}

.sorter-why-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  padding: 0.82rem 0.78rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.96));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  text-align: center;
}

.sorter-why-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.42rem;
  font-size: 1rem;
  font-weight: 800;
  color: #1d4ed8;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.sorter-why-card h3 {
  margin: 0 0 0.28rem;
  font-family: var(--font-title);
  font-size: 0.98rem;
}

.sorter-why-card p {
  margin: 0;
  font-size: 0.93rem;
}

.sorter-how-diagram {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: center;
}

.sorter-how-diagram li {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  padding: 0.75rem 0.62rem;
  background: #ffffff;
  text-align: center;
  position: relative;
}

.sorter-how-diagram li:not(:last-child)::after {
  content: "->";
  position: absolute;
  top: 50%;
  right: -18px;
  transform: translateY(-50%);
  font-weight: 800;
  color: #3b82f6;
}

.sorter-how-step {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  margin-bottom: 0.35rem;
}

.sorter-how-diagram strong {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.94rem;
}

.sorter-how-diagram p {
  margin: 0;
  font-size: 0.88rem;
  color: #5b6a84;
}

.ah-extra-sections {
  margin-top: 1rem;
}

.ah-extra-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.ah-extra-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.96));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.ah-extra-card h4 {
  margin: 0 0 0.45rem;
  font-family: var(--font-title);
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.ah-extra-card p {
  margin: 0;
  color: #51607a;
}

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

.ah-value-card {
  text-align: center;
}

.ah-value-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 0.42rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

.ah-value-icon .ah-icon-svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.ah-audience-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ah-audience-card {
  padding-top: 0.85rem;
}

.ah-audience-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
  font-weight: 800;
  font-size: 0.82rem;
  color: #1d4ed8;
  background: #dbeafe;
}

.ah-audience-icon .ah-icon-svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.ah-compat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.ah-compat-item {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-height: 3rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 0.58rem 0.7rem;
  background: #ffffff;
  color: #334155;
}

.ah-os-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.13);
}

.ah-os-icon .ah-icon-svg {
  width: 18px;
  height: 18px;
}

.ah-os-icon.os-windows {
  color: #0a66ff;
  background: rgba(10, 102, 255, 0.13);
}

.ah-os-icon.os-macos {
  color: #1f2937;
  background: rgba(100, 116, 139, 0.2);
}

.ah-os-icon.os-linux {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.2);
}

.ah-os-icon.os-android {
  color: #34a853;
  background: rgba(52, 168, 83, 0.13);
}

.ah-os-icon.os-ios {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.2);
}

.ah-os-icon.os-chromeos {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}

.ah-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ah-steps-diagram {
  position: relative;
  gap: 0.1rem;
  align-items: start;
  overflow: visible;
}

.ah-steps-diagram::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.58), rgba(59, 130, 246, 0.2));
  z-index: 0;
}

.ah-steps-diagram li {
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
  padding: 0.2rem 0.35rem 0.2rem;
  overflow: visible;
}

.ah-steps-diagram li::before {
  display: none;
}

.ah-steps-diagram li:not(:last-child)::after {
  content: "->";
  position: absolute;
  top: 58px;
  right: -8px;
  z-index: 2;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: #3b82f6;
}

.ah-step-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1d4ed8;
}

.ah-step-circle {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  margin: 0.32rem auto 0.48rem;
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  font-size: 1.26rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 14px 24px rgba(59, 130, 246, 0.3);
}

.ah-steps:not(.ah-steps-diagram) li {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.75rem;
  position: relative;
}

.ah-steps:not(.ah-steps-diagram) li::before {
  content: "";
  position: absolute;
  top: -0.4rem;
  left: 1rem;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.ah-steps strong {
  display: block;
  font-size: 0.95rem;
}

.ah-steps p {
  margin: 0.36rem 0 0;
  color: #5b6780;
}

.ah-features-title {
  margin: 1rem 0 0.66rem;
  font-size: 1.28rem;
}

.ah-features {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ah-features article {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.78rem;
}

.ah-feature-icon {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: #1d4ed8;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.14);
}

.ah-features h4 {
  margin: 0.55rem 0 0.35rem;
  font-size: 1.02rem;
}

.ah-features p {
  margin: 0;
  color: #5b6780;
}

.ah-faq .faq-list {
  max-width: 900px;
  margin-inline: auto;
}

.ah-faq .section-heading {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 1rem;
}

.ah-footer {
  margin-top: 1.4rem;
}

.ah-footer-top {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.35fr 1fr 1fr;
  padding: 1.45rem 0 1rem;
}

.ah-footer-top h2 {
  margin: 0;
  font-size: 1.42rem;
}

.ah-footer-top p {
  margin: 0.55rem 0 0;
}

.ah-footer-top h3 {
  margin: 0;
  font-size: 1.06rem;
}

.ah-footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.95rem 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.ah-footer-bottom p {
  margin: 0;
}

.ah-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ah-lang a {
  font-weight: 700;
}

.ah-lang a[aria-current="true"] {
  color: #1d4ed8;
}

/* App dark mode */
:root[data-theme="dark"] .app-home {
  background:
    radial-gradient(circle at 7% -8%, rgba(59, 130, 246, 0.28), transparent 24%),
    radial-gradient(circle at 94% 2%, rgba(59, 130, 246, 0.18), transparent 24%),
    linear-gradient(180deg, #07101f 0%, #0a1426 100%);
  color: #e5ecff;
}

:root[data-theme="dark"] .ah-topbar {
  background: rgba(13, 23, 40, 0.92);
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

:root[data-theme="dark"] .ah-brand,
:root[data-theme="dark"] .ah-main-head h1,
:root[data-theme="dark"] .ah-features h4,
:root[data-theme="dark"] .ah-features-title,
:root[data-theme="dark"] .ah-footer-top h2,
:root[data-theme="dark"] .ah-footer-top h3,
:root[data-theme="dark"] .faq-item summary {
  color: #f4f7ff;
}

:root[data-theme="dark"] .faq-item summary {
  background: linear-gradient(180deg, #13223d, #0f1d34);
}

:root[data-theme="dark"] .ah-nav a {
  color: #b8c6df;
}

:root[data-theme="dark"] .ah-nav a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.2);
}

:root[data-theme="dark"] .ah-nav-dropdown-trigger {
  color: #b8c6df;
}

:root[data-theme="dark"] .ah-nav-dropdown-trigger:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.2);
}

:root[data-theme="dark"] .ah-nav-dropdown-menu {
  border-color: rgba(148, 163, 184, 0.28);
  background: #13223b;
  box-shadow: 0 20px 38px rgba(2, 6, 23, 0.55);
}

:root[data-theme="dark"] .ah-nav-dropdown-menu a {
  color: #d7e4ff;
}

:root[data-theme="dark"] .ah-nav-dropdown-menu a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.24);
}

:root[data-theme="dark"] .ah-theme-icon {
  color: #b8c6df;
}

:root[data-theme="dark"] .ah-theme-switch {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(59, 130, 246, 0.35);
}

:root[data-theme="dark"] .ah-shell,
:root[data-theme="dark"] .ah-editor-pane,
:root[data-theme="dark"] .ah-panel,
:root[data-theme="dark"] .ah-info-card,
:root[data-theme="dark"] .ah-extra-card,
:root[data-theme="dark"] .ah-compat-item,
:root[data-theme="dark"] .sorter-panel,
:root[data-theme="dark"] .sorter-options label,
:root[data-theme="dark"] .sorter-seo-card,
:root[data-theme="dark"] .ah-analysis article,
:root[data-theme="dark"] .ah-highlight-grid article,
:root[data-theme="dark"] .ah-steps:not(.ah-steps-diagram) li,
:root[data-theme="dark"] .ah-features article,
:root[data-theme="dark"] .faq-item,
:root[data-theme="dark"] .ah-footer,
:root[data-theme="dark"] .ah-sidebar,
:root[data-theme="dark"] .ah-sidebar-toggle {
  background: #0f1b31;
  border-color: rgba(148, 163, 184, 0.2);
}

:root[data-theme="dark"] .ah-menu-link {
  color: #c0cde3;
}

:root[data-theme="dark"] .ah-menu-link:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
}

:root[data-theme="dark"] .ah-menu-link.is-active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.28);
}

:root[data-theme="dark"] .ah-menu-icon {
  background: rgba(59, 130, 246, 0.24);
  color: #bfdbfe;
}

:root[data-theme="dark"] .ah-main-head p,
:root[data-theme="dark"] .ah-status,
:root[data-theme="dark"] .ah-steps p,
:root[data-theme="dark"] .ah-features p,
:root[data-theme="dark"] .ah-info-card p,
:root[data-theme="dark"] .ah-extra-card p,
:root[data-theme="dark"] .ah-info-list li,
:root[data-theme="dark"] .sorter-seo-card p,
:root[data-theme="dark"] .ah-footer p,
:root[data-theme="dark"] .faq-item p,
:root[data-theme="dark"] .ah-analysis span,
:root[data-theme="dark"] .keyword-density-list .kw-empty {
  color: #94a3b8;
}

:root[data-theme="dark"] .keyword-density-list li {
  border-bottom-color: rgba(51, 65, 85, 0.5);
}

:root[data-theme="dark"] .keyword-density-list .kw-word {
  color: #e2e8f0;
}

:root[data-theme="dark"] .keyword-density-list .kw-count {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
}
:root[data-theme="dark"] .ah-metrics span {
  color: #9fb0cb;
}

:root[data-theme="dark"] .sorter-btn {
  background: #13223d;
  color: #d7e4ff;
  border-color: rgba(148, 163, 184, 0.28);
}

:root[data-theme="dark"] .sorter-btn:hover {
  border-color: rgba(59, 130, 246, 0.52);
}

:root[data-theme="dark"] .sorter-btn.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
}

:root[data-theme="dark"] .case-workbench {
  background: linear-gradient(180deg, rgba(15, 27, 49, 0.95), rgba(11, 22, 40, 0.98));
  border-color: rgba(148, 163, 184, 0.22);
}

:root[data-theme="dark"] .case-head p {
  color: #9fb0cb;
}

:root[data-theme="dark"] .case-input,
:root[data-theme="dark"] .case-output {
  background: #091428;
  color: #e6edff;
  border-color: rgba(148, 163, 184, 0.3);
}

:root[data-theme="dark"] .sorter-why-card,
:root[data-theme="dark"] .sorter-how-diagram li {
  background: #101d34;
  border-color: rgba(148, 163, 184, 0.24);
}

:root[data-theme="dark"] .sorter-how-diagram p {
  color: #9fb0cb;
}

:root[data-theme="dark"] #sort-input,
:root[data-theme="dark"] .sort-output {
  background: #091428;
  color: #e6edff;
  border-color: rgba(148, 163, 184, 0.3);
}

:root[data-theme="dark"] .sort-output-empty,
:root[data-theme="dark"] .sort-index {
  color: #9fb0cb;
}

:root[data-theme="dark"] .sort-word {
  color: #e6edff;
}

:root[data-theme="dark"] .summary-slider-row label {
  color: #dbe7ff;
}

:root[data-theme="dark"] #summary-ratio::-webkit-slider-runnable-track,
:root[data-theme="dark"] #summary-ratio::-moz-range-track {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.35), rgba(59, 130, 246, 0.85));
}

:root[data-theme="dark"] #summary-ratio::-webkit-slider-thumb,
:root[data-theme="dark"] #summary-ratio::-moz-range-thumb {
  background: #60a5fa;
  border-color: #0f1b31;
}

:root[data-theme="dark"] .summary-options label {
  color: #d7e4ff;
  border-color: rgba(148, 163, 184, 0.26);
  background: #13223d;
}

:root[data-theme="dark"] .summary-meta article {
  border-color: rgba(148, 163, 184, 0.22);
  background: #111f37;
}

:root[data-theme="dark"] .summary-meta span {
  color: #9fb0cb;
}

:root[data-theme="dark"] .summary-loader {
  color: #93c5fd;
}

:root[data-theme="dark"] .summary-loader::before {
  border-color: rgba(147, 197, 253, 0.22);
  border-top-color: #93c5fd;
}

:root[data-theme="dark"] .ah-os-icon {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.24);
}

:root[data-theme="dark"] .ah-os-icon.os-windows {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.24);
}

:root[data-theme="dark"] .ah-os-icon.os-macos {
  color: #e2e8f0;
  background: rgba(100, 116, 139, 0.28);
}

:root[data-theme="dark"] .ah-os-icon.os-linux {
  color: #f1f5f9;
  background: rgba(148, 163, 184, 0.26);
}

:root[data-theme="dark"] .ah-os-icon.os-android {
  color: #86efac;
  background: rgba(34, 197, 94, 0.22);
}

:root[data-theme="dark"] .ah-os-icon.os-ios {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.26);
}

:root[data-theme="dark"] .ah-os-icon.os-chromeos {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.24);
}

:root[data-theme="dark"] .ah-editor-pane textarea {
  background: #091428;
  color: #e6edff;
  border-color: rgba(148, 163, 184, 0.3);
}

:root[data-theme="dark"] .ah-editor-overlay {
  color: #e6edff;
}

:root[data-theme="dark"] .ah-editor-stack.is-overlay-mode textarea {
  color: transparent;
  caret-color: #e6edff;
}

:root[data-theme="dark"] .ah-actions button {
  color: #d7e4ff;
  background: #13223d;
  border-color: rgba(148, 163, 184, 0.26);
}

:root[data-theme="dark"] .ah-actions button:hover:not(:disabled) {
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.3);
}

:root[data-theme="dark"] .ah-metrics article {
  background: #111f37;
}

:root[data-theme="dark"] .ah-mark-paragraph {
  border-radius: 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

:root[data-theme="dark"] .ah-mark-paragraph-1 {
  background: rgba(56, 189, 248, 0.28);
}

:root[data-theme="dark"] .ah-mark-paragraph-2 {
  background: rgba(96, 165, 250, 0.26);
}

:root[data-theme="dark"] .ah-mark-paragraph-3 {
  background: rgba(74, 222, 128, 0.18);
}

:root[data-theme="dark"] .ah-mark-paragraph-4 {
  background: rgba(250, 204, 21, 0.18);
}

:root[data-theme="dark"] .ah-mark-paragraph-5 {
  background: rgba(244, 114, 182, 0.18);
}

:root[data-theme="dark"] .ah-mark-paragraph-6 {
  background: rgba(192, 132, 252, 0.18);
}

:root[data-theme="dark"] .ah-mark-keyword {
  color: #86efac;
  background: rgba(22, 163, 74, 0.3);
}

:root[data-theme="dark"] .spell-lang-control label {
  color: #dbeafe;
}

:root[data-theme="dark"] .spell-lang-control select {
  background: #13223d;
  color: #dbeafe;
  border-color: rgba(148, 163, 184, 0.28);
}

:root[data-theme="dark"] .ah-mark-error {
  background: rgba(220, 38, 38, 0.32);
  text-decoration-color: #fca5a5;
}

:root[data-theme="dark"] .ah-mark-error:hover {
  background: rgba(239, 68, 68, 0.4);
}

:root[data-theme="dark"] .spell-popup {
  background: #0f1d34;
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: 0 20px 42px rgba(2, 8, 23, 0.58);
}

:root[data-theme="dark"] .spell-popup-header {
  color: #93c5fd;
  background: rgba(30, 58, 138, 0.26);
  border-bottom-color: rgba(148, 163, 184, 0.25);
}

:root[data-theme="dark"] .spell-popup-list button {
  color: #dbeafe;
  background: #13223d;
  border-color: rgba(148, 163, 184, 0.28);
}

:root[data-theme="dark"] .spell-popup-list button:hover {
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(59, 130, 246, 0.32);
}

:root[data-theme="dark"] .spell-popup-empty {
  color: #94a3b8;
}

:root[data-theme="dark"] .ah-mark-syllable {
  color: #e2e8f0;
}

:root[data-theme="dark"] .ah-mark-syllable-1 {
  background: rgba(59, 130, 246, 0.35);
  border-color: rgba(147, 197, 253, 0.3);
}

:root[data-theme="dark"] .ah-mark-syllable-2 {
  background: rgba(16, 185, 129, 0.35);
  border-color: rgba(110, 231, 183, 0.28);
}

:root[data-theme="dark"] .ah-mark-syllable-3 {
  background: rgba(245, 158, 11, 0.34);
  border-color: rgba(253, 186, 116, 0.28);
}

:root[data-theme="dark"] .ah-mark-syllable-4 {
  background: rgba(239, 68, 68, 0.34);
  border-color: rgba(252, 165, 165, 0.28);
}

:root[data-theme="dark"] .ah-mark-syllable-5 {
  background: rgba(139, 92, 246, 0.34);
  border-color: rgba(196, 181, 253, 0.3);
}

:root[data-theme="dark"] .ah-mark-syllable-6 {
  background: rgba(20, 184, 166, 0.34);
  border-color: rgba(153, 246, 228, 0.28);
}

:root[data-theme="dark"] .ah-syllable-sep {
  color: #93c5fd;
}

:root[data-theme="dark"] .ah-steps-diagram::before {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.22), rgba(96, 165, 250, 0.64), rgba(59, 130, 246, 0.22));
}

.ah-info-card-concept p:nth-of-type(3),
.ah-info-card-concept p:nth-of-type(4),
.ah-info-card-utility p:nth-of-type(3),
.ah-info-card-utility p:nth-of-type(4) {
  display: none;
}

:root[data-theme="dark"] .ah-footer-bottom {
  border-top-color: rgba(148, 163, 184, 0.22);
}

:root[data-theme="dark"] .ah-lang a[aria-current="true"] {
  color: #93c5fd;
}

/* Responsive app layout */
@media (max-width: 1180px) {
  .ah-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ah-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .ah-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ah-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sorter-toolbar {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .case-meta-grid {
    grid-template-columns: 1fr;
  }

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

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

  .sorter-how-diagram,
  .summary-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .ah-topbar-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 0.72rem 0;
  }

  .ah-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .ah-shell,
  .ah-shell.is-expanded {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .ah-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  }

  .ah-menu-label {
    display: inline;
  }

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

  .sorter-panels {
    grid-template-columns: 1fr;
  }

  .case-output-actions {
    grid-template-columns: 1fr;
  }

  .ah-compat-list {
    grid-template-columns: 1fr;
  }

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

  .ah-info-grid {
    grid-template-columns: 1fr;
  }

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

  .ah-footer-top {
    grid-template-columns: 1fr;
  }

  .ah-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .ah-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ah-analysis {
    grid-template-columns: 1fr;
  }

  .sorter-toolbar-group,
  .sorter-toolbar-group:first-child,
  .summary-toolbar-group,
  .sorter-options,
  .summary-options,
  .case-action-grid,
  .case-mode-grid,
  .ah-extra-grid {
    grid-template-columns: 1fr;
  }

  .ah-value-grid,
  .ah-audience-grid,
  .sorter-why-grid,
  .sorter-how-diagram,
  .summary-feature-grid {
    grid-template-columns: 1fr;
  }

  .ah-steps,
  .ah-features {
    grid-template-columns: 1fr;
  }

  .summary-slider-row,
  .summary-meta {
    grid-template-columns: 1fr;
  }

  .ah-steps-diagram::before {
    display: none;
  }

  .ah-steps-diagram li:not(:last-child)::after {
    display: none;
  }

  .sorter-how-diagram li:not(:last-child)::after {
    display: none;
  }
}

/* ===== Corporate Article Layout Override ===== */
.guide-page .page-hero {
  display: none;
}

.guide-page .content-section {
  padding-top: 1.1rem;
}

.guide-page .main-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 1.35rem;
}

.guide-page .main-column {
  max-width: none;
  margin: 0;
}

.guide-page .article-top-header {
  margin-bottom: 0.95rem;
}

.guide-page .article-breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: #64748b;
  font-size: 0.96rem;
}

.guide-page .article-breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

.guide-page .article-breadcrumb a:hover {
  color: #1e3a8a;
}

.guide-page .article-top-header h1 {
  margin: 0.68rem 0 0;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.guide-page .article-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 0.72rem;
  color: #64748b;
  font-size: 0.98rem;
}

.guide-page .article-head-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.guide-page .article-head-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #93c5fd;
}

.guide-page .article-head-meta span:first-child::before {
  display: none;
}

.guide-page .article-page-card {
  padding: clamp(1.1rem, 2vw, 1.6rem);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  background: #ffffff;
}

.guide-page .article-hero-media img {
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  object-fit: cover;
  max-height: 380px;
}

/* Intro editorial debajo de imagen (look periodico/profesional) */
.guide-page .article-lead,
.guide-page .article-hero-media + p {
  margin: 0.9rem 0 0;
  padding: 0.92rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-left: 4px solid #3b82f6;
  background: linear-gradient(180deg, #f8fbff, #f1f7ff);
  color: #0f172a;
  font-size: clamp(1.07rem, 1.45vw, 1.22rem);
  font-weight: 600;
  line-height: 1.56;
  letter-spacing: -0.01em;
}

.guide-page .article-page-card section + section {
  margin-top: 1.18rem;
  padding-top: 1.04rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.guide-page .article-page-card h2 {
  margin: 0 0 0.68rem;
  font-size: clamp(1.62rem, 2.2vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.guide-page .article-page-card h3 {
  margin: 1rem 0 0.42rem;
  font-size: clamp(1.12rem, 1.6vw, 1.36rem);
  line-height: 1.3;
}

.guide-page .article-page-card p {
  margin: 0.36rem 0 0;
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.64;
}

.guide-page .article-page-card ul,
.guide-page .article-page-card ol {
  list-style: none;
  margin: 0.8rem 0 0;
  padding-left: 0;
  color: #334155;
}

.guide-page .article-page-card li {
  margin-top: 0.52rem;
  padding: 0.48rem 0.64rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fbff;
}

.guide-page .article-example-box {
  margin-top: 0.95rem;
  padding: 1rem 1.05rem 1rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
}

.guide-page .sidebar-column {
  position: sticky;
  top: 88px;
  align-self: start;
  display: block;
  max-width: none;
  margin: 0;
}

.guide-page .article-related-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  padding: 0.9rem;
}

.guide-page .article-related-card h2 {
  margin: 0 0 0.72rem;
  font-size: 1.8rem;
  line-height: 1.15;
}

.guide-page .article-related-list {
  display: grid;
  gap: 0.75rem;
}

.guide-page .article-related-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.guide-page .article-related-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.guide-page .article-related-item img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.guide-page .article-related-item strong {
  display: block;
  font-size: 1.03rem;
  line-height: 1.22;
}

.guide-page .article-related-item small {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.45;
}

.guide-page .article-related-item:hover strong {
  color: #1d4ed8;
}

.guide-page .article-related-all {
  margin-top: 0.86rem;
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 800;
  padding: 0.62rem 0.7rem;
}

@media (max-width: 900px) {
  .guide-page .main-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-page .article-top-header {
    margin-bottom: 0.8rem;
  }

  .guide-page .article-top-header h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

  .guide-page .sidebar-column {
    position: static;
    margin-top: 0.7rem;
  }
}

/* ===== Editorial Reading Refinement (articulos) ===== */
.guide-page .content-section {
  padding-top: 1.45rem;
  padding-bottom: 2.6rem;
  background:
    linear-gradient(180deg, #f6f8fc 0%, #f9fbff 100%);
}

.guide-page .main-layout {
  grid-template-columns: minmax(0, 760px) 296px;
  justify-content: center;
  gap: clamp(1.4rem, 3vw, 2.25rem);
}

.guide-page .main-column {
  max-width: 760px;
}

.guide-page .main-column > * + * {
  margin-top: 1.5rem;
}

.guide-page .article-page-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.guide-page .article-page-card > .article-top-header,
.guide-page .article-page-card > .article-hero-media,
.guide-page .article-page-card > .article-lead,
.guide-page .article-page-card > .article-hero-media + p,
.guide-page .article-page-card > section {
  max-width: 47rem;
  margin-left: 0;
  margin-right: auto;
}

.guide-page .article-top-header {
  margin-bottom: 1.2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.guide-page .article-breadcrumb {
  gap: 0.42rem;
  font-size: 0.91rem;
  color: #64748b;
}

.guide-page .article-top-header h1 {
  margin: 0.82rem 0 0;
  max-width: none;
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.guide-page .article-head-meta {
  gap: 0.55rem 0.95rem;
  margin-top: 0.9rem;
  font-size: 0.94rem;
}

.guide-page .article-hero-media {
  margin-top: 1.5rem;
}

.guide-page .article-hero-media img {
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  max-height: none;
}

.guide-page .article-lead,
.guide-page .article-hero-media + p {
  margin-top: 1.45rem;
  margin-bottom: 1.4rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  font-size: clamp(0.9rem, 0.92vw, 0.96rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.52;
  letter-spacing: -0.005em;
}

.guide-page .article-lead::before,
.guide-page .article-hero-media + p::before {
  content: "\201C";
  margin-right: 0.14em;
  color: #0f172a;
  font-size: 1.25em;
  line-height: 0;
  vertical-align: -0.08em;
}

.guide-page .article-lead::after,
.guide-page .article-hero-media + p::after {
  content: "\201D";
  margin-left: 0.12em;
  color: #0f172a;
  font-size: 1.25em;
  line-height: 0;
  vertical-align: -0.08em;
}

.guide-page .article-hero-media-shell .article-lead:last-child {
  margin-bottom: 1.7rem;
}

.guide-page .article-page-card section + section {
  margin-top: 2.2rem;
  padding-top: 0;
  border-top: 0;
}

.guide-page .article-page-card h2 {
  margin: 0 0 0.9rem;
  max-width: none;
  font-size: clamp(1.75rem, 2.7vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.guide-page .article-page-card h3 {
  margin: 1.28rem 0 0.56rem;
  max-width: none;
  font-size: clamp(1.16rem, 1.8vw, 1.46rem);
  line-height: 1.34;
  letter-spacing: -0.015em;
}

.guide-page .article-page-card p {
  margin: 0.82rem 0 0;
  color: #334155;
  font-size: clamp(1.03rem, 1.14vw, 1.09rem);
  line-height: 1.78;
}

.guide-page .article-page-card p strong,
.guide-page .article-page-card li strong {
  color: #0f172a;
}

.guide-page .article-page-card .article-keyword {
  display: inline;
  padding: 0.02em 0.2em;
  border-radius: 0.24em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 18%, rgba(59, 130, 246, 0.3) 18%, rgba(59, 130, 246, 0.3) 100%);
  box-shadow: inset 0 -0.48em 0 rgba(59, 130, 246, 0.18);
  color: #0f172a;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.guide-page .article-page-card a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.guide-page .article-page-card ul,
.guide-page .article-page-card ol {
  margin: 0.95rem 0 0;
  color: #334155;
  overflow: visible;
}

.guide-page .article-page-card ul {
  list-style: none;
  padding-left: 0;
}

.guide-page .article-page-card ol {
  list-style: none;
  padding-left: 0;
  counter-reset: article-steps;
}

.guide-page .article-page-card li {
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.guide-page .article-page-card li::marker {
  color: #2563eb;
}

.guide-page .article-page-card ol > li {
  position: relative;
  display: block;
  margin-top: 0;
  padding: 0.9rem 0 0.9rem 4rem;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
  counter-increment: article-steps;
  overflow: visible;
}

.guide-page .article-page-card ol > li:first-child {
  border-top: 0;
  padding-top: 0.25rem;
}

.guide-page .article-page-card ol > li::before {
  content: counter(article-steps);
  position: absolute;
  left: 0.25rem;
  top: 0.78rem;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.24);
  color: #1d4ed8;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1;
}

.guide-page .article-page-card ol > li::marker {
  content: "";
}

.guide-page .article-page-card ol > li:first-child::before {
  top: 0.12rem;
}

.guide-page .article-page-card ul > li + li {
  margin-top: 0.7rem;
}

.guide-page .article-page-card ul > li {
  position: relative;
  display: block;
  margin-top: 0;
  padding: 0.45rem 0 0.45rem 2.15rem;
}

.guide-page .article-page-card ul > li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.95rem;
  display: inline-grid;
  place-items: center;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.08);
}

.guide-page .article-page-card li > div {
  min-width: 0;
}

.guide-page .article-page-card li > strong:first-child {
  display: inline-block;
  margin-bottom: 0.15rem;
}

.guide-page .article-example-box {
  margin-top: 1.2rem;
  padding: 1.1rem 1.15rem;
  border-width: 1px;
  border-left-width: 2px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff, #f4f8ff);
  box-shadow: none;
}

.guide-page .faq-section {
  margin-top: 1.25rem;
}

.guide-page .faq-list {
  max-width: 47rem;
  margin-inline: 0 auto;
  gap: 0;
}

.guide-page .faq-item {
  border: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.guide-page .faq-item:last-child {
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.guide-page .faq-item summary {
  padding: 0.95rem 2rem 0.95rem 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
}

.guide-page .faq-item summary::after {
  right: 0.1rem;
  top: 0.88rem;
}

.guide-page .faq-item p {
  padding: 0 1.2rem 1rem 0;
}

.guide-page .info-section {
  max-width: 760px;
  margin-left: 0;
  margin-right: auto;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.guide-page .section-heading.section-heading-compact {
  margin-bottom: 0.95rem;
}

.guide-page .section-heading.section-heading-compact .section-tag {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #2563eb;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.guide-page .section-heading.section-heading-compact h2 {
  margin-top: 0.35rem;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.guide-page .tool-links-grid {
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.guide-page .tool-link-card {
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.guide-page .tool-link-card h3 {
  margin-top: 0.5rem;
  font-size: 1.08rem;
}

.guide-page .tool-link-card p {
  font-size: 0.98rem;
  line-height: 1.66;
}

.guide-page .sidebar-column {
  top: 96px;
  max-width: 296px;
}

.guide-page .article-related-card {
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
}

.guide-page .article-related-card h2 {
  margin-bottom: 0.82rem;
  font-size: 1.34rem;
  line-height: 1.2;
}

.guide-page .article-related-item {
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 0.72rem;
  padding-bottom: 0.82rem;
}

.guide-page .article-related-item img {
  width: 82px;
  height: 82px;
  border-radius: 12px;
}

.guide-page .article-related-item strong {
  font-size: 1rem;
  line-height: 1.28;
}

.guide-page .article-related-item small {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.52;
}

@media (max-width: 900px) {
  .guide-page .main-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .guide-page .main-column,
  .guide-page .info-section,
  .guide-page .article-page-card > .article-top-header,
  .guide-page .article-page-card > .article-hero-media,
  .guide-page .article-page-card > .article-lead,
  .guide-page .article-page-card > .article-hero-media + p,
  .guide-page .article-page-card > section {
    max-width: none;
  }

  .guide-page .article-page-card {
    padding: 0;
    border-radius: 0;
  }

  .guide-page .article-top-header h1 {
    max-width: none;
    font-size: clamp(1.9rem, 7vw, 2.55rem);
  }

  .guide-page .article-page-card h2,
  .guide-page .article-page-card h3 {
    max-width: none;
  }
}

:root[data-theme="dark"] .guide-page .article-page-card,
:root[data-theme="dark"] .guide-page .tool-link-card,
:root[data-theme="dark"] .guide-page .article-related-card {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(17, 24, 39, 0.92);
  box-shadow: none;
}

:root[data-theme="dark"] .guide-page .content-section {
  background: linear-gradient(180deg, #0d1526 0%, #0f172a 100%);
}

:root[data-theme="dark"] .guide-page .article-page-card {
  background: transparent;
  border: 0;
}

:root[data-theme="dark"] .guide-page .info-section {
  border-top-color: rgba(51, 65, 85, 0.92);
}

:root[data-theme="dark"] .guide-page .faq-item,
:root[data-theme="dark"] .guide-page .faq-item:last-child {
  border-color: rgba(51, 65, 85, 0.92);
}

:root[data-theme="dark"] .guide-page .article-lead,
:root[data-theme="dark"] .guide-page .article-hero-media + p {
  color: #e5e7eb;
}

:root[data-theme="dark"] .guide-page .article-lead::before,
:root[data-theme="dark"] .guide-page .article-hero-media + p::before,
:root[data-theme="dark"] .guide-page .article-lead::after,
:root[data-theme="dark"] .guide-page .article-hero-media + p::after {
  color: #e5e7eb;
}

:root[data-theme="dark"] .guide-page .article-page-card p,
:root[data-theme="dark"] .guide-page .tool-link-card p,
:root[data-theme="dark"] .guide-page .article-related-item small {
  color: #cbd5e1;
}

:root[data-theme="dark"] .guide-page .article-page-card .article-keyword {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 18%, rgba(59, 130, 246, 0.38) 18%, rgba(59, 130, 246, 0.38) 100%);
  box-shadow: inset 0 -0.48em 0 rgba(59, 130, 246, 0.24);
  color: #f8fafc;
}

:root[data-theme="dark"] .guide-page .article-page-card ol > li {
  border-top-color: rgba(51, 65, 85, 0.92);
}

:root[data-theme="dark"] .guide-page .article-page-card ol > li::before {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

:root[data-theme="dark"] .guide-page .article-page-card ul > li::before {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

:root[data-theme="dark"] .guide-page .article-page-card h2,
:root[data-theme="dark"] .guide-page .article-page-card h3,
:root[data-theme="dark"] .guide-page .article-page-card p strong,
:root[data-theme="dark"] .guide-page .article-page-card li strong,
:root[data-theme="dark"] .guide-page .article-related-card h2,
:root[data-theme="dark"] .guide-page .article-related-item strong {
  color: #f8fafc;
}

/* ===== BLOG HUB: jerarquia visual profesional ===== */
.blog-hub-intro {
  padding-top: 0.45rem;
  padding-bottom: 0.55rem;
}

.blog-hub-page .blog-hub-intro .section-heading {
  max-width: 1120px;
  margin: 0 auto;
  text-align: left;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(227,238,255,0.72), rgba(255,255,255,0.96));
  box-shadow: var(--shadow-soft);
}

.blog-hub-page .blog-hub-intro .section-heading h1 {
  margin-top: 0.45rem;
  margin-bottom: 0.55rem;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.12;
}

.blog-hub-section {
  padding-top: 0.35rem;
}

.blog-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.blog-card {
  height: 100%;
}

.blog-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.blog-card-cta {
  margin-top: auto;
}

/* ===== Manuales: estilo guia profesional ===== */
.manual-guide-page .page-hero {
  display: block;
  padding: 1.65rem 0 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at 12% 14%, rgba(59, 130, 246, 0.14), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(96, 165, 250, 0.11), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, #f3f8ff 60%, #f8fbff 100%);
}

.manual-guide-page .page-hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: end;
}

.manual-guide-page .page-hero .section-tag {
  margin-bottom: 0.45rem;
}

.manual-guide-page .page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.95rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.manual-guide-page .page-hero p {
  margin: 0.75rem 0 0;
  max-width: 780px;
  color: #52627a;
  font-size: 1.05rem;
  line-height: 1.68;
}

.manual-guide-page .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
  align-items: center;
}

.manual-guide-page .hero-actions .btn {
  min-width: 184px;
}

.manual-guide-page .content-section {
  padding-top: 1.1rem;
}

.manual-guide-page .main-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.manual-guide-page .sidebar-column {
  position: sticky;
  top: 86px;
  max-width: none;
  margin: 0;
}

.manual-guide-page .sticky-toc {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.manual-guide-page .sticky-toc h2 {
  margin: 0;
  padding: 1rem 1rem 0.95rem;
  font-size: 1.24rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

.manual-guide-page .sticky-toc .article-toc {
  display: block;
  padding: 0.3rem 0;
}

.manual-guide-page .sticky-toc .article-toc a {
  display: block;
  min-height: 44px;
  padding: 0.6rem 1rem;
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.manual-guide-page .sticky-toc .article-toc a:last-child {
  border-bottom: 0;
}

.manual-guide-page .sticky-toc .article-toc a:hover,
.manual-guide-page .sticky-toc .article-toc a.is-active {
  background: #f8fbff;
  color: #1d4ed8;
  border-left-color: #3b82f6;
}

.manual-guide-page .article-page-card {
  padding: 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.manual-guide-page .article-top-header {
  margin-bottom: 0.95rem;
}

.manual-guide-page .article-breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: center;
  color: #64748b;
  font-size: 0.95rem;
}

.manual-guide-page .article-breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

.manual-guide-page .article-breadcrumb a:hover {
  color: #1d4ed8;
}

.manual-guide-page .article-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.94rem;
}

.manual-guide-page .article-head-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.manual-guide-page .article-head-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #93c5fd;
}

.manual-guide-page .article-head-meta span:first-child::before {
  display: none;
}

.manual-guide-page .article-page-card section + section {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.84);
}

.manual-guide-page .article-page-card h2 {
  margin: 0 0 0.72rem;
  font-size: clamp(1.45rem, 2vw, 1.96rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.manual-guide-page .article-page-card h3 {
  margin: 1rem 0 0.46rem;
  font-size: clamp(1.04rem, 1.35vw, 1.24rem);
  line-height: 1.3;
}

.manual-guide-page .article-page-card p {
  margin: 0.46rem 0 0;
  color: #334155;
  line-height: 1.72;
}

.manual-guide-page .article-page-card ul,
.manual-guide-page .article-page-card ol {
  margin: 0.78rem 0 0;
  padding-left: 1.15rem;
}

.manual-guide-page .article-page-card li + li {
  margin-top: 0.38rem;
}

.manual-guide-page .manual-inline-media {
  margin: 0.9rem 0 0.35rem;
}

.manual-guide-page .manual-inline-media img {
  width: 100%;
  display: block;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  object-fit: cover;
  max-height: 360px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.manual-guide-page .manual-inline-media figcaption {
  margin-top: 0.55rem;
  color: #64748b;
  font-size: 0.92rem;
}

.manual-guide-page .article-example-box {
  margin-top: 0.95rem;
  padding: 1rem 1rem 1rem 1.05rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-left: 4px solid #3b82f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

.manual-guide-page .article-example-box strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.manual-guide-page .manual-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.95rem;
}

.manual-guide-page .manual-highlight-card {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.manual-guide-page .manual-highlight-card h3,
.manual-guide-page .manual-highlight-card h4 {
  margin: 0 0 0.42rem;
  font-size: 1.03rem;
  line-height: 1.3;
}

.manual-guide-page .manual-highlight-card p {
  margin: 0;
  font-size: 0.97rem;
}

.manual-guide-page .manual-button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.manual-guide-page .manual-button-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  padding: 1rem;
}

.manual-guide-page .manual-button-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.7rem;
}

.manual-guide-page .manual-button-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.16);
  flex-shrink: 0;
}

.manual-guide-page .manual-button-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.manual-guide-page .manual-button-mock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.manual-guide-page .manual-button-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.06rem;
}

.manual-guide-page .manual-interface-box {
  margin-top: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.manual-guide-page .manual-interface-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.manual-guide-page .manual-interface-dots {
  display: inline-flex;
  gap: 0.45rem;
}

.manual-guide-page .manual-interface-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #bfdbfe;
}

.manual-guide-page .manual-interface-top strong {
  font-size: 0.96rem;
}

.manual-guide-page .manual-interface-body {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 0.9rem;
  padding: 1rem;
}

.manual-guide-page .manual-editor-preview,
.manual-guide-page .manual-side-preview {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
  min-height: 220px;
  padding: 0.9rem;
}

.manual-guide-page .manual-editor-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 100%);
  margin-bottom: 0.65rem;
}

.manual-guide-page .manual-editor-line.w-90 { width: 90%; }
.manual-guide-page .manual-editor-line.w-80 { width: 80%; }
.manual-guide-page .manual-editor-line.w-70 { width: 70%; }
.manual-guide-page .manual-editor-line.w-60 { width: 60%; }
.manual-guide-page .manual-editor-line.w-50 { width: 50%; }

.manual-guide-page .manual-side-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 0.75rem 0.9rem;
  background: #f8fbff;
}

.manual-guide-page .manual-side-metric + .manual-side-metric {
  margin-top: 0.7rem;
}

.manual-guide-page .manual-side-metric strong {
  font-size: 1rem;
}

.manual-guide-page .manual-explain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
  margin-top: 1rem;
}

.manual-guide-page .manual-explain-card {
  padding: 1rem 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.manual-guide-page .manual-explain-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
}

.manual-guide-page .manual-explain-card p {
  margin: 0;
}

.manual-guide-page .manual-term-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 30px;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.7rem;
}

.manual-guide-page .manual-keyword {
  color: #0f172a;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(191, 219, 254, 0.12) 0%, rgba(191, 219, 254, 0.32) 100%);
  padding: 0 0.18rem;
  border-radius: 0.35rem;
}

.manual-guide-page .manual-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.manual-guide-page .manual-metric-card {
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  padding: 1rem;
}

.manual-guide-page .manual-metric-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}

.manual-guide-page .manual-metric-card p {
  margin: 0;
  font-size: 0.96rem;
}

.manual-guide-page .manual-split-note {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.9rem;
  align-items: start;
  margin-top: 0.95rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.manual-guide-page .manual-split-note strong {
  display: block;
  font-size: 1rem;
  color: #1d4ed8;
}

.manual-guide-page .manual-split-note p {
  margin: 0.18rem 0 0;
}

.manual-guide-page .manual-cover {
  margin: 1rem 0 1.25rem;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.manual-guide-page .manual-cover img {
  width: 100%;
  height: clamp(260px, 36vw, 400px);
  display: block;
  object-fit: cover;
}

.manual-guide-page .manual-cover-content {
  padding: 1.2rem 1.25rem 1.3rem;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.manual-guide-page .manual-cover-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.manual-guide-page .manual-cover h2 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 900;
  color: #0f172a;
  text-wrap: balance;
}

.manual-guide-page .manual-cover p {
  margin: 0.72rem 0 0;
  max-width: 900px;
  color: #52627a;
  font-size: 1.04rem;
  line-height: 1.7;
}

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


.manual-guide-page .manual-interface-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.manual-guide-page .manual-interface-dots {
  display: inline-flex;
  gap: 0.45rem;
}

.manual-guide-page .manual-interface-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #bfdbfe;
}

.manual-guide-page .manual-interface-top strong {
  font-size: 0.96rem;
}

.manual-guide-page .manual-interface-body {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 0.9rem;
  padding: 1rem;
}

.manual-guide-page .manual-editor-preview,
.manual-guide-page .manual-side-preview {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
  min-height: 220px;
  padding: 0.9rem;
}

.manual-guide-page .manual-editor-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 100%);
  margin-bottom: 0.65rem;
}

.manual-guide-page .manual-editor-line.w-90 { width: 90%; }
.manual-guide-page .manual-editor-line.w-80 { width: 80%; }
.manual-guide-page .manual-editor-line.w-70 { width: 70%; }
.manual-guide-page .manual-editor-line.w-60 { width: 60%; }
.manual-guide-page .manual-editor-line.w-50 { width: 50%; }

.manual-guide-page .manual-side-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 0.75rem 0.9rem;
  background: #f8fbff;
}

.manual-guide-page .manual-side-metric + .manual-side-metric {
  margin-top: 0.7rem;
}

.manual-guide-page .manual-side-metric strong {
  font-size: 1rem;
}

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

@media (max-width: 980px) {
  .manual-guide-page .page-hero .container {
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-guide-page .hero-actions {
    justify-content: flex-start;
  }

  .manual-guide-page .main-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-guide-page .sidebar-column {
    position: static;
  }

  .manual-guide-page .manual-highlight-grid,
  .manual-guide-page .manual-button-grid,
  .manual-guide-page .manual-interface-body {
    grid-template-columns: 1fr;
  }
}

/* ===== Manuales: version editorial mas ligera ===== */
.manual-guide-page .page-hero {
  padding: 1.35rem 0 1rem;
  background:
    radial-gradient(circle at 12% 14%, rgba(59, 130, 246, 0.08), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(96, 165, 250, 0.06), transparent 20%),
    linear-gradient(180deg, #fbfdff 0%, #f7fbff 60%, #fbfdff 100%);
}

.manual-guide-page .page-hero h1 {
  max-width: 18ch;
}

.manual-guide-page .page-hero p {
  max-width: 68ch;
}

.manual-guide-page .sticky-toc {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.manual-guide-page .sticky-toc h2 {
  padding: 0 0 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: transparent;
  font-size: 1.05rem;
}

.manual-guide-page .sticky-toc .article-toc {
  padding: 0.3rem 0 0;
}

.manual-guide-page .sticky-toc .article-toc a {
  min-height: 0;
  padding: 0.58rem 0;
  border-left: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  background: transparent;
  font-weight: 600;
}

.manual-guide-page .sticky-toc .article-toc a:hover,
.manual-guide-page .sticky-toc .article-toc a.is-active {
  background: transparent;
  color: #1d4ed8;
  border-left-color: transparent;
}

.manual-guide-page .article-page-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.manual-guide-page .article-top-header {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.manual-guide-page .article-page-card section + section {
  margin-top: 1.55rem;
  padding-top: 1.3rem;
}

.manual-guide-page .manual-cover {
  margin: 0.85rem 0 1.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.manual-guide-page .manual-cover img {
  border-radius: 18px;
  border: 0;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07);
}

.manual-guide-page .manual-cover-content {
  padding: 1rem 0 0;
  background: transparent;
  border-top: 0;
}

.manual-guide-page .manual-cover h2 {
  max-width: 16ch;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1.02;
}

.manual-guide-page .manual-inline-media img {
  border: 0;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.manual-guide-page .article-example-box {
  padding: 0.95rem 0 0;
  border: 0;
  border-top: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 0;
  background: transparent;
}

.manual-guide-page .manual-highlight-grid,
.manual-guide-page .manual-button-grid,
.manual-guide-page .manual-explain-grid,
.manual-guide-page .manual-metric-grid,
.manual-guide-page .tool-links-grid {
  gap: 1rem 1.1rem;
}

.manual-guide-page .manual-highlight-card,
.manual-guide-page .manual-button-card,
.manual-guide-page .manual-explain-card,
.manual-guide-page .manual-metric-card,
.manual-guide-page .tool-link-card {
  padding: 0.95rem 0 0;
  border: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.manual-guide-page .manual-highlight-card h3,
.manual-guide-page .manual-highlight-card h4,
.manual-guide-page .manual-button-card h3,
.manual-guide-page .manual-explain-card h3,
.manual-guide-page .manual-metric-card h3,
.manual-guide-page .tool-link-card h3 {
  margin-top: 0;
}

.manual-guide-page .manual-button-top {
  margin-bottom: 0.55rem;
}

.manual-guide-page .manual-button-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: rgba(59, 130, 246, 0.1);
}

.manual-guide-page .manual-button-mock {
  min-width: 0;
  min-height: 38px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.manual-guide-page .manual-interface-box {
  margin-top: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.manual-guide-page .manual-interface-top {
  background: transparent;
}

.manual-guide-page .manual-editor-preview,
.manual-guide-page .manual-side-preview,
.manual-guide-page .manual-side-metric {
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: none;
}

.manual-guide-page .manual-split-note {
  grid-template-columns: 110px 1fr;
  padding: 0.95rem 0 0;
  border: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 0;
  background: transparent;
}

.manual-guide-page .info-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.manual-guide-page .section-heading.section-heading-compact {
  margin-bottom: 0.25rem;
}

.manual-guide-page .article-related-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.manual-guide-page .article-related-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

.manual-guide-page .article-related-item img {
  border-radius: 12px;
}

.manual-guide-page .article-related-all {
  margin-top: 0.9rem;
}

:root[data-theme="dark"] .manual-guide-page .sticky-toc,
:root[data-theme="dark"] .manual-guide-page .article-page-card,
:root[data-theme="dark"] .manual-guide-page .manual-cover,
:root[data-theme="dark"] .manual-guide-page .manual-highlight-card,
:root[data-theme="dark"] .manual-guide-page .manual-button-card,
:root[data-theme="dark"] .manual-guide-page .manual-explain-card,
:root[data-theme="dark"] .manual-guide-page .manual-metric-card,
:root[data-theme="dark"] .manual-guide-page .manual-split-note,
:root[data-theme="dark"] .manual-guide-page .tool-link-card,
:root[data-theme="dark"] .manual-guide-page .article-related-card,
:root[data-theme="dark"] .manual-guide-page .info-section {
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .manual-guide-page .article-top-header,
:root[data-theme="dark"] .manual-guide-page .article-page-card section + section,
:root[data-theme="dark"] .manual-guide-page .manual-highlight-card,
:root[data-theme="dark"] .manual-guide-page .manual-button-card,
:root[data-theme="dark"] .manual-guide-page .manual-explain-card,
:root[data-theme="dark"] .manual-guide-page .manual-metric-card,
:root[data-theme="dark"] .manual-guide-page .manual-split-note,
:root[data-theme="dark"] .manual-guide-page .tool-link-card,
:root[data-theme="dark"] .manual-guide-page .article-related-item,
:root[data-theme="dark"] .manual-guide-page .sticky-toc h2,
:root[data-theme="dark"] .manual-guide-page .sticky-toc .article-toc a {
  border-color: rgba(71, 85, 105, 0.8);
}

/* ===== Manuales: mas ancho util y titulos mas horizontales ===== */
.manual-guide-page .page-hero .container,
.manual-guide-page .content-section .container {
  width: min(1320px, calc(100% - 2.2rem));
}

.manual-guide-page .page-hero .container {
  padding: clamp(1.25rem, 2vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-xl) + 2px);
  background:
    linear-gradient(135deg, rgba(227, 238, 255, 0.78), rgba(255, 255, 255, 0.95)),
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.12), transparent 45%);
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 1rem 2rem;
  align-items: end;
}

.manual-guide-page .main-layout {
  grid-template-columns: 250px minmax(0, 1fr);
  justify-content: stretch;
  gap: 1.4rem;
}

.manual-guide-page .main-column,
.manual-guide-page .info-section {
  max-width: none;
}

.manual-guide-page .page-hero h1 {
  max-width: 24ch;
  margin-top: 0.3rem;
  font-size: clamp(2.15rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.manual-guide-page .manual-cover h2 {
  max-width: 24ch;
  font-size: clamp(1.95rem, 2.6vw, 2.85rem);
  line-height: 1.04;
  text-wrap: pretty;
}

.manual-guide-page .manual-cover p {
  max-width: 74ch;
}

.manual-guide-page .page-hero .section-tag {
  margin-bottom: 0.7rem;
}

.manual-guide-page .page-hero p {
  max-width: 62ch;
  margin-top: 0.95rem;
  font-size: 1.08rem;
  line-height: 1.78;
}

.manual-guide-page .hero-actions {
  justify-content: flex-end;
  align-items: center;
  align-self: end;
  padding-bottom: 0.15rem;
}

.manual-guide-page .hero-actions .btn {
  min-width: 0;
  padding-inline: 1.3rem;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .manual-guide-page .page-hero .container,
  .manual-guide-page .content-section .container {
    width: min(100%, calc(100% - 1.6rem));
  }

  .manual-guide-page .main-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.05rem;
  }

  .manual-guide-page .page-hero h1,
  .manual-guide-page .manual-cover h2 {
    max-width: 20ch;
  }
}

@media (max-width: 980px) {
  .manual-guide-page .page-hero .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .manual-guide-page .hero-actions {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .manual-guide-page .page-hero h1,
  .manual-guide-page .manual-cover h2 {
    max-width: none;
  }
}

/* ===== Manuales: encabezado mas fresco y abierto ===== */
.manual-guide-page .page-hero {
  padding-top: 1.1rem;
}

.manual-guide-page .page-hero .container {
  padding-bottom: 1.45rem;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.72fr);
  gap: 1.1rem 2.4rem;
  align-items: start;
}

.manual-guide-page .page-hero h1 {
  max-width: 19ch;
  margin-top: 0.2rem;
  font-size: clamp(2.05rem, 3.55vw, 3.2rem);
  line-height: 1.02;
  text-wrap: balance;
}

.manual-guide-page .page-hero p {
  max-width: 70ch;
  margin-top: 0.85rem;
  font-size: 1.06rem;
  line-height: 1.8;
}

.manual-guide-page .hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding-top: 2.2rem;
}

.manual-guide-page .manual-cover {
  margin: 1rem 0 1.55rem;
  display: block;
}

.manual-guide-page .manual-cover img {
  width: 100%;
  height: clamp(280px, 36vw, 400px);
  border-radius: 24px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.09);
}

.manual-guide-page .manual-cover-content {
  padding: 1.15rem 0 0;
}

.manual-guide-page .manual-cover-kicker {
  margin-bottom: 0.95rem;
}

.manual-guide-page .manual-cover h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 3vw, 2.95rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.manual-guide-page .manual-cover p {
  max-width: 62ch;
  margin-top: 0.95rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

@media (max-width: 1180px) {
  .manual-guide-page .page-hero .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
  }

  .manual-guide-page .hero-actions {
    padding-top: 0;
  }

  .manual-guide-page .manual-cover h2 {
    max-width: 22ch;
  }
}

@media (max-width: 760px) {
  .manual-guide-page .page-hero {
    padding-top: 0.8rem;
  }

  .manual-guide-page .page-hero .container {
    padding-bottom: 1.1rem;
  }

  .manual-guide-page .page-hero h1,
  .manual-guide-page .manual-cover h2 {
    max-width: none;
  }

  .manual-guide-page .manual-cover {
    margin-top: 0.85rem;
  }
}

/* ===== 2026-04: dark mode mas claro y legible ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15243b;
  --bg-panel: #1b2e4a;
  --bg-soft: #223756;
  --text: #f4f8ff;
  --muted: #d2dced;
  --border: rgba(191, 219, 254, 0.24);
  --line: rgba(191, 219, 254, 0.15);
  --primary: #7cb5ff;
  --primary-strong: #a5ccff;
  --primary-soft: rgba(96, 165, 250, 0.2);
  --shadow-soft: 0 16px 32px rgba(2, 6, 23, 0.24);
  --shadow-lift: 0 22px 44px rgba(2, 6, 23, 0.3);
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .app-home {
  background:
    radial-gradient(circle at 7% -8%, rgba(96, 165, 250, 0.18), transparent 24%),
    radial-gradient(circle at 94% 2%, rgba(125, 211, 252, 0.12), transparent 24%),
    linear-gradient(180deg, #13223a 0%, #162843 100%);
}

:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .ah-topbar,
:root[data-theme="dark"] .tool-shell,
:root[data-theme="dark"] .page-card,
:root[data-theme="dark"] .analysis-card,
:root[data-theme="dark"] .editor-panel,
:root[data-theme="dark"] .tool-primary-card,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .faq-item,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .cookie-consent,
:root[data-theme="dark"] .cookie-modal-card,
:root[data-theme="dark"] .theme-toggle-btn,
:root[data-theme="dark"] .ad-slot,
:root[data-theme="dark"] .ah-shell,
:root[data-theme="dark"] .ah-editor-pane,
:root[data-theme="dark"] .ah-panel,
:root[data-theme="dark"] .ah-info-card,
:root[data-theme="dark"] .ah-extra-card,
:root[data-theme="dark"] .ah-compat-item,
:root[data-theme="dark"] .sorter-panel,
:root[data-theme="dark"] .sorter-options label,
:root[data-theme="dark"] .sorter-seo-card,
:root[data-theme="dark"] .ah-analysis article,
:root[data-theme="dark"] .ah-highlight-grid article,
:root[data-theme="dark"] .ah-steps:not(.ah-steps-diagram) li,
:root[data-theme="dark"] .ah-features article,
:root[data-theme="dark"] .ah-footer,
:root[data-theme="dark"] .ah-sidebar,
:root[data-theme="dark"] .ah-sidebar-toggle {
  background: rgba(27, 46, 74, 0.94);
  border-color: rgba(191, 219, 254, 0.16);
}

:root[data-theme="dark"] .tool-link-card,
:root[data-theme="dark"] .top-words-list li,
:root[data-theme="dark"] .editor-stage textarea,
:root[data-theme="dark"] .contact-form input,
:root[data-theme="dark"] .contact-form textarea,
:root[data-theme="dark"] .top-words-table tbody tr:hover td,
:root[data-theme="dark"] .case-input,
:root[data-theme="dark"] .case-output,
:root[data-theme="dark"] #sort-input,
:root[data-theme="dark"] .sort-output,
:root[data-theme="dark"] .sorter-why-card,
:root[data-theme="dark"] .sorter-how-diagram li,
:root[data-theme="dark"] .sorter-btn,
:root[data-theme="dark"] .ah-nav-dropdown-menu,
:root[data-theme="dark"] .faq-item summary {
  background: #16263f;
  border-color: rgba(191, 219, 254, 0.2);
}

:root[data-theme="dark"] .case-workbench {
  background: linear-gradient(180deg, rgba(27, 46, 74, 0.96), rgba(20, 35, 58, 0.98));
  border-color: rgba(191, 219, 254, 0.18);
}

:root[data-theme="dark"] .ah-brand,
:root[data-theme="dark"] .ah-main-head h1,
:root[data-theme="dark"] .ah-features h4,
:root[data-theme="dark"] .ah-features-title,
:root[data-theme="dark"] .ah-footer-top h2,
:root[data-theme="dark"] .ah-footer-top h3,
:root[data-theme="dark"] .faq-item summary,
:root[data-theme="dark"] .page-card h1,
:root[data-theme="dark"] .page-card h2,
:root[data-theme="dark"] .page-card h3,
:root[data-theme="dark"] .tool-link-card h3 {
  color: #f4f8ff;
}

:root[data-theme="dark"] .ah-nav a,
:root[data-theme="dark"] .ah-nav-dropdown-trigger,
:root[data-theme="dark"] .ah-menu-link,
:root[data-theme="dark"] .ah-theme-icon,
:root[data-theme="dark"] .sorter-btn {
  color: #dbe7f7;
}

:root[data-theme="dark"] .ah-main-head p,
:root[data-theme="dark"] .ah-status,
:root[data-theme="dark"] .ah-steps p,
:root[data-theme="dark"] .ah-features p,
:root[data-theme="dark"] .ah-info-card p,
:root[data-theme="dark"] .ah-extra-card p,
:root[data-theme="dark"] .ah-info-list li,
:root[data-theme="dark"] .sorter-seo-card p,
:root[data-theme="dark"] .ah-footer p,
:root[data-theme="dark"] .faq-item p,
:root[data-theme="dark"] .ah-analysis span,
:root[data-theme="dark"] .ah-metrics span,
:root[data-theme="dark"] .sort-output-empty,
:root[data-theme="dark"] .sort-index,
:root[data-theme="dark"] .case-head p,
:root[data-theme="dark"] .page-card p,
:root[data-theme="dark"] .tool-link-card p {
  color: #d2dced;
}

:root[data-theme="dark"] .ah-nav a:hover,
:root[data-theme="dark"] .ah-nav-dropdown-trigger:hover,
:root[data-theme="dark"] .ah-menu-link:hover,
:root[data-theme="dark"] .ah-menu-link.is-active {
  color: #ffffff;
  background: rgba(96, 165, 250, 0.18);
}

:root[data-theme="dark"] .ah-theme-switch {
  border-color: rgba(191, 219, 254, 0.2);
  background: rgba(96, 165, 250, 0.2);
}

:root[data-theme="dark"] .ah-menu-icon,
:root[data-theme="dark"] .hp-portal-pill span,
:root[data-theme="dark"] .hp-feature-icon,
:root[data-theme="dark"] .hp-learning-icon {
  background: rgba(125, 211, 252, 0.14);
  color: #d8f0ff;
}

/* ===== 2026-04: dark mode legibility boost ===== */
:root[data-theme="dark"] .section-heading h2,
:root[data-theme="dark"] .sidebar-card h2,
:root[data-theme="dark"] .analysis-card h3,
:root[data-theme="dark"] .tool-primary-card h2,
:root[data-theme="dark"] .tool-primary-card h3,
:root[data-theme="dark"] .utility-output-title,
:root[data-theme="dark"] .hero-copy h1,
:root[data-theme="dark"] .hero-card-title {
  color: #f4f8ff;
}

:root[data-theme="dark"] .hero-text,
:root[data-theme="dark"] .section-heading p,
:root[data-theme="dark"] .hero-card p,
:root[data-theme="dark"] .stat-note,
:root[data-theme="dark"] .analysis-meta,
:root[data-theme="dark"] .analysis-empty,
:root[data-theme="dark"] .info-card p,
:root[data-theme="dark"] .sidebar-card p,
:root[data-theme="dark"] .editor-help,
:root[data-theme="dark"] .editor-toolbar-note,
:root[data-theme="dark"] .editor-actions-text,
:root[data-theme="dark"] .editor-status,
:root[data-theme="dark"] .utility-output-copy,
:root[data-theme="dark"] .about-web-copy,
:root[data-theme="dark"] .ah-home-blog-meta,
:root[data-theme="dark"] .ah-home-blog-card .blog-card p,
:root[data-theme="dark"] .about-web-copy {
  color: #d8e2f1;
}

:root[data-theme="dark"] .btn-secondary,
:root[data-theme="dark"] .action-btn,
:root[data-theme="dark"] .contact-email,
:root[data-theme="dark"] .ah-home-blog-button,
:root[data-theme="dark"] .about-web-badge {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(191, 219, 254, 0.18);
  color: #eef6ff;
}

:root[data-theme="dark"] .btn-secondary:hover,
:root[data-theme="dark"] .action-btn:hover,
:root[data-theme="dark"] .contact-email:hover,
:root[data-theme="dark"] .ah-home-blog-button:hover {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(147, 197, 253, 0.28);
}

:root[data-theme="dark"] .tool-link-card h3,
:root[data-theme="dark"] .ah-home-blog-card-title,
:root[data-theme="dark"] .blog-card h3,
:root[data-theme="dark"] .about-web-inner h2 {
  color: #f4f8ff;
}

:root[data-theme="dark"] .tool-link-card p,
:root[data-theme="dark"] .ah-home-blog-card .blog-card p,
:root[data-theme="dark"] .blog-card p {
  color: #d2dced;
}

:root[data-theme="dark"] .tool-link-tag,
:root[data-theme="dark"] .hero-card-tag,
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .section-tag {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.18);
}

:root[data-theme="dark"] .about-web-icon,
:root[data-theme="dark"] .brand-mark {
  color: #ffffff;
}

:root[data-theme="dark"] .about-web-icon {
  background: rgba(96, 165, 250, 0.16);
}

:root[data-theme="dark"] a:not(.btn):not(.action-btn):not(.ah-menu-link):not(.site-nav a):not(.footer-links a):not(.article-toc a) {
  color: #bfdbfe;
}

/* ===== 2026-04: mobile breathing room ===== */
@media (max-width: 760px) {
  .header-inner {
    align-items: stretch;
    gap: 0.72rem;
    padding: 0.78rem 0;
  }

  .brand {
    gap: 0.68rem;
  }

  .brand-mark {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.88rem;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.18rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav ul {
    width: max-content;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.45rem;
    padding-right: 0.4rem;
  }

  .site-nav a {
    min-height: 2.22rem;
    padding: 0.36rem 0.72rem;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  .ah-topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.72rem 0.85rem;
    padding: 0.72rem 0 0.82rem;
  }

  .ah-brand {
    min-width: 0;
  }

  .ah-brand-text {
    font-size: 1rem;
  }

  .ah-nav {
    grid-column: 1 / -1;
    order: 0;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .ah-nav::-webkit-scrollbar {
    display: none;
  }

  .ah-nav a,
  .ah-nav-dropdown-trigger {
    min-height: 2.24rem;
    padding: 0.4rem 0.78rem;
    white-space: nowrap;
    font-size: 0.96rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
  }

  .ah-nav-dropdown-menu {
    min-width: min(240px, calc(100vw - 1.4rem));
  }

  .ah-theme-wrap {
    justify-self: end;
  }

  .hp-portal {
    padding-top: 1.4rem;
  }

  .hp-portal-copy {
    padding: 1.4rem 0 1.2rem;
  }

  .hp-feature-grid,
  .hp-learning-grid,
  .ah-home-blog-grid,
  .ah-extra-grid,
  .ah-features,
  .ah-value-grid,
  .ah-audience-grid,
  .sorter-why-grid,
  .sorter-how-diagram,
  .summary-feature-grid,
  .about-web-badges {
    grid-template-columns: 1fr;
  }

  .ah-home-blog-head {
    margin-bottom: 1.1rem;
  }

  .ah-home-blog-card .blog-card-body {
    min-height: 0;
  }

  .ah-home-blog-card-title {
    font-size: 1.08rem;
  }

  .about-web-inner {
    padding: 1.2rem 1rem;
  }

  .about-web-copy h2 {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
  }

  .about-web-badge {
    justify-content: flex-start;
  }

  .guide-page .content-section {
    padding-top: 1.05rem;
    padding-bottom: 2rem;
  }

  .guide-page .main-layout {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .guide-page .main-column > * + * {
    margin-top: 1.25rem;
  }

  .guide-page .sidebar-column {
    order: 2;
    margin-top: 0;
    max-width: none;
  }

  .guide-page .article-top-header {
    margin-bottom: 0.95rem;
    padding-bottom: 0.8rem;
  }

  .guide-page .article-top-header h1 {
    font-size: clamp(1.82rem, 9vw, 2.45rem);
    line-height: 1.08;
  }

  .guide-page .article-head-meta {
    gap: 0.45rem 0.75rem;
    font-size: 0.9rem;
  }

  .guide-page .article-hero-media {
    margin-top: 1rem;
  }

  .guide-page .article-lead,
  .guide-page .article-hero-media + p {
    margin-top: 1rem;
    margin-bottom: 1.1rem;
    font-size: 0.98rem;
    line-height: 1.66;
  }

  .guide-page .article-page-card section + section {
    margin-top: 1.65rem;
  }

  .guide-page .article-page-card h2 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .guide-page .article-page-card h3 {
    font-size: clamp(1.12rem, 5vw, 1.32rem);
  }

  .guide-page .article-page-card p {
    font-size: 1rem;
    line-height: 1.72;
  }

  .guide-page .article-page-card ol > li {
    padding-left: 3.15rem;
  }

  .guide-page .article-page-card ol > li::before {
    left: 0;
    width: 36px;
    height: 36px;
  }

  .guide-page .article-page-card ul > li {
    padding-left: 1.65rem;
  }

  .guide-page .faq-item summary {
    padding-right: 1.6rem;
  }

  .guide-page .info-section {
    padding-top: 0.9rem;
  }

  .guide-page .article-related-card {
    padding: 0.85rem 0.9rem;
  }

  .guide-page .article-related-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.7rem;
  }

  .guide-page .article-related-item img {
    width: 72px;
    height: 72px;
  }

  .manual-guide-page .page-hero .container,
  .manual-guide-page .content-section .container {
    width: min(100%, calc(100% - 1.2rem));
  }

  .manual-guide-page .page-hero {
    padding-top: 0.6rem;
  }

  .manual-guide-page .page-hero .container {
    padding: 1rem;
    gap: 0.85rem;
    border-radius: 18px;
  }

  .manual-guide-page .page-hero h1 {
    font-size: clamp(1.75rem, 8.2vw, 2.4rem);
    line-height: 1.04;
  }

  .manual-guide-page .page-hero p {
    margin-top: 0.72rem;
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .manual-guide-page .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .manual-guide-page .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .manual-guide-page .main-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .manual-guide-page .sidebar-column {
    position: static;
    top: auto;
    order: 2;
  }

  .manual-guide-page .sticky-toc {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .manual-guide-page .sticky-toc h2 {
    padding: 0.95rem;
    font-size: 1.08rem;
    background: transparent;
  }

  .manual-guide-page .sticky-toc .article-toc {
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem 0.95rem;
  }

  .manual-guide-page .sticky-toc .article-toc a {
    min-height: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    color: var(--text);
  }

  .manual-guide-page .article-page-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .manual-guide-page .article-top-header {
    margin-bottom: 0.9rem;
    padding-bottom: 0.85rem;
  }

  .manual-guide-page .article-head-meta {
    gap: 0.45rem 0.8rem;
    font-size: 0.9rem;
  }

  .manual-guide-page .article-head-meta span::before {
    display: none;
  }

  .manual-guide-page .article-page-card section + section {
    margin-top: 1.1rem;
    padding-top: 1rem;
  }

  .manual-guide-page .manual-cover {
    margin: 0.8rem 0 1.05rem;
  }

  .manual-guide-page .manual-cover img {
    height: clamp(220px, 58vw, 290px);
    border-radius: 18px;
  }

  .manual-guide-page .manual-cover-content {
    padding-top: 0.85rem;
  }

  .manual-guide-page .manual-cover h2 {
    font-size: clamp(1.55rem, 7vw, 2.15rem);
    line-height: 1.07;
  }

  .manual-guide-page .manual-cover p {
    margin-top: 0.78rem;
    font-size: 0.98rem;
    line-height: 1.68;
  }

  .manual-guide-page .article-page-card h2 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .manual-guide-page .article-page-card h3 {
    font-size: clamp(1.05rem, 4.8vw, 1.22rem);
  }

  .manual-guide-page .article-page-card p,
  .manual-guide-page .manual-highlight-card p,
  .manual-guide-page .manual-button-card p,
  .manual-guide-page .manual-explain-card p,
  .manual-guide-page .manual-metric-card p,
  .manual-guide-page .tool-link-card p {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .manual-guide-page .manual-highlight-grid,
  .manual-guide-page .manual-button-grid,
  .manual-guide-page .manual-explain-grid,
  .manual-guide-page .manual-metric-grid,
  .manual-guide-page .tool-links-grid {
    gap: 0.85rem;
  }

  .manual-guide-page .manual-split-note {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .manual-guide-page .manual-button-top {
    align-items: center;
  }

  .manual-guide-page .manual-interface-box {
    border-radius: 14px;
  }
}

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

  .site-nav a {
    padding: 0.35rem 0.62rem;
    font-size: 0.92rem;
  }

  .ah-topbar-inner {
    gap: 0.62rem 0.7rem;
  }

  .ah-brand-text {
    font-size: 0.94rem;
  }

  .ah-theme-wrap {
    gap: 0.3rem;
  }

  .ah-nav a,
  .ah-nav-dropdown-trigger {
    font-size: 0.92rem;
    padding: 0.38rem 0.68rem;
  }

  .manual-guide-page .page-hero .container,
  .manual-guide-page .content-section .container {
    width: min(100%, calc(100% - 0.9rem));
  }

  .manual-guide-page .article-page-card,
  .manual-guide-page .sticky-toc {
    border-radius: 16px;
  }
}

@media (max-width: 900px) {
  .manual-guide-page .main-layout {
    display: block;
  }

  .manual-guide-page .main-column,
  .manual-guide-page .sidebar-column,
  .manual-guide-page .info-section {
    width: 100%;
    max-width: none;
  }

  .manual-guide-page .sidebar-column {
    margin-top: 1rem;
  }

  .manual-guide-page .sticky-toc,
  .manual-guide-page .article-page-card,
  .manual-guide-page .info-section {
    width: 100%;
  }
}

/* ===== 2026-04: manuales sin menu lateral ===== */
.manual-guide-page .main-layout {
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  gap: 1.25rem;
}

.manual-guide-page .sidebar-column {
  display: none;
}

.manual-guide-page .main-column,
.manual-guide-page .info-section {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
}

.manual-guide-page .article-page-card,
.manual-guide-page .info-section {
  width: 100%;
}

@media (max-width: 760px) {
  .manual-guide-page .main-column,
  .manual-guide-page .info-section {
    max-width: none;
  }
}

/* ===== 2026-04: cards de blog dentro de manuales ===== */
.manual-guide-page .manual-blog-section .section-heading p {
  max-width: 720px;
}

.manual-guide-page .manual-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.manual-guide-page .manual-blog-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.manual-guide-page .manual-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
  border-color: rgba(96, 165, 250, 0.7);
}

.manual-guide-page .manual-blog-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dbeafe;
}

.manual-guide-page .manual-blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.manual-guide-page .manual-blog-body {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1rem 1.05rem;
}

.manual-guide-page .manual-blog-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(239, 246, 255, 0.95);
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual-guide-page .manual-blog-card h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-title);
  font-size: 1.12rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.manual-guide-page .manual-blog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.manual-guide-page .manual-blog-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.2rem;
}

.manual-guide-page .manual-blog-meta {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
}

.manual-guide-page .manual-blog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.55);
  background: rgba(239, 246, 255, 0.95);
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.manual-guide-page .manual-blog-btn:hover {
  transform: translateY(-1px);
  background: #2563eb;
  color: #fff;
}

:root[data-theme="dark"] .manual-guide-page .manual-blog-card {
  background: #152338;
  border-color: rgba(96, 165, 250, 0.18);
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.34);
}

:root[data-theme="dark"] .manual-guide-page .manual-blog-card:hover {
  border-color: rgba(125, 180, 255, 0.4);
}

:root[data-theme="dark"] .manual-guide-page .manual-blog-tag {
  background: rgba(30, 58, 138, 0.24);
  border-color: rgba(125, 180, 255, 0.26);
  color: #bfdbfe;
}

:root[data-theme="dark"] .manual-guide-page .manual-blog-card h3 {
  color: #f8fbff;
}

:root[data-theme="dark"] .manual-guide-page .manual-blog-card p,
:root[data-theme="dark"] .manual-guide-page .manual-blog-meta {
  color: #d7e3f5;
}

:root[data-theme="dark"] .manual-guide-page .manual-blog-btn {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(125, 180, 255, 0.35);
  color: #cfe3ff;
}

:root[data-theme="dark"] .manual-guide-page .manual-blog-btn:hover {
  background: #3b82f6;
  color: #fff;
}

@media (max-width: 900px) {
  .manual-guide-page .manual-blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .manual-guide-page .manual-blog-body {
    padding: 0.95rem;
  }

  .manual-guide-page .manual-blog-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .manual-guide-page .manual-blog-btn {
    width: 100%;
  }
}

/* --- Premium Toasts --- */
.ah-toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
}

.ah-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  color: #1e293b;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ah-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ah-toast.is-hiding {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

.ah-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
}

.ah-toast.is-success .ah-toast-icon {
  color: #10b981;
}

.ah-toast.is-error .ah-toast-icon {
  color: #ef4444;
}

.ah-toast.is-success {
  border-bottom: 2px solid #10b981;
}

.ah-toast.is-error {
  border-bottom: 2px solid #ef4444;
}

:root[data-theme="dark"] .ah-toast {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(51, 65, 85, 0.5);
  color: #f1f5f9;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .ah-toast.is-success {
  border-bottom-color: #34d399;
}
:root[data-theme="dark"] .ah-toast.is-success .ah-toast-icon {
  color: #34d399;
}

/* =========================================
   APA GENERATOR COMPONENT (NORMAS APA)
   ========================================= */
.ah-apa-generator {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 20px;
  padding: 2.5rem;
  margin: 3rem 0;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08), 0 0 0 1px rgba(255,255,255,0.5) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.ah-apa-generator::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.apa-gen-header {
  margin-bottom: 1.5rem;
}

.apa-gen-header h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.apa-gen-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.apa-gen-tabs {
  display: inline-flex;
  gap: 0.2rem;
  margin-bottom: 2rem;
  background: rgba(241, 245, 249, 0.8);
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.apa-gen-tabs button {
  background: transparent;
  border: none;
  padding: 0.7rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apa-gen-tabs button:hover {
  color: #0f172a;
}

.apa-gen-tabs button[aria-selected="true"] {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.apa-gen-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.apa-gen-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.apa-gen-form .form-group-row {
  flex-direction: row;
  gap: 1rem;
}

.apa-gen-form .form-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.apa-gen-form label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

.apa-gen-form input {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apa-gen-form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.apa-gen-result-box {
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  margin-top: 1rem;
}

.apa-gen-result-box::after {
  content: "“";
  position: absolute;
  top: -15px;
  right: 25px;
  font-family: Georgia, serif;
  font-size: 8rem;
  color: rgba(148, 163, 184, 0.12);
  line-height: 1;
  pointer-events: none;
}

.apa-gen-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  margin: 0 0 0.5rem;
}

.apa-gen-output-container {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.apa-output {
  flex: 1;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  padding: 1.2rem;
  min-height: 3.5rem;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #000;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.03);
  position: relative;
  z-index: 1;
}

.apa-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.2rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  position: relative;
  z-index: 1;
}

.apa-copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.apa-status-msg {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #10b981;
  min-height: 1.2em;
}

/* Dark mode APA */
:root[data-theme="dark"] .ah-apa-generator {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(51, 65, 85, 0.4);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

:root[data-theme="dark"] .apa-gen-header h2 {
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="dark"] .apa-gen-tabs {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(51, 65, 85, 0.8);
}

:root[data-theme="dark"] .apa-gen-tabs button {
  color: #94a3b8;
}

:root[data-theme="dark"] .apa-gen-tabs button:hover {
  color: #e2e8f0;
}

:root[data-theme="dark"] .apa-gen-tabs button[aria-selected="true"] {
  background: #1e293b;
  color: #38bdf8;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .apa-gen-form label {
  color: #cbd5e1;
}

:root[data-theme="dark"] .apa-gen-form input {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(51, 65, 85, 0.6);
  color: #f1f5f9;
}

:root[data-theme="dark"] .apa-gen-form input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

:root[data-theme="dark"] .apa-gen-result-box {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border-color: #334155;
}

:root[data-theme="dark"] .apa-gen-result-box::after {
  color: rgba(248, 250, 252, 0.03);
}

:root[data-theme="dark"] .apa-gen-label {
  color: #94a3b8;
}

:root[data-theme="dark"] .apa-output {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #475569;
}

/* Mobile Responsiveness for APA Generator */
@media (max-width: 720px) {
  .apa-gen-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
  .apa-gen-tabs button {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
  }
  .apa-gen-form .form-group-row {
    flex-direction: column;
    gap: 1rem;
  }
  .apa-gen-output-container {
    flex-direction: column;
    align-items: stretch;
  }
  .apa-copy-btn {
    width: 100%;
    justify-content: center;
  }
}
