/* --------------------------------------------------------------------------
   AIGator Design System v2 · Core 0.7.1
   A calmer, product-first interface with one primary action and a contained
   document/report review workspace.
   -------------------------------------------------------------------------- */
.aigator-detector {
  --agc-ink: #14241c;
  --agc-ink-soft: #2b3d34;
  --agc-muted: #5b6b62;
  --agc-muted-strong: #46574e;
  --agc-line: #dfe7e2;
  --agc-line-strong: #cbd8d0;
  --agc-surface: #ffffff;
  --agc-soft: #f7f9f7;
  --agc-soft-green: #eef6f0;
  --agc-green: #126a43;
  --agc-green-dark: #0c5031;
  --agc-green-bright: #a9e568;
  --agc-ai: #c96358;
  --agc-human: #26955f;
  --agc-uncertain: #c38a2e;
  color: var(--agc-ink);
  font-size: 16px;
  letter-spacing: -0.008em;
}

.aigator-detector__shell {
  overflow: hidden;
  border: 1px solid var(--agc-line);
  border-radius: 18px;
  background: var(--agc-surface);
  box-shadow: 0 14px 42px rgba(22, 51, 35, 0.07);
}

.aigator-detector__header {
  align-items: center;
  gap: 24px;
  padding: 23px 26px 20px;
  border-bottom: 1px solid #edf1ee;
}

.aigator-detector__eyebrow {
  margin-bottom: 7px;
  color: var(--agc-green);
  font-size: 0.67rem;
  font-weight: 690;
  letter-spacing: 0.105em;
}

.aigator-detector__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--agc-green-bright);
}

.aigator-detector__title {
  font-size: clamp(2rem, 4vw, 2.55rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.aigator-detector__description {
  max-width: 620px;
  margin-top: 8px;
  color: var(--agc-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.aigator-detector__privacy {
  gap: 6px;
  margin-top: 0;
  border-color: #d9e3dc;
  padding: 7px 10px;
  background: #fbfcfb;
  color: #4e6156;
  font-size: 0.69rem;
  font-weight: 580;
}

.aigator-detector__form {
  padding: 15px 16px 16px;
}

.aigator-detector__workspace {
  --agc-toolbar-clearance: 36px;
  min-height: 390px;
  transition: height 180ms ease;
}

.aigator-detector__textarea {
  min-height: 390px;
  border-color: var(--agc-line-strong);
  border-radius: 14px;
  padding: calc(var(--agc-toolbar-clearance, 36px) + 22px) 20px 22px;
  background: #fff;
  color: var(--agc-ink-soft);
  font-size: 0.96rem;
  line-height: 1.68;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.aigator-detector__textarea::placeholder {
  color: #8a978f;
}

.aigator-detector__textarea:focus {
  border-color: #72a98a;
  box-shadow: 0 0 0 3px rgba(18, 106, 67, 0.10);
}

.aigator-detector__editor-toolbar {
  top: 10px;
  right: 11px;
  left: 11px;
  z-index: 6;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(220, 229, 223, 0.82);
  border-radius: 10px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 3px 12px rgba(21, 51, 34, 0.05);
  backdrop-filter: blur(8px);
}

.aigator-detector__editor-toolbar-left,
.aigator-detector__editor-toolbar-right {
  gap: 5px;
}


.aigator-detector__editor-toolbar-left,
.aigator-detector__editor-toolbar-right {
  min-width: 0;
  flex-wrap: nowrap;
}

.aigator-detector__editor-toolbar-right {
  justify-content: flex-end;
}

.aigator-detector__toolbar-button,
.aigator-detector__paste {
  min-height: 32px;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 6px 9px;
  background: transparent;
  color: #456056;
  font-size: 0.72rem;
  font-weight: 620;
  box-shadow: none;
}

.aigator-detector__toolbar-button:hover:not(:disabled),
.aigator-detector__paste:hover:not(:disabled) {
  border-color: transparent;
  background: var(--agc-soft-green);
  color: var(--agc-green-dark);
  box-shadow: none;
  transform: none;
}

.aigator-detector__toolbar-button:focus-visible,
.aigator-detector__paste:focus-visible {
  outline: 2px solid rgba(18, 106, 67, 0.22);
  outline-offset: 1px;
}

.aigator-detector__scan,
.aigator-detector__result {
  border-color: var(--agc-line-strong);
  border-radius: 14px;
}

.aigator-detector__scan {
  background: #fbfdfb;
}

.aigator-detector__scan-copy {
  background: linear-gradient(180deg, #fbfdfb 0%, #f7faf7 100%);
}

.aigator-detector__scan-copy-text {
  padding: 21px 20px 36px;
  color: #67776d;
  font-size: 0.94rem;
  line-height: 1.68;
}

.aigator-detector__scan-status {
  right: 12px;
  bottom: 12px;
  left: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 13px;
  border-color: #dbe5de;
  border-radius: 11px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(22, 53, 35, 0.07);
  backdrop-filter: blur(8px);
}

.aigator-detector__scan-kicker {
  grid-row: 1 / span 2;
  align-self: center;
  border: 1px solid #d5e2d9;
  border-radius: 999px;
  padding: 6px 8px;
  background: #f4f9f5;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.aigator-detector__scan-status strong {
  font-size: 0.88rem;
  font-weight: 650;
}

.aigator-detector__scan-status > span:last-child {
  color: var(--agc-muted);
  font-size: 0.68rem;
}

.aigator-detector__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  border: 0;
  border-radius: 0;
  padding: 2px 2px 0;
  background: transparent;
  box-shadow: none;
}

.aigator-detector__footer-meta {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.aigator-detector__counts {
  gap: 5px 13px;
  color: var(--agc-muted);
  font-size: 0.76rem;
}

.aigator-detector__counts strong {
  color: var(--agc-ink);
  font-weight: 670;
}

.aigator-detector__verification {
  justify-content: flex-start;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.aigator-detector__turnstile:empty {
  display: none;
}

.aigator-detector__verification-copy {
  color: #75837b;
  font-size: 0.67rem;
  line-height: 1.35;
}

.aigator-detector__actions {
  display: block;
  width: auto;
}

.aigator-detector button.aigator-detector__button {
  width: auto;
  min-width: 188px;
  min-height: 44px;
  justify-content: center;
  border-radius: 10px;
  padding: 8px 16px;
  text-align: center;
}

.aigator-detector__button > span:nth-child(2) {
  display: block;
}

.aigator-detector__button strong {
  font-size: 0.86rem;
  font-weight: 660;
}

.aigator-detector__button small {
  display: none;
}

.aigator-detector__button-icon {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
  border-radius: 7px;
  font-size: 0.76rem;
}

.aigator-detector button.aigator-detector__button--free {
  border-color: var(--agc-green);
  background: var(--agc-green);
  box-shadow: 0 7px 18px rgba(18, 106, 67, 0.16);
}

.aigator-detector button.aigator-detector__button--free:hover:not(:disabled),
.aigator-detector button.aigator-detector__button--free:focus-visible {
  border-color: var(--agc-green-dark);
  background: var(--agc-green-dark) !important;
  color: #fff !important;
  box-shadow: 0 9px 22px rgba(12, 80, 49, 0.18);
  transform: translateY(-1px);
}

.aigator-detector.has-result .aigator-detector__footer {
  display: none;
}

/* Guest conversion card */
.aigator-detector__access-gate {
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(247, 250, 247, 0.86);
  backdrop-filter: blur(7px);
}

.aigator-detector__access-gate-card {
  width: min(100%, 520px);
  max-height: calc(100% - 24px);
  border: 1px solid #d5e1d9;
  border-radius: 18px;
  padding: 22px 24px 20px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(20, 51, 34, 0.12);
}

.aigator-detector__access-gate-kicker {
  margin-bottom: 10px;
  padding: 6px 9px;
  background: #f1f8f3;
  font-size: 0.62rem;
  letter-spacing: 0.075em;
}

.aigator-detector__access-gate h3 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.2rem);
  font-weight: 660;
  letter-spacing: -0.045em;
}

.aigator-detector__access-gate-card > p {
  max-width: 430px;
  margin: 10px auto 0;
  color: var(--agc-muted);
  font-size: 0.91rem;
  line-height: 1.5;
}

.aigator-detector__access-gate-actions {
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 17px;
}

.aigator-detector__access-gate-actions a,
.aigator-detector__access-gate-actions button {
  min-height: 43px;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 650;
}

.aigator-detector__access-gate-signin {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--agc-green-dark);
  font-size: 0.78rem;
}

/* Contained document review */
.aigator-detector__result-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  border-color: var(--agc-line-strong) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.aigator-detector__result-text-pane,
.aigator-detector__result.is-text-view .aigator-detector__result-text-pane {
  border-right-color: #e5ece7 !important;
  background: #fff !important;
}

.aigator-detector__result-report-pane,
.aigator-detector__result.is-text-view .aigator-detector__result-report-pane {
  background: #fafcfb !important;
}

.aigator-detector__pane-header {
  min-height: 64px;
  padding: 13px 16px;
  border-bottom-color: #e8eeea;
  background: rgba(255, 255, 255, 0.96);
}

.aigator-detector__pane-header--text {
  align-items: center;
  gap: 12px;
}

.aigator-detector__section-label {
  color: var(--agc-green-dark);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.105em;
}

.aigator-detector__pane-header p {
  margin-top: 4px;
  color: var(--agc-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.aigator-detector__text-legend {
  gap: 9px;
  color: #5b6c62;
  font-size: 0.66rem;
  font-weight: 590;
}

.aigator-detector__result-text-scroll {
  padding: 22px 20px 28px;
  scrollbar-width: thin;
  scrollbar-color: #aebdb4 transparent;
}

.aigator-detector__highlighted {
  color: var(--agc-ink-soft);
  font-size: 0.96rem;
  line-height: 1.75;
}

.aigator-detector__highlighted mark {
  border-radius: 4px;
  padding: 1px 2px;
}

.aigator-detector__pane-header--report {
  min-height: 64px;
  padding: 9px 10px 9px 12px;
}

.aigator-detector__result-tabs--side {
  gap: 4px;
  border: 0;
  border-radius: 10px;
  padding: 3px;
  background: #f1f5f2;
}

.aigator-detector__result-tabs--side button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 7px 14px;
  background: transparent;
  color: #53655b;
}

.aigator-detector__result-tabs--side button strong {
  font-size: 0.73rem;
  font-weight: 640;
}

.aigator-detector__result-tabs--side button[aria-selected="true"] {
  background: #fff;
  color: var(--agc-green-dark);
  box-shadow: 0 1px 4px rgba(25, 58, 39, 0.08);
}

.aigator-detector__result-close {
  width: 37px;
  height: 37px;
  border-color: #d8e2dc;
  border-radius: 9px;
  background: #fff;
  color: #53645a;
  font-size: 1.2rem;
}

.aigator-detector__result-close:hover,
.aigator-detector__result-close:focus-visible {
  border-color: #a9bcb0;
  background: #f4f8f5;
  color: var(--agc-green-dark);
}

.aigator-detector__result-report-scroll {
  padding: 18px;
  scrollbar-width: thin;
  scrollbar-color: #aebdb4 transparent;
}

.aigator-detector__result-panel--side {
  display: grid;
  gap: 14px;
}

.aigator-detector__report-verdict-card,
.aigator-detector__assessment-context,
.aigator-detector__reason-card,
.aigator-detector__check,
.aigator-detector__share-panel {
  border-color: #dfe7e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.aigator-detector__report-verdict-card {
  padding: 17px 18px;
}

.aigator-detector__classification-label {
  margin-bottom: 8px;
}

.aigator-detector__report-verdict-line {
  gap: 7px;
}

.aigator-detector__report-verdict-line h3 {
  color: var(--agc-ink);
  font-size: 1.32rem;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.aigator-detector__confidence-chip,
.aigator-detector__origin-meta span {
  border-color: #d8e2dc;
  background: #f9fbf9;
  color: #52645a;
  font-size: 0.64rem;
  font-weight: 620;
}

.aigator-detector__composition-summary {
  margin-top: 10px;
  color: var(--agc-ink-soft);
  font-size: 0.9rem;
  font-weight: 620;
}

.aigator-detector__report-verdict-card .aigator-detector__summary {
  margin-top: 13px;
  color: var(--agc-ink-soft);
  font-size: 0.94rem;
  line-height: 1.64;
}

.aigator-detector__dynamic-reasons,
.aigator-detector__counter-evidence {
  display: grid;
  gap: 9px;
}

.aigator-detector__dynamic-heading {
  gap: 3px;
}

.aigator-detector__dynamic-heading p {
  color: var(--agc-muted);
  font-size: 0.72rem;
}

.aigator-detector__reason-list {
  gap: 8px;
}

.aigator-detector__reason-card {
  padding: 12px 13px;
  border-left-width: 3px;
}

.aigator-detector__reason-card > div {
  gap: 8px;
}

.aigator-detector__reason-card strong {
  color: var(--agc-ink);
  font-size: 0.82rem;
  font-weight: 650;
}

.aigator-detector__reason-card > div > span {
  font-size: 0.57rem;
  font-weight: 670;
}

.aigator-detector__reason-card p {
  margin-top: 6px;
  color: var(--agc-muted-strong);
  font-size: 0.76rem;
  line-height: 1.5;
}

.aigator-detector__reason-card small {
  margin-top: 7px;
  color: var(--agc-green-dark);
  font-size: 0.68rem;
  font-weight: 650;
}

.aigator-detector__assessment-context {
  padding: 13px 14px;
  background: #fbfcfb;
}

.aigator-detector__assessment-context-heading small {
  color: #586a60;
  font-size: 0.68rem;
  font-weight: 660;
  letter-spacing: 0.02em;
  text-transform: none;
}

.aigator-detector__assessment-context-heading strong {
  color: var(--agc-ink);
  font-size: 0.8rem;
  font-weight: 670;
}

.aigator-detector__assessment-context > p,
.aigator-detector__warnings {
  color: var(--agc-muted-strong);
  font-size: 0.74rem;
  line-height: 1.48;
}

.aigator-detector__warnings {
  padding-left: 18px;
}

.aigator-detector__full-analysis {
  appearance: none;
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #cfe0d5;
  border-radius: 12px;
  padding: 12px 13px;
  background: #f4f9f5;
  color: var(--agc-ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.aigator-detector__full-analysis:hover,
.aigator-detector__full-analysis:focus-visible {
  border-color: #9cb9a7;
  background: #eaf4ed;
  outline: none;
  transform: translateY(-1px);
}

.aigator-detector__full-analysis-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #dcefe2;
  color: var(--agc-green);
  font-size: 0.82rem;
}

.aigator-detector__full-analysis-copy {
  display: grid;
  gap: 3px;
}

.aigator-detector__full-analysis-copy strong {
  font-size: 0.8rem;
  font-weight: 680;
}

.aigator-detector__full-analysis-copy small {
  color: var(--agc-muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.aigator-detector__full-analysis em {
  border: 1px solid #d5e0d8;
  border-radius: 999px;
  padding: 4px 6px;
  color: #6a786f;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.aigator-detector__checks-panel--side {
  padding: 0;
  border: 0;
  background: transparent;
}

.aigator-detector__checks-heading {
  margin-bottom: 10px;
}

.aigator-detector__checks-heading h4,
.aigator-detector__share-panel h4 {
  color: var(--agc-ink);
  font-size: 1rem;
  font-weight: 670;
  letter-spacing: -0.02em;
}

.aigator-detector__checks-heading p,
.aigator-detector__share-panel > p {
  color: var(--agc-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.aigator-detector__checks-panel--side .aigator-detector__checklist {
  gap: 8px;
}

.aigator-detector__checks-panel--side .aigator-detector__check {
  padding: 11px 12px;
}

.aigator-detector__checks-panel--side .aigator-detector__check strong {
  font-size: 0.78rem;
}

.aigator-detector__checks-panel--side .aigator-detector__check > div > div span {
  font-size: 0.57rem;
}

.aigator-detector__checks-panel--side .aigator-detector__check p {
  color: var(--agc-muted);
  font-size: 0.7rem;
  line-height: 1.42;
}

.aigator-detector__share-panel {
  padding: 17px;
}

.aigator-detector__share-text-choice select,
.aigator-detector__share-actions button {
  min-height: 38px;
  border-color: #d5dfd8;
  border-radius: 9px;
  background: #fff;
  color: var(--agc-ink);
  font-size: 0.72rem;
}

.aigator-detector__share-actions button:hover,
.aigator-detector__share-actions button:focus-visible {
  border-color: #9fb8a8;
  background: #f0f7f2;
  color: var(--agc-green-dark);
}

@media (max-width: 900px) {
  .aigator-detector__header {
    align-items: flex-start;
    padding: 20px 20px 17px;
  }

  .aigator-detector__form {
    padding: 12px;
  }

  .aigator-detector__workspace,
  .aigator-detector__textarea {
    min-height: clamp(270px, 48vh, 330px) !important;
  }

  .aigator-detector__footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 3px 2px 0;
  }

  .aigator-detector__actions,
  .aigator-detector button.aigator-detector__button {
    width: 100%;
  }

  .aigator-detector button.aigator-detector__button {
    min-height: 46px;
  }

  .aigator-detector__result-split {
    grid-template-rows: minmax(260px, 0.92fr) minmax(315px, 1.08fr) !important;
  }

  .aigator-detector__pane-header--text {
    align-items: flex-start;
  }

  .aigator-detector__result-report-scroll,
  .aigator-detector__result-text-scroll {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .aigator-detector__header {
    display: grid;
    gap: 12px;
    padding: 18px 16px 15px;
  }

  .aigator-detector__title {
    font-size: 2rem;
  }

  .aigator-detector__description {
    font-size: 0.9rem;
  }

  .aigator-detector__privacy {
    justify-self: start;
  }

  .aigator-detector__textarea {
    padding: calc(var(--agc-toolbar-clearance, 36px) + 18px) 15px 18px;
    font-size: 0.91rem;
  }

  .aigator-detector__editor-toolbar {
    right: 9px;
    left: 9px;
  }

  .aigator-detector__toolbar-button,
  .aigator-detector__paste {
    padding: 6px 7px;
    font-size: 0.68rem;
  }

  .aigator-detector__counts {
    font-size: 0.72rem;
  }

  .aigator-detector__verification-copy {
    font-size: 0.64rem;
  }

  .aigator-detector__access-gate {
    padding: 10px;
  }

  .aigator-detector__access-gate-card {
    max-height: calc(100% - 8px);
    padding: 17px 14px 15px;
  }

  .aigator-detector__access-gate h3 {
    font-size: 1.65rem;
  }

  .aigator-detector__access-gate-card > p {
    font-size: 0.83rem;
  }

  .aigator-detector__access-gate-actions {
    grid-template-columns: 1fr;
  }

  .aigator-detector__access-gate-signin {
    grid-column: 1;
  }

  .aigator-detector__result-tabs--side button {
    padding-inline: 10px;
  }

  .aigator-detector__result-tabs--side button strong {
    font-size: 0.69rem;
  }

  .aigator-detector__text-legend {
    display: none;
  }

  .aigator-detector__report-verdict-card,
  .aigator-detector__share-panel {
    padding: 14px;
  }
}


/* v0.7.1 editor surface: toolbar is a real row, never an overlay. */
.aigator-detector__editor-surface {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--agc-line-strong);
  border-radius: 14px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease, height 180ms ease;
}

.aigator-detector__editor-surface:focus-within {
  border-color: #72a98a;
  box-shadow: 0 0 0 3px rgba(18, 106, 67, 0.10);
}

.aigator-detector__editor-toolbar {
  position: relative !important;
  inset: auto !important;
  z-index: 2;
  min-height: 46px;
  padding: 7px 9px;
  border-bottom: 1px solid #e8eeea;
  background: #fbfcfb;
}

.aigator-detector__textarea {
  min-height: 344px;
  max-height: none;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 18px 20px 22px !important;
  background: #fff;
  box-shadow: none !important;
}

.aigator-detector__textarea:focus {
  border: 0 !important;
  box-shadow: none !important;
}

.aigator-detector.is-loading .aigator-detector__editor-toolbar,
.aigator-detector.has-result .aigator-detector__editor-toolbar {
  visibility: hidden;
  opacity: 0;
}

@media (max-width: 560px) {
  .aigator-detector__editor-surface {
    min-height: clamp(280px, 44vh, 340px);
  }

  .aigator-detector__editor-toolbar {
    min-height: 43px;
    padding: 6px 7px;
  }

  .aigator-detector__textarea {
    min-height: 237px;
    padding: 15px 15px 18px !important;
  }
}


/* v0.7.2: unified detector action bar */
.aigator-detector__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  border: 1px solid #e1e8e3;
  border-radius: 14px;
  padding: 10px 11px 10px 14px;
  background: #fbfcfb;
  box-shadow: 0 8px 24px rgba(24, 52, 36, 0.045);
}

.aigator-detector__counts {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 13px;
  color: #5c6c63;
  font-size: 0.76rem;
}

.aigator-detector__counts strong {
  color: #17291f;
  font-size: 0.82rem;
  font-weight: 690;
}

.aigator-detector__verification {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.aigator-detector__turnstile:empty {
  display: none;
}

.aigator-detector__verification-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d9e4dc;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #496056;
  font-size: 0.69rem;
  font-weight: 590;
  line-height: 1.2;
  white-space: nowrap;
}

.aigator-detector__verification-copy::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #2a9360;
  box-shadow: 0 0 0 3px rgba(42, 147, 96, 0.10);
  content: "";
}

.aigator-detector__actions {
  display: block;
  width: auto;
}

.aigator-detector button.aigator-detector__button {
  width: auto;
  min-width: 166px;
  min-height: 46px;
  justify-content: space-between;
  gap: 12px;
  border-radius: 11px;
  padding: 8px 10px 8px 16px;
  text-align: left;
}

.aigator-detector__button-label {
  display: block;
  min-width: 0;
}

.aigator-detector__button-label strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.aigator-detector__button-label small {
  display: none;
}

.aigator-detector__button-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
}

.aigator-detector button.aigator-detector__button--free {
  border-color: #126a43;
  background: #126a43;
  color: #fff;
  box-shadow: none;
}

.aigator-detector button.aigator-detector__button--free .aigator-detector__button-icon {
  background: rgba(255, 255, 255, 0.14);
}

.aigator-detector button.aigator-detector__button--free:hover:not(:disabled),
.aigator-detector button.aigator-detector__button--free:focus-visible {
  border-color: #0b4d30;
  background: #0b4d30 !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(11, 77, 48, 0.16);
  transform: translateY(-1px);
}

.aigator-detector button.aigator-detector__button--free:disabled {
  border-color: #d8e3dc;
  background: #e9f0eb;
  color: #72837a !important;
  box-shadow: none;
  opacity: 1;
}

.aigator-detector button.aigator-detector__button--free:disabled .aigator-detector__button-icon {
  background: rgba(92, 115, 101, 0.08);
  color: #839188;
}

.aigator-detector.has-result .aigator-detector__footer {
  display: none;
}

@media (max-width: 980px) {
  .aigator-detector__footer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .aigator-detector__verification {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .aigator-detector__actions {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 600px) {
  .aigator-detector__footer {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px;
  }

  .aigator-detector__counts,
  .aigator-detector__verification,
  .aigator-detector__actions {
    grid-column: 1;
  }

  .aigator-detector__counts {
    grid-row: 1;
  }

  .aigator-detector__verification {
    grid-row: 2;
    justify-content: flex-start;
  }

  .aigator-detector__verification-copy {
    white-space: normal;
  }

  .aigator-detector__actions {
    grid-row: 3;
    width: 100%;
  }

  .aigator-detector button.aigator-detector__button {
    width: 100%;
    min-height: 48px;
  }
}


/* v0.7.3: stable editor geometry, visible long-text scrolling, and collision-free actions. */
.aigator-detector__editor-surface {
  overflow: hidden;
  border: 1px solid #d9e4dc;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.aigator-detector__editor-surface:focus-within {
  border-color: #76a78a;
  box-shadow: inset 0 0 0 1px rgba(18, 106, 67, 0.10);
}

.aigator-detector__editor-toolbar {
  position: relative !important;
  inset: auto !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #e5ece7 !important;
  border-radius: 0 !important;
  background: #fbfcfb !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.aigator-detector__editor-toolbar::before,
.aigator-detector__editor-toolbar::after {
  display: none !important;
  content: none !important;
}

.aigator-detector__textarea {
  display: block;
  min-width: 0;
  overflow-x: hidden !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #91a59a #f1f5f2;
  -webkit-overflow-scrolling: touch;
}

.aigator-detector__textarea[data-scrollable="true"] {
  overflow-y: scroll !important;
}

.aigator-detector__textarea::-webkit-scrollbar {
  width: 10px;
}

.aigator-detector__textarea::-webkit-scrollbar-track {
  background: #f1f5f2;
  border-left: 1px solid #e5ece7;
}

.aigator-detector__textarea::-webkit-scrollbar-thumb {
  min-height: 40px;
  border: 2px solid #f1f5f2;
  border-radius: 999px;
  background: #91a59a;
}

.aigator-detector__textarea::-webkit-scrollbar-thumb:hover {
  background: #70877a;
}

.aigator-detector__footer {
  grid-template-columns: minmax(0, 1fr) minmax(176px, 212px);
  grid-template-areas:
    "counts action"
    "verification action";
  column-gap: 16px;
  row-gap: 7px;
  align-items: center;
  padding: 11px 12px 11px 14px;
}

.aigator-detector__counts {
  grid-area: counts;
  min-width: 0;
}

.aigator-detector__verification {
  grid-area: verification;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
  overflow: hidden;
}

.aigator-detector__verification-copy {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.aigator-detector__actions {
  grid-area: action;
  display: flex;
  width: 100%;
  align-self: stretch;
  align-items: stretch;
}

.aigator-detector button.aigator-detector__button {
  width: 100%;
  min-width: 0;
  min-height: 52px;
}

@media (max-width: 860px) {
  .aigator-detector__footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "counts"
      "verification"
      "action";
    gap: 9px;
  }

  .aigator-detector__verification,
  .aigator-detector__actions {
    width: 100%;
  }

  .aigator-detector__verification-copy {
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .aigator-detector__editor-surface {
    border-radius: 14px;
  }

  .aigator-detector__editor-toolbar {
    gap: 4px;
  }

  .aigator-detector__editor-toolbar-left,
  .aigator-detector__editor-toolbar-right {
    gap: 2px;
  }

  .aigator-detector__toolbar-button,
  .aigator-detector__paste {
    padding-inline: 7px;
  }

  .aigator-detector__footer {
    padding: 11px;
  }
}


/* v0.7.4: normalize primary CTA height with availability notice */
.aigator-detector__footer {
  align-items: center;
}

.aigator-detector__verification-copy {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 0.74rem;
}

.aigator-detector__actions {
  align-self: center;
}

.aigator-detector button.aigator-detector__button {
  min-height: 42px;
  height: 42px;
  padding: 8px 12px 8px 16px;
}

.aigator-detector__button-label strong {
  line-height: 1.15;
}

.aigator-detector__button-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

@media (max-width: 600px) {
  .aigator-detector button.aigator-detector__button {
    width: 100%;
    min-height: 42px;
    height: 42px;
  }
}


/* v0.7.5: improve CTA contrast and mobile readability */
.aigator-detector button.aigator-detector__button--free,
.aigator-detector button.aigator-detector__button--free:visited {
  background: #126a43;
  border-color: #126a43;
  color: #ffffff !important;
}

.aigator-detector button.aigator-detector__button--free .aigator-detector__button-label strong,
.aigator-detector button.aigator-detector__button--free .aigator-detector__button-label small,
.aigator-detector button.aigator-detector__button--free .aigator-detector__button-icon {
  color: #ffffff !important;
}

.aigator-detector button.aigator-detector__button--free .aigator-detector__button-icon {
  background: rgba(255,255,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.aigator-detector button.aigator-detector__button--free:hover:not(:disabled),
.aigator-detector button.aigator-detector__button--free:focus-visible {
  background: #0f5a3a !important;
  border-color: #0f5a3a;
  color: #ffffff !important;
}

.aigator-detector button.aigator-detector__button--free:disabled {
  background: #6f9481;
  border-color: #6f9481;
  color: #ffffff !important;
  opacity: 1;
}

.aigator-detector button.aigator-detector__button--free:disabled .aigator-detector__button-label strong,
.aigator-detector button.aigator-detector__button--free:disabled .aigator-detector__button-label small,
.aigator-detector button.aigator-detector__button--free:disabled .aigator-detector__button-icon {
  color: #ffffff !important;
}

.aigator-detector button.aigator-detector__button--free:disabled .aigator-detector__button-icon {
  background: rgba(16, 60, 39, 0.16);
}

@media (max-width: 600px) {
  .aigator-detector button.aigator-detector__button--free {
    box-shadow: 0 2px 8px rgba(18, 106, 67, 0.10);
  }
}


/* v0.7.6: balanced desktop action footer */
.aigator-detector__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "counts verification action";
  align-items: center;
  column-gap: 18px;
  row-gap: 8px;
  min-height: 62px;
  margin-top: 12px;
  padding: 10px 12px 10px 16px;
  border: 1px solid #e1e8e3;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 7px 22px rgba(24, 52, 36, 0.04);
}

.aigator-detector__counts {
  grid-area: counts;
  align-items: center;
  gap: 5px 12px;
}

.aigator-detector__verification {
  grid-area: verification;
  width: auto;
  min-width: 0;
  justify-content: flex-end;
  overflow: visible;
}

.aigator-detector__verification-copy {
  min-height: 0;
  max-width: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #52665b;
  font-size: 0.72rem;
  font-weight: 610;
  line-height: 1.35;
  white-space: nowrap;
}

.aigator-detector__verification-copy::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  box-shadow: 0 0 0 3px rgba(42, 147, 96, 0.09);
}

.aigator-detector__actions {
  grid-area: action;
  width: auto;
  align-self: center;
}

.aigator-detector button.aigator-detector__button {
  width: auto;
  min-width: 152px;
  min-height: 40px;
  height: 40px;
  gap: 10px;
  border-radius: 10px;
  padding: 7px 8px 7px 15px;
}

.aigator-detector__button-label strong {
  font-size: 0.84rem;
  line-height: 1.1;
}

.aigator-detector__button-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 7px;
}

@media (max-width: 980px) {
  .aigator-detector__footer {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "counts action"
      "verification verification";
    column-gap: 14px;
  }

  .aigator-detector__verification {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .aigator-detector__footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "counts"
      "verification"
      "action";
    gap: 9px;
    padding: 11px;
  }

  .aigator-detector__verification {
    justify-content: center;
  }

  .aigator-detector__verification-copy {
    text-align: center;
    white-space: normal;
  }

  .aigator-detector__actions,
  .aigator-detector button.aigator-detector__button {
    width: 100%;
  }

  .aigator-detector button.aigator-detector__button {
    min-height: 42px;
    height: 42px;
  }
}


/* v0.7.7: aligned split headers and persistent interactive scrollbars */
@media (min-width: 901px) {
  .aigator-detector__result-split {
    --aigator-result-header-height: 78px;
  }

  .aigator-detector__result-text-pane,
  .aigator-detector__result.is-text-view .aigator-detector__result-text-pane {
    grid-template-rows: var(--aigator-result-header-height) minmax(0, 1fr) auto !important;
  }

  .aigator-detector__result-report-pane,
  .aigator-detector__result.is-text-view .aigator-detector__result-report-pane {
    grid-template-rows: var(--aigator-result-header-height) minmax(0, 1fr) !important;
  }

  .aigator-detector__pane-header,
  .aigator-detector__pane-header--text,
  .aigator-detector__pane-header--report {
    box-sizing: border-box;
    width: 100%;
    height: var(--aigator-result-header-height) !important;
    min-height: var(--aigator-result-header-height) !important;
    max-height: var(--aigator-result-header-height) !important;
    border-bottom: 1px solid #e5ece7 !important;
  }
}

.aigator-detector__scroll-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.aigator-detector__scroll-shell > .aigator-detector__result-text-scroll,
.aigator-detector__scroll-shell > .aigator-detector__result-report-scroll {
  box-sizing: border-box;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none;
}

.aigator-detector__scroll-shell > .aigator-detector__result-text-scroll::-webkit-scrollbar,
.aigator-detector__scroll-shell > .aigator-detector__result-report-scroll::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
}

.aigator-detector__persistent-scrollbar {
  position: absolute;
  z-index: 12;
  top: 9px;
  right: 5px;
  bottom: 9px;
  width: 9px;
  border-radius: 999px;
  background: #edf2ee;
  box-shadow: inset 0 0 0 1px rgba(91, 112, 100, 0.07);
  cursor: pointer;
  opacity: 1;
  touch-action: none;
  user-select: none;
}

.aigator-detector__persistent-scrollbar[hidden] {
  display: none !important;
}

.aigator-detector__persistent-scrollbar-thumb {
  position: absolute;
  top: 0;
  right: 2px;
  left: 2px;
  min-height: 38px;
  border-radius: 999px;
  background: #8da296;
  box-shadow: 0 1px 3px rgba(25, 52, 37, 0.15);
  transition: background-color 140ms ease, box-shadow 140ms ease;
  will-change: transform, height;
}

.aigator-detector__persistent-scrollbar:hover .aigator-detector__persistent-scrollbar-thumb,
.aigator-detector__scroll-shell.is-scrollbar-dragging .aigator-detector__persistent-scrollbar-thumb {
  background: #667f71;
  box-shadow: 0 1px 4px rgba(25, 52, 37, 0.22);
}

.aigator-detector__scroll-shell.is-scrollable > .aigator-detector__result-text-scroll,
.aigator-detector__scroll-shell.is-scrollable > .aigator-detector__result-report-scroll {
  padding-right: max(18px, calc(1rem + 8px));
}

@media (max-width: 900px) {
  .aigator-detector__pane-header,
  .aigator-detector__pane-header--text,
  .aigator-detector__pane-header--report {
    height: auto !important;
    max-height: none !important;
  }

  .aigator-detector__persistent-scrollbar {
    right: 4px;
    width: 8px;
  }
}


/* v0.7.8: prevent footer status/button overlap on desktop */
@media (min-width: 681px) {
  .aigator-detector__footer {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "counts counts"
      "verification action" !important;
    align-items: center;
    row-gap: 10px;
  }

  .aigator-detector__verification {
    justify-content: flex-start !important;
    align-self: center;
    min-width: 0;
    overflow: hidden;
  }

  .aigator-detector__verification-copy {
    display: inline-flex;
    align-items: center;
    max-width: min(100%, 34rem);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.3;
  }

  .aigator-detector__actions {
    justify-self: end;
  }
}

@media (min-width: 981px) {
  .aigator-detector__verification-copy {
    max-width: 40rem;
  }
}


/* v0.7.9: compact footer row, collision-safe status, cleaner detector header */
.aigator-detector__header {
  border-bottom: 0 !important;
}

@media (min-width: 981px) {
  .aigator-detector__footer {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 20rem) auto !important;
    grid-template-areas: "counts verification action" !important;
    align-items: center !important;
    min-height: 58px;
    row-gap: 0 !important;
    column-gap: 14px;
    padding: 8px 12px 8px 16px;
  }

  .aigator-detector__counts {
    min-width: 0;
  }

  .aigator-detector__verification {
    min-width: 0;
    width: 100%;
    justify-content: flex-end !important;
    overflow: hidden;
  }

  .aigator-detector__verification-copy {
    min-width: 0;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal !important;
  }

  .aigator-detector__actions {
    justify-self: end;
    flex: 0 0 auto;
  }
}

@media (min-width: 681px) and (max-width: 980px) {
  .aigator-detector__footer {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "counts action"
      "verification verification" !important;
    row-gap: 6px !important;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .aigator-detector__verification {
    justify-content: flex-start !important;
  }
}


/* v0.7.10: concise user-facing scan status */
.aigator-detector__scan-status {
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  gap: 0 12px !important;
  align-items: center !important;
}

.aigator-detector__scan-kicker {
  grid-row: auto !important;
  align-self: center !important;
}

.aigator-detector__scan-status strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
}

.aigator-detector__scan-status > [data-aigator-scan-description] {
  display: none !important;
}


/* v0.7.11: account status in the header badge and concise usage beside the action */
.aigator-detector__privacy.is-signed-in {
  border-color: #bfdbc9;
  background: #f4faf6;
  color: #155f3d;
}

.aigator-detector__privacy.is-verification-required {
  border-color: #e4d5a8;
  background: #fffaf0;
  color: #775b16;
}

.aigator-detector__privacy [data-aigator-account-status-text] {
  white-space: nowrap;
}

/* v0.8.0 paid-credit confirmation */
.aigator-detector__modal-primary {
  border-color: #0f5a36 !important;
  background: #0f5a36 !important;
  color: #fff !important;
}
.aigator-detector__modal-primary:hover,
.aigator-detector__modal-primary:focus-visible {
  border-color: #0a4428 !important;
  background: #0a4428 !important;
  color: #fff !important;
}
