/*
 * AIST visual identity v1 — brand layer over the inherited DS layout system.
 * Source palette: the existing AIST WordPress configuration.
 * Type: Noto Sans body, Nunito Sans headings/navigation, self-hosted under OFL.
 */
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/noto-sans/noto-sans-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/noto-sans/noto-sans-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/nunito-sans/nunito-sans-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/nunito-sans/nunito-sans-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --aist-navy: #0D1F2D;
  --aist-blue: #7187A9;
  --aist-taupe: #BBAE9A;
  --aist-ink: #435B7C;
  --aist-warm-ink: #6D604F;

  --font-display: "Nunito Sans", system-ui, sans-serif;
  --font-body: "Noto Sans", system-ui, sans-serif;
  --font-label: "Nunito Sans", system-ui, sans-serif;

  --color-text-primary: var(--aist-navy);
  --color-text-secondary: #4F6070;
  --color-text-tertiary: #596877;
  --color-text-brand: var(--aist-warm-ink);
  --color-text-link: var(--aist-ink);
  --color-text-link-hover: #304663;
  --color-text-link-visited: #4D4F6E;
  --color-text-on-dark: #FFFFFF;
  --color-text-secondary-on-dark: #C7D3E2;
  --color-text-brand-on-dark: var(--aist-taupe);
  --color-text-link-on-dark: #D1DDEE;
  --color-text-link-visited-on-dark: #DCD6E5;

  --color-surface-default: #FFFFFF;
  --color-surface-subtle: #F4F6F9;
  --color-surface-warm: #EEE9E1;
  --color-surface-inverse: var(--aist-navy);
  --color-surface-inverse-pattern: #20374A;
  --color-surface-brand-subtle: #F3F0EB;
  --color-surface-stone-subtle: #F8F6F2;
  --color-surface-secondary-subtle: #EDF1F6;
  --color-surface-selection: #DFE6F0;
  --color-surface-disabled: #E0E5EB;

  --color-action-primary-background: var(--aist-navy);
  --color-action-primary-hover: #233D53;
  --color-action-primary-text: #FFFFFF;
  --color-action-accent-background: var(--aist-taupe);
  --color-action-accent-hover: #CBBFAC;
  --color-action-accent-text: var(--aist-navy);
  --color-action-secondary: var(--aist-ink);
  --color-action-secondary-hover-background: #DFE6F0;
  --color-action-secondary-hover-text: var(--aist-navy);

  --color-icon-default: #4F6070;
  --color-icon-interactive: var(--aist-ink);
  --color-icon-brand-decorative: var(--aist-blue);
  --color-border-subtle: #DFE4EB;
  --color-border-default: #5D6C7B;
  --color-border-strong: var(--aist-ink);
  --color-border-disabled: #C5CDD8;
  --color-focus-ring: #526B8E;
  --color-focus-ring-dark: var(--aist-taupe);

  --color-information-surface: #EDF1F6;
  --color-information-text: #304663;
  --color-information-border: #526B8E;

  --dsc-insight-tone-1-background: #EDF1F6;
  --dsc-insight-tone-1-pattern: #A8B7CD;
  --dsc-insight-tone-2-background: #F3F0EB;
  --dsc-insight-tone-2-pattern: #CFC3AF;
  --dsc-insight-tone-3-background: #F3F6FA;
  --dsc-insight-tone-3-pattern: #B6C4D8;
  --dsc-insight-tone-4-background: #F8F6F2;
  --dsc-insight-tone-4-pattern: #D8CFC1;
  --dsc-insight-tone-5-background: #EEF0F5;
  --dsc-insight-tone-5-pattern: #B8BFD2;
  --dsc-insight-tone-5-accent: #4D5775;

  --dsc-sector-tone-1-background: #F3F0EB;
  --dsc-sector-tone-1-accent: #6D604F;
  --dsc-sector-tone-2-background: #EDF1F6;
  --dsc-sector-tone-2-accent: #435B7C;
  --dsc-sector-tone-3-background: #EEF0F5;
  --dsc-sector-tone-3-accent: #4D5775;
  --dsc-sector-tone-4-background: #F3F6FA;
  --dsc-sector-tone-4-accent: #435B7C;
  --dsc-sector-tone-5-background: #E8EDF4;
  --dsc-sector-tone-5-accent: #3F5675;
  --dsc-sector-tone-6-background: #F8F6F2;
  --dsc-sector-tone-6-accent: #6D604F;
  --dsc-sector-tone-7-background: #F0F3F8;
  --dsc-sector-tone-7-accent: #435B7C;
  --dsc-sector-tone-8-background: #EEE9E1;
  --dsc-sector-tone-8-accent: #6D604F;
}

/* Nunito/Noto use their natural width, retaining the existing type-size scale. */
body, h1, h2, h3, h4, h5, h6, .dsc-eyebrow, .site-footer__column h2,
.dsc-sector-card__eyebrow, .dsc-case-study-card__eyebrow, .dsc-insight-card__eyebrow {
  font-stretch: normal;
}

.site-navigation, .dsc-button, .dsc-menu-toggle {
  font-family: var(--font-label);
}

.site-header__inner {
  min-height: 96px;
  gap: var(--space-5);
}

.aist-brand-logo {
  display: block;
  width: 196px;
  height: auto;
}

.dsc-brand--footer .aist-brand-logo {
  width: 224px;
  max-width: 100%;
  height: auto;
  margin-bottom: var(--space-4);
}

.dsc-component--hero {
  background-image: url("../images/brand/patterns/hero-hexagons-small.svg"), url("../images/brand/patterns/hero-hexagons.svg");
}

.dsc-component--sector-grid::before,
.dsc-component--featured-offer-cards::before {
  background-image: url("../images/brand/patterns/hero-hexagons-small.svg");
}

.dsc-component--sector-grid::after,
.dsc-component--featured-offer-cards::after {
  background-image: url("../images/brand/patterns/hero-hexagons.svg");
}

.dsc-service-card {
  border-top-color: var(--aist-blue);
}

.dsc-insight-card__link {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.site-footer__base {
  border-top-color: #344B61;
}

/* Primary buttons on navy remain visibly distinct from their surroundings. */
.dsc-surface--inverse, .dsc-component--cta-band {
  --color-action-primary-background: var(--aist-taupe);
  --color-action-primary-hover: #CBBFAC;
  --color-action-primary-text: var(--aist-navy);
}

.dsc-surface--inverse .dsc-button--secondary:hover,
.dsc-component--cta-band .dsc-button--secondary:hover,
.dsc-surface--inverse .dsc-button--ghost:hover,
.dsc-component--cta-band .dsc-button--ghost:hover {
  color: var(--aist-navy);
  border-color: #D1DDEE;
}

/* The inherited cream closing variant needs its own light-surface tokens. */
.dsc-component--cta-band.dsc-component--closing {
  --color-text-primary: var(--aist-navy);
  --color-text-secondary: #4F6070;
  --color-text-brand: var(--aist-warm-ink);
  --color-text-link: var(--aist-ink);
  --color-text-link-hover: #304663;
  --color-text-link-visited: #4D4F6E;
  --color-focus-ring: #526B8E;
  --color-action-primary-background: var(--aist-navy);
  --color-action-primary-hover: #233D53;
  --color-action-primary-text: #FFFFFF;
}

.dsc-component--cta-band.dsc-component--closing .dsc-button--secondary {
  color: var(--aist-ink);
  border-color: var(--aist-ink);
}

.dsc-component--cta-band.dsc-component--closing .dsc-button--secondary:hover {
  color: var(--aist-navy);
}

.site-main,
.site-main section[id] {
  scroll-margin-top: 7rem;
}

/* Accessible disclosure navigation for the approved local draft routes. */
.aist-nav-disclosure {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--color-text-primary);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.aist-nav-disclosure::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentcolor;
  border-bottom: 1.5px solid currentcolor;
  transform: translateY(-2px) rotate(45deg);
}
.aist-nav-disclosure[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.aist-nav-disclosure:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: 4px; }
.aist-editorial-preview .sub-menu[hidden] { display: none; }
.aist-editorial-preview .is-submenu-open > .sub-menu:not([hidden]) {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
}
.aist-editorial-preview .dsc-primary-menu { gap: var(--space-3); }
.aist-home main > section:nth-child(3) .dsc-outcome-card {
  padding: var(--space-5);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-default);
  background: #EDF1F6;
}
.aist-home main > section:nth-child(3) .dsc-outcome-card:nth-child(2) { background: #F3F0EB; }
.aist-home main > section:nth-child(3) .dsc-outcome-card:nth-child(3) { background: #ECF2EF; }
.aist-home main > section:nth-child(3) .dsc-outcome-card:nth-child(4) { background: #F1EDF4; }
.aist-home main > section:nth-child(3) .dsc-outcome-card:nth-child(5) { background: #F7F0E7; }
.aist-home main > section:nth-child(3) .dsc-outcome-card:nth-child(6) { background: #EAF2F3; }
.aist-home main > section:nth-child(3) .dsc-outcome-card a { text-decoration: underline; text-underline-offset: 3px; }
.aist-service-detail .dsc-process-steps__list li::before { content: none; }
.aist-service-detail .dsc-process-steps__list li { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) {
  .aist-editorial-preview .site-header .aist-brand-logo { width: 190px; }
  .aist-home main > section:nth-child(3) .dsc-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .aist-nav-disclosure { display: flex; width: 100%; justify-content: space-between; min-height: 46px; padding: 11px var(--space-2); font-size: var(--font-size-base); }
  .aist-editorial-preview .site-header__panel { max-height: calc(100dvh - 100px); overflow-y: auto; }
  .aist-editorial-preview .dsc-hero__subheading { font-size: var(--font-size-lg); line-height: 1.55; }
}

.dsc-article [data-rich-text],
.dsc-article .dsc-answer-summary {
  overflow-wrap: anywhere;
}

/* Historical dates need a natural footer row beneath variable article titles. */
.dsc-insight-card { height: auto; min-height: 420px; }
.dsc-insight-card__link { grid-template-rows: 84px auto minmax(0, 1fr) auto; }
.dsc-insight-card__footer { overflow: visible; }
@media (min-width: 901px) {
  .dsc-insight-grid:not(.dsc-insight-grid--single) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 601px) and (max-width: 900px) {
  .dsc-insight-grid:not(.dsc-insight-grid--single) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .dsc-insight-grid:not(.dsc-insight-grid--single) { grid-template-columns: minmax(0, 1fr); }
}

/* Four-part Managed AI groups form two balanced rows at desktop widths. */
@media (min-width: 901px) {
  .aist-managed-ai .dsc-capability-list:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .aist-managed-ai .dsc-hero__subheading {
    font-size: var(--font-size-lg);
    line-height: 1.55;
  }

  .site-header__inner {
    min-height: 84px;
    gap: var(--space-3);
  }

  .aist-brand-logo {
    width: min(170px, calc(100vw - 144px));
  }

  .site-main,
  .site-main section[id] {
    scroll-margin-top: 6rem;
  }
}
