/*
 * Use Guide template — loaded only on pages using the "Use Guide" template
 * (and in the editor). Everything is scoped to .ug-page, the group that
 * wraps the page's blocks, so no other page is affected.
 *
 * The guide is a long night-reel document in numbered sections: dark bands
 * broken by lavender ("light") ones, each section prose and steps on one
 * side and the real screen on the other.
 */

body.page-template-use-guide-page { margin: 0; background: #110F1A; }
html:has(body.page-template-use-guide-page) { scroll-behavior: smooth; background: #110F1A; }
@media (prefers-reduced-motion: reduce) { html:has(body.page-template-use-guide-page) { scroll-behavior: auto; } }
.editor-styles-wrapper:has(.ug-page) { background: #110F1A; }

.ug-page, .ug-page *, .ug-page *::before, .ug-page *::after { box-sizing: border-box; }
.ug-page {
	--night: #110F1A; --deck: #1B1828; --deck2: #241F36; --mist: #E5E1F8; --mistdeep: #D6CFF3;
	--indigo: #472F94; --violet: #6747B4; --signal: #673AF5; --lilac: #A68CFF;
	--ink: #F3F1FB; --dim: #B8B2D2; --faint: #8F88AE; --line: rgba(229, 225, 248, .12);
	--onmist: #1C1733; --onmistdim: #4D4570; --good: #4FD1A5; --warn: #F2B84B;
	--f-d: "Montserrat", "Outfit", system-ui, sans-serif;
	--f-b: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-m: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--r: 24px; --r-sm: 14px; --gut: clamp(16px, 4vw, 56px);
	/* the colours each band swaps */
	--t-ink: var(--ink); --t-dim: var(--dim); --t-faint: var(--faint); --t-accent: var(--lilac);
	--t-rule: var(--line); --t-panel: var(--deck); --t-panel-line: var(--line);
	margin: 0; color-scheme: dark;
	background: var(--night); color: var(--ink);
	font-family: var(--f-b); font-size: 16px; line-height: 1.6; letter-spacing: normal; -webkit-font-smoothing: antialiased;
}
/* spacing is set below; drop the block gap WordPress puts between blocks */
.ug-page :is(p, h1, h2, h3, h4, figure, ul, ol, li, table), .ug-page .wp-block-group { margin: 0; }
.ug-page :is(h1, h2, h3, h4) { color: var(--t-ink); text-wrap: balance; letter-spacing: normal; }
.ug-page a { color: var(--t-accent); }
.ug-page :focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; border-radius: 6px; }
.ug-page img { max-width: 100%; height: auto; display: block; }
.ug-page strong { font-weight: 600; color: var(--t-ink); }
.ug-page .wrap { max-width: 1180px; margin: 0 auto; padding-inline: var(--gut); }

/* light bands */
.ug-page :is(.contents, .sec.light) {
	--t-ink: var(--onmist); --t-dim: var(--onmistdim); --t-faint: var(--onmistdim); --t-accent: var(--indigo);
	--t-rule: rgba(28, 23, 51, .14); --t-panel: #fff; --t-panel-line: transparent;
	background: var(--mist); color: var(--onmist);
}

/* ---------- type ---------- */
.ug-page .eyebrow { font-family: var(--f-m); font-size: 11px; line-height: 1.5; letter-spacing: .22em; text-transform: uppercase; color: var(--t-dim); }
.ug-page h1 { font-family: var(--f-d); font-weight: 900; font-size: clamp(52px, 9vw, 112px); line-height: .95; letter-spacing: -.03em; }
.ug-page h2 { font-family: var(--f-d); font-weight: 800; font-size: clamp(34px, 5vw, 56px); line-height: 1.02; letter-spacing: -.02em; }
.ug-page :is(h1, h2) em { font-style: normal; color: var(--t-accent); }
.ug-page h3 { font-family: var(--f-b); font-weight: 600; font-size: 22px; line-height: 1.25; display: flex; align-items: center; gap: 12px; }
.ug-page h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--t-accent); flex: 0 0 9px; }
.ug-page h4 { font-family: var(--f-b); font-weight: 600; font-size: 17px; line-height: 1.35; }
.ug-page .lede { font-size: 18px; line-height: 1.65; color: var(--t-dim); max-width: 62ch; }
.ug-page kbd { font-family: var(--f-m); font-size: 12px; background: var(--deck2); border: 1px solid var(--line); border-bottom-width: 2px;
	border-radius: 6px; padding: 2px 7px; color: var(--ink); white-space: nowrap; }
.ug-page :is(.contents, .sec.light) kbd { background: #fff; border-color: rgba(28, 23, 51, .18); color: var(--onmist); }

/* ---------- top bar ---------- */
.ug-page .top { position: sticky; top: 0; z-index: 10; background: rgba(17, 15, 26, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line); }
.admin-bar .ug-page .top { top: var(--wp-admin--admin-bar--height, 0px); }
.ug-page .top .wrap { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.ug-page .top .logo img { height: 26px; width: auto; }
.ug-page .top .eyebrow { margin-left: auto; }
.ug-page .top .jump a { display: block; font-family: var(--f-m); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
	color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.ug-page .top .jump a:hover { border-color: var(--lilac); }

/* ---------- hero ---------- */
.ug-page .hero { padding-block: clamp(56px, 9vw, 110px) 48px; }
.ug-page .hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.ug-page .hero h1 { margin-top: 22px; }
.ug-page .hero .lede { margin-top: 28px; }
.ug-page .hero .mark { justify-self: end; align-self: start; margin-top: 40px; width: min(360px, 100%); }
.ug-page .hero .mark img { width: 100%; }
.ug-page .pillbar { margin-top: 40px; display: flex; align-items: center; gap: 16px; background: var(--signal); border-radius: 999px;
	padding: 18px 28px; color: #fff; max-width: 640px; }
.ug-page .pillbar .eyebrow { color: rgba(255, 255, 255, .75); }
.ug-page .pillbar .url { margin-left: auto; font-size: 17px; }
.ug-page .pillbar strong { color: #fff; }

/* ---------- flow ---------- */
.ug-page .flow { padding-block: 24px 72px; }
.ug-page .flow h3 { margin-top: 14px; }
.ug-page .flowgrid { margin-top: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ug-page .node { background: var(--deck); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 18px 18px 16px;
	display: flex; flex-direction: column; gap: 6px; }
.ug-page .node .eyebrow { font-size: 10px; color: var(--lilac); }
.ug-page .node p:not(.eyebrow) { color: var(--dim); font-size: 14px; line-height: 1.5; }
.ug-page .node.src { background: var(--indigo); border-color: transparent; }
.ug-page .node.src .eyebrow { color: #D9CCFF; }
.ug-page .node.src p:not(.eyebrow) { color: #DCD5F7; }
.ug-page .node.out { background: transparent; border-style: dashed; }
.ug-page .flownote { margin-top: 18px; color: var(--faint); font-size: 14px; }

/* ---------- contents ---------- */
.ug-page .contents { padding-block: 64px; scroll-margin-top: 50px; }
.ug-page .contents h2 { margin-top: 14px; }
.ug-page .toc { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; list-style: none; padding: 0; }
.ug-page .toc li { margin: 0; }
.ug-page .toc a { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: baseline; height: 100%;
	padding: 16px 18px; background: #fff; border-radius: var(--r-sm); border: 1px solid transparent;
	text-decoration: none; color: var(--onmistdim); font-size: 13px; line-height: 1.45; }
.ug-page .toc a:hover { border-color: var(--violet); }
.ug-page .toc code { grid-row: span 2; font-family: var(--f-m); font-size: 12px; color: var(--violet); background: none; padding: 0; }
.ug-page .toc strong { display: block; font-size: 16px; line-height: 1.5; color: var(--onmist); margin-bottom: 2px; }

/* ---------- sections ---------- */
.ug-page .sec { padding-block: clamp(64px, 8vw, 104px); border-top: 1px solid var(--line); scroll-margin-top: 50px; }
.ug-page .sec.light { border-top: none; }
.ug-page .sec-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 44px; }
.ug-page .sec-head .lede { margin-top: 4px; }
.ug-page .block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.ug-page .block.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.ug-page .block.flip > .copy { order: 2; }
.ug-page .block + .block { margin-top: 64px; }
.ug-page :is(.cards, .wp-block-table) + .block, .ug-page .block + .cards { margin-top: 56px; }
.ug-page .cards + .cards { margin-top: 14px; }
.ug-page .block + .note { margin-top: 32px; max-width: 720px; }
.ug-page .cards + .note { margin-top: 18px; max-width: 760px; }
.ug-page .copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ug-page .copy > p:not(.eyebrow) { color: var(--t-dim); }
.ug-page .copy > h3:not(:first-child) { margin-top: 8px; }
.ug-page .aside { margin-top: 20px; color: var(--t-faint); font-size: 14px; }

/* steps: a real sequence, so numbered */
.ug-page ol.steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: s; }
.ug-page ol.steps li { counter-increment: s; position: relative; padding-left: 42px; min-height: 30px; color: var(--t-dim); }
.ug-page ol.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
	background: var(--signal); color: #fff; font-family: var(--f-m); font-size: 12px; display: grid; place-items: center; }

/* facts: two-column key / value tables */
.ug-page .wp-block-table { margin: 0; overflow: visible; }
.ug-page .wp-block-table table { width: 100%; border-collapse: collapse; margin: 0; }
.ug-page .wp-block-table :is(thead, tbody, tfoot) { border: 0; }
.ug-page .facts td { border: 0; border-top: 1px solid var(--t-rule); padding: 12px 0; vertical-align: top; color: var(--t-dim); font-size: 15px; }
.ug-page .facts tr:last-child td { border-bottom: 1px solid var(--t-rule); }
.ug-page .facts td:first-child { width: 150px; padding-right: 16px; padding-top: 15px; font-family: var(--f-m); font-size: 11px; line-height: 1.5;
	letter-spacing: .14em; text-transform: uppercase; color: var(--t-accent); }

/* reference tables */
.ug-page .ref { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--t-rule); background: var(--t-panel); }
.ug-page .ref table { font-size: 15px; min-width: 520px; }
.ug-page .ref :is(th, td) { text-align: left; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--t-rule); vertical-align: top; }
.ug-page .ref th { font-family: var(--f-m); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--lilac); font-weight: 400; background: var(--deck); }
.ug-page .ref td { color: var(--t-dim); }
.ug-page .ref td:first-child { color: var(--t-ink); white-space: nowrap; }
.ug-page .ref tr:last-child td { border-bottom: none; }
.ug-page .sec.light .ref th { background: var(--mistdeep); color: var(--indigo); }
.ug-page h3 + .ref { margin-top: 18px; }

/* screens */
.ug-page .wp-block-image { min-width: 0; }
.ug-page :is(.block, .pair) .wp-block-image img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); background: var(--deck);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.ug-page .sec.light :is(.block, .pair) .wp-block-image img { border-color: rgba(28, 23, 51, .12); box-shadow: 0 30px 60px -34px rgba(40, 24, 110, .45); }
.ug-page .shots { min-width: 0; }
.ug-page .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ug-page :is(.wp-element-caption, .shots .caption) { margin: 12px 0 0; text-align: left; font-family: var(--f-m); font-size: 11px; line-height: 1.5;
	letter-spacing: .12em; text-transform: uppercase; color: var(--t-faint); }

/* callouts */
.ug-page .note { border-radius: var(--r-sm); padding: 16px 18px; background: var(--t-panel); border: 1px solid var(--t-panel-line);
	display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--t-dim); }
.ug-page .note p:not(.eyebrow) { color: var(--t-dim); }
.ug-page .note .eyebrow { font-size: 10px; color: var(--lilac); }
.ug-page .sec.light .note .eyebrow { color: var(--violet); }
.ug-page .note.warn .eyebrow { color: var(--warn); }

/* cards */
.ug-page .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ug-page .card { background: var(--t-panel); border: 1px solid var(--t-panel-line); border-radius: var(--r-sm); padding: 20px;
	display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ug-page .card .eyebrow { font-size: 10px; color: var(--lilac); }
.ug-page .sec.light .card .eyebrow { color: var(--violet); }
.ug-page .card p:not(.eyebrow, .tag) { color: var(--t-dim); font-size: 14.5px; line-height: 1.55; }
.ug-page .card .tag { align-self: flex-start; font-family: var(--f-m); font-size: 10px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase;
	border-radius: 999px; padding: 4px 10px; background: var(--signal); color: #fff; }
.ug-page .card .tag.free { background: transparent; border: 1px solid var(--good); color: var(--good); }
.ug-page .sec.light .card .tag.free { border-color: #1D8F6A; color: #1D8F6A; }

/* chips */
.ug-page .chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ug-page .chip { font-family: var(--f-m); font-size: 10.5px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase;
	border-radius: 999px; padding: 6px 12px; border: 1px solid currentColor; }
.ug-page .chip.good { color: var(--good); }
.ug-page .chip.warn { color: var(--warn); }
.ug-page .chip.none { color: var(--dim); }
.ug-page .chip.pause { color: var(--lilac); }
.ug-page .chip.own { background: var(--signal); border-color: var(--signal); color: #fff; }

/* the coloured dots before "Urgent", "Soon" etc. are inline text colour */
.ug-page mark.has-inline-color { background: none; padding: 0; }

/* schedule strip key: interior/exterior x day/night, in that order */
.ug-page .stripkey { display: flex; flex-wrap: wrap; gap: 16px; }
.ug-page .stripkey p { display: flex; align-items: center; font-family: var(--f-m); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ug-page .stripkey p::before { content: ""; width: 14px; height: 14px; border-radius: 4px; margin-right: 8px; background: #4A4760; }
.ug-page .stripkey p:nth-child(2)::before { background: #1E8A9B; }
.ug-page .stripkey p:nth-child(3)::before { background: #B8892B; }
.ug-page .stripkey p:nth-child(4)::before { background: #6747B4; }

.ug-page .subhead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 72px 0 28px; padding-top: 28px; border-top: 1px solid var(--t-rule); }
.ug-page .subhead .eyebrow { color: var(--lilac); }
.ug-page .sec.light .subhead .eyebrow { color: var(--violet); }

/* ---------- footer ---------- */
.ug-page .foot { padding-block: 56px; border-top: 1px solid var(--line); }
.ug-page .foot .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ug-page .foot .logo img { height: 30px; width: auto; }
.ug-page .foot p { color: var(--faint); font-size: 14px; }

@media (max-width: 900px) {
	.ug-page :is(.hero-grid, .block, .block.flip) { grid-template-columns: minmax(0, 1fr); }
	.ug-page .block.flip > .copy { order: 0; }
	.ug-page .hero .mark { justify-self: start; width: 220px; }
	.ug-page .flowgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ug-page .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.ug-page :is(.flowgrid, .cards, .pair) { grid-template-columns: minmax(0, 1fr); }
	.ug-page .top .eyebrow { display: none; }
	.ug-page .top .jump { margin-left: auto; }
	.ug-page .pillbar { flex-wrap: wrap; padding: 16px 22px; }
	.ug-page .pillbar .url { margin-left: 0; }
	.ug-page .facts :is(tbody, tr, td) { display: block; }
	.ug-page .facts td { border-top: 0; }
	.ug-page .facts td:first-child { width: auto; padding: 12px 0 4px; border-top: 1px solid var(--t-rule); }
	.ug-page .facts td:last-child { padding-top: 0; }
	.ug-page .facts tr:last-child td:first-child { border-bottom: 0; }
}
