/* Futurisca world simulator */

.futu-root {
	--f-bg: #05070c;
	--f-bg-2: #080b12;
	--f-panel: #0c1018;
	--f-panel-2: #11161f;
	--f-panel-3: #161c27;
	--f-line: #1e2634;
	--f-line-2: #2a3446;
	--f-text: #e8edf5;
	--f-dim: #93a1b5;
	--f-faint: #5c6a7f;
	--f-accent: #4cc2ff;
	--f-accent-2: #7d8cff;
	--f-violet: #a78bfa;
	--f-warm: #ffb257;
	--f-hot: #ff6b6b;
	--f-good: #3ddc97;
	--f-h: 900px;
	--f-rail: 320px;
	--f-inspect: 330px;

	position: relative;
	display: block;
	background:
		radial-gradient(1200px 600px at 12% -10%, rgba(76,194,255,0.07), transparent 60%),
		radial-gradient(900px 500px at 92% 110%, rgba(125,140,255,0.07), transparent 60%),
		var(--f-bg);
	color: var(--f-text);
	border: 1px solid var(--f-line);
	border-radius: 14px;
	overflow: hidden;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	min-height: var(--f-h);
	container-type: inline-size;
	-webkit-font-smoothing: antialiased;
}

/* Full bleed: break out of a theme's content column without touching the theme. */
.futu-root.is-full {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	border-radius: 0;
	border-left: 0;
	border-right: 0;
}

.futu-root * { box-sizing: border-box; }
.futu-root button { font: inherit; color: inherit; cursor: pointer; }
.futu-root h1, .futu-root h2, .futu-root h3, .futu-root h4 {
	margin: 0; font-weight: 600; letter-spacing: -0.015em; color: var(--f-text);
}
.futu-root a { color: var(--f-accent); }
.futu-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.futu-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.futu-root ::-webkit-scrollbar { width: 10px; height: 10px; }
.futu-root ::-webkit-scrollbar-track { background: transparent; }
.futu-root ::-webkit-scrollbar-thumb { background: #1d2635; border-radius: 6px; border: 2px solid var(--f-panel); }
.futu-root ::-webkit-scrollbar-thumb:hover { background: #2b3648; }

/* ---------------------------------------------------------------- boot gate */

.futu-boot {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 16px; min-height: var(--f-h); color: var(--f-dim); text-align: center; padding: 30px;
}
.futu-boot-mark {
	width: 54px; height: 54px; border-radius: 50%; position: relative;
	border: 1px solid var(--f-line-2);
	background: radial-gradient(circle at 34% 30%, rgba(76,194,255,0.35), transparent 62%);
}
.futu-boot-mark::after {
	content: ""; position: absolute; inset: -1px; border-radius: 50%;
	border: 2px solid transparent; border-top-color: var(--f-accent);
	animation: futu-spin 1100ms linear infinite;
}
@keyframes futu-spin { to { transform: rotate(360deg); } }
.futu-boot p { margin: 0; font-size: 13px; }
.futu-boot p:first-child { font-size: 15px; color: var(--f-text); font-weight: 600; }
.futu-boot-hint { max-width: 560px; line-height: 1.6; }
.futu-gate {
	padding: 48px 30px; text-align: center; border: 1px dashed #c9ccd1;
	border-radius: 12px; color: #555;
}

/* ------------------------------------------------------------------ layout */

.futu-shell { display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0,1fr); height: var(--f-h); }

.futu-top {
	display: flex; align-items: center; gap: 14px; min-width: 0;
	padding: 10px 18px; border-bottom: 1px solid var(--f-line);
	background: linear-gradient(180deg, rgba(14,19,28,0.95), rgba(10,14,20,0.92));
	backdrop-filter: blur(10px);
}
.futu-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.futu-logo {
	width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; position: relative;
	background: radial-gradient(circle at 33% 28%, #6fd0ff 0%, #2a7fd4 46%, #123a63 100%);
	box-shadow: 0 0 0 1px rgba(76,194,255,0.35), 0 0 18px rgba(76,194,255,0.22);
}
.futu-logo::after {
	content: ""; position: absolute; inset: 4px 2px; border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.22); border-bottom-color: transparent; border-top-color: transparent;
}
.futu-brand b { font-size: 15px; letter-spacing: 0.17em; text-transform: uppercase; }
.futu-brand span { color: var(--f-faint); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }

.futu-tabs { display: flex; gap: 2px; margin-left: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.futu-tabs::-webkit-scrollbar { display: none; }
.futu-tab {
	flex: 0 0 auto; background: none; border: 1px solid transparent; border-radius: 8px;
	padding: 7px 13px; color: var(--f-dim); font-size: 13px; white-space: nowrap;
	transition: color 120ms, background 120ms;
}
.futu-tab:hover { color: var(--f-text); background: var(--f-panel-2); }
.futu-tab[aria-selected="true"] {
	color: var(--f-text); background: var(--f-panel-3); border-color: var(--f-line-2);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.futu-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }

.futu-btn {
	background: var(--f-panel-2); border: 1px solid var(--f-line-2); border-radius: 8px;
	padding: 7px 13px; color: var(--f-text); font-size: 13px; white-space: nowrap;
	transition: border-color 120ms, background 120ms, transform 80ms;
}
.futu-btn:hover { border-color: #3a4a66; background: var(--f-panel-3); }
.futu-btn:active { transform: translateY(1px); }
.futu-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.futu-btn.primary {
	background: linear-gradient(180deg, #5cc8ff, #2f9fe0);
	border-color: #3ba7e6; color: #03131f; font-weight: 650;
	box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 4px 14px rgba(76,194,255,0.22);
}
.futu-btn.primary:hover { background: linear-gradient(180deg, #74d2ff, #3aabec); }
.futu-btn.ghost { background: none; }
.futu-btn.small { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.futu-btn.icon { padding: 6px 9px; }

.futu-sub {
	display: flex; align-items: center; gap: 10px; padding: 7px 18px;
	border-bottom: 1px solid var(--f-line); background: rgba(8,11,18,0.7);
	font-size: 12px; color: var(--f-dim); min-width: 0; overflow-x: auto; scrollbar-width: none;
}
.futu-sub::-webkit-scrollbar { display: none; }
.futu-sub > * { flex: 0 0 auto; white-space: nowrap; }
.futu-sub .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--f-good); flex: 0 0 auto; }
.futu-sub .sep { color: var(--f-line-2); }

.futu-body { display: grid; grid-template-columns: minmax(0,var(--f-rail)) minmax(0,1fr); min-height: 0; min-width: 0; }
.futu-body.with-inspect { grid-template-columns: minmax(0,var(--f-rail)) minmax(0,1fr) minmax(0,var(--f-inspect)); }
.futu-body.no-rail { grid-template-columns: minmax(0,1fr); }

.futu-rail {
	border-right: 1px solid var(--f-line); background: var(--f-panel);
	overflow-y: auto; padding: 15px; min-height: 0; min-width: 0;
}
.futu-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.futu-inspect {
	border-left: 1px solid var(--f-line); background: var(--f-panel);
	overflow-y: auto; padding: 15px; min-height: 0; min-width: 0;
}

.futu-foot {
	display: flex; align-items: center; gap: 14px; min-width: 0;
	padding: 9px 18px; border-top: 1px solid var(--f-line); background: rgba(10,14,20,0.9);
}

/* ------------------------------------------------------------------- forms */

.futu-group { margin-bottom: 20px; }
.futu-group > h3 {
	font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em;
	color: var(--f-faint); margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.futu-group > h3::after { content: ""; flex: 1; height: 1px; background: var(--f-line); }
.futu-field { margin-bottom: 11px; min-width: 0; }
.futu-field label { display: block; font-size: 11.5px; color: var(--f-dim); margin-bottom: 4px; }
.futu-root select, .futu-root input[type="text"], .futu-root input[type="number"],
.futu-root input[type="search"], .futu-root textarea {
	width: 100%; background: var(--f-bg-2); color: var(--f-text);
	border: 1px solid var(--f-line-2); border-radius: 8px; padding: 7px 9px;
	font: inherit; font-size: 13px; outline: none;
}
.futu-root select:focus, .futu-root input:focus, .futu-root textarea:focus {
	border-color: var(--f-accent); box-shadow: 0 0 0 3px rgba(76,194,255,0.12);
}
.futu-root input[type="range"] { width: 100%; accent-color: var(--f-accent); }
.futu-row { display: flex; gap: 8px; min-width: 0; }
.futu-row > * { flex: 1; min-width: 0; }

.futu-lever {
	border: 1px solid var(--f-line-2); border-radius: 10px; padding: 11px;
	margin-bottom: 9px; background: linear-gradient(180deg, var(--f-panel-2), var(--f-panel));
}
.futu-lever-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.futu-lever-head b { font-size: 13px; }
.futu-lever-head .futu-x {
	margin-left: auto; background: none; border: none; color: var(--f-faint);
	padding: 0 3px; font-size: 16px; line-height: 1;
}
.futu-lever-head .futu-x:hover { color: var(--f-hot); }
.futu-lever-meta { font-size: 11.5px; color: var(--f-dim); }
.futu-lever-val { display: flex; align-items: center; gap: 9px; margin: 7px 0 2px; }
.futu-lever-val .futu-num { font-size: 16px; font-weight: 650; min-width: 66px; }
.futu-lever-note { font-size: 11px; color: var(--f-faint); margin-top: 6px; line-height: 1.45; }

.futu-empty { color: var(--f-faint); font-size: 12.5px; padding: 10px 0; line-height: 1.5; }

.futu-preset {
	display: block; width: 100%; text-align: left; background: var(--f-panel-2);
	border: 1px solid var(--f-line); border-radius: 9px; padding: 9px 11px;
	margin-bottom: 7px; font-size: 12.5px; transition: border-color 120ms, transform 80ms;
}
.futu-preset:hover { border-color: var(--f-accent); transform: translateX(2px); }
.futu-preset b { display: block; font-size: 13px; margin-bottom: 2px; }
.futu-preset span { color: var(--f-dim); line-height: 1.45; }

/* --------------------------------------------------------------------- map */

.futu-mapwrap { position: relative; flex: 1; min-height: 0; }
.futu-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.futu-map.dragging { cursor: grabbing; }

.futu-maphud {
	position: absolute; left: 14px; top: 14px; right: 14px; display: flex; gap: 8px;
	flex-wrap: wrap; align-items: flex-start; pointer-events: none; z-index: 3;
}
.futu-maphud > * { pointer-events: auto; }
.futu-maplegend { position: absolute; left: 14px; bottom: 14px; z-index: 3; }
.futu-mapright { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

.futu-bar {
	display: flex; flex-wrap: wrap; gap: 3px; align-items: center;
	background: rgba(8,11,18,0.78); border: 1px solid var(--f-line-2);
	border-radius: 10px; padding: 4px; backdrop-filter: blur(10px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.futu-bar > label { font-size: 10.5px; color: var(--f-faint); padding: 0 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.futu-bar select { background: transparent; border: none; padding: 5px 6px; font-size: 12.5px; width: auto; min-width: 140px; }
.futu-bar select:focus { box-shadow: none; }

.futu-chip {
	background: none; border: 1px solid transparent; border-radius: 7px;
	padding: 5px 10px; font-size: 12px; color: var(--f-dim);
}
.futu-chip:hover { color: var(--f-text); }
.futu-chip[aria-pressed="true"] {
	background: var(--f-panel-3); border-color: var(--f-line-2); color: var(--f-text);
}

.futu-legend {
	background: rgba(8,11,18,0.8); border: 1px solid var(--f-line-2); border-radius: 10px;
	padding: 9px 11px; font-size: 11.5px; color: var(--f-dim);
	backdrop-filter: blur(10px); max-width: 250px; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.futu-legend b { color: var(--f-text); font-size: 12px; }
.futu-legend-bar { height: 8px; border-radius: 4px; margin: 7px 0 4px; }
.futu-legend-ends { display: flex; justify-content: space-between; color: var(--f-faint); }
.futu-legend .note { margin-top: 7px; color: var(--f-faint); line-height: 1.45; }

.futu-tip {
	position: absolute; pointer-events: none; z-index: 8; background: rgba(9,13,20,0.97);
	border: 1px solid var(--f-line-2); border-radius: 10px; padding: 10px 12px; font-size: 12px;
	min-width: 168px; box-shadow: 0 16px 40px rgba(0,0,0,0.55); opacity: 0; transition: opacity 110ms;
}
.futu-tip b { display: block; margin-bottom: 5px; font-size: 13px; }
.futu-tip .r { display: flex; justify-content: space-between; gap: 16px; color: var(--f-dim); }
.futu-tip .r span:last-child { color: var(--f-text); }
.futu-tip .tag { margin-top: 6px; font-size: 10.5px; color: var(--f-faint); }

/* --------------------------------------------------------------- timeline */

.futu-time { display: flex; align-items: center; gap: 13px; width: 100%; min-width: 0; }
.futu-time input[type="range"] { flex: 1; min-width: 60px; }
.futu-year { font-size: 20px; font-weight: 650; min-width: 66px; letter-spacing: -0.02em; }
.futu-play {
	width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--f-line-2);
	background: var(--f-panel-2); display: grid; place-items: center; padding: 0; flex: 0 0 auto;
}
.futu-play:hover { border-color: var(--f-accent); }
.futu-status { font-size: 11.5px; color: var(--f-faint); margin-left: auto; text-align: right; white-space: nowrap; }

.futu-progress { height: 3px; background: var(--f-line); border-radius: 2px; overflow: hidden; width: 150px; }
.futu-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--f-accent), var(--f-accent-2)); width: 0; transition: width 110ms; }

/* ------------------------------------------------------------------- panes */

.futu-pane { flex: 1; overflow-y: auto; padding: 20px 22px; min-height: 0; }
.futu-pane h2 { font-size: 18px; margin-bottom: 5px; letter-spacing: -0.02em; }
.futu-pane .sub { color: var(--f-dim); font-size: 13px; margin-bottom: 18px; max-width: 78ch; }

.futu-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 11px; margin-bottom: 20px; }
.futu-card {
	background: linear-gradient(180deg, var(--f-panel-2), var(--f-panel));
	border: 1px solid var(--f-line); border-radius: 11px; padding: 12px 14px;
}
.futu-card .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--f-faint); }
.futu-card .v { font-size: 22px; font-weight: 650; margin-top: 4px; letter-spacing: -0.02em; }
.futu-card .n { font-size: 11.5px; color: var(--f-dim); margin-top: 3px; }

.futu-block {
	background: linear-gradient(180deg, rgba(17,22,31,0.7), rgba(12,16,24,0.7));
	border: 1px solid var(--f-line); border-radius: 12px; padding: 16px; margin-bottom: 15px;
}
.futu-block > h3 { font-size: 14px; margin-bottom: 4px; }
.futu-block > p.sub { font-size: 12.5px; color: var(--f-dim); margin-bottom: 12px; max-width: 80ch; }
.futu-chart { width: 100%; display: block; }

.futu-branch {
	display: grid; grid-template-columns: 58px 1fr auto; gap: 13px; align-items: center;
	padding: 11px; border: 1px solid var(--f-line); border-radius: 10px; margin-bottom: 8px;
	background: var(--f-panel-2); text-align: left; width: 100%; transition: border-color 120ms;
}
.futu-branch:hover { border-color: var(--f-accent); }
.futu-branch[aria-pressed="true"] { border-color: var(--f-accent); background: #12202e; }
.futu-branch .p { font-size: 19px; font-weight: 650; }
.futu-branch .l { font-size: 13px; }
.futu-branch .s { font-size: 11.5px; color: var(--f-dim); margin-top: 2px; }

.futu-wf { display: flex; flex-direction: column; gap: 3px; }
.futu-wf-row {
	display: grid; grid-template-columns: 180px 1fr 78px; gap: 10px; align-items: center;
	background: none; border: none; border-radius: 7px; padding: 5px 7px; width: 100%; text-align: left;
}
.futu-wf-row:hover { background: var(--f-panel-3); }
.futu-wf-bar { position: relative; height: 16px; }
.futu-wf-bar i { position: absolute; top: 2px; height: 12px; border-radius: 3px; display: block; }
.futu-wf-bar u { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--f-line-2); }
.futu-wf-row .lab { font-size: 12.5px; color: var(--f-dim); }
.futu-wf-row .amt { font-size: 12.5px; text-align: right; }

.futu-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.futu-table th, .futu-table td { padding: 8px 10px; border-bottom: 1px solid var(--f-line); text-align: right; white-space: nowrap; }
.futu-table th {
	color: var(--f-faint); font-weight: 500; text-transform: uppercase; font-size: 10px;
	letter-spacing: 0.08em; position: sticky; top: 0; background: var(--f-panel); z-index: 1; cursor: pointer;
}
.futu-table th:hover { color: var(--f-text); }
.futu-table th.sorted { color: var(--f-accent); }
.futu-table th:first-child, .futu-table td:first-child { text-align: left; }
.futu-table tbody tr { cursor: pointer; }
.futu-table tbody tr:hover { background: var(--f-panel-3); }
.futu-table tbody tr.sel { background: #12202e; }
.futu-scroll { overflow: auto; max-height: 460px; border: 1px solid var(--f-line); border-radius: 10px; }

.futu-bars { display: flex; flex-direction: column; gap: 6px; }
.futu-barrow { display: grid; grid-template-columns: 210px 1fr 64px; gap: 11px; align-items: center; font-size: 12.5px; }
.futu-barrow .t { color: var(--f-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.futu-barrow .b { height: 9px; background: var(--f-line); border-radius: 5px; overflow: hidden; }
.futu-barrow .b i { display: block; height: 100%; background: linear-gradient(90deg, var(--f-accent), var(--f-accent-2)); border-radius: 5px; }
.futu-barrow .v { text-align: right; }

.futu-tag {
	display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px;
	background: var(--f-panel-3); border: 1px solid var(--f-line-2); color: var(--f-dim);
}
.futu-tag.good { color: var(--f-good); border-color: rgba(61,220,151,0.3); background: rgba(61,220,151,0.08); }
.futu-tag.warn { color: var(--f-warm); border-color: rgba(255,178,87,0.3); background: rgba(255,178,87,0.08); }
.futu-tag.bad { color: var(--f-hot); border-color: rgba(255,107,107,0.3); background: rgba(255,107,107,0.08); }
.futu-tag.blue { color: var(--f-accent); border-color: rgba(76,194,255,0.3); background: rgba(76,194,255,0.08); }
.futu-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.futu-conf { display: flex; align-items: center; gap: 10px; }
.futu-conf .ring { width: 36px; height: 36px; }
.futu-conf .t { font-size: 10px; color: var(--f-faint); text-transform: uppercase; letter-spacing: 0.09em; }
.futu-conf .v { font-size: 13px; }

.futu-list { list-style: none; padding: 0; margin: 0; }
.futu-list li { padding: 9px 0; border-bottom: 1px solid var(--f-line); font-size: 12.5px; }
.futu-list li:last-child { border-bottom: none; }
.futu-list .m { color: var(--f-dim); line-height: 1.5; }

.futu-crumbs { display: flex; gap: 7px; align-items: center; font-size: 12px; color: var(--f-dim); margin-bottom: 11px; flex-wrap: wrap; }
.futu-crumbs button { background: none; border: none; color: var(--f-accent); padding: 0; font-size: 12px; }

.futu-note {
	font-size: 12px; color: var(--f-dim); border-left: 2px solid var(--f-line-2);
	padding: 3px 0 3px 11px; margin: 11px 0; line-height: 1.55;
}

.futu-kv { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; font-size: 12.5px; }
.futu-kv dt { color: var(--f-dim); padding: 5px 0; border-bottom: 1px solid var(--f-line); overflow: hidden; text-overflow: ellipsis; }
.futu-kv dd { margin: 0; padding: 5px 0; border-bottom: 1px solid var(--f-line); text-align: right; }

.futu-spark { display: block; width: 100%; height: 34px; }

.futu-search { position: relative; }
.futu-search input { padding-left: 30px; }
.futu-search::before {
	content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 11px;
	margin-top: -7px; border: 1.6px solid var(--f-faint); border-radius: 50%;
}

.futu-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.futu-filters .futu-field { margin-bottom: 0; min-width: 132px; }

.futu-profile-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.futu-flagish {
	width: 52px; height: 52px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center;
	font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
	background: linear-gradient(140deg, var(--f-panel-3), var(--f-panel));
	border: 1px solid var(--f-line-2); color: var(--f-accent);
}

.futu-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 15px; }

.futu-brief { white-space: pre-wrap; font-size: 13.5px; line-height: 1.65; color: var(--f-text); }
.futu-brief h4 { margin: 14px 0 4px; font-size: 13px; color: var(--f-accent); }

.futu-modal-back {
	position: absolute; inset: 0; background: rgba(3,5,9,0.78); z-index: 30;
	display: flex; align-items: center; justify-content: center; padding: 26px;
	backdrop-filter: blur(3px);
}
.futu-modal {
	background: var(--f-panel); border: 1px solid var(--f-line-2); border-radius: 14px;
	padding: 20px; max-width: 480px; width: 100%; max-height: 86%; overflow: auto;
	box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.futu-modal-head { display: flex; align-items: center; margin-bottom: 10px; gap: 10px; }
.futu-modal-head h2 { font-size: 16px; }

/* --------------------------------------------------------------- compact */

@container (max-width: 1180px) {
	.futu-body.with-inspect { grid-template-columns: minmax(0,var(--f-rail)) minmax(0,1fr); }
	.futu-inspect { display: none; }
}

@container (max-width: 900px) {
	.futu-body, .futu-body.with-inspect, .futu-body.no-rail {
		grid-template-columns: minmax(0,1fr); grid-template-rows: auto 1fr;
	}
	.futu-rail { border-right: none; border-bottom: 1px solid var(--f-line); max-height: 250px; }
	.futu-wf-row { grid-template-columns: 130px 1fr 66px; }
	.futu-barrow { grid-template-columns: 140px 1fr 56px; }
}

@container (max-width: 620px) {
	.futu-root { --f-h: 820px; }
	.futu-top { flex-wrap: wrap; gap: 8px; padding: 9px 12px; }
	.futu-pane { padding: 14px; }
	.futu-status { display: none; }
	.futu-maplegend { max-width: 66%; }
	.futu-maphud { left: 10px; right: 10px; top: 10px; }
	.futu-cards { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
	.futu-card .v { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.futu-boot-mark::after { animation: none; }
	.futu-preset:hover { transform: none; }
}

/* The boot diagnostic. Only ever seen when the first load fails. */
.futu-boot-detail { max-width: 620px; text-align: left; font-size: 12px; color: var(--f-dim); }
.futu-boot-detail summary { cursor: pointer; color: var(--f-accent); margin-bottom: 8px; }
.futu-boot-detail ul { list-style: none; padding: 0; margin: 0; }
.futu-boot-detail li {
	padding: 7px 10px; margin-bottom: 6px; border: 1px solid var(--f-line-2); border-radius: 8px;
	word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.5;
}

/* ==========================================================================
   The opening, the command bar, the chain and what changed
   ========================================================================== */

/* --------------------------------------------------------------- opening */

.futu-open {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
	gap: clamp(20px, 4vw, 56px); align-items: center;
	min-height: 100%; padding: clamp(24px, 4vw, 56px);
}
.futu-open-visual { position: relative; aspect-ratio: 1 / 1; min-height: 260px; order: 2; }
.futu-open-globe { width: 100%; height: 100%; display: block; }
.futu-open-copy { order: 1; max-width: 620px; }
.futu-open-mark {
	font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
	color: var(--f-accent); margin-bottom: 18px; font-weight: 600;
}
.futu-open h1 {
	font-size: clamp(28px, 3.6vw, 50px); line-height: 1.04; letter-spacing: -0.03em;
	margin: 0 0 18px; font-weight: 650;
}
.futu-open h1 em {
	font-style: normal;
	background: linear-gradient(100deg, var(--f-accent), #7c5cff);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.futu-open-lede { color: var(--f-dim); font-size: 15.5px; line-height: 1.65; margin: 0 0 26px; max-width: 54ch; }
.futu-open-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.futu-open-note { color: var(--f-faint); font-size: 12.5px; margin-top: 18px; }

@media (max-width: 900px) {
	.futu-open { grid-template-columns: minmax(0, 1fr); padding: 20px; }
	.futu-open-visual { order: 1; max-width: 300px; margin: 0 auto; min-height: 240px; }
	.futu-open-copy { order: 2; }
}

/* ------------------------------------------------------------ command bar */

.futu-ask { margin: 0 0 6px; }
.futu-ask-row {
	display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 16px;
	border: 1px solid var(--f-line-2); border-radius: 999px;
	background: rgba(0, 0, 0, 0.34);
	transition: border-color 160ms ease, box-shadow 160ms ease;
}
.futu-ask-row:focus-within { border-color: var(--f-accent); box-shadow: 0 0 0 3px rgba(76, 194, 255, 0.14); }
.futu-ask-mark {
	width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
	background: var(--f-accent); box-shadow: 0 0 0 4px rgba(76, 194, 255, 0.16);
}
.futu-ask-input {
	flex: 1 1 auto; min-width: 0; border: 0; background: none; color: var(--f-text);
	font: inherit; font-size: 15px; padding: 9px 0; outline: none;
}
.futu-ask-input::placeholder { color: var(--f-faint); }
.futu-ask-go { flex: 0 0 auto; }
.futu-ask.hero .futu-ask-input { font-size: 16.5px; }

.futu-ask-read { margin-top: 12px; font-size: 13.5px; }
.futu-ask-read.good, .futu-ask-read.bad {
	border: 1px solid var(--f-line-2); border-radius: 12px; padding: 14px 16px;
	background: rgba(255, 255, 255, 0.025);
}
.futu-ask-read.good { border-color: rgba(61, 220, 151, 0.32); }
.futu-ask-read.bad { border-color: rgba(255, 176, 32, 0.32); }
.futu-ask-label {
	font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--f-faint); margin-bottom: 8px;
}
.futu-ask-read ul { list-style: none; padding: 0; margin: 0; }
.futu-ask-read li { color: var(--f-text); padding: 4px 0 4px 18px; position: relative; line-height: 1.55; }
.futu-ask-read li::before { content: "\2192"; position: absolute; left: 0; color: var(--f-accent); }
.futu-ask-read p { color: var(--f-dim); margin: 0; line-height: 1.6; }
.futu-ask-hint { color: var(--f-faint) !important; font-size: 12.5px; margin-top: 10px !important; }

.futu-ask-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.futu-ask-chip {
	border: 1px solid var(--f-line); border-radius: 999px; background: none;
	color: var(--f-dim); font: inherit; font-size: 12.5px; padding: 6px 13px; cursor: pointer;
	text-align: left; transition: color 140ms ease, border-color 140ms ease;
}
.futu-ask-chip:hover { color: var(--f-text); border-color: var(--f-line-2); }

/* ----------------------------------------------------------------- chain */

.futu-chain {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
	align-items: start; overflow-x: auto;
}
.futu-chain-col { min-width: 0; padding: 0 10px; }
.futu-chain-head {
	font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--f-faint); margin-bottom: 12px; white-space: nowrap;
}
.futu-chain-node {
	border: 1px solid var(--f-line); border-radius: 11px; padding: 12px 14px 14px;
	margin-bottom: 9px; background: rgba(255, 255, 255, 0.022); position: relative; overflow: hidden;
}
.futu-chain-node b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.futu-chain-node span { display: block; font-size: 12px; color: var(--f-dim); line-height: 1.5; }
.futu-chain-node u {
	display: block; height: 3px; border-radius: 2px; margin-top: 9px; text-decoration: none;
	background: var(--f-accent);
}
.futu-chain-node.up u { background: #3ddc97; }
.futu-chain-node.down u { background: #ff6b6b; }
.futu-chain-node.up span { color: #3ddc97; }
.futu-chain-node.down span { color: #ff6b6b; }
.futu-chain-node.lever { border-color: rgba(76, 194, 255, 0.4); background: rgba(76, 194, 255, 0.06); }
.futu-chain-node.lever span { color: var(--f-dim); }
.futu-chain-node.result { border-color: var(--f-line-2); background: rgba(255, 255, 255, 0.045); padding: 16px; }
.futu-chain-node.result em {
	display: block; font-style: normal; font-size: 30px; font-weight: 650;
	letter-spacing: -0.03em; margin: 6px 0 4px;
}
.futu-chain-node.result.up em { color: #3ddc97; }
.futu-chain-node.result.down em { color: #ff6b6b; }

.futu-chain-arrow { display: none; }
@media (min-width: 900px) {
	.futu-chain { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 0.95fr); }
	.futu-chain-arrow { display: flex; align-items: center; justify-content: center; padding-top: 40px; }
	.futu-chain-arrow i {
		display: block; width: 100%; height: 1px; background: var(--f-line-2); position: relative;
	}
	.futu-chain-arrow i::after {
		content: ""; position: absolute; right: 0; top: -3px;
		border-left: 6px solid var(--f-line-2); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent;
	}
}
@media (max-width: 899px) {
	.futu-chain { grid-template-columns: minmax(0, 1fr); }
	.futu-chain-col { padding: 0 0 18px; }
}

/* ---------------------------------------------------------- what changed */

/* Colour marks the direction of a change, never whether it is good: a rise in
   unemployment and a rise in output are not the same kind of news, and the
   table refuses to say which. */
.futu-changed td.up { color: #6fd0ff; }
.futu-changed td.down { color: #ffb020; }
.futu-changed th[scope="row"] { font-weight: 600; color: var(--f-text); }

.futu-surprises { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 14px; }
.futu-surprise {
	text-align: left; border: 1px solid var(--f-line); border-radius: 12px; padding: 16px 18px 18px;
	background: rgba(255, 255, 255, 0.022); cursor: pointer; font: inherit; color: var(--f-text);
	transition: border-color 160ms ease, transform 160ms ease;
}
.futu-surprise:hover { border-color: var(--f-line-2); transform: translateY(-2px); }
.futu-surprise b { display: block; font-size: 10.5px; letter-spacing: 0.14em; color: var(--f-faint); margin-bottom: 10px; }
.futu-surprise h4 { margin: 0 0 6px; font-size: 15.5px; font-weight: 650; }
.futu-surprise em { display: block; font-style: normal; font-size: 21px; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 6px; }
.futu-surprise em.up { color: #6fd0ff; }
.futu-surprise em.down { color: #ffb020; }
.futu-surprise span { display: block; font-size: 12.5px; color: var(--f-dim); line-height: 1.55; }
.futu-surprise u { display: block; margin-top: 10px; font-size: 12px; color: var(--f-accent); text-decoration: none; }

.futu-modes { display: flex; gap: 6px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--f-line); border-radius: 999px; }
.futu-mode {
	flex: 1 1 0; border: 0; background: none; color: var(--f-dim); font: inherit; font-size: 12.5px;
	padding: 7px 10px; border-radius: 999px; cursor: pointer; transition: background 140ms ease, color 140ms ease;
}
.futu-mode.on { background: rgba(76, 194, 255, 0.14); color: var(--f-text); }
