/* Static HTML faithful refinements */
.will-hero{position:relative;overflow:hidden;background:linear-gradient(120deg,#041a35,#163b69)}
.will-hero::after{position:absolute;top:25px;right:5%;width:250px;height:250px;background:url('../images/logo.png') center/contain no-repeat;filter:brightness(0) invert(1);opacity:.14;content:''}
.will-hero__grid,.will-hero>.will-shell{position:relative;z-index:1}
.will-stat-card{box-shadow:none;background:rgb(3 21 44 / .42)}
.will-stat-card .will-button{margin-top:12px}
.will-tabs{align-items:start}
.will-panel h3{margin-top:0;font-size:1.75rem}
.will-panel h4{margin:0 0 12px;color:var(--will-navy);font-family:'Shippori Mincho',serif;font-size:1.2rem}
.will-grid--2>.will-card:last-child:nth-child(5){grid-column:1/-1}
@media(max-width:900px){
  .will-tabs{display:grid;grid-template-columns:1fr;gap:14px}
  .will-tablist{display:flex;overflow-x:auto;border:1px solid var(--will-line);border-bottom:0}
  .will-tab{display:grid;min-width:260px;grid-template-columns:42px minmax(0,1fr);border-right:1px solid var(--will-line);border-bottom:0}
  .will-panel{padding:20px}
}

/* Shared header: static and legal pages use the same compact mobile layout. */
@media(max-width:820px){
  .will-header .will-header__info{
    display:block!important;
    min-width:0;
    margin:0;
    text-align:center;
  }
  .will-header .will-header__contact{
    display:flex!important;
    align-items:baseline;
    justify-content:center;
    gap:6px;
    margin:0 0 4px;
    white-space:nowrap;
  }
  .will-header .will-header__contact small{display:inline;white-space:nowrap}
  .will-header .will-header__advisor{
    margin:0;
    padding:0;
    border:0;
    text-align:center;
    white-space:nowrap;
  }
  .will-header .will-header__advisor-break{display:none}
}

/* Shared block-template header: match the static page header proportions. */
.will-header .will-header__inner{gap:21px}
.will-header .will-navigation{order:2}
.will-header .will-header__advisor{order:3;margin:0;padding:2px 0 2px 10px;border-left:1px solid var(--will-gold);color:#536477;font-size:15px;font-weight:600;line-height:1.55;letter-spacing:.02em;white-space:nowrap}
.will-header .will-header__advisor-break{display:inline}
.will-header .will-header__map{margin:0 2px;padding:4px 10px;border:1px solid var(--will-gold);border-radius:999px;background:var(--will-gold);color:#fff;font:700 10px/1.2 'Noto Sans JP',sans-serif;letter-spacing:.06em;vertical-align:1px;cursor:pointer}
.will-header .will-header__map:focus-visible{outline:2px solid var(--will-gold);outline-offset:3px}
.will-header .will-header__contact{order:4}
.will-header .will-header__contact a{font-size:24px;white-space:nowrap}
.will-header .will-header__contact small{font-size:13px}
.will-header .will-header__cta{order:5}
.will-header .will-menu-toggle{order:6}
.will-header .will-brand img{display:block;width:96px;height:76px;object-fit:contain}
.will-header .will-header__cta{
  box-sizing:border-box;
  width:214px;
  min-height:54px;
  padding:10px 23px;
  font-size:18px;
  line-height:1.4;
  white-space:nowrap;
}
@media(max-width:900px){
  .will-header .will-header__inner{width:calc(100% - 20px);gap:5px}
  .will-header .will-brand{flex:0 0 60px}
  .will-header .will-brand img{width:60px;height:60px}
  .will-header .will-navigation{order:6}
  .will-header .will-header__advisor{order:2;flex:0 1 130px;margin-left:8px;padding:2px 0;border-left:0;font-size:10px;line-height:1.45;letter-spacing:-.03em;white-space:normal}
  .will-header .will-header__map{margin:0;padding:3px 7px;font-size:9px}
  .will-header .will-header__advisor-break{display:none}
  .will-header .will-header__contact{order:3;flex:0 0 auto;min-width:100px;margin-left:0;text-align:right}
  .will-header .will-header__contact a{font-size:14px;letter-spacing:0}
  .will-header .will-header__contact small{font-size:10px;white-space:nowrap}
  .will-header .will-menu-toggle{order:4;flex:0 0 48px;margin-left:auto}
}

.will-map-dialog{width:min(920px,calc(100% - 32px));max-width:920px;padding:0;border:0;box-shadow:0 16px 48px rgb(3 21 44 / .34)}
.will-map-dialog::backdrop{background:rgb(3 21 44 / .62)}
.will-map-dialog__inner{background:#fff}
.will-map-dialog__header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 20px;background:var(--will-navy);color:#fff}
.will-map-dialog__header h2{margin:0;font:600 1.2rem/1.4 'Shippori Mincho',serif}
.will-map-dialog__close{width:38px;height:38px;border:1px solid rgb(255 255 255 / .72);background:transparent;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.will-map-dialog__address{display:flex;gap:14px;align-items:center;margin:0;padding:13px 20px;border-bottom:1px solid var(--will-line);background:var(--will-paper);color:#536477;font-size:.9rem;line-height:1.55}
.will-map-dialog__address strong{flex:0 0 auto;color:var(--will-navy);font-family:'Shippori Mincho',serif;font-size:1.05rem}
.will-map-dialog__address span{display:block}
.will-map-dialog iframe{display:block;width:100%;height:min(65vh,600px);border:0}
@media(max-width:900px){.will-map-dialog__header{padding:12px 14px}.will-map-dialog__address{display:block;padding:11px 14px;font-size:.78rem}.will-map-dialog__address strong{display:block;margin-bottom:2px;font-size:.95rem}.will-map-dialog iframe{height:62vh}}

/* SP header: keep the logo and menu at the edges while grouping contact details in two rows. */
@media(max-width:900px){
  .will-header .will-header__inner{
    display:grid;
    grid-template-columns:60px minmax(0,1fr) 48px;
    grid-template-rows:auto auto;
    column-gap:10px;
    row-gap:1px;
    min-height:92px;
    padding-block:7px;
  }
  .will-header .will-brand{grid-column:1;grid-row:1 / span 2;align-self:center}
  .will-header .will-header__contact{
    grid-column:2;
    grid-row:1;
    justify-self:center;
    min-width:0;
    margin:14px 0 0;
    text-align:center;
    white-space:nowrap;
  }
  .will-header .will-header__contact a{font-size:17px;line-height:1.1}
  .will-header .will-header__contact small{font-size:11px;line-height:1.25}
  .will-header .will-header__advisor{
    grid-column:2;
    grid-row:2;
    justify-self:center;
    min-width:0;
    margin:0;
    padding:0;
    border:0;
    color:#536477;
    font-size:12px;
    font-weight:700;
    line-height:1.3;
    letter-spacing:-.02em;
    text-align:center;
  }
  .will-header .will-header__advisor-break{display:inline}
  .will-header .will-header__map{padding:3px 8px;font-size:10px;vertical-align:1px}
  .will-header .will-menu-toggle{grid-column:3;grid-row:1 / span 2;justify-self:end;align-self:center;margin:0}
  .will-header .will-navigation{top:92px;height:calc(100dvh - 92px)}
}

/* Keep each SP contact message on one line by letting the consultation row use the full header width. */
@media(max-width:900px){
  .will-header .will-header__inner{
    grid-template-rows:60px auto;
    row-gap:3px;
    min-height:101px;
    padding-block:5px;
  }
  .will-header .will-brand{grid-row:1}
  .will-header .will-header__contact{grid-row:1}
  .will-header .will-menu-toggle{grid-row:1}
  .will-header .will-header__advisor{
    grid-column:1 / -1;
    grid-row:2;
    font-size:14px;
    line-height:1.35;
    letter-spacing:-.04em;
    white-space:nowrap;
  }
  .will-header .will-header__advisor-break{display:none}
  .will-header .will-header__contact a{font-size:18px}
  .will-header .will-header__contact small{font-size:12px}
  .will-header .will-header__map{padding:3px 9px;font-size:11px}
  .will-header .will-navigation{top:101px;height:calc(100dvh - 101px)}
}

@media(max-width:900px){
  .will-header .will-header__contact{display:flex;align-items:baseline;justify-content:center;gap:7px}
  .will-header .will-header__contact small{display:inline;white-space:nowrap}
}

/* On smaller screens, keep the location note and contact details side by side. */
@media(max-width:900px){
  .will-header .will-header__inner{
    grid-template-columns:60px minmax(0,1fr) 48px;
    grid-template-rows:60px auto;
    column-gap:10px;
    row-gap:2px;
    min-height:98px;
    padding-block:5px;
  }
  .will-header .will-brand{grid-column:1;grid-row:1}
  .will-header .will-header__advisor{
    grid-column:1 / -1;
    grid-row:2;
    align-self:start;
    font-size:12px;
    line-height:1.35;
    letter-spacing:-.04em;
    text-align:center;
    white-space:nowrap;
  }
  .will-header .will-header__advisor-break{display:none}
  .will-header .will-header__contact{
    display:flex;
    grid-column:2;
    grid-row:1;
    align-items:baseline;
    align-self:center;
    gap:7px;
    justify-self:center;
    text-align:center;
    white-space:nowrap;
  }
  .will-header .will-header__contact a{font-size:18px;line-height:1.1}
  .will-header .will-header__contact small{display:inline;font-size:12px;line-height:1.25;white-space:nowrap}
  .will-header .will-menu-toggle{grid-column:3;grid-row:1}
  .will-header .will-navigation{top:98px;height:calc(100dvh - 98px)}
}

/* Keep the phone and consultation note within the logo-height header on SP. */
@media(max-width:900px){
  .will-header .will-header__inner{
    grid-template-rows:60px;
    min-height:70px;
    padding-block:5px;
  }
  .will-header .will-header__contact{
    grid-column:2;
    grid-row:1;
    align-self:start;
    margin-top:6px;
  }
  .will-header .will-header__advisor{
    grid-column:2;
    grid-row:1;
    align-self:end;
    margin-bottom:4px;
    font-size:10px;
    line-height:1.1;
    letter-spacing:-.06em;
    white-space:nowrap;
  }
  .will-header .will-header__advisor-break{display:none}
  .will-header .will-header__map{padding:2px 6px;font-size:9px}
  .will-header .will-navigation{top:70px;height:calc(100dvh - 70px)}
}

/* SP: prioritize the contact details over a compact header height. */
@media(max-width:900px){
  .will-header .will-header__inner{
    grid-template-columns:60px minmax(0,1fr) 48px;
    grid-template-rows:auto;
    min-height:88px;
    padding-block:8px;
    column-gap:10px;
  }
  .will-header .will-brand{grid-column:1;grid-row:1;place-self:center start;margin-top:0}
  .will-header .will-header__contact{
    display:grid;
    grid-column:2;
    grid-row:1;
    align-self:start;
    justify-self:center;
    gap:2px;
    margin:0;
    text-align:center;
  }
  .will-header .will-header__contact a{font-size:20px;line-height:1.1}
  .will-header .will-header__contact small{display:block;font-size:12px;line-height:1.25}
  .will-header .will-header__advisor{
    grid-column:2;
    grid-row:1;
    align-self:start;
    justify-self:center;
    margin:55px 0 0;
    padding:0;
    border:0;
    font-size:12px;
    line-height:1.25;
    letter-spacing:-.04em;
    text-align:center;
    white-space:nowrap;
  }
  .will-header .will-header__advisor-break{display:none}
  .will-header .will-header__map{padding:3px 8px;font-size:10px}
  .will-header .will-menu-toggle{grid-column:3;grid-row:1;place-self:center end;margin-top:0}
  .will-header .will-navigation{top:88px;height:calc(100dvh - 88px)}
}

/* Group contact details so the SP header centers them as one unit. */
.will-header .will-header__info{order:3;display:flex;align-items:center;gap:12px}
.will-header .will-header__info .will-header__advisor{order:1}
.will-header .will-header__info .will-header__contact{order:2}
@media(max-width:900px){
  .will-header .will-header__inner{
    display:grid;
    grid-template-columns:60px minmax(0,1fr) 48px;
    grid-template-rows:112px;
    height:112px;
    min-height:112px;
    padding-block:0;
    align-items:center;
  }
  .will-header .will-brand{grid-column:1;grid-row:1;place-self:center start}
  .will-header .will-header__info{
    display:flex;
    grid-column:2;
    grid-row:1;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    place-self:center;
  }
  .will-header .will-header__info .will-header__contact{
    display:grid;
    order:1;
    align-self:center;
    justify-self:auto;
    margin:0;
    text-align:center;
  }
  .will-header .will-header__info .will-header__advisor{
    order:2;
    align-self:center;
    justify-self:auto;
    margin:0;
    padding:0;
    border:0;
    text-align:center;
    white-space:nowrap;
  }
  .will-header .will-menu-toggle{grid-column:3;grid-row:1;place-self:center end;margin:0}
  .will-header .will-navigation{top:112px;height:calc(100dvh - 112px)}
}

/* Keep the contact and office note in normal flow on the shared SP header. */
@media(max-width:820px){
  .will-header .will-header__info{display:block!important}
  .will-header .will-header__info .will-header__contact{
    display:flex!important;
    align-items:baseline;
    justify-content:center;
    gap:6px;
    margin:0 0 4px;
    white-space:nowrap;
  }
  .will-header .will-header__info .will-header__contact small{display:inline;white-space:nowrap}
  .will-header .will-header__info .will-header__advisor{
    display:block;
    margin:0;
    padding:0;
    border:0;
    text-align:center;
    white-space:nowrap;
  }
  .will-header .will-header__advisor-break{display:none}
}

@media(max-width:820px){
  .will-header .will-header__info{
    
  }
  .will-header .will-header__info .will-header__contact,
  .will-header .will-header__info .will-header__advisor{
    width:100%;
  }
  .will-header .will-header__info .will-header__advisor{
    font-size:11px;
    line-height:1.3;
    letter-spacing:-.05em;
  }
}
