/* Keep the header label equally legible in Japanese and English. */
html body .shared-site-header #site-language-caption {
  color: #f1f7ff;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.3;
}

html body .shared-site-footer :is(.operator-support-footer > span,.shared-footer-credit) {
  color: #d5e6f7;
  font-size: 15px !important;
  line-height: 1.5;
}

html body .shared-site-footer .shared-footer-credit {
  flex-basis: 100%;
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid #3c5268;
}
html body :is(.shared-site-footer,.page-footer-context) :is(p,a,button,summary,small,.shared-footer-credit span) {
  font-size: 15px !important;
  line-height: 1.45;
}

html body.help-page #main :is(.field-help,.field-help time,.help-new-tab),
html body[data-workspace="company"] #main :is(.company-publication-facts,.source-credit,.company-display-note),
html body.world-page .world-map-section :is(.world-period-explanation,.world-reference-explanation) {
  font-size: 15px !important;
  line-height: 1.5;
}

.r10-loading-track {
  display: block;
  position: relative;
  width: min(100%, 16rem);
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #274662;
}
.r10-loading-track::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  border-radius: inherit;
  background: #8cc5ff;
  animation: record-loading 1.8s ease-in-out infinite alternate;
}
@keyframes record-loading {
  from { transform: translateX(0); }
  to { transform: translateX(185%); }
}
@media (prefers-reduced-motion: reduce) {
  .r10-loading-track::after { animation: none; }
}

html body[data-map-page="japan"] #map-placeholder:has(.map-loading-state) {
  animation: none;
  background: radial-gradient(ellipse at 50% 48%, #12304a 0%, #051526 67%) !important;
}
.map-loading-state {
  box-sizing: border-box;
  width: min(100%,20rem);
  padding: 14px 18px;
  border: 1px solid #426380;
  border-radius: 8px;
  background: #0b1a2a;
}
.map-loading-state .r10-loading-track { margin-inline: auto; }
.map-loading-state p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; }

html body[data-map-page="japan"] #search-hub-loading {
  padding: 10px 14px;
}
#search-hub-loading p { margin: 6px 0 0; }
#company-directory-results > .r10-loading-track { margin-block: 8px; }

@media (min-width: 1001px) {
  html body > .shared-site-header :is(#site-language-caption,#shared-navigation a) {
    font-size: clamp(16px, 1.38vw, 18px) !important;
  }
  html body footer.shared-site-footer:has(.shared-footer-credit) {
    margin-top: 6px !important;
    margin-bottom: 0 !important;
    padding: 5px 14px !important;
    gap: 0 10px;
  }
  html body .page-footer-context {
    margin-block: 4px !important;
    padding-block: 0 !important;
  }
  html body .page-footer-context p { margin: 0; }
  html body footer.shared-site-footer :is(.shared-footer-links a,.shared-reading-notes a,.shared-related summary,[data-analytics-settings],.operator-support-footer) {
    min-height: 34px;
    padding-block: 4px;
  }

  html body:not(.is-embedded):not([data-report-embedded]):has(footer.shared-site-footer) {
    padding-bottom: 0;
  }
  html body[data-workspace="company"] #main.company-detail-page:has(footer.shared-site-footer) {
    padding-bottom: 0;
  }
  html body footer.shared-site-footer .shared-footer-credit {
    flex-basis: auto;
    margin: 0;
    padding: 0 0 0 12px;
    border-block-start: 0;
    border-inline-start: 1px solid #3c5268;
  }

  html body:is(.help-page,[data-workspace="company"]) #main:is(.company-detail-page,.help-main) {
    width: min(1664px,calc(100% - 64px)) !important;
    max-width: 1664px !important;
  }
  html body:is(.help-page,[data-workspace="company"]) > .shared-site-header {
    position: relative !important;
    top: auto !important;
  }
  html:has(body:is(.help-page,[data-workspace="company"])) {
    scroll-behavior: auto;
    scroll-padding-block-start: 14px;
  }
  html body:is(.help-page,[data-workspace="company"]) #main :is([id], [tabindex]) {
    scroll-margin-block-start: 0;
  }
  html body[data-map-page="japan"] > footer.shared-site-footer:has(.shared-footer-credit) {
    width: 100% !important;
    margin: 8px 0 0 !important;
    border-inline: 0;
    border-radius: 0;
    padding-inline: clamp(16px, 2.5vw, 40px) !important;
  }

  html body.help-page #main.help-main {
    padding: 16px 0 0 !important;
  }
  html body.help-page #main.help-main > :is(.help-heading,.help-consultation,.journey-site-help) {
    margin-block: 6px !important;
    min-height: 0;
  }
  html body.help-page #main.help-main .help-section-heading { margin-bottom: 8px; }
  html body.help-page #main.help-main .help-contacts .help-contact { padding: 10px 12px !important; }
  html body.help-page #main.help-main .help-contact .help-phone { margin-block: 6px !important; }
  html body.help-page #main .help-heading {
    padding: 8px 16px !important;
  }
  html body.help-page #main .help-heading h1 { margin: 0; }
  html body.help-page #main .help-heading > p { margin: 4px 0 0; }
  html body.help-page #main .help-section-links { margin-top: 2px; }

  html body[data-design][data-workspace="company"] #main.company-detail-page .company-reading-grid {
    grid-template-columns: minmax(0,1fr) !important;
    grid-template-areas: "actions" "reading" !important;
    gap: 12px !important;
  }
  html body[data-workspace="company"] #main.company-detail-page .report-invitation-actions {
    grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)) !important;
  }
  html body[data-workspace="company"] #main.company-detail-page :is(.company-history,.company-source-navigation,.company-reading > section,.company-action-panel) {
    padding: 10px 12px !important;
  }
  html body[data-workspace="company"] #main.company-detail-page .company-source-navigation {
    margin: 8px 0 0;
  }
  html body[data-workspace="company"] #main.company-detail-page :is(.company-history,.company-reading > section,.company-action-panel) h2 {
    margin-block: 0 6px;
  }
  html body[data-workspace="company"] #main.company-detail-page .company-reading :is(p,ol) {
    margin-block: 4px;
  }

  html body[data-design][data-map-page="japan"] #panel-public-reports #public-report-list > .record-compact {
    padding: 8px 12px !important;
  }
  html body[data-design][data-map-page="japan"] #public-report-list > .record-compact > details.record-details {
    font-size: 15px !important;
    line-height: 1.5;
  }
  html body[data-design][data-map-page="japan"] #public-report-list > .record-compact > details.record-details > summary {
    min-height: 30px !important;
    padding-block: 0 !important;
  }

  html body[data-design][data-map-page="japan"] #panel-companies {
    row-gap: 6px;
  }
  html body[data-design][data-map-page="japan"] #panel-companies :is(.search-hub-modes,.hub-search-form,#hub-shared-filters) {
    margin-block: 0;
  }
  html body[data-design][data-map-page="japan"] #panel-companies .hub-search-form > p {
    margin: 4px 0 0;
    font-size: 14px;
  }
  html body[data-design][data-map-page="japan"] #panel-companies #hub-shared-filters {
    gap: 6px 12px;
    justify-content: start;
  }
  html body[data-design][data-map-page="japan"] #panel-companies #hub-shared-filters label {
    flex: 1 1 10rem;
    max-width: 19rem;
  }
  html body[data-design][data-map-page="japan"] #panel-companies .company-chart-panel {
    padding: 10px 14px;
  }
}

html body :is(.japan-reading-caution,.company-reading-caution) {
  color: #d5e6f7;
  font-size: 15px !important;
  line-height: 1.5;
  margin: 4px 0 8px;
}
html body .japan-reading-caution {
  width: min(100%, 1580px);
  margin-inline: auto;
}
html body[data-workspace="company"] #main :is(.company-history dt,.company-history .field-help,.company-note,.work-note,.company-facts dt),
html body.help-page #main :is(.help-official-note,.help-kicker,.help-contact-purpose,#consultation-preview-label),
html body footer.shared-site-footer :is(.shared-footer-links a,.shared-related-links a) {
  font-size: 15px !important;
  line-height: 1.5;
}

html body[data-map-page="japan"] #panel-regions .dashboard-side .dashboard-side-note {
  color: #d5e6f7;
  font-size: 15px !important;
  line-height: 1.5;
}

@media (min-width: 1001px) {
  html body.help-page #main .regional-help-options {
    display: grid;
    gap: 10px;
    margin-block: 8px;
  }
  html body.help-page #main .regional-help-options p { margin: 4px 0; }
  html body.help-page #main .regional-help-options .consultation-result-preview { margin-top: 0; }
  html body.help-page #main .regional-help-options .consultation-result-preview p { margin: 0; }
  html body.help-page #main .regional-help-directory {
    padding-block-start: 8px;
    border-block-start: 1px solid #3c5268;
  }
  html body.help-page #main .regional-help-directory a { font-size: 15px; }
  html body.help-page #main .regional-help-directory p { max-width: none; }
  html body.help-page #main .regional-help-directory .field-help {
    margin: 4px 0 0;
    line-height: 1.45;
  }
  html body.help-page #main .regional-help-directory .field-help a {
    display: inline;
    min-height: 0;
  }
  html body.help-page #main #consultation-preparation {
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    padding: 10px 14px !important;
  }
  html body.help-page #main #consultation-preparation > p {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr));
    max-width: none;
    gap: 6px 12px !important;
    margin: 8px 0 0;
  }
  html body.help-page #main #consultation-preparation > p > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 9px;
    border: 1px solid #3c5268;
    border-radius: 6px;
    background: #0b1a2a;
    font-size: 15px;
    line-height: 1.4;
  }
  html body[data-map-page="japan"] #panel-regions .explorer-grid > :is(.explorer-picker,.dashboard-side) {
    max-height: max(26rem,calc(100vh - 224px)) !important;
    max-height: max(26rem,calc(100dvh - 224px)) !important;
    overflow-y: auto !important;
    scrollbar-color: #6887a6 #0b1a2a;
  }
  html body[data-map-page="japan"] #panel-regions #dashboard-records {
    max-height: clamp(12rem,34vh,22rem) !important;
    overflow-y: auto !important;
  }
  html body[data-map-page="japan"] #post-report {
    margin-top: 4px !important;
  }

  html body[data-workspace="company"] #main .company-key-facts {
    grid-template-columns: repeat(2,minmax(0,max-content)) !important;
  }
  html body[data-workspace="company"] #main .company-banner {
    display: grid;
    grid-template-columns: fit-content(65%) minmax(0,max-content);
    align-items: center;
    column-gap: 16px;
  }
  html body[data-workspace="company"] #main .company-banner > :not(.company-key-facts,.company-overview-links) {
    grid-column: 1/-1;
  }
  html body[data-workspace="company"] #main .company-banner .company-overview-links {
    justify-content: flex-start;
    margin: 0;
  }
  html body[data-workspace="company"] #main .company-source-navigation {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 2px 18px;
    align-items: baseline;
  }
  html body[data-workspace="company"] #main .company-source-navigation h2 { grid-column:1/-1; margin-bottom: 3px; }
  html body[data-workspace="company"] #main .company-source-navigation p { margin:0; }
  html body[data-workspace="company"] #main .company-records > .source-credit,
  html body[data-workspace="company"] #main .company-records :is(.company-publication-summary,.company-display-note) {
    max-inline-size: none;
  }

  html body[data-home-dashboard] .home-dashboard-actions {
    display: grid;
    grid-template-columns: minmax(0,1.22fr) minmax(0,1fr);
    align-items: stretch;
    gap: 8px 12px;
  }
  html body[data-home-dashboard] .home-dashboard-actions :is(.lookup-hero,.home-actions,.world-entry) {
    margin-block: 0 !important;
  }
  html body[data-home-dashboard] .home-dashboard-actions .lookup-hero {
    grid-template-columns: minmax(0,1.25fr) minmax(0,1fr);
    align-items: center;
    gap: 8px 20px;
  }
  html body[data-home-dashboard] .home-dashboard-actions .lookup-panel {
    justify-self: start;
    padding: 4px 0 !important;
  }
  html body[data-home-dashboard] .home-dashboard-actions .home-actions {
    align-self: center;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  html body[data-home-dashboard] .home-dashboard-actions .home-actions > a {
    align-items: center;
    min-height: 0;
    padding: 7px 12px;
  }
  html body[data-home-dashboard] .home-dashboard-actions .home-actions small { margin-top: 2px; }
  html body[data-home-dashboard] .home-dashboard-actions .world-entry { grid-column: 1/-1; }
  html body[data-home-dashboard] .home-dashboard-actions .lookup-copy p { margin: 3px 0; }
  html body[data-home-dashboard] .home-dashboard-actions .lookup-copy h2 {
    margin: 2px 0 4px;
    font-size: clamp(21px,1.5vw,27px) !important;
  }
}

@media (min-width: 1001px) {
  html body[data-workspace="company"] #main .company-action-panel {
    display: grid;
    grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
    column-gap: 20px;
  }
  html body[data-workspace="company"] #main .company-action-panel h2 {
    grid-column: 1/-1;
    margin-bottom: 6px;
  }
  html body[data-workspace="company"] #main .company-action-panel .report-invitation-actions {
    grid-column: 1;
    grid-row: span 3;
    align-content: start;
  }
  html body[data-workspace="company"] #main .company-action-panel > p {
    grid-column: 2;
    margin: 0 0 4px;
  }
  html body[data-workspace="company"] #main .company-reading {
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: start;
    gap: 10px;
  }
  html body[data-workspace="company"] #main .company-publication {
    display: grid;
    grid-template-columns: minmax(0,1fr) fit-content(36%);
    align-items: start;
    gap: 2px 18px;
  }
  html body[data-workspace="company"] #main .company-publication > :not(.company-record-date,.company-record-links) {
    grid-column: 1/-1;
  }
  html body[data-workspace="company"] #main .company-publication .company-record-links {
    grid-column: 2;
    grid-row: 1;
    justify-content: end;
    margin: 0;
    font-size: 15px;
  }
  html body[data-workspace="company"] #main .company-publication .company-record-date { grid-column: 1; }
  html body[data-workspace="company"] #main .company-publication .company-publication-summary { font-size: 15px !important; }
  html body[data-workspace="company"] #main .company-publication .published-address { min-width: 0; }
}
@media (min-width: 1550px) {
  html body[data-home-dashboard] .home-dashboard-actions .home-actions {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  html body[data-home-dashboard] .home-dashboard-actions .home-actions > a { align-items: start; }
}
