/*
 * URSY Markets v2 — ported from the Claude Design "URSY Markets v2" canvas.
 * Tokens are keyed to the theme's own no-JS defaults (html[data-profile],
 * html[data-mode]) and OVERRIDDEN by the estate native surface's attributes
 * (html[data-uns-profile], html[data-uns-mode]) — the estate surface owns the
 * live appearance state, so its rules come second and win.
 */

:root {
	--h1: 195;
	--h2: 300;
	--c: .15;
	--bg: oklch(.985 .004 250);
	--sf: #fff;
	--sf2: oklch(.962 .008 250);
	--sf3: oklch(.93 .012 250);
	--ink: oklch(.19 .02 265);
	--ink2: oklch(.43 .02 265);
	--ink3: oklch(.58 .02 265);
	--line: oklch(.19 .02 265/.08);
	--line2: oklch(.19 .02 265/.16);
	--acc: oklch(.62 var(--c) var(--h1));
	--acc2: oklch(.6 var(--c) var(--h2));
	--acc-text: oklch(.4 .13 var(--h1));
	--acc-soft: oklch(.62 var(--c) var(--h1)/.14);
	--acc2-text: oklch(.4 .14 var(--h2));
	--acc2-soft: oklch(.6 var(--c) var(--h2)/.14);
	--ok: oklch(.52 .14 150);
	--ok-text: oklch(.38 .11 150);
	--ok-soft: oklch(.6 .14 150/.15);
	--warn: oklch(.66 .15 70);
	--warn-text: oklch(.42 .11 65);
	--warn-soft: oklch(.75 .15 75/.22);
	--hot: oklch(.62 .2 30);
	--hot-text: oklch(.45 .17 30);
	--hot-soft: oklch(.65 .2 30/.14);
	--glass: oklch(1 0 0/.72);
	--title-accent: oklch(.6 .15 var(--h1));
	--field: radial-gradient(1000px 520px at 12% -8%, oklch(.94 .06 var(--h1)/.8), transparent 60%), radial-gradient(900px 560px at 92% -6%, oklch(.94 .06 var(--h2)/.7), transparent 60%), radial-gradient(700px 420px at 55% 6%, oklch(.97 .03 var(--h1)/.55), transparent 60%);
	--r: 22px;
	--r2: 14px;
	--r3: 8px;
	--shadow: 0 1px 2px oklch(.19 .02 265/.05), 0 24px 48px -32px oklch(.19 .02 265/.28);
	--font-sans: 'Instrument Sans', system-ui, sans-serif;
	--font-disp: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
	--font-serif: 'Instrument Serif', Georgia, serif;
	--font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Colour profiles — theme fallback attribute first, estate surface wins. */
html[data-profile="orchard"] { --h1: 145; --h2: 95; }
html[data-profile="ember"] { --h1: 40; --h2: 350; }
html[data-profile="slate"] { --h1: 250; --h2: 220; --c: .06; }
html[data-profile="ocean"] { --h1: 250; --h2: 200; }
html[data-profile="ice"] { --h1: 215; --h2: 280; --c: .1; }
html[data-uns-profile="aurora"] { --h1: 195; --h2: 300; --c: .15; }
html[data-uns-profile="orchard"] { --h1: 145; --h2: 95; --c: .15; }
html[data-uns-profile="ember"] { --h1: 40; --h2: 350; --c: .15; }
html[data-uns-profile="slate"] { --h1: 250; --h2: 220; --c: .06; }
html[data-uns-profile="ocean"] { --h1: 250; --h2: 200; --c: .15; }
html[data-uns-profile="ice"] { --h1: 215; --h2: 280; --c: .1; }

/* Dark mode — light is the default everywhere. */
html[data-mode="dark"],
html[data-uns-mode="dark"] {
	--bg: oklch(.15 .015 265);
	--sf: oklch(.19 .015 265);
	--sf2: oklch(.235 .015 265);
	--sf3: oklch(.29 .015 265);
	--ink: oklch(.96 .005 250);
	--ink2: oklch(.76 .01 260);
	--ink3: oklch(.62 .01 260);
	--line: oklch(1 0 0/.09);
	--line2: oklch(1 0 0/.16);
	--acc-text: oklch(.82 .1 var(--h1));
	--acc-soft: oklch(.62 var(--c) var(--h1)/.24);
	--acc2-text: oklch(.82 .1 var(--h2));
	--acc2-soft: oklch(.6 var(--c) var(--h2)/.24);
	--ok-text: oklch(.82 .12 150);
	--ok-soft: oklch(.6 .14 150/.24);
	--warn-text: oklch(.86 .12 75);
	--warn-soft: oklch(.75 .15 75/.24);
	--hot-text: oklch(.82 .12 30);
	--hot-soft: oklch(.65 .2 30/.24);
	--glass: oklch(.2 .015 265/.7);
	--title-accent: oklch(.8 .11 var(--h1));
	--field: radial-gradient(1000px 520px at 12% -8%, oklch(.35 .09 var(--h1)/.7), transparent 60%), radial-gradient(900px 560px at 92% -6%, oklch(.33 .09 var(--h2)/.7), transparent 60%);
	--shadow: 0 30px 60px -40px rgba(0, 0, 0, .8);
}
html[data-uns-mode="light"] {
	--bg: oklch(.985 .004 250);
	--sf: #fff;
	--sf2: oklch(.962 .008 250);
	--sf3: oklch(.93 .012 250);
	--ink: oklch(.19 .02 265);
	--ink2: oklch(.43 .02 265);
	--ink3: oklch(.58 .02 265);
	--line: oklch(.19 .02 265/.08);
	--line2: oklch(.19 .02 265/.16);
	--acc-text: oklch(.4 .13 var(--h1));
	--acc-soft: oklch(.62 var(--c) var(--h1)/.14);
	--acc2-text: oklch(.4 .14 var(--h2));
	--acc2-soft: oklch(.6 var(--c) var(--h2)/.14);
	--ok-text: oklch(.38 .11 150);
	--ok-soft: oklch(.6 .14 150/.15);
	--warn-text: oklch(.42 .11 65);
	--warn-soft: oklch(.75 .15 75/.22);
	--hot-text: oklch(.45 .17 30);
	--hot-soft: oklch(.65 .2 30/.14);
	--glass: oklch(1 0 0/.72);
	--title-accent: oklch(.6 .15 var(--h1));
	--field: radial-gradient(1000px 520px at 12% -8%, oklch(.94 .06 var(--h1)/.8), transparent 60%), radial-gradient(900px 560px at 92% -6%, oklch(.94 .06 var(--h2)/.7), transparent 60%), radial-gradient(700px 420px at 55% 6%, oklch(.97 .03 var(--h1)/.55), transparent 60%);
	--shadow: 0 1px 2px oklch(.19 .02 265/.05), 0 24px 48px -32px oklch(.19 .02 265/.28);
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	background-image: var(--field);
	background-repeat: no-repeat;
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--acc-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
img { max-width: 100%; height: auto; }
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	word-wrap: normal !important;
}
.skip-link:focus {
	position: fixed; left: 12px; top: 12px; z-index: 100;
	width: auto; height: auto; clip: auto;
	background: var(--ink); color: var(--bg);
	padding: 10px 16px; border-radius: 10px;
	font: 600 13px var(--font-sans);
}

@keyframes ursyMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ursyIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes ursyRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ursyPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes ursySpin { to { transform: rotate(360deg); } }
@keyframes ursyDraw { to { stroke-dashoffset: 0; } }
@keyframes ursyPop { from { opacity: 0; transform: translate(-50%, -50%) scale(.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* Layout primitives */
.u-wrap { max-width: 1280px; margin: 0 auto; padding-left: clamp(16px, 2.5vw, 32px); padding-right: clamp(16px, 2.5vw, 32px); }
.u-stack { display: flex; flex-direction: column; }
.u-row { display: flex; flex-wrap: wrap; align-items: center; }
.u-eyebrow { font: 700 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.u-kicker { font: 700 11px var(--font-mono); letter-spacing: .12em; color: var(--acc-text); text-transform: uppercase; }
.u-h1 { margin: 12px 0 0; font: 500 clamp(36px, 5vw, 68px)/1.04 var(--font-disp); letter-spacing: -.04em; text-wrap: balance; }
.u-h2 { margin: 12px 0 0; font: 500 clamp(30px, 3.8vw, 52px)/1.02 var(--font-disp); letter-spacing: -.035em; text-wrap: balance; }
.u-h1 em, .u-h2 em { font: italic 400 1em var(--font-serif); color: var(--title-accent); letter-spacing: -.02em; }
.u-lead { margin: 10px 0 0; max-width: 560px; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.5; color: var(--ink2); text-wrap: pretty; }
.u-section { padding-top: clamp(48px, 7vw, 104px); }
.u-section--tight { padding-top: clamp(28px, 4.5vw, 64px); }

/* Network strip (theme fallback only — the estate chrome supplies its own) */
.u-netstrip { overflow: hidden; height: 30px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.u-netstrip__inner { display: flex; width: max-content; animation: ursyMarquee 140s linear infinite; font: 500 11px var(--font-mono); color: var(--ink3); letter-spacing: .04em; }
.u-netstrip__inner > span { flex: none; padding-right: 56px; white-space: nowrap; }
.u-netstrip__inner b { color: var(--ink); font-weight: 700; }

/* Header */
.u-header { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--bg) 76%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.u-header__bar { height: 64px; display: flex; align-items: center; gap: 12px; }
.u-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); white-space: nowrap; flex: none; }
.u-brand:hover { text-decoration: none; }
.u-brand__mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--acc), var(--acc2)); display: grid; place-items: center; color: #fff; font: italic 400 21px var(--font-serif); box-shadow: 0 8px 20px -10px var(--acc); }
.u-brand__word { font: 700 16px var(--font-disp); letter-spacing: -.01em; }
.u-brand__word em { font-style: normal; font-weight: 400; color: var(--ink2); }
.u-nav { display: none; gap: 2px; padding: 3px; border-radius: 12px; background: var(--sf2); margin-left: 6px; flex: none; }
.u-nav a { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 9px; font: 600 13px var(--font-sans); white-space: nowrap; color: var(--ink2); }
.u-nav a:hover { text-decoration: none; color: var(--ink); }
.u-nav a[aria-current="page"] { background: var(--sf); color: var(--ink); box-shadow: 0 1px 2px oklch(.19 .02 265/.1); }
.u-header__end { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; flex: none; }
@media (min-width: 900px) { .u-nav { display: flex; } }

/* Buttons and chips */
.u-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--glass); color: var(--ink); font: 600 13px var(--font-sans); cursor: pointer; white-space: nowrap; }
.u-btn:hover { text-decoration: none; border-color: var(--ink3); }
.u-btn--primary { border: 0; background: var(--ink); color: var(--bg); }
.u-btn--primary:hover { opacity: .9; }
.u-iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: var(--glass); display: grid; place-items: center; cursor: pointer; padding: 0; }
.u-iconbtn > span { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, var(--acc), var(--acc2)); }
.u-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font: 700 10px var(--font-mono); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
a.u-chip:hover { text-decoration: none; opacity: .8; }
.u-chip--acc { background: var(--acc-soft); color: var(--acc-text); }
.u-chip--acc2 { background: var(--acc2-soft); color: var(--acc2-text); }
.u-chip--ok { background: var(--ok-soft); color: var(--ok-text); height: 34px; padding: 0 12px; border-radius: 10px; font-size: 11px; letter-spacing: .06em; }
.u-chip--ok-solid { background: var(--ok); color: #fff; }
.u-chip--warn { background: var(--warn-soft); color: var(--warn-text); }
.u-chip--ink { background: var(--ink); color: var(--bg); }
.u-chip--quiet { background: var(--sf2); color: var(--ink2); }
.u-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: ursyPulse 1.6s ease-in-out infinite; }
.u-hide-sm { display: none !important; }
@media (min-width: 760px) { .u-hide-sm { display: inline-flex !important; } }

/* Appearance panel (theme fallback only) */
.u-appearance { position: absolute; top: 46px; right: 0; width: 288px; background: var(--sf); border: 1px solid var(--line2); border-radius: var(--r2); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .35); padding: 16px; z-index: 30; display: none; flex-direction: column; gap: 12px; animation: ursyIn .25s ease-out; }
.u-appearance[data-open="1"] { display: flex; }
.u-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.u-swatch { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px; border-radius: var(--r3); background: var(--sf); cursor: pointer; color: var(--ink); font: 500 12px var(--font-sans); border: 1px solid var(--line); }
.u-swatch[aria-pressed="true"] { border-color: var(--ink); font-weight: 700; }
.u-swatch i { width: 100%; height: 24px; border-radius: 6px; }
.u-seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--sf2); }
.u-seg button { flex: 1; height: 30px; border-radius: 8px; border: 0; font: 600 12px var(--font-sans); cursor: pointer; background: transparent; color: var(--ink2); }
.u-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Hero */
.u-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(28px, 5vw, 72px); }
.u-hero__copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.u-hero__badge { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 10px; background: var(--glass); border: 1px solid var(--line2); font: 700 11px var(--font-mono); letter-spacing: .1em; color: var(--ink2); animation: ursyRise .6s ease-out both; }
.u-hero__copy .u-h1 { margin: 0; font-size: clamp(42px, 5.4vw, 80px); animation: ursyRise .7s .05s ease-out both; }
.u-hero__copy .u-lead { margin: 0; max-width: 520px; animation: ursyRise .7s .1s ease-out both; }
.u-doorways { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; width: 100%; max-width: 560px; animation: ursyRise .7s .15s ease-out both; }
.u-door { text-align: left; padding: 18px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--glass); backdrop-filter: blur(10px); color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.u-door:hover { transform: translateY(-3px); text-decoration: none; }
.u-door__k { font: 700 10px var(--font-mono); letter-spacing: .12em; color: var(--acc-text); }
.u-door__t { font: 600 20px/1.1 var(--font-disp); letter-spacing: -.02em; }
.u-door__d { font-size: 13px; color: var(--ink2); line-height: 1.45; }
.u-door__go { margin-top: 4px; font: 600 13px var(--font-sans); color: var(--acc-text); }
.u-door--dark { border: 0; background: var(--ink); color: var(--bg); }
.u-door--dark .u-door__k { color: inherit; opacity: .65; }
.u-door--dark .u-door__d { color: inherit; opacity: .72; }
.u-door--dark code { margin-top: 4px; font: 600 11px var(--font-mono); padding: 6px 8px; border-radius: 6px; background: oklch(1 0 0/.12); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Arena */
.u-arenaCol { min-width: 0; display: flex; flex-direction: column; gap: 12px; animation: ursyRise .8s .1s ease-out both; }
.u-arena { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; margin: 0 auto; border-radius: var(--r); background: linear-gradient(160deg, oklch(1 0 0/.75), oklch(1 0 0/.35)); border: 1px solid var(--line2); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
html[data-mode="dark"] .u-arena, html[data-uns-mode="dark"] .u-arena { background: linear-gradient(160deg, oklch(.22 .015 265/.8), oklch(.19 .015 265/.5)); }
.u-arena__sweep { position: absolute; inset: 9%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 80%, var(--acc-soft) 100%); animation: ursySpin 18s linear infinite; }
.u-arena__dash { position: absolute; inset: 26%; border-radius: 50%; border: 1px dashed var(--line2); }
.u-arena__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.u-arena__svg circle { fill: none; stroke: var(--line2); stroke-width: .35; }
.u-arena__svg line { stroke: var(--acc); stroke-width: .7; stroke-linecap: round; stroke-dasharray: 200; stroke-dashoffset: 200; animation: ursyDraw 1.1s cubic-bezier(.2, .7, .2, 1) forwards; }
.u-orbWrap { position: absolute; width: 0; height: 0; }
.u-orb { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--sf); padding: 0; display: grid; place-items: center; color: #fff; font: 600 17px var(--font-mono); cursor: pointer; transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s; transform: translate(-50%, -50%) scale(1); }
.u-orb[data-active="1"] { transform: translate(-50%, -50%) scale(1.22); box-shadow: 0 0 0 5px var(--acc-soft); }
.u-orb__tag { position: absolute; left: 0; top: 28px; transform: translateX(-50%); white-space: nowrap; font: 700 10px var(--font-mono); color: var(--ink); background: var(--glass); border: 1px solid var(--line2); padding: 2px 7px; border-radius: 6px; animation: ursyIn .3s ease-out; }
.u-arena__center { position: absolute; left: 50%; top: 50%; width: 36%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--sf); border: 1px solid var(--line2); box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .35); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 10%; animation: ursyPop .5s ease-out both; }
.u-arena__center .u-chip { letter-spacing: .08em; }
.u-arena__big { font: 500 clamp(20px, 3vw, 30px)/1 var(--font-disp); letter-spacing: -.03em; }
.u-arena__job { font: 600 10px var(--font-mono); color: var(--acc-text); }
.u-arena__live { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 700 10px var(--font-mono); letter-spacing: .1em; }
.u-arena__live i { width: 6px; height: 6px; border-radius: 50%; background: oklch(.75 .17 150); animation: ursyPulse 1.6s ease-in-out infinite; font-style: normal; }
.u-arena__ro { position: absolute; right: 14px; top: 14px; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--glass); border: 1px solid var(--line2); font: 700 10px var(--font-mono); letter-spacing: .1em; color: var(--ink2); display: inline-flex; align-items: center; }
.u-arena__caption { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--r2); background: var(--sf); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 560px; width: 100%; margin: 0 auto; animation: ursyIn .5s ease-out both; }
.u-arena__caption .u-avatar { width: 36px; height: 36px; font-size: 15px; }
.u-arena__caption p { margin: 0; min-width: 0; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.u-arena__caption b { color: var(--ink); font-weight: 600; }
.u-arena__caption .u-when { font: 500 11px var(--font-mono); color: var(--ink3); }
.u-arena__caption .u-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }

/* Stat tiles */
.u-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.u-stat { padding: 20px; border-radius: var(--r2); background: var(--sf); border: 1px solid var(--line); box-shadow: var(--shadow); }
.u-stat__n { font: 500 40px/1 var(--font-disp); letter-spacing: -.04em; }
.u-stat__l { margin-top: 10px; font: 700 10px var(--font-mono); letter-spacing: .12em; color: var(--ink3); text-transform: uppercase; }
.u-stat--ink { background: var(--ink); color: var(--bg); border: 0; }
.u-stat--ink .u-stat__l { color: inherit; opacity: .65; }
.u-stat__note { margin-top: 6px; font-size: 12px; color: var(--ink3); line-height: 1.4; }

/* Steps */
.u-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 32px; }
.u-step { padding: 22px 22px 24px; border-radius: var(--r2); background: var(--sf); border: 1px solid var(--line); box-shadow: var(--shadow); }
.u-step__num { font: 300 72px/1 var(--font-disp); letter-spacing: -.05em; background: linear-gradient(135deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.u-step__t { margin-top: 14px; font: 600 19px/1.15 var(--font-disp); letter-spacing: -.02em; }
.u-step p { margin: 8px 0 0; color: var(--ink2); font-size: 14px; line-height: 1.5; }

/* Family tiles and cards */
.u-tile { border-radius: 12px; display: grid; place-items: center; font: 600 20px var(--font-mono); color: #fff; flex: none; }
.u-famgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 28px; }
.u-famrow { text-align: left; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--sf); color: var(--ink); box-shadow: var(--shadow); transition: transform .2s; }
.u-famrow:hover { transform: translateY(-2px); border-color: var(--line2); text-decoration: none; }
.u-famrow .u-tile { width: 42px; height: 42px; }
.u-famrow__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.u-famrow__n { font: 600 14px/1.2 var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-famrow__s { font: 500 11px var(--font-mono); color: var(--ink3); }
.u-famcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.u-famcard { text-align: left; background: var(--sf); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: var(--ink); min-height: 172px; transition: transform .2s; }
.u-famcard:hover { transform: translateY(-2px); border-color: var(--line2); text-decoration: none; }
.u-famcard__top { display: flex; align-items: center; gap: 10px; width: 100%; }
.u-famcard__top .u-tile { width: 40px; height: 40px; }
.u-famcard__num { margin-left: auto; font: 700 10px var(--font-mono); letter-spacing: .1em; color: var(--ink3); }
.u-famcard__t { font: 600 17px/1.2 var(--font-disp); letter-spacing: -.01em; }
.u-famcard__d { font-size: 13px; color: var(--ink2); line-height: 1.45; }
.u-famcard__chips { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.u-famcard__chips span { font: 500 11px var(--font-sans); padding: 3px 8px; border-radius: 6px; background: var(--sf2); color: var(--ink2); }
.u-famcard__chips i { font: 500 11px var(--font-mono); padding: 3px 8px; color: var(--ink3); font-style: normal; }

/* Panels, columns */
.u-cols { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.u-panel { background: var(--sf); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.u-panel__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.u-panel__head .u-t { font: 600 18px var(--font-disp); letter-spacing: -.01em; }
.u-panel__head .u-s { font: 700 10px var(--font-mono); letter-spacing: .1em; color: var(--ink3); text-transform: uppercase; }
.u-panel__head .u-end { margin-left: auto; font: 500 12px var(--font-mono); color: var(--ink3); white-space: nowrap; }
.u-panel__empty { margin: 0; padding: 18px 20px; font-size: 14px; color: var(--ink3); }

/* Open book rows */
.u-joblink { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--ink); }
.u-joblink:hover { background: var(--sf2); text-decoration: none; }
.u-joblink:last-child { border-bottom: 0; }
.u-joblink > span:first-child { width: 40px; height: 40px; font-size: 19px; }
.u-joblink b { font: 600 15px/1.25 var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.u-joblink__sub { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 500 12px var(--font-mono); color: var(--ink3); margin-top: 4px; }
.u-joblink__sub span:first-child { color: var(--acc-text); }
.u-joblink__price { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.u-joblink__price b { font: 600 16px var(--font-disp); letter-spacing: -.02em; white-space: nowrap; }

/* Feed record cards */
.u-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--sf); display: grid; place-items: center; color: #fff; font: 600 18px var(--font-mono); flex: none; }
.u-record { background: var(--sf); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; animation: ursyIn .5s ease-out both; }
.u-record__meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; font-size: 13px; color: var(--ink3); }
.u-record__who { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.u-record__who a { font: 600 15px var(--font-sans); color: var(--ink); }
.u-record__time { font: 500 12px var(--font-mono); white-space: nowrap; padding-top: 3px; }
.u-verified { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--ok); color: #fff; font: 700 9px var(--font-mono); }
.u-record__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.u-fields { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: var(--r3); }
.u-fields span { font: 500 12px var(--font-mono); padding: 5px 9px; border-radius: 6px; background: oklch(1 0 0/.5); overflow-wrap: anywhere; display: inline-flex; gap: 6px; align-items: baseline; color: var(--ink2); }
html[data-mode="dark"] .u-fields span, html[data-uns-mode="dark"] .u-fields span { background: oklch(0 0 0/.25); }
.u-fields i { opacity: .6; text-transform: uppercase; font-size: 10px; letter-spacing: .08em; font-style: normal; }
.u-record__actions { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font: 500 12px var(--font-mono); color: var(--ink3); }
.u-record__actions i { font-style: normal; }
.u-record__actions a { font: 600 13px var(--font-sans); }

/* Habitat chip rail */
.u-rail { display: flex; gap: 8px; overflow-x: auto; margin-top: 16px; padding-bottom: 2px; scrollbar-width: none; }
.u-rail::-webkit-scrollbar { height: 0; }
.u-railchip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 6px; border-radius: 11px; border: 1px solid var(--line); background: var(--sf); color: var(--ink); font: 600 13px var(--font-sans); white-space: nowrap; }
.u-railchip:hover { border-color: var(--line2); text-decoration: none; }
.u-railchip[aria-current="page"] { border-color: var(--ink); }
.u-railchip .u-tile { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
.u-railchip .u-count { font: 500 11px var(--font-mono); color: var(--ink3); }

/* Room hero */
.u-roomhero { border-radius: var(--r); border: 1px solid var(--line2); background: linear-gradient(135deg, var(--acc-soft), var(--acc2-soft)); padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow); animation: ursyRise .5s ease-out both; }
.u-roomhero__rule { margin-top: 20px; padding: 12px 16px; border-radius: var(--r2); background: var(--ink); color: var(--bg); font: 500 13px/1.5 var(--font-mono); }
.u-glassstat { padding: 14px 16px; border-radius: var(--r2); background: var(--glass); border: 1px solid var(--line2); }
.u-glassstat .u-stat__n { font-size: 26px; }
.u-glassstat .u-stat__l { margin-top: 6px; color: var(--ink2); }

/* Directory rows */
.u-dirrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.u-dirrow:hover { background: var(--sf2); text-decoration: none; }
.u-dirrow:last-child { border-bottom: 0; }
.u-dirrow .u-avatar { width: 34px; height: 34px; font-size: 14px; border: 0; }
.u-dirrow__name { font: 600 14px var(--font-sans); }
.u-dirrow__op { font: 500 11px var(--font-mono); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-dirrow__role { font: 700 10px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }

/* Ledger table */
.u-tablewrap { margin-top: 24px; overflow-x: auto; }
.u-table { min-width: 680px; width: 100%; }
.u-table__head, .u-table__row { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(90px, .7fr) minmax(180px, 1.6fr) minmax(80px, .6fr) minmax(100px, .7fr) auto; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.u-table__head { font: 700 10px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); padding: 12px 20px; }
.u-table__row { font: 500 13px var(--font-mono); }

/* Quickstart dark card */
.u-darkcard { background: var(--ink); color: var(--bg); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.u-darkcard::before { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--acc) 0%, transparent 70%); opacity: .45; }
.u-darkcard > * { position: relative; }
.u-darkcard .u-eyebrow { opacity: .65; }
.u-darkcard pre { margin: 16px 0 0; font: 500 13px/1.75 var(--font-mono); white-space: pre-wrap; }
.u-darkcard pre i { opacity: .5; font-style: normal; }
.u-darkcard p { margin: 14px 0 0; font-size: 13px; line-height: 1.5; opacity: .75; }
.u-darkcard a { display: inline-flex; align-items: center; margin-top: 14px; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--bg); color: var(--ink); font: 600 13px var(--font-sans); }
.u-darkcard a:hover { text-decoration: none; opacity: .9; }

/* Payment rails */
.u-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.u-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--sf2); font: 600 13px var(--font-mono); }
.u-pill--brand { font: 700 14px var(--font-sans); letter-spacing: -.02em; }
.u-pill--off { opacity: .55; }

/* Search bar (links to the machine API — humans read, agents query) */
.u-search { flex: 1 1 320px; display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 8px 0 18px; border-radius: 14px; background: var(--sf); border: 1px solid var(--line2); box-shadow: var(--shadow); color: var(--ink3); }
.u-search:hover { text-decoration: none; border-color: var(--ink3); }
.u-search .u-glyph { font: 500 16px var(--font-mono); }
.u-search .u-hint { flex: 1; font-size: 15px; }
.u-search .u-go { height: 38px; padding: 0 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font: 600 13px var(--font-sans); display: inline-flex; align-items: center; }
.u-ministat { padding: 10px 16px; border-radius: 14px; background: var(--sf); border: 1px solid var(--line); }
.u-ministat .u-stat__n { font-size: 24px; letter-spacing: -.03em; }
.u-ministat .u-stat__l { margin-top: 4px; letter-spacing: .1em; }

/* Footer (theme fallback pieces; the estate chrome injects its own layers) */
.u-footer { margin-top: clamp(56px, 8vw, 112px); border-top: 1px solid var(--line); }
.u-footer__grid { padding-top: 36px; display: flex; flex-wrap: wrap; gap: 28px 48px; }
.u-footer__about { flex: 1 1 260px; }
.u-footer__about p { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink2); max-width: 340px; }
.u-footer__net { flex: 2 1 420px; }
.u-footer__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; font: 500 12px var(--font-mono); color: var(--ink2); }
.u-footer__chips a, .u-footer__chips span { padding: 5px 9px; border-radius: 7px; background: var(--sf2); color: var(--ink2); }
.u-footer__chips a:hover { text-decoration: none; color: var(--ink); }
.u-footer__chips .u-here { background: var(--acc-soft); color: var(--acc-text); font-weight: 700; }
.u-footer__legal { padding-top: 28px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font: 500 11px var(--font-mono); color: var(--ink3); }
.u-footer__legal .u-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 16px; }
.u-footer__legal a { color: var(--ink2); }

/* Reduced motion: everything stays visible, nothing depends on animation. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.u-netstrip__inner { animation: none; }
	.u-arena__sweep { animation: none; opacity: .5; }
}
