/* How it works — dark-portal. Inherits .dark-portal tokens + --teal/--mono/--font. */

.dark-portal {
	--hiw-accent: #2fbf9a;
	--hiw-dim: rgba(255, 255, 255, 0.56);
	--hiw-faint: rgba(255, 255, 255, 0.34);
}

.breadcrumb-wrap { max-width: 1080px; margin: 0 auto; padding: 96px 32px 0; }
.dark-portal .breadcrumb a { color: var(--hiw-dim); }
.dark-portal .breadcrumb a:hover { color: #fff; }
.dark-portal .breadcrumb-sep { color: var(--hiw-faint); }
.dark-portal .breadcrumb span:last-child { color: rgba(255, 255, 255, 0.8); }

.hiw-eyebrow {
	font-family: var(--mono);
	font-size: 14px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--hiw-accent);
}

/* ── Hero ── */
.hiw-hero { max-width: 1080px; margin: 0 auto; padding: 48px 32px 16px; }
.hiw-hero-inner { max-width: 820px; }
.hiw-h1 {
	margin-top: 16px;
	font-size: clamp(42px, 6.5vw, 72px);
	font-weight: 800;
	line-height: 1.03;
	letter-spacing: -0.02em;
	color: #fff;
}
.hiw-h1 em { color: var(--hiw-accent); font-style: normal; }
.hiw-sub {
	margin-top: 20px;
	font-size: clamp(18px, 2.2vw, 23px);
	line-height: 1.5;
	color: var(--hiw-dim);
	max-width: 680px;
}
/* ── Module map — the TOC is the overview. Cards jump to (and open) sections. ── */
.hiwm {
	max-width: 1080px;
	margin: 36px auto 0;
	padding: 0 32px;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
}
.hiwm-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 18px 16px;
	border: 1px solid var(--dark-border);
	border-radius: 14px;
	background: var(--dark-surface);
	text-decoration: none;
	transition: border-color 0.18s, transform 0.15s, background 0.18s;
}
.hiwm-card:hover {
	border-color: rgba(47, 191, 154, 0.5);
	background: rgba(47, 191, 154, 0.05);
	transform: translateY(-2px);
}
.hiwm-card:focus-visible { outline: 2px solid var(--hiw-accent); outline-offset: 2px; }
.hiwm-num {
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 600;
	color: var(--hiw-accent);
}
.hiwm-name {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #fff;
}
.hiwm-desc {
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--hiw-faint);
	font-family: var(--mono);
}
.hiwm-tools {
	max-width: 1080px;
	margin: 14px auto 0;
	padding: 0 32px;
	display: flex;
	justify-content: flex-end;
}
.hiwm-toggle {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--hiw-accent);
	background: none;
	border: 1px solid rgba(47, 191, 154, 0.35);
	border-radius: 100px;
	padding: 7px 16px;
	cursor: pointer;
	transition: background 0.15s;
}
.hiwm-toggle:hover { background: rgba(47, 191, 154, 0.1); }
.hiwm-toggle:focus-visible { outline: 2px solid var(--hiw-accent); outline-offset: 2px; }
@media (max-width: 880px) {
	.hiwm { grid-template-columns: repeat(2, 1fr); }
	.hiwm-card:last-child { grid-column: 1 / -1; }
}

/* ── Live vs sync lanes (Connect section) ── */
.hiwd-lanes {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 4px 0 22px;
}
.hiwd-lane {
	padding: 20px 22px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--dark-border);
}
.hiwd-lane-live {
	border-color: rgba(47, 191, 154, 0.4);
	background: linear-gradient(180deg, rgba(47, 191, 154, 0.08), rgba(47, 191, 154, 0.02));
}
.hiwd-lane-tag {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hiw-accent);
	margin-bottom: 8px;
}
.hiwd-lane-h { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.hiwd-lane-d { font-size: 14px; line-height: 1.6; color: var(--hiw-dim); margin: 0; }
.hiwd-lane-d code {
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--hiw-accent);
	background: rgba(47, 191, 154, 0.08);
	border-radius: 6px;
	padding: 1px 6px;
	white-space: nowrap;
}
.hiwd-link { color: var(--hiw-accent); text-decoration: none; border-bottom: 1px solid rgba(47, 191, 154, 0.4); }
.hiwd-link:hover { color: #fff; }

/* medallion */
.hiw-medallion {
	display: flex;
	align-items: stretch;
	gap: 12px;
	margin-top: 24px;
	flex-wrap: wrap;
}
.hiw-tier {
	flex: 1;
	min-width: 180px;
	padding: 20px;
	border-radius: 14px;
	background: var(--dark-surface);
	border: 1px solid var(--dark-border);
	border-top: 3px solid var(--tier-color, var(--hiw-accent));
}
.hiw-tier-bronze { --tier-color: #c8814b; }
.hiw-tier-silver { --tier-color: #9fb0bd; }
.hiw-tier-gold { --tier-color: #e0b341; }
.hiw-tier-name {
	font-weight: 700;
	font-size: 19px;
	color: #fff;
	margin-bottom: 8px;
}
.hiw-tier-desc { font-size: 15px; line-height: 1.45; color: var(--hiw-dim); }
.hiw-tier-arrow {
	display: flex;
	align-items: center;
	color: var(--hiw-accent);
	font-size: 20px;
}

/* ── Security band ── */
.hiw-sec {
	border-top: 1px solid var(--dark-border);
	background: #0a0f0e;
}
.hiw-sec-inner { max-width: 1080px; margin: 0 auto; padding: 64px 32px; }
.hiw-sec-h2 {
	margin-top: 14px;
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
	line-height: 1.1;
}
.hiw-sec-p {
	margin-top: 16px;
	font-size: 19px;
	line-height: 1.55;
	color: var(--hiw-dim);
	max-width: 720px;
}
.hiw-sec-p strong { color: rgba(255, 255, 255, 0.92); font-weight: 600; }
/* Posture choice — hosted SaaS (primary) vs self-install */
.hiw-posture {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 30px;
}
.hiw-post-card {
	display: flex;
	flex-direction: column;
	background: var(--dark-surface);
	border: 1px solid var(--dark-border);
	border-radius: 16px;
	padding: 26px 26px 28px;
}
.hiw-post-primary {
	border-color: rgba(47, 191, 154, 0.35);
	background: linear-gradient(180deg, rgba(47, 191, 154, 0.07), rgba(47, 191, 154, 0.01));
}
.hiw-post-tag {
	font-family: var(--mono);
	font-size: 14px;
	letter-spacing: 0.04em;
	color: var(--hiw-accent);
	margin-bottom: 12px;
}
.hiw-post-h3 {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #fff;
	margin-bottom: 10px;
}
.hiw-post-body {
	font-size: 16px;
	line-height: 1.5;
	color: var(--hiw-dim);
	flex: 1;
	margin-bottom: 22px;
}
.hiw-post-cta { align-self: flex-start; }

.hiw-guards {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 36px;
}
.hiw-guard {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 15px;
	color: rgba(255, 255, 255, 0.85);
	padding: 14px 20px;
	border-radius: 12px;
	background: var(--dark-surface);
	border: 1px solid var(--dark-border);
}
.hiw-guard-ic { color: var(--hiw-accent); font-size: 18px; }
.hiw-sec-prov {
	margin-top: 26px;
	font-size: 17px;
	color: var(--hiw-dim);
}
.hiw-sec-prov strong { color: rgba(255, 255, 255, 0.92); font-weight: 700; }

/* ── CTA ── */
.hiw-cta { border-top: 1px solid var(--dark-border); text-align: center; }
.hiw-cta-inner { max-width: 720px; margin: 0 auto; padding: 80px 32px; }
.hiw-cta-tag {
	font-family: var(--mono);
	font-size: 14px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--hiw-accent);
}
.hiw-cta-h2 {
	margin-top: 16px;
	font-size: clamp(34px, 5vw, 54px);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
	line-height: 1.05;
}
.hiw-cta-h2 em { color: var(--hiw-accent); font-style: normal; }
.hiw-cta-actions {
	margin-top: 30px;
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
}

@media (max-width: 640px) {
	.hiw-tier-arrow { display: none; }
	.hiw-posture { grid-template-columns: 1fr; }
	.hiwd-lanes { grid-template-columns: 1fr; }
}

/* Dark-portal fix: global .btn-secondary is dark-on-dark; lighten on dark pages. */
.dark-portal .btn-secondary { color: rgba(255, 255, 255, 0.78); border-color: rgba(255, 255, 255, 0.18); }
.dark-portal .btn-secondary:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }

/* ══ MODULE DEEP-DIVES (2026-07 rebrand) — clickable <details> sections that
   absorbed the retired /technology/ page and the /platform/ module detail. ══ */
.hiwd-wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 28px 32px 72px;
}

.hiwd {
	border: 1px solid var(--dark-border);
	border-radius: 16px;
	background: var(--dark-surface);
	margin-bottom: 14px;
	scroll-margin-top: 96px;
	overflow: hidden;
}
.hiwd[open] { border-color: rgba(47, 191, 154, 0.35); }
.hiwd-summary {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 24px 28px;
	cursor: pointer;
	list-style: none;
	transition: background 0.15s;
}
.hiwd-summary::-webkit-details-marker { display: none; }
.hiwd-summary:hover { background: rgba(255, 255, 255, 0.025); }
.hiwd-summary:focus-visible { outline: 2px solid var(--hiw-accent); outline-offset: -2px; border-radius: 16px; }
.hiwd-num {
	flex: none;
	font-family: var(--mono);
	font-size: 15px;
	font-weight: 600;
	color: var(--hiw-accent);
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(47, 191, 154, 0.35);
	border-radius: 50%;
	background: rgba(47, 191, 154, 0.06);
}
.hiwd-title {
	flex: 1;
	min-width: 0;
	margin: 0; /* it's an <h2> inside <summary> — kill UA heading margins */
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #fff;
	line-height: 1.25;
}
.hiwd-hint {
	display: block;
	margin-top: 3px;
	font-size: 13.5px;
	font-weight: 400;
	color: var(--hiw-faint);
	font-family: var(--mono);
	letter-spacing: 0.01em;
}
.hiwd-marker {
	flex: none;
	position: relative;
	width: 26px;
	height: 26px;
	border: 1px solid var(--dark-border);
	border-radius: 50%;
}
.hiwd-marker::before,
.hiwd-marker::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 2px;
	background: var(--hiw-accent);
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease;
}
.hiwd-marker::after { transform: translate(-50%, -50%) rotate(90deg); }
.hiwd[open] .hiwd-marker::after { transform: translate(-50%, -50%) rotate(0deg); }
.hiwd-body { padding: 4px 28px 30px 92px; }
.hiwd-lead {
	font-size: 16.5px;
	line-height: 1.6;
	color: var(--hiw-dim);
	max-width: 760px;
}
.hiwd-lead strong { color: rgba(255, 255, 255, 0.92); font-weight: 600; }
.hiwd-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-top: 22px;
}
.hiwd-cell {
	padding: 16px 18px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--dark-border);
}
.hiwd-cell-h { font-size: 15.5px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.hiwd-cell-d { font-size: 14px; line-height: 1.5; color: var(--hiw-dim); }
.hiwd-note {
	margin-top: 18px;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--hiw-faint);
	max-width: 760px;
}
.hiwd-note strong { color: var(--hiw-dim); font-weight: 600; }
.hiwd-engines {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 22px;
}
.hiwd-engine {
	padding: 20px 22px;
	border-radius: 12px;
	background: rgba(47, 191, 154, 0.04);
	border: 1px solid rgba(47, 191, 154, 0.22);
}
.hiwd-engine-name { font-size: 19px; font-weight: 800; color: #fff; }
.hiwd-engine-role {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hiw-accent);
	margin: 4px 0 10px;
}
.hiwd-engine-d { font-size: 14px; line-height: 1.55; color: var(--hiw-dim); }
.hiwd-shots {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-top: 22px;
}
.hiwd-shot { margin: 0; }
.hiwd-shot-solo { grid-column: 1 / -1; max-width: 640px; }
/* Full-width media row — used for the section videos so footage reads at
   full body width instead of half a grid cell. */
.hiwd-shot-wide { grid-column: 1 / -1; }
.hiwd-shot img,
.hiwd-shot video {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	border: 1px solid var(--dark-border);
	background: #000;
}
.hiwd-shot figcaption {
	margin-top: 8px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--hiw-faint);
}
.hiwd-replaces {
	margin-top: 22px;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--hiw-dim);
}
.hiwd-replaces span {
	color: var(--hiw-faint);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 11px;
	margin-right: 10px;
}

/* ── Design principles ── */
.hiwp { border-top: 1px solid var(--dark-border); }
.hiwp-inner { max-width: 1080px; margin: 0 auto; padding: 64px 32px; }
.hiwp-h2 {
	margin-top: 12px;
	font-size: clamp(26px, 3.6vw, 40px);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
	line-height: 1.1;
	margin-bottom: 32px;
}
.hiwp-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
.hiwp-card {
	padding: 24px 22px;
	border-radius: 14px;
	background: var(--dark-surface);
	border: 1px solid var(--dark-border);
}
.hiwp-word {
	font-size: 20px;
	font-weight: 800;
	color: var(--hiw-accent);
	margin-bottom: 10px;
}
.hiwp-body { font-size: 14px; line-height: 1.55; color: var(--hiw-dim); margin: 0 0 14px; }
.hiwp-decision {
	font-family: var(--mono);
	font-size: 12.5px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.8);
}

/* ── Architecture use-case cards ── */
.hiwu { border-top: 1px solid var(--dark-border); background: #0a0f0e; }
.hiwu-inner { max-width: 1080px; margin: 0 auto; padding: 64px 32px; }
.hiwu-h2 {
	margin-top: 12px;
	font-size: clamp(26px, 3.6vw, 40px);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
	line-height: 1.1;
	margin-bottom: 32px;
}
.hiwu-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
.hiwu-card {
	display: block;
	padding: 26px 26px 24px;
	border-radius: 14px;
	background: var(--dark-surface);
	border: 1px solid var(--dark-border);
	text-decoration: none;
	transition: border-color 0.18s, transform 0.15s;
}
.hiwu-card:hover { border-color: rgba(47, 191, 154, 0.45); transform: translateY(-2px); }
.hiwu-card:focus-visible { outline: 2px solid var(--hiw-accent); outline-offset: 2px; }
.hiwu-tag {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hiw-accent);
	margin-bottom: 12px;
}
.hiwu-title { font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.hiwu-body { font-size: 14px; line-height: 1.55; color: var(--hiw-dim); margin-bottom: 16px; }
.hiwu-link { font-size: 13.5px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.hiwu-card:hover .hiwu-link { color: var(--hiw-accent); }

@media (max-width: 880px) {
	.hiwd-grid, .hiwd-engines, .hiwd-shots { grid-template-columns: 1fr; }
	.hiwd-body { padding-left: 28px; }
	.hiwp-grid, .hiwu-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.hiwp-grid, .hiwu-grid { grid-template-columns: 1fr; }
	.hiwd-summary { padding: 18px 18px; gap: 14px; }
	.hiwd-num { width: 36px; height: 36px; font-size: 13px; }
	.hiwd-title { font-size: 17px; }
	.hiwd-body { padding: 0 18px 24px; }
}
