.aid-hero {
  padding: 84px 24px 72px;
  background: linear-gradient(135deg, var(--navy-light) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--cream);
  text-align: center;
}

[data-theme="dark"] .aid-hero {
  background: linear-gradient(140deg, var(--ghost) 0%, var(--navy-deep) 100%);
  border-bottom-color: rgba(255, 255, 255, .06);
}

.aid-hero-inner {
  max-width: 840px;
  margin: 0 auto;
}

.aid-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-mid);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

[data-theme="dark"] .aid-eyebrow {
  color: var(--gold);
}

.aid-hero h1 {
  font-family: var(--fd);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.02;
  color: var(--navy);
  font-weight: 800;
  margin: 0;
}

[data-theme="dark"] .aid-hero h1 {
  color: var(--ink);
}

.aid-hero p {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.aid-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 72px;
}

.aid-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: 28px;
  align-items: start;
}

.aid-input-panel,
.aid-guidance,
.aid-verdict,
.aid-report,
.aid-chart-wrap {
  background: var(--white);
  border: 1px solid var(--cream);
  border-radius: var(--r);
  box-shadow: var(--sh);
}

[data-theme="dark"] .aid-input-panel,
[data-theme="dark"] .aid-guidance,
[data-theme="dark"] .aid-verdict,
[data-theme="dark"] .aid-report,
[data-theme="dark"] .aid-chart-wrap {
  background: var(--ghost);
  border-color: rgba(255, 255, 255, .07);
}

.aid-input-panel {
  padding: 24px;
}

.aid-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.aid-section-title i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-light);
  color: var(--navy-mid);
  font-size: 1.25rem;
}

[data-theme="dark"] .aid-section-title i {
  background: rgba(255, 200, 0, .08);
  color: var(--gold);
}

.aid-section-title h2,
.aid-guidance h3 {
  font-family: var(--fd);
  color: var(--navy);
  margin: 0;
}

[data-theme="dark"] .aid-section-title h2,
[data-theme="dark"] .aid-guidance h3 {
  color: var(--ink);
}

.aid-section-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.aid-label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.aid-textarea {
  width: 100%;
  min-height: 250px;
  resize: vertical;
  border: 1px solid var(--cream);
  border-radius: 12px;
  padding: 16px;
  color: var(--navy);
  background: var(--navy-light);
  line-height: 1.75;
  font: inherit;
  outline: none;
}

[data-theme="dark"] .aid-textarea {
  color: var(--ink);
  background: rgba(255, 255, 255, .035);
  border-color: rgba(255, 255, 255, .08);
}

.aid-textarea:focus {
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 4px rgba(27, 77, 62, .08);
}

[data-theme="dark"] .aid-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 200, 0, .09);
}

.aid-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.aid-chip,
.aid-tabs button {
  border: 1px solid var(--cream);
  background: var(--white);
  color: var(--navy);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 700;
  cursor: pointer;
}

[data-theme="dark"] .aid-chip,
[data-theme="dark"] .aid-tabs button {
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
  border-color: rgba(255, 255, 255, .08);
}

.aid-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .84rem;
}

.aid-chip:hover,
.aid-tabs button:hover {
  border-color: var(--navy-mid);
  color: var(--navy-mid);
}

[data-theme="dark"] .aid-chip:hover,
[data-theme="dark"] .aid-tabs button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.aid-input-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.aid-word-count {
  color: var(--muted);
  font-size: .9rem;
}

.aid-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--navy-mid);
  color: var(--white);
  padding: 12px 22px;
  font-weight: 800;
  cursor: pointer;
  min-width: 160px;
}

.aid-primary-btn:disabled {
  opacity: .65;
  cursor: wait;
}

[data-theme="dark"] .aid-primary-btn {
  background: var(--gold);
  color: var(--navy-deep);
}

.aid-guidance {
  padding: 22px;
  position: sticky;
  top: 92px;
}

.aid-guide-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.aid-guide-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream);
}

[data-theme="dark"] .aid-guide-list div {
  border-bottom-color: rgba(255, 255, 255, .06);
}

.aid-guide-list strong {
  color: var(--navy-mid);
}

[data-theme="dark"] .aid-guide-list strong {
  color: var(--gold);
}

.aid-guide-list span,
.aid-guidance p {
  color: var(--muted);
  line-height: 1.7;
  font-size: .92rem;
}

.aid-results {
  margin-top: 28px;
}

.aid-verdict {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: center;
  padding: 24px;
  border-top: 4px solid var(--navy-mid);
}

.aid-verdict.is-ai {
  border-top-color: #b42318;
}

.aid-verdict.is-human {
  border-top-color: #16803c;
}

.aid-verdict.is-mixed {
  border-top-color: #c47a00;
}

.aid-kicker {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.aid-verdict h2 {
  margin: 5px 0 6px;
  font-family: var(--fd);
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

[data-theme="dark"] .aid-verdict h2 {
  color: var(--ink);
}

.aid-verdict p {
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.aid-meter-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 8px;
}

.aid-meter-top strong {
  color: var(--navy);
}

[data-theme="dark"] .aid-meter-top strong {
  color: var(--ink);
}

.aid-meter {
  height: 12px;
  border-radius: 999px;
  background: var(--cream);
  overflow: hidden;
}

[data-theme="dark"] .aid-meter {
  background: rgba(255, 255, 255, .08);
}

.aid-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--navy-mid);
  transition: width .7s ease;
}

.aid-verdict.is-ai .aid-meter span {
  background: #b42318;
}

.aid-verdict.is-human .aid-meter span {
  background: #16803c;
}

.aid-verdict.is-mixed .aid-meter span {
  background: #c47a00;
}

.aid-stats,
.aid-modules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.aid-stat,
.aid-module {
  background: var(--white);
  border: 1px solid var(--cream);
  border-radius: 12px;
  padding: 16px;
}

[data-theme="dark"] .aid-stat,
[data-theme="dark"] .aid-module {
  background: var(--ghost);
  border-color: rgba(255, 255, 255, .07);
}

.aid-stat span,
.aid-module span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.aid-stat strong,
.aid-module strong {
  display: block;
  margin-top: 7px;
  color: var(--navy);
  font-size: 1.45rem;
}

[data-theme="dark"] .aid-stat strong,
[data-theme="dark"] .aid-module strong {
  color: var(--ink);
}

.aid-tabs {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  border-bottom: 1px solid var(--cream);
  padding-bottom: 14px;
}

[data-theme="dark"] .aid-tabs {
  border-bottom-color: rgba(255, 255, 255, .07);
}

.aid-tabs button.active {
  background: var(--navy-mid);
  color: var(--white);
  border-color: var(--navy-mid);
}

[data-theme="dark"] .aid-tabs button.active {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

.aid-tab-panel {
  display: none;
  margin-top: 18px;
}

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

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

.aid-module {
  border-left: 4px solid var(--navy-mid);
}

.aid-module small {
  display: block;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 10px;
}

.aid-module-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--cream);
  overflow: hidden;
  margin-top: 12px;
}

[data-theme="dark"] .aid-module-bar {
  background: rgba(255, 255, 255, .08);
}

.aid-module-bar i {
  display: block;
  height: 100%;
  width: var(--score);
  background: var(--navy-mid);
}

.aid-chart-wrap {
  display: flex;
  justify-content: center;
  padding: 22px;
}

.aid-highlight-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

.aid-highlight-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.aid-highlight-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.aid-sentence-view {
  display: grid;
  gap: 12px;
}

.aid-sentence-card {
  background: var(--white);
  border: 1px solid var(--cream);
  border-left: 4px solid #16803c;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--sh);
}

[data-theme="dark"] .aid-sentence-card {
  background: var(--ghost);
  border-color: rgba(255, 255, 255, .07);
}

.aid-sentence-card.mid {
  border-left-color: #c47a00;
}

.aid-sentence-card.high {
  border-left-color: #b42318;
}

.aid-sentence-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.aid-sentence-top span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.aid-sentence-top strong {
  color: var(--navy);
}

[data-theme="dark"] .aid-sentence-top strong {
  color: var(--ink);
}

.aid-sentence-card p {
  color: var(--navy);
  line-height: 1.9;
  margin: 0;
}

[data-theme="dark"] .aid-sentence-card p {
  color: var(--ink);
}

.aid-sentence-card mark {
  color: inherit;
  border-radius: 4px;
  padding: 2px 3px;
  background: rgba(22, 163, 74, .12);
  border-bottom: 3px solid #16803c;
}

.aid-sentence-card mark.mid {
  background: rgba(196, 122, 0, .15);
  border-bottom-color: #c47a00;
}

.aid-sentence-card mark.high {
  background: rgba(180, 35, 24, .15);
  border-bottom-color: #b42318;
}

.aid-reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.aid-reason-list em {
  border-radius: 999px;
  background: var(--navy-light);
  color: var(--navy-mid);
  padding: 5px 10px;
  font-style: normal;
  font-size: .78rem;
  font-weight: 700;
}

[data-theme="dark"] .aid-reason-list em {
  background: var(--gold-light);
  color: var(--gold);
}

.aid-report {
  color: var(--navy);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-x: auto;
  padding: 22px;
  font-family: Consolas, "Courier New", monospace;
  font-size: .88rem;
}

[data-theme="dark"] .aid-report {
  color: var(--ink);
}

@media (max-width: 920px) {
  .aid-workspace,
  .aid-verdict {
    grid-template-columns: 1fr;
  }

  .aid-guidance {
    position: static;
  }

  .aid-stats,
  .aid-modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .aid-hero {
    padding: 58px 18px 48px;
  }

  .aid-wrap {
    padding: 32px 16px 56px;
  }

  .aid-input-panel,
  .aid-guidance,
  .aid-verdict {
    padding: 18px;
  }

  .aid-input-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .aid-primary-btn {
    width: 100%;
  }

  .aid-stats,
  .aid-modules {
    grid-template-columns: 1fr;
  }
}
