/* AW8 Light Editorial — custom refinements on top of Tailwind utilities. */

:root {
  --page: #f7f9fc;
  --ink: #172033;
  --mute: #667085;
  --line: #e5eaf2;
  --brand: #2457e8;
  --navy: #173a8a;
  --sun: #ffd447;
  --cream: #fff7d6;
  --mist: #edf3ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
}

p {
  overflow-wrap: break-word;
}

::selection {
  background: var(--sun);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--navy) !important;
  outline-offset: 3px !important;
}

a.text-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a.text-link:hover {
  color: var(--navy);
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  background: var(--navy);
  line-height: 0;
  padding: 0.4rem 0.6rem 0.35rem;
  box-shadow: inset 3px 0 0 var(--sun);
  text-decoration: none;
}

.logo-link img {
  display: block;
  height: 36px;
  width: auto;
}

@media (min-width: 768px) {
  .logo-link img {
    height: 40px;
  }
}

.nav-link {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.45rem 0.55rem;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--brand);
}

.nav-link[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--brand);
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: inline-block;
}

[data-mobile-nav][hidden] {
  display: none;
}

@media (min-width: 1024px) {
  [data-mobile-nav] {
    display: none !important;
  }
}

.mobile-link {
  display: block;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
}

.mobile-link[aria-current="page"] {
  color: var(--brand);
  box-shadow: inset 3px 0 0 var(--sun);
  padding-left: 0.75rem;
}

a.row-link {
  color: inherit;
  text-decoration: none;
}

a.row-link:hover .row-title {
  color: var(--brand);
}

[id] {
  scroll-margin-top: 6.5rem;
}

.category-shell [id] {
  scroll-margin-top: 9rem;
}

.cat-index {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.cat-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.85rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.cat-link:hover,
.cat-link[aria-current="true"] {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

h2 .chip,
h2 .chip-blue {
  margin-left: 0.55rem;
  font-family: Inter, sans-serif;
  letter-spacing: 0;
  vertical-align: middle;
  position: relative;
  top: -0.2rem;
}

.home-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, #2457e8 0%, #173a8a 58%, #102a66 100%);
}

.home-hero > div {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.home-hero > div > div {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}

.home-hero h1,
.home-hero p {
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (min-width: 1024px) {
  .home-hero > div {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 3rem;
    align-items: center;
  }

  .home-hero > div > div {
    grid-column: auto;
  }
}

.home-hero h1 {
  color: #fff;
}

.hero-photo {
  position: relative;
  width: min(100%, 420px);
  height: 520px;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  background: #102a66;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 72% 24%;
}

@media (min-width: 1024px) {
  .hero-photo img {
    object-position: 84% 32%;
  }
}

@media (min-width: 1024px) {
  .hero-photo {
    width: 100%;
    height: 520px;
  }
}

/* The only banner on the site */
.feature-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #edf1f8;
}

.feature-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.feature-banner .shape-a,
.feature-banner .shape-b,
.feature-banner .shape-c,
.feature-banner .shape-d {
  position: absolute;
}

.feature-banner .shape-a {
  width: 30%;
  height: 160%;
  right: -8%;
  top: -30%;
  background: #173a8a;
  transform: rotate(16deg);
}

.feature-banner .shape-b {
  width: 16%;
  aspect-ratio: 1;
  left: 6%;
  bottom: -28%;
  background: #ffd447;
}

.feature-banner .shape-c {
  width: 42px;
  height: 42px;
  right: 22%;
  top: 14%;
  border: 3px solid #ffd447;
}

.feature-banner .shape-d {
  width: 18%;
  height: 8px;
  left: 8%;
  top: 18%;
  background: #fff7d6;
}

.banner-label {
  position: relative;
  z-index: 1;
  max-width: 92%;
  margin: 0;
  padding: 0.55rem 0.8rem;
  background: #173a8a;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(0.68rem, 1.6vw, 0.95rem);
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-align: center;
  box-shadow: inset 4px 0 0 #ffd447;
}

/* Numbered steps */
.step-rail {
  position: relative;
}

@media (min-width: 768px) {
  .step-rail::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 4%;
    right: 4%;
    height: 1px;
    background: var(--line);
  }
}

.step-index {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--sun);
  color: var(--navy);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

/* FAQ */
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.faq-trigger .chevron {
  color: var(--brand);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.faq-panel[hidden] {
  display: none;
}

/* Guide */
.toc-panel {
  display: none;
}

.toc-panel.is-open {
  display: block;
}

@media (min-width: 1024px) {
  .toc-panel {
    display: block !important;
  }
}

.toc-panel a {
  display: block;
  padding: 0.4rem 0;
  color: var(--mute);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.toc-panel a:hover,
.toc-panel a[aria-current="true"] {
  color: var(--brand);
}

.toc-panel a[aria-current="true"] {
  box-shadow: inset 2px 0 0 var(--sun);
  padding-left: 0.6rem;
}

[data-toc-toggle] .fa-chevron-down {
  transition: transform 0.2s ease;
}

[data-toc-toggle][aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

.read-track {
  height: 3px;
  background: var(--line);
}

.read-track span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
}

/* Devices */
.device-stage {
  position: relative;
  min-height: 460px;
}

.device-sun {
  position: absolute;
  right: 186px;
  bottom: 168px;
  z-index: 0;
  width: 64px;
  height: 64px;
  background: var(--sun);
}

.device-desk,
.device-phone {
  position: absolute;
  background: #fff;
  z-index: 1;
}

.device-desk {
  left: 0;
  top: 28px;
  width: 78%;
  border: 1px solid var(--line);
}

.device-phone {
  right: 0;
  bottom: 0;
  width: 210px;
  border: 2px solid var(--navy);
}

.device-top {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--page);
}

.device-top i {
  width: 8px;
  height: 8px;
  background: var(--brand);
  display: block;
}

.device-top i:nth-child(2) {
  background: var(--sun);
}

.device-top i:nth-child(3) {
  background: var(--navy);
}

.device-phone .device-top {
  justify-content: center;
}

.device-phone .device-top i {
  display: none;
}

.device-phone .device-top::before {
  content: "";
  width: 46%;
  height: 6px;
  background: var(--navy);
}

.device-screen {
  padding: 14px;
}

@media (max-width: 767px) {
  .device-stage {
    min-height: 0;
    display: grid;
    justify-items: center;
    gap: 1.75rem;
  }

  .device-sun {
    display: none;
  }

  .device-desk,
  .device-phone {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 340px);
  }

  .device-phone {
    width: min(100%, 230px);
  }
}

/* Help topics and form */
.topic-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  font-family: Inter, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.topic-btn i {
  color: var(--brand);
}

.topic-btn[aria-pressed="true"] {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--navy);
}

.topic-btn[aria-pressed="true"] i {
  color: var(--navy);
}

@media (max-width: 640px) {
  .topic-btn {
    width: 100%;
  }
}

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
}

.is-invalid {
  border-color: var(--navy) !important;
  box-shadow: inset 3px 0 0 var(--sun);
}

.form-error {
  margin: 0.35rem 0 0;
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

table.data caption {
  caption-side: top;
  margin: 0 0 0.75rem;
  text-align: left;
  color: var(--mute);
  font-size: 0.875rem;
}

table.data th,
table.data td {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.9375rem;
  line-height: 1.55;
}

table.data th {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  color: var(--navy);
  background: var(--mist);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  background: var(--sun);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chip-blue {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  background: var(--mist);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .faq-trigger .chevron,
  .read-track span,
  [data-toc-toggle] .fa-chevron-down {
    transition: none;
  }
}
