/* Crooked House: plain static rebuild of the old WordPress site. */
:root {
  --ink: #1d1a17; --muted: #6b635b; --paper: #faf7f2; --panel: #ffffff;
  --line: #e4ddd2; --accent: #8a1c1c; --accent-ink: #ffffff; --head: #17130f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #ece6dc; --muted: #a79e93; --paper: #16130f; --panel: #1f1b16; --line: #352f27; --accent: #d4635b; --head: #0d0b09; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); }
a { color: var(--accent); }
img, video, iframe { max-width: 100%; height: auto; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

header.site { background: var(--head); color: #f4eee4; padding: 28px 0 0; }
header.site .brand { font: 700 2.1rem/1.1 var(--serif); color: #f4eee4; text-decoration: none; letter-spacing: .01em; }
header.site .tagline { margin: .3rem 0 1rem; color: #bfb5a7; font-size: .95rem; }
header.site nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; border-top: 1px solid #3a332b; padding: .7rem 0; }
header.site nav a { color: #f4eee4; text-decoration: none; font-size: .95rem; padding: .15rem 0; border-bottom: 2px solid transparent; }
header.site nav a:hover, header.site nav a[aria-current] { border-bottom-color: var(--accent); }

main { padding: 2rem 16px 3rem; }
article::after { content: ""; display: table; clear: both; }
h1, h2, h3, h4, h5 { font-family: var(--serif); line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: 2.2rem; margin-top: .2em; }
h2 { font-size: 1.6rem; } h3 { font-size: 1.3rem; } h4, h5 { font-size: 1.1rem; }
.crumb { margin: 0 0 .3rem; font-size: .9rem; }
.crumb a { text-decoration: none; } .crumb a::before { content: "\2190\00a0"; }
.date { color: var(--muted); font-size: .9rem; margin-top: -.3rem; }
blockquote { margin: 1.2em 0; padding: .2em 1.2em; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.1rem; }
blockquote footer, .well footer, .quote footer { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin-top: .4em; }
blockquote footer::before, .well footer::before, .quote footer::before { content: "\2014\00a0"; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
center { display: block; text-align: center; }

/* WordPress image alignment, plus the old theme's float classes */
.alignleft, .cbinl, .clinl { float: left; margin: .3em 1.4em 1em 0; }
.alignright, .cbinr, .clinr { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter, .cbinc, .clinc { display: block; margin: 1em auto; text-align: center; }
.alignleft, .alignright, .cbinl, .cbinr, .clinl, .clinr { max-width: 45%; }
.thumbnail { display: inline-block; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.thumbnail img { display: block; }
figure { margin: 1.2em 0; }
@media (max-width: 600px) {
  .alignleft, .alignright, .cbinl, .cbinr, .clinl, .clinr { float: none; display: block; max-width: 100%; margin: 1em auto; }
}

/* The old Bootstrap 3 grid and boxes used inside posts */
.row { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin: 1.5rem 0; clear: both; }
@media (min-width: 760px) { .row:has(> .col-md-4) { grid-template-columns: repeat(3, 1fr); } .row:has(> .col-md-6) { grid-template-columns: repeat(2, 1fr); } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; margin: 1.2em 0; overflow: hidden; }
.panel-heading { padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: 1.1rem; }
.panel-body { padding: .8rem 1rem; } .panel-body > :first-child { margin-top: 0; } .panel-body > :last-child { margin-bottom: 0; }
.panel-footer { padding: .6rem 1rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.panel ul { padding-left: 1.2rem; margin: .3rem 0; }
.well, .quote { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.2rem; font-family: var(--serif); font-size: 1.05rem; }

/* Embeds */
.video { position: relative; aspect-ratio: 16 / 9; margin: 1em 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
audio { width: 100%; margin: .5em 0; }
.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 1em 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; }
.documents { columns: 2 240px; padding-left: 1.2rem; }
.cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 0 0 2rem; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: inherit; text-decoration: none; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.card-text { padding: .8rem 1rem 1rem; } .card-text h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.card-text p { margin: 0; color: var(--muted); font-family: var(--serif); font-style: italic; }
a.card:hover h3 { color: var(--accent); }
.quotes .quote + .quote { margin-top: 1rem; }
.quotes.rotating .quote { display: none; } .quotes.rotating .quote.on { display: block; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 1.2rem 0 2rem; }
.quote:has(> .well) { padding: 0; border: 0; background: none; }
