/* =========================================
   SMARTEST: PROCESS PAGE
========================================= */

:root{
  --st-section-bg: #F6F5F1;
  --st-card-bg: #FFFFFF;

  --st-gold: #D5B24E;
  --st-gold-text: #9A7A2D;
  --st-line: #D9BE72;

  --st-navy: #0E2A63;
  --st-navy-dark: #06184A;

  --st-green-bg: #C9F0D4;
  --st-green-text: #2F7A3E;

  --st-red-bg: #F9DDD3;
  --st-red-text: #C52D25;

  --st-container: 1180px;

  --st-font-body:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  --st-font-display:
    "Space Grotesk",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}


/* =========================================
   PAGE BASE
========================================= */

body.page-template-page-process{
  background: var(--st-section-bg);
}

body.page-template-page-process #content,
body.page-template-page-process .site-content,
body.page-template-page-process .content-area,
body.page-template-page-process .site-main{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--st-section-bg);
}

/* Target only the content container, not every .ast-container,
   otherwise the header/menu becomes full width. */
body.page-template-page-process #content > .ast-container{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  background: var(--st-section-bg);
}

.smartest-process-page{
  font-family: var(--st-font-body);
  color: #222222;
}

.smartest-process-page *,
.smartest-process-page *::before,
.smartest-process-page *::after{
  box-sizing: border-box;
}

.process-page-container{
  width: min(100% - 40px, var(--st-container));
  margin-inline: auto;
}


/* =========================================
   HERO
========================================= */

.process-hero{
  background: var(--st-section-bg);
  padding: 34px 0 44px;
}

.process-hero-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 58px;
  align-items: start;
}

.process-eyebrow{
  margin: 0 0 16px;
  color: var(--st-gold-text) !important;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.process-page-title{
  margin: 0 0 20px;
  color: var(--st-navy) !important;
  font-family: var(--st-font-display);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.process-intro{
  max-width: 650px;
  margin: 0;
  color: #222222 !important;
  font-size: 14px;
  line-height: 1.4;
}


/* =========================================
   HERO ACTIONS
========================================= */

.process-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 38px;
}

.process-button{
  min-width: 175px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.process-button:hover{
  transform: translateY(-2px);
}

.process-button:focus-visible{
  outline: 3px solid var(--st-gold);
  outline-offset: 3px;
}

.process-button-outline{
  background: #FFFFFF !important;
  color: var(--st-navy) !important;
  border: 2px solid var(--st-gold) !important;
}

.process-button-outline:hover{
  background: #FBF8EF !important;
  color: var(--st-navy) !important;
}

.process-button-primary{
  background: var(--st-navy-dark) !important;
  color: #FFFFFF !important;
  border: 2px solid var(--st-navy-dark) !important;
}

.process-button-primary:hover{
  background: var(--st-navy) !important;
  border-color: var(--st-navy) !important;
  color: #FFFFFF !important;
}

@media (prefers-reduced-motion: reduce){
  .process-button{ transition: none; }
  .process-button:hover{ transform: none; }
}


/* =========================================
   COVERAGE CARD
========================================= */

.process-coverage-card{
  background: #FFFFFF;
  border: 2px solid var(--st-gold);
  border-radius: 42px;
  padding: 28px 30px;
}

.process-coverage-card h2{
  margin: 0 0 22px;
  color: var(--st-gold-text) !important;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
}

.process-coverage-card ul{
  margin: 0;
  padding-left: 20px;
}

.process-coverage-card li{
  margin-bottom: 16px;
  color: #222222 !important;
  font-size: 12px;
  line-height: 1.35;
}

.process-coverage-card li:last-child{
  margin-bottom: 0;
}


/* =========================================
   PROCESS FLOW
   Desktop: main column on the left, side
   branches on the right, whole diagram centred.
========================================= */

.process-flow-section{
  background: var(--st-section-bg);
  padding: 36px 0 70px;
}

.process-flow{
  --main-w: 460px;     /* main column width            */
  --branch-w: 420px;   /* side branch card width       */
  --flow-w: 1000px;    /* total diagram width          */

  width: min(100% - 40px, var(--flow-w));
  margin-inline: auto;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}


/* =========================================
   FLOW CARDS
========================================= */

.flow-card{
  position: relative;
  z-index: 2;

  width: min(var(--main-w), 100%);

  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;

  background: var(--st-card-bg);
  border: 2px solid var(--st-gold);
  border-radius: 16px;
  padding: 14px 18px 16px;
}

.flow-number{
  width: 46px;
  height: 46px;
  border-radius: 7px;
  background: var(--st-navy-dark);
  color: #F4CE59 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.flow-number.small{
  font-size: 16px;
}

.flow-kicker{
  margin: 0 0 3px;
  color: var(--st-gold-text) !important;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.flow-card h2{
  margin: 0 0 6px;
  color: var(--st-navy) !important;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}

.flow-card p:last-child{
  margin: 0;
  color: #555555 !important;
  font-size: 13px;
  line-height: 1.4;
}


/* =========================================
   VERTICAL ARROWS BETWEEN CARDS
========================================= */

.flow-arrow{
  width: min(var(--main-w), 100%);
  margin: 8px 0;
  text-align: center;
  color: var(--st-navy) !important;
  font-size: 22px;
  line-height: 1;
}

.decision-block + .flow-arrow{
  margin-top: 4px;
}


/* =========================================
   DECISION BLOCK (DESKTOP)
   Every element is placed on a shared
   coordinate system so nothing can overlap.
========================================= */

.decision-block{
  --axis: calc(var(--main-w) / 2);                 /* x of main spine      */
  --cy: 132px;                                     /* y of diamond centre  */
  --d: 116px;                                      /* diamond side         */
  --half: calc(var(--d) * 0.7071);                 /* half diagonal        */
  --loop-y: 22px;                                  /* y of return loop     */
  --branch-x: calc(var(--flow-w) - var(--branch-w));
  --no-x: calc(var(--axis) + var(--half) + 16px);
  --no-w: calc(var(--branch-x) - var(--no-x) - 44px);

  position: relative;
  display: block;
  width: 100%;
  height: 300px;
  margin: 0;
}

/* Return loop: branch card back up to the main spine */
.decision-block::before{
  content: "";
  position: absolute;
  z-index: 0;

  left: var(--axis);
  top: var(--loop-y);

  width: calc(var(--branch-x) + var(--branch-w) / 2 - var(--axis));
  height: calc(var(--cy) - var(--loop-y));

  border-top: 2px solid var(--st-line);
  border-right: 2px solid var(--st-line);
  border-top-right-radius: 12px;
}

/* Horizontal connector: diamond to branch card */
.decision-block::after{
  content: "";
  position: absolute;
  z-index: 0;

  left: calc(var(--axis) + var(--half));
  top: calc(var(--cy) - 1px);

  width: calc(var(--branch-x) - var(--axis) - var(--half) - 2px);
  height: 2px;

  background: var(--st-line);
}

.decision-main{
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 0;
}

/* Main spine running through the decision */
.decision-main::before{
  content: "";
  position: absolute;
  z-index: 0;

  left: calc(var(--axis) - 1px);
  top: 0;
  bottom: 0;

  width: 2px;
  background: var(--st-line);
}

/* Arrowhead where the loop re-enters the spine */
.decision-main::after{
  content: "";
  position: absolute;
  z-index: 1;

  left: calc(var(--axis) + 1px);
  top: calc(var(--loop-y) + 1px);
  transform: translateY(-50%);

  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 9px 6px 0;
  border-color: transparent var(--st-gold-text) transparent transparent;
}


/* =========================================
   DECISION DIAMOND
========================================= */

.decision-diamond{
  position: absolute;
  z-index: 2;

  left: var(--axis);
  top: var(--cy);

  width: var(--d);
  height: var(--d);

  transform: translate(-50%, -50%) rotate(45deg);

  background: #FFFDF7;
  border: 2px solid var(--st-gold);

  display: flex;
  align-items: center;
  justify-content: center;
}

.decision-diamond span{
  display: block;
  max-width: calc(var(--d) * 1.05);

  transform: rotate(-45deg);

  color: var(--st-navy) !important;
  text-align: center;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}


/* =========================================
   YES / NO LABELS
========================================= */

.decision-yes,
.decision-no{
  position: absolute;
  z-index: 2;

  min-width: 0;
  padding: 8px 14px;

  border: 2px solid var(--st-navy);
  border-radius: 6px;

  text-align: center;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
}

.decision-yes{
  left: var(--axis);
  top: calc(var(--cy) + var(--half) + 22px);
  bottom: auto;

  transform: translateX(-50%);

  width: max-content;
  max-width: calc(var(--main-w) - 40px);

  background: var(--st-green-bg);
  color: var(--st-green-text) !important;
}

.decision-no{
  left: var(--no-x);
  top: var(--cy);

  transform: translateY(-50%);

  width: var(--no-w);

  background: var(--st-red-bg);
  color: var(--st-red-text) !important;
}

/* Arrowhead pointing into the branch card */
.decision-no::after{
  content: "";
  position: absolute;

  left: calc(100% + 33px);
  top: 50%;
  transform: translateY(-50%);

  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--st-gold-text);
}


/* =========================================
   SIDE BRANCH CARDS
========================================= */

.decision-block .flow-card-branch{
  position: absolute;
  z-index: 2;

  left: var(--branch-x);
  top: var(--cy);

  transform: translateY(-50%);

  width: var(--branch-w);
  max-width: none;
  margin: 0;
}


/* =========================================
   TABLET AND BELOW
   Single centred column with a continuous
   spine; branch sits between NO and YES.
========================================= */

@media (max-width: 1080px){

  .process-hero-grid{
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .process-coverage-card{
    border-radius: 30px;
  }

  .process-flow{
    --main-w: 520px;
    align-items: center;
  }

  .decision-block{
    --d: 108px;

    width: min(var(--main-w), 100%);
    height: auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;

    padding: 16px 0 12px;
  }

  /* Continuous spine behind the stacked items */
  .decision-block::before{
    left: calc(50% - 1px);
    top: 0;
    bottom: 0;

    width: 2px;
    height: auto;

    border: 0;
    border-radius: 0;
    background: var(--st-line);
  }

  .decision-block::after{
    content: none;
  }

  /* Let the diamond and labels join the flex column */
  .decision-main{
    display: contents;
  }

  .decision-main::before,
  .decision-main::after,
  .decision-no::after{
    content: none;
  }

  .decision-diamond{
    position: relative;
    left: auto;
    top: auto;
    order: 1;

    margin: 22px 0;
    transform: rotate(45deg);
  }

  .decision-no,
  .decision-yes{
    position: relative;
    left: auto;
    top: auto;
    transform: none;

    width: min(100%, 320px);
    max-width: none;
  }

  .decision-no{
    order: 2;
  }

  .decision-block .flow-card-branch{
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    order: 3;

    width: 100%;
    border-style: dashed;
  }

  .decision-yes{
    order: 4;
  }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px){

  .process-page-container{
    width: min(100% - 28px, var(--st-container));
  }

  .process-hero{
    padding-top: 24px;
  }

  .process-page-title br{
    display: none;
  }

  .process-actions{
    flex-direction: column;
    gap: 12px;
  }

  .process-button{
    width: 100%;
  }

  .process-coverage-card{
    border-radius: 26px;
    padding: 24px 20px;
  }

  .process-flow-section{
    padding-top: 28px;
    padding-bottom: 50px;
  }

  .flow-card{
    grid-template-columns: 40px 1fr;
    gap: 11px;
    padding: 12px;
  }

  .flow-number{
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .flow-number.small{
    font-size: 14px;
  }

  .flow-card h2{
    font-size: 16px;
  }

  .flow-card p:last-child{
    font-size: 12px;
  }

  .decision-block{
    --d: 96px;
  }

  .decision-diamond{
    margin: 20px 0;
  }

  .decision-diamond span{
    font-size: 12px;
  }

  .decision-yes,
  .decision-no{
    padding: 8px 12px;
    font-size: 13px;
  }
}


/* =========================================
   INVERTED DECISION
   YES goes to the side branch, NO continues down.
   Add .decision-inverted to the .decision-block.
========================================= */

/* YES box: right side */
.decision-block.decision-inverted .decision-yes{
  left: var(--no-x);
  top: var(--cy);
  transform: translateY(-50%);
  width: var(--no-w);
  max-width: none;
}

/* NO box: bottom */
.decision-block.decision-inverted .decision-no{
  left: var(--axis);
  top: calc(var(--cy) + var(--half) + 22px);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(var(--main-w) - 40px);
}

/* Move the arrowhead from NO to YES */
.decision-block.decision-inverted .decision-no::after{
  content: none;
}

.decision-block.decision-inverted .decision-yes::after{
  content: "";
  position: absolute;
  left: calc(100% + 33px);
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--st-gold-text);
}

/* Tablet and mobile: YES before the branch card, NO last */
@media (max-width: 1080px){

  .decision-block.decision-inverted .decision-yes,
  .decision-block.decision-inverted .decision-no{
    left: auto;
    top: auto;
    transform: none;
    width: min(100%, 320px);
    max-width: none;
  }

  .decision-block.decision-inverted .decision-yes{
    order: 2;
  }

  .decision-block.decision-inverted .decision-no{
    order: 4;
  }

  .decision-block.decision-inverted .decision-yes::after{
    content: none;
  }
}