/* btcostello.com — shared styles. Palette and type carried over from the original site. */
:root {
	--ink: #333;
	--ink-soft: #5b5960;
	--paper: #fefefe;
	--paper-2: #f5f2ee;
	--line: #e4ded6;
	--dark: #1F1E26;
	--rust: #A65E4E;
	--tan: #D99F6C;
	--olive: #8C764D;
	--wrap: 1200px;
	--radius: 4px;
}

* { box-sizing: border-box; }

html {
	background: var(--paper);
	color: var(--ink);
	font-family: 'Roboto', system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; vertical-align: middle; }

a:link, a:visited { color: var(--rust); transition: color .2s; }
a:hover, a:focus { color: var(--tan); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .75rem; color: #222; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.wrap {
	width: calc(100% - 10vw);
	max-width: var(--wrap);
	margin: 0 auto;
}

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

.skip {
	position: absolute; left: -999px; top: 0;
	background: var(--dark); color: #fff; padding: .5rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
	box-shadow: 0 2px 2px -2px gray;
	background: var(--paper);
}
.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 2rem;
	padding: .6rem 0;
}
.logo:link, .logo:visited {
	color: #000;
	text-decoration: none;
	font-family: 'Montserrat', sans-serif;
	font-weight: 200;
	font-size: 1.2rem;
	letter-spacing: .5em;
	white-space: nowrap;
}
.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav a:link, .site-nav a:visited {
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
	font-size: .95rem;
	padding: .25rem 0;
	border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus { color: var(--rust); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--tan); }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section + .section { padding-top: 0; }
.section-alt { background: var(--paper-2); padding: 3.5rem 0; }
.section-head { margin-bottom: 1.75rem; max-width: 46rem; }
.section-head p { color: var(--ink-soft); }
.eyebrow {
	display: block;
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--olive);
	margin-bottom: .4rem;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46rem; }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.5rem; }

/* ---------- Hero (homepage banner) ---------- */
.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 420px;
	margin-top: 1.25rem;
	padding: 6vw 4vw;
	color: var(--paper);
	background: #3a2d27 url(/pic/banner-brendan-snow-canyon.jpg) right center / cover no-repeat;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,0) 100%);
}
.hero > div { position: relative; max-width: 34rem; }
.hero h1 {
	color: #fff;
	font-size: clamp(2.5rem, 6vw, 3.75rem);
	margin-bottom: .75rem;
}
.hero .creds {
	border-left: 3px solid var(--tan);
	padding-left: .75rem;
	margin-bottom: 1.5rem;
	font-size: 1.05rem;
}
.hero .creds p { margin: 0; }
@media (max-width: 640px) {
	/* Keep the face in frame on phones and darken more, since the text overlaps the photo. */
	.hero { background-position: 66% center; min-height: 0; padding: 2.5rem 1.25rem; }
	.hero::before { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 100%); }
}

/* ---------- Buttons ---------- */
.btn, button.btn {
	display: inline-block;
	font: inherit;
	font-weight: 500;
	padding: .65rem 1.25rem;
	border-radius: var(--radius);
	border: 2px solid var(--rust);
	background: var(--rust);
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s, border-color .2s, color .2s;
}
.btn:link, .btn:visited { color: #fff; }
.btn:hover, .btn:focus { background: #8d4e40; border-color: #8d4e40; color: #fff; }
.btn-ghost, .btn-ghost:link, .btn-ghost:visited {
	background: transparent;
	border-color: rgba(255,255,255,.85);
	color: #fff;
}
.btn-ghost:hover, .btn-ghost:focus { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.btn-outline, .btn-outline:link, .btn-outline:visited {
	background: transparent;
	color: var(--rust);
}
.btn-outline:hover, .btn-outline:focus { background: var(--rust); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Project pages ---------- */
.project-logo { display: block; width: 220px; height: auto; margin: .5rem 0 1.5rem; }
.project-logo--wide { width: 260px; margin-top: 1rem; }
.card-logo { display: block; align-self: flex-start; height: 34px; width: auto; margin-bottom: .75rem; }
.checklist { list-style: none; margin: 0 0 1rem; padding: 0; }
.checklist li {
	position: relative;
	padding: .55rem 0 .55rem 1.75rem;
	border-bottom: 1px solid var(--line);
}
.checklist li:first-child { border-top: 1px solid var(--line); }
.checklist li::before {
	content: "?";
	position: absolute; left: 0; top: .55rem;
	width: 1.2rem; height: 1.2rem; border-radius: 50%;
	background: var(--tan); color: #fff;
	font-size: .8rem; font-weight: 700; line-height: 1.2rem; text-align: center;
}
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Cards (tools, projects, writing) ---------- */
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--line);
	border-top: 3px solid var(--tan);
	border-radius: var(--radius);
	padding: 1.25rem 1.25rem 1.1rem;
	transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 6px 18px rgba(31,30,38,.08); transform: translateY(-2px); }
.card h3 { margin-bottom: .4rem; }
.card h3 a:link, .card h3 a:visited { color: #222; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card p { color: var(--ink-soft); font-size: .95rem; }
.card .meta {
	margin-top: auto;
	padding-top: .75rem;
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--olive);
}

.empty {
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	padding: 1.5rem;
	color: var(--ink-soft);
	background: #fff;
}

/* ---------- Contact band ---------- */
.cta {
	background: var(--dark);
	color: #fff;
	padding: 3rem 0;
}
.cta .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}
.cta h2 { color: #fff; margin-bottom: .35rem; }
.cta p { color: #d6d3dc; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--dark);
	color: #cfccd6;
	padding: 2rem 0;
	font-size: .9rem;
	border-top: 1px solid #34323d;
}
.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem 2rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.site-footer a:link, .site-footer a:visited { color: #fff; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { color: var(--tan); }
.icon { width: 1em; height: 1em; vertical-align: -.125em; margin-right: .35em; fill: currentColor; }

/* ---------- About ---------- */
.about-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
	gap: 2.5rem;
	align-items: start;
}
.portrait {
	aspect-ratio: 4 / 5;
	background: #3a2d27 url(/pic/banner-brendan-snow-canyon.jpg) 80% center / cover no-repeat;
	border-radius: var(--radius);
}
.facts { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.facts li { padding: .6rem 0; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts strong { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--olive); font-weight: 500; }
@media (max-width: 760px) {
	.about-grid { grid-template-columns: 1fr; }
	.portrait { aspect-ratio: 16 / 9; }
}

/* ---------- Calculators ---------- */
.page-head { padding: 2.5rem 0 1.5rem; }
.breadcrumb { font-size: .85rem; margin-bottom: .75rem; }
.calc {
	display: grid;
	grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
	padding-bottom: 3.5rem;
}
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } }
.panel {
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.25rem;
}
.panel h2 { font-size: 1.15rem; }
.field { margin-bottom: .9rem; }
.field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .25rem; }
.field .hint { font-weight: 400; color: var(--ink-soft); }
.input-unit { position: relative; }
.input-unit input { padding-right: 2.2rem; }
.input-unit span {
	position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
	color: var(--ink-soft); font-size: .9rem; pointer-events: none;
}
input[type="number"] {
	width: 100%;
	font: inherit;
	padding: .5rem .65rem;
	border: 1px solid #cfc7bd;
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
}
input[type="number"]:focus { outline: 2px solid var(--tan); outline-offset: 1px; border-color: var(--tan); }
.panel .btn { width: 100%; margin-top: .25rem; }
.status { margin-top: .75rem; font-size: .9rem; color: var(--ink-soft); min-height: 1.4em; }
.status.error { color: #a1301f; }

.results-empty { color: var(--ink-soft); }
.stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: .75rem;
	margin-bottom: 1.75rem;
}
.stat {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: .85rem 1rem;
	background: #fff;
}
.stat .label { display: block; font-size: .82rem; color: var(--ink-soft); line-height: 1.35; }
.stat .value { display: block; font-size: 1.5rem; font-weight: 500; color: #222; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.stat.primary { border-color: var(--tan); border-top-width: 3px; }
.stat.primary .value { font-size: 2rem; color: var(--rust); }

table.data {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
	font-size: .95rem;
	margin-bottom: 1.5rem;
}
table.data th, table.data td { padding: .45rem .75rem; text-align: right; border-bottom: 1px solid var(--line); }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { background: var(--tan); color: #222; font-weight: 500; border-bottom: 0; }
table.data tbody tr:nth-child(even) { background: var(--paper-2); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.note { font-size: .85rem; color: var(--ink-soft); }
details.method { margin-top: 1.5rem; }
details.method summary { cursor: pointer; font-weight: 500; }
details.method[open] summary { margin-bottom: .5rem; }
