/* Locals — virtual accounts page. Builds on site.css and ui.css. */

/* Hero: opening a route */

.acc-hero::before {
	content: '';
	position: absolute;
	z-index: -1;
	right: -8%;
	top: 4%;
	width: 62%;
	height: 82%;
	background:
		radial-gradient(closest-side, rgba(200, 241, 105, 0.38), transparent),
		radial-gradient(rgba(16, 41, 30, 0.09) 1px, transparent 1.4px) 0 0 / 22px 22px;
	-webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent);
	mask-image: radial-gradient(closest-side, #000 40%, transparent);
	pointer-events: none;
}

@media (min-width: 1081px) {
	.acc-hero .hero-grid {
		grid-template-columns: 1fr 1.05fr;
	}
}

.acc-hero h1 {
	font-size: clamp(44px, 3.9vw, 56px);
}

.acc-hero .crumbs {
	margin-bottom: 20px;
}

.acc-demo {
	position: relative;
	padding: 30px 26px 58px 0;
}

.acc-demo .win-body {
	min-height: 0;
}

.acc-steps {
	list-style: none;
	margin: 16px 0 14px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.acc-steps li {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	padding: 8px 10px;
	border-radius: 12px;
	border: 1px solid var(--paper-2);
	background: #fcfbf8;
	color: var(--muted);
	font-size: 13px;
	font-weight: 650;
	transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.acc-steps li > i {
	width: 26px;
	height: 26px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	background: var(--white);
	border: 1px solid var(--line);
	transition: inherit;
}

.acc-steps .ic {
	width: 15px;
	height: 15px;
}

.acc-steps li > span {
	min-width: 0;
}

.acc-steps small {
	display: block;
	font-family: var(--mono);
	font-size: 10.5px;
	font-weight: 500;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acc-steps li.is-on {
	border-color: var(--lime-2);
	background: #f7fcef;
	color: var(--ink);
}

.acc-steps li.is-done {
	color: var(--ink);
}

.acc-steps li.is-done > i {
	background: var(--forest);
	border-color: var(--forest);
	color: var(--lime);
	--ic-fill: rgba(200, 241, 105, 0.25);
}

.acc-dh {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
	font-size: 12px;
	color: var(--muted);
}

.acc-dh span {
	font-size: 11.5px;
	font-weight: 650;
	color: var(--forest-3);
}

.acc-details .bank span:empty {
	display: inline-block;
	width: 64px;
	height: 10px;
	margin: 4px 0;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--paper-2), #f7f4ec, var(--paper-2)) 0 0 / 200% 100%;
	animation: acc-sk 1.2s linear infinite;
}

@keyframes acc-sk {
	to { background-position: -200% 0; }
}

.acc-allow {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	margin-top: 12px;
	padding: 9px 12px;
	border-radius: 12px;
	border: 1px dashed var(--line);
	transition: background 0.4s ease, border-color 0.4s ease;
}

.acc-allow .ab {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: var(--paper);
	color: var(--forest);
	border: 1px solid var(--line);
	transition: inherit;
}

.acc-allow .ic {
	width: 18px;
	height: 18px;
}

.acc-allow strong {
	display: block;
	font-size: 13.5px;
	letter-spacing: -0.01em;
}

.acc-allow small {
	display: block;
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acc-tag {
	font-size: 11.5px;
	font-weight: 650;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--paper-2);
	color: var(--muted);
	white-space: nowrap;
	transition: background 0.4s ease, color 0.4s ease;
}

.acc-allow.is-done {
	border-style: solid;
	border-color: #cfe9b4;
	background: #f7fcef;
}

.acc-allow.is-done .ab {
	background: var(--forest);
	border-color: var(--forest);
	color: var(--lime);
	--ic-fill: rgba(200, 241, 105, 0.25);
}

.acc-allow.is-done .acc-tag {
	background: #e4f6cf;
	color: #24531a;
}

.acc-recon {
	position: relative;
	margin-top: 12px;
	border: 1px solid var(--paper-2);
	border-radius: 12px;
	overflow: hidden;
}

.acc-empty {
	position: absolute;
	left: 0;
	right: 0;
	top: 64px;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 12.5px;
	color: var(--muted);
	transition: opacity 0.3s ease;
}

.acc-empty .ic {
	width: 17px;
	height: 17px;
}

.acc-recon.has-rows .acc-empty {
	opacity: 0;
}

.acc-rh {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #faf9f5;
	border-bottom: 1px solid var(--paper-2);
	font-size: 12.5px;
	font-weight: 650;
}

.acc-rh code {
	font-size: 10.5px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acc-row {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.25fr) 64px;
	gap: 10px;
	align-items: center;
	padding: 8px 12px;
	border-top: 1px solid var(--paper-2);
	font-size: 12.5px;
}

.acc-row.head {
	border-top: 0;
	padding: 6px 12px 4px;
	font-size: 10.5px;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.acc-row b {
	display: block;
	font-family: var(--mono);
	font-weight: 600;
	font-size: 12.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acc-row small {
	display: block;
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acc-row[data-acc-row] {
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.45s ease, transform 0.5s var(--ease-out);
}

.acc-row[data-acc-row].show {
	opacity: 1;
	transform: none;
}

.acc-st {
	justify-self: end;
	font-size: 11px;
	font-weight: 650;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--paper-2);
	color: var(--muted);
	white-space: nowrap;
	transition: background 0.4s ease, color 0.4s ease;
}

.acc-st.ok {
	background: #e4f6cf;
	color: #24531a;
}

.acc-st.held {
	background: #fbefd6;
	color: #7a4f05;
}

.acc-demo .hook-chip {
	top: 0;
	right: 0;
}

.acc-transfer {
	left: -38px;
	bottom: 4px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px 12px 12px;
	font-size: 14px;
}

.acc-transfer .ok {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #e4f6cf;
	color: #24531a;
	--ic-fill: rgba(63, 174, 42, 0.2);
}

.acc-transfer .ic {
	width: 19px;
	height: 19px;
}

.acc-transfer small {
	display: block;
	color: var(--muted);
	font-size: 12.5px;
	font-family: var(--mono);
}

/* Feature cards */

.acc-feats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.acc-feats .vvis .fl {
	box-shadow: 0 0 0 1px rgba(16, 41, 30, 0.08);
}

.payee {
	width: min(250px, 86%);
	display: grid;
	gap: 8px;
	padding: 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid var(--line);
	box-shadow: 0 16px 30px -22px rgba(16, 41, 30, 0.5);
}

.payee-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 2px;
}

.payee-top b {
	display: block;
	font-size: 14.5px;
}

.payee-top small {
	display: block;
	font-size: 12px;
	color: var(--muted);
}

.av {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	background: var(--forest);
	color: var(--lime);
	font-size: 12px;
	font-weight: 700;
}

.acc-v-reuse {
	grid-template-columns: auto 64px auto;
	align-content: center;
	justify-content: center;
	gap: 0;
}

.inv-list {
	display: grid;
	gap: 14px;
}

.inv-list span {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 10px;
	border-radius: 9px;
	background: var(--white);
	border: 1px solid var(--line);
	font-size: 12.5px;
	font-weight: 650;
	white-space: nowrap;
}

.inv-list small {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--muted);
	font-weight: 500;
}

.merge {
	width: 64px;
	height: 120px;
}

.merge path {
	fill: none;
	stroke: var(--forest-3);
	stroke-width: 1.6;
	stroke-dasharray: 4 5;
	vector-effect: non-scaling-stroke;
	animation: acc-flow 1.2s linear infinite;
}

@keyframes acc-flow {
	to { stroke-dashoffset: -18; }
}

.one-acct {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--forest);
	color: var(--white);
	box-shadow: 0 16px 30px -18px rgba(16, 41, 30, 0.7);
}

.one-acct b {
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.45;
}

.acc-v-rails {
	place-items: stretch;
	align-content: center;
	gap: 9px;
	padding: 0 22px;
}

.rl {
	display: grid;
	grid-template-columns: 26px auto minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 8px 10px 8px 8px;
	border-radius: 999px;
	background: var(--white);
	border: 1px solid var(--line);
	font-size: 13px;
}

.rl .fl {
	width: 26px;
	height: 26px;
}

.rl b {
	font-family: var(--mono);
	font-weight: 600;
}

.rl em {
	font-style: normal;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rl .state {
	font-size: 11px;
	padding: 3px 8px;
}

.rl.dim {
	opacity: 0.6;
}

.acc-v-kyc {
	padding: 0 18px;
}

.acc-v-kyc .kyc-steps {
	margin: 0;
	justify-content: center;
	gap: 8px;
}

.acc-v-kyc .kyc-step {
	font-size: 13px;
	padding: 6px 12px 6px 6px;
	background: var(--white);
}

.acc-v-kyc .kyc-step .ic-box {
	width: 26px;
	height: 26px;
}

.acc-v-kyc .kyc-step .ic {
	width: 15px;
	height: 15px;
}

.act {
	width: min(290px, 88%);
	display: grid;
	gap: 10px;
}

.act-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--white);
	border: 1px solid var(--line);
	font-size: 12px;
}

.act-row time {
	font-family: var(--mono);
	color: var(--muted);
}

.act-row code {
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.act-row .state {
	font-size: 11px;
	padding: 3px 8px;
}

.act-row.late {
	animation: acc-late 4s var(--ease-out) infinite;
}

@keyframes acc-late {
	0%, 30% { opacity: 0; transform: translateY(8px); }
	42%, 100% { opacity: 1; transform: none; }
}

/* Reconciliation ledger */

.ledger {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 22px;
	box-shadow: 0 40px 80px -50px rgba(16, 41, 30, 0.55);
	overflow: hidden;
	font-size: 13.5px;
}

.ledger-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--paper-2);
	flex-wrap: wrap;
}

.lh-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.lh-title .fl {
	width: 32px;
	height: 32px;
}

.lh-title b {
	display: block;
	font-size: 15px;
}

.lh-title small {
	display: block;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--muted);
}

.lh-filter {
	display: flex;
	gap: 4px;
	padding: 3px;
	border-radius: 999px;
	background: var(--paper);
	border: 1px solid var(--paper-2);
}

.lh-filter button {
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 650;
	color: var(--muted);
	padding: 5px 12px;
	border-radius: 999px;
	cursor: pointer;
}

.lh-filter button[aria-pressed='true'] {
	background: var(--forest);
	color: var(--white);
}

.lg-row {
	display: grid;
	grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 1.2fr) 72px;
	gap: 12px;
	align-items: center;
	padding: 11px 18px;
	border-top: 1px solid var(--paper-2);
	transition: background 0.2s ease;
}

.lg-row.lg-cols {
	border-top: 0;
	padding-top: 10px;
	padding-bottom: 8px;
	font-size: 11px;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
	background: #faf9f5;
}

.lg-row[data-st]:hover {
	background: #f7fcef;
}

.lg-row[data-st='held']:hover {
	background: #fdf6e8;
}

.lg-row > span {
	min-width: 0;
	font-weight: 600;
}

.lg-row b {
	display: block;
	font-family: var(--mono);
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lg-row small {
	display: block;
	font-family: var(--mono);
	font-weight: 500;
	font-size: 11.5px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lg-row .status {
	justify-self: end;
	font-size: 11.5px;
	padding: 3px 9px;
}

.lg-row[hidden] {
	display: none;
}

.ledger-foot {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 18px;
	border-top: 1px solid var(--paper-2);
	background: #faf9f5;
	color: var(--muted);
	font-size: 13px;
}

.ledger-foot b {
	font-family: var(--mono);
	color: var(--ink);
	margin-left: 6px;
}

/* Allow-list gate */

.gate {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 22px;
	padding: 20px;
	box-shadow: 0 40px 80px -50px rgba(16, 41, 30, 0.55);
	display: grid;
	gap: 12px;
}

.gate-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--paper-2);
}

.gate-head .fl {
	width: 32px;
	height: 32px;
}

.gate-head b {
	display: block;
	font-family: var(--mono);
	font-size: 14px;
}

.gate-head small {
	display: block;
	font-size: 12.5px;
	color: var(--muted);
}

.gate-head code {
	margin-left: auto;
	font-size: 11.5px;
	padding: 5px 9px;
	border-radius: 8px;
	background: #0a1a12;
	color: #d9e4dc;
	white-space: nowrap;
}

.gate-head code b {
	display: inline;
	font-size: 11.5px;
	color: var(--lime);
}

.lane {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(16px, 0.5fr) 40px minmax(16px, 0.5fr) minmax(0, 0.9fr);
	align-items: center;
	padding: 12px;
	border-radius: 16px;
	background: var(--paper);
	border: 1px solid var(--paper-2);
}

.sender {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.sender > div {
	min-width: 0;
}

.sender b {
	display: block;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sender small {
	display: block;
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--muted);
	white-space: nowrap;
}

.lane.held .av {
	background: var(--paper-2);
	color: var(--muted);
}

.track {
	position: relative;
	height: 2px;
	margin: 0 6px;
	background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 9px);
}

.track i {
	position: absolute;
	top: -3px;
	left: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--forest-3);
	opacity: 0;
}

.lane.ok .track:not(.out) i {
	animation: acc-in 3.2s linear infinite;
}

.lane.ok .track.out i {
	animation: acc-out 3.2s linear infinite;
}

.lane.held .track i {
	background: var(--amber);
	animation: acc-in 3.2s linear infinite 0.8s;
}

.lane.ok .track.out {
	background: var(--forest-3);
}

@keyframes acc-in {
	0% { left: 0; opacity: 0; }
	5% { opacity: 1; }
	40% { left: calc(100% - 8px); opacity: 1; }
	45%, 100% { left: calc(100% - 8px); opacity: 0; }
}

@keyframes acc-out {
	0%, 45% { left: 0; opacity: 0; }
	50% { opacity: 1; }
	85% { left: calc(100% - 8px); opacity: 1; }
	90%, 100% { left: calc(100% - 8px); opacity: 0; }
}

.lock {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: var(--forest);
	color: var(--lime);
	--ic-fill: rgba(200, 241, 105, 0.25);
}

.lane.held .lock {
	background: #fbefd6;
	color: #7a4f05;
	--ic-fill: rgba(242, 179, 61, 0.35);
}

.lock .ic {
	width: 20px;
	height: 20px;
}

.result {
	justify-self: end;
	text-align: right;
	display: grid;
	gap: 4px;
	justify-items: end;
}

.result b {
	font-family: var(--mono);
	font-size: 13.5px;
	white-space: nowrap;
}

.result .status {
	font-size: 11.5px;
	padding: 3px 9px;
}

.lane.held .result b {
	color: var(--muted);
	text-decoration: line-through;
	text-decoration-color: rgba(122, 79, 5, 0.5);
}

.gate-note {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 2px 0 0;
	font-size: 13.5px;
	color: var(--muted);
}

.gate-note .ic {
	width: 18px;
	height: 18px;
	color: var(--forest);
}

.acc-more {
	margin: 32px 0 0;
}

/* Responsive */

@media (max-width: 1080px) {
	.acc-demo {
		max-width: 640px;
	}

	.acc-feats {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 680px) {
	.acc-demo {
		padding: 0 0 8px;
	}

	.acc-transfer {
		display: none;
	}

	.acc-steps li {
		padding: 7px 8px;
		gap: 7px;
		font-size: 12px;
	}

	.acc-steps small {
		display: none;
	}

	.acc-steps li > i {
		width: 22px;
		height: 22px;
	}

	.acc-rh code {
		display: none;
	}

	.acc-row {
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) 58px;
	}

	.acc-row > :nth-child(2) {
		display: none;
	}

	.acc-feats {
		grid-template-columns: 1fr;
	}

	.lg-row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 66px;
		padding: 10px 14px;
	}

	.lg-row > :nth-child(1),
	.lg-row > :nth-child(3) {
		display: none;
	}

	.ledger-head {
		padding: 14px;
	}

	.gate {
		padding: 14px;
	}

	.gate-head code {
		display: none;
	}

	.lane {
		grid-template-columns: minmax(0, 1fr) 14px 34px 14px auto;
		padding: 10px;
	}

	.lane .av {
		display: none;
	}

	.lock {
		width: 34px;
		height: 34px;
	}

	.track {
		margin: 0 3px;
	}
}

/* Screenshots and reduced motion: final state, no loops */

.shot .merge path,
.shot .act-row.late,
.shot .acc-details .bank span:empty {
	animation: none;
}

.shot .gate .lane .track i {
	animation: none;
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.merge path,
	.act-row.late,
	.acc-details .bank span:empty {
		animation: none;
	}

	.gate .lane .track i {
		animation: none;
		opacity: 0;
	}
}
