/*
Theme Name: Eighteen Eighty-Six
Theme URI: https://example.com/car-society
Description: A learned-society identity for the Car Society plugin. Prussian blue and vermilion on warm neutral paper, serif display type, hairline rules, and a seal bearing the year the motor car was patented. System fonts only, so it renders identically with the network switched off.
Author: Car Society
Version: 2.0.0
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: car-society-theme
*/

/* ==================================================================
   Tokens

   The palette comes from 1880s technical printing rather than from
   "vintage": cyanotype's image IS Prussian blue, and black-plus-red was the
   standard two-colour letterpress pairing. The paper is a warm neutral —
   good paper, not old paper, and never the cream of modern pastiche.
   ================================================================== */

:root {
	--paper:        #E8E6E1;
	--surface:      #F8F7F4;
	--surface-sunk: #DEDBD4;
	--ink:          #15181C;
	--ink-soft:     #55595F;
	--ink-faint:    #7C8189;
	--rule:         #CFCBC3;
	--rule-strong:  #A9A49A;

	/* Chrome: the deep bands at the head and foot of every page. */
	--chrome:       #0E2033;
	--chrome-ink:   #F2F1ED;
	--chrome-soft:  #9DAAB9;
	--chrome-rule:  #1D3448;

	/*
	 * Two inks and a paper — which is how period printing actually worked, and
	 * why black-and-red letterpress looks the way it does.
	 *
	 * Brass was the obvious choice here and it was the wrong one: #A97F42 on this
	 * paper measures 2.9:1, and white on a brass button 3.6:1, so neither could
	 * legally carry text. Vermilion measures 6.1:1 on paper and 7.6:1 reversed.
	 */
	--accent:       #9B2C1E;
	--accent-deep:  #7E2317;
	--accent-ink:   #FFFFFF;
	--accent-wash:  #F5E4E0;

	--ok:           #1F5D46;
	--ok-wash:      #E0EDE6;
	--warn:         #855218;
	--warn-wash:    #F6EADA;
	--danger:       #8E2B22;
	--danger-wash:  #F3E2DF;

	/*
	 * Serif for display, sans for reading, mono for anything numbered.
	 * Palatino Linotype ships with Windows and Iowan with macOS; Georgia is the
	 * only genuinely universal fallback. Android has none of them and lands on
	 * Noto Serif, so the identity has to survive that substitution — which is
	 * why nothing structural depends on the serif.
	 */
	--font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Cambria, Georgia, serif;
	--font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono:  ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;

	--wrap: 72rem;
	--wrap-narrow: 42rem;
	--radius: 3px;
	--radius-sm: 2px;

	--shadow: 0 1px 2px rgba(21, 24, 28, .05), 0 10px 28px -16px rgba(14, 32, 51, .28);
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.62;
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

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

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

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

h1, h2, h3 {
	font-family: var(--font-serif);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -.012em;
	margin: 0 0 .5em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.15rem); }
h2 { font-size: clamp(1.55rem, 1.15rem + 1.4vw, 2.15rem); }
h3 { font-size: 1.22rem; letter-spacing: -.008em; }

h4 {
	font-family: var(--font-sans);
	font-size: 1rem;
	font-weight: 640;
	margin: 0 0 .4em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

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

/* Small caps, letterspaced — the label voice of an institutional page. */
.eyebrow {
	font-family: var(--font-mono);
	font-size: .68rem;
	text-transform: uppercase;
	letter-spacing: .2em;
	color: var(--ink-faint);
	margin: 0 0 .7rem;
}

.muted { color: var(--ink-soft); }

/* A double hairline, the way a certificate or a journal masthead is ruled. */
.rule-double {
	border: 0;
	border-top: 1px solid var(--rule-strong);
	border-bottom: 1px solid var(--rule-strong);
	height: 3px;
	margin: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--accent); color: var(--accent-ink);
	padding: .75rem 1.25rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ==================================================================
   The seal
   ================================================================== */

.seal {
	width: 2.6rem;
	height: 2.6rem;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--accent);
	box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px rgba(155,44,30,.38);
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1;
}

.seal--ink { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 4px rgba(21,24,28,.35); }

/*
 * On the dark bands the seal is struck in light ink. Vermilion on Prussian
 * measures about 2.3:1 — a handsome combination on paper and unreadable here.
 */
.site-header .seal,
.site-footer .seal {
	border-color: rgba(242,241,237,.55);
	color: var(--chrome-ink);
	box-shadow: inset 0 0 0 4px rgba(242,241,237,.16);
}
.seal--lg { width: 5.5rem; height: 5.5rem; font-size: 1.35rem; letter-spacing: .06em; }

/* ==================================================================
   Header
   ================================================================== */

.site-header {
	background: var(--chrome);
	color: var(--chrome-ink);
	border-bottom: 3px double var(--chrome-rule);
	position: sticky;
	top: 0;
	z-index: 50;
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	min-height: 4.4rem;
	flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; margin-right: auto; }

.brand__name {
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: 1.1rem;
	letter-spacing: .005em;
	line-height: 1.1;
	display: block;
}

.brand__tag {
	display: block;
	font-family: var(--font-mono);
	font-size: .6rem;
	text-transform: uppercase;
	letter-spacing: .18em;
	color: var(--chrome-soft);
	margin-top: .3rem;
}

.nav { display: flex; align-items: center; gap: .1rem; flex-wrap: wrap; }
.nav ul { list-style: none; display: flex; gap: .1rem; margin: 0; padding: 0; flex-wrap: wrap; }

.nav a {
	display: block;
	padding: .48rem .75rem;
	color: var(--chrome-soft);
	text-decoration: none;
	font-size: .82rem;
	font-weight: 500;
	letter-spacing: .09em;
	text-transform: uppercase;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--chrome-ink); }
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--chrome-ink); border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: .5rem; }

/* ==================================================================
   Buttons
   ================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	padding: .62rem 1.15rem;
	min-height: 42px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	font: inherit;
	font-size: .84rem;
	font-weight: 620;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}

.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); }

.btn--ghost { background: transparent; color: var(--chrome-ink); border-color: rgba(242,241,237,.3); }
.btn--ghost:hover { background: rgba(242,241,237,.1); color: var(--chrome-ink); }

.btn--quiet { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--quiet:hover { border-color: var(--ink); color: var(--ink); }

/* ==================================================================
   Hero
   ================================================================== */

.hero {
	background: var(--chrome);
	color: var(--chrome-ink);
	padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
	position: relative;
	overflow: hidden;
}

/*
 * Faint drafting-paper grid. Two repeating-linear-gradients, no image — a
 * nod to the patent drawing rather than a picture of one.
 */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		repeating-linear-gradient(0deg, rgba(157,170,185,.075) 0 1px, transparent 1px 44px),
		repeating-linear-gradient(90deg, rgba(157,170,185,.075) 0 1px, transparent 1px 44px);
	pointer-events: none;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(60rem 26rem at 82% -14%, rgba(155,44,30,.22), transparent 64%);
	pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; display: grid; gap: 2.5rem; align-items: start; }

@media (min-width: 60rem) {
	.hero__inner { grid-template-columns: 1.2fr .8fr; gap: 3.5rem; }

	/* A visitor gets no next-event card, so the hero is one measured column
	   rather than a wide one and an empty space. */
	.hero__inner--solo { grid-template-columns: minmax(0, 46rem); }
}

.hero .eyebrow { color: var(--accent); filter: brightness(1.3); }
.hero h1 { color: #fff; margin-bottom: .7rem; letter-spacing: -.018em; }

.hero__lede {
	font-size: clamp(1.05rem, .98rem + .4vw, 1.2rem);
	color: rgba(242,241,237,.76);
	max-width: 46ch;
	margin-bottom: 1.9rem;
}

.hero__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.hero__stats {
	display: flex;
	gap: 2.5rem;
	margin-top: 2.9rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(242,241,237,.16);
	flex-wrap: wrap;
}

.hero__stat b {
	display: block;
	font-family: var(--font-mono);
	font-size: 1.55rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	color: #fff;
}

.hero__stat span {
	display: block;
	font-family: var(--font-mono);
	font-size: .6rem;
	text-transform: uppercase;
	letter-spacing: .16em;
	color: rgba(242,241,237,.46);
	margin-top: .45rem;
}

/* What a visitor is told instead of the roster size. */
.hero__terms {
	display: grid;
	gap: .55rem;
	margin-top: 2.9rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(242,241,237,.16);
	font-family: var(--font-mono);
	font-size: .7rem;
	text-transform: uppercase;
	letter-spacing: .14em;
	color: rgba(242,241,237,.6);
}

.hero__terms div { padding-left: 1.1rem; position: relative; }
.hero__terms div::before { content: "—"; position: absolute; left: 0; color: var(--accent); filter: brightness(1.4); }

/* The next-event card in the hero */
.next-event {
	background: rgba(248,247,244,.05);
	border: 1px solid rgba(242,241,237,.16);
	border-radius: var(--radius);
	overflow: hidden;
}

.next-event__media { aspect-ratio: 16/9; overflow: hidden; background: rgba(0,0,0,.28); }
.next-event__media img { width: 100%; height: 100%; object-fit: cover; }
.next-event__body { padding: 1.15rem 1.3rem 1.4rem; }

.next-event__when {
	font-family: var(--font-mono);
	font-size: .64rem;
	text-transform: uppercase;
	letter-spacing: .16em;
	color: var(--accent);
	filter: brightness(1.35);
}

.next-event h2 { font-size: 1.3rem; margin: .5rem 0 .35rem; color: #fff; }
.next-event p { color: rgba(242,241,237,.68); font-size: .93rem; margin-bottom: 1rem; }
.next-event__meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }

/* ==================================================================
   Sections
   ================================================================== */

.section { padding: clamp(2.75rem, 6vw, 4.75rem) 0; }
.section--sunk { background: var(--surface-sunk); }
.section--paper { background: var(--surface); }

.section__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1.5rem;
	flex-wrap: wrap;
	margin-bottom: 1.9rem;
}

.section__head h2 { margin: 0; }
.section__head p { color: var(--ink-soft); margin: .45rem 0 0; max-width: 54ch; }

/* ==================================================================
   The name — the 1886 note on the front page
   ================================================================== */

.origin {
	display: grid;
	gap: 2.5rem;
	align-items: start;
	max-width: 58rem;
	margin: 0 auto;
}

@media (min-width: 56rem) {
	.origin { grid-template-columns: auto 1fr; gap: 3.25rem; }
}

/* Aligned to the heading rather than floating against the middle of the text. */
.origin__seal { display: grid; place-items: center; gap: .9rem; margin: 0; padding-top: .35rem; }

.origin__seal figcaption {
	font-family: var(--font-mono);
	font-size: .6rem;
	text-transform: uppercase;
	letter-spacing: .17em;
	color: var(--ink-faint);
	text-align: center;
}

.origin__body { max-width: 60ch; }
.origin__body h2 { margin-bottom: .75rem; }

.origin__body p {
	font-size: 1.06rem;
	color: var(--ink-soft);
}

.origin__body p:first-of-type { color: var(--ink); }

.origin__cite {
	margin-top: 1.4rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
	font-family: var(--font-mono);
	font-size: .7rem;
	letter-spacing: .07em;
	color: var(--ink-faint);
	text-transform: uppercase;
}

/* ==================================================================
   Cards, tiles
   ================================================================== */

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

.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

.tile {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: border-color .12s ease, box-shadow .12s ease;
}

.tile:hover { border-color: var(--rule-strong); box-shadow: var(--shadow); color: inherit; }

.tile__media { aspect-ratio: 16/10; overflow: hidden; background: var(--surface-sunk); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .32rem; flex: 1; }

.tile__when {
	font-family: var(--font-mono);
	font-size: .64rem;
	text-transform: uppercase;
	letter-spacing: .14em;
	color: var(--accent-deep);
}

.tile__title { font-family: var(--font-serif); font-size: 1.14rem; font-weight: 600; margin: 0; }
.tile__meta { color: var(--ink-soft); font-size: .89rem; margin: 0; }
.tile__foot { margin-top: auto; padding-top: .85rem; display: flex; gap: .35rem; flex-wrap: wrap; }

/* ==================================================================
   Pills
   ================================================================== */

.pill {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: .62rem;
	text-transform: uppercase;
	letter-spacing: .12em;
	padding: .24rem .6rem;
	border-radius: 999px;
	background: transparent;
	color: var(--ink-soft);
	border: 1px solid var(--rule-strong);
	white-space: nowrap;
}

.pill--open { background: var(--ok-wash); color: var(--ok); border-color: transparent; }
.pill--warn { background: var(--warn-wash); color: var(--warn); border-color: transparent; }
.pill--accent { background: var(--accent-wash); color: var(--accent-deep); border-color: transparent; }
.pill--dark { background: rgba(242,241,237,.1); color: rgba(242,241,237,.8); border-color: rgba(242,241,237,.2); }

/* ==================================================================
   Page and article
   ================================================================== */

.page-head {
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
	padding: clamp(2rem, 5vw, 3.4rem) 0 clamp(1.5rem, 3vw, 2.3rem);
}

.page-head h1 { margin-bottom: .4rem; }
.page-head__lede { color: var(--ink-soft); max-width: 58ch; font-size: 1.05rem; margin: 0; }

.page-body { padding: clamp(2rem, 5vw, 3.25rem) 0 4.5rem; }

.prose { max-width: 66ch; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { margin-top: 2.3rem; }
.prose h3 { margin-top: 1.7rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: .35rem; }
.prose img { border-radius: var(--radius); }

.prose blockquote {
	margin: 1.6rem 0;
	padding: .25rem 0 .25rem 1.35rem;
	border-left: 2px solid var(--accent);
	font-family: var(--font-serif);
	font-size: 1.1rem;
	color: var(--ink-soft);
}

/* Event single */
.event-hero { display: grid; gap: 1.9rem; }

@media (min-width: 56rem) {
	.event-hero { grid-template-columns: 1.15fr .85fr; align-items: start; }
}

.event-hero__media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); }
.event-hero__media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* Garage */
.car-figure { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: var(--surface); }
.car-figure img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.spec-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
}

.spec-list li {
	background: var(--surface);
	padding: .72rem 1rem;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	border-top: 1px solid var(--rule);
}

.spec-list li:first-child { border-top: 0; }

.spec-list span:first-child {
	color: var(--ink-faint);
	font-family: var(--font-mono);
	font-size: .64rem;
	text-transform: uppercase;
	letter-spacing: .13em;
	align-self: center;
}

.spec-list span:last-child { font-weight: 600; }

/* Comments */
.comments { margin-top: 2.5rem; border-top: 1px solid var(--rule); padding-top: 1.75rem; }
.comments ol { list-style: none; margin: 0; padding: 0; }
.comments .comment { border-top: 1px solid var(--rule); padding: 1.15rem 0; }
.comments .comment:first-child { border-top: 0; }
.comments .comment-meta { font-size: .85rem; color: var(--ink-faint); margin-bottom: .35rem; }
.comments .comment-author { font-weight: 640; color: var(--ink); }

.comment-form p { margin-bottom: .85rem; }
.comment-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: .65rem .75rem;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-sm);
	font: inherit;
	font-size: 1rem;
	background: var(--surface);
	color: var(--ink);
}

.comment-form .submit {
	background: var(--accent);
	color: var(--accent-ink);
	border: 0;
	padding: .65rem 1.25rem;
	border-radius: var(--radius-sm);
	font: inherit;
	font-weight: 620;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-size: .84rem;
	cursor: pointer;
}

/* ==================================================================
   Footer
   ================================================================== */

.site-footer {
	margin-top: auto;
	background: var(--chrome);
	color: var(--chrome-soft);
	padding: 3.25rem 0 2.25rem;
	font-size: .92rem;
	border-top: 3px double var(--chrome-rule);
}

.site-footer__inner { display: grid; gap: 2.25rem; }

@media (min-width: 48rem) {
	.site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

.site-footer h3 {
	font-family: var(--font-mono);
	font-size: .64rem;
	text-transform: uppercase;
	letter-spacing: .18em;
	color: rgba(242,241,237,.44);
	margin-bottom: 1rem;
	font-weight: 500;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer a { color: var(--chrome-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__brand p { color: rgba(242,241,237,.55); max-width: 36ch; }
.site-footer__brand .seal { margin-bottom: 1rem; }

.site-footer__base {
	margin-top: 2.5rem;
	padding-top: 1.4rem;
	border-top: 1px solid var(--chrome-rule);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	font-family: var(--font-mono);
	font-size: .66rem;
	letter-spacing: .13em;
	color: rgba(242,241,237,.38);
	text-transform: uppercase;
}

/* ==================================================================
   Plugin forms on their own page
   ================================================================== */

.cs-application,
.cs-login {
	max-width: 52rem;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	padding: clamp(1.25rem, 3vw, 2.15rem);
}

.cs-login { max-width: 26rem; }

.cs-application .cs-intro {
	margin-bottom: 1.6rem;
	padding-bottom: 1.3rem;
	border-bottom: 1px solid var(--rule);
	color: var(--ink-soft);
}

.cs-application .cs-fieldset + .cs-fieldset { margin-top: 1.85rem; }
.cs-application legend, .cs-form legend { font-family: var(--font-serif); font-size: 1.15rem; }

/* ==================================================================
   Application pages — dashboard and the two scanners
   ================================================================== */

.is-app .page-body { padding-top: clamp(1.25rem, 3vw, 2rem); }

/*
 * The field tools drop the identity almost entirely. A gate marshal at dusk
 * needs contrast and target size, not a serif and a seal.
 */
.is-app-scanner .site-header__inner,
.is-app-foodtruck .site-header__inner {
	min-height: 3.4rem;
	flex-wrap: nowrap;
	gap: .75rem;
}

.is-app-scanner .brand__tag,
.is-app-foodtruck .brand__tag { display: none; }

/*
 * Every box between the header and the name has to be allowed to shrink. The
 * name sits inside a wrapper span that is itself a flex item, and its automatic
 * minimum size holds the brand open at the full width of the club's name however
 * narrow the header gets — so the ellipsis below never engages, and a long name
 * runs straight across the Sign out button and takes the taps meant for it.
 */
.is-app-scanner .brand,
.is-app-foodtruck .brand,
.is-app-scanner .brand > *,
.is-app-foodtruck .brand > * { min-width: 0; }

/* The sign-out target is fixed at a thumb's width; it is the name that gives way. */
.is-app-scanner .header-actions,
.is-app-foodtruck .header-actions { flex-shrink: 0; }

.is-app-scanner .brand__name,
.is-app-foodtruck .brand__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--font-sans);
	font-size: .98rem;
	font-weight: 640;
}

.is-app-scanner .seal,
.is-app-foodtruck .seal { width: 2.1rem; height: 2.1rem; font-size: .58rem; }

.site-footer--slim {
	padding: 1rem 0;
	font-family: var(--font-mono);
	font-size: .64rem;
	text-transform: uppercase;
	letter-spacing: .13em;
	color: rgba(242,241,237,.4);
	border-top: 0;
}

.site-footer--slim .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ==================================================================
   Plugin bridge

   The plugin styles itself from custom properties, so it simply receives
   the society's palette. Repeated inside the dark-scheme query because the
   plugin flips its own tokens there and this theme does not.
   ================================================================== */

.cs {
	--cs-ink: var(--ink);
	--cs-ink-soft: var(--ink-soft);
	--cs-line: var(--rule);
	--cs-surface: var(--surface);
	--cs-surface-alt: var(--surface-sunk);
	--cs-accent: var(--accent);
	--cs-accent-ink: var(--accent-ink);
	--cs-ok: var(--ok);
	--cs-ok-bg: var(--ok-wash);
	--cs-warn: var(--warn);
	--cs-warn-bg: var(--warn-wash);
	--cs-error: var(--danger);
	--cs-error-bg: var(--danger-wash);
	--cs-radius: var(--radius);
	--cs-radius-sm: var(--radius-sm);
}

@media (prefers-color-scheme: dark) {
	.cs {
		--cs-ink: var(--ink);
		--cs-ink-soft: var(--ink-soft);
		--cs-line: var(--rule);
		--cs-surface: var(--surface);
		--cs-surface-alt: var(--surface-sunk);
		--cs-accent: var(--accent);
		--cs-accent-ink: var(--accent-ink);
		--cs-ok: var(--ok);
		--cs-ok-bg: var(--ok-wash);
		--cs-warn: var(--warn);
		--cs-warn-bg: var(--warn-wash);
		--cs-error: var(--danger);
		--cs-error-bg: var(--danger-wash);
	}
}

/* Member numbers read as a register entry, not a database id. */
.cs-dashboard__meta .cs-muted,
.cs-directory__card .cs-muted { font-variant-numeric: tabular-nums; }

/* ==================================================================
   Print
   ================================================================== */

@media print {
	.site-header, .site-footer, .hero__actions, .btn { display: none !important; }
	body { background: #fff; }
	.page-head, .card, .tile { border-color: #ccc; }
}

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

/* ------------------------------------------------------------------ Documents
   The bylaws reader: text with its own sections beside it. The list is sticky
   on a wide screen and collapses above the text on a phone, where a fixed rail
   would eat half the viewport. */

.doc {
	display: grid;
	gap: 2.5rem;
	align-items: start;
}

@media (min-width: 900px) {
	.doc { grid-template-columns: 15rem minmax(0, 1fr); }
	.doc__aside { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow-y: auto; }
}

.doc__toc-head {
	font-family: var(--font-mono);
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin: 0 0 .6rem;
}

.doc__toc-head + * { margin-top: 0; }
.doc__toc ol,
.doc__toc ul { list-style: none; margin: 0 0 1.75rem; padding: 0; }

.doc__toc-item {
	border-left: 2px solid var(--rule);
	line-height: 1.35;
}

.doc__toc-item a {
	display: block;
	padding: .38rem 0 .38rem .8rem;
	font-size: .9rem;
	color: var(--ink-soft);
	text-decoration: none;
}

.doc__toc-item a:hover,
.doc__toc-item a:focus-visible { color: var(--accent); }
.doc__toc-item--3 a { padding-left: 1.6rem; font-size: .84rem; }
.doc__files a { font-size: .88rem; }

/* Anchored headings must clear the sticky site header when jumped to. */
.doc__body h2,
.doc__body h3 { scroll-margin-top: 5.5rem; }

.doc__body h2 {
	font-size: 1.5rem;
	margin-top: 2.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rule);
}

.doc__body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc__body h3 { font-size: 1.1rem; margin-top: 1.75rem; }
