:root {
  color-scheme: light;
  --charcoal: #141918;
  --ink: #192635;
  --ink-soft: #425161;
  --paper: #f6f6f3;
  --panel: #fffdfa;
  --panel-soft: #f0ece4;
  --line: #d9d2c5;
  --burgundy: #963044;
  --burgundy-dark: #762437;
  --gold: #c69a46;
  --teal: #1c6d70;
  --teal-soft: #e2f0ee;
  --rose-soft: #f5e4e2;
  --shadow: 0 18px 50px rgba(25, 38, 53, 0.14);
  --serif-font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-family: var(--serif-font);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

body,
button,
input,
select {
  font-family: var(--serif-font);
}

button,
input,
select,
summary,
a {
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration-color: rgba(28, 109, 112, 0.45);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal);
}

button,
summary {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(198, 154, 70, 0.75);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(217, 210, 197, 0.6);
  background: rgba(246, 246, 243, 0.94);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: var(--charcoal);
  color: #fffaf0;
  font-size: 0.78rem;
}

.nav-links {
  gap: 1.35rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 78svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
  background-image: url("assets/hero-corpus-argument.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(20, 25, 24, 0.94) 0%, rgba(20, 25, 24, 0.8) 42%, rgba(20, 25, 24, 0.2) 100%),
    linear-gradient(0deg, rgba(20, 25, 24, 0.25), rgba(20, 25, 24, 0.02));
}

.hero-inner {
  width: min(1120px, 90vw);
  margin: 0 auto;
  align-self: center;
  padding: 5.5rem 0 4rem;
  color: #fffaf0;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 880px;
  font-family: var(--serif-font);
  font-size: 3.8rem;
  font-weight: 700;
}

h2 {
  font-size: 2.1rem;
  font-weight: 800;
}

h3 {
  font-size: 1.35rem;
  font-weight: 800;
}

h4 {
  font-size: 1.02rem;
}

.hero-copy {
  max-width: 700px;
  margin: 1.25rem 0 0;
  color: rgba(255, 250, 240, 0.86);
  font-size: 1.14rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--burgundy);
  color: #fff;
}

.button.primary:hover {
  background: var(--burgundy-dark);
  color: #fff;
}

.button.secondary {
  border-color: rgba(255, 250, 240, 0.52);
  background: rgba(255, 250, 240, 0.08);
  color: #fffaf0;
}

.button.secondary:hover {
  background: rgba(255, 250, 240, 0.16);
  color: #fffaf0;
}

.button.secondary.light {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.button.small {
  min-height: 40px;
  padding: 0.52rem 0.75rem;
  border-color: var(--line);
  background: var(--ink);
  color: #fffaf0;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  pointer-events: none;
}

.tour-overlay.active {
  display: block;
}

.tour-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 18, 0.32);
  pointer-events: auto;
}

.tour-card {
  position: fixed;
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1rem, 4vw, 2.5rem);
  width: min(430px, calc(100vw - 2rem));
  padding: 1.1rem;
  border: 1px solid rgba(255, 250, 240, 0.34);
  border-radius: 10px;
  background: #fffdfa;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}

.tour-card-header,
.tour-status,
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.tour-card h2 {
  margin: 0.1rem 0 0;
  font-family: var(--serif-font);
  font-size: 1.35rem;
}

.tour-card .eyebrow {
  margin: 0;
  color: var(--burgundy);
}

.tour-icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f7f2e9;
  color: var(--ink);
  font-weight: 900;
}

.tour-status {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tour-description {
  min-height: 4.8rem;
  margin: 0.8rem 0 1rem;
  color: var(--ink);
  font-size: 1rem;
}

.tour-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8dfd1;
}

.tour-progress span {
  display: block;
  width: 16.66%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--burgundy), var(--gold));
  transition: width 220ms ease;
}

.tour-actions {
  margin-top: 1rem;
}

.tour-target {
  position: relative;
  z-index: 25;
  outline: 3px solid rgba(198, 154, 70, 0.95);
  outline-offset: 5px;
  box-shadow: 0 0 0 9px rgba(198, 154, 70, 0.2);
  transition: outline-color 180ms ease, box-shadow 180ms ease;
}

.tour-cursor {
  position: fixed;
  z-index: 90;
  width: 26px;
  height: 26px;
  border: 3px solid #fffdfa;
  border-radius: 50%;
  background: var(--burgundy);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: left 420ms ease, top 420ms ease, opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.tour-cursor::before,
.tour-cursor::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.tour-cursor::before {
  right: -5px;
  bottom: -7px;
  width: 9px;
  height: 14px;
  border-radius: 8px;
  background: #fffdfa;
  transform: rotate(-35deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.tour-cursor::after {
  inset: -12px;
  border: 2px solid rgba(150, 48, 68, 0.72);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.45);
}

.tour-overlay.active .tour-cursor {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.tour-overlay.active .tour-cursor.is-clicking {
  transform: translate(-50%, -50%) scale(0.82);
}

.tour-overlay.active .tour-cursor.is-clicking::after {
  animation: tour-click-ring 520ms ease-out;
}

@keyframes tour-click-ring {
  0% {
    opacity: 0.85;
    transform: scale(0.45);
  }

  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

.hero-features {
  display: grid;
  max-width: 930px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2.4rem;
}

.hero-features div {
  min-height: 108px;
  padding: 0.95rem;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.08);
}

.hero-features strong,
.hero-features span {
  display: block;
}

.hero-features strong {
  margin-bottom: 0.35rem;
  color: #fffaf0;
}

.hero-features span {
  color: rgba(255, 250, 240, 0.78);
}

.quick-demo,
.demo-section,
.why-section,
.methods-section,
.collaborate-section {
  padding: 4.8rem 5vw;
}

.section-heading,
.demo-header,
.metrics-grid,
.filter-accordion,
.dashboard-shell,
.methods-card,
.collaborate-panel {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 1.4rem;
}

.quick-grid {
  display: grid;
  width: min(1160px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.quick-card {
  display: grid;
  min-height: 205px;
  grid-template-rows: auto auto 1fr;
  gap: 0.75rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 32px rgba(25, 38, 53, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.quick-card:hover {
  border-color: rgba(150, 48, 68, 0.46);
  box-shadow: 0 16px 42px rgba(25, 38, 53, 0.12);
  transform: translateY(-2px);
}

.step {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 850;
}

.card-title {
  font-size: 1.12rem;
  font-weight: 850;
}

.card-copy {
  color: var(--ink-soft);
}

.demo-section {
  background: #f6f6f6;
}

.demo-header {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.2rem;
}

.demo-header p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.metric-card {
  min-height: 104px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(25, 38, 53, 0.07);
}

.metric-card span,
.metric-card strong {
  display: block;
}

.metric-card span {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 780;
}

.metric-card strong {
  margin-top: 0.45rem;
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
}

.filter-accordion {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(25, 38, 53, 0.06);
}

.filter-accordion summary {
  padding: 1rem;
  color: var(--burgundy);
  font-weight: 850;
}

.controls-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: end;
  padding: 1rem;
  border-top: 1px solid var(--line);
  background: #fbfaf6;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 760;
}

select,
input {
  min-height: 40px;
  width: 100%;
  border: 1px solid #c9c0b2;
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 680;
}

select {
  min-width: 220px;
  padding: 0 2rem 0 0.65rem;
}

input {
  max-width: 132px;
  padding: 0 0.65rem;
}

input[type="search"],
.wide-control input {
  max-width: none;
  min-width: 260px;
}

.dashboard-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: clip;
}

.dashboard-tabs {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
  overflow-x: auto;
  padding: 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.tab-button {
  min-height: 48px;
  min-width: max-content;
  padding: 0.7rem 0.9rem;
  border: 1px solid transparent;
  border-top: 4px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 820;
}

.tab-button.active,
.tab-button:hover {
  border-color: var(--line);
  border-top-color: var(--burgundy);
  border-bottom-color: var(--panel);
  background: var(--panel);
  color: var(--ink);
}

.demo-workspace {
  min-width: 0;
}

.tab-panel {
  display: none;
  padding: 1.25rem;
}

.tab-panel.active {
  display: block;
}

.panel-heading {
  display: flex;
  gap: 1.25rem;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-heading .eyebrow {
  margin-bottom: 0.35rem;
}

.panel-note,
.metric-callout {
  max-width: 340px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.metric-callout {
  padding: 0.72rem 0.85rem;
  border-left: 4px solid var(--burgundy);
  background: var(--rose-soft);
  color: #59323a;
}

.chart-wrap {
  min-height: 420px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tall-chart {
  min-height: 520px;
}

#overview-chart,
#trends-chart,
#cooccurrence-chart {
  display: block;
  width: 100%;
  min-height: 330px;
}

.tall-chart #trends-chart {
  min-height: 390px;
}

.cooccurrence-chart-wrap {
  margin-bottom: 1rem;
}

#cooccurrence-chart {
  min-height: 460px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem 1rem;
  align-items: center;
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.overview-legend {
  padding-top: 0.15rem;
  border-top: 1px solid #e6dfd4;
}

.legend-item {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
}

.legend-swatch {
  display: inline-block;
  width: 30px;
  height: 5px;
  border-radius: 999px;
  background: var(--swatch-color);
  box-shadow: 0 0 0 1px rgb(20 28 38 / 0.08);
}

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

.overview-grid article,
.methods-tldr,
.methods-accordions details {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
}

.overview-grid p,
.methods-accordions p {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

th,
td {
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid #e6dfd4;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eee8dc;
  color: var(--ink);
  font-size: 0.86rem;
}

td {
  color: #293747;
}

tbody tr:nth-child(even) {
  background: #fbf8f2;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.rate {
  font-weight: 850;
  color: var(--teal);
}

.kwic-summary {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  background: var(--teal-soft);
  color: #174f52;
  font-weight: 760;
}

.kwic-table-wrap {
  max-height: 680px;
}

mark {
  padding: 0.08rem 0.18rem;
  border-radius: 3px;
  background: #f3d17b;
  color: #261d0d;
}

details.kwic-detail summary {
  color: var(--ink);
  font-weight: 680;
}

details.kwic-detail p {
  max-width: 820px;
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
}

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

.co-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
}

.co-card strong,
.co-card span {
  display: block;
}

.co-card strong {
  color: var(--ink);
}

.co-card span {
  margin-top: 0.35rem;
  color: var(--ink-soft);
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.methods-tldr {
  margin-bottom: 1rem;
  color: var(--ink-soft);
}

.methods-accordions {
  display: grid;
  gap: 0.75rem;
}

.methods-accordions summary {
  color: var(--burgundy);
  font-weight: 850;
}

.subsection-title {
  margin: 1.35rem 0 0.8rem;
  color: var(--teal);
  font-size: 1.05rem;
}

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

.wordlist-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.wordlist-card h4 {
  margin: 0 0 0.8rem;
  color: var(--teal);
}

.wordlist-card p {
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
}

.wordlist-card code {
  display: block;
  color: #334353;
  font-family: var(--serif-font);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: normal;
}

.why-section {
  background: var(--paper);
}

.why-copy {
  display: grid;
  width: min(1160px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.why-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.methods-section {
  background: #ece6db;
}

.methods-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.55fr);
  gap: 2rem;
  align-items: start;
}

.methods-card p {
  color: var(--ink-soft);
}

.methods-card details {
  border: 1px solid #c9b99e;
  border-radius: 8px;
  background: #fffaf1;
}

.methods-card summary {
  padding: 1rem;
  color: var(--burgundy);
  font-weight: 850;
}

.methods-copy {
  padding: 0 1rem 1rem;
}

.methods-copy p {
  margin: 0 0 0.85rem;
}

.collaborate-section {
  background: var(--charcoal);
  color: #fffaf0;
}

.collaborate-panel {
  display: grid;
  gap: 1rem;
  max-width: 840px;
  margin-left: 5vw;
}

.collaborate-panel h2 {
  max-width: 720px;
  font-family: var(--serif-font);
  font-size: 2.45rem;
}

svg text {
  font-family: var(--serif-font);
}

.collaborate-panel p,
.collaborate-panel li {
  color: rgba(255, 250, 240, 0.82);
}

.collaborate-panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.collaborate-panel li {
  margin: 0.35rem 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.25rem 5vw;
  border-top: 1px solid rgba(217, 210, 197, 0.25);
  background: #111514;
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

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

@media (max-width: 940px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
    overflow-x: auto;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero-features,
  .quick-grid,
  .metrics-grid,
  .overview-grid,
  .why-copy,
  .methods-card,
  .demo-header,
  .wordlist-grid,
  .cooccurrence-grid {
    grid-template-columns: 1fr;
  }

  .tour-card {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    width: auto;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .hero {
    min-height: 80svh;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(20, 25, 24, 0.94), rgba(20, 25, 24, 0.64));
  }

  h1 {
    font-size: 2.05rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .quick-demo,
  .demo-section,
  .why-section,
  .methods-section,
  .collaborate-section {
    padding: 3.2rem 4vw;
  }

  .quick-card {
    min-height: 175px;
  }

  .controls-strip,
  .panel-heading,
  .export-actions {
    align-items: stretch;
    flex-direction: column;
  }

  select,
  input,
  input[type="search"],
  .wide-control input {
    min-width: 100%;
  }

  .chart-wrap {
    min-height: 360px;
    padding: 0.65rem;
  }

  #overview-chart,
  #trends-chart,
  #cooccurrence-chart {
    min-height: 300px;
  }

  .tour-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tour-description {
    min-height: 0;
  }

  .collaborate-panel {
    margin-left: 0;
  }

  .collaborate-panel h2 {
    font-size: 1.9rem;
  }
}
