/* rnd-console UI (spec rnd-console rev 2b, wireframe rev 2).
   Antarctica only. Black, white, and #4D1821. Colours come only from the
   tokens below (seeded from web/dashboard/src/theme/tokens.css): no hairlines,
   one hover fill, one focus ring. #4D1821 fills only the sign-in button; it
   is also the "unavailable" word and the focus ring. */
@font-face { font-family: "Antarctica"; src: url("/fonts/Antarctica-Book.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Antarctica"; src: url("/fonts/Antarctica-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
	--black: #000000;
	--white: #FFFFFF;
	--burgundy: #4D1821;
	--text: #303030;
	--t2: #616161;
	--mut: #616161;
	--card: #0000000A;
	--hover: #00000014;
	--radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--white); color: var(--text); font-family: "Antarctica", sans-serif; font-size: 14px; line-height: 1.45; }
h1, h2, h3 { color: var(--black); font-weight: 700; margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 16px; margin: 24px 0 10px; }
h3 { font-size: 14px; }
p { margin: 0; }
.t2 { color: var(--t2); }
.mut { color: var(--mut); font-size: 12px; }
[hidden] { display: none !important; }

a, button, [role=tab] { font: inherit; color: inherit; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 8px; outline: none; }
a:hover, button:hover, [role=tab]:hover { background: var(--hover); }
a:focus-visible, button:focus-visible, [role=tab]:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }

.top { display: flex; align-items: center; gap: 18px; padding: 16px 28px; }
.brand { color: var(--black); font-weight: 700; font-size: 15px; }
.brand span { font-weight: 400; }
.nav { display: flex; gap: 4px; }
.nav [role=tab] { padding: 6px 10px; color: var(--t2); }
.nav [role=tab][aria-selected=true] { background: var(--card); color: var(--black); font-weight: 700; }
.who { margin-left: auto; color: var(--t2); font-size: 12px; }
.btn2 { padding: 6px 10px; text-decoration: underline; }
main { padding: 4px 28px 40px; max-width: 1180px; }

/* Status: cards on home, one line elsewhere. The words are ok, not configured,
   unknown and unavailable; only unavailable is burgundy (rev 2a gap: no shared
   stock-health component on main, so the line is built here). */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cc { display: block; background: var(--card); border-radius: var(--radius); padding: 14px 16px; text-align: left; width: 100%; }
.cc .word { color: var(--black); font-weight: 700; }
.word.unavailable { color: var(--burgundy); }
.statusline { color: var(--t2); margin: 6px 0 14px; }
.statusline b { color: var(--black); }
.statusline b.unavailable { color: var(--burgundy); }

/* Notebooks: rows left, viewer right. */
.split { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rows .cc[aria-selected=true] { background: var(--hover); }
.viewer { background: var(--white); border-radius: var(--radius); min-height: 70vh; }
.viewer-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.viewer-head .btn2 { margin-left: auto; }
.viewer iframe { width: 100%; height: 75vh; border: 0; background: var(--white); }

/* Demo runs. */
.pick { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.seg { padding: 6px 12px; border-radius: 8px; }
.seg[aria-selected=true] { background: var(--black); color: var(--white); }
.seg[aria-selected=true]:hover { background: var(--black); }
.label { color: var(--t2); font-size: 12px; margin-left: 10px; }
.grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.view { margin: 0; }
.view img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--card); display: block; }
.view .a { color: var(--black); font-weight: 700; margin-top: 4px; }
.recs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.rec { display: block; text-align: left; background: var(--card); border-radius: var(--radius); padding: 14px 16px; min-height: 120px; width: 100%; }
.rec.off { cursor: default; color: var(--mut); }

/* Full render. */
.full-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.full-head .links { margin-left: auto; display: flex; gap: 6px; }
.full img { max-width: 100%; border-radius: var(--radius); background: var(--card); display: block; }
.full pre { background: var(--card); border-radius: var(--radius); padding: 16px; white-space: pre-wrap; font-family: "Antarctica", sans-serif; }

/* Sign-in and No access. */
.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.btn-primary { background: var(--burgundy); color: var(--white); padding: 10px 18px; font-weight: 700; }
.btn-primary:hover { background: var(--burgundy); opacity: 0.9; }
.err { color: var(--burgundy); }
/* Sign-in form: the console's .field/.label/.input (12px gap, 12px uppercase
   label in the secondary text colour, 40px control, 8px radius, no line). The
   fill is the card well because the page is white; focus is the burgundy ring. */
.signin { width: 100%; max-width: 400px; text-align: left; }
.signin .btn-primary { width: 100%; }
.field { margin-bottom: 12px; }
.label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; color: var(--t2); }
.input { width: 100%; background: var(--card); border: 0; border-radius: 8px; min-height: 40px; padding: 0 16px; font: inherit; color: var(--text); outline: none; }
.input:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.signin .err { margin-top: 12px; }

/* Keep the reading order on narrow screens: identity, nav, list, viewer. */
@media (max-width: 720px) {
	.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 16px; }
	.brand { white-space: nowrap; }
	#signout { grid-column: 2; grid-row: 1; white-space: nowrap; }
	.who { display: none; }
	.nav { grid-column: 1 / -1; grid-row: 2; min-width: 0; overflow-x: auto; white-space: nowrap; }
	.nav [role=tab] { flex: 0 0 auto; }
	main { padding: 4px 16px 32px; }
	.cards { grid-template-columns: minmax(0, 1fr); }
	.split { grid-template-columns: minmax(0, 1fr); }
	.viewer { min-width: 0; }
	.grid7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.full-head { flex-direction: column; align-items: flex-start; gap: 10px; }
	.full-head .label, .full-head .links { margin-left: 0; }
	.full-head .links { flex-wrap: wrap; }
}
