/**
 * Naktahu participant-facing design system — v17 mockup fidelity pass.
 * Colors, layout, and component styles copied directly from
 * naktahu-participant-frontend-prototype-v17.html rather than approximated.
 */

.naktahu-public {
	--bg: #EAF7F3;
	--surface: #FFFFFF;
	--surface-2: #F7F6F3;
	--border: #E6E4DE;
	--border-strong: #B8B6AF;
	--text: #1C1B18;
	--text-secondary: #54524A;
	--text-muted: #78766D;
	--accent: #5B4CF0;
	--accent-soft: #EEECFD;
	--accent-strong: #4536D8;
	--success: #16C168;
	--danger: #D3453B;
	--brand-blue: #0B82B9;
	--brand-teal: #40D0C3;
	font-family: 'Inter', sans-serif;
	color: var(--text);
	max-width: 960px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.55;
	padding: 48px 24px;
	box-sizing: border-box;
}

/* Mint page background behind the whole participant flow, on every
   screen (intro, intake, questions, results). Painted on <body> — via
   the naktahu-assessment-page class added in maybe_add_body_class() —
   rather than on .naktahu-public itself, so it covers the full page
   edge-to-edge no matter how wide the active theme's content column is. */
body.naktahu-assessment-page {
	background: #EAF7F3;
}

/* Shared buttons */
.naktahu-public .np-btn {
	border: 1.5px solid var(--text);
	background: #fff;
	border-radius: 999px;
	padding: 12px 22px;
	font: 600 15px Inter, sans-serif;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	text-decoration: none;
	color: var(--text);
	transition: .18s;
	background-clip: padding-box;
	overflow: hidden;
}
.naktahu-public .np-btn:hover { transform: translateY(-1px); background: var(--surface-2); }
.naktahu-public .np-btn-primary,
.naktahu-public .np-btn-gradient {
	background: linear-gradient(90deg, var(--brand-blue), var(--brand-teal)) !important;
	background-clip: padding-box !important;
	border-color: transparent !important;
	color: #fff !important;
	box-shadow: 0 8px 22px rgba(18, 150, 188, .20);
}
.naktahu-public .np-btn-primary:hover,
.naktahu-public .np-btn-gradient:hover { background: linear-gradient(90deg, #0A76AC, #38BEB2) !important; background-clip: padding-box !important; color: #fff !important; }
.naktahu-public .np-btn:disabled,
.naktahu-public .np-btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; pointer-events: none; }
.naktahu-public .np-btn-primary.is-disabled { background: #D8D5CE !important; background-clip: padding-box !important; opacity: 1 !important; color: #fff !important; }

/* Full-page "something is happening" overlay shown during the handful
   of real page-to-page navigations in the flow (see
   naktahuInitLoadingIndicator() in public.js, which creates and
   appends this element itself — nothing here is server-rendered).
   Fixed + high z-index so it sits above absolutely everything,
   including the confirm step and any other modal already on screen.
   Starts at opacity:0 and fades in via .is-visible (added a couple of
   animation frames after creation — see that function's comment on
   why) rather than appearing instantly, so it reads as a deliberate
   transition rather than a jarring flash. Never needs a "hide" state
   or transition back out — the page it's covering is about to be
   replaced by the next one navigating in, not returned to. */
.np-page-loading-overlay { position: fixed; inset: 0; background: rgba(28, 27, 24, .55); z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .18s ease; }
.np-page-loading-overlay.is-visible { opacity: 1; }
.np-page-loading-spinner { width: 42px; height: 42px; border: 3.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: naktahuSpin .7s linear infinite; }
@keyframes naktahuSpin { to { transform: rotate(360deg); } }

/* Language choice buttons (intro screen, dual-language mode) */
.naktahu-public .np-language-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.naktahu-public .np-language-actions .np-btn { min-width: 160px; }

/* Cards */
.naktahu-public .np-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 34px;
	box-shadow: 0 14px 50px rgba(28, 27, 24, .045);
}

/* Instructions screen — shown after the welcome screen, before the
   question flow, only when the admin has configured content for it.
   See Naktahu_Public::render_instruction_screen().
   Topbar + card are wrapped together at the SAME max-width (matching
   how .np-question-wrap constrains the question screen) so the
   assessment-name label in the topbar lines up with the card's right
   edge instead of stretching to the full .naktahu-public width while
   the card itself is narrower. */
.naktahu-public .np-instruction-wrap { max-width: 760px; margin: 0 auto; }
.naktahu-public .np-instruction-card { max-width: none; margin: 0; }
.naktahu-public .np-instruction-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-blue); margin-bottom: 8px; }
.naktahu-public .np-instruction-card .np-section-head { margin-bottom: 18px; }
.naktahu-public .np-instruction-body { font-size: 15px; line-height: 1.65; color: var(--text-secondary); }
.naktahu-public .np-instruction-body p { margin: 0 0 14px; }
.naktahu-public .np-instruction-body p:last-child { margin-bottom: 0; }
.naktahu-public .np-instruction-body strong,
.naktahu-public .np-instruction-body b { color: var(--text); }
.naktahu-public .np-instruction-body ul,
.naktahu-public .np-instruction-body ol { margin: 0 0 14px; padding-left: 22px; }
.naktahu-public .np-instruction-body li { margin-bottom: 6px; }
.naktahu-public .np-instruction-body h1,
.naktahu-public .np-instruction-body h2,
.naktahu-public .np-instruction-body h3 { color: var(--text); font-weight: 700; margin: 20px 0 10px; }
.naktahu-public .np-instruction-body h1:first-child,
.naktahu-public .np-instruction-body h2:first-child,
.naktahu-public .np-instruction-body h3:first-child { margin-top: 0; }
.naktahu-public .np-instruction-body a { color: var(--brand-blue); }

/* Answer Scale + Important Notes — auto-generated/optional blocks
   between the free-text instruction body and the Continue button. */
.naktahu-public .np-instruction-section { margin-top: 26px; }
.naktahu-public .np-instruction-section h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.naktahu-public .np-scale-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.naktahu-public .np-scale-item { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px 8px; text-align: center; min-height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.naktahu-public .np-scale-num { font-size: 15px; font-weight: 700; color: var(--text); }
.naktahu-public .np-scale-text { font-size: 12px; line-height: 1.25; font-weight: 700; color: var(--text); }
.naktahu-public .np-note-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.naktahu-public .np-note-box ul,
.naktahu-public .np-note-box ol { margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.naktahu-public .np-note-box p { margin: 0 0 10px; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.naktahu-public .np-note-box p:last-child { margin-bottom: 0; }
.naktahu-public .np-instruction-card .np-form-actions { margin-top: 26px; }

@media (max-width: 760px) {
	.naktahu-public .np-scale-grid { grid-template-columns: 1fr; }
	.naktahu-public .np-scale-item { min-height: auto; flex-direction: row; justify-content: flex-start; gap: 14px; text-align: left; padding: 11px 13px; }
}

/* Intro / welcome screen */
.naktahu-public .np-welcome-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 18px 60px rgba(28, 27, 24, .06);
	display: flex;
	align-items: stretch;
}
.naktahu-public .np-welcome-card.no-image { max-width: 600px; margin: 0 auto; }
.naktahu-public .np-welcome-copy { flex: 1.08 1 0%; padding: 48px 56px; }
.naktahu-public .np-client-logo { display: block; width: min(330px, 78%); height: auto; margin: 0 0 28px; }
.naktahu-public .np-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--text) !important; font-weight: 700; margin: 0 0 22px; }
.naktahu-public .np-welcome-copy h1 { font-size: 44px; line-height: 1.08; margin: 0 0 18px; font-weight: 700; }
.naktahu-public .np-lead { font-size: 18px; color: var(--text-secondary); max-width: 580px; margin: 0 0 8px; }
.naktahu-public .np-welcome-art { flex: .92 1 0%; align-self: stretch; min-height: 560px; background-size: cover; background-position: center; background-image: linear-gradient(180deg, rgba(0,112,177,.05), rgba(36,202,190,.06)); }

.naktahu-public .np-meta-box { display: inline-flex; align-items: stretch; border: 1.5px solid var(--border-strong); border-radius: 14px; background: #fff; margin: 0 0 26px; overflow: hidden; }
.naktahu-public .np-meta-item { font-size: 14px; color: #6F6D66; display: flex; gap: 5px; align-items: center; padding: 13px 18px; white-space: nowrap; }
.naktahu-public .np-meta-text { display: inline-flex; align-items: center; height: 20px; line-height: 1; }
.naktahu-public .np-meta-divider { width: 1.5px; align-self: stretch; background: var(--border-strong); flex: none; }
.naktahu-public .np-meta-icon { width: 20px !important; height: 20px !important; min-width: 20px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--text-muted); overflow: visible; box-sizing: content-box; line-height: 0; }
.naktahu-public .np-meta-icon svg { display: block; width: 20px !important; height: 20px !important; overflow: visible; stroke: currentColor; flex-shrink: 0; }

.naktahu-public .np-lang-switch { margin-bottom: 16px; font-size: 13px; }
.naktahu-public .np-lang-switch a { color: var(--text-muted); text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.naktahu-public .np-lang-switch a.active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }

@media (max-width: 760px) {
	.naktahu-public { padding: 25px 14px; }
	.naktahu-public .np-welcome-card { flex-direction: column; }
	.naktahu-public .np-welcome-copy { padding: 34px 26px; }
	.naktahu-public .np-client-logo { width: min(290px, 85%); margin-bottom: 24px; }
	.naktahu-public .np-welcome-copy h1 { font-size: 34px; }
	.naktahu-public .np-welcome-art { min-height: 340px; }
	.naktahu-public .np-meta-box { display: flex; width: 100%; margin: 0 0 22px; }
	.naktahu-public .np-meta-item { flex: 1; justify-content: center; padding: 12px 10px; font-size: 13px; }
	.naktahu-public .np-language-actions { display: grid; grid-template-columns: 1fr; }
	.naktahu-public .np-language-actions .np-btn { width: 100%; }
	.naktahu-public .np-answer { width: 100%; }
	.naktahu-public .np-progress-top,
	.naktahu-public .np-progress-track { width: 85%; }
	.naktahu-public .np-topbar-label { max-width: 170px; }
}

.naktahu-public *, .naktahu-public *::before, .naktahu-public *::after { box-sizing: border-box; }

/* Demographic intake form */
.naktahu-public .np-section-head { margin-bottom: 20px; }
.naktahu-public .np-section-head h2 { font: 700 28px/1.3 Inter, sans-serif; color: var(--text) !important; margin: 0 0 7px !important; }
.naktahu-public .np-form-grid { display: grid !important; grid-template-columns: 1fr 1fr; row-gap: 16px; column-gap: 24px; align-items: start; }
.naktahu-public .np-field { display: flex !important; flex-direction: column; gap: 7px; margin: 0 !important; padding: 0 !important; width: 100% !important; min-width: 0; }
.naktahu-public .np-field.full { grid-column: 1 / -1; }
.naktahu-public .np-field label { font-size: 13px; font-weight: 600; margin: 0 !important; padding: 0 !important; line-height: 1.3; }
.naktahu-public .np-req { color: var(--danger); }
.naktahu-public input[type=text],
.naktahu-public input[type=email],
.naktahu-public input[type=number],
.naktahu-public input[type=date],
.naktahu-public select,
.naktahu-public textarea {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	/* Explicit height (not just padding+line-height) for the same reason
	   as .naktahu-mask-wrap and the select rule below: without it, a
	   theme's own input reset can win by specificity and quietly shrink
	   these a few px shorter than the mask-wrap/select fields next to
	   them in the same grid row — exactly what happened to Full name/
	   Email before this line was added. textarea is excluded from the
	   fixed height right below, since it needs to grow to several rows. */
	height: 48px !important;
	padding: 13px 14px !important;
	margin: 0 !important;
	border: 1.5px solid var(--border-strong) !important;
	border-radius: 999px !important;
	background: #fff;
	font: 15px Inter, sans-serif !important;
	color: var(--text);
	line-height: 1.3 !important;
	vertical-align: middle;
}
/* Selects get their own native height/padding/arrow by default, which can
   render a few px off from a plain text input even with identical CSS —
   removing that native chrome and drawing our own arrow guarantees every
   field in the grid lines up pixel-for-pixel. */
.naktahu-public select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	/* Text inputs center their single line of text fine using top/bottom
	   padding, but a <select> with appearance:none doesn't reliably do
	   the same in every browser (Chrome on Windows has been seen
	   clipping the top half of the text instead of centering it) — so
	   selects get an explicit height with line-height doing the
	   centering instead of padding. 48px/45px here matches the ~48.5px
	   total height the padding-based text inputs above render at
	   (13px padding + 19.5px line-height + 3px border), so the grid
	   still lines up pixel-for-pixel. !important throughout this rule:
	   without it, a theme's own "select { height/padding/line-height:
	   ... }" rule (very common — form-control resets are one of the
	   most frequently themed elements) can win by specificity alone and
	   silently re-introduce exactly the several-pixels-taller mismatch
	   this whole rule exists to prevent. */
	height: 48px !important;
	padding: 0 38px 0 14px !important;
	line-height: 45px !important;
	border: 1.5px solid var(--border-strong) !important;
	border-radius: 999px !important;
	font: 15px Inter, sans-serif !important;
	background-color: #fff;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2354524A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 8 10 13 15 8'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px 16px;
}
.naktahu-public textarea { height: auto !important; min-height: 100px !important; border-radius: 16px !important; }
.naktahu-public input:focus,
.naktahu-public select:focus,
.naktahu-public textarea:focus,
.naktahu-public .naktahu-mask-wrap:focus-within {
	outline: none !important;
	border-color: var(--accent) !important;
	box-shadow: 0 0 0 3px var(--accent-soft) !important;
}

/* Red highlight for whichever field a server-side validation error (see
   the error popup / render_error_popup()) is actually about — e.g. the
   Email field on an "A valid email is required" error. Applied/cleared
   by naktahuHighlightErrorField() in public.js. !important for the same
   reason as every other rule in this form: without it, a theme's own
   input border styling can win by specificity and the red never shows
   up at all. Higher specificity than the plain :focus rule above so the
   red stays visible even while the participant is actively focused in
   the field correcting it — it only clears on their first edit (input/
   change event), not merely on focus. */
.naktahu-public input.np-field-invalid,
.naktahu-public select.np-field-invalid,
.naktahu-public .naktahu-mask-wrap.np-field-invalid,
.naktahu-public input.np-field-invalid:focus,
.naktahu-public select.np-field-invalid:focus,
.naktahu-public .naktahu-mask-wrap.np-field-invalid:focus-within {
	border-color: var(--danger) !important;
	box-shadow: 0 0 0 3px rgba(211, 69, 59, .16) !important;
}

/* Masked-field ghost overlay — see naktahuUpdateMaskGhost() in
   naktahu-mask.js for the full rationale. Both the real input and the
   ghost layer are pinned to fill this wrapper exactly (rather than
   each sizing itself organically via its own padding/line-height),
   since letting them each contribute their own box model on top of
   the wrapper's is what made this render taller than a normal input —
   fixing the wrapper's height explicitly and having both children
   just fill it removes that stacking entirely. */
.naktahu-public .naktahu-mask-wrap { position: relative; display: block; margin: 0 !important; padding: 0 !important; border: 1.5px solid var(--border-strong) !important; border-radius: 999px !important; background: #fff; height: 48px !important; box-sizing: border-box !important; }
.naktahu-public .naktahu-mask-wrap input[type=text] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0 !important; padding: 0 14px !important; line-height: 48px; background: transparent !important; border: none !important; box-shadow: none !important; box-sizing: border-box !important; }
.naktahu-public .naktahu-mask-ghost { position: absolute; inset: 0; z-index: 0; padding: 0 14px; font: 15px Inter, sans-serif; line-height: 48px; box-sizing: border-box; pointer-events: none; white-space: pre; overflow: hidden; border-radius: 999px; }
.naktahu-public .naktahu-mask-ghost-typed { color: transparent; }
.naktahu-public .naktahu-mask-ghost-remaining { color: var(--text-muted); }

.naktahu-public .np-form-actions { display: flex; justify-content: flex-end; margin-top: 28px; }

/* Question flow */
.naktahu-public .np-question-wrap { max-width: 660px; margin: auto; }
.naktahu-public .np-progress-top { width: 68%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); font-size: 13px; }
.naktahu-public .np-progress-track { width: 68%; height: 14px; background: #DDEFE9; border-radius: 999px; overflow: hidden; margin: 0 auto 34px; box-shadow: inset 0 1px 2px rgba(0, 85, 105, .08); }
.naktahu-public .np-progress-fill { height: 100%; background: #2FC36D; border-radius: 999px; transition: width .35s ease; box-shadow: 0 2px 7px rgba(47, 195, 109, .20); }
.naktahu-public .np-question-step { display: none; }
.naktahu-public .np-question-step.active { display: block; animation: npQuestionIn .32s ease both; }
.naktahu-public .np-question-step.active.np-question-out { display: block; animation: npQuestionOut .22s ease both; }
@keyframes npQuestionIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes npQuestionOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-20px); } }
@media (prefers-reduced-motion: reduce) {
	.naktahu-public .np-question-step.active,
	.naktahu-public .np-question-step.active.np-question-out { animation: none; }
}
.naktahu-public .np-q-title { font-size: 26px; font-weight: 700 !important; line-height: 1.35; margin: 0 0 26px; min-height: calc(26px * 1.35 * 2); }

.naktahu-public .np-answers { display: grid; gap: 11px; justify-items: start; }
.naktahu-public .np-answer {
	box-sizing: border-box;
	min-height: 58px;
	padding: 13px 17px 13px 16px;
	border: 2.5px solid var(--border-strong);
	border-radius: 999px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	transition: .16s;
	background: #fff;
	font-size: 16px;
	position: relative;
	width: 50%;
	text-align: left;
}
.naktahu-public .np-answer:hover { border-color: #32CFC4; background: #E8FAF8; }
.naktahu-public .np-answer.selected { border-color: #21BEB8; background: #DDF7F4; color: var(--text); font-weight: 600; }
.naktahu-public .np-answer input { position: absolute; opacity: 0; pointer-events: none; }
.naktahu-public .np-answer > span:first-child { flex: 1; text-align: left; }
/* The actual selection indicator — a plain circle that's always visible,
   changing color when selected. NOT a checkmark that appears only after
   selecting; that was an earlier draft I mistakenly built from. */
.naktahu-public .np-answer::before {
	content: "";
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #D1D1CD;
	flex: none;
}
.naktahu-public .np-answer.selected::before { background: #24C8BE; }
.naktahu-public .np-answer .np-tick { display: none !important; }

.naktahu-public .np-q-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; }
.naktahu-public .np-q-actions .np-btn-primary:not(.is-disabled) { background: #2E2C27 !important; }
.naktahu-public .np-q-actions .np-btn-primary:not(.is-disabled):hover { background: #1C1B18 !important; }
.naktahu-public .np-q-actions .np-btn-primary { box-shadow: none !important; }
.naktahu-public .np-error { font-size: 12px; color: var(--danger); margin-top: 10px; }
.naktahu-public .np-error[data-role="step-error"] { display: none !important; }

/* Error popup (server-side "form" errors — invalid input, duplicate
   submission, etc.) — see render_error_popup() in class-naktahu-public.php. */
.naktahu-public .np-error-modal-overlay { position: fixed; inset: 0; background: rgba(28, 27, 24, .45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 999; animation: npModalFadeIn .18s ease both; }
.naktahu-public .np-error-modal { background: #fff; border-radius: 20px; padding: 30px 28px 26px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); animation: npModalPopIn .22s ease both; }
.naktahu-public .np-error-modal-icon { width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%; background: #FBEAE9; color: var(--danger); display: flex; align-items: center; justify-content: center; }
.naktahu-public .np-error-modal-icon svg { width: 24px; height: 24px; }
.naktahu-public .np-error-modal-message { font-size: 15px; color: var(--text); line-height: 1.5; margin: 0 0 22px; }
.naktahu-public .np-error-modal .np-btn-primary { min-width: 120px; }
/* The "Are you sure to submit?" confirm step (render_confirm_step() in
   class-naktahu-public.php) — its own full screen within the card, not
   a popup. Reuses .np-question-step for show/hide + slide animation
   (see that class further down) — this only adds this step's own
   content styling (centered title + a stacked button pair), since
   .np-question-step itself has no layout/spacing of its own beyond
   display toggling. */
.naktahu-public .np-confirm-step { text-align: center; padding: 20px 20px; }
.naktahu-public .np-confirm-step-title { font-size: 19px; font-weight: 700; color: var(--text); line-height: 1.4; margin: 0 0 16px; }
/* Stacked full-width rather than squeezed side-by-side, so "Submit and
   View Result" can stay at the same size as the real Submit button
   (.np-q-actions .np-btn-primary — same font/padding, but its own
   gradient .np-btn-primary fill rather than that button's dark solid
   one) instead of shrinking to fit two into one row. */
.naktahu-public .np-confirm-step-actions { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 0 auto; }
.naktahu-public .np-confirm-step-actions .np-btn { width: 100%; white-space: nowrap; }
/* "Back" — plain clickable text under the real button, not a second
   button of its own (see render_confirm_step()'s docblock for why:
   two equal-weight buttons here would read as a real choice between
   two paths forward, when this is really just "yes, go" vs. "wait,
   let me check"). Still a real <button> for keyboard/click semantics,
   just visually styled as a text link. */
.naktahu-public .np-confirm-modal-back-link { appearance: none; -webkit-appearance: none; -moz-appearance: none; background: none; border: none; box-shadow: none; border-radius: 0; outline: none; padding: 4px; margin: 0 auto; font: 600 14px Inter, sans-serif; color: var(--text-muted); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color .15s; }
.naktahu-public .np-confirm-modal-back-link:hover,
.naktahu-public .np-confirm-modal-back-link:focus-visible { text-decoration-color: currentColor; }
@keyframes npModalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes npModalPopIn { from { opacity: 0; transform: scale(.94) translateY(6px); } to { opacity: 1; transform: none; } }

/* Persistent topbar - naktahu logo + assessment name, every screen except intro */
.naktahu-public .np-topbar { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 4px; margin-bottom: 18px; gap: 16px; }
.naktahu-public .np-topbar-logo { height: 28px; width: auto; max-width: 130px; object-fit: contain; flex-shrink: 0; }
.naktahu-public .np-topbar-label { flex: 0 1 auto; max-width: 300px; min-width: 0; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; color: var(--text-muted); text-align: right; white-space: normal; line-height: 1.5; }

/* Footer — "Empowered by naktahu" on every screen */
.naktahu-public .np-app-footer { margin: 18px auto 6px; display: flex; justify-content: center; }
.naktahu-public .np-powered { display: flex; align-items: center; gap: 8px; color: #7A7A74; font-size: 13px; }
.naktahu-public .np-powered-logo { height: 22px; width: auto; }
.naktahu-public .np-powered-link { display: inline-flex; align-items: center; }

/* Results / report */
.naktahu-public .np-result-card { background: #fff; border: 9px solid #fff; border-radius: 18px; box-shadow: 0 24px 80px rgba(28, 27, 24, .13); overflow: hidden; max-width: 700px; margin: 0 auto; }
.naktahu-public .np-result-brand { text-align: center; padding: 22px 20px 4px; }
.naktahu-public .np-result-logo { max-height: 44px; max-width: 220px; margin: 0 auto 14px; display: block; }
.naktahu-public .np-result-hero { background: linear-gradient(135deg, #0B82B9 0%, #078DBA 48%, #40D0C3 100%); border-radius: 16px; margin: 8px 8px 4px; padding: 20px 22px 18px; color: #fff; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.naktahu-public .np-rh-leftgroup { flex: 1; min-width: 0; }
.naktahu-public .np-rh-top-row { display: flex; align-items: flex-start; gap: 20px; }
.naktahu-public .np-rh-left { flex: 1; min-width: 0; }
.naktahu-public .np-rh-name { font-size: 22px; font-weight: 600; margin: 0 0 6px; text-shadow: 0 1px 2px rgba(0, 48, 76, .2); }
.naktahu-public .np-rh-meta { display: flex; flex-direction: column; gap: 2px; }
.naktahu-public .np-rh-line { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; line-height: 1.5; text-shadow: 0 1px 2px rgba(0, 48, 76, .18); }
.naktahu-public .np-rh-line svg { flex-shrink: 0; color: rgba(255, 255, 255, .65); width: 14px; height: 14px; }
.naktahu-public .np-rh-hr { border-top: 2.5px solid rgba(255, 255, 255, .85); margin: 10px -20px 8px 0; }
.naktahu-public .np-rh-topline { font-size: 13px; line-height: 1.4; }
.naktahu-public .np-rh-label { color: rgba(255, 255, 255, .65); margin-right: 5px; }
.naktahu-public .np-rh-value { font-weight: 500; }
.naktahu-public .np-rh-score-block { flex: none; border: 2.5px solid rgba(255, 255, 255, .9); border-radius: 10px; padding: 14px 20px 0; text-align: center; overflow: hidden; min-width: 130px; }
.naktahu-public .np-rh-gauge { flex: none; width: 150px; display: flex; align-items: center; justify-content: center; align-self: flex-start; background: #fff; border-radius: 100px 100px 15px 15px; padding: 10px 12px 6px; box-shadow: 0 4px 14px rgba(0, 48, 76, .12); }
.naktahu-public .np-gauge-svg { width: 100%; height: auto; display: block; }
.naktahu-public .np-rh-score { font-size: 60px; font-weight: 700; line-height: 1; }
.naktahu-public .np-rh-outof { font-size: 12.5px; color: rgba(255, 255, 255, .7); margin: 4px 0 0; }
.naktahu-public .np-rh-badge { margin: 12px -20px 0; display: block; width: calc(100% + 40px); border-radius: 0; color: #fff; background: var(--success); font-size: 15px; font-weight: 500; padding: 10px 13px; text-align: center; }

.naktahu-public .np-result-body { padding: 10px 22px 22px; }
.naktahu-public .np-section-label { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin: 0 0 10px; }
.naktahu-public .np-interpretation-box { background: #fff; border: 1.5px solid var(--text); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.naktahu-public .np-interpretation-box p { font-size: 13.5px; color: var(--text); line-height: 1.5; margin: 0; }
.naktahu-public .np-interpretation-box p.np-section-label { margin: 0 0 10px; }

.naktahu-public .np-dimension-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.naktahu-public .np-dimension-card { background: var(--surface-2); border-radius: 10px; padding: 14px; }
.naktahu-public .np-dc-top-row { display: flex; align-items: stretch; gap: 0; }
.naktahu-public .np-dc-inner { flex: 1; min-width: 0; background: #fff; border-radius: 10px 0 0 10px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.naktahu-public .np-dc-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.naktahu-public .np-dc-icon svg { width: 18px; height: 18px; }
.naktahu-public .np-dc-title-row { min-width: 0; }
.naktahu-public .np-dc-name { font-size: 12px; color: var(--text-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.3; }
.naktahu-public .np-dc-interpretation { font-size: 13px; color: var(--text-secondary); margin: 10px 2px 0; line-height: 1.5; }

/* Per-category score box — same shape/idea as the hero's Overall score
   block (np-rh-score-block/np-rh-badge): a bordered box (no white fill)
   with a big number + "out of X", then a full-width colored pill using
   that category's own matched band color (falls back to the category's
   accent color if no band color has been set — see render_results() in
   class-naktahu-public.php). Text stays dark here (unlike the hero
   version's white text) since this box sits on a light card, not a
   dark gradient. */
.naktahu-public .np-dc-scorebox { flex: 1; min-width: 0; background: transparent; border: 2.5px solid #fff; border-radius: 0 10px 10px 0; padding: 12px 12px 0; text-align: center; overflow: hidden; display: flex; flex-direction: column; }
.naktahu-public .np-dc-scorebox-num { font-size: 22px; font-weight: 700; line-height: 1; color: var(--text); }
.naktahu-public .np-dc-scorebox-outof { font-size: 11.5px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.naktahu-public .np-dc-scorebox-badge { margin: 8px -12px 0; display: block; color: #fff; font-size: 12.5px; font-weight: 600; padding: 8px 10px; text-align: center; margin-top: auto; }

.naktahu-public .np-result-actions { display: flex; justify-content: center; gap: 10px; border-top: 1px solid var(--border); padding: 18px; flex-wrap: wrap; }

@media (max-width: 760px) {
	.naktahu-public .np-dimension-grid { grid-template-columns: 1fr; }
	.naktahu-public .np-dc-top-row { flex-direction: column; }
	.naktahu-public .np-dc-inner { flex-direction: row; align-items: center; border-radius: 10px 10px 0 0; }
	.naktahu-public .np-dc-scorebox { border-radius: 0 0 10px 10px; }
	.naktahu-public .np-result-hero { flex-direction: column; }

	/* Everything from here down had to move to THIS media block —
	   .naktahu-public public.css has TWO separate max-width:760px
	   blocks (this is the second); the first one, much earlier in the
	   file, sits BEFORE several of the base (non-media) rules these
	   properties also appear in (.np-answer's width, .np-progress-top/
	   -track's width, .np-card's padding, .np-rh-* below). Since a
	   mobile rule and its same-selector base rule tie in specificity, a
	   later same-specificity rule always wins regardless of which one
	   is wrapped in a matching @media block — so those overrides were
	   silently losing to the base rule every time, on every screen
	   size, the whole time they lived up there. Nothing wrong with the
	   values themselves, purely a source-order problem, fixed by moving
	   them below the rules they need to beat. */
	.naktahu-public .np-answer { width: 100% !important; }
	.naktahu-public .np-progress-top,
	.naktahu-public .np-progress-track { width: 94% !important; }
	.naktahu-public .np-card { padding: 22px 16px !important; }

	/* Results hero: the gauge moves from sitting next to the name
	   (where it can visually collide with a long name wrapping onto a
	   second line — see np-rh-top-row's flex-wrap just below) down to
	   its own row between "Submitted" and the score box. Pure visual
	   reorder, no HTML change: display:contents on the two ancestor
	   wrappers dissolves them as flex boxes on mobile only, promoting
	   their children (name block, divider, submitted line, gauge,
	   score block) to direct items of .np-result-hero itself, which
	   the explicit order values below then arrange — desktop's actual
	   DOM order, and its own layout, stay completely untouched either
	   way, since none of this applies outside this one media query. */
	.naktahu-public .np-rh-leftgroup { display: contents; }
	.naktahu-public .np-rh-top-row { display: contents; flex-wrap: wrap; }
	/* Was 20px on .np-result-hero itself (see the base rule) — fine
	   when that container only ever had 2 direct children (leftgroup +
	   score-block) to put ONE gap between, but display:contents above
	   just turned 5 formerly-nested elements into 5 direct siblings of
	   it, so that same 20px was landing FOUR times over instead of
	   once, stacking on top of each element's own margin below and
	   producing exactly the oversized gaps between every section seen
	   on an actual phone. Zeroed here so spacing between each piece is
	   controlled by nothing but that piece's own margin, precisely
	   once each. */
	.naktahu-public .np-result-hero { gap: 0 !important; }
	.naktahu-public .np-rh-left { order: 1; margin-bottom: 14px; }
	/* Was "margin: 10px -20px 8px 0" — the -20px right bleed made the
	   divider extend past .np-rh-leftgroup's own edge to visually
	   span the full hero width, back when leftgroup/score-block were
	   still side-by-side columns with the divider confined to
	   leftgroup's (narrower) column. With everything in one stacked
	   column now, that same -20px instead over-extended the line past
	   .np-result-hero's own padding, an artifact of a hack built for
	   a layout this element material no longer sits inside. */
	.naktahu-public .np-rh-hr { order: 2; margin: 0 0 12px !important; align-self: stretch !important; }
	.naktahu-public .np-rh-topline { order: 3; margin-bottom: 0; }
	.naktahu-public .np-rh-gauge { order: 4; align-self: center; margin: 14px 0 16px !important; }
	/* Was a compact, content-sized box (min-width:130px, no explicit
	   width) — correct for sitting narrow next to the name column on
	   desktop, but that's exactly why it stayed small after stacking
	   full-width on mobile instead of filling the space the way the
	   design called for. */
	.naktahu-public .np-rh-score-block { order: 5; align-self: stretch !important; width: 100%; margin-top: 0 !important; }
}

/* "Send via email" popup */
.naktahu-public .np-modal-overlay { position: fixed; inset: 0; background: rgba(28, 27, 24, .4); display: none; z-index: 100; }
.naktahu-public .np-modal-card { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 400px; max-width: 90vw; background: var(--surface); border-radius: 16px; display: none; z-index: 101; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); overflow: hidden; }
.naktahu-public .np-modal-head { padding: 24px 24px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.naktahu-public .np-modal-logo { height: 20px; display: block; margin-bottom: 12px; }
.naktahu-public .np-modal-head h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; }
.naktahu-public .np-modal-subtitle { margin: 0; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; line-height: 1.4; }
.naktahu-public .np-modal-close { background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--text-muted); padding: 0; flex: none; margin-top: 2px; }
.naktahu-public .np-modal-close:hover { color: var(--text); }
.naktahu-public .np-modal-divider { height: 1px; background: var(--border); margin: 0 24px; }
.naktahu-public .np-modal-body { padding: 0 24px 0; }
.naktahu-public .np-modal-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0 0 14px; }
.naktahu-public .np-modal-body label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.naktahu-public .np-modal-body input[type="email"] { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border-strong); border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.naktahu-public .np-modal-foot { padding: 10px 24px 24px; display: flex; justify-content: flex-end; gap: 8px; }
.naktahu-public [data-role="email-form-error"] { color: var(--danger); font-size: 12.5px; margin: 10px 0 0; }

/* The "email sent" confirmation swapped in over the form itself (see
   naktahuInitEmailResultsForm() in public.js) — same .np-modal-body
   class as the form for consistent padding, just centered content
   instead of a left-aligned form. */
.naktahu-public .np-email-success { padding: 8px 24px 24px; text-align: center; }
.naktahu-public .np-email-success-icon { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; background: #E3F5EE; color: #0F6E56; display: flex; align-items: center; justify-content: center; }
.naktahu-public .np-email-success p { font-size: 14px; color: var(--text); line-height: 1.5; margin: 0 0 20px; }

/* "Download PDF" is window.print() — this is what actually makes that
   produce something usable. Two real problems otherwise: (1) browsers
   don't print background-colors/gradients by default, which is why the
   hero box and category cards were rendering as plain white/grey; and
   (2) ANYTHING else on the page — theme header/footer, a floating chat
   widget, the admin bar — prints right along with it, which is what
   that stray icon bleeding into the results was. The standard fix for
   both: hide literally everything except .naktahu-public, and force
   color printing on for what remains. */
@media print {
	body * { visibility: hidden; }
	.naktahu-public, .naktahu-public * { visibility: visible; }
	.naktahu-public {
		position: absolute; left: 0; top: 0; width: 100%; max-width: none; margin: 0; padding: 0;
		-webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact;
	}
	.naktahu-public *{ -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact; }
	.naktahu-public .np-result-actions,
	.naktahu-public .np-modal-overlay,
	.naktahu-public .np-modal-card { display: none !important; }
}
