/* Service and journal navigation. Kept separate from the mobile dialog. */
#header > .tk-mega-menu,
#header > .tk-mega-menu *,
#header > .tk-mega-menu *::before,
#header > .tk-mega-menu *::after {
  box-sizing: border-box;
}

#header > .tk-mega-menu {
  --tk-mm-ink: #17384d;
  --tk-mm-muted: #566b78;
  --tk-mm-gold: #98753b;
  --tk-mm-line: #e3e7e9;
  display: none;
  position: absolute;
  z-index: 220;
  top: 100%;
  left: 50%;
  right: auto;
  width: calc(100% - 48px);
  max-width: 1200px;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b9c5cc #f6f8f9;
  transform: translateX(-50%);
  border: 1px solid #d8c7a5;
  border-top: 2px solid #b59658;
  border-radius: 0 0 18px 18px;
  background: #fff;
  color: var(--tk-mm-ink);
  box-shadow: 0 24px 52px -18px rgb(9 31 48 / 28%), 0 5px 14px rgb(9 31 48 / 5%);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  isolation: isolate;
}

#header > .tk-mega-menu[hidden] {
  display: none !important;
}

#header > .tk-mega-menu :is(h2, h3, p) {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  text-indent: 0;
}

#header > .tk-mega-menu a {
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

#header > .tk-mega-menu svg {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#header > .tk-mega-menu .tk-mm-layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  align-items: stretch;
  gap: 28px;
  padding: 28px;
}

#header > .tk-mega-menu .tk-mm-intro {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(145deg, #112b40, #1d425b);
  color: #fff;
}

#header > .tk-mega-menu .tk-mm-eyebrow {
  margin: 0 0 14px;
  color: #e0c68d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .2em;
  overflow-wrap: anywhere;
}

#header > .tk-mega-menu .tk-mm-heading {
  margin: 0;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .025em;
  word-break: normal;
  overflow-wrap: anywhere;
}

#header > .tk-mega-menu .tk-mm-description {
  margin: 16px 0 24px;
  color: rgb(255 255 255 / 78%);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: .015em;
  overflow-wrap: anywhere;
}

#header > .tk-mega-menu .tk-mm-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-top: auto;
  padding: 11px 12px;
  border: 1px solid rgb(225 198 139 / 65%);
  border-radius: 7px;
  background: rgb(255 255 255 / 3%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  transition: background-color .18s ease, border-color .18s ease;
}

#header > .tk-mega-menu .tk-mm-all svg {
  width: 18px;
  height: 18px;
  color: #e0c68d;
}

#header > .tk-mega-menu .tk-mm-all:hover {
  border-color: #e0c68d;
  background: rgb(255 255 255 / 10%);
  color: #fff;
}

#header > .tk-mega-menu .tk-mm-main {
  min-width: 0;
}

#header > .tk-mega-menu .tk-mm-section-label {
  display: block;
  margin: 0 32px 14px 0;
  color: #85652f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .11em;
}

#header > .tk-mega-menu .tk-mm-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

#header > .tk-mega-menu .tk-mm-service {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: 44px auto 1fr auto;
  grid-template-areas: "icon kicker" "title title" "copy copy" "link link";
  column-gap: 12px;
  min-width: 0;
  padding: 20px;
  border: 1px solid #dce4e9;
  border-radius: 10px;
  background: linear-gradient(160deg, #fff, #f7f9fb);
  color: var(--tk-mm-ink);
  box-shadow: 0 3px 9px rgb(16 48 69 / 3%);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

#header > .tk-mega-menu .tk-mm-icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f1ecdf;
  color: #264b60;
}

#header > .tk-mega-menu .tk-mm-icon svg {
  width: 44px;
  height: 44px;
}

#header > .tk-mega-menu .tk-mm-kicker {
  grid-area: kicker;
  align-self: center;
  color: #816537;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .13em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

#header > .tk-mega-menu .tk-mm-title {
  grid-area: title;
  margin: 16px 0 0;
  color: var(--tk-mm-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .015em;
  overflow-wrap: anywhere;
}

#header > .tk-mega-menu .tk-mm-copy {
  grid-area: copy;
  margin: 9px 0 0;
  color: var(--tk-mm-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#header > .tk-mega-menu .tk-mm-card-link {
  grid-area: link;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid #e2e7ea;
  color: #765b2d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

#header > .tk-mega-menu .tk-mm-card-link svg {
  width: 18px;
  height: 18px;
}

#header > .tk-mega-menu .tk-mm-service:hover {
  border-color: #bba26f;
  color: var(--tk-mm-ink);
  box-shadow: 0 6px 16px rgb(16 48 69 / 8%);
}

#header > .tk-mega-menu .tk-mm-quicklinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--tk-mm-line);
}

#header > .tk-mega-menu .tk-mm-quicklinks a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 3px 0;
  color: #355367;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  text-underline-offset: 4px;
}

#header > .tk-mega-menu .tk-mm-quicklinks a:hover {
  color: #765b2d;
  text-decoration: underline;
}

#header > .tk-mega-menu .tk-mm-quicklinks svg {
  width: 15px;
  height: 15px;
  color: #98753b;
}

#header > .tk-mega-menu .tk-mm-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 32px 16px 0;
}

#header > .tk-mega-menu .tk-mm-topics a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid #d5e0e6;
  border-radius: 20px;
  background: #f5f8fa;
  color: #244b61;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  transition: border-color .18s ease, background-color .18s ease;
}

#header > .tk-mega-menu .tk-mm-topics a:hover {
  border-color: #baa16c;
  background: #f6f2e9;
  color: #17384d;
}

#header > .tk-mega-menu .tk-mm-topics svg {
  width: 15px;
  height: 15px;
}

#header > .tk-mega-menu .tk-mm-articles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

#header > .tk-mega-menu .tk-mm-article {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #e0e6ea;
  border-radius: 9px;
  background: #fbfcfd;
  transition: border-color .18s ease, background-color .18s ease;
}

#header > .tk-mega-menu .tk-mm-article:hover,
#header > .tk-mega-menu .tk-mm-article:focus-within {
  border-color: #c8b387;
  background: #fff;
}

#header > .tk-mega-menu .tk-mm-category {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 7px;
  padding: 0;
  color: #816537;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .035em;
  text-underline-offset: 3px;
}

#header > .tk-mega-menu .tk-mm-category:hover {
  color: #5b431e;
  text-decoration: underline;
}

#header > .tk-mega-menu .tk-mm-post {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: var(--tk-mm-ink);
}

#header > .tk-mega-menu .tk-mm-post-title {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  overflow: visible;
  text-overflow: clip;
  -webkit-line-clamp: unset;
}

#header > .tk-mega-menu .tk-mm-post svg {
  width: 18px;
  height: 18px;
  color: #98753b;
}

#header > .tk-mega-menu .tk-mm-post:hover {
  color: #765b2d;
}

#header > .tk-mega-menu .tk-mm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid #d9e1e6;
  border-radius: 50%;
  background: #fff;
  color: #355367;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  transition: border-color .18s ease, background-color .18s ease;
}

#header > .tk-mega-menu .tk-mm-close svg {
  width: 14px;
  height: 14px;
}

#header > .tk-mega-menu .tk-mm-close:hover {
  border-color: #baa16c;
  background: #f6f2e9;
}

#header > .tk-mega-menu :is(a, button):focus-visible {
  outline: 3px solid #977234;
  outline-offset: 3px;
}

#header > .tk-mega-menu .tk-mm-intro a:focus-visible {
  outline-color: #efd496;
}

#header #global_menu .tk-mm-toggle {
  display: none;
}

@media (min-width: 1202px) {
  #header > .tk-mega-menu:not([hidden]) {
    display: block;
    animation: tk-mm-enter-20261115 .18s ease-out both;
  }

  #header #global_menu li.tk-mm-parent {
    position: relative;
    width: auto;
  }

  #header #global_menu li.tk-mm-parent > a {
    padding-right: 38px;
  }

  #header #global_menu #menu-item-353 > .sub-menu {
    display: none !important;
  }

  #header #global_menu .tk-mm-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 36px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #17384d;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    transition: border-color .18s ease, background-color .18s ease;
  }

  #header #global_menu .tk-mm-toggle svg {
    display: block;
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
  }

  #header #global_menu .tk-mm-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  #header #global_menu .tk-mm-toggle:hover,
  #header #global_menu .tk-mm-toggle[aria-expanded="true"] {
    border-color: #d9c69c;
    background: #f6f1e6;
    color: #17384d;
  }

  #header #global_menu .tk-mm-toggle:focus-visible {
    outline: 3px solid #977234;
    outline-offset: 2px;
  }
}

@media (max-width: 1201px) {
  #header > .tk-mega-menu,
  #header #global_menu .tk-mm-toggle {
    display: none !important;
  }
}

/* Keep the signed-in toolbar from wrapping over the navigation at laptop widths. */
@media (min-width: 1100px) and (max-width: 1400px) {
  body.admin-bar #wpadminbar #wp-admin-bar-site-name > .ab-item {
    display: block;
    max-width: 300px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

@keyframes tk-mm-enter-20261115 {
  from { opacity: 0; transform: translate(-50%, -5px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #header > .tk-mega-menu,
  #header > .tk-mega-menu *,
  #header #global_menu .tk-mm-toggle,
  #header #global_menu .tk-mm-toggle svg {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Company and guidance panels extend the existing .tk-mega-menu design. */
#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: start;
  gap: 14px;
  min-width: 0;
  min-height: 112px;
  margin: 0;
  padding: 18px;
  border: 1px solid #dce4e9;
  border-radius: 10px;
  background: linear-gradient(150deg, #fff, #f7f9fb);
  color: #17384d;
  box-shadow: 0 3px 9px rgb(16 48 69 / 3%);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dce7ed;
  border-radius: 10px;
  background: #edf3f6;
  color: #284d62;
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide-icon svg {
  display: block;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide-content {
  display: block;
  min-width: 0;
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide-title {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #17384d;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .015em;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide-copy {
  margin: 7px 0 0;
  padding: 0;
  color: #566b78;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide > svg {
  align-self: center;
  width: 18px;
  height: 18px;
  color: #98753b;
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide:hover {
  border-color: #bba26f;
  color: #17384d;
  box-shadow: 0 6px 16px rgb(16 48 69 / 8%);
}

#header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide:focus-visible {
  outline: 3px solid #977234;
  outline-offset: 3px;
}

/* Two guidance destinations get slightly more breathing room. */
#header > #tk-mega-caa .tk-mm-main {
  display: flex;
  flex-direction: column;
}

#header > #tk-mega-caa .tk-mm-guides--caa {
  flex: 1;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

#header > #tk-mega-caa .tk-mm-guides--caa .tk-mm-guide {
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  gap: 16px;
  min-height: 126px;
  padding: 20px 24px;
  background: linear-gradient(150deg, #fff, #faf8f2);
}

#header > #tk-mega-caa .tk-mm-guide-icon {
  border-color: #e4d9bf;
  background: #f3eddf;
  color: #765b2d;
}

#header > #tk-mega-caa .tk-mm-guide-title {
  font-size: 18px;
  line-height: 1.65;
}

#header > #tk-mega-caa .tk-mm-guide-copy {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.85;
}

@media (min-width: 1202px) {
  /* These original lists still supply mobile links and remain in the DOM. */
  #header #global_menu :is(#menu-item-107, #menu-item-219).tk-mm-parent > .sub-menu {
    display: none !important;
  }
}

/* Keep four separate toggle targets clear at the narrow desktop boundary. */
@media (min-width: 1202px) and (max-width: 1350px) {
  body #header:has(> #tk-mega-company) {
    column-gap: 18px;
    padding-right: 20px;
  }

  #header:has(> #tk-mega-company) #global_menu > ul > li.tk-mm-parent > a {
    padding-left: 14px;
    padding-right: 38px;
  }
}

/* Keep the existing native dialog and its accordion controls. */
#tk-mobile-dialog .tk-sub a.tk-mobile-guide {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #e0e8ed;
  border-radius: 8px;
  background: #f5f8fa;
  color: #173c51;
  box-sizing: border-box;
  text-decoration: none;
}

#tk-mobile-dialog .tk-sub .tk-mobile-guide-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dbe6ec;
  border-radius: 8px;
  background: #eaf1f5;
  color: #2a5066;
  box-sizing: border-box;
}

#tk-mobile-dialog .tk-sub .tk-mobile-guide-icon svg {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#tk-mobile-dialog .tk-sub .tk-mobile-guide-content {
  display: block;
  min-width: 0;
}

#tk-mobile-dialog .tk-sub .tk-mobile-guide-title {
  display: block;
  color: #173c51;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

#tk-mobile-dialog .tk-sub .tk-mobile-guide-copy {
  display: block;
  margin: 5px 0 0;
  padding: 0;
  color: #586e7b;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

#tk-mobile-dialog .tk-sub a.tk-mobile-guide:hover {
  border-color: #c5b58e;
  background: #faf8f1;
  color: #173c51;
}

#tk-mobile-dialog .tk-sub a.tk-mobile-guide:focus-visible {
  outline: 3px solid #977234;
  outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
  #header > :is(#tk-mega-company, #tk-mega-caa) .tk-mm-guide,
  #tk-mobile-dialog .tk-sub a.tk-mobile-guide {
    transition: none !important;
    animation: none !important;
  }
}
