/* Will & LPA — app frame for /my and /p links.
 * Paper and ink: a warm off-white page, white cards, navy text, the logo's
 * sage for guidance. Mobile first: a bottom tab bar on phones, a quiet rail on
 * larger screens. */

:root {
	--wla-ink: #13263c;
	--wla-navy: #1b3653;
	--wla-sage: #5c8a73;
	--wla-sage-ink: #3d6a55;
	--wla-sage-soft: #e1ece6;
	--wla-paper: #f4f6f2;
	--wla-paper-2: #ebefe9;
	--wla-card: #ffffff;
	--wla-line: #dde4de;
	--wla-text: #1c2a35;
	--wla-muted: #5a6a72;
	--wla-focus: #f2b84b;
	--wla-shadow: 0 1px 2px rgba(19, 38, 60, .05), 0 8px 24px -12px rgba(19, 38, 60, .14);
	--wla-r: 18px;
	--wla-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--wla-display: "Schibsted Grotesk", "Figtree", system-ui, sans-serif;
	/* Feed the shared component tokens. */
	--wl-navy: var(--wla-navy);
	--wl-navy-900: var(--wla-ink);
	--wl-teal: var(--wla-sage);
	--wl-teal-700: var(--wla-sage-ink);
	--wl-teal-100: var(--wla-sage-soft);
	--wl-mist: var(--wla-paper);
	--wl-line: var(--wla-line);
	--wl-text: var(--wla-text);
	--wl-muted: var(--wla-muted);
	--wl-font-body: var(--wla-font);
	--wl-font-display: var(--wla-display);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.wla {
	margin: 0; min-height: 100vh; background: var(--wla-paper); color: var(--wla-text);
	font-family: var(--wla-font); font-size: 1.0625rem; line-height: 1.6;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.wla img { max-width: 100%; height: auto; }
.wla :focus-visible { outline: 3px solid var(--wla-focus); outline-offset: 2px; }
.wla-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--wla-ink); color: #fff; padding: .6rem 1rem; border-radius: 10px; }
.wla-skip:focus { left: 8px; }
.wla-i { flex: none; }

/* Logo */
.wla-logo { display: inline-flex; align-items: center; }
.wla-logo img { display: block; height: 40px; width: auto; }

/* ---------------------------------------------------------------- Frame */
.wla-app { min-height: 100vh; }
.wla-rail { display: none; }
.wla-top {
	position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
	padding: 10px 16px; background: rgba(244, 246, 242, .92); backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid transparent;
}
.wla-top .wla-logo img { height: 34px; }
.wla-avatar {
	width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
	background: var(--wla-navy); color: #fff; font-weight: 650; font-size: .9rem; letter-spacing: .02em;
}
.wla-main { padding: 8px 16px 112px; max-width: 1040px; margin: 0 auto; }
.wla-main.wlo { font-size: 1.0625rem; }

.wla-tabs {
	position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
	background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--wla-line);
	padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.wla-tabs a {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
	color: var(--wla-muted); text-decoration: none; font-size: .75rem; font-weight: 600; border-radius: 12px;
}
.wla-tabs a[aria-current="page"] { color: var(--wla-navy); }
.wla-tabs a[aria-current="page"] .wla-i { stroke-width: 2.2; }
.wla-tabs a[aria-current="page"]::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--wla-sage); }
.wla-dot { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #c2410c; color: #fff; font-size: .7rem; line-height: 18px; text-align: center; font-weight: 700; }

@media (min-width: 900px) {
	.wla-app { display: grid; grid-template-columns: 264px 1fr; }
	.wla-rail {
		display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; padding: 24px 18px;
		background: var(--wla-card); border-right: 1px solid var(--wla-line);
	}
	.wla-rail .wla-logo { padding: 0 8px 8px; }
	.wla-rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
	.wla-rail nav a, .wla-rail__foot a {
		position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
		color: var(--wla-text); text-decoration: none; font-weight: 550;
	}
	.wla-rail nav a:hover, .wla-rail__foot a:hover { background: var(--wla-paper); }
	.wla-rail nav a[aria-current="page"] { background: var(--wla-sage-soft); color: var(--wla-ink); font-weight: 650; }
	.wla-rail nav a[aria-current="page"] .wla-i { color: var(--wla-sage-ink); }
	.wla-rail .wla-dot { position: static; margin-left: auto; }
	.wla-rail__new {
		display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; text-decoration: none;
		border: 1.5px dashed var(--wla-line); color: var(--wla-navy); font-weight: 600;
	}
	.wla-rail__new:hover { border-color: var(--wla-sage); background: var(--wla-paper); }
	.wla-rail__foot { margin-top: auto; border-top: 1px solid var(--wla-line); padding-top: 14px; }
	.wla-rail__who { margin: 0 12px 6px; font-size: .9rem; color: var(--wla-muted); }
	.wla-top, .wla-tabs { display: none; }
	.wla-main { padding: 40px 40px 72px; }
}

/* ---------------------------------------------------------------- Headings */
.wla-hello { margin: 12px 0 20px; }
.wla-hello .wlo-h1 { margin-bottom: .1em; }
.wla-hello p { margin: 0; }
.wla-head { margin: 4px 0 22px; }
.wla-head .wlo-lead { max-width: 60ch; margin-top: .4em; }
.wla-back { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 14px; color: var(--wla-muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.wla-back:hover { color: var(--wla-navy); }
.wla-back .wla-i { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- Next step */
.wla-next {
	position: relative; overflow: hidden; display: grid; gap: 16px; padding: 24px; border-radius: 24px; margin: 0 0 28px;
	background: radial-gradient(120% 140% at 100% 0%, rgba(92, 138, 115, .45) 0%, rgba(92, 138, 115, 0) 55%), var(--wla-ink);
	color: #eef3ef; box-shadow: 0 18px 40px -24px rgba(19, 38, 60, .6);
}
.wla-next::after {
	content: ""; position: absolute; right: -60px; bottom: -80px; width: 240px; height: 240px; border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 40px rgba(255, 255, 255, .025), 0 0 0 80px rgba(255, 255, 255, .02);
	pointer-events: none;
}
.wla-next__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #bfe0cf; }
.wla-next__eyebrow { margin: 0 0 4px; font-size: .85rem; font-weight: 650; letter-spacing: .02em; color: #a9cdb9; }
.wla-next h2 { margin: 0 0 6px; font-family: var(--wla-display); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); line-height: 1.15; color: #fff; letter-spacing: -.015em; }
.wla-next p { margin: 0; color: #d3dfd8; max-width: 52ch; }
.wla-next .wlo-btn { position: relative; z-index: 1; justify-self: start; background: #fff; color: var(--wla-ink); border-color: #fff; }
.wla-next .wlo-btn:hover { background: var(--wla-sage-soft); border-color: var(--wla-sage-soft); color: var(--wla-ink); }
.wla-next--calm { background: var(--wla-card); color: var(--wla-text); box-shadow: var(--wla-shadow); border: 1px solid var(--wla-line); }
.wla-next--calm::after { display: none; }
.wla-next--calm .wla-next__icon { background: var(--wla-sage-soft); color: var(--wla-sage-ink); }
.wla-next--calm .wla-next__eyebrow { color: var(--wla-sage-ink); }
.wla-next--calm h2 { color: var(--wla-ink); }
.wla-next--calm p { color: var(--wla-muted); }
@media (min-width: 700px) {
	.wla-next { grid-template-columns: auto 1fr auto; align-items: center; padding: 28px 32px; }
	.wla-next .wlo-btn { justify-self: end; }
}

/* ---------------------------------------------------------------- Sections */
.wla-section { margin: 0 0 28px; }
.wla-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.wla-section__t { font-family: var(--wla-display); font-size: 1.15rem; color: var(--wla-ink); margin: 0 0 12px; letter-spacing: -.01em; }
.wla-split { display: grid; gap: 24px; }
@media (min-width: 900px) {
	.wla-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
	.wla-split--plan { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
}

/* Plan cards */
.wla-plans { display: grid; gap: 14px; }
@media (min-width: 700px) { .wla-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wla-plan {
	display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--wla-r); text-decoration: none; color: inherit;
	background: var(--wla-card); border: 1px solid var(--wla-line); box-shadow: var(--wla-shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.wla-plan:hover { transform: translateY(-2px); border-color: #c9d6cd; box-shadow: 0 2px 4px rgba(19, 38, 60, .05), 0 16px 32px -16px rgba(19, 38, 60, .22); }
.wla-plan__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wla-plan h3 { margin: 0; font-family: var(--wla-display); font-size: 1.12rem; color: var(--wla-ink); line-height: 1.25; }
.wla-plan__hint { margin: 0; color: var(--wla-muted); font-size: .95rem; }
.wla-plan__go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--wla-sage-ink); font-weight: 650; font-size: .92rem; }
.wla-plan__go .wla-i { width: 18px; height: 18px; transition: transform .15s ease; }
.wla-plan:hover .wla-plan__go .wla-i { transform: translateX(3px); }

/* Steps (segmented progress) */
.wla-steps { list-style: none; margin: 4px 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.wla-steps li { position: relative; padding-top: 12px; font-size: .72rem; line-height: 1.25; color: var(--wla-muted); }
.wla-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--wla-paper-2); }
.wla-steps li.is-done::before { background: var(--wla-sage); }
.wla-steps li.is-now::before { background: linear-gradient(90deg, var(--wla-sage) 50%, var(--wla-paper-2) 50%); }
.wla-steps li.is-now { color: var(--wla-ink); font-weight: 650; }
.wla-steps li span { display: none; }
.wla-steps li.is-now span { display: block; }
@media (min-width: 560px) { .wla-steps li span { display: block; } }

/* Status block on a plan */
.wla-status { background: var(--wla-card); border: 1px solid var(--wla-line); border-radius: 22px; padding: 22px; box-shadow: var(--wla-shadow); margin-bottom: 24px; display: grid; gap: 12px; justify-items: start; }
.wla-status .wla-steps { width: 100%; }
.wla-status .wlo-lead { margin: 0; }
.wla-status .wlo-callout { width: 100%; margin: 0; }

.wla-card.wlo-card { border-radius: var(--wla-r); box-shadow: var(--wla-shadow); border-color: var(--wla-line); margin-bottom: 20px; }

/* Documents */
.wla-docs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.wla-docs li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border: 1px solid var(--wla-line); border-radius: 14px; background: #fbfcfa; }
.wla-docs__i { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--wla-sage-soft); color: var(--wla-sage-ink); }
.wla-docs__name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.wla-docs__name small { display: block; font-weight: 400; color: var(--wla-muted); font-size: .85rem; }
.wla-docs .wlo-btn { padding: .55rem; min-height: 44px; min-width: 44px; }
.wlo-upload summary { display: flex; align-items: center; gap: 8px; }

/* Timeline */
.wla-timeline { background: var(--wla-card); border: 1px solid var(--wla-line); border-radius: var(--wla-r); padding: 22px; box-shadow: var(--wla-shadow); }
.wla-timeline__intro { font-size: .95rem; }
.wla-timeline ol { list-style: none; margin: 0; padding: 0; position: relative; }
.wla-timeline ol::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--wla-paper-2); }
.wla-timeline li { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: 14px; padding: 0 0 18px; }
.wla-timeline li:last-child { padding-bottom: 0; }
.wla-timeline__dot { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--wla-sage); margin-top: 4px; position: relative; }
.wla-timeline li:first-child .wla-timeline__dot { background: var(--wla-sage); box-shadow: 0 0 0 4px var(--wla-sage-soft); }
.wla-timeline p { margin: 0; font-weight: 550; color: var(--wla-ink); }
.wla-timeline small { color: var(--wla-muted); font-size: .85rem; }
.wla-timeline blockquote { margin: 6px 0 4px; padding: 8px 12px; border-left: 3px solid var(--wla-sage); background: var(--wla-paper); border-radius: 0 10px 10px 0; font-size: .95rem; }

/* Help card */
.wla-help { background: var(--wla-sage-soft); border-radius: var(--wla-r); padding: 22px; }
.wla-help__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--wla-sage-ink); margin-bottom: 10px; }
.wla-help h2 { font-family: var(--wla-display); font-size: 1.15rem; margin: 0 0 4px; color: var(--wla-ink); }
.wla-help p { margin: 0 0 14px; color: #34463f; }
.wla-help__phone { margin: 14px 0 0 !important; font-size: .95rem; }

/* Flows (approve / sign) */
.wla-flow__steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 16px; counter-reset: s; }
.wla-flow__steps li { counter-increment: s; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--wla-card); border: 1px solid var(--wla-line); font-weight: 600; font-size: .9rem; color: var(--wla-muted); }
.wla-flow__steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--wla-paper-2); font-size: .8rem; }
.wla-flow__steps li.is-now { color: var(--wla-ink); border-color: var(--wla-sage); }
.wla-flow__steps li.is-now::before, .wla-flow__steps li.is-done::before { background: var(--wla-sage); color: #fff; }
.wla-ticks { margin: 12px 0 0; padding-left: 1.2em; color: var(--wla-muted); }
.wla-ticks li { margin: .25em 0; }
.wla-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.wla-changes summary { cursor: pointer; list-style: none; }
.wla-changes summary::-webkit-details-marker { display: none; }
.wla-changes summary::after { content: "+"; float: right; font-size: 1.4rem; line-height: 1; color: var(--wla-sage-ink); }
.wla-changes[open] summary::after { content: "–"; }
.wla-changes form { margin-top: 14px; }
.wla .wlo-check { align-items: flex-start; }
fieldset.wlo-field { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: 10px; }
fieldset.wlo-field .wlo-check { padding: 12px 14px; border: 1px solid var(--wla-line); border-radius: 12px; background: #fbfcfa; margin: 0; }
fieldset.wlo-field .wlo-check:has(input:checked) { border-color: var(--wla-sage); background: #f3f8f5; }

/* Choice cards (radio) */
.wla-choice { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: 8px; }
.wla-choice legend { font-weight: 650; margin-bottom: 8px; padding: 0; }
.wla-choice__opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--wla-line); border-radius: 14px; background: #fff; cursor: pointer; }
.wla-choice__opt input { margin-top: 4px; accent-color: var(--wla-navy); width: 18px; height: 18px; }
.wla-choice__opt strong { display: block; font-weight: 650; }
.wla-choice__opt small { display: block; color: var(--wla-muted); font-size: .9rem; line-height: 1.4; }
.wla-choice__opt:has(input:checked) { border-color: var(--wla-navy); background: #f6f8fb; }
.wla-choice--row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.wla-method { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--wla-paper); color: var(--wla-text); }
.wla-method .wla-i { color: var(--wla-sage-ink); margin-top: 2px; }
.wla-confirm { border: 1px solid var(--wla-line); border-radius: 14px; padding: 14px 16px; margin: 0 0 1rem; background: #fbfcfa; }
.wla-confirm legend { font-weight: 650; padding: 0 6px; }
.wla-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.wla-inline .wlo-field { margin: 0; min-width: 140px; flex: 0 1 180px; }
.wla-signout { margin: 8px 0 0; }
.wla-signout a { display: inline-flex; gap: 8px; align-items: center; color: var(--wla-muted); font-weight: 600; text-decoration: none; }
.wla-links { margin: 0; padding-left: 1.2em; }
.wla-chat .wlo-thread { max-height: 60vh; }

/* ---------------------------------------------------------------- Solo (signed out) */
body.wla-is-solo { background: radial-gradient(100% 60% at 50% 0%, #e5eee8 0%, rgba(229, 238, 232, 0) 70%), var(--wla-paper); }
.wla-solo { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.wla-solo__card { width: 100%; max-width: 440px; background: var(--wla-card); border: 1px solid var(--wla-line); border-radius: 26px; padding: 28px 24px; box-shadow: 0 30px 60px -36px rgba(19, 38, 60, .45); }
.wla-solo__card .wla-logo { margin: 0 0 22px; }
.wla-solo__card .wla-logo img { height: 42px; }
.wla-solo__card .wlo-h2 { margin-bottom: .3em; }
.wla-solo__foot { margin: 18px 0 0; text-align: center; color: var(--wla-muted); font-size: .95rem; }
.wla-solo__back { margin: 18px 0 0; font-size: .95rem; }
.wla-solo__back a { color: var(--wla-muted); text-decoration: none; }
@media (min-width: 520px) { .wla-solo__card { padding: 36px 36px 32px; } }

.wla-codeflow form { display: grid; gap: 4px; }
.wla-codeflow .wlo-btn--block { margin-top: 6px; }
.wla-alt { justify-self: center; margin-top: 10px; }
.wla-alt-row { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-top: 12px; font-size: .95rem; }
.wla-sendto { background: var(--wla-paper); border-radius: 12px; padding: 10px 14px; margin: 4px 0 12px; }
.wla-code input {
	font-size: 1.7rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 650;
	padding: .55rem .4rem .55rem .9rem !important;
}
.wla-code input::placeholder { letter-spacing: .35em; color: #c3ccc6; }

.wla-solo-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; max-width: 1100px; margin: 0 auto; }
.wla-solo-top .wla-logo img { height: 36px; }
.wla-solo-top__link { font-weight: 650; color: var(--wla-navy); text-decoration: none; padding: .5rem .9rem; border-radius: 999px; border: 1.5px solid var(--wla-line); background: #fff; }
.wla-start { padding: 8px 16px 64px; max-width: 1100px; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
	.wla *, .wla *::before, .wla *::after { transition: none !important; animation: none !important; }
}
fieldset.wlo-field .wlo-check span, .wla-solo .wlo-check span { font-weight: 500; }
.wla-plan__top { flex-wrap: wrap; }
.wla-plan__top h3 { flex: 1 1 160px; }
.wla-plans > .wla-plan:only-child { grid-column: 1 / -1; }
@media (max-width: 480px) { .wla-plan__top .wlo-badge { order: 2; } }
