/*
 * First-party replacement for Bootstrap Reboot (perf/remove-bootstrap).
 *
 * Bootstrap shipped as a 808 KB / 22.9 KB-brotli'd, render-blocking
 * stylesheet of which only 30 of its 2,775 selectors ever matched a real
 * element across the public app -- nearly all of them Reboot, the base
 * reset. This file is the empirically-derived subset that is actually
 * load-bearing: it was A/B-tested against live production by substituting
 * this file for bootstrap.min.css and diffing computed styles + layout
 * geometry across 9 pages x 2 viewports, with 0 CSS-property differences.
 *
 * Cascade position matters: this must load FIRST, in the exact position
 * bootstrap.min.css previously held -- before theme.css and every other
 * stylesheet. theme.css deliberately overrides body font/colour/background
 * and relies on winning by source order; see docs/architecture/ui-guidelines.md.
 */

*,
::after,
::before {
	box-sizing: border-box;
}

:root {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	:root {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	margin-bottom: .5rem;
	font-weight: 500;
	line-height: 1.2;
}

h1 { font-size: calc(1.375rem + 1.5vw); }
h2 { font-size: calc(1.325rem + .9vw); }
h3 { font-size: calc(1.3rem + .6vw); }
h4 { font-size: calc(1.275rem + .3vw); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

@media (min-width: 1200px) {
	h1 { font-size: 2.5rem; }
	h2 { font-size: 2rem; }
	h3 { font-size: 1.75rem; }
	h4 { font-size: 1.5rem; }
}

p {
	margin-top: 0;
	margin-bottom: 1rem;
}

dl, ol, ul {
	margin-top: 0;
	margin-bottom: 1rem;
}

ol, ul {
	padding-left: 2rem;
}

ol ol, ol ul, ul ol, ul ul {
	margin-bottom: 0;
}

dt {
	font-weight: 700;
}

dd {
	margin-bottom: .5rem;
	margin-left: 0;
}

hr {
	margin: 1rem 0;
	color: inherit;
	border: 0;
	border-top: 1px solid;
	opacity: .25;
}

/*
 * Bootstrap Reboot neutralised href-less anchors; the seeded legal documents
 * contain some (e.g. the privacy contact address), and without this they
 * would pick up the global link colour.
 */
a:not([href]):not([class]),
a:not([href]):not([class]):hover {
	color: inherit;
	text-decoration: none;
}

abbr[title] {
	text-decoration: underline dotted;
	cursor: help;
}

strong, b {
	font-weight: bolder;
}

small {
	font-size: .875em;
}

sub, sup {
	position: relative;
	font-size: .75em;
	line-height: 0;
	vertical-align: baseline;
}

sub { bottom: -.25em; }
sup { top: -.5em; }

code, kbd, pre, samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 1em;
}

/*
 * <code> in long-form legal / help prose was styled by Bootstrap (0.875em,
 * #d63384 -- its own brand pink, which the app never chose and which did not
 * adapt to dark mode). The size is preserved; the colour is now a canonical
 * theme token, so inline code follows the active theme in both light and
 * dark. Deliberate design decision, Thimo 2026-08-18 -- this is the one
 * intentional visual change in the Bootstrap removal.
 */
code {
	font-size: .875em;
	color: var(--os-text-secondary, #4a4458);
	word-wrap: break-word;
}

pre {
	display: block;
	margin-top: 0;
	margin-bottom: 1rem;
	overflow: auto;
}

img, svg {
	vertical-align: middle;
}

iframe {
	border: 0;
}

table {
	border-collapse: collapse;
	caption-side: bottom;
}

th {
	text-align: inherit;
	text-align: -webkit-match-parent;
}

thead, tbody, tfoot, tr, td, th {
	border: 0 solid;
	border-color: inherit;
}

label {
	display: inline-block;
}

button {
	border-radius: 0;
}

button:focus:not(:focus-visible) {
	outline: 0;
}

button, input, optgroup, select, textarea {
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

button, select {
	text-transform: none;
}

[role="button"] {
	cursor: pointer;
}

[type="button"], [type="reset"], [type="submit"], button {
	-webkit-appearance: button;
}

[type="button"]:not(:disabled), [type="reset"]:not(:disabled), [type="submit"]:not(:disabled), button:not(:disabled) {
	cursor: pointer;
}

[type="search"] {
	-webkit-appearance: textfield;
	outline-offset: -2px;
}

textarea {
	resize: vertical;
}

fieldset {
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
}

legend {
	float: left;
	width: 100%;
	padding: 0;
	margin-bottom: .5rem;
	font-size: calc(1.275rem + .3vw);
	line-height: inherit;
}

@media (min-width: 1200px) {
	legend {
		font-size: 1.5rem;
	}
}

summary {
	display: list-item;
	cursor: pointer;
}

[hidden] {
	display: none !important;
}
