/* =========================================================================
   Yensai theme — main stylesheet
   Navy (structure) + gold (actions/accents) + white. Japanese UI.
   ========================================================================= */

:root {
	/* Structure / trust */
	--navy:      #16305c;
	--navy-900:  #10233f;
	--navy-tint: #eef2f9;
	/* Accent / CTA */
	--gold:      #b8912f;
	--gold-600:  #a07d26;
	--gold-tint: #f7f0dc;
	/* Subtle metallic gold gradient for filled CTAs (matches the mockup:
	   lighter at the top, darker at the bottom). */
	--gold-grad:       linear-gradient(180deg, #c9a441 0%, #b8912f 52%, #a67f24 100%);
	--gold-grad-hover: linear-gradient(180deg, #bb9633 0%, #a67f26 52%, #927016 100%);
	/* CTA button bronze (per brand spec): fill #A87D43, subtle top→bottom
	   gradient from #C09A65, white text, 6px radius. */
	--btn-grad:        linear-gradient(180deg, #c09a65 0%, #a87d43 100%);
	--btn-grad-hover:  linear-gradient(180deg, #b18a55 0%, #916a34 100%);
	--btn-border:      #946a33;
	/* Data (ticker only) */
	--up:   #0e9b57;
	--down: #d33a30;
	/* Neutrals */
	--paper: #ffffff;
	--tint:  #f7f9fc;
	--rule:  #e3e8f0;
	--ink:   #161d33;
	--ink-2: #5a6376;
	--ink-3: #939bab;
	--ink-strong: #0b1b33;                 /* near-black navy for headings / on-gold text */
	--yensai-font: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--wrap:   1200px;
	--wrap-wide: 1400px;
	--radius: 8px;
	--shadow-card: 0 1px 2px rgba(22,29,51,.05), 0 0 0 1px rgba(22,29,51,.05);
	--shadow-lift: 0 14px 34px -18px rgba(22,29,51,.35);
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Clip full-bleed overrun at the viewport (root is the scroll container).
	   `clip` (not hidden) does NOT create a scroll container, so position:sticky
	   on the header keeps anchoring to the viewport. */
	overflow-x: clip;
}
html.yensai-nav-locked { overflow: hidden; }
body {
	margin: 0;
	font-family: var(--yensai-font);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	/* Safety net: clip any full-bleed overrun (e.g. the ticker's 100vw
	   fallback that includes the scrollbar) without creating a scroll
	   container, so position:sticky on the header keeps working. */
	overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: var(--gold-600); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.4; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

.yensai-skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--navy); color: #fff; padding: 10px 16px;
	border-radius: 0 0 6px 0; text-decoration: none;
}
.yensai-skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--gold-600); outline-offset: 2px; border-radius: 3px; }

/* --- Japanese line breaking ---
   Strict kinsoku everywhere (no small kana / 。、 starting a line). Headings and
   short labels break at natural phrase boundaries (word-break:auto-phrase, where
   supported) so meaning is not split mid-phrase; text-wrap:pretty avoids orphans.
   Marked phrases and short labels never wrap. Progressive enhancement — browsers
   without these values fall back to default CJK wrapping. */
body { line-break: strict; }
h1, h2, h3, h4,
.yensai-section-title, .yensai-hero__title, .yensai-eyebrow,
.yensai-service__title, .yensai-feature__title, .yensai-env__title,
.yensai-numcard__title, .yensai-reason__title, .yensai-step__title,
.yensai-stat__label, .yensai-faq__q {
	word-break: auto-phrase;
	text-wrap: pretty;
}
.yensai-hero__risk, .yensai-section-lead, .yensai-service__text,
.yensai-env__text, .yensai-feature__text { text-wrap: pretty; }
.yensai-phrase { white-space: nowrap; }
.yensai-header-nav a, .yensai-stat__num, .yensai-service__badge,
.nsx-card__sym, .nsx-card__px { white-space: nowrap; }

/* ---------------------------------------------------------------- Layout */
.yensai-container { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.yensai-container--narrow { max-width: 820px; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }
.yensai-main { display: block; }
.yensai-flow > * + * { margin-top: 1.1em; }

/* Section rhythm */
.yensai-why, .yensai-services, .yensai-faq,
.yensai-prod-intro, .yensai-prod-subtypes, .yensai-prod-reasons { padding-block: clamp(48px, 7vw, 96px); }
.yensai-stats { padding-block: clamp(28px, 4vw, 44px); }

/* ---------------------------------------------------------------- Buttons */
.yensai-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	font: 700 15px/1 var(--yensai-font);
	padding: 12px 22px; border-radius: 6px;
	border: 2px solid transparent; text-decoration: none; cursor: pointer;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
	white-space: nowrap;
}
.yensai-btn:active { transform: translateY(1px); }
/* Primary — bronze gradient (#C09A65→#A87D43), white text, inset highlight */
.yensai-btn--primary { background: var(--btn-grad); color: #fff; border-color: var(--btn-border); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(16,35,63,.22); }
.yensai-btn--primary:hover { background: var(--btn-grad-hover); color: #fff; border-color: #7f5a2b; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 5px 12px -5px rgba(16,35,63,.32); }
.yensai-btn--primary:focus-visible { background: var(--btn-grad-hover); color: #fff; }
/* Secondary (login) — neutral dark-gray outline, doesn't compete with the CTA */
.yensai-btn--secondary { background: transparent; color: #4d4d4d; border-color: #4d4d4d; }
.yensai-btn--secondary:hover { background: #f4f4f5; color: #333; border-color: #333; }
.yensai-btn--secondary:focus-visible { background: #f4f4f5; color: #333; }
/* Ghost — for cookie decline */
.yensai-btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--rule); }
.yensai-btn--ghost:hover { background: var(--tint); color: var(--ink); border-color: var(--ink-3); }
.yensai-btn--ghost:focus-visible { color: var(--ink); }

/* Core Gutenberg buttons inherit the primary/secondary look */
.wp-block-button__link {
	background: var(--btn-grad); color: #fff;
	border-radius: 6px; padding: 13px 26px; font-weight: 700;
	border: 2px solid var(--btn-border); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(16,35,63,.22);
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.wp-block-button__link:hover { background: var(--btn-grad-hover); color: #fff; border-color: #7f5a2b; transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 14px -6px rgba(16,35,63,.32); }
.wp-block-button__link:focus-visible { background: var(--btn-grad-hover); color: #fff; }
.is-style-outline .wp-block-button__link {
	background: transparent; color: #4d4d4d; border: 2px solid #4d4d4d; box-shadow: none;
}
.is-style-outline .wp-block-button__link:hover { background: #f4f4f5; color: #333; border-color: #333; }

/* ---------------------------------------------------------------- Header */
.yensai-site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--paper); border-bottom: 1px solid var(--rule);
	transition: box-shadow .2s ease;
}
.yensai-site-header.is-scrolled { box-shadow: 0 6px 20px -14px rgba(16,35,63,.5); }
.yensai-header-inner {
	display: flex; align-items: center; gap: 20px;
	/* Match the content container width so the logo/nav left edge lines up
	   with the hero and every section below (was --wrap-wide → misaligned). */
	max-width: var(--wrap); margin-inline: auto;
	padding: 12px 24px; min-height: 64px;
}
.yensai-brand { font-weight: 800; font-size: 26px; color: var(--navy); text-decoration: none; letter-spacing: -.01em; }
.yensai-brand--img { display: inline-flex; align-items: center; }
.yensai-logo { display: block; height: 38px; width: auto; }
.yensai-logo--footer { height: 30px; }
.yensai-header__brand .custom-logo { max-height: 40px; width: auto; }

.yensai-header__collapse { display: flex; flex: 1; align-items: center; gap: 20px; }
.yensai-header-nav { margin-inline: auto; }

/* Primary menu */
.yensai-menu { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.yensai-menu li { position: relative; }
.yensai-header-nav a {
	display: inline-block; padding: 10px 12px; text-decoration: none;
	color: var(--ink); font-size: 15px; font-weight: 500; border-radius: 6px;
	transition: color .15s ease, background-color .15s ease;
}
.yensai-header-nav a:hover,
.yensai-header-nav .current-menu-item > a { color: var(--navy); }
.yensai-header-nav > .yensai-menu > li > a { position: relative; }
.yensai-header-nav > .yensai-menu > li > a::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
	background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
.yensai-header-nav > .yensai-menu > li:hover > a::after,
.yensai-header-nav > .yensai-menu > li.current-menu-item > a::after { transform: scaleX(1); }

/* Dropdown submenu (desktop) */
.yensai-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
	min-width: 200px; background: var(--paper); border: 1px solid var(--rule);
	border-radius: 10px; box-shadow: var(--shadow-lift);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
	z-index: 20;
}
.yensai-menu .menu-item-has-children:hover > .sub-menu,
.yensai-menu .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.yensai-menu .sub-menu a { display: block; padding: 8px 12px; font-weight: 500; border-radius: 6px; }
.yensai-menu .sub-menu a:hover { background: var(--navy-tint); }
.yensai-submenu-toggle { display: none; }

/* CTA cluster */
.yensai-header__cta { display: flex; align-items: center; gap: 10px; }
.yensai-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border: 0; border-radius: 8px;
	background: transparent; color: var(--ink-2); cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.yensai-icon-btn:hover { background: var(--navy-tint); color: var(--navy); }

/* Header search reveal */
.yensai-header-search {
	position: absolute; top: 100%; right: 24px; width: min(360px, calc(100vw - 48px));
	background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
	padding: 14px; box-shadow: var(--shadow-lift); z-index: 30;
}

/* Hamburger */
.yensai-nav-toggle {
	display: none; width: 44px; height: 44px; margin-left: auto;
	border: 1px solid var(--rule); border-radius: 8px; background: var(--paper);
	cursor: pointer; position: relative;
}
.yensai-nav-toggle__bars, .yensai-nav-toggle__bars::before, .yensai-nav-toggle__bars::after {
	content: ""; position: absolute; left: 50%; width: 20px; height: 2px;
	background: var(--navy); transform: translateX(-50%); transition: transform .2s ease, opacity .2s ease;
}
.yensai-nav-toggle__bars { top: 50%; margin-top: -1px; }
.yensai-nav-toggle__bars::before { top: -6px; }
.yensai-nav-toggle__bars::after { top: 6px; }
.is-nav-open .yensai-nav-toggle__bars { background: transparent; }
.is-nav-open .yensai-nav-toggle__bars::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.is-nav-open .yensai-nav-toggle__bars::after  { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* =========================================================== Ticker (nsx-mk)
   Adapted from the approved component. Motion via ticker.js (rAF + fallback).
   Header is sticky (not fixed) so the tab row needs no large top-clear. */
.nsx-mk {
	--c-bg: var(--navy-tint); --c-paper: #fff; --c-tint: #f7f9fc; --c-rule: #e3e8f0;
	--c-ink: #161d33; --c-ink-2: #5a6376; --c-ink-3: #939bab;
	--c-brand: #16305c; --c-brand-bg: #eef2f9; --c-up: #0e9b57; --c-down: #d33a30;
	--shadow-rest: 0 1px 2px rgba(22,29,51,.05), 0 0 0 1px rgba(22,29,51,.04);
	--shadow-hover: 0 8px 22px -10px rgba(22,29,51,.20), 0 0 0 1px rgba(22,48,92,.16);
	--nsx-top-clear: 12px;
	width: var(--nsx-vw, 100vw);
	margin-left: calc(50% - var(--nsx-vw, 100vw) / 2);
	margin-right: calc(50% - var(--nsx-vw, 100vw) / 2);
	position: relative; background: var(--c-bg);
	padding: var(--nsx-top-clear) 0 10px; color: var(--c-ink); overflow: hidden;
}
.nsx-mk *, .nsx-mk *::before, .nsx-mk *::after { box-sizing: border-box; }
.nsx-mk__head {
	display: flex; align-items: center; justify-content: flex-end;
	max-width: 1200px; margin: 0 auto 6px; padding: 0 24px;
}
.nsx-mk__label { font-size: 15px; font-weight: 700; color: var(--c-brand); }
.nsx-mk__live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--c-up); }
.nsx-mk__live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-up); box-shadow: 0 0 0 3px rgba(14,155,87,.18); }
.nsx-mk__tabs {
	display: flex; justify-content: center; gap: 4px; max-width: 1040px;
	margin: 0 auto 8px; padding: 0 20px; overflow-x: auto;
	scrollbar-width: none; -ms-overflow-style: none;
}
.nsx-mk__tabs::-webkit-scrollbar { display: none; }
.nsx-mk__tab {
	flex: 0 0 auto; padding: 6px 15px; border: 0; border-radius: 8px; background: transparent;
	color: var(--c-ink-2); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1;
	cursor: pointer; white-space: nowrap; transition: color .16s ease, background-color .16s ease;
}
.nsx-mk__tab:hover { background: #fff; color: var(--c-ink); }
.nsx-mk__tab[aria-selected="true"] { background: var(--c-brand-bg); color: var(--c-brand); font-weight: 600; }
.nsx-mk__tab:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.nsx-mk__stage { position: relative; width: 100%; }
.nsx-mk__viewport { width: 100%; overflow: hidden; padding: 0 0 1px; }
.nsx-mk__track { display: flex; width: max-content; will-change: transform; }
.nsx-card {
	flex: 0 0 auto; display: flex; align-items: center; gap: 16px; min-width: 210px;
	padding: 8px 16px; margin-right: 14px; background: var(--c-paper); border-radius: 10px;
	box-shadow: var(--shadow-rest); text-decoration: none; color: inherit;
	transition: box-shadow .18s ease, transform .18s ease;
}
.nsx-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.nsx-card:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.nsx-card__col { flex: 1 1 auto; min-width: 0; }
.nsx-card__sym { display: block; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--c-ink-3); margin-bottom: 2px; white-space: nowrap; }
.nsx-card__px { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nsx-card__spark { flex: 0 0 auto; }
.nsx-card__spark svg { display: block; }
.nsx-mk__pause { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.nsx-mk__pause:focus-visible {
	width: 30px; height: 30px; margin: 0; clip: auto; clip-path: none; overflow: visible;
	right: 24px; bottom: -26px; left: auto; display: flex; align-items: center; justify-content: center;
	border: 1px solid var(--c-rule); border-radius: 50%; background: #fff; cursor: pointer;
	outline: 2px solid var(--c-brand); outline-offset: 2px;
}
.nsx-mk__pause-icon { width: 8px; height: 10px; border-left: 2.5px solid var(--c-ink-2); border-right: 2.5px solid var(--c-ink-2); }
.nsx-mk__pause[aria-pressed="true"] .nsx-mk__pause-icon { width: 0; height: 0; border: 0; border-left: 9px solid var(--c-ink-2); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }

/* =========================================================== Hero */
.yensai-hero { background: var(--navy-tint); padding-block: clamp(36px, 5vw, 72px); }
.yensai-hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.yensai-eyebrow { color: var(--navy); font-weight: 600; letter-spacing: .04em; margin: 0 0 14px; font-size: 15px; }
.yensai-hero__title { color: var(--ink-strong); font-weight: 800; font-size: clamp(38px, 6vw, 64px); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 18px; }
.yensai-dot { color: var(--gold); }
/* No max-width here: WP constrained-layout adds margin:auto to block children,
   which combined with a max-width would centre (shift right) the disclaimer.
   Letting it fill the text column keeps it left-aligned with the H1/button. */
.yensai-hero__risk { color: var(--ink-2); font-size: 13px; line-height: 1.7; margin: 0 0 26px; }
.yensai-hero__cta { margin: 0; }
.yensai-hero__media { display: flex; justify-content: center; }
.yensai-hero__frame {
	width: 100%; max-width: 540px; margin: 0; background: #fff; border: 3px solid var(--gold);
	border-radius: 16px; padding: 8px; box-shadow: var(--shadow-lift);
}
.yensai-hero__photo {
	display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 9px;
}

/* =========================================================== Stats */
.yensai-stats { background: var(--navy-tint); }
.yensai-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.yensai-stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 8px; }
.yensai-stat__ico { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1.5px solid var(--navy); border-radius: 50%; color: var(--navy); }
.yensai-stat__num { font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; color: var(--navy); line-height: 1.1; }
.yensai-stat__label { font-size: 13px; color: var(--ink-2); }

/* =========================================================== Section titles */
.yensai-section-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; margin: 0 0 12px; }
.yensai-section-title--invert { color: #fff; }
.yensai-section-lead { color: var(--ink-2); max-width: 60ch; margin: 0 auto 40px; }

/* =========================================================== Why / features */
.yensai-why__top { gap: clamp(24px, 4vw, 48px); margin-bottom: clamp(32px, 5vw, 56px); }
.yensai-section-lead--left { text-align: left; margin: 0; font-size: 16px; }
.yensai-why__media { display: flex; }
.yensai-why__photo {
	width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px;
	border: 1px solid var(--rule); box-shadow: var(--shadow-card);
}
.yensai-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 12px; }
.yensai-feature__ico { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 12px; background: var(--gold-tint); color: var(--gold-600); margin-bottom: 12px; }
.yensai-feature__title { font-size: 18px; margin: 0 0 8px; }
.yensai-feature__text { color: var(--ink-2); font-size: 14px; margin: 0; }

/* =========================================================== Services */
.yensai-services { background: var(--tint); }
.yensai-services__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.yensai-numcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.yensai-service {
	position: relative; display: flex; flex-direction: column; gap: 10px;
	/* Dark navy overlay over the slot photo keeps text AA-legible. */
	background-image: linear-gradient(160deg, rgba(22,48,92,.82), rgba(16,35,63,.94)), var(--img, none);
	background-size: cover; background-position: center; background-color: var(--navy-900);
	color: #eaf0fb; border-radius: 14px; padding: 24px 20px 20px; min-height: 240px; overflow: hidden;
}
.yensai-service__badge {
	align-self: flex-start; font-weight: 800; font-size: 15px; color: var(--ink-strong);
	background: var(--gold-grad); border-radius: 6px; padding: 4px 10px; letter-spacing: .02em;
}
.yensai-service__ico { color: var(--gold); }
.yensai-service__title { color: #fff; font-size: 18px; margin: 4px 0 0; }
.yensai-service__text { color: #c3cfe4; font-size: 13px; margin: 0; flex: 1; }
.yensai-service__link { color: var(--gold); font-weight: 600; font-size: 14px; text-decoration: none; margin-top: 6px; }
.yensai-service__link:hover { color: #d9b24e; text-decoration: underline; }

/* =========================================================== Trading env */
.yensai-env { background: var(--navy-900); padding-block: clamp(48px, 7vw, 96px); }
.yensai-env__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.yensai-env__item { display: flex; gap: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 18px; }
.yensai-env__ico { flex: 0 0 auto; color: var(--gold); }
.yensai-env__title { color: #fff; font-size: 16px; margin: 0 0 4px; }
.yensai-env__text { color: #b9c4da; font-size: 13px; margin: 0; }

/* =========================================================== FAQ accordion */
.yensai-faq__list { display: flex; flex-direction: column; gap: 10px; }
.yensai-faq__item { border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); overflow: hidden; }
.yensai-faq__q {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 18px 20px; cursor: pointer; font-weight: 600; color: var(--navy); list-style: none;
}
.yensai-faq__q::-webkit-details-marker { display: none; }
.yensai-faq__a { padding: 0 20px 18px; color: var(--ink-2); }
.yensai-faq__a p { margin: 0; }
.yensai-chevron { width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s ease; flex: 0 0 auto; }
.yensai-faq__item[open] .yensai-chevron { transform: rotate(-135deg); }

/* =========================================================== Product page */
.yensai-product__header { background: var(--navy-tint); padding-block: clamp(32px, 4vw, 56px); }
.yensai-product__title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin: 8px 0 0; }
.yensai-prod-subtypes { background: var(--tint); }
.yensai-numcard { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.yensai-numcard__badge { align-self: flex-start; font-weight: 800; color: var(--gold-600); font-size: 22px; }
.yensai-numcard__ico { color: var(--navy); }
.yensai-numcard__title { font-size: 18px; margin: 0; }
.yensai-numcard__text { color: var(--ink-2); font-size: 14px; margin: 0; }
.yensai-reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.yensai-reason { display: flex; gap: 14px; }
.yensai-reason__ico { flex: 0 0 auto; color: var(--gold-600); }
.yensai-reason__title { font-size: 16px; margin: 0 0 4px; }
.yensai-reason__text { color: var(--ink-2); font-size: 14px; margin: 0; }
.yensai-prod-steps { background: var(--navy-900); padding-block: clamp(48px, 7vw, 96px); }
.yensai-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.yensai-step { text-align: center; padding: 20px; }
.yensai-step__n { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: var(--gold-grad); color: var(--ink-strong); font-weight: 800; margin-bottom: 12px; }
.yensai-step__title { color: #fff; font-size: 18px; margin: 0 0 6px; }
.yensai-step__text { color: #b9c4da; font-size: 14px; margin: 0; }

/* =========================================================== Generic page */
.yensai-page__header, .yensai-archive__header { background: var(--navy-tint); padding-block: clamp(28px, 4vw, 52px); margin-bottom: 40px; }
.yensai-page__title { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; margin: 8px 0 0; }
.yensai-page__body, .yensai-product__body { max-width: 820px; margin-inline: auto; padding-inline: 24px; padding-bottom: 64px; }
.yensai-page__body h2 { margin-top: 1.6em; }
.yensai-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.yensai-breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--ink-3); }
.yensai-breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.yensai-breadcrumbs a:hover { color: var(--navy); }
.yensai-company-info table { width: 100%; border-collapse: collapse; }
.yensai-company-info th, .yensai-company-info td { text-align: left; padding: 10px 12px; border: 1px solid var(--rule); vertical-align: top; }
.yensai-company-info th { background: var(--tint); width: 30%; color: var(--navy); }
.yensai-risk-callout { background: var(--gold-tint); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: 8px; }

/* =========================================================== Inner-page content */
/* About page hero image */
.yensai-page-hero { margin: 0 0 8px; }
.yensai-page-hero img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 16px; display: block; box-shadow: var(--shadow-card); }
/* Media + text two-column */
.yensai-mt { gap: clamp(20px, 4vw, 44px); align-items: center; margin-block: clamp(24px, 4vw, 40px) !important; }
.yensai-mt__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; box-shadow: var(--shadow-card); }
.yensai-mt figure { margin: 0; }
/* Product intro two-column (full-bleed section) */
.yensai-prod-intro { padding-block: clamp(40px, 6vw, 80px); }
.yensai-prod-intro__cols { gap: clamp(24px, 4vw, 48px); align-items: center; }
.yensai-prod-intro__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; display: block; box-shadow: var(--shadow-lift); }
/* Values (About) */
.yensai-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 10px 0; }
.yensai-value { background: var(--tint); border: 1px solid var(--rule); border-radius: 12px; padding: 20px; }
.yensai-value__title { font-size: 17px; margin: 0 0 8px; position: relative; padding-left: 14px; }
.yensai-value__title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 2px; background: var(--gold); }
.yensai-value__text { color: var(--ink-2); font-size: 14px; margin: 0; }
/* Account plan cards */
.yensai-plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 12px 0; }
.yensai-plan { border: 1px solid var(--rule); border-radius: 16px; padding: 26px; background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease; }
.yensai-plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.yensai-plan__name { font-size: 20px; margin: 0 0 6px; color: var(--navy); }
.yensai-plan__lead { color: var(--ink-2); font-size: 14px; margin: 0 0 16px; }
.yensai-plan__list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.yensai-plan__list li { position: relative; padding-left: 26px; font-size: 14px; color: var(--ink); }
.yensai-plan__list li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 8px; border-left: 2.5px solid var(--gold-600); border-bottom: 2.5px solid var(--gold-600); transform: rotate(-45deg); }
.yensai-plan__cta { align-self: flex-start; background: var(--btn-grad); color: #fff; border: 2px solid var(--btn-border); border-radius: 6px; padding: 11px 22px; font-weight: 700; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); transition: background-color .18s ease, transform .18s ease; }
.yensai-plan__cta:hover { background: var(--btn-grad-hover); color: #fff; transform: translateY(-1px); }
/* Comparison + conditions tables — rounded card, zebra rows, hover */
.yensai-compare, .yensai-conditions { margin: 10px 0 0; }
.yensai-compare table, .yensai-conditions table {
	width: 100%; border-collapse: separate; border-spacing: 0; background: #fff;
	border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card);
}
.yensai-compare th, .yensai-compare td,
.yensai-conditions th, .yensai-conditions td {
	border: 0; border-bottom: 1px solid var(--rule); padding: 15px 18px;
	text-align: left; vertical-align: middle; font-size: 14px; line-height: 1.7;
}
.yensai-compare tr:last-child > *, .yensai-conditions tr:last-child > * { border-bottom: 0; }
/* Comparison header */
.yensai-compare thead th { background: linear-gradient(180deg, var(--navy), var(--navy-900)); color: #fff; text-align: center; font-weight: 700; }
.yensai-compare thead th:first-child { text-align: left; }
/* Row-label column */
.yensai-compare tbody th, .yensai-conditions th {
	background: var(--tint); color: var(--navy); font-weight: 700; width: 34%; border-right: 1px solid var(--rule);
}
/* Column dividers (comparison) + zebra + hover */
.yensai-compare td:not(:last-child) { border-right: 1px solid var(--rule); }
.yensai-compare tbody tr:nth-child(even) td, .yensai-conditions tbody tr:nth-child(even) td { background: #fafbfd; }
.yensai-compare tbody tr:hover td, .yensai-conditions tbody tr:hover td { background: var(--navy-tint); }
.yensai-compare tbody tr:hover th, .yensai-conditions tbody tr:hover th { background: #e6ecf6; }
@media (max-width: 600px) {
	.yensai-compare, .yensai-conditions { overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.yensai-compare table, .yensai-conditions table { min-width: 460px; }
}

/* CTA band (product / about pages) */
.yensai-cta { background: var(--gold-tint); padding-block: clamp(44px, 6vw, 80px); }
.yensai-cta__inner { max-width: 720px; }
.yensai-cta__title { font-size: clamp(24px, 3.2vw, 34px); color: var(--navy); margin: 0 0 12px; }
.yensai-cta__text { color: var(--ink-2); margin: 0 0 26px; font-size: 16px; }
.yensai-cta__btns { margin: 0; }
/* FAQ category headings on the FAQ page */
.yensai-page__body .yensai-faq__list { margin-bottom: 28px; }

/* =========================================================== Forms */
.yensai-form { max-width: 640px; }
.yensai-form__row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; }
.yensai-form__row label { font-weight: 600; color: var(--navy); font-size: 14px; }
.yensai-form input:not([type=submit]):not([type=button]), .yensai-form textarea,
.wpcf7-form input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]),
.wpcf7-form textarea, .wpcf7-form select, .yensai-searchform__field {
	font-family: inherit; font-size: 15px; padding: 11px 13px; border: 1px solid var(--rule);
	border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
/* Contact Form 7 — inherit theme form look; submit styled as the primary CTA. */
.wpcf7-form p { margin: 0 0 18px; }
.wpcf7-form label { font-weight: 600; color: var(--navy); font-size: 14px; }
.wpcf7-submit {
	background: var(--btn-grad); color: #fff; border: 2px solid var(--btn-border);
	border-radius: 6px; padding: 13px 28px; font-weight: 700; cursor: pointer; width: auto;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(16,35,63,.22);
	transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.wpcf7-submit:hover { background: var(--btn-grad-hover); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 5px 12px -5px rgba(16,35,63,.32); }
.wpcf7 .wpcf7-response-output { border-radius: 8px; margin: 8px 0 0; padding: 12px 16px; font-size: 14px; }
.yensai-form input:focus, .yensai-form textarea:focus { outline: 2px solid var(--gold-600); outline-offset: 1px; border-color: var(--gold-600); }
.yensai-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.yensai-form__notice { padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.yensai-form__notice--ok { background: #e7f6ee; color: #0e6b3e; border: 1px solid #b7e2c8; }
.yensai-form__notice--err { background: #fdecea; color: #a82018; border: 1px solid #f3c2bd; }
.yensai-searchform { display: flex; gap: 8px; }
.yensai-searchform__submit { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; border: 1px solid var(--rule); background: var(--navy); color: #fff; border-radius: 8px; cursor: pointer; }
.yensai-searchform__submit:hover { background: var(--navy-900); }

/* =========================================================== Footer */
.yensai-site-footer { background: var(--navy-900); color: #c3cfe4; padding-top: clamp(48px, 6vw, 72px); }
.yensai-footer__cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 32px; padding-bottom: 40px; }
.yensai-footer__brand { position: relative; }
.yensai-brand--footer, .yensai-footer__brand .custom-logo { font-weight: 800; font-size: 24px; color: #fff; }
.yensai-footer__about { color: #9fb0cc; font-size: 14px; margin: 14px 0 0; max-width: 34ch; }
.yensai-footer__spark { position: absolute; top: -6px; right: 0; color: rgba(184,145,47,.28); }
.yensai-footer__heading { color: #fff; font-size: 15px; margin: 0 0 14px; }
.yensai-footer__heading--sub { margin-top: 22px; }
.yensai-footer__links, .yensai-footer__legal-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.yensai-site-footer a { color: #cdd8ec; text-decoration: none; font-size: 14px; transition: color .16s ease, padding-left .16s ease; }
.yensai-site-footer a:hover, .yensai-site-footer a:focus-visible { color: var(--gold); }
.yensai-footer__links a, .yensai-footer__legal-links a { display: inline-flex; align-items: center; }
.yensai-footer__links a:hover { padding-left: 5px; color: #e6c96f; }
.yensai-footer__links a::before {
	content: ""; width: 0; height: 1px; background: var(--gold); margin-right: 0;
	transition: width .18s ease, margin-right .18s ease;
}
.yensai-footer__links a:hover::before { width: 10px; margin-right: 8px; }
.yensai-footer__address { font-style: normal; color: #9fb0cc; font-size: 14px; line-height: 1.9; }
.yensai-footer__hours { color: #9fb0cc; font-size: 14px; margin: 0; }
.yensai-footer__legal { border-top: 1px solid rgba(255,255,255,.1); padding-block: 22px; }
.yensai-footer__risk { color: #d7b98a; font-size: 12.5px; margin: 0 0 14px; line-height: 1.7; }
.yensai-footer__legal-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.yensai-footer__copyright { color: #8a9bb8; font-size: 13px; margin: 0; }
.yensai-footer__legal-links { flex-direction: row; flex-wrap: wrap; gap: 18px; }

/* =========================================================== Cookie banner */
.yensai-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; }
.yensai-cookie__inner {
	max-width: 1100px; margin-inline: auto; background: #fff; border: 1px solid var(--rule);
	border-radius: 14px; box-shadow: 0 18px 44px -20px rgba(16,35,63,.5);
	padding: 16px 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.yensai-cookie__text { margin: 0; font-size: 13.5px; color: var(--ink-2); flex: 1; min-width: 240px; }
.yensai-cookie__text a { color: var(--navy); }
.yensai-cookie__actions { display: flex; gap: 10px; }

/* =========================================================== Misc content */
.yensai-entry { padding-bottom: 28px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.yensai-entry__title a { color: var(--navy); text-decoration: none; }
.yensai-entry__title a:hover { color: var(--gold-600); }
.wp-block-navigation, .pagination, .navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links .page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--navy); }
.nav-links .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* =========================================================== Polish / motion */
.yensai-service, .yensai-numcard, .yensai-env__item { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
.yensai-service:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -22px rgba(16,35,63,.7); }
.yensai-service__link { transition: color .16s ease; }
.yensai-service:hover .yensai-service__link { color: #e6c96f; }
.yensai-numcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #d8e0ee; }
.yensai-env__item:hover { transform: translateY(-3px); background: rgba(255,255,255,.07); border-color: rgba(184,145,47,.45); }
.yensai-feature__ico { transition: transform .2s ease, background-color .2s ease, color .2s ease; }
.yensai-feature:hover .yensai-feature__ico { transform: translateY(-3px) scale(1.06); background: var(--gold); color: #fff; }
.yensai-stat__ico { transition: transform .2s ease, border-color .2s ease, color .2s ease; }
.yensai-stat:hover .yensai-stat__ico { transform: translateY(-2px); border-color: var(--gold); color: var(--gold-600); }
.yensai-faq__item { transition: border-color .18s ease, box-shadow .18s ease; }
.yensai-faq__item:hover { border-color: #cfd8e8; box-shadow: 0 6px 18px -12px rgba(16,35,63,.35); }
.yensai-faq__item[open] { border-color: var(--gold); }
.yensai-hero__frame { transition: transform .25s ease, box-shadow .25s ease; }
.yensai-hero__frame:hover { transform: translateY(-3px); box-shadow: 0 26px 50px -24px rgba(16,35,63,.5); }
/* Scroll reveal — JS adds .yensai-reveal then .is-visible (gated on no reduced-motion). */
.yensai-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.yensai-reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================== Responsive */
@media (max-width: 1079px) {
	.yensai-nav-toggle { display: block; }
	.yensai-header__collapse {
		position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
		gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule);
		box-shadow: var(--shadow-lift); padding: 8px 16px 20px; display: none;
	}
	.is-nav-open .yensai-header__collapse { display: flex; }
	.yensai-header-nav { margin: 0; width: 100%; }
	.yensai-menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.yensai-header-nav a { padding: 12px 8px; font-size: 16px; }
	.yensai-header-nav > .yensai-menu > li > a::after { display: none; }
	.yensai-menu .menu-item-has-children { display: flex; flex-wrap: wrap; align-items: center; }
	.yensai-menu .menu-item-has-children > a { flex: 1; }
	.yensai-submenu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; }
	.yensai-submenu-toggle .yensai-chevron { border-color: var(--ink-2); }
	.yensai-submenu-toggle[aria-expanded="true"] .yensai-chevron { transform: rotate(-135deg); }
	.yensai-menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
		border: 0; border-left: 2px solid var(--rule); border-radius: 0; margin: 2px 0 6px 12px;
		padding: 4px 0 4px 8px; width: 100%; display: none;
	}
	.yensai-menu .menu-item-has-children.is-open > .sub-menu { display: block; }
	.yensai-header__cta { width: 100%; flex-wrap: wrap; margin-top: 12px; }
	.yensai-header__cta .yensai-btn { flex: 1 1 100%; }
	.yensai-icon-btn, .yensai-lang-marker { flex: 0 0 auto; }
	.yensai-header-search { position: static; width: 100%; box-shadow: none; border: 0; padding: 12px 0 0; }
}

@media (max-width: 960px) {
	.yensai-hero__inner { grid-template-columns: 1fr; }
	.yensai-hero__media { order: -1; }
	.yensai-services__grid, .yensai-numcards { grid-template-columns: repeat(2, 1fr); }
	.yensai-env__grid, .yensai-steps { grid-template-columns: repeat(2, 1fr); }
	.yensai-footer__cols { grid-template-columns: 1fr 1fr; }
	.yensai-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
	.yensai-stats__grid { grid-template-columns: repeat(2, 1fr); }
	.yensai-features { grid-template-columns: 1fr; }
	.yensai-services__grid, .yensai-numcards, .yensai-env__grid, .yensai-steps, .yensai-reasons { grid-template-columns: 1fr; }
	.yensai-footer__cols { grid-template-columns: 1fr; }
	.yensai-footer__legal-row { flex-direction: column; align-items: flex-start; }
	/* Ticker mobile (from the approved component) */
	.nsx-mk { padding: 10px 0 12px; }
	.nsx-mk__tabs { justify-content: flex-start; margin-bottom: 14px; }
	.nsx-mk__tab { padding: 8px 13px; font-size: 13px; }
	.nsx-card { min-width: 204px; gap: 12px; padding: 10px 13px; margin-right: 12px; }
	.nsx-card__px { font-size: 17px; }
}

@media (max-width: 720px) {
	.yensai-values, .yensai-plans { grid-template-columns: 1fr; }
}

/* =========================================================== Reduced motion */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition-duration: .01ms !important; }
}
