/*
 * NAHBS page templates — same look as the Press Releases page.
 *
 * Every rule is scoped under body.nahbs-sub-page, and every link colour is
 * set explicitly for each state, so neither the theme's own styles nor a
 * more general rule in this file can override it.
 *
 * Japanese fonts follow the Latin ones in each font list, so Japanese text
 * gets Japanese letterforms (Montserrat and League Gothic have none).
 *
 * Block themes set their own fonts (and some set weight, letter spacing
 * and capitals) directly on the body, headings and captions, so those rules
 * below state each of these rather than inherit them.
 */

/* ---- Shared with the Press Releases page ------------------------------- */

body.nahbs-sub-page {
	--nh-sans: Montserrat, Helvetica, Arial, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif;
	--nh-display: 'League Gothic', Impact, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif;
	margin: 0;
	background: #ffffff;
	color: #111111;
	font-family: var(--nh-sans);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: normal;
	-webkit-font-smoothing: antialiased;
}
.nahbs-sub-page .nh-site,
.nahbs-sub-page .nh-site * {
	box-sizing: border-box;
}
.nahbs-sub-page .nh-site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.nahbs-sub-page .nh-main {
	flex-grow: 1;
	overflow-x: clip;
}
.nahbs-sub-page a,
.nahbs-sub-page a:visited {
	color: #111111;
}
.nahbs-sub-page a:hover,
.nahbs-sub-page a:focus,
.nahbs-sub-page a:active {
	color: #a63010;
}

/* Header — logo and title link back to the home page */
.nahbs-sub-page .nh-header {
	background: #000000;
	padding: 14px 24px;
}
.nahbs-sub-page .nh-header .nh-header__home,
.nahbs-sub-page .nh-header .nh-header__home:visited,
.nahbs-sub-page .nh-header .nh-header__home:hover,
.nahbs-sub-page .nh-header .nh-header__home:focus,
.nahbs-sub-page .nh-header .nh-header__home:active {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	color: #ffffff;
	text-decoration: none;
}
.nahbs-sub-page .nh-header__logo {
	width: 44px;
	height: 41px;
	object-fit: contain;
	flex-shrink: 0;
}
.nahbs-sub-page .nh-header__title {
	font-family: 'League Gothic', Impact, sans-serif;
	font-size: 22px;
	line-height: 1.1;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #ffffff;
}

/* Footer — matches the NAHBS Holding Page */
.nahbs-sub-page .nh-footer {
	background: #000000;
	padding: 28px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	text-align: center;
}
.nahbs-sub-page .nh-footer__logo {
	width: 32px;
	height: 30px;
	object-fit: contain;
}
.nahbs-sub-page .nh-footer__copy {
	font-size: 14px;
	color: #ffffff;
}
.nahbs-sub-page .nh-footer .nh-footer__link,
.nahbs-sub-page .nh-footer .nh-footer__link:visited,
.nahbs-sub-page .nh-footer .nh-footer__link:hover,
.nahbs-sub-page .nh-footer .nh-footer__link:focus,
.nahbs-sub-page .nh-footer .nh-footer__link:active {
	font-size: 14px;
	color: #ffffff;
}

@media (min-width: 640px) {
	.nahbs-sub-page .nh-header { padding: 18px 48px; }
	.nahbs-sub-page .nh-header__logo { width: 56px; height: 53px; }
	.nahbs-sub-page .nh-header__title { font-size: 30px; }
	.nahbs-sub-page .nh-footer { padding: 32px 48px; }
}

/* ---- Page editor: the writing area, while the template is a NAHBS one -- */

/* The plugin adds this stylesheet to the editor only for NAHBS pages. */
.editor-styles-wrapper {
	--nh-sans: Montserrat, Helvetica, Arial, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif;
	--nh-display: 'League Gothic', Impact, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif;
	--wp--style--global--content-size: 640px;
	--wp--style--global--wide-size: 1000px;
	background: #ffffff;
	color: #111111;
	font-family: var(--nh-sans);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: normal;
}

/* Same 640px column as the page (the editor writes the theme's width into
   rules of its own, so the variable above doesn't reach these two) */
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide)),
.editor-styles-wrapper .editor-visual-editor__post-title-wrapper > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: 640px;
}

/* Title field: the page's name, not shown on the page itself — plain text */
.editor-styles-wrapper h1.editor-post-title,
.editor-styles-wrapper h1.wp-block-post-title {
	margin: 0 0 32px;
	font-family: var(--nh-sans);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-align: left;
	color: #111111;
}

/* ---- Page content: whatever is written in the page editor --------------- */

/* Same 640px column and top spacing as the Press Releases list.
   Rules from Heading 1 to Buttons also style the editor's writing area. */
.nahbs-sub-page .nh-content {
	--wp--style--global--content-size: 640px;
	--wp--style--global--wide-size: 1000px;
	width: 100%;
	max-width: 688px;
	margin: 0 auto;
	padding: 56px 24px 64px;
	font-size: 16px;
	line-height: 1.6;
}
.nahbs-sub-page .nh-content::after {
	content: '';
	display: table;
	clear: both;
}
.nahbs-sub-page .nh-content > :first-child {
	margin-top: 0;
}

/* Heading 1 — as the Press Releases heading: red rule above, centred */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h1:not(.editor-post-title) {
	margin: 0 0 36px;
	font-family: var(--nh-display);
	font-weight: 400;
	font-size: clamp(36px, 6vw, 48px);
	line-height: 1.05;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	text-align: center;
	color: #000000;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h1:not(.editor-post-title)::before {
	content: '';
	display: block;
	width: 72px;
	height: 5px;
	margin: 0 auto 14px;
	background: #a63010;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h1:not(.editor-post-title).has-text-align-left::before {
	margin-left: 0;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h1:not(.editor-post-title).has-text-align-right::before {
	margin-right: 0;
}

/* Heading 2 — League Gothic, as the header title */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h2 {
	margin: 48px 0 14px;
	font-family: var(--nh-display);
	font-weight: 400;
	font-size: clamp(28px, 4.5vw, 34px);
	line-height: 1.1;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #000000;
}

/* Heading 3 */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h3 {
	margin: 32px 0 10px;
	font-family: var(--nh-sans);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	color: #000000;
}

/* Heading 4 — small capitals in teal, as the Press Releases dates */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h4 {
	margin: 28px 0 8px;
	font-family: var(--nh-sans);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #2c6b7d;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h5,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) h6 {
	margin: 24px 0 8px;
	font-family: var(--nh-sans);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	color: #000000;
}

/* Text */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) p {
	margin: 0 0 18px;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) ul,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) ol {
	margin: 0 0 18px;
	padding-left: 24px;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) li {
	margin: 0 0 6px;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) li > ul,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) li > ol {
	margin: 6px 0 0;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) strong,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) b {
	font-weight: 700;
}

/* Links in text: underlined; red on hover, as elsewhere on the site */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) a:not(.wp-block-button__link):not(.wp-element-button),
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) a:not(.wp-block-button__link):not(.wp-element-button):visited {
	color: #111111;
	text-decoration: underline;
	text-decoration-color: #a63010;
	text-underline-offset: 3px;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) a:not(.wp-block-button__link):not(.wp-element-button):hover,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) a:not(.wp-block-button__link):not(.wp-element-button):focus,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) a:not(.wp-block-button__link):not(.wp-element-button):active {
	color: #a63010;
}

/* Quote */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) blockquote {
	margin: 0 0 24px;
	padding: 4px 0 4px 20px;
	border-left: 4px solid #a63010;
	font-size: 18px;
	line-height: 1.55;
	color: #3a3a3a;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) blockquote p:last-of-type {
	margin-bottom: 0;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) blockquote cite {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #5f5a53;
}

/* Images and captions */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) figure {
	margin: 0 0 24px;
}
/* Cover block photos are left alone: they must fill their box at every
   screen width, which "height: auto" would prevent. */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) img:not(.wp-block-cover__image-background) {
	max-width: 100%;
	height: auto;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) figcaption {
	margin-top: 8px;
	font-family: var(--nh-sans);
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
	color: #5f5a53;
}

/*
 * Video: never taller than most of the screen, centred. A portrait (phone)
 * video stays phone-shaped; a landscape one fills the column.
 */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) video {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 80vh;
	margin: 0 auto;
	background: #000000;
}

/* Tables */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.45;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) th,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) td {
	padding: 10px 12px 10px 0;
	border: 0;
	border-bottom: 1px solid #e2ded8;
	text-align: left;
	vertical-align: top;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) th {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #2c6b7d;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) thead,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) tfoot {
	border: 0;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) thead th {
	border-bottom: 2px solid #111111;
}

/* Separator */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) hr {
	height: 0;
	margin: 40px auto;
	border: 0;
	border-top: 1px solid #e2ded8;
	background: none;
	opacity: 1;
}

/* Buttons */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-button__link,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-button__link:visited {
	display: inline-block;
	padding: 12px 24px;
	border: 0;
	border-radius: 0;
	background: #000000;
	font-family: var(--nh-sans);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	color: #ffffff;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-button__link:hover,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-button__link:focus,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-button__link:active {
	background: #a63010;
	color: #ffffff;
}

/*
 * MailerLite form inside a Details block: the Details block's clickable
 * line becomes a button, centred over the (centred) form. Matched two
 * ways: the class the script adds, and — so it looks right before the
 * script runs, and in the editor — any Details block holding the form.
 * Both sit inside :is(), so a browser that doesn't know :has() still
 * uses the first.
 */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) details:is(.nh-form-reveal, :has(.ml-form-embedContainer)) {
	margin: 0 0 24px;
	text-align: center;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) details:is(.nh-form-reveal, :has(.ml-form-embedContainer)) > summary {
	display: inline-block;
	list-style: none;
	padding: 12px 24px;
	background: #000000;
	font-family: var(--nh-sans);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #ffffff;
	cursor: pointer;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) details:is(.nh-form-reveal, :has(.ml-form-embedContainer)) > summary::-webkit-details-marker {
	display: none;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) details:is(.nh-form-reveal, :has(.ml-form-embedContainer)) > summary:hover {
	background: #a63010;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) details:is(.nh-form-reveal, :has(.ml-form-embedContainer)) > summary:focus-visible {
	outline: 3px solid #000000;
	outline-offset: 2px;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) details[open]:is(.nh-form-reveal, :has(.ml-form-embedContainer)) > summary {
	margin-bottom: 16px;
}

/* Thank-you popup, shown after the form is sent */
.nahbs-sub-page .nh-dialog {
	width: min(480px, calc(100vw - 32px));
	max-width: none;
	margin: auto;
	padding: 0;
	border: 0;
	background: #ffffff;
	color: #111111;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.nahbs-sub-page .nh-dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
}
.nahbs-sub-page .nh-dialog__inner {
	padding: 32px 28px 28px;
	font-family: var(--nh-sans);
	font-size: 16px;
	line-height: 1.6;
	text-align: center;
}
.nahbs-sub-page .nh-dialog__inner::before {
	content: '';
	display: block;
	width: 72px;
	height: 5px;
	margin: 0 auto 20px;
	background: #a63010;
}
.nahbs-sub-page .nh-dialog__body h4 {
	margin: 0 0 10px;
	font-family: var(--nh-sans);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #000000;
}
.nahbs-sub-page .nh-dialog__body p {
	margin: 0 0 12px;
}
.nahbs-sub-page .nh-dialog__close {
	margin-top: 12px;
	padding: 12px 28px;
	border: 0;
	border-radius: 0;
	background: #000000;
	font-family: var(--nh-sans);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #ffffff;
	cursor: pointer;
}
.nahbs-sub-page .nh-dialog__close:hover {
	background: #a63010;
}
.nahbs-sub-page .nh-dialog__close:focus-visible {
	outline: 3px solid #000000;
	outline-offset: 2px;
}

/*
 * Background colour on a List or Group block (Block → Styles → Color).
 * WordPress would give a Group the theme's page-edge margins and narrow
 * column; here a Group fills the 640px column, and either block gets an
 * even margin of colour round its text. Padding set by hand in the
 * block's Dimensions panel still takes precedence.
 */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-group {
	--wp--style--root--padding-left: 0px;
	--wp--style--root--padding-right: 0px;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-group.has-background {
	padding: 24px 28px;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) :is(ul, ol).has-background {
	padding: 20px 28px 20px 48px;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-group > :first-child {
	margin-top: 0;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-group > :last-child,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) :is(ul, ol).has-background > li:last-child {
	margin-bottom: 0;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-group,
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) :is(ul, ol).has-background {
	margin-bottom: 24px;
}

/* Wide and full-width blocks (block toolbar → Align) */
.nahbs-sub-page .nh-content .alignwide {
	width: min(1000px, 100vw - 48px);
	max-width: none;
	margin-left: calc(50% - min(500px, 50vw - 24px));
	margin-right: 0;
}
.nahbs-sub-page .nh-content .alignfull {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: 0;
}
.nahbs-sub-page .nh-content .alignfull img:not(.wp-block-cover__image-background),
.nahbs-sub-page .nh-content .alignwide img:not(.wp-block-cover__image-background) {
	width: 100%;
}

/*
 * Cover block style "Whole photo", chosen in the page editor under
 * Cover → Styles. The box takes the photo's own proportions at every
 * screen width, so the whole photo shows on a phone just as on a computer.
 * Only if the text on the photo needs more room than that does the box grow
 * taller, and the photo is then trimmed to fill it rather than leaving a gap.
 * Covers without this style behave as WordPress designed them.
 */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-cover.is-style-nh-whole-photo:has(> img.wp-block-cover__image-background) {
	display: grid;
	/* One column exactly the box's width. Without it, a photo narrower than
	   the box (on a wide screen) sets the box to the photo's own height. */
	grid-template-columns: minmax(0, 1fr);
	min-height: 0 !important; /* overrides any height set by dragging the box */
	padding: 0 !important;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-cover.is-style-nh-whole-photo > img.wp-block-cover__image-background {
	position: static;
	grid-area: 1 / 1;
	align-self: stretch;
	width: 100%;
	height: auto;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-cover.is-style-nh-whole-photo:has(> img.wp-block-cover__image-background) > .wp-block-cover__inner-container {
	grid-area: 1 / 1;
	align-self: center;
	justify-self: stretch;
	box-sizing: border-box;
	padding: 1em;
	z-index: 1;
}
/* "Change content position" in the editor: top, middle or bottom of the photo. */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-cover.is-style-nh-whole-photo:has(> img.wp-block-cover__image-background):is(.is-position-top-left, .is-position-top-center, .is-position-top-right) > .wp-block-cover__inner-container {
	align-self: start;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-cover.is-style-nh-whole-photo:has(> img.wp-block-cover__image-background):is(.is-position-bottom-left, .is-position-bottom-center, .is-position-bottom-right) > .wp-block-cover__inner-container {
	align-self: end;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-cover.is-style-nh-whole-photo:has(> img.wp-block-cover__image-background):is(.is-position-top-left, .is-position-center-left, .is-position-bottom-left) > .wp-block-cover__inner-container {
	justify-self: start;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) .wp-block-cover.is-style-nh-whole-photo:has(> img.wp-block-cover__image-background):is(.is-position-top-right, .is-position-center-right, .is-position-bottom-right) > .wp-block-cover__inner-container {
	justify-self: end;
}

/*
 * Heading styles, chosen in the page editor under Heading → Styles:
 * "Outline", "Shadow" and "Outline + shadow".
 *
 * Outline: a black line 1 pixel wide round each letter. The line is drawn
 * 2 pixels wide behind the letter, so half of it is hidden and the letters
 * keep their full thickness.
 * Shadow: a soft black shadow round the letters.
 */
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) :is(.is-style-nh-outline, .is-style-nh-outline-shadow) {
	-webkit-text-stroke: 2px #000;
	paint-order: stroke fill;
}
:is(.nahbs-sub-page .nh-content, .editor-styles-wrapper) :is(.is-style-nh-shadow, .is-style-nh-outline-shadow) {
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.6);
}

/*
 * English / 日本語 tabs (assets/js/lang-tabs.js). The page holds both
 * languages, each in its own Group; only the chosen one is shown. Hidden
 * only when the page really has both Groups, so a page with one is never
 * left blank.
 */
html.nh-lang-is-en .nahbs-sub-page .nh-content:has(.nh-lang-en):has(.nh-lang-ja) .nh-lang-ja,
html.nh-lang-is-ja .nahbs-sub-page .nh-content:has(.nh-lang-en):has(.nh-lang-ja) .nh-lang-en {
	display: none;
}
.nahbs-sub-page .nh-lang-tabs {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin: 0 0 32px;
}
.nahbs-sub-page .nh-lang-tab {
	flex: 0 1 220px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 52px;
	margin: 0;
	padding: 8px 18px;
	border: 2px solid #111111;
	border-radius: 0;
	background: #ffffff;
	color: #111111;
	font-family: var(--nh-sans);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.5px;
	text-transform: none;
	cursor: pointer;
}
.nahbs-sub-page .nh-lang-tab:hover {
	background: #eeeeee;
}
.nahbs-sub-page .nh-lang-tab[aria-selected="true"] {
	background: #111111;
	color: #ffffff;
}
.nahbs-sub-page .nh-lang-tab:focus-visible {
	outline: 3px solid #c8102e;
	outline-offset: 3px;
}
.nahbs-sub-page .nh-lang-tab svg {
	flex: none;
	display: block;
	width: 42px;
	height: 28px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
@media (max-width: 480px) {
	.nahbs-sub-page .nh-lang-tabs {
		gap: 8px;
	}
	.nahbs-sub-page .nh-lang-tab {
		flex: 1 1 0;
		padding: 8px 10px;
		gap: 10px;
	}
}

/* Page editor: both language Groups stay visible, each labelled. */
.editor-styles-wrapper .nh-lang-panel {
	margin-top: 40px;
	outline: 2px dashed #9a9a9a;
	outline-offset: 10px;
}
.editor-styles-wrapper .nh-lang-panel::before {
	display: block;
	margin: 0 0 16px;
	padding: 6px 12px;
	background: #444444;
	color: #ffffff;
	font-family: var(--nh-sans);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}
.editor-styles-wrapper .nh-lang-en::before {
	content: 'ENGLISH TAB: shown when the English tab is chosen';
}
.editor-styles-wrapper .nh-lang-ja::before {
	content: 'JAPANESE TAB (日本語): shown when the 日本語 tab is chosen';
}
