/* ==========================================================================
   ArticleReserve theme
   Card catalog: vault ink, brass label plates, ruled index cards, a red stamp.
   ========================================================================== */

:root {
	--ink: #14233A;
	--ink-2: #1D3150;
	--ink-3: #2A4166;
	--brass: #A9822F;
	--brass-light: #D7B56A;
	--stamp: #B4372B;
	--card: #FDFCF8;
	--rule: #CFDCEB;
	--redline: #E5A9A2;
	--stone: #ECEFF2;
	--text: #1A1F29;
	--muted: #586172;
	--line: #D5DBE3;
	--white: #FFFFFF;

	--display: "Young Serif", Georgia, "Times New Roman", serif;
	--ui: "Public Sans", "Helvetica Neue", Arial, sans-serif;

	--wrap: 1200px;
	--narrow: 740px;
	--gutter: clamp(1rem, 4vw, 2rem);
	--space: clamp(3rem, 7vw, 5.5rem);
	--radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--stone); color: var(--text); font-family: var(--ui); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-3); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--stamp); }
:focus-visible { outline: 3px solid var(--brass-light); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.15; letter-spacing: -0.005em; margin: 0 0 0.5em; color: var(--ink); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }
.section { padding-block: var(--space); }
.section--card { background: var(--card); border-block: 1px solid var(--line); }
.section--ink { background: var(--ink); color: #DCE3EE; }
.section--ink .section__title { color: var(--white); }
.section--ink .section__intro { color: #B8C4D6; }
.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: 1rem; top: -4rem; z-index: 100; background: var(--brass-light); color: var(--ink); padding: .6rem 1rem; border-radius: 6px; font-weight: 700; }
.skip-link:focus { top: 1rem; }
.text-link { font-weight: 700; color: var(--ink); }

/* Buttons */
.button, .wp-block-button__link, input[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7rem 1.3rem;
	border: 2px solid transparent; border-radius: 6px; font-family: var(--ui); font-weight: 700; font-size: 1rem; line-height: 1.1;
	text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.button--ink, input[type="submit"], .wp-block-button__link { background: var(--ink); color: var(--white); }
.button--ink:hover, input[type="submit"]:hover, .wp-block-button__link:hover { background: var(--ink-3); color: var(--white); }
.button--brass { background: var(--brass); color: var(--white); }
.button--brass:hover { background: #8E6C24; color: var(--white); }
.button--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.button--ghost:hover { background: var(--ink); color: var(--white); }

/* Header */
.site-header { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 3px solid var(--brass); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand__plate {
	display: inline-grid; place-items: center; width: 52px; height: 34px; border-radius: 5px; padding: 4px;
	background: linear-gradient(180deg, var(--brass-light), var(--brass));
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.brand__plate span {
	display: grid; place-items: center; width: 100%; height: 100%; background: var(--card); color: var(--ink);
	font-family: var(--display); font-size: .95rem; border-radius: 2px;
}
.brand__name { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.01em; }
.custom-logo-link img { max-height: 44px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: .1rem; }
.nav__list li { position: relative; }
.nav__list a { display: block; padding: .55rem .75rem; color: #DCE3EE; text-decoration: none; font-weight: 600; font-size: .98rem; border-radius: 6px; }
.nav__list a:hover { background: var(--ink-2); color: var(--white); }
.nav__list .current-menu-item > a, .nav__list .current_page_item > a, .nav__list .current-menu-ancestor > a { color: var(--white); box-shadow: inset 0 -2px 0 var(--brass-light); border-radius: 0; }
.nav__list .sub-menu { list-style: none; margin: 0; padding: .4rem; position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--ink); border: 1px solid var(--ink-3); border-radius: 8px; display: none; z-index: 10; }
.nav__list li:hover > .sub-menu, .nav__list li:focus-within > .sub-menu { display: block; }
.nav__cta { min-height: 42px; padding: .55rem 1rem; }
.nav-toggle { display: none; }
@media (max-width: 1080px) {
	.nav-toggle { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; background: transparent; border: 1px solid var(--ink-3); color: var(--white); border-radius: 6px; padding: .5rem .9rem; font-weight: 700; cursor: pointer; }
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
	.nav-toggle__bars::before { position: absolute; top: -6px; } .nav-toggle__bars::after { position: absolute; top: 6px; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--ink); padding: 1rem var(--gutter) 1.5rem; border-top: 1px solid var(--ink-3); }
	.nav.is-open { display: flex; }
	.nav__list { flex-direction: column; }
	.nav__list .sub-menu { position: static; display: block; border: 0; padding-left: 1rem; }
}

/* Catalog card: the signature element */
.catalog-card {
	position: relative; background-color: var(--card); color: var(--text);
	background-image:
		linear-gradient(var(--redline), var(--redline)),
		repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px);
	background-size: 100% 2px, 100% 100%;
	background-position: 0 86px, 0 102px;
	background-repeat: no-repeat, repeat-y;
	border-radius: 6px; padding: 1.4rem clamp(1.5rem, 4vw, 3rem) 3rem;
	box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 18px 40px -18px rgba(0,0,0,.45);
}
.catalog-card::after {
	content: ""; position: absolute; left: 50%; bottom: 14px; width: 18px; height: 18px; margin-left: -9px;
	border-radius: 50%; background: var(--ink); box-shadow: inset 0 2px 3px rgba(0,0,0,.4);
}
.catalog-card__call { font-family: var(--ui); font-weight: 700; font-size: .9rem; color: var(--muted); text-align: right; margin: 0 0 2.6rem; letter-spacing: .02em; }
.catalog-card__title { font-family: var(--display); font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.06; color: var(--ink); margin: 0 0 .6em; max-width: 15ch; }
.catalog-card__text { font-size: 1.15rem; line-height: 1.6; max-width: 40ch; color: #2E3644; }
.catalog-card__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.stamp {
	position: absolute; right: clamp(1rem, 3vw, 2rem); bottom: 8.5rem; transform: rotate(-9deg);
	border: 3px solid var(--stamp); outline: 1px solid var(--stamp); outline-offset: 3px; border-radius: 6px;
	color: var(--stamp); padding: .35rem .9rem .25rem; font-weight: 800; font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase;
	opacity: .88; mix-blend-mode: multiply; pointer-events: none;
}
.stamp--small { font-size: .9rem; bottom: 2.6rem; }
.catalog-card--small { padding-bottom: 2.5rem; max-width: 380px; }
.catalog-card--small .catalog-card__title { font-size: 1.6rem; }

/* Hero */
.hero { background: var(--ink); padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero__stack-title { color: var(--brass-light); font-family: var(--ui); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
@media (max-width: 920px) { .hero__grid { grid-template-columns: 1fr; } .stamp { font-size: .95rem; bottom: 2.6rem; } }
@media (max-width: 640px) { .catalog-card--hero .stamp { position: static; display: inline-block; margin-top: 1.25rem; } }

/* Section heads */
.section__head { max-width: 64ch; margin-bottom: 2rem; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.section__title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .3em; }
.section__intro { color: var(--muted); font-size: 1.12rem; margin: 0; max-width: 60ch; }

/* Drawers: three ways to buy */
.drawers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.75rem; }
.drawer {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem;
	background: var(--ink-2); color: #CFD8E6; border-radius: 10px; padding: 1.75rem 1.5rem 1.6rem; text-decoration: none;
	box-shadow: inset 0 0 0 1px var(--ink-3), inset 0 -6px 0 rgba(0,0,0,.18);
}
.drawer:hover { color: #CFD8E6; box-shadow: inset 0 0 0 2px var(--brass-light), inset 0 -6px 0 rgba(0,0,0,.18); }
.drawer__label {
	display: inline-block; padding: .45rem 1.2rem .35rem; margin: 6px 0 .4rem; border-radius: 3px;
	background: var(--card); outline: 5px solid var(--brass); box-shadow: 0 0 0 6px rgba(0,0,0,.2);
	font-family: var(--display); font-size: 1.3rem; color: var(--ink);
}
.drawer__price { font-weight: 700; color: var(--white); }
.drawer__text { font-size: .98rem; line-height: 1.5; }
@media (max-width: 860px) { .drawers { grid-template-columns: 1fr; } }

/* Process */
.process__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 3rem; align-items: start; }
.process__steps { margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 2px solid var(--ink); }
.process__steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 10rem 1fr; gap: .5rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.process__steps li::before { content: counter(step); font-family: var(--display); font-size: 1.5rem; color: var(--brass); }
.process__steps strong { color: var(--ink); }
@media (max-width: 860px) { .process__grid { grid-template-columns: 1fr; gap: 1.5rem; } .process__steps li { grid-template-columns: 2.5rem 1fr; } }

/* Publisher hub */
.hub__list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.hub__list a { display: flex; flex-direction: column; gap: .4rem; height: 100%; padding: 1.25rem 1.25rem 1.4rem; border-top: 3px solid var(--brass); background: var(--ink-2); color: #CFD8E6; text-decoration: none; border-radius: 0 0 8px 8px; }
.hub__list a:hover { background: var(--ink-3); color: var(--white); }
.hub__list strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--white); }
.hub__list span { font-size: .97rem; line-height: 1.5; }
@media (max-width: 960px) { .hub__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hub__list { grid-template-columns: 1fr; } }

/* Contests + write for us */
.contests-home__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: stretch; }
.write-for-us { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.75rem; }
.write-for-us h2 { font-size: 1.6rem; }
@media (max-width: 860px) { .contests-home__grid { grid-template-columns: 1fr; } }

/* Post grid */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.75rem; }
.post-card { display: flex; flex-direction: column; }
.post-card__image img, .post-card__placeholder { border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--ink-2); display: block; }
.post-card__body { padding-top: .9rem; }
.post-card__title { font-size: 1.32rem; margin: .35rem 0 .45rem; line-height: 1.22; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--stamp); text-decoration: underline; }
.post-card__excerpt { color: var(--muted); font-size: .98rem; margin: 0; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }
.post-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; font-size: .86rem; color: var(--muted); }
.post-meta__cat { font-weight: 700; color: var(--brass); text-decoration: none; }
.post-meta__cat:hover { color: var(--stamp); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip { padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem; }
.chip:hover, .chip.is-active { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* Page heads */
.page-head { background: var(--card); border-bottom: 1px solid var(--line); padding-block: clamp(2.25rem, 5vw, 3.5rem); background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(207,220,235,.55) 31px 32px); }
.page-head__title { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .3em; max-width: 24ch; }
.page-head__intro { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0; }
.page-head__search { max-width: 540px; margin-top: 1rem; }

/* Single post */
.entry__head { padding-top: clamp(2.25rem, 5vw, 3.5rem); max-width: calc(var(--narrow) + var(--gutter) * 2); }
.entry__title { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin: .6rem 0 .4em; }
.entry__standfirst { font-size: 1.25rem; line-height: 1.5; color: var(--muted); }
.entry__byline { display: flex; align-items: center; gap: .6rem; font-size: .95rem; color: var(--muted); }
.entry__byline img { border-radius: 50%; }
.entry__image { margin: 1.5rem auto 0; max-width: calc(1040px + var(--gutter) * 2); }
.entry__image img { border-radius: var(--radius); width: 100%; }
.entry__layout { display: grid; grid-template-columns: minmax(0, var(--narrow)); justify-content: center; gap: 3rem; padding-block: 2.5rem var(--space); }
.has-sidebar .entry__layout { grid-template-columns: minmax(0, var(--narrow)) 300px; max-width: calc(var(--narrow) + 300px + 3rem + var(--gutter) * 2); }
.entry__sidebar .widget { margin-bottom: 2rem; }
@media (max-width: 1080px) { .has-sidebar .entry__layout { grid-template-columns: minmax(0, 1fr); } }
.entry__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.entry__tags a { font-size: .88rem; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); background: var(--card); }
.entry__cta { margin-top: 2.5rem; padding: 1.75rem; background: var(--ink); color: #DCE3EE; border-radius: 10px; }
.entry__cta h2 { color: var(--white); font-size: 1.6rem; margin-top: 0 !important; }
.entry__cta p { color: #C5CFDE; }
.entry__cta .button--ghost { border-color: #DCE3EE; color: var(--white); }
.entry__cta .button--ink { background: var(--brass); }
.entry__cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }

.author-box { display: grid; grid-template-columns: 72px 1fr; gap: 1.1rem; margin-top: 2.5rem; padding: 1.4rem; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: 8px; font-family: var(--ui); }
.author-box__avatar { border-radius: 50%; width: 72px; height: 72px; }
.author-box__label { margin: 0; font-size: .85rem; color: var(--muted); font-weight: 600; }
.author-box__name { font-size: 1.35rem; margin: .1rem 0 .4rem !important; }
.author-box__bio { font-size: 1rem; line-height: 1.6; margin: 0 0 .5rem; }
.author-box__link { font-weight: 700; font-size: .95rem; }

/* Long-form content */
.entry-content { font-size: 1.15rem; line-height: 1.75; }
.entry-content--wide { font-size: 1.0625rem; line-height: 1.6; }
.entry-content > * { margin-block: 0 1.15em; }
.entry-content h2 { font-size: 1.9rem; margin-top: 2em; }
.entry-content h3 { font-size: 1.45rem; margin-top: 1.7em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .45em; }
.entry-content li::marker { color: var(--brass); font-weight: 700; }
.entry-content blockquote { margin-inline: 0; padding: .3rem 0 .3rem 1.25rem; border-left: 4px solid var(--stamp); font-family: var(--display); font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.entry-content th, .entry-content td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry-content th { border-bottom: 2px solid var(--ink); }
.entry-content code { background: #E3E7EC; padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.entry-content img { border-radius: var(--radius); }
.entry-content .callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: 8px; padding: 1rem 1.25rem; font-size: 1.02rem; }
.entry-content .callout p:last-child { margin: 0; }

/* Newsletter band */
.newsletter-band { background: var(--ink); color: #C5CFDE; border-top: 3px solid var(--brass); }
.newsletter-band__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.newsletter-band__title { color: var(--white); font-size: 2rem; margin-bottom: .2em; }
@media (max-width: 800px) { .newsletter-band__grid { grid-template-columns: 1fr; } }

.sister { padding-block: 2rem; }
.sister__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sister__inner p { margin: 0; color: var(--muted); }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="number"], input[type="date"], textarea, select {
	width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1.5px solid #B6C0CC; border-radius: 6px; background: var(--white); color: var(--text);
}
textarea { min-height: 140px; line-height: 1.5; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline: 3px solid rgba(215,181,106,.6); outline-offset: 0; }
label { font-weight: 600; }
.search-form { display: flex; gap: .5rem; }

/* Footer */
.site-footer { background: var(--ink); color: #B8C4D6; padding-top: clamp(2.5rem, 6vw, 4rem); font-size: .97rem; border-top: 3px solid var(--brass); }
.site-footer a { color: #E2E8F1; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 2.5rem; }
.site-footer__about .brand { color: var(--white); margin-bottom: 1rem; }
.site-footer__about p { max-width: 38ch; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer__nav li { margin-bottom: .5rem; }
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; color: var(--white); }
.site-footer .widget-title { color: var(--white); font-family: var(--ui); font-weight: 700; font-size: 1rem; margin-bottom: .9rem; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-block: 1.25rem; border-top: 1px solid var(--ink-3); font-size: .88rem; }
.site-footer__legal p { margin: 0; }
.legal-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* Misc */
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2.5rem; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); text-decoration: none; font-weight: 700; color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.empty { max-width: 560px; }
.lost { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (max-width: 760px) { .lost { grid-template-columns: 1fr; } }
.comments__title { font-size: 1.6rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 1rem 0; border-top: 1px solid var(--line); }
.alignwide { max-width: 1000px; }
.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); max-width: none; }
.has-vault-color { color: var(--ink); } .has-vault-background-color { background: var(--ink); }
.has-brass-color { color: var(--brass); } .has-brass-background-color { background: var(--brass); }
.has-stamp-color { color: var(--stamp); } .has-card-background-color { background: var(--card); } .has-stone-background-color { background: var(--stone); }
