/* 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;
}
.hiw-flowmap {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 32px;
	font-family: var(--mono);
}
.hiw-fm {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.85);
	padding: 8px 16px;
	border: 1px solid var(--dark-border);
	border-radius: 100px;
	background: var(--dark-surface);
}
.hiw-fm-arrow { color: var(--hiw-accent); font-size: 16px; }

/* ── Flow ── */
.hiw-flow { max-width: 1080px; margin: 0 auto; padding: 40px 32px 24px; }
.hiw-stage { display: flex; gap: 28px; }
.hiw-stage-rail {
	flex: none;
	width: 56px;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.hiw-stage-num {
	font-family: var(--mono);
	font-size: 18px;
	font-weight: 600;
	color: var(--hiw-accent);
	width: 56px;
	height: 56px;
	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);
}
.hiw-stage-line {
	flex: 1;
	width: 2px;
	margin: 8px 0;
	background: linear-gradient(180deg, rgba(47, 191, 154, 0.35), var(--dark-border));
}
.hiw-stage-body { padding-bottom: 56px; flex: 1; min-width: 0; }
.hiw-stage-kicker {
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hiw-faint);
}
.hiw-stage-h2 {
	margin-top: 8px;
	font-size: clamp(26px, 3.4vw, 38px);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
	line-height: 1.12;
}
.hiw-stage-p {
	margin-top: 14px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--hiw-dim);
	max-width: 680px;
}
.hiw-stage-p strong { color: rgba(255, 255, 255, 0.92); font-weight: 600; }

.hiw-chiprow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hiw-chip {
	font-family: var(--mono);
	font-size: 14px;
	color: rgba(255, 255, 255, 0.78);
	padding: 9px 15px;
	border: 1px solid var(--dark-border);
	border-radius: 100px;
	background: var(--dark-surface);
}
.hiw-chip-link { color: var(--hiw-accent); border-color: rgba(47, 191, 154, 0.4); }
.hiw-chip-link:hover { background: rgba(47, 191, 154, 0.1); }

/* 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;
}

/* automations task-type grid */
.hiw-autos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
	margin-top: 24px;
}
.hiw-auto {
	padding: 18px 20px;
	border-radius: 12px;
	background: var(--dark-surface);
	border: 1px solid var(--dark-border);
	border-left: 3px solid var(--hiw-accent);
}
.hiw-auto-h {
	font-weight: 700;
	font-size: 17px;
	color: #fff;
	margin-bottom: 7px;
}
.hiw-auto-d {
	font-size: 14.5px;
	line-height: 1.45;
	color: var(--hiw-dim);
}
.hiw-auto-foot {
	margin-top: 16px;
	font-family: var(--mono);
	font-size: 15px;
	color: var(--hiw-faint);
}

/* engines table */
.hiw-engines { margin-top: 24px; }
.hiw-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--dark-surface);
	border: 1px solid var(--dark-border);
	border-radius: 14px;
	overflow: hidden;
}
.hiw-table th,
.hiw-table td {
	text-align: left;
	padding: 16px 20px;
	font-size: 16px;
	border-bottom: 1px solid var(--dark-border);
}
.hiw-table thead th {
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hiw-faint);
	background: rgba(255, 255, 255, 0.02);
}
.hiw-table tbody td { color: var(--hiw-dim); }
.hiw-table tbody td strong { color: #fff; font-weight: 700; }
.hiw-table tbody tr:last-child td { border-bottom: none; }
.hiw-table-foot {
	margin-top: 14px;
	font-size: 15px;
	color: var(--hiw-faint);
	font-family: var(--mono);
}

/* ── 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-stage { gap: 16px; }
	.hiw-stage-rail { width: 44px; }
	.hiw-stage-num { width: 44px; height: 44px; font-size: 15px; }
	.hiw-stage-body { padding-bottom: 40px; }
	.hiw-tier-arrow { display: none; }
	.hiw-table th, .hiw-table td { padding: 12px 14px; font-size: 14px; }
	.hiw-posture { 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; }
