@import url('fonts.css');

/* ---------------------------------------------------------------------------
   Importundo — site styles.
   The page is a sheet: hairline cell lattice, monospaced data, and the four
   colours the importer itself uses to label a row (create, update, unchanged,
   error), plus one accent reserved entirely for rollback.
   --------------------------------------------------------------------------- */

:root {
	--paper:        #e9ecf0;
	--cell:         #ffffff;
	--cell-2:       #f4f6f8;
	--ink:          #12161b;
	--dim:          #565f6a;
	--faint:        #808a95;
	--rule:         #ccd3db;
	--rule-soft:    #dde2e8;
	--lattice:      rgba(18, 22, 27, 0.045);

	--create:       #0c6b41;
	--create-bg:    #e3f3ea;
	--update:       #8a5000;
	--update-bg:    #fbeedb;
	--same:         #6b7681;
	--same-bg:      #eef0f3;
	--fail:         #a81f14;
	--fail-bg:      #fbe7e5;
	--revert:       #3a34a8;
	--revert-bg:    #e8e6fb;

	--f-display: 'Martian Mono', ui-monospace, SFMono-Regular, monospace;
	--f-body:    'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--f-data:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

	--wrap: 1180px;
	--gap: clamp(1.5rem, 4vw, 3.5rem);
	--radius: 3px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--paper:     #0e1216;
		--cell:      #161b21;
		--cell-2:    #1b2129;
		--ink:       #e7ecf1;
		--dim:       #9aa5b1;
		--faint:     #77828e;
		--rule:      #2a333d;
		--rule-soft: #222a33;
		--lattice:   rgba(231, 236, 241, 0.045);

		--create:    #58c78d;
		--create-bg: #12291f;
		--update:    #e0a04a;
		--update-bg: #2b2113;
		--same:      #8b959f;
		--same-bg:   #1c2229;
		--fail:      #f0796b;
		--fail-bg:   #2d1815;
		--revert:    #a49dff;
		--revert-bg: #1e1c3a;
	}
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background-color: var(--paper);
	background-image:
		linear-gradient(var(--lattice) 1px, transparent 1px),
		linear-gradient(90deg, var(--lattice) 1px, transparent 1px);
	background-size: 88px 88px;
	background-position: -1px -1px;
	color: var(--ink);
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.62;
	font-feature-settings: 'ss02' 1;
}

::selection { background: var(--revert-bg); color: var(--ink); }

a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible {
	outline: 2px solid var(--revert);
	outline-offset: 3px;
}

img { max-width: 100%; height: auto; display: block; }

/* --- shared shells --------------------------------------------------------- */

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.eyebrow {
	font-family: var(--f-data);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--faint);
	margin: 0 0 1rem;
}

h1, h2, h3 {
	font-family: var(--f-display);
	font-weight: 600;
	letter-spacing: -0.055em;
	line-height: 1.02;
	margin: 0;
	text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.5rem, 3.1vw, 2.25rem); }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.25rem); letter-spacing: -0.04em; }

p { margin: 0 0 1.1em; }

code, kbd, samp {
	font-family: var(--f-data);
	font-size: 0.88em;
}

.lede {
	font-size: clamp(1.06rem, 1.7vw, 1.3rem);
	line-height: 1.5;
	color: var(--dim);
	max-width: 46ch;
}

/* --- masthead -------------------------------------------------------------- */

.masthead {
	position: sticky;
	top: 0;
	z-index: 40;
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--rule);
}

.masthead-in {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-height: 60px;
}

/* The lockup is one file — assets/img/logo.svg — carrying the mark, the word and
   its own dark-scheme colours. Sizing is by height so the box stays correct if
   the wordmark is ever reset at a different width. */
.wordmark {
	display: flex;
	align-items: center;
	text-decoration: none;
	margin-right: auto;
}

.wordmark img {
	display: block;
	height: 22px;
	width: auto;
}

.nav {
	display: flex;
	align-items: center;
	gap: 1.4rem;
	font-family: var(--f-data);
	font-size: 0.82rem;
}

.nav a { text-decoration: none; color: var(--dim); }
.nav a:hover, .nav a[aria-current='page'] { color: var(--ink); }
.nav a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--revert); text-decoration-thickness: 2px; }

.nav-cta {
	border: 1px solid var(--rule);
	background: var(--cell);
	padding: 0.35rem 0.75rem;
	border-radius: var(--radius);
}
.nav-cta:hover { border-color: var(--ink); }

@media (max-width: 640px) {
	.nav { gap: 0.9rem; font-size: 0.75rem; }
	.nav .nav-hide { display: none; }
}

/* --- buttons --------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--f-data);
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1;
	padding: 0.85rem 1.15rem;
	border: 1px solid var(--ink);
	border-radius: var(--radius);
	background: var(--ink);
	color: var(--paper);
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 0 0 var(--rule); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn-ghost {
	background: var(--cell);
	color: var(--ink);
	border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); }

/* --- hero ------------------------------------------------------------------ */

.hero { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 4vw, 3rem); }

.hero-grid {
	display: grid;
	gap: clamp(1.5rem, 4vw, 3rem);
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	align-items: start;
}

@media (max-width: 900px) {
	.hero-grid { grid-template-columns: 1fr; }
}

.hero h1 { margin-bottom: 1.4rem; }

.hero h1 .rev {
	color: var(--revert);
	position: relative;
	white-space: nowrap;
}

@media (max-width: 420px) {
	.hero h1 .rev { white-space: normal; }
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

.hero-meta {
	margin-top: 1.5rem;
	font-family: var(--f-data);
	font-size: 0.78rem;
	color: var(--faint);
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
}

.hero-side {
	border: 1px solid var(--rule);
	background: var(--cell);
	border-radius: var(--radius);
	padding: 1.25rem 1.35rem;
}

.hero-side dl { margin: 0; display: grid; gap: 0.9rem; }
.hero-side dt {
	font-family: var(--f-data);
	font-size: 0.72rem;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--faint);
}
.hero-side dd { margin: 0.15rem 0 0; font-size: 0.95rem; color: var(--dim); }
.hero-side dd strong { color: var(--ink); font-weight: 600; }

/* --- the sheet: interactive preview / import / rollback demo ---------------- */

.sheet-section { padding-bottom: clamp(3rem, 7vw, 5rem); }

.sheet {
	border: 1px solid var(--rule);
	background: var(--cell);
	border-radius: var(--radius);
	overflow: hidden;
}

.sheet-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	padding: 0.7rem 1rem;
	border-bottom: 1px solid var(--rule);
	background: var(--cell-2);
}

.sheet-file {
	font-family: var(--f-data);
	font-size: 0.82rem;
	color: var(--dim);
	margin-right: auto;
	display: flex;
	align-items: center;
	gap: 0.55rem;
}
.sheet-file b { color: var(--ink); font-weight: 500; }

.steps {
	display: flex;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--cell);
}

.steps button {
	appearance: none;
	border: 0;
	border-left: 1px solid var(--rule);
	background: transparent;
	color: var(--dim);
	font-family: var(--f-data);
	font-size: 0.8rem;
	font-weight: 500;
	padding: 0.5rem 0.9rem;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.steps button:first-child { border-left: 0; }
.steps button:hover { background: var(--cell-2); color: var(--ink); }
.steps button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.steps button[data-step='rollback'][aria-pressed='true'] { background: var(--revert); border-color: var(--revert); color: #fff; }

.sheet-scroll { overflow-x: auto; }

table.rows {
	width: 100%;
	min-width: 720px;
	border-collapse: collapse;
	font-family: var(--f-data);
	font-size: 0.82rem;
}

table.rows th {
	text-align: left;
	font-weight: 500;
	color: var(--faint);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.6rem 0.85rem;
	border-bottom: 1px solid var(--rule);
	background: var(--cell-2);
	white-space: nowrap;
}

table.rows td {
	padding: 0.7rem 0.85rem;
	border-bottom: 1px solid var(--rule-soft);
	border-left: 1px solid var(--rule-soft);
	vertical-align: top;
}
table.rows td:first-child { border-left: 0; }
table.rows tr:last-child td { border-bottom: 0; }

.col-n {
	color: var(--faint);
	width: 3.5rem;
	text-align: right;
	font-variant-numeric: tabular-nums;
	background: var(--cell-2);
}

.tag {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.2rem 0.45rem;
	border-radius: 2px;
	white-space: nowrap;
}
.tag-create { background: var(--create-bg); color: var(--create); }
.tag-update { background: var(--update-bg); color: var(--update); }
.tag-same   { background: var(--same-bg);   color: var(--same); }
.tag-fail   { background: var(--fail-bg);   color: var(--fail); }
.tag-revert { background: var(--revert-bg); color: var(--revert); }

.tag-new {
	font-size: 0.62rem;
	letter-spacing: 0.06em;
	padding: 0.1rem 0.3rem;
	background: var(--create-bg);
	color: var(--create);
	border-radius: 2px;
	margin-left: 0.35rem;
	text-transform: uppercase;
}

/* value cells: old value, arrow, new value — the state class decides which show */
.v { display: inline-flex; align-items: baseline; gap: 0.35rem; flex-wrap: wrap; }
.v-old { color: var(--dim); }
.v-arrow { color: var(--faint); }
.v-new { color: var(--ink); border-bottom: 1px dashed var(--update); }
.v-plain { color: var(--dim); }

.sheet.is-preview  .v-old { text-decoration: line-through; text-decoration-color: var(--rule); }
.sheet.is-imported .v-old,
.sheet.is-imported .v-arrow { display: none; }
.sheet.is-imported .v-new { border-bottom-color: transparent; }
.sheet.is-rollback .v-new,
.sheet.is-rollback .v-arrow { display: none; }
.sheet.is-rollback .v-old { color: var(--ink); text-decoration: none; }

.sheet tr[data-row='create'] .id-cell::after { content: '—'; color: var(--faint); }
.sheet.is-imported tr[data-row='create'] .id-cell::after { content: attr(data-id); color: var(--dim); }
.sheet.is-rollback tr[data-row='create'] { color: var(--faint); }
.sheet.is-rollback tr[data-row='create'] .cell-title { text-decoration: line-through; text-decoration-color: var(--revert); }
.sheet.is-rollback tr[data-row='create'] .v-plain { color: var(--faint); }

.sheet tr[data-row='same'] td { background: var(--cell-2); }

.sheet.is-imported tr[data-row='create'],
.sheet.is-imported tr[data-row='update'] { animation: written 0.5s ease; }

@keyframes written {
	0%   { background: var(--create-bg); }
	100% { background: transparent; }
}

.state-tag[data-when] { display: none; }
.sheet.is-preview  .state-tag[data-when='preview'],
.sheet.is-imported .state-tag[data-when='imported'],
.sheet.is-rollback .state-tag[data-when='rollback'] { display: inline-block; }

.sheet-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1.5rem;
	padding: 0.85rem 1rem;
	border-top: 1px solid var(--rule);
	background: var(--cell-2);
	font-family: var(--f-data);
	font-size: 0.8rem;
	color: var(--dim);
}

.counts { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.counts b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

.sheet-note[data-when] { display: none; margin-left: auto; }
.sheet.is-preview  .sheet-note[data-when='preview'],
.sheet.is-imported .sheet-note[data-when='imported'],
.sheet.is-rollback .sheet-note[data-when='rollback'] { display: block; }
.sheet.is-rollback .sheet-note { color: var(--revert); }

.sheet-caption {
	margin-top: 0.9rem;
	font-size: 0.85rem;
	color: var(--faint);
	max-width: 68ch;
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- generic sections ------------------------------------------------------ */

.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); border-top: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section-head p { color: var(--dim); margin-top: 0.9rem; margin-bottom: 0; }

.cards {
	display: grid;
	gap: 1px;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	background: var(--rule);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
}

.card {
	background: var(--cell);
	padding: 1.4rem 1.5rem 1.6rem;
}

.card h3 {
	margin-bottom: 0.7rem;
	font-size: 1.02rem;
	letter-spacing: -0.035em;
	line-height: 1.25;
	text-wrap: pretty;
}
.card p { color: var(--dim); font-size: 0.94rem; margin-bottom: 0; }
.card p + p { margin-top: 0.7rem; }
.card-label {
	font-family: var(--f-data);
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--faint);
	display: block;
	margin-bottom: 0.75rem;
}

/* three-up card grid, for card counts divisible by three */
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* pricing cards on the Pro page */
.price {
	margin: 0 0 0.9rem;
	line-height: 1;
}
.price b {
	font-family: var(--f-display);
	font-size: clamp(1.9rem, 3.4vw, 2.5rem);
	font-weight: 600;
	letter-spacing: -0.05em;
}
.price span {
	font-family: var(--f-data);
	font-size: 0.85rem;
	color: var(--dim);
}
.price-action { margin-top: 1.1rem; }

.facts {
	display: grid;
	gap: 1px;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	background: var(--rule);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
}

.fact { background: var(--cell); padding: 1.2rem 1.3rem; }
.fact b {
	display: block;
	font-family: var(--f-display);
	font-size: clamp(1.35rem, 2.6vw, 1.8rem);
	font-weight: 600;
	letter-spacing: -0.05em;
	line-height: 1;
	margin-bottom: 0.5rem;
}
.fact span { font-size: 0.86rem; color: var(--dim); display: block; }

/* --- terminal / code ------------------------------------------------------- */

.term {
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	background: var(--cell);
	overflow: hidden;
}

.term-head {
	padding: 0.55rem 1rem;
	border-bottom: 1px solid var(--rule);
	background: var(--cell-2);
	font-family: var(--f-data);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--faint);
}

.term pre {
	margin: 0;
	padding: 1.1rem 1.15rem;
	overflow-x: auto;
	font-family: var(--f-data);
	font-size: 0.83rem;
	line-height: 1.75;
}

.term .p { color: var(--faint); }
.term .c { color: var(--dim); }
.term .ok { color: var(--create); }
.term .warn { color: var(--update); }
.term .rev { color: var(--revert); }

pre.code {
	margin: 0 0 1.2rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	background: var(--cell);
	overflow-x: auto;
	font-family: var(--f-data);
	font-size: 0.83rem;
	line-height: 1.7;
}

/* --- notice anatomy -------------------------------------------------------- */

.notice {
	border: 1px solid var(--rule);
	border-left: 3px solid var(--update);
	border-radius: var(--radius);
	background: var(--cell);
	padding: 1.1rem 1.25rem;
}

.notice-title { font-weight: 600; margin-bottom: 0.5rem; }
.notice ol { margin: 0 0 0.9rem; padding-left: 1.25rem; color: var(--dim); font-size: 0.94rem; }
.notice li { margin-bottom: 0.3rem; }
.notice details {
	border-top: 1px solid var(--rule-soft);
	padding-top: 0.7rem;
	font-size: 0.88rem;
	color: var(--dim);
}
.notice summary { cursor: pointer; font-family: var(--f-data); font-size: 0.78rem; color: var(--faint); }
.notice summary:hover { color: var(--ink); }
.notice pre { margin: 0.7rem 0 0; font-family: var(--f-data); font-size: 0.78rem; white-space: pre-wrap; }

/* --- spec tables ----------------------------------------------------------- */

.spec-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--cell); }

table.spec {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

table.spec th {
	text-align: left;
	font-family: var(--f-data);
	font-weight: 500;
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--faint);
	background: var(--cell-2);
	padding: 0.6rem 0.9rem;
	border-bottom: 1px solid var(--rule);
	white-space: nowrap;
}

table.spec td {
	padding: 0.7rem 0.9rem;
	border-bottom: 1px solid var(--rule-soft);
	border-left: 1px solid var(--rule-soft);
	vertical-align: top;
	color: var(--dim);
}
table.spec td:first-child { border-left: 0; color: var(--ink); }
table.spec tr:last-child td { border-bottom: 0; }
table.spec code { color: var(--ink); }

/* --- callout / quote ------------------------------------------------------- */

.pull {
	border-left: 3px solid var(--revert);
	padding: 0.2rem 0 0.2rem 1.15rem;
	margin: 0 0 1.4rem;
	font-size: clamp(1.05rem, 1.9vw, 1.3rem);
	line-height: 1.45;
	max-width: 44ch;
}

.split {
	display: grid;
	gap: clamp(1.5rem, 4vw, 3rem);
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.limits { list-style: none; margin: 0; padding: 0; }
.limits li {
	border-top: 1px solid var(--rule);
	padding: 0.85rem 0;
	display: grid;
	grid-template-columns: 8.5rem minmax(0, 1fr);
	gap: 1rem;
	font-size: 0.94rem;
	color: var(--dim);
}
.limits li:last-child { border-bottom: 1px solid var(--rule); }
.limits b {
	font-family: var(--f-data);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--faint);
	font-weight: 500;
	padding-top: 0.2rem;
}
@media (max-width: 560px) { .limits li { grid-template-columns: 1fr; gap: 0.25rem; } }

/* --- call to action -------------------------------------------------------- */

.cta {
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	background: var(--cell);
	padding: clamp(1.75rem, 4vw, 2.75rem);
	display: grid;
	gap: 1.5rem;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
}
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }
.cta h2 { margin-bottom: 0.6rem; }
.cta p { color: var(--dim); margin: 0; max-width: 52ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* --- footer ---------------------------------------------------------------- */

.site-foot {
	border-top: 1px solid var(--rule);
	margin-top: clamp(3rem, 7vw, 5rem);
	padding-block: 2.5rem 3.5rem;
	font-size: 0.88rem;
	color: var(--dim);
}

.foot-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.foot-grid h4 {
	font-family: var(--f-data);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--faint);
	font-weight: 500;
	margin: 0 0 0.75rem;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 0.4rem; }
.foot-grid a { text-decoration: none; color: var(--dim); }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }

.foot-note {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--rule);
	font-family: var(--f-data);
	font-size: 0.76rem;
	color: var(--faint);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

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

.doc-shell {
	display: grid;
	grid-template-columns: 232px minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4rem);
	padding-block: clamp(2rem, 5vw, 3.5rem);
	align-items: start;
}

@media (max-width: 900px) {
	.doc-shell { grid-template-columns: 1fr; gap: 1.5rem; }
}

.doc-nav {
	position: sticky;
	top: 84px;
	font-size: 0.9rem;
}
@media (max-width: 900px) {
	.doc-nav {
		position: static;
		border: 1px solid var(--rule);
		border-radius: var(--radius);
		background: var(--cell);
		padding: 1rem 1.15rem;
	}
}

.doc-nav h4 {
	font-family: var(--f-data);
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--faint);
	font-weight: 500;
	margin: 1.5rem 0 0.6rem;
}
.doc-nav h4:first-child { margin-top: 0; }
.doc-nav ul { list-style: none; margin: 0; padding: 0; }
.doc-nav li { margin: 0; }
.doc-nav a {
	display: block;
	padding: 0.28rem 0 0.28rem 0.75rem;
	border-left: 1px solid var(--rule);
	text-decoration: none;
	color: var(--dim);
}
.doc-nav a:hover { color: var(--ink); border-left-color: var(--ink); }
.doc-nav a[aria-current='page'] {
	color: var(--ink);
	border-left: 2px solid var(--revert);
	font-weight: 500;
}

.doc { max-width: 76ch; }
.doc > h1 { margin-bottom: 1rem; }
.doc > h1 + p { font-size: 1.1rem; color: var(--dim); }

.doc h2 {
	margin-top: 2.75rem;
	margin-bottom: 0.9rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rule);
}
.doc h3 { margin-top: 2rem; margin-bottom: 0.6rem; }
.doc h2 + h3 { margin-top: 1.25rem; }

.doc ul, .doc ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.doc li { margin-bottom: 0.45rem; }
.doc li > ul, .doc li > ol { margin-top: 0.45rem; margin-bottom: 0.3rem; }

.doc code {
	background: var(--cell);
	border: 1px solid var(--rule-soft);
	border-radius: 2px;
	padding: 0.08em 0.32em;
}
.doc pre.code code { background: none; border: 0; padding: 0; }

.doc .spec-wrap { margin-bottom: 1.4rem; }

.doc blockquote {
	margin: 0 0 1.3rem;
	padding-left: 1.1rem;
	border-left: 3px solid var(--rule);
	color: var(--dim);
}

.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.doc-meta {
	font-family: var(--f-data);
	font-size: 0.74rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 0.8rem;
}

.next {
	display: grid;
	gap: 1px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	background: var(--rule);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
	margin-top: 3rem;
}
.next a {
	background: var(--cell);
	padding: 1rem 1.15rem;
	text-decoration: none;
	display: block;
}
.next a:hover { background: var(--cell-2); }
.next span {
	display: block;
	font-family: var(--f-data);
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 0.3rem;
}
.next b { font-weight: 500; }

/* --- FAQ ------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--rule); }
.faq details {
	border-bottom: 1px solid var(--rule);
	padding: 1rem 0;
}
.faq summary {
	cursor: pointer;
	font-weight: 500;
	font-size: 1.02rem;
	list-style: none;
	display: flex;
	gap: 0.8rem;
	align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
	content: '+';
	font-family: var(--f-data);
	color: var(--revert);
	flex: none;
	width: 1ch;
}
.faq details[open] summary::before { content: '\2212'; }
.faq details > *:not(summary) { margin-top: 0.8rem; margin-left: 1.8rem; color: var(--dim); }
.faq details > p:last-child { margin-bottom: 0; }

/* --- screenshots ----------------------------------------------------------- */

.shots {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
}
@media (max-width: 620px) {
	.shots { grid-template-columns: 1fr; }
}

.shot {
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	background: var(--cell);
	overflow: hidden;
	margin: 0;
	align-self: start;
}
.shot a {
	display: block;
	border-bottom: 1px solid var(--rule);
	background: var(--cell-2);
	max-height: 26rem;
	overflow: hidden;
	position: relative;
}
.shot img { width: 100%; display: block; }
.shot a::after {
	content: 'Open full size ↗';
	position: absolute;
	right: 0.6rem;
	bottom: 0.6rem;
	font-family: var(--f-data);
	font-size: 0.68rem;
	letter-spacing: 0.06em;
	padding: 0.25rem 0.5rem;
	border: 1px solid var(--rule);
	border-radius: 2px;
	background: var(--cell);
	color: var(--dim);
	opacity: 0;
	transition: opacity 0.15s ease;
}
.shot a:hover::after, .shot a:focus-visible::after { opacity: 1; }

.shot figcaption {
	padding: 0.9rem 1.1rem 1.1rem;
	font-size: 0.88rem;
	color: var(--dim);
}
.shot figcaption > b:first-child {
	display: block;
	font-family: var(--f-data);
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--faint);
	font-weight: 500;
	margin-bottom: 0.35rem;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.section ul:not(.limits) { color: var(--dim); padding-left: 1.2rem; }
.section ul li { margin-bottom: 0.45rem; }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: var(--paper);
	padding: 0.6rem 1rem;
	font-family: var(--f-data);
	font-size: 0.85rem;
	z-index: 100;
}
.skip-link:focus { left: 0; }
