:root {
  --cf-ink: #172033;
  --cf-muted: #5b667a;
  --cf-line: #d8deea;
  --cf-soft: #f5f7fb;
  --cf-violet: #6d28d9;
  --cf-violet-dark: #4c1d95;
  --cf-indigo: #3730a3;
  --cf-teal: #0f766e;
  --cf-green: #15803d;
  --cf-amber: #b45309;
  --cf-red: #b91c1c;
  --cf-shadow: 0 18px 45px -30px rgba(30, 41, 59, .45);
}

.cf-page,
.cf-term-dialog {
  color: var(--cf-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.cf-page {
  width: min(1440px, calc(100% - 32px));
  margin: 28px auto 0;
}

.cf-page *, .cf-term-dialog * { box-sizing: border-box; }
.cf-page button, .cf-page input, .cf-page select, .cf-page textarea,
.cf-term-dialog button, .cf-term-dialog input, .cf-term-dialog select, .cf-term-dialog textarea {
  font: inherit;
}

.cf-page button, .cf-page a, .cf-term-dialog button, .cf-term-dialog a { -webkit-tap-highlight-color: transparent; }
.cf-page button:focus-visible, .cf-page a:focus-visible, .cf-page input:focus-visible,
.cf-page select:focus-visible, .cf-page textarea:focus-visible,
.cf-term-dialog button:focus-visible, .cf-term-dialog a:focus-visible,
.cf-term-dialog input:focus-visible, .cf-term-dialog textarea:focus-visible {
  outline: 3px solid #a5b4fc;
  outline-offset: 2px;
}

.cf-hero,
.cf-search-panel,
.cf-entry-showcase,
.cf-workbench,
.cf-field-panel,
.cf-compare-panel,
.cf-guide,
.cf-algorithm,
.cf-glossary {
  margin-bottom: 24px;
  border: 1px solid var(--cf-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--cf-shadow);
}

.cf-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr);
  gap: 28px;
  overflow: hidden;
  padding: 34px;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 8% 15%, rgba(167, 139, 250, .28), transparent 32%),
    radial-gradient(circle at 95% 85%, rgba(45, 212, 191, .18), transparent 34%),
    linear-gradient(135deg, #24124f 0%, #3730a3 58%, #155e75 100%);
}

.cf-hero::after {
  position: absolute;
  right: -70px;
  top: -90px;
  width: 290px;
  height: 290px;
  content: "";
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, .035), 0 0 0 78px rgba(255, 255, 255, .025);
  pointer-events: none;
}

.cf-hero__copy, .cf-hero__stats { position: relative; z-index: 1; }
.cf-kicker, .cf-section-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #7c3aed;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .07em;
  line-height: 1.35;
  text-transform: uppercase;
}
.cf-kicker { color: #c4b5fd; }
.cf-kicker svg, .cf-section-kicker svg { width: 18px; height: 18px; flex: none; }
.cf-hero h2 {
  max-width: 800px;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.04;
}
.cf-hero__copy > p:not(.cf-kicker) {
  max-width: 850px;
  margin: 18px 0 0;
  color: #e0e7ff;
  font-size: 1.08rem;
  line-height: 1.72;
}
.cf-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.cf-badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(15,23,42,.25);
  color: #f8fafc;
  font-size: .86rem;
  font-weight: 700;
}
.cf-badges svg { width: 16px; height: 16px; }
.cf-live-explainer { display: flex; align-items: center; gap: 11px; margin-top: 14px; }
.cf-live-explainer .cf-live { border: 1px solid rgba(255,255,255,.18); background: rgba(15,23,42,.3); color: #e0e7ff; }
.cf-live-explainer .cf-live.is-current { color: #bbf7d0; }
.cf-live-explainer .cf-live.is-pending { color: #fde68a; }
.cf-live-explainer p { margin: 0; color: #cbd5e1; font-size: .82rem; line-height: 1.45; }
.cf-jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.cf-jump-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; background: rgba(15,23,42,.24); color: #fff; font-size: .88rem; font-weight: 800; text-decoration: none; }
.cf-jump-links a:hover { background: rgba(255,255,255,.13); }
.cf-jump-links svg { width: 17px; height: 17px; }

.cf-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 10px;
  margin: 0;
}
.cf-hero__stats > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(15,23,42,.32);
  backdrop-filter: blur(8px);
}
.cf-hero__stats dt { color: #c7d2fe; font-size: .8rem; font-weight: 750; text-transform: uppercase; }
.cf-hero__stats dd { margin: 4px 0 0; color: #fff; font-size: 1.65rem; font-weight: 900; line-height: 1.15; }
.cf-hero__stats .cf-date { font-size: 1rem; line-height: 1.4; }
.cf-hero__stats .cf-scan-stat { font-size: 1rem; line-height: 1.4; }
.cf-hero__stat-wide { grid-column: span 2; }

.cf-search-panel, .cf-entry-showcase, .cf-workbench, .cf-field-panel, .cf-compare-panel, .cf-guide, .cf-algorithm, .cf-glossary { padding: 26px; }
.cf-section-heading, .cf-toolbar, .cf-panel-title, .cf-visual-heading, .cf-field-header__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.cf-section-heading h2, .cf-toolbar h2, .cf-panel-title h2, .cf-field-header h2, .cf-guide h2, .cf-algorithm h2, .cf-glossary h2 {
  margin: 0;
  color: #1e1b4b;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 900;
  line-height: 1.2;
}
.cf-section-heading > div > p:last-child, .cf-toolbar > div > p:last-child {
  max-width: 880px;
  margin: 6px 0 0;
  color: var(--cf-muted);
}
.cf-live, .cf-version, .cf-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: .82rem;
  font-weight: 800;
}
.cf-live svg { width: 16px; height: 16px; }
.cf-version { background: #eef2ff; color: #4338ca; }

.cf-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-top: 20px; }
.cf-search__input-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.cf-search__input-wrap > svg { position: absolute; left: 16px; z-index: 2; width: 22px; height: 22px; color: #64748b; pointer-events: none; }
.cf-search input {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px 12px 50px;
  border: 2px solid #a5b4fc;
  border-radius: 12px;
  color: #111827;
  background: #fff;
  font-size: 1.04rem;
}
.cf-search input:focus { border-color: #6d28d9; outline: 0; box-shadow: 0 0 0 4px #ede9fe; }
.cf-entry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.cf-entry-card { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 14px; min-height: 132px; padding: 15px; overflow: hidden; border: 1px solid #ddd6fe; border-radius: 11px; background: linear-gradient(145deg,#fff,#faf5ff); text-align: left; cursor: pointer; }
.cf-entry-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: linear-gradient(#7c3aed,#0f766e); }
.cf-entry-card:hover { border-color: #a78bfa; box-shadow: 0 12px 24px -20px rgba(76,29,149,.7); }
.cf-entry-card h3 { margin: 0; color: #312e81; font-size: 1.18rem; font-weight: 900; line-height: 1.2; }
.cf-entry-card p { grid-column: 1 / -1; margin: 0; color: #64748b; font-size: .8rem; }
.cf-entry-card__type { color: #6d28d9; font-size: .73rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.cf-entry-card__score { grid-row: span 2; align-self: center; padding: 8px; border-radius: 9px; background: #ede9fe; color: #4c1d95; font-size: .8rem; font-weight: 850; text-align: center; }
.cf-entry-card__score strong { display: block; font-size: 1.05rem; }
.cf-entry-card__meta { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.cf-entry-card__meta span { padding: 4px 7px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: .7rem; font-weight: 700; }
.cf-word-filters { grid-template-columns: minmax(250px,1.6fr) minmax(180px,.8fr) minmax(180px,.9fr) auto auto; }
.cf-word-card { min-height: 162px; }
.cf-word-card > .cf-confidence { width: max-content; grid-column: 1 / -1; }
.cf-word-card__bar { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.cf-word-card__bar i { display: block; width: var(--width); height: 100%; border-radius: inherit; background: linear-gradient(90deg,#7c3aed,#0f766e); }
.cf-load-more { display: flex; justify-content: center; margin-top: 20px; }
.cf-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 50;
  max-height: 390px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 50px -22px rgba(30,41,59,.55);
}
.cf-suggestion {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1f2937;
  text-align: left;
  cursor: pointer;
}
.cf-suggestion:hover, .cf-suggestion.is-active { background: #f5f3ff; }
.cf-suggestion strong { display: block; font-size: .98rem; }
.cf-suggestion small { display: block; color: #64748b; font-size: .78rem; }
.cf-suggestion__type { padding: 3px 7px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: .72rem; font-weight: 800; }

.cf-primary-button, .cf-secondary-button, .cf-ghost-button, .cf-back, .cf-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 9px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}
.cf-primary-button { border: 1px solid var(--cf-violet); background: var(--cf-violet); color: #fff; }
.cf-primary-button:hover { border-color: var(--cf-violet-dark); background: var(--cf-violet-dark); }
.cf-secondary-button { border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; }
.cf-secondary-button:hover { background: #e0e7ff; }
.cf-ghost-button, .cf-back, .cf-info-button { border: 1px solid #dbe2ef; background: #fff; color: #475569; }
.cf-ghost-button:hover, .cf-back:hover, .cf-info-button:hover { background: #f8fafc; color: #1f2937; }
.cf-primary-button svg, .cf-secondary-button svg, .cf-ghost-button svg, .cf-back svg, .cf-info-button svg { width: 18px; height: 18px; }
.cf-search .cf-primary-button { min-height: 54px; padding-inline: 24px; }
.cf-quick { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; color: #64748b; font-size: .86rem; }
.cf-quick button { padding: 4px 9px; border: 1px solid #ddd6fe; border-radius: 999px; background: #faf5ff; color: #6d28d9; font-weight: 700; cursor: pointer; }
.cf-quick button:hover { background: #ede9fe; }

.cf-view-switch { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; border: 1px solid #dbe2ef; border-radius: 10px; background: #f8fafc; }
.cf-view-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; color: #64748b; font-size: .84rem; font-weight: 800; cursor: pointer; }
.cf-view-switch button.is-active { background: #fff; color: #5b21b6; box-shadow: 0 2px 8px rgba(15,23,42,.09); }
.cf-view-switch svg { width: 16px; height: 16px; }
.cf-view-switch span { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: #e2e8f0; font-size: .7rem; }

.cf-filters {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 1.4fr auto auto;
  gap: 12px;
  align-items: end;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.cf-filters label, .cf-term-toolbar label, .cf-custom-context label { display: grid; gap: 5px; color: #475569; font-size: .78rem; font-weight: 800; }
.cf-filters input, .cf-filters select, .cf-term-toolbar input, .cf-term-toolbar select, .cf-custom-context textarea {
  width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #111827;
}
.cf-range-label input { min-height: auto; accent-color: #6d28d9; }

.cf-loading, .cf-context-loading { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 140px; color: #64748b; font-weight: 700; }
.cf-spinner { width: 24px; height: 24px; flex: none; border: 3px solid #ddd6fe; border-top-color: #6d28d9; border-radius: 50%; animation: cf-spin .75s linear infinite; }
@keyframes cf-spin { to { transform: rotate(360deg); } }

.cf-summary-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.cf-summary-strip > div { padding: 11px 12px; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; }
.cf-summary-strip span { display: block; color: #64748b; font-size: .73rem; font-weight: 750; text-transform: uppercase; }
.cf-summary-strip strong { display: block; margin-top: 3px; color: #1e1b4b; font-size: 1.15rem; }

.cf-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.cf-field-card {
  position: relative;
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dbe2ef;
  border-radius: 13px;
  background: #fff;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.cf-field-card::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; content: ""; background: linear-gradient(90deg, #7c3aed, #0f766e); }
.cf-field-card--form::before { background: linear-gradient(90deg, #c2410c, #db2777); }
.cf-field-card:hover { transform: translateY(-2px); border-color: #a5b4fc; box-shadow: 0 16px 30px -24px rgba(55,48,163,.55); }
.cf-field-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cf-field-card__kind { color: #7c3aed; font-size: .72rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.cf-field-card h3 { margin: 4px 0 2px; color: #1e1b4b; font-size: 1.25rem; font-weight: 900; line-height: 1.25; }
.cf-field-card__en { color: #94a3b8; font-size: .8rem; }
.cf-field-card__score { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; margin: 15px 0 10px; }
.cf-score-ring { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: conic-gradient(#6d28d9 var(--score), #ede9fe 0); }
.cf-score-ring::before { grid-area: 1/1; width: 46px; height: 46px; content: ""; border-radius: 50%; background: #fff; }
.cf-score-ring strong { z-index: 1; grid-area: 1/1; font-size: .86rem; }
.cf-field-card__score p { margin: 0; color: #475569; font-size: .79rem; }
.cf-field-card__bar { height: 7px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: #ede9fe; }
.cf-field-card__bar i { display: block; width: var(--width); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #0f766e); }
.cf-field-card__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 5px 0 12px; }
.cf-field-card__meta span { padding: 6px; border-radius: 7px; background: #f8fafc; color: #64748b; font-size: .7rem; text-align: center; }
.cf-field-card__meta strong { display: block; color: #334155; font-size: .82rem; }
.cf-chip-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-chip, .cf-chip-cloud button, .cf-chip-cloud a { display: inline-flex; align-items: center; min-height: 29px; padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; color: #475569; font-size: .76rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.cf-chip:hover, .cf-chip-cloud button:hover, .cf-chip-cloud a:hover { border-color: #c4b5fd; background: #f5f3ff; color: #5b21b6; }
.cf-field-card__actions { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 14px; }
.cf-field-card__open { flex: 1; min-height: 39px; border: 0; border-radius: 8px; background: #4c1d95; color: #fff; font-weight: 850; cursor: pointer; }
.cf-field-card__open:hover { background: #3730a3; }
.cf-compare-check { display: inline-flex; align-items: center; gap: 5px; color: #64748b; font-size: .75rem; font-weight: 750; cursor: pointer; }
.cf-compare-check input { width: 17px; height: 17px; accent-color: #6d28d9; }

.cf-visual-panel { margin-top: 18px; }
.cf-visual-heading h3, .cf-field-overview h3, .cf-tab-panel h3, .cf-term-dialog h3 { margin: 0; color: #1e1b4b; font-size: 1.25rem; font-weight: 900; }
.cf-visual-heading p { margin: 4px 0 0; color: #64748b; font-size: .86rem; }
.cf-graph-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.cf-graph-actions button, .cf-graph-actions a { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 7px 9px; border: 1px solid #dbe2ef; border-radius: 7px; background: #fff; color: #475569; font-size: .78rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.cf-graph-actions button:hover, .cf-graph-actions a:hover { background: #f5f3ff; color: #5b21b6; }
.cf-graph-actions svg { width: 16px; height: 16px; }
.cf-svg-wrap { margin-top: 14px; overflow: hidden; border: 1px solid #dbe2ef; border-radius: 12px; background: radial-gradient(circle, #fff, #f8fafc); }
.cf-svg-wrap svg { display: block; width: 100%; min-height: 520px; touch-action: none; }
.cf-svg-wrap--field svg { min-height: 600px; }
.cf-graph-edge { stroke: #94a3b8; stroke-opacity: .32; }
.cf-graph-edge--membership { stroke: #8b5cf6; stroke-opacity: .27; }
.cf-graph-edge--concept { stroke: #0f766e; stroke-opacity: .34; }
.cf-graph-node { cursor: pointer; }
.cf-graph-node circle { stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 3px 4px rgba(15,23,42,.18)); }
.cf-graph-node text { fill: #1e293b; font-size: 13px; font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.cf-legend { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; color: #64748b; font-size: .78rem; }
.cf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cf-dot { width: 11px; height: 11px; border-radius: 50%; background: #6d28d9; }
.cf-dot--form { background: #ea580c; }
.cf-dot--concept { background: #4c1d95; }
.cf-dot--neighbour { background: #0f766e; }
.cf-svg-wrap--term { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.cf-svg-wrap--term svg { height: auto; min-height: 500px; }
.cf-term-graph-node--center { cursor: default; }
.cf-graph-label-bg { fill: rgba(255,255,255,.97); stroke: #dbe2ef; stroke-width: 1.25; filter: drop-shadow(0 3px 7px rgba(15,23,42,.10)); }
.cf-term-graph-node--center .cf-graph-label-bg { fill: #f5f3ff; stroke: #c4b5fd; }
.cf-graph-node .cf-graph-label { fill: #1e293b; font-size: 15px; font-weight: 800; paint-order: normal; stroke: none; }
.cf-term-graph-node[data-term-node]:hover .cf-graph-label-bg,
.cf-term-graph-node[data-term-node]:focus-visible .cf-graph-label-bg { fill: #ecfdf5; stroke: #0f766e; stroke-width: 2; }
.cf-term-graph-node[data-term-node]:focus-visible { outline: none; }
.cf-term-export-actions { margin: 12px 0 0; }

.cf-alert { margin-top: 14px; padding: 12px 14px; border-radius: 9px; font-weight: 700; }
.cf-alert--error { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.cf-empty { display: grid; min-height: 250px; place-items: center; align-content: center; text-align: center; color: #64748b; }
.cf-empty svg { width: 42px; height: 42px; color: #a78bfa; }
.cf-empty h3 { margin: 12px 0 2px; color: #334155; font-size: 1.25rem; }
.cf-empty p { margin: 0; }

.cf-field-panel { scroll-margin-top: 18px; }
.cf-field-header { padding-bottom: 18px; border-bottom: 1px solid #e2e8f0; }
.cf-field-header__main { align-items: center; margin-top: 14px; }
.cf-field-header__main > div:first-child { min-width: 0; }
.cf-field-header h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.cf-field-header__main p:last-child { margin: 6px 0 0; color: #64748b; }
.cf-field-score { display: grid; min-width: 130px; justify-items: center; padding: 12px; border: 1px solid #ddd6fe; border-radius: 12px; background: #faf5ff; }
.cf-field-score strong { color: #5b21b6; font-size: 2rem; line-height: 1; }
.cf-field-score span { margin-top: 4px; color: #6b7280; font-size: .75rem; font-weight: 800; }
.cf-field-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cf-export { position: relative; }
.cf-export__menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: 250px; padding: 6px; border: 1px solid #c7d2fe; border-radius: 10px; background: #fff; box-shadow: 0 18px 36px -20px rgba(15,23,42,.55); }
.cf-export__menu a, .cf-export__menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: #fff; color: #334155; font-size: .84rem; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; }
.cf-export__menu a:hover, .cf-export__menu button:hover { background: #f5f3ff; color: #5b21b6; }
.cf-decision-box { margin: 18px 0; padding: 13px 15px; border-left: 4px solid #d97706; border-radius: 8px; background: #fffbeb; color: #78350f; }
.cf-decision-box strong { display: block; margin-bottom: 4px; }
.cf-decision-box ul { margin: 5px 0 0 20px; padding: 0; }

.cf-field-overview { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 15px; }
.cf-metric-panel, .cf-profile-panel, .cf-term-network, .cf-term-membership, .cf-term-evidence, .cf-morphology-section, .cf-frame-section, .cf-sentiment-section, .cf-neighbour-section { padding: 18px; border: 1px solid #dbe2ef; border-radius: 12px; background: #fff; }
.cf-panel-title { align-items: center; }
.cf-panel-title h3 { margin: 0; }
.cf-info-button { min-height: 35px; padding: 6px 9px; font-size: .75rem; }
.cf-radar-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(240px, 1.1fr); align-items: center; gap: 12px; }
.cf-radar-layout svg { display: block; width: 100%; max-height: 340px; }
.cf-radar-grid { fill: none; stroke: #dbe2ef; stroke-width: 1; }
.cf-radar-axis { stroke: #cbd5e1; stroke-width: 1; }
.cf-radar-shape { fill: rgba(109,40,217,.22); stroke: #6d28d9; stroke-width: 2.5; }
.cf-radar-dot { fill: #6d28d9; stroke: #fff; stroke-width: 2; }
.cf-radar-label { fill: #475569; font-size: 12px; font-weight: 750; }
.cf-metric-item { margin-bottom: 10px; }
.cf-metric-item__head { display: flex; justify-content: space-between; gap: 10px; color: #475569; font-size: .78rem; font-weight: 800; }
.cf-metric-item__bar { height: 8px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: #ede9fe; }
.cf-metric-item__bar i { display: block; width: var(--width); height: 100%; background: linear-gradient(90deg,#8b5cf6,#0f766e); }
.cf-profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.cf-profile-stats > div { padding: 10px; border-radius: 8px; background: #f8fafc; }
.cf-profile-stats span { display: block; color: #64748b; font-size: .72rem; font-weight: 750; }
.cf-profile-stats strong { display: block; margin-top: 2px; color: #1e1b4b; font-size: 1.1rem; }
.cf-donut-row { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.cf-donut { display: grid; width: 120px; height: 120px; flex: none; place-items: center; border-radius: 50%; background: conic-gradient(#15803d 0 var(--high), #d97706 var(--high) var(--medium), #b91c1c var(--medium) 100%); }
.cf-donut::after { width: 74px; height: 74px; content: ""; border-radius: 50%; background: #fff; }
.cf-confidence-legend { display: grid; gap: 7px; color: #475569; font-size: .78rem; }
.cf-confidence-legend span { display: flex; align-items: center; gap: 7px; }
.cf-confidence-legend i { width: 10px; height: 10px; border-radius: 3px; }

.cf-field-tabs { display: flex; gap: 3px; margin-top: 20px; overflow-x: auto; border-bottom: 2px solid #e2e8f0; }
.cf-field-tabs button { flex: none; padding: 10px 13px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #64748b; font-size: .85rem; font-weight: 850; cursor: pointer; }
.cf-field-tabs button[aria-selected="true"] { border-bottom-color: #6d28d9; color: #5b21b6; }
.cf-tab-panel { padding-top: 18px; }
.cf-term-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 220px auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.cf-table-wrap { overflow: auto; border: 1px solid #dbe2ef; border-radius: 10px; }
.cf-term-table { width: 100%; min-width: 1050px; border-collapse: collapse; }
.cf-term-table th { padding: 10px 11px; background: #f1f5f9; color: #475569; font-size: .72rem; font-weight: 850; text-align: left; text-transform: uppercase; white-space: nowrap; }
.cf-term-table td { padding: 10px 11px; border-top: 1px solid #e2e8f0; color: #334155; font-size: .83rem; vertical-align: middle; }
.cf-term-table tr { cursor: pointer; }
.cf-term-table tbody tr:hover { background: #faf5ff; }
.cf-term-table td:nth-child(2) strong { color: #1e1b4b; font-size: .92rem; }
.cf-inline-bar { display: grid; grid-template-columns: 48px 90px; align-items: center; gap: 6px; }
.cf-inline-bar i { height: 7px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.cf-inline-bar i::after { display: block; width: var(--width); height: 100%; content: ""; background: #7c3aed; }
.cf-confidence { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: .7rem; font-weight: 850; white-space: nowrap; }
.cf-confidence--high { background: #dcfce7; color: #166534; }
.cf-confidence--medium { background: #fef3c7; color: #92400e; }
.cf-confidence--low { background: #fee2e2; color: #991b1b; }
.cf-table-note { margin: 9px 0 0; color: #64748b; font-size: .78rem; }
.cf-morphology-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.cf-morphology-stats > div { padding: 10px 11px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; }
.cf-morphology-stats dt { color: #64748b; font-size: .72rem; font-weight: 800; }
.cf-morphology-stats dd { margin: 3px 0 0; color: #1e1b4b; font-size: 1.04rem; font-weight: 900; overflow-wrap: anywhere; }
.cf-form-table-wrap { overflow-x: auto; border: 1px solid #dbe2ef; border-radius: 10px; }
.cf-form-table { width: 100%; border-collapse: collapse; }
.cf-form-table th { padding: 9px 11px; background: #f1f5f9; color: #475569; font-size: .72rem; font-weight: 850; text-align: left; }
.cf-form-table td { padding: 9px 11px; border-top: 1px solid #e2e8f0; color: #334155; font-size: .82rem; }
.cf-form-table td:first-child { color: #1e1b4b; font-weight: 850; }
.cf-form-table td:nth-child(3), .cf-form-table td:nth-child(4), .cf-form-table th:nth-child(3), .cf-form-table th:nth-child(4) { text-align: right; white-space: nowrap; }
.cf-form-table tr.is-canonical { background: #f0fdf4; }
.cf-form-relation { display: inline-flex; padding: 3px 7px; border-radius: 999px; background: #ede9fe; color: #5b21b6; font-size: .7rem; font-weight: 800; }
.cf-row-actions { display: flex; gap: 5px; }
.cf-row-actions button { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border: 1px solid #dbe2ef; border-radius: 6px; background: #fff; color: #475569; font-size: .72rem; font-weight: 800; cursor: pointer; }
.cf-row-actions button:hover { color: #5b21b6; background: #f5f3ff; }
.cf-row-actions svg { width: 14px; height: 14px; }

.cf-hierarchy { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding-top: 70px; }
.cf-hierarchy::before { position: absolute; top: 0; left: 50%; min-width: 180px; padding: 12px 18px; content: attr(data-root); transform: translateX(-50%); border-radius: 10px; background: #4c1d95; color: #fff; font-weight: 900; text-align: center; }
.cf-hierarchy-group { position: relative; padding: 16px; border: 1px solid #dbe2ef; border-top: 4px solid var(--group-color); border-radius: 10px; background: #fff; }
.cf-hierarchy-group::before { position: absolute; top: -31px; left: 50%; width: 1px; height: 27px; content: ""; background: #cbd5e1; }
.cf-hierarchy-group h4 { margin: 0 0 3px; color: #1e1b4b; }
.cf-hierarchy-group > span { color: #64748b; font-size: .76rem; }
.cf-hierarchy-group .cf-chip-cloud { margin-top: 11px; }
.cf-intersections { display: grid; gap: 9px; }
.cf-intersection-row { display: grid; grid-template-columns: minmax(160px,.6fr) minmax(240px,1fr) 110px 110px; align-items: center; gap: 12px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; cursor: pointer; }
.cf-intersection-row:hover { border-color: #c4b5fd; background: #faf5ff; }
.cf-intersection-row strong { color: #1e1b4b; }
.cf-intersection-bar { height: 11px; overflow: hidden; border-radius: 999px; background: #ede9fe; }
.cf-intersection-bar i { display: block; width: var(--width); height: 100%; background: linear-gradient(90deg,#7c3aed,#0f766e); }
.cf-intersection-row small { color: #64748b; text-align: right; }
.cf-clusters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.cf-cluster-card { padding: 16px; border: 1px solid #dbe2ef; border-radius: 10px; background: #fff; }
.cf-cluster-card__top { display: flex; justify-content: space-between; gap: 10px; }
.cf-cluster-card h4 { margin: 0; color: #1e1b4b; font-size: 1.05rem; }
.cf-cluster-card__stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cf-cluster-card__stats span { padding: 5px 7px; border-radius: 6px; background: #f1f5f9; color: #475569; font-size: .72rem; }
.cf-source-bars { display: grid; gap: 5px; margin-top: 12px; }
.cf-source-bar { display: grid; grid-template-columns: 110px 1fr 38px; align-items: center; gap: 7px; color: #64748b; font-size: .7rem; }
.cf-source-bar i { height: 6px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.cf-source-bar i::after { display: block; width: var(--width); height: 100%; content: ""; background: #0f766e; }
.cf-method-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.cf-method-card { padding: 15px; border: 1px solid #dbe2ef; border-radius: 9px; background: #f8fafc; }
.cf-method-card h4 { margin: 0 0 6px; color: #1e1b4b; }
.cf-method-card p, .cf-method-card li { color: #475569; font-size: .96rem; line-height: 1.62; }

.cf-compare-panel { scroll-margin-top: 18px; }
.cf-compare-table-wrap { margin-top: 15px; overflow: auto; border: 1px solid #dbe2ef; border-radius: 10px; }
.cf-compare-table { width: 100%; min-width: 800px; border-collapse: collapse; }
.cf-compare-table th, .cf-compare-table td { padding: 11px 13px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.cf-compare-table th { background: #f8fafc; color: #475569; font-size: .78rem; }
.cf-compare-table td:first-child { font-weight: 800; color: #334155; }
.cf-compare-table strong { color: #5b21b6; font-size: 1.1rem; }
.cf-compare-tray { position: fixed; right: 20px; bottom: 20px; left: 20px; z-index: 80; display: flex; max-width: 980px; min-height: 64px; align-items: center; justify-content: space-between; gap: 14px; margin: auto; padding: 10px 14px; border: 1px solid #a5b4fc; border-radius: 12px; background: #fff; box-shadow: 0 22px 50px -20px rgba(30,41,59,.65); }
.cf-compare-tray > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cf-compare-tray__item { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 7px; background: #f5f3ff; color: #5b21b6; font-size: .78rem; font-weight: 800; }
.cf-compare-tray__item button { border: 0; background: transparent; color: inherit; cursor: pointer; }

.cf-guide-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.cf-guide details, .cf-custom-context { border: 1px solid #dbe2ef; border-radius: 9px; background: #fff; }
.cf-guide summary, .cf-custom-context summary { padding: 12px 14px; color: #1e1b4b; font-weight: 850; cursor: pointer; }
.cf-guide details p { margin: 0; padding: 0 14px 14px; color: #475569; font-size: 1rem; line-height: 1.68; }
.cf-formula { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 15px; padding: 14px; border-radius: 9px; background: #1e1b4b; color: #fff; }
.cf-formula span { font-weight: 850; }
.cf-formula code { padding: 4px 7px; border-radius: 5px; background: rgba(255,255,255,.12); color: #ddd6fe; font-size: .94rem; white-space: normal; }

.cf-algorithm, .cf-glossary { scroll-margin-top: 18px; }
.cf-algorithm-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: none; }
.cf-algorithm-grid li { position: relative; display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 12px; min-height: 126px; padding: 16px; border: 1px solid #ddd6fe; border-radius: 11px; background: linear-gradient(145deg,#fff,#faf5ff); }
.cf-algorithm-grid li::after { position: absolute; right: -11px; top: calc(50% - 1px); z-index: 2; width: 20px; height: 2px; content: ""; background: #a78bfa; }
.cf-algorithm-grid li:nth-child(even)::after, .cf-algorithm-grid li:last-child::after { display: none; }
.cf-algorithm-step { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: linear-gradient(135deg,#6d28d9,#0f766e); color: #fff; font-size: 1.05rem; font-weight: 900; }
.cf-algorithm-grid h3 { margin: 1px 0 6px; color: #312e81; font-size: 1.08rem; font-weight: 900; }
.cf-algorithm-grid p { margin: 0; color: #475569; font-size: .96rem; line-height: 1.62; }
.cf-method-principle { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 12px; margin-top: 16px; padding: 15px; border-left: 5px solid #0f766e; border-radius: 9px; background: #ecfdf5; color: #134e4a; }
.cf-method-principle > svg { width: 28px; height: 28px; margin: 2px auto; }
.cf-method-principle strong { font-size: 1.03rem; }
.cf-method-principle p { margin: 3px 0 0; font-size: .98rem; line-height: 1.65; }
.cf-formula-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.cf-algorithm-note { margin: 14px 0 0; padding: 13px 15px; border: 1px solid #fcd34d; border-radius: 9px; background: #fffbeb; color: #78350f; font-size: 1rem; line-height: 1.62; }

.cf-glossary-search { position: relative; display: flex; align-items: center; max-width: 720px; margin-top: 20px; }
.cf-glossary-search svg { position: absolute; left: 14px; width: 20px; height: 20px; color: #64748b; pointer-events: none; }
.cf-glossary-search input { width: 100%; min-height: 50px; padding: 11px 14px 11px 44px; border: 2px solid #c4b5fd; border-radius: 10px; background: #fff; color: #111827; font-size: 1rem; }
.cf-glossary-search input:focus { border-color: #6d28d9; outline: 0; box-shadow: 0 0 0 4px #ede9fe; }
.cf-glossary-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 18px 0 0; }
.cf-glossary-list > div { padding: 15px; border: 1px solid #dbe2ef; border-radius: 10px; background: #f8fafc; }
.cf-glossary-list dt { color: #312e81; font-size: 1.05rem; font-weight: 900; }
.cf-glossary-list dd { margin: 5px 0 0; color: #475569; font-size: .98rem; line-height: 1.65; }
.cf-glossary-empty { margin-top: 15px; }

.cf-term-dialog { width: min(1180px, calc(100% - 24px)); max-height: calc(100vh - 28px); padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 40px 90px -28px rgba(15,23,42,.8); }
.cf-term-dialog::backdrop { background: rgba(15,23,42,.7); backdrop-filter: blur(3px); }
.cf-dialog-shell { max-height: calc(100vh - 28px); overflow: auto; }
.cf-dialog-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 22px; border-bottom: 1px solid #dbe2ef; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.cf-dialog-header h2 { margin: 0; color: #1e1b4b; font-size: clamp(1.7rem,4vw,2.5rem); font-weight: 900; }
.cf-dialog-header p:last-child { margin: 5px 0 0; color: #64748b; }
.cf-dialog-actions { display: flex; align-items: center; gap: 7px; }
.cf-dialog-close { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #dbe2ef; border-radius: 9px; background: #fff; color: #475569; cursor: pointer; }
.cf-dialog-close:hover { background: #fef2f2; color: #b91c1c; }
.cf-dialog-close svg { width: 22px; height: 22px; }
#cfTermContent { display: grid; gap: 15px; padding: 18px 22px 24px; }
.cf-membership-row { display: grid; grid-template-columns: minmax(150px,.55fr) minmax(220px,1fr) 80px 120px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.cf-membership-row:last-child { border-bottom: 0; }
.cf-membership-row a { color: #3730a3; font-weight: 850; text-decoration: none; }
.cf-membership-row a:hover { text-decoration: underline; }
.cf-membership-bar { height: 10px; overflow: hidden; border-radius: 999px; background: #ede9fe; }
.cf-membership-bar i { display: block; width: var(--width); height: 100%; background: linear-gradient(90deg,#7c3aed,#0f766e); }
.cf-membership-row small { color: #64748b; }
.cf-ambiguity { display: inline-flex; flex-direction: column; min-width: 120px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; text-align: right; }
.cf-ambiguity strong { color: #5b21b6; }
.cf-ambiguity span { color: #64748b; font-size: .7rem; }
.cf-evidence-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.cf-evidence-card { padding: 12px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; }
.cf-evidence-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: #475569; font-size: .78rem; font-weight: 800; }
.cf-evidence-card strong { color: #4c1d95; font-size: 1.05rem; }
.cf-evidence-card > i { display: block; width: var(--width); height: 7px; margin-top: 8px; border-radius: 999px; background: linear-gradient(90deg,#7c3aed,#0f766e); }
.cf-callout { margin: 12px 0 0; padding: 10px 12px; border-left: 4px solid #7c3aed; border-radius: 6px; background: #f5f3ff; color: #4c1d95; font-size: .84rem; }
.cf-frame-diagram { display: grid; grid-template-columns: minmax(160px,.45fr) minmax(0,1.55fr); gap: 16px; margin-top: 14px; }
.cf-frame-core { display: grid; min-height: 150px; place-items: center; align-content: center; padding: 15px; border-radius: 50%; background: radial-gradient(circle,#7c3aed,#3730a3); color: #fff; text-align: center; aspect-ratio: 1; }
.cf-frame-core strong { font-size: 1.25rem; }
.cf-frame-core span { font-size: .75rem; color: #ddd6fe; }
.cf-frame-roles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.cf-frame-role { position: relative; padding: 12px; border: 1px solid #dbe2ef; border-radius: 9px; background: #f8fafc; }
.cf-frame-role h4 { margin: 0 0 8px; color: #334155; font-size: .86rem; }
.cf-syntactic-frames { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2e8f0; }
.cf-syntactic-frames h4 { margin: 0 0 8px; color: #334155; }
.cf-syntax-row { display: grid; grid-template-columns: minmax(190px,1fr) 90px minmax(220px,1.3fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid #e2e8f0; color: #475569; font-size: .8rem; }
.cf-sentiment-summary { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: center; margin-top: 13px; }
.cf-sentiment-main { padding: 14px; border-radius: 10px; background: #f8fafc; text-align: center; }
.cf-sentiment-main strong { display: block; color: #1e1b4b; font-size: 1.2rem; }
.cf-sentiment-main span { color: #64748b; font-size: .75rem; }
.cf-sentiment-bar { display: flex; height: 18px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.cf-sentiment-bar i { display: block; height: 100%; }
.cf-sentiment-bar .positive { background: #16a34a; }
.cf-sentiment-bar .neutral { background: #94a3b8; }
.cf-sentiment-bar .negative { background: #dc2626; }
.cf-sentiment-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 7px; color: #64748b; font-size: .75rem; }
.cf-emotions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 13px; }
.cf-emotion { padding: 8px; border-radius: 8px; background: #faf5ff; }
.cf-emotion__head { display: flex; justify-content: space-between; color: #5b21b6; font-size: .76rem; font-weight: 800; }
.cf-emotion i { display: block; height: 6px; margin-top: 5px; border-radius: 999px; background: linear-gradient(90deg,#a78bfa,#db2777); width: var(--width); }
.cf-context-list { display: grid; gap: 8px; margin-top: 14px; }
.cf-context-card { padding: 11px 12px; border: 1px solid #e2e8f0; border-left: 4px solid #94a3b8; border-radius: 8px; background: #fff; }
.cf-context-card--positive { border-left-color: #16a34a; }
.cf-context-card--negative { border-left-color: #dc2626; }
.cf-context-card p { margin: 0; color: #334155; font-size: .84rem; line-height: 1.6; }
.cf-context-card footer { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 7px; color: #64748b; font-size: .7rem; }
.cf-context-card mark { padding: 1px 2px; border-radius: 3px; background: #fef3c7; color: inherit; }
.cf-custom-context { margin-top: 14px; }
.cf-custom-context form { display: grid; gap: 9px; padding: 0 14px 14px; }
.cf-custom-context textarea { min-height: 110px; resize: vertical; }
.cf-custom-context .cf-primary-button { justify-self: start; }

[hidden] { display: none !important; }

@media (max-width: 1120px) {
  .cf-hero { grid-template-columns: 1fr; }
  .cf-hero__stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .cf-hero__stat-wide { grid-column: auto; }
  .cf-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .cf-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cf-entry-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cf-field-overview { grid-template-columns: 1fr; }
  .cf-summary-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 800px) {
  .cf-page { width: min(100% - 18px, 1440px); margin-top: 12px; }
  .cf-hero, .cf-search-panel, .cf-entry-showcase, .cf-workbench, .cf-field-panel, .cf-compare-panel, .cf-guide, .cf-algorithm, .cf-glossary { padding: 18px; border-radius: 13px; }
  .cf-hero { padding: 24px 18px; }
  .cf-live-explainer { align-items: flex-start; flex-direction: column; }
  .cf-hero__stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cf-hero__stat-wide { grid-column: span 2; }
  .cf-section-heading, .cf-toolbar, .cf-panel-title, .cf-visual-heading, .cf-field-header__main { align-items: stretch; flex-direction: column; }
  .cf-search { grid-template-columns: 1fr; }
  .cf-search .cf-primary-button { width: 100%; }
  .cf-view-switch { width: 100%; }
  .cf-view-switch button { flex: 1; }
  .cf-filters, .cf-term-toolbar { grid-template-columns: 1fr 1fr; }
  .cf-filters button:last-child { align-self: end; }
  .cf-field-grid { grid-template-columns: 1fr; }
  .cf-entry-grid { grid-template-columns: 1fr; }
  .cf-summary-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cf-radar-layout { grid-template-columns: 1fr; }
  .cf-hierarchy { grid-template-columns: 1fr; padding-top: 70px; }
  .cf-hierarchy-group::before { display: none; }
  .cf-intersection-row { grid-template-columns: 1fr; gap: 6px; }
  .cf-intersection-row small { text-align: left; }
  .cf-clusters, .cf-method-grid, .cf-guide-grid, .cf-algorithm-grid, .cf-formula-row, .cf-glossary-list { grid-template-columns: 1fr; }
  .cf-algorithm-grid li::after { display: none; }
  .cf-dialog-header { padding: 15px; }
  #cfTermContent { padding: 14px; }
  .cf-membership-row { grid-template-columns: 1fr; gap: 6px; }
  .cf-frame-diagram, .cf-sentiment-summary { grid-template-columns: 1fr; }
  .cf-frame-core { width: 165px; min-height: 165px; margin: auto; }
  .cf-frame-roles { grid-template-columns: 1fr; }
  .cf-emotions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cf-evidence-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cf-morphology-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cf-syntax-row { grid-template-columns: 1fr; gap: 3px; }
  .cf-compare-tray { right: 9px; bottom: 9px; left: 9px; align-items: stretch; flex-direction: column; }
  .cf-svg-wrap--term svg { width: 880px; min-width: 880px; }
}

@media (max-width: 520px) {
  .cf-hero__stats, .cf-filters, .cf-term-toolbar, .cf-summary-strip, .cf-profile-stats { grid-template-columns: 1fr; }
  .cf-hero__stat-wide { grid-column: auto; }
  .cf-field-card__meta { grid-template-columns: 1fr 1fr; }
  .cf-donut-row { align-items: flex-start; flex-direction: column; }
  .cf-field-actions > *, .cf-field-actions .cf-export, .cf-field-actions .cf-export > button { width: 100%; }
  .cf-export__menu { right: auto; left: 0; width: 100%; }
  .cf-dialog-actions .cf-secondary-button { display: none; }
  .cf-emotions { grid-template-columns: 1fr; }
  .cf-evidence-grid { grid-template-columns: 1fr; }
  .cf-morphology-stats { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff !important; }
  body > header, .cf-hero, .cf-search-panel, .cf-entry-showcase, .cf-workbench, .cf-guide, .cf-algorithm, .cf-glossary, .gts-site-footer,
  .cf-back, .cf-field-actions, .cf-compare-tray, .cf-field-tabs { display: none !important; }
  .cf-page { width: 100%; margin: 0; }
  .cf-field-panel { display: block !important; padding: 0; border: 0; box-shadow: none; }
  .cf-tab-panel { display: block !important; break-inside: avoid; }
  .cf-svg-wrap svg { max-height: 500px; }
}

@media (prefers-reduced-motion: reduce) {
  .cf-spinner { animation-duration: 1.8s; }
  .cf-field-card { transition: none; }
}
