/* AI readiness assessment: only what the shared tool skin does not cover
   (section steps, answer cards, result rows, print-the-results mode).
   Built from /styles.css tokens, so both themes follow without overrides. */

/* tools.css already shrinks the margin between the hero and the tool; the
   section padding on either side (104px under the hero, 64px above the tool
   on a phone) still pushed the questions below the fold, so trim it here. */
.seo-page .seo-hero:has(+ .ara-tool-section) {
  padding-bottom: 28px;
}

.seo-page main > .seo-hero + .ara-tool-section {
  padding-top: 0;
}

.ara-head {
  margin-bottom: 18px;
}

.ara-head h2 {
  margin-bottom: 6px;
}

#ara-root {
  display: grid;
  gap: 18px;
  min-width: 0;
}

/* Progress, layout switch and the example / reset buttons. */
.ara-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
}

.ara-progress {
  display: grid;
  flex: 1 1 220px;
  gap: 6px;
  min-width: 0;
}

.ara-progress-text {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ara-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Section chips: jump to a section and see how much of it is answered. */
.ara-steps {
  scroll-margin-top: 84px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ara-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-elev);
  color: var(--text-2);
  font: 600 13px/1.2 var(--font-sans);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.ara-step-btn:hover {
  background: var(--surface-3);
}

.ara-step-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.ara-step-btn[aria-current="step"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.ara-step-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12px;
}

.ara-step-btn.is-done .ara-step-num {
  background: var(--success-soft);
  color: var(--success);
}

.ara-step-count {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* Question sections. */
.ara-form {
  display: grid;
  gap: 26px;
  min-width: 0;
}

.ara-section h3 {
  display: grid;
  gap: 3px;
  margin: 0 0 12px;
  font-size: 18px;
}

/* Headings take focus only from the script (tabindex -1, never tabbed to),
   so they need no focus ring. */
.ara-section h3:focus {
  outline: none;
}

.ara-section-num {
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ara-section > .tool-hint {
  margin: -4px 0 12px;
}

.ara-questions {
  display: grid;
  gap: 14px;
}

.ara-qnum {
  color: var(--text-3);
}

/* Each answer is a full-width card so it is easy to hit on a phone. */
.tool-question legend + .ara-option {
  margin-top: 10px;
}

.ara-option {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.ara-option:hover {
  border-color: var(--border-strong);
}

.ara-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.ara-option:has(input:focus-visible) {
  box-shadow: var(--shadow-focus);
}

.ara-nav {
  justify-content: space-between;
}

/* Results. */
.ara-results h2 {
  margin: 0;
}

.ara-results h2:focus {
  outline: none;
}

.ara-results h3 {
  margin: 6px 0 0;
  font-size: 16px;
}

.ara-live,
.ara-results-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.ara-outof {
  color: var(--text-3);
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: 0;
}

.ara-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.ara-stage-text {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

.ara-dims {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ara-dim {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
}

.ara-dim-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}

.ara-dim-name {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 650;
}

.ara-dim-weight {
  color: var(--text-3);
  font-size: 12.5px;
}

.ara-dim-score {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ara-muted {
  color: var(--text-3);
  font-size: 13px;
}

.ara-dim-text {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.ara-next {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.3rem;
  color: var(--text-2);
  font-size: 14.5px;
}

.ara-next strong {
  color: var(--text);
}

.ara-next ul,
.ara-cautions {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
  padding-left: 1.1rem;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.ara-agent {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.ara-agent h3 {
  margin: 0;
}

.ara-agent p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}

.ara-agent .ara-agent-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.ara-agent .ara-agent-reason,
.ara-agent .ara-agent-label {
  color: var(--text-3);
  font-size: 13.5px;
}

.ara-agent a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ara-share {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ara-share input[readonly] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.ara-record summary {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.ara-record ol {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 1.4rem;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.ara-record-q {
  color: var(--text);
  font-weight: 600;
}

.ara-offscreen {
  position: fixed;
  top: 0;
  left: -9999px;
  opacity: 0;
}

.final-cta .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 760px) {
  .ara-controls,
  .ara-controls .tool-actions {
    width: 100%;
  }

  .ara-nav .button {
    flex: 1 1 auto;
    justify-content: center;
    white-space: nowrap;
  }

  .ara-dim-name {
    flex-basis: 100%;
  }

  .ara-dim-score {
    order: 1;
    margin-left: 0;
  }

  .ara-dim-weight {
    order: 2;
    margin-left: auto;
  }
}

/* "Print or save as PDF" prints the results only. A plain Ctrl+P (no class)
   still prints the whole page, guide included. */
@media print {
  html.ara-printing main > *:not(.ara-tool-section),
  html.ara-printing .ara-head,
  html.ara-printing .ara-toolbar,
  html.ara-printing .ara-steps,
  html.ara-printing .ara-form,
  html.ara-printing .ara-nav,
  html.ara-printing .tool-privacy,
  html.ara-printing .ara-record summary {
    display: none !important;
  }

  html.ara-printing .tool-app {
    padding: 0;
    border: 0;
  }

  .ara-dim,
  .ara-agent,
  .ara-next > li {
    break-inside: avoid;
  }

  .tool-meter,
  .tool-meter > span,
  .tool-badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* The stages and worked-example tables are short enough to fit a phone, so
   they skip the site-wide 520px minimum (and its "scroll sideways" hint). */
.compare-wrap.ara-fit .compare-table {
  min-width: 0;
}

.compare-wrap.ara-fit + .compare-hint {
  display: none;
}
