/*
Theme Name: Article Ladder
Description: A theme for a military law question site: the front page keeps the firm profile the owner chooses first, whole, then a ladder of every UCMJ article the questions name, in the order of the Code, each rung a bar as long as its share of questions; an answer reads in one column under a strip of its parts, with the other questions on the same rung side by side at the end
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: article-ladder
*/

:root {
	--ald-ground: #f2ece0;
	--ald-paper: #fffcf4;
	--ald-sand: #e8ddc6;
	--ald-ink: #1d1b16;
	--ald-ink-soft: #514c40;
	--ald-link: #0f5a65;
	--ald-link-hover: #093a42;
	--ald-rule: #d8ceba;
	--ald-rule-strong: #827a68;
	--ald-focus: #b4441c;
	--ald-coyote: #7a5a2f;
	--ald-on-coyote: #fffaf0;
	--ald-head: Constantia, "Sitka Banner", Cambria, Georgia, serif;
	--ald-text: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--ald-num: "Segoe UI Black", "Arial Black", "Segoe UI", Arial, sans-serif;
}

@media (prefers-color-scheme:dark) {
	:root {
		--ald-ground: #161411;
		--ald-paper: #1e1b17;
		--ald-sand: #2a251e;
		--ald-ink: #ece6d8;
		--ald-ink-soft: #b9b1a0;
		--ald-link: #7fcbd6;
		--ald-link-hover: #b3e3ea;
		--ald-rule: #39332a;
		--ald-rule-strong: #8d8573;
		--ald-focus: #ffab85;
		--ald-coyote: #c89a5a;
		--ald-on-coyote: #161411;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; }
body { margin: 0; background: var(--ald-ground); color: var(--ald-ink); font: 1.0625rem/1.65 var(--ald-text); overflow-wrap: break-word; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--ald-link); text-underline-offset: 2px; }
a:hover { color: var(--ald-link-hover); }
:focus-visible { outline: 3px solid var(--ald-focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--ald-head); font-weight: 700; line-height: 1.2; text-wrap: balance; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap; }
.ald-leapto:focus { position: fixed; top: 8px; left: 8px; z-index: 10; width: auto; height: auto; margin: 0; padding: 10px 14px; clip-path: none; background: var(--ald-paper); color: var(--ald-link); }
.ald-lane { width: min(100% - 32px, 72rem); margin-inline: auto; }

/* The sand bar */
.ald-sandbar { background: var(--ald-sand); border-bottom: 3px solid var(--ald-coyote); }
.ald-sandbar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; min-height: 60px; padding-block: 6px; }
.ald-homemark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ald-ink); font: 700 1.25rem/1.2 var(--ald-head); text-decoration: none; }
.ald-homemark-rungs { display: grid; gap: 3px; }
.ald-homemark-rungs i { display: block; height: 5px; background: var(--ald-coyote); border-radius: 1px; }
.ald-homemark-rungs i:nth-child(1) { width: 26px; }
.ald-homemark-rungs i:nth-child(2) { width: 18px; }
.ald-homemark-rungs i:nth-child(3) { width: 10px; }
.ald-sandbar-nav ul, .ald-groundbar-nav ul { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0; list-style: none; }
.ald-sandbar-nav a, .ald-groundbar-nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* The front page */
.ald-front { padding-block: 30px 24px; }
.ald-front-h { max-width: 20ch; margin: 0; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); line-height: 1.08; }
.ald-front-say { max-width: 46rem; margin: 12px 0 0; font-size: 1.125rem; }
.ald-front-count { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; font-weight: 600; font-size: 0.9375rem; }
.ald-front-count li { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; background: var(--ald-paper); border: 1px solid var(--ald-rule-strong); border-radius: 3px; }
.ald-front-count a { display: inline-flex; align-items: center; min-height: 44px; }
.ald-front .ald-finderbar { max-width: 34rem; margin-top: 16px; }

.ald-counsel { padding-block: 22px 26px; background: var(--ald-paper); border-block: 1px solid var(--ald-rule); }
.ald-counsel-in { padding-left: 18px; border-left: 8px solid var(--ald-coyote); }
.ald-counsel-tag { margin: 0; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ald-ink-soft); }
.ald-counsel-h { margin: 4px 0 6px; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.ald-counsel-h a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ald-ink); }
.ald-counsel-text { max-width: 48rem; }
.ald-counsel-text h2 { margin: 18px 0 6px; font-size: 1.25rem; }
.ald-counsel-text p { margin: 10px 0; }

.ald-climb { padding-block: 30px 30px; }
.ald-climb-h, .ald-samerung-h { margin: 0; font-size: 1.75rem; }
.ald-climb-say { max-width: 46rem; margin: 8px 0 16px; }
.ald-rungs { columns: 3 17rem; column-gap: 28px; margin: 0 0 24px; padding: 0; list-style: none; }
.ald-rung { border-bottom: 1px solid var(--ald-rule); break-inside: avoid; }
.ald-rung-link { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; color: var(--ald-ink); text-decoration: none; }
.ald-rung-link:hover { color: var(--ald-ink); background: var(--ald-sand); }
.ald-rung-num { font: 900 1rem/1 var(--ald-num); }
.ald-rung-bar { justify-self: start; height: 12px; background: var(--ald-coyote); border-radius: 1px; }
.ald-rung-n { font-size: 0.875rem; color: var(--ald-ink-soft); white-space: nowrap; }
.ald-tenth-1 { width: 10%; } .ald-tenth-2 { width: 20%; } .ald-tenth-3 { width: 30%; } .ald-tenth-4 { width: 40%; } .ald-tenth-5 { width: 50%; }
.ald-tenth-6 { width: 60%; } .ald-tenth-7 { width: 70%; } .ald-tenth-8 { width: 80%; } .ald-tenth-9 { width: 90%; } .ald-tenth-10 { width: 100%; }
.ald-rung-here .ald-rung-link { background: var(--ald-sand); box-shadow: inset 4px 0 0 var(--ald-coyote); }
.ald-loose-h { margin: 26px 0 12px; font-size: 1.5rem; }
.ald-shelflinks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ald-shelflink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: var(--ald-paper); border: 1px solid var(--ald-rule-strong); border-radius: 3px; text-decoration: none; }
.ald-shelflink-here { background: var(--ald-coyote); color: var(--ald-on-coyote); border-color: var(--ald-coyote); }
.ald-shelflink-here .ald-rung-n, .ald-shelflink-here:hover { color: var(--ald-on-coyote); }
.ald-newest { padding-block: 10px 40px; }
.ald-newest-h { margin: 0 0 10px; font-size: 1.75rem; }
.ald-newest .ald-qrows, .ald-listing .ald-qrows { padding: 0; }
.ald-listhead { padding-block: 22px 24px; background: var(--ald-sand); }
.ald-listhead-crumb { margin: 0; }
.ald-listhead-crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.ald-listhead-h { margin: 0; font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem); }
.ald-listhead-n { margin: 8px 0 0; color: var(--ald-ink-soft); }
.ald-stepper { padding-block: 6px 18px; }
.ald-stepper-in { display: grid; gap: 10px; }
.ald-step { display: grid; gap: 2px; min-height: 44px; padding: 10px 14px; background: var(--ald-paper); border: 1px solid var(--ald-rule); border-left: 4px solid var(--ald-coyote); border-radius: 2px; text-decoration: none; }
.ald-step-tag { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ald-ink-soft); }
.ald-step-name { text-decoration: underline; }
.ald-qrows { margin: 0; padding: 0 14px 10px; list-style: none; }
.ald-qrow { border-top: 1px solid var(--ald-rule); break-inside: avoid; }
.ald-qrow a { display: block; padding-block: 12px; line-height: 1.35; }

/* One answer */
.ald-answerhead { padding-block: 24px 26px; background: var(--ald-sand); }
.ald-answerhead-in { display: grid; gap: 16px; }
.ald-answerhead-rung { margin: 0; }
.ald-answerhead-rung a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; background: var(--ald-coyote); color: var(--ald-on-coyote); border-radius: 3px; font: 900 1.25rem/1 var(--ald-num); text-decoration: none; }
.ald-answerhead-rung a:hover { color: var(--ald-on-coyote); }
.ald-answerhead-words { min-width: 0; }
.ald-answerhead-h { max-width: 34ch; margin: 0; font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem); line-height: 1.14; }
.ald-answerhead-at { margin: 10px 0 0; font-size: 0.9375rem; color: var(--ald-ink-soft); }
.ald-partstrip { background: var(--ald-paper); border-bottom: 1px solid var(--ald-rule-strong); }
.ald-partstrip-list { display: flex; flex-wrap: wrap; gap: 0 18px; margin-block: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.ald-partstrip-list a { display: inline-flex; align-items: center; min-height: 44px; }
.ald-answerbody { padding-block: 26px 30px; }
.ald-answertext { max-width: 46rem; margin-inline: auto; font-size: 1.0625rem; }
.ald-answertext p, .ald-sheetpage-text p { margin: 14px 0; }
.ald-answertext h2 { margin: 32px 0 8px; font-size: 1.5rem; }
.ald-answertext ul, .ald-answertext ol { padding-left: 1.3em; }
.ald-answertext li { margin: 6px 0; }
.ald-answertext table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.ald-answertext th { padding: 8px 10px; background: var(--ald-coyote); color: var(--ald-on-coyote); text-align: left; }
.ald-answertext td { padding: 8px 10px; border-bottom: 1px solid var(--ald-rule); vertical-align: top; }
.ald-answertext th, .ald-answertext td { overflow-wrap: anywhere; }
.ald-gist { padding: 12px 0 14px; border-top: 4px solid var(--ald-coyote); border-bottom: 1px solid var(--ald-rule); font-family: var(--ald-head); font-size: 1.25rem; line-height: 1.55; }
.ald-tailnote, .ald-closer { max-width: 46rem; margin: 28px auto 0; padding: 14px 18px; background: var(--ald-sand); border-radius: 3px; font-size: 0.9375rem; }
.ald-closer-h { margin: 0 0 6px; font-size: 1.125rem; }
.ald-closer p { margin: 0; }
.ald-samerung { padding-block: 26px 34px; background: var(--ald-paper); border-top: 1px solid var(--ald-rule); }
.ald-samerung-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.ald-samerung-row a { display: flex; align-items: center; height: 100%; min-height: 44px; padding: 10px 14px; background: var(--ald-ground); border: 1px solid var(--ald-rule); border-top: 3px solid var(--ald-coyote); border-radius: 2px; line-height: 1.35; }
.ald-samerung-all a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.ald-answertalk { padding-bottom: 36px; }

/* Lists of answers, the search screen and plain pages */
.ald-listing { padding-block: 28px 40px; }
.ald-listing-h { margin: 0 0 16px; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
.ald-listing .ald-qrows { margin-top: 16px; padding: 0; }
.ald-nothing-yet { margin: 16px 0; font-size: 1.125rem; }
.ald-finderbar { display: flex; flex-wrap: wrap; gap: 8px; }
.ald-finderbox { flex: 1 1 10rem; min-width: 0; min-height: 44px; padding: 6px 10px; background: var(--ald-paper); color: var(--ald-ink); border: 1px solid var(--ald-rule-strong); border-radius: 3px; font: inherit; }
.ald-finderbox::placeholder { color: var(--ald-ink-soft); opacity: 1; }
.ald-findergo { min-height: 44px; min-width: 44px; padding: 6px 18px; background: var(--ald-coyote); color: var(--ald-on-coyote); border: 0; border-radius: 3px; font: 700 1rem/1.2 var(--ald-text); cursor: pointer; }
.ald-sheetpage { padding-block: 28px 40px; }
.ald-sheetpage-in { width: min(100% - 32px, 46rem); margin-inline: auto; padding-block: 28px 40px; }
.ald-sheetpage .ald-sheetpage-in { padding-block: 0; }
.ald-tohome { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.ald-pagesgo { font-weight: 600; }
.pagination { margin-top: 24px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; background: var(--ald-paper); border: 1px solid var(--ald-rule); border-radius: 3px; font-weight: 600; text-decoration: none; }
.pagination .page-numbers.current { background: var(--ald-coyote); color: var(--ald-on-coyote); border-color: var(--ald-coyote); }
.ald-replies { max-width: 46rem; margin: 32px auto 0; }
.ald-replies-h, .comment-reply-title { font-size: 1.3125rem; }
.ald-replies-list { padding-left: 1.2em; }
.comment-form label { display: block; font-weight: 600; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; min-height: 44px; padding: 6px 10px; background: var(--ald-paper); color: var(--ald-ink); border: 1px solid var(--ald-rule-strong); border-radius: 3px; font: inherit; }
.comment-form .submit { min-height: 44px; padding: 6px 18px; background: var(--ald-coyote); color: var(--ald-on-coyote); border: 0; border-radius: 3px; font: 700 1rem/1.2 var(--ald-text); cursor: pointer; }

/* The foot */
.ald-groundbar { padding-block: 18px 26px; background: var(--ald-sand); border-top: 3px solid var(--ald-coyote); }
.ald-groundbar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.ald-groundbar-year { margin: 0; font-size: 0.9375rem; color: var(--ald-ink-soft); }

@media (max-width: 639px) {
	.ald-groundbar-nav ul { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (min-width: 760px) {
	.ald-answerhead-in { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
	.ald-partstrip { position: sticky; top: 0; z-index: 2; }
	.ald-answerhead-in > .ald-answerhead-words:only-child { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
	.ald-newest .ald-qrows, .ald-listing .ald-qrows { columns: 2; column-gap: 32px; }
	.ald-stepper-in { grid-template-columns: 1fr 1fr; }
	.ald-step-on { grid-column: 2; }
}

@media print {
	.ald-sandbar, .ald-groundbar, .ald-partstrip, .ald-samerung, .ald-replies, .pagination { display: none; }
}
