/* =============================================================
   PATIENT PORTAL — HORMONA VIDA
   -------------------------------------------------------------
   Palette and typography from "Estilo Base": Cormorant Garamond for
   editorial headlines and Montserrat for everything else.

   The portal renders with its own stylesheet, independent of the
   theme, so a change to the public site can't alter the private
   area — and so the plugin works the same when copied to another
   project, with another theme or none at all.
   ============================================================= */

:root {
	/* Brand */
	--hv-forest-sage: #4a6b58;
	--hv-muted-sage:  #7a9e8a;
	--hv-warm-ochre:  #b8924a;
	--hv-petal-rose:  #d5a89c;
	--hv-driftwood:   #c4b5a5;
	--hv-cream-linen: #f5ede4;

	/* Derived */
	--hv-forest-deep: #3e5d48;
	--hv-forest-ink:  #34503f;
	--hv-page:        #faf7f2;
	--hv-surface:     #ffffff;
	--hv-hairline:    #ece5db;
	--hv-hairline-2:  #e3dbd0;

	/* "Explore" card backgrounds */
	--hv-tint-stone:  #ede8e2;
	--hv-tint-sage:   #dde4dd;
	--hv-tint-rose:   #f7e8e5;
	--hv-tint-cream:  #f2e8d8;
	--hv-tint-blush:  #f3e9e1;

	/* Ink */
	--hv-ink:       #1a1a1a;
	--hv-ink-soft:  #5f5d5a;
	--hv-ink-faint: #8c8781;

	--hv-font-sans:  'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	--hv-font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

	--hv-r-lg: 18px;
	--hv-r-md: 16px;
	--hv-r-sm: 12px;

	--hv-shadow:    0 1px 2px rgba(26, 26, 26, .03), 0 10px 30px rgba(26, 26, 26, .045);
	--hv-shadow-up: 0 2px 6px rgba(26, 26, 26, .05), 0 18px 40px rgba(26, 26, 26, .08);

	--hv-gutter: clamp(1rem, 3vw, 2rem);
	--hv-max:    1460px;
}

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

body.hv-portal {
	margin: 0;
	padding: 0 0 5rem;
	font-family: var(--hv-font-sans);
	font-size: 15px;
	line-height: 1.6;
	color: var(--hv-ink);
	background: var(--hv-page);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; }

a { color: var(--hv-forest-sage); text-decoration: none; }
a:hover { color: var(--hv-forest-ink); }

button { font: inherit; color: inherit; }

:where(a, button, input, select, [tabindex]):focus-visible {
	outline: 2px solid var(--hv-forest-sage);
	outline-offset: 3px;
	border-radius: 6px;
}

/* Icons: inherit the text color and scale with their box. */
.hv-i { width: 22px; height: 22px; display: block; flex: 0 0 auto; }
.hv-i--sm { width: 17px; height: 17px; }
.hv-i--xs { width: 14px; height: 14px; }


/* =============================================================
   TYPOGRAPHY
   ============================================================= */

.hv-display {
	margin: 0;
	font-family: var(--hv-font-serif);
	font-weight: 400;
	font-size: clamp(2.35rem, 4.3vw, 3.85rem);
	line-height: 1.04;
	letter-spacing: -.012em;
	color: var(--hv-ink);
}

.hv-display--md   { font-size: clamp(1.85rem, 3vw, 2.75rem); }
.hv-display--side { font-size: clamp(1.95rem, 2.6vw, 2.85rem); line-height: 1.12; }

.hv-eyebrow {
	margin: 0 0 .85rem;
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--hv-forest-sage);
}

.hv-lede {
	margin: 1.1rem 0 0;
	max-width: 46ch;
	font-size: .95rem;
	line-height: 1.62;
	color: var(--hv-ink-soft);
}

.hv-lede--narrow { max-width: 42ch; }


/* =============================================================
   STRUCTURE
   ============================================================= */

.hv-wrap {
	max-width: var(--hv-max);
	margin: 0 auto;
	padding: 0 var(--hv-gutter);
}

.hv-section { margin-top: clamp(3rem, 6vw, 4.6rem); }

.hv-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.hv-textlink {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--hv-ink);
	white-space: nowrap;
}
.hv-textlink:hover { color: var(--hv-forest-sage); }


/* =============================================================
   NAVIGATION
   ============================================================= */

.hv-nav {
	position: sticky;
	top: 0;
	z-index: 60;
	padding: 1.15rem var(--hv-gutter) .6rem;
	background: linear-gradient(var(--hv-page) 72%, rgba(250, 247, 242, 0));
}

.hv-nav__in {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	max-width: var(--hv-max);
	margin: 0 auto;
	padding: .8rem 1.1rem .8rem 1.5rem;
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
	border-radius: var(--hv-r-lg);
	box-shadow: var(--hv-shadow);
}

.hv-nav__logo { display: flex; align-items: center; margin-right: auto; }
.hv-nav__logo img { display: block; }

.hv-nav__links { display: flex; align-items: center; gap: 1.6rem; }

.hv-nav__links a {
	position: relative;
	font-size: .84rem;
	font-weight: 500;
	color: var(--hv-ink);
	padding: .25rem 0;
}
.hv-nav__links a:hover { color: var(--hv-forest-sage); }

.hv-nav__links a.is-on { font-weight: 600; }
.hv-nav__links a.is-on::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -.3rem;
	height: 2px;
	border-radius: 2px;
	background: var(--hv-forest-sage);
}

.hv-nav__search {
	display: flex;
	align-items: center;
	gap: .55rem;
	width: clamp(180px, 22vw, 260px);
	padding: .6rem 1rem;
	border: 1px solid var(--hv-hairline-2);
	border-radius: 999px;
	color: var(--hv-ink-faint);
	background: var(--hv-surface);
	transition: border-color .15s, box-shadow .15s;
}
.hv-nav__search:focus-within {
	border-color: var(--hv-muted-sage);
	box-shadow: 0 0 0 3px rgba(122, 158, 138, .16);
}
.hv-nav__search input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: .82rem;
	color: var(--hv-ink);
}
.hv-nav__search input::placeholder { color: var(--hv-ink-faint); }
.hv-nav__search input:focus { outline: none; }

/* The account pill: a <details>, no JavaScript. */
.hv-me { position: relative; }
.hv-me summary {
	list-style: none;
	cursor: pointer;
	display: block;
}
.hv-me summary::-webkit-details-marker { display: none; }

.hv-me__avatar {
	display: grid;
	place-items: center;
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--hv-petal-rose);
	color: #fff;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .02em;
}

.hv-me__menu {
	position: absolute;
	right: 0;
	top: calc(100% + .7rem);
	width: 235px;
	padding: 1rem 1.1rem;
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
	border-radius: var(--hv-r-md);
	box-shadow: var(--hv-shadow-up);
}
.hv-me__name { margin: 0; font-weight: 600; font-size: .88rem; }
.hv-me__mail { margin: .15rem 0 0; font-size: .76rem; color: var(--hv-ink-faint); word-break: break-all; }
.hv-me__menu hr { margin: .85rem 0; border: 0; border-top: 1px solid var(--hv-hairline); }

.hv-me__item {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .45rem 0;
	font-size: .84rem;
	color: var(--hv-ink);
}
.hv-me__item:hover { color: var(--hv-forest-sage); }


/* =============================================================
   PORTADA: HERO
   ============================================================= */

.hv-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
	margin-top: 1rem;
	background: var(--hv-tint-blush);
	border-radius: var(--hv-r-lg);
	overflow: hidden;
}

.hv-hero__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(2rem, 4vw, 3.9rem);
}

.hv-hero__text .hv-display { max-width: 12ch; }
.hv-hero__text .hv-btn { margin-top: 2rem; align-self: flex-start; }

.hv-hero__art {
	min-height: clamp(280px, 34vw, 430px);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}


/* =============================================================
   PORTADA: EXPLORA
   ============================================================= */

.hv-explore {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.1rem;
	margin-top: 1.1rem;
}

.hv-explore__card {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	min-height: 148px;
	padding: 1.5rem 1.5rem 1.4rem;
	border-radius: var(--hv-r-md);
	color: var(--hv-ink);
	transition: transform .18s ease, box-shadow .18s ease;
}
.hv-explore__card:hover {
	transform: translateY(-3px);
	box-shadow: var(--hv-shadow-up);
	color: var(--hv-ink);
}

.hv-tint--stone { background: var(--hv-tint-stone); }
.hv-tint--sage  { background: var(--hv-tint-sage); }
.hv-tint--rose  { background: var(--hv-tint-rose); }
.hv-tint--cream { background: var(--hv-tint-cream); }

.hv-explore__text { display: block; }
.hv-explore__text .hv-eyebrow { margin-bottom: .35rem; color: var(--hv-ink-soft); }

.hv-explore__name {
	display: block;
	font-family: var(--hv-font-serif);
	font-size: 1.62rem;
	line-height: 1.12;
}

.hv-explore__icon {
	display: grid;
	place-items: center;
	width: 46px; height: 46px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--hv-forest-sage);
	color: #fff;
}
.hv-explore__icon .hv-i { width: 21px; height: 21px; }


/* =============================================================
   CABECERA DE PAGINA (biblioteca, favoritos)
   ============================================================= */

.hv-pagehead { margin: clamp(1.6rem, 3vw, 2.6rem) 0 1.6rem; }
.hv-pagehead .hv-lede { margin-top: .85rem; }

.hv-bigsearch {
	display: flex;
	align-items: center;
	gap: .9rem;
	padding: 1.05rem 1.6rem;
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline-2);
	border-radius: 999px;
	color: var(--hv-ink-faint);
	transition: border-color .15s, box-shadow .15s;
}
.hv-bigsearch:focus-within {
	border-color: var(--hv-muted-sage);
	box-shadow: 0 0 0 4px rgba(122, 158, 138, .14);
}
.hv-bigsearch input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: .95rem;
	color: var(--hv-ink);
}
.hv-bigsearch input:focus { outline: none; }
.hv-bigsearch input::placeholder { color: var(--hv-ink-faint); }

.hv-pills {
	display: flex;
	flex-wrap: wrap;
	gap: .65rem;
	margin: 1.3rem 0 2rem;
}

.hv-pill {
	padding: .62rem 1.3rem;
	font-size: .8rem;
	border: 1px solid var(--hv-hairline-2);
	border-radius: 999px;
	background: var(--hv-surface);
	color: var(--hv-ink);
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s;
}
.hv-pill:hover { border-color: var(--hv-muted-sage); color: var(--hv-forest-ink); }
.hv-pill.is-on {
	background: var(--hv-forest-sage);
	border-color: var(--hv-forest-sage);
	color: #fff;
}

.hv-results {
	margin: -.6rem 0 1.4rem;
	font-size: .84rem;
	color: var(--hv-ink-soft);
}


/* =============================================================
   RESOURCE CARD
   ============================================================= */

.hv-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(282px, 1fr));
	gap: 1.35rem;
}

.hv-card {
	display: flex;
	flex-direction: column;
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
	border-radius: var(--hv-r-md);
	overflow: hidden;
	color: var(--hv-ink);
	box-shadow: var(--hv-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}
.hv-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--hv-shadow-up);
	color: var(--hv-ink);
}

.hv-card__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--hv-tint-stone);
	overflow: hidden;
}
.hv-card__thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
}

.hv-card__badge {
	position: absolute;
	top: .8rem; left: .8rem;
	padding: .35rem .75rem;
	background: rgba(255, 255, 255, .95);
	border-radius: 999px;
	font-size: .6rem;
	font-weight: 700;
	letter-spacing: .12em;
	color: var(--hv-ink);
}

.hv-card__kind {
	position: absolute;
	bottom: .8rem; left: .8rem;
	display: grid;
	place-items: center;
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--hv-forest-sage);
	color: #fff;
}
.hv-card__kind .hv-i { width: 18px; height: 18px; }

.hv-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1.15rem 1.25rem 1.4rem;
}

.hv-card__title {
	margin: 0;
	font-family: var(--hv-font-serif);
	font-weight: 500;
	font-size: 1.42rem;
	line-height: 1.18;
	color: var(--hv-ink);
}

.hv-card__meta {
	margin: .55rem 0 0;
	font-size: .76rem;
	color: var(--hv-ink-soft);
}


/* Folder cards on the home screen: same card, with a cover made of up to
   four thumbnails from the library, or a tinted panel with a big icon. */
.hv-folder__covers {
	position: absolute;
	inset: 0;
	display: grid;
	gap: 2px;
	background: var(--hv-surface);
}
.hv-folder__covers img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.hv-folder__covers--1 { grid-template-rows: 1fr; }
.hv-folder__covers--2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.hv-folder__covers--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.hv-folder__covers--3 img:first-child { grid-row: span 2; }
.hv-folder__covers--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.hv-folder__panel {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, var(--hv-tint-sage), var(--hv-muted-sage));
	color: #fff;
}
.hv-folder__panel .hv-i { width: 72px; height: 72px; stroke-width: 1.2; opacity: .9; }

/* =============================================================
   BUTTONS
   ============================================================= */

.hv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .65rem;
	padding: .95rem 1.85rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--hv-forest-deep);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s, transform .15s, border-color .15s;
}
.hv-btn:hover { background: var(--hv-forest-ink); color: #fff; transform: translateY(-1px); }

.hv-btn--lg { padding: 1.05rem 2.1rem; }
.hv-btn--block { width: 100%; }

.hv-btn--ghost {
	background: var(--hv-surface);
	border-color: var(--hv-hairline-2);
	color: var(--hv-ink);
}
.hv-btn--ghost:hover {
	background: var(--hv-surface);
	border-color: var(--hv-forest-sage);
	color: var(--hv-forest-ink);
}

/* Favorite: the filled heart only shows once it's saved. */
.hv-fav .hv-fav__off { display: flex; }
.hv-fav .hv-fav__on  { display: none; }
.hv-fav.is-on { border-color: var(--hv-petal-rose); }
.hv-fav.is-on .hv-fav__off { display: none; }
.hv-fav.is-on .hv-fav__on  { display: flex; color: var(--hv-petal-rose); }


/* =============================================================
   RESOURCE DETAIL PAGE
   ============================================================= */

.hv-crumbs {
	margin: 1.4rem 0 1rem;
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--hv-ink-soft);
}
/* Back + crumbs, on one row above the player. */
.hv-resbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.1rem;
	margin: 1.4rem 0 1rem;
}
.hv-resbar .hv-crumbs { margin: 0; }
.hv-back {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .5rem .95rem .5rem .7rem;
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline-2);
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--hv-ink);
	transition: border-color .2s, color .2s, box-shadow .2s;
}
.hv-back:hover {
	border-color: var(--hv-forest-sage);
	color: var(--hv-forest-sage);
	box-shadow: var(--hv-shadow);
}
.hv-back .hv-i { width: 16px; height: 16px; }

.hv-section--more { margin-top: clamp(2.4rem, 5vw, 3.6rem); }

.hv-crumbs a { color: var(--hv-ink-soft); }
.hv-crumbs a:hover { color: var(--hv-forest-sage); }
.hv-crumbs span { margin-left: .4rem; }

.hv-res {
	display: grid;
	grid-template-columns: minmax(0, 1.52fr) minmax(0, 1fr);
	gap: 1.1rem;
	/* No align-items: the sidebar stretches to the player's full
	   height, like in the design. */
}

.hv-res__stage { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }

.hv-stage {
	position: relative;
	border-radius: var(--hv-r-md);
	overflow: hidden;
	background: #17130f;
	aspect-ratio: 16 / 9;
}

/* contain y no cover: un video en 4:3 o en vertical se ve entero, con
   bandas, en lugar de recortado por los lados. */
.hv-stage__media {
	width: 100%; height: 100%;
	display: block;
	object-fit: contain;
	background: #17130f;
}
/* Until the first play, the cover fills the 16:9 frame like the cards do;
   from then on, contain, so the video itself is never cropped. */
.hv-stage--video:not(.has-started) .hv-stage__media { object-fit: cover; }

/* Play button over the poster. Disappears once playback starts. */
.hv-stage__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 74px; height: 74px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .94);
	color: var(--hv-forest-ink);
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.hv-stage__play:hover { transform: scale(1.06); background: #fff; }
.hv-stage__play .hv-i { width: 26px; height: 26px; margin-left: 3px; }
.hv-stage.is-playing .hv-stage__play { opacity: 0; pointer-events: none; }

/* +-5 s over the video: they show up once it has started, on hover. */
.hv-stage__skip {
	position: absolute;
	top: 50%;
	width: 54px; height: 54px;
	margin-top: -27px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(23, 19, 15, .5);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease, background .18s ease;
}
.hv-stage__skip--back { left: 8%; }
.hv-stage__skip--fwd  { right: 8%; }
.hv-stage__skip .hv-i { width: 26px; height: 26px; }
.hv-stage__skip:hover { background: rgba(23, 19, 15, .72); }
/* Only with a mouse: on touch screens a double tap on each side is enough,
   and the flash below shows what it did. */
@media (hover: hover) {
	.hv-stage.has-started:hover .hv-stage__skip,
	.hv-stage.has-started .hv-stage__skip:focus-visible { opacity: 1; pointer-events: auto; }
}

/* What a double click did: «5 s on the side that was hit. */
.hv-stage__flash {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	padding: .5rem .9rem;
	border-radius: 999px;
	background: rgba(23, 19, 15, .6);
	color: #fff;
	font-size: .85rem;
	font-variant-numeric: tabular-nums;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.hv-stage__flash.is-back { left: 22%; }
.hv-stage__flash.is-fwd  { right: 22%; }
.hv-stage__flash.is-on   { opacity: 1; }

.hv-stage--audio {
	display: grid;
	place-items: center;
	background-size: cover;
	background-position: center;
}
.hv-stage--audio::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(23, 19, 15, .1), rgba(23, 19, 15, .28));
}
.hv-stage__glyph {
	position: relative;
	z-index: 1;
	color: #fff;
	filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .35));
}
.hv-stage__glyph .hv-i { width: 96px; height: 96px; }

/* ------------------------------------- Document viewer */

.hv-stage--pdf {
	aspect-ratio: auto;
	height: clamp(520px, 74vh, 900px);
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
}
.hv-stage--pdf:fullscreen { height: 100vh; border-radius: 0; border: 0; }

.hv-pdf { display: flex; height: 100%; }

/* Page index, hidden until requested. */
.hv-pdf__rail {
	flex: 0 0 148px;
	overflow-y: auto;
	padding: 1rem .8rem;
	background: var(--hv-page);
	border-right: 1px solid var(--hv-hairline);
}
.hv-pdf__rail[hidden] { display: none; }

.hv-pdf__thumb {
	display: block;
	width: 100%;
	margin-bottom: .8rem;
	padding: .35rem;
	border: 1px solid transparent;
	border-radius: 8px;
	background: none;
	cursor: pointer;
	text-align: center;
}
.hv-pdf__thumb canvas {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--hv-hairline-2);
	border-radius: 4px;
	background: #fff;
}
.hv-pdf__thumb span { display: block; margin-top: .3rem; font-size: .7rem; color: var(--hv-ink-faint); }
.hv-pdf__thumb:hover { border-color: var(--hv-hairline-2); }
.hv-pdf__thumb.is-on { border-color: var(--hv-forest-sage); }
.hv-pdf__thumb.is-on span { color: var(--hv-forest-sage); font-weight: 600; }

/* The document. Light background, not the browser viewer's dark gray. */
.hv-pdf__doc {
	flex: 1 1 auto;
	overflow: auto;
	padding: 1.2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.2rem;
	background: var(--hv-page);
	scroll-behavior: smooth;
}

.hv-pdf__page {
	flex: 0 0 auto;
	background: #fff;
	border: 1px solid var(--hv-hairline);
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(26, 26, 26, .06);
	overflow: hidden;
}
.hv-pdf__page canvas { display: block; }

.hv-pdf__msg {
	position: absolute;
	inset: auto 0 0;
	margin: 0;
	padding: 1rem;
	text-align: center;
	font-size: .86rem;
	color: var(--hv-ink-soft);
	background: var(--hv-cream-linen);
}
.hv-pdf__msg[hidden] { display: none; }

.hv-stage--image { background: var(--hv-surface); border: 1px solid var(--hv-hairline); }
/* contain: an infographic in portrait is shown whole inside the 16:9 frame. */
.hv-stage--image img { width: 100%; height: 100%; object-fit: contain; display: block; }

.hv-stage--doc, .hv-stage--empty {
	aspect-ratio: 16 / 9;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 1rem;
	padding: 2rem;
	text-align: center;
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
	color: var(--hv-ink-soft);
}
.hv-stage--doc .hv-i { width: 40px; height: 40px; color: var(--hv-driftwood); }

/* -------------------------------------------- Sidebar */

.hv-res__side {
	padding: clamp(1.8rem, 2.6vw, 2.8rem);
	background: var(--hv-tint-stone);
	border-radius: var(--hv-r-md);
}

.hv-chip-topic {
	display: inline-block;
	margin-bottom: 1.6rem;
	padding: .5rem 1.2rem;
	border-radius: 999px;
	font-size: .76rem;
	font-weight: 500;
	background: #eee0c8;
	color: #7e6023;
}

.hv-res__summary {
	margin: 1.2rem 0 0;
	font-size: .93rem;
	line-height: 1.55;
	color: var(--hv-ink-soft);
}

.hv-res__meta {
	margin: 1.3rem 0 0;
	font-size: .82rem;
	color: var(--hv-ink-soft);
}

.hv-res__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: 1.8rem;
}

/* ------------------------------------------ Audio bar */

.hv-audiobar {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	padding: .85rem 1.4rem;
	background: var(--hv-forest-sage);
	border-radius: var(--hv-r-md);
	color: #fff;
}

.hv-audiobar__play {
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	flex: 0 0 auto;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--hv-forest-ink);
	cursor: pointer;
}
.hv-audiobar__play .hv-i { width: 18px; height: 18px; }
.hv-audiobar__ico-play  { margin-left: 2px; }
.hv-audiobar__ico-pause { display: none; }
.hv-audiobar.is-playing .hv-audiobar__ico-play  { display: none; }
.hv-audiobar.is-playing .hv-audiobar__ico-pause { display: block; }

.hv-audiobar__skip {
	display: grid;
	place-items: center;
	width: 36px; height: 36px;
	flex: 0 0 auto;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #fff;
	cursor: pointer;
}
.hv-audiobar__skip:hover { background: rgba(255, 255, 255, .14); }
.hv-audiobar__skip .hv-i { width: 22px; height: 22px; }

.hv-audiobar__time {
	font-size: .78rem;
	font-variant-numeric: tabular-nums;
	opacity: .92;
	flex: 0 0 auto;
}

.hv-audiobar__seek {
	flex: 1 1 auto;
	min-width: 0;
	height: 4px;
	appearance: none;
	-webkit-appearance: none;
	background: rgba(255, 255, 255, .34);
	border-radius: 999px;
	cursor: pointer;
}
.hv-audiobar__seek::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 13px; height: 13px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}
.hv-audiobar__seek::-moz-range-thumb {
	width: 13px; height: 13px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.hv-audiobar__rate {
	flex: 0 0 auto;
	padding: .25rem .6rem;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 999px;
	background: none;
	color: #fff;
	font-size: .74rem;
	cursor: pointer;
}
.hv-audiobar__rate:hover { background: rgba(255, 255, 255, .14); }

/* -------------------------------------- Document toolbar */

.hv-pdfbar {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	padding: .75rem 1.1rem;
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
	border-radius: var(--hv-r-md);
}

.hv-pdfbar__file {
	display: flex;
	flex-direction: column;
	margin-right: auto;
	padding-right: 1rem;
	min-width: 0;
}
.hv-pdfbar__file strong {
	font-size: .84rem;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.hv-pdfbar__file span { font-size: .72rem; color: var(--hv-ink-faint); }

.hv-pdfbar__group {
	display: flex;
	align-items: center;
	gap: .3rem;
	padding-left: 1rem;
	border-left: 1px solid var(--hv-hairline);
}

.hv-pdfbar__b {
	display: grid;
	place-items: center;
	width: 36px; height: 36px;
	border: 1px solid var(--hv-hairline);
	border-radius: 10px;
	background: var(--hv-surface);
	color: var(--hv-ink);
	cursor: pointer;
	transition: background .14s, border-color .14s, color .14s;
}
.hv-pdfbar__b:hover { border-color: var(--hv-muted-sage); color: var(--hv-forest-ink); }
.hv-pdfbar__b.is-quiet { background: var(--hv-tint-stone); border-color: transparent; }
.hv-pdfbar__b.is-on { background: var(--hv-forest-sage); border-color: var(--hv-forest-sage); color: #fff; }

.hv-pdfbar__page {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .8rem;
	color: var(--hv-ink-soft);
}
.hv-pdfbar__page input {
	width: 54px;
	padding: .5rem .3rem;
	text-align: center;
	font: inherit;
	font-size: .82rem;
	font-variant-numeric: tabular-nums;
	color: var(--hv-ink);
	border: 1px solid var(--hv-hairline);
	border-radius: 10px;
	background: var(--hv-surface);
}

.hv-pdfbar__zoom {
	min-width: 56px;
	padding: .45rem .3rem;
	text-align: center;
	font-size: .78rem;
	font-variant-numeric: tabular-nums;
	border: 1px solid var(--hv-hairline);
	border-radius: 10px;
}

/* ------------------------------------ Panels below the detail */

.hv-res__panels {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.1rem;
	margin-top: 1.1rem;
}

/* A resource with no chapters has only one panel: let it take the full
   width instead of leaving half the screen empty. */
.hv-res__panels--one { grid-template-columns: 1fr; }

.hv-panel {
	padding: clamp(1.7rem, 2.6vw, 2.6rem);
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
	border-radius: var(--hv-r-md);
}

.hv-panel .hv-display { margin-top: .4rem; }

.hv-panel__body { margin-top: 1.6rem; font-size: .92rem; line-height: 1.68; color: var(--hv-ink-soft); }
.hv-panel__body p { margin: 0 0 .9rem; }
.hv-panel__note { color: var(--hv-ink-faint); font-size: .84rem; }

.hv-chapters {
	list-style: none;
	margin: 1.4rem 0 0;
	padding: 0;
}
.hv-chapters__row { border-top: 1px solid var(--hv-hairline); }
.hv-chapters__row:last-child { border-bottom: 1px solid var(--hv-hairline); }

.hv-chapters__go {
	display: flex;
	align-items: center;
	gap: .8rem;
	width: 100%;
	padding: 1.05rem .2rem;
	border: 0;
	background: none;
	text-align: left;
	font-size: .92rem;
	color: var(--hv-ink);
	cursor: pointer;
}
button.hv-chapters__go:hover { color: var(--hv-forest-sage); }
span.hv-chapters__go { cursor: default; }

.hv-chapters__mark { display: grid; place-items: center; color: var(--hv-driftwood); }
.hv-chapters__label { flex: 1 1 auto; }
.hv-chapters__time {
	flex: 0 0 auto;
	font-size: .84rem;
	font-variant-numeric: tabular-nums;
	color: var(--hv-ink-soft);
}

.hv-note {
	display: flex;
	align-items: center;
	gap: .6rem;
	max-width: 70ch;
	margin: 2.2rem auto 0;
	font-size: .78rem;
	color: var(--hv-ink-faint);
}
.hv-note .hv-i { color: var(--hv-driftwood); }


/* =============================================================
   EMPTY STATES AND NOTICES
   ============================================================= */

.hv-empty {
	display: grid;
	justify-items: center;
	gap: 1.2rem;
	padding: clamp(3rem, 8vw, 5.5rem) 1.5rem;
	background: var(--hv-surface);
	border: 1px dashed var(--hv-hairline-2);
	border-radius: var(--hv-r-md);
	text-align: center;
	color: var(--hv-ink-soft);
}
.hv-empty p { margin: 0; max-width: 46ch; }

.hv-msg {
	margin: 0 0 1.2rem;
	padding: .9rem 1.1rem;
	border-radius: var(--hv-r-sm);
	font-size: .86rem;
	line-height: 1.5;
}
.hv-msg--err { background: #f7e4e1; color: #8a3b30; }
.hv-msg--ok  { background: #e3ede6; color: #2f5340; }


/* =============================================================
   ACCESO / ACTIVACION / RECUPERACION
   ============================================================= */

/* El selector lleva las dos clases a proposito: body.hv-portal ya fija un
   padding, y con una sola clase ganaba aquel y la tarjeta quedaba pegada
   arriba. Con min-height y place-items la tarjeta queda centrada, y si es
   mas alta que la ventana el padding la separa del borde igualmente. */
body.hv-portal.hv-body--auth {
	display: grid;
	place-items: center;
	min-height: 100vh;
	padding: clamp(1.5rem, 6vh, 4rem) 1rem;
}

.hv-auth { width: 100%; max-width: 440px; }

.hv-auth__card {
	padding: clamp(2rem, 5vw, 3rem);
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
	border-radius: var(--hv-r-lg);
	box-shadow: var(--hv-shadow);
}

.hv-auth__logo { margin-bottom: 1.8rem; }
.hv-auth__card h1 {
	margin: 0 0 .6rem;
	font-family: var(--hv-font-serif);
	font-weight: 400;
	font-size: 2.1rem;
	line-height: 1.12;
}
.hv-auth__intro { margin: 0 0 1.8rem; font-size: .88rem; color: var(--hv-ink-soft); }

.hv-field { margin-bottom: 1.1rem; }
.hv-field label {
	display: block;
	margin-bottom: .4rem;
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--hv-ink-soft);
}
.hv-field input {
	width: 100%;
	padding: .85rem 1rem;
	font: inherit;
	font-size: .92rem;
	color: var(--hv-ink);
	background: var(--hv-page);
	border: 1px solid var(--hv-hairline-2);
	border-radius: var(--hv-r-sm);
}
.hv-field input:focus {
	outline: none;
	border-color: var(--hv-muted-sage);
	box-shadow: 0 0 0 3px rgba(122, 158, 138, .16);
}
.hv-field__hint { margin: .4rem 0 0; font-size: .74rem; color: var(--hv-ink-faint); }

.hv-check {
	display: flex;
	gap: .6rem;
	margin: 1.2rem 0;
	font-size: .82rem;
	line-height: 1.5;
	color: var(--hv-ink-soft);
}
.hv-check input { margin-top: .2rem; accent-color: var(--hv-forest-sage); }

.hv-auth .hv-btn { margin-top: .6rem; }

/* "The email isn't arriving". */
.hv-help {
	margin: 1.4rem 0 0;
	padding: .9rem 1rem;
	border: 1px solid var(--hv-hairline);
	border-radius: var(--hv-r-sm);
	font-size: .82rem;
	color: var(--hv-ink-soft);
}
.hv-help summary { cursor: pointer; font-weight: 600; color: var(--hv-ink); }
.hv-help p { margin: .7rem 0 0; }
.hv-help__contact { font-weight: 600; color: var(--hv-forest-ink); }

.hv-alt { margin: 1.2rem 0 0; text-align: center; font-size: .82rem; }

/* Two-step sign-in (portal-auth.js): choose a method, then a code. */
.hv-step[hidden], .hv-auth form[hidden], .hv-alt[hidden] { display: none; }
.hv-choices { display: grid; gap: .7rem; }
.hv-choice {
	display: grid;
	gap: .2rem;
	width: 100%;
	padding: 1rem 1.1rem;
	font: inherit;
	text-align: left;
	color: var(--hv-ink);
	background: var(--hv-page);
	border: 1px solid var(--hv-hairline-2);
	border-radius: var(--hv-r-sm);
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.hv-choice:hover, .hv-choice:focus-visible { border-color: var(--hv-muted-sage); background: var(--hv-tint-sage); }
.hv-choice strong { font-size: .92rem; font-weight: 600; }
.hv-choice span { font-size: .8rem; color: var(--hv-ink-soft); overflow-wrap: anywhere; }
.hv-choice strong { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.hv-choice__tag {
	padding: .15rem .55rem;
	font-size: .66rem;
	font-style: normal;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--hv-forest-ink);
	background: var(--hv-tint-sage);
	border-radius: 999px;
}
.hv-step__note { text-align: center; }
.hv-choice:disabled { cursor: default; opacity: .6; }
.hv-choice:disabled:hover { border-color: var(--hv-hairline-2); background: var(--hv-page); }
.hv-captcha:empty { display: none; }
.hv-field input.hv-code { font-size: 1.4rem; font-weight: 600; letter-spacing: .5em; text-align: center; }
.hv-alt--lang { margin-top: .6rem; }
.hv-foot { margin: 1.8rem 0 0; text-align: center; font-size: .72rem; color: var(--hv-ink-faint); }

.hv-lang {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	color: var(--hv-ink-soft);
	font-size: .82rem;
}
.hv-lang:hover { color: var(--hv-forest-sage); }


/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 1180px) {
	.hv-explore { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1020px) {
	.hv-hero { grid-template-columns: 1fr; }
	.hv-hero__text { order: 2; }
	.hv-hero__art  { order: 1; min-height: 240px; }
	.hv-hero__text .hv-display { max-width: none; }

	.hv-res { grid-template-columns: 1fr; }
	.hv-res__panels { grid-template-columns: 1fr; }
	.hv-stage--pdf { height: clamp(440px, 62vh, 700px); }
}

@media (max-width: 840px) {
	.hv-nav__search { display: none; }
	.hv-nav__in { gap: .9rem; padding-left: 1.1rem; }
	.hv-nav__links { gap: 1.1rem; }
	.hv-nav__links a { font-size: .8rem; }
}

@media (max-width: 620px) {
	body.hv-portal { font-size: 14.5px; }

	.hv-explore { grid-template-columns: 1fr; }
	.hv-grid { grid-template-columns: 1fr; }

	.hv-section__head { flex-direction: column; align-items: flex-start; gap: .7rem; }

	.hv-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
	.hv-pills::-webkit-scrollbar { display: none; }

	.hv-res__actions .hv-btn { flex: 1 1 100%; }

	.hv-pdfbar { justify-content: center; }
	.hv-pdfbar__file { margin-right: 0; width: 100%; padding-right: 0; }
	.hv-pdfbar__group { padding-left: 0; border-left: 0; }

	.hv-audiobar { gap: .7rem; padding: .7rem .9rem; }
	.hv-audiobar__rate { display: none; }

	.hv-pdf__rail { flex-basis: 92px; padding: .6rem .4rem; }
	.hv-pdf__doc { padding: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Printing: the library is private material; it's kept readable but
   without chrome, and players don't make sense on paper. */
@media print {
	.hv-nav, .hv-audiobar, .hv-pdfbar, .hv-res__actions, .hv-stage__play, .hv-stage__skip { display: none !important; }
	body.hv-portal { background: #fff; padding: 0; }
}


/* =============================================================
   DRI CALCULATOR
   Form and results for /portal/dri-calculator/ (includes/dri.php).
   ============================================================= */

.hv-pill--tool { border-style: dashed; }
span.hv-pill { display: inline-flex; align-items: center; gap: .45rem; }
.hv-pill--tool.is-on { border-style: solid; }

.hv-dri > .hv-display { margin: 0 0 1.6rem; }
.hv-dri--results { display: grid; gap: 1.4rem; }
.hv-dri--results > .hv-display { margin: 0; }

.hv-dri__cols {
	display: grid;
	grid-template-columns: minmax(0, 36rem) minmax(0, 16rem);
	justify-content: space-between;
	gap: 2rem;
}

.hv-dri__set {
	margin: 0 0 1.6rem;
	padding: 0;
	border: 0;
	min-width: 0;
}
.hv-dri__set[hidden], .hv-dri [hidden] { display: none !important; }
.hv-dri__set legend {
	width: 100%;
	margin-bottom: .8rem;
	padding-bottom: .45rem;
	border-bottom: 1px solid var(--hv-hairline);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--hv-ink);
}
.hv-dri__req { color: #a5463a; }

.hv-dri__opt {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin: 0 1.2rem .55rem 0;
	font-size: .9rem;
	cursor: pointer;
}
.hv-dri__opt input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--hv-forest-sage); }
.hv-dri__opt--desc { align-items: flex-start; }
.hv-dri__opt--desc input { margin-top: .2rem; }
.hv-dri__opt--desc span { display: grid; gap: .1rem; }
.hv-dri__opt--desc small { font-size: .78rem; color: var(--hv-ink-faint); line-height: 1.45; }

.hv-dri__inline { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.hv-dri__inline .hv-dri__opt { margin-bottom: 0; }
.hv-dri__num { max-width: 16rem; margin-bottom: .6rem; }
.hv-dri__num input { max-width: 11rem; }

.hv-dri__box,
.hv-dri select {
	width: 7rem;
	padding: .75rem .9rem;
	font: inherit;
	font-size: .92rem;
	color: var(--hv-ink);
	background: var(--hv-page);
	border: 1px solid var(--hv-hairline-2);
	border-radius: var(--hv-r-sm);
}
.hv-dri select { width: 100%; max-width: 20rem; }
.hv-dri__box:focus, .hv-dri select:focus {
	outline: none;
	border-color: var(--hv-muted-sage);
	box-shadow: 0 0 0 3px rgba(122, 158, 138, .16);
}

.hv-dri__sub {
	margin-top: 1rem;
	padding: 1rem 1.1rem .2rem;
	background: var(--hv-page);
	border-radius: var(--hv-r-sm);
}

.hv-dri__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .6rem; }

/* Results */
.hv-dri__edit {
	background: var(--hv-surface);
	border: 1px solid var(--hv-hairline);
	border-radius: var(--hv-r-md);
}
.hv-dri__edit summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.1rem 1.4rem;
	font-weight: 600;
	font-size: .9rem;
	cursor: pointer;
	list-style: none;
}
.hv-dri__edit summary::-webkit-details-marker { display: none; }
.hv-dri__edit summary::after { content: '+'; font-size: 1.4rem; font-weight: 400; line-height: 1; color: var(--hv-forest-sage); }
.hv-dri__edit[open] summary::after { content: '−'; }
.hv-dri__editbody { padding: .4rem 1.4rem 1.4rem; border-top: 1px solid var(--hv-hairline); }
.hv-dri__editbody .hv-dri__form { padding-top: 1.2rem; }

.hv-dri__summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }

.hv-dri__h { margin: 0 0 1rem; font-size: .88rem; font-weight: 600; letter-spacing: .02em; }

.hv-dri__kv { width: 100%; border-collapse: collapse; margin-bottom: 1.4rem; font-size: .9rem; }
.hv-dri__kv th, .hv-dri__kv td { padding: .8rem .2rem; border-bottom: 1px solid var(--hv-hairline); text-align: left; vertical-align: top; }
.hv-dri__kv tr:first-child th, .hv-dri__kv tr:first-child td { border-top: 1px solid var(--hv-ink); }
.hv-dri__kv th { width: 52%; font-weight: 600; padding-right: 1rem; }
.hv-dri__kv strong { font-size: 1.02rem; }
.hv-dri__muted { display: block; font-size: .76rem; color: var(--hv-ink-faint); }

.hv-dri__scroll { overflow-x: auto; }
.hv-dri__table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: .9rem; }
.hv-dri__table th, .hv-dri__table td { padding: .85rem 1rem; border: 1px solid var(--hv-hairline-2); text-align: left; vertical-align: middle; }
.hv-dri__table thead th { background: var(--hv-tint-stone); font-weight: 600; }
.hv-dri__table tbody th { width: 32%; font-weight: 500; }

.hv-dri__disclaimer {
	margin: 1.4rem 0 0;
	padding: 1rem 1.3rem;
	border-left: 3px solid var(--hv-warm-ochre);
	border-radius: 0 var(--hv-r-sm) var(--hv-r-sm) 0;
	background: var(--hv-tint-cream);
	font-size: .8rem;
	line-height: 1.6;
	color: var(--hv-ink-soft);
}
.hv-dri__disclaimer strong { color: var(--hv-ink); font-weight: 600; }

.hv-dri__info {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 1.05rem;
	height: 1.05rem;
	margin-left: .25rem;
	border-radius: 50%;
	background: var(--hv-forest-sage);
	color: #fff;
	font-size: .66rem;
	font-weight: 700;
	font-style: normal;
	vertical-align: .1em;
	cursor: help;
}
.hv-dri__info::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + .5rem);
	left: 50%;
	z-index: 5;
	width: max-content;
	max-width: 17rem;
	padding: .55rem .7rem;
	border-radius: 8px;
	background: var(--hv-ink);
	color: #fff;
	font-size: .74rem;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	transform: translateX(-50%);
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s;
}
.hv-dri__info:hover::after, .hv-dri__info:focus::after { opacity: 1; }

@media (max-width: 840px) {
	.hv-dri__cols { grid-template-columns: 1fr; gap: 0; }
	.hv-dri__col--side { order: -1; }
	.hv-dri__summary { grid-template-columns: 1fr; }
	.hv-dri__info::after { left: auto; right: -.5rem; transform: none; }
}

@media print {
	.hv-dri__edit, .hv-dri--results .hv-btn, .hv-pills { display: none !important; }
}

/* Text-style button (sign-in screen: "Forgot your password?"). */
.hv-linkbtn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--hv-forest-sage);
	font-size: inherit;
	cursor: pointer;
}
.hv-linkbtn:hover { color: var(--hv-forest-ink); text-decoration: underline; }

/* Sign-in button while it works: a spinner before the text. */
.hv-btn.is-loading { position: relative; cursor: progress; opacity: 1; }
.hv-btn.is-loading::before {
	content: "";
	width: 15px;
	height: 15px;
	margin-right: .6rem;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: hvSpin .8s linear infinite;
	display: inline-block;
	vertical-align: -3px;
}
@keyframes hvSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hv-btn.is-loading::before { animation: none; } }

/* =============================================================
   SIGN-IN SCREEN: PHOTO + WELCOME TEXT ("hero")
   -------------------------------------------------------------
   Desktop: the welcome text on the left, the card on the right,
   over the photo (img/login-bg.webp, its vase on the right edge).
   Tablet and phone: one column, text above the card, and a light
   veil over the photo so the text always reads.
   ============================================================= */
body.hv-portal.hv-body--auth {
	background: var(--hv-cream-linen) url(img/login-bg.webp) right center / cover no-repeat;
}

.hv-auth.hv-auth--hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
	max-width: 1080px;
}

/* Large screens: the design's proportions, so the card ends left of the
   vase: text from 16.5% of the width, card ending around 72%. */
@media (min-width: 1250px) {
	.hv-auth.hv-auth--hero {
		justify-self: start;
		width: 56vw;
		max-width: none;
		margin-left: 16.5vw;
		grid-template-columns: minmax(0, 1fr) minmax(360px, 23vw);
		gap: 3vw;
	}
}

.hv-auth__hero { max-width: 34rem; }
.hv-auth__kicker {
	margin: 0 0 .5rem;
	font-size: clamp(.8rem, 1vw, 1rem);
	font-weight: 500;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hv-forest-sage);
}
.hv-auth__headline {
	margin: 0 0 1.6rem;
	font-family: var(--hv-font-serif);
	font-weight: 400;
	font-size: clamp(2.6rem, 4.1vw, 5rem);
	line-height: 1.12;
	color: var(--hv-forest-sage);
}
.hv-auth__lead {
	margin: 0;
	font-size: clamp(.95rem, 1.1vw, 1.2rem);
	line-height: 1.75;
	color: var(--hv-ink-soft);
}

.hv-auth--hero .hv-auth__card {
	border-color: rgba(255, 255, 255, .7);
	box-shadow: 0 24px 60px -28px rgba(62, 52, 40, .35);
}

/* Fields with an icon (email, password). */
.hv-field__control { position: relative; }
.hv-field__control .hv-i {
	position: absolute;
	top: 50%;
	left: .95rem;
	width: 1.05rem;
	height: 1.05rem;
	transform: translateY(-50%);
	color: var(--hv-ink-faint);
	pointer-events: none;
}
.hv-field__control input { padding-left: 2.7rem; }
.hv-field input::placeholder { color: var(--hv-ink-faint); opacity: .8; }

/* Tablet and phone: one column, text first. */
@media (max-width: 960px) {
	body.hv-portal.hv-body--auth {
		place-items: start center;
		background-position: 70% center;
	}
	body.hv-portal.hv-body--auth::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: -1;
		background: linear-gradient(180deg, rgba(250, 247, 242, .82) 0%, rgba(250, 247, 242, .55) 100%);
	}
	.hv-auth.hv-auth--hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.8rem;
		max-width: 440px;
	}
	.hv-auth__hero { max-width: none; text-align: center; }
	.hv-auth__headline { margin-bottom: 1rem; font-size: clamp(2.3rem, 9vw, 3.2rem); }
	.hv-auth__lead { font-size: .92rem; line-height: 1.65; }
}

/* Small phones: keep the form close to the top. */
@media (max-width: 480px) {
	.hv-auth__lead { display: none; }
	.hv-auth__headline { font-size: 2.2rem; }
}

/* =============================================================
   HOME: STORE LINKS (above the hero)
   -------------------------------------------------------------
   Two cards side by side: our own supplements (green, product
   thumbnails) and Fullscript (white, dashed). Stacked on phones.
   ============================================================= */
.hv-shops {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1.4rem;
}

.hv-shop {
	display: flex;
	align-items: center;
	gap: .9rem;
	min-width: 0;
	padding: .7rem .7rem .7rem .9rem;
	border-radius: var(--hv-r-sm);
	text-decoration: none;
	transition: transform .18s ease, box-shadow .18s ease;
}
.hv-shop:hover { transform: translateY(-2px); box-shadow: var(--hv-shadow-up); }

.hv-shop--brand { background: var(--hv-forest-sage); color: #fff; }
.hv-shop--brand:hover { color: #fff; }
.hv-shop--ext {
	background: rgba(255, 255, 255, .7);
	border: 1px dashed var(--hv-hairline-2);
	color: var(--hv-ink);
}
.hv-shop--ext:hover { color: var(--hv-ink); background: var(--hv-surface); }

.hv-shop__thumbs { display: flex; flex-shrink: 0; }
.hv-shop__thumbs img {
	width: 2.4rem;
	height: 2.4rem;
	object-fit: cover;
	background: #fff;
	border: 2px solid var(--hv-forest-sage);
	border-radius: 50%;
	box-shadow: 0 0 0 1.5px #fff;
}
.hv-shop__thumbs img + img { margin-left: -.55rem; }

.hv-shop__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	background: var(--hv-tint-stone);
	color: var(--hv-ink-soft);
}

.hv-shop__text { display: grid; gap: .1rem; min-width: 0; margin-right: auto; }
.hv-shop__kicker {
	font-size: .62rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .85;
}
.hv-shop--ext .hv-shop__kicker { color: var(--hv-ink-faint); opacity: 1; }
.hv-shop__title { font-size: .92rem; font-weight: 600; line-height: 1.3; }

.hv-shop__btn {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	flex-shrink: 0;
	padding: .55rem 1rem;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	border-radius: 999px;
}
.hv-shop--brand .hv-shop__btn { background: var(--hv-cream-linen); color: var(--hv-forest-ink); }
.hv-shop--ext .hv-shop__btn { border: 1px solid var(--hv-forest-ink); color: var(--hv-forest-ink); }
.hv-shop__btn .hv-i { width: .8rem; height: .8rem; }

@media (max-width: 900px) {
	.hv-shops { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
}
@media (max-width: 480px) {
	.hv-shop { gap: .7rem; padding: .65rem .65rem .65rem .75rem; }
	.hv-shop__thumbs img:nth-child(n+3) { display: none; }
	.hv-shop__title { font-size: .86rem; }
	.hv-shop__kicker { font-size: .58rem; letter-spacing: .08em; }
	.hv-shop__btn { padding: .5rem .85rem; }
}
