/*
Theme Name: Broadsheet Dispatch
Description: A newspaper-style theme for publishing customer reviews and editorial notes. Ruled columns, and a front page built around a lead story. Designed to work with the Low-Rating Review Desk plugin, and fine without it.
Version: 1.1.0
Requires at least: 6.3
Tested up to: 6.9
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: broadsheet-dispatch
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--paper: #e7e6e0;
	--paper-deep: #dad8cf;
	--ink: #1b1a18;
	--ink-soft: #48463f;
	--ink-faint: #5e5a51;
	--hair: #b4b1a5;
	--proof: #a3161c;

	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
	--black: "Old Standard TT", Georgia, "Times New Roman", serif;

	--wrap: 1200px;
	--gutter: clamp(1rem, 3vw, 2rem);
}

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

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

body {
	margin: 0;
	background-color: var(--paper);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .1  0 0 0 0 .1  0 0 0 0 .08  0 0 0 .07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.0625rem;
	line-height: 1.62;
	font-optical-sizing: auto;
	text-rendering: optimizeLegibility;
}

img, video, svg { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--proof); }

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

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

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

.skip-link {
	position: absolute; left: -999px; top: 0;
	background: var(--ink); color: var(--paper);
	padding: .6rem 1rem; z-index: 100;
	font-family: var(--sans); font-size: .875rem;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Header: dateline, masthead, sections
   ========================================================================== */
.site-header { border-top: 6px solid var(--ink); }

.dateline {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1rem;
	padding: .5rem 0;
	border-bottom: 1px solid var(--ink);
	font-family: var(--sans); font-size: .8125rem; color: var(--ink-soft);
}
.dateline__note { flex: 1; text-align: center; font-style: italic; font-family: var(--serif); font-size: .9375rem; }

.dateline .search-form { display: flex; gap: .35rem; }
.search-field {
	font: inherit; font-family: var(--sans); font-size: .8125rem;
	background: transparent; color: var(--ink);
	border: 0; border-bottom: 1px solid var(--ink);
	padding: .2rem .1rem; width: 10.5rem; border-radius: 0;
}
.search-field::placeholder { color: var(--ink-faint); opacity: 1; }
.search-submit {
	font-family: var(--sans); font-size: .8125rem; font-weight: 600;
	background: none; border: 0; color: var(--ink); cursor: pointer; padding: .2rem .25rem;
}
.search-submit:hover { color: var(--proof); }

.masthead {
	padding: 1.1rem 0 .9rem;
	text-align: center;
	border-bottom: 3px double var(--ink);
}
.masthead__title {
	margin: 0;
	font-family: var(--black); font-weight: 400;
	font-size: clamp(2.3rem, 9.5vw, 6.25rem);
	line-height: 1.02;
	letter-spacing: .005em;
	text-wrap: balance;
}
/* Long names (a domain used as the title, for example) scale with the viewport so they stay on one line. */
.masthead__title--long { font-size: clamp(1.5rem, 5.6vw, 4.75rem); white-space: nowrap; }
@media (max-width: 480px) {
	.masthead__title--long { font-size: 5.3vw; }
}
.masthead__title a { color: inherit; text-decoration: none; }
.masthead .custom-logo { max-height: 120px; width: auto; }

.primary-nav { border-bottom: 1px solid var(--ink); }
.primary-nav ul {
	display: flex; flex-wrap: wrap; justify-content: center;
	gap: .15rem 1.75rem;
	list-style: none; margin: 0; padding: .6rem 0;
}
.primary-nav a {
	display: inline-block;
	font-family: var(--sans); font-weight: 600; font-size: .875rem;
	text-decoration: none; padding: .15rem 0;
	border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { border-bottom-color: var(--proof); color: var(--ink); }

.nav-toggle {
	display: none;
	width: 100%;
	font-family: var(--sans); font-weight: 600; font-size: .875rem;
	background: none; border: 0; color: var(--ink);
	padding: .7rem 0; cursor: pointer; text-align: center;
}

/* ==========================================================================
   Section rules
   ========================================================================== */
.section-title {
	margin: 0 0 1rem;
	padding: .35rem 0;
	border-top: 3px solid var(--ink);
	border-bottom: 1px solid var(--ink);
	font-family: var(--sans); font-weight: 600; font-size: .9375rem; line-height: 1.3;
}

.page-title {
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 900; letter-spacing: -.015em;
	margin: 0 0 .4em;
}

/* ==========================================================================
   Front page
   ========================================================================== */
.front { padding-top: var(--gutter); padding-bottom: 3rem; }

.page-one {
	display: grid;
	grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
	margin-bottom: 2.5rem;
}
.page-one__lead { padding-right: var(--gutter); border-right: 1px solid var(--ink); }
.page-one__rail { padding-left: var(--gutter); }

.latest, .notes { margin-bottom: 2.5rem; }
.more-link { margin-top: .5rem; font-family: var(--sans); font-weight: 600; font-size: .875rem; }

.notes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.note { padding: 0 1.5rem; border-left: 1px solid var(--hair); }
.note:first-child { padding-left: 0; border-left: 0; }
.note__title { font-size: 1.25rem; margin-bottom: .25rem; }
.note__title a { text-decoration: none; }
.note__title a:hover { text-decoration: underline; }

/* ==========================================================================
   Reviews (markup comes from the plugin)
   ========================================================================== */
.lrd-grid { column-gap: 2rem; column-rule: 1px solid var(--hair); }
.lrd-review { border-bottom-color: var(--hair); }

.lrd-review__rating { font-family: var(--sans); font-size: .8125rem; color: var(--ink-soft); }
.lrd-stars { color: var(--proof); letter-spacing: .08em; font-size: .95rem; }

.lrd-review__dealer { font-size: 1.3rem; font-weight: 700; letter-spacing: -.005em; }
.lrd-review__dealer a { text-decoration: none; }
.lrd-review__dealer a:hover { text-decoration: underline; }
.lrd-review__city { font-size: .9375rem; color: var(--ink-faint); opacity: 1; }

.lrd-review__body { font-size: 1rem; }
.lrd-review__byline { font-family: var(--sans); color: var(--ink-soft); }
.lrd-review__author { color: var(--ink); }
.lrd-review__links a { font-weight: 600; }

/* The lead story */
.lrd-review--lead { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.lrd-review--lead .lrd-review__head::before {
	content: "";
	display: block; width: 4.5rem; height: 6px;
	background: var(--proof); margin-bottom: .9rem;
}
.lrd-review--lead .lrd-review__dealer {
	font-size: clamp(2rem, 4.8vw, 3.6rem);
	line-height: 1.04; font-weight: 900; letter-spacing: -.02em;
	margin: .35rem 0 .3rem;
}
.lrd-review--lead .lrd-review__city { font-size: 1.0625rem; margin-bottom: 1.1rem; }
.lrd-review--lead .lrd-review__body { font-size: 1.1875rem; line-height: 1.65; max-width: 38rem; }
.lrd-review--lead .lrd-review__body > p:first-child::first-letter {
	float: left;
	font-weight: 900; font-size: 4.3em; line-height: .8;
	padding: .07em .1em 0 0;
}
.lrd-review--lead .lrd-review__byline {
	margin-top: 1.25rem; padding-top: .75rem;
	border-top: 1px solid var(--ink);
	max-width: 38rem; font-size: .875rem;
}

/* Dealership index */
.lrd-index__item { border-bottom-color: var(--hair); padding: .7rem 0; }
.lrd-index__name { text-decoration: none; font-size: 1rem; }
a.lrd-index__name:hover { text-decoration: underline; }
.lrd-index__leader { border-bottom-color: var(--ink-faint); opacity: .7; }
.lrd-index__count { font-family: var(--sans); font-size: .8125rem; color: var(--ink-soft); white-space: nowrap; }
.lrd-index__sub { font-family: var(--sans); color: var(--ink-faint); opacity: 1; margin-top: .1rem; }

.lrd-disclosure {
	font-family: var(--sans); font-style: normal; font-size: .8125rem; line-height: 1.5;
	color: var(--ink-soft); opacity: 1;
	padding: .6rem 0; margin: 0 0 1.25rem;
	border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}

.single-review { max-width: 760px; margin: 0 auto 3rem; padding-top: var(--gutter); }

/* ==========================================================================
   Archives, posts, pages
   ========================================================================== */
main.wrap:not(.front) { padding-top: var(--gutter); padding-bottom: 3rem; }

.archive-header { margin-bottom: 1.5rem; }
.archive-header__address { font-style: italic; color: var(--ink-faint); margin-bottom: .75rem; }
.archive-description { max-width: 62ch; }

.post-list { max-width: 760px; }
.post-item { padding: 0 0 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--hair); }
.post-item__title { font-size: 1.6rem; font-weight: 900; margin-bottom: .2rem; }
.post-item__title a { text-decoration: none; }
.post-item__title a:hover { text-decoration: underline; }
.entry-meta { font-family: var(--sans); font-size: .8125rem; color: var(--ink-faint); margin: 0 0 .6rem; }

.single .entry { max-width: 720px; margin: 0 auto; }
.entry-title {
	font-size: clamp(2.1rem, 5.5vw, 3.4rem);
	font-weight: 900; letter-spacing: -.02em; line-height: 1.05;
	margin-bottom: .35em;
}
.entry-header { padding-bottom: .75rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--ink); }
.entry-figure { margin: 0 0 1.5rem; }
.entry-figure img { display: block; width: 100%; }

.entry-content { font-size: 1.125rem; line-height: 1.7; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { font-size: 1.7rem; margin-top: 1.8em; font-weight: 900; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.6em; }
.entry-content blockquote {
	margin: 1.75rem 0; padding: .9rem 0;
	border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink);
	font-size: 1.375rem; line-height: 1.4; font-weight: 600;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.entry-content th, .entry-content td { padding: .5rem .6rem; border-bottom: 1px solid var(--hair); text-align: left; }
.entry-content th { font-family: var(--sans); font-weight: 600; border-bottom: 2px solid var(--ink); }
.entry-content figcaption, .wp-caption-text { font-family: var(--sans); font-size: .8125rem; color: var(--ink-faint); margin-top: .35rem; }
.entry-content .alignwide { max-width: min(var(--wrap), 100vw - 2 * var(--gutter)); }
.entry-content pre, .entry-content code { font-size: .875em; background: var(--paper-deep); }
.entry-content pre { padding: 1rem; overflow-x: auto; }
.entry-tags { font-family: var(--sans); font-size: .8125rem; color: var(--ink-faint); }

/* Pagination */
.pagination .nav-links, .post-navigation .nav-links {
	display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
	font-family: var(--sans); font-size: .875rem; margin-top: 1.5rem;
	padding-top: .75rem; border-top: 1px solid var(--ink);
}
.pagination .page-numbers { padding: .2rem .55rem; text-decoration: none; border: 1px solid transparent; }
.pagination .page-numbers.current { border-color: var(--ink); font-weight: 600; }
.pagination a.page-numbers:hover { border-color: var(--hair); }
.post-navigation .nav-links { justify-content: space-between; margin-bottom: 2rem; }
.post-navigation a { text-decoration: none; font-weight: 600; }

/* Comments */
.comments-area { max-width: 720px; margin: 2rem auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { padding: 1rem 0; border-bottom: 1px solid var(--hair); }
.comment-list .children { list-style: none; padding-left: 1.25rem; }
.comment-author .avatar { border-radius: 50%; vertical-align: middle; margin-right: .5rem; }
.comment-meta { font-family: var(--sans); font-size: .8125rem; color: var(--ink-faint); }
.comment-form label { display: block; font-family: var(--sans); font-size: .875rem; font-weight: 600; margin-bottom: .2rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; font: inherit; padding: .5rem .6rem;
	background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0;
}
.comment-form .submit, .wp-block-button__link {
	font-family: var(--sans); font-weight: 600; font-size: .9375rem;
	background: var(--ink); color: var(--paper); border: 0; border-radius: 0;
	padding: .6rem 1.2rem; cursor: pointer;
}
.comment-form .submit:hover, .wp-block-button__link:hover { background: var(--proof); color: var(--paper); }

/* ==========================================================================
   Review templates: cards, slider, summary, badge, buttons
   ========================================================================== */
.lrd-cards .lrd-review,
.lrd-slide .lrd-review { border: 0; border-top: 3px solid var(--ink); background: transparent; padding: .9rem 0 0; }
.lrd-cards { gap: 1.75rem 2rem; }
.lrd-list .lrd-review { border-bottom-color: var(--hair); }

.lrd-summary { padding: .75rem 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); font-family: var(--sans); }
.lrd-summary__num { font-family: var(--serif); font-size: 2.6rem; font-weight: 900; }
.lrd-summary__text { color: var(--ink-soft); opacity: 1; }

.lrd-slider__prev, .lrd-slider__next, .lrd-slider__pause, .lrd-more-btn {
	font-family: var(--sans); font-weight: 600; border-radius: 0;
	border: 1px solid var(--ink); background: transparent; color: var(--ink);
}
.lrd-slider__prev:hover, .lrd-slider__next:hover, .lrd-slider__pause:hover, .lrd-more-btn:hover {
	background: var(--ink); color: var(--paper);
}
.lrd-slider__dot { border-color: var(--ink); }
.lrd-slider__dot[aria-current="true"] { background: var(--proof); border-color: var(--proof); }
.lrd-toggle { font-family: var(--sans); color: var(--ink); }
.lrd-toggle:hover { color: var(--proof); }
.lrd-avatar { border-radius: 0; filter: grayscale(1); }

.lrd-badge {
	font-family: var(--sans); background: var(--paper); color: var(--ink);
	border: 3px double var(--ink); padding: .65rem 1rem;
}
.lrd-badge:hover { color: var(--ink); background: var(--paper-deep); }
.lrd-badge__num { font-family: var(--serif); font-weight: 900; }
.lrd-badge__cta { color: var(--proof); }

/* ==========================================================================
   Widgets
   ========================================================================== */
.widget { margin-top: 1.75rem; font-size: .9375rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .4rem 0; border-bottom: 1px solid var(--hair); }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 6px solid var(--ink); padding: 1.5rem 0 2.5rem; background: var(--paper-deep); font-size: .9375rem; }
.site-footer__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.site-footer .lrd-disclosure { border: 0; padding: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: .25rem 0; }
.site-footer__note { margin-top: 1.5rem; }
.site-footer__legal {
	margin: 1.75rem 0 0; padding-top: .75rem; border-top: 1px solid var(--ink);
	font-family: var(--sans); font-size: .75rem; line-height: 1.55; color: var(--ink-soft);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
	.page-one { grid-template-columns: 1fr; }
	.page-one__lead { padding-right: 0; border-right: 0; padding-bottom: 1.75rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--ink); }
	.page-one__rail { padding-left: 0; }
	.notes__grid { grid-template-columns: 1fr; }
	.note { padding: 1rem 0; border-left: 0; border-top: 1px solid var(--hair); }
	.note:first-child { border-top: 0; padding-top: 0; }
	.site-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
	.dateline { flex-wrap: wrap; justify-content: center; }
	.dateline__note { order: 3; flex-basis: 100%; }
	.dateline .search-form { display: none; }

	.js .nav-toggle { display: block; }
	.js .primary-nav ul { display: none; flex-direction: column; align-items: center; padding-top: 0; }
	.js body.nav-open .primary-nav ul { display: flex; }
}

/* ==========================================================================
   Print: it is a newspaper, after all
   ========================================================================== */
@media print {
	body { background: #fff; color: #000; font-size: 11pt; }
	.dateline .search-form, .primary-nav, .site-footer__more, .comments-area, .pagination, .more-link { display: none !important; }
	.lrd-review, .note { break-inside: avoid; }
	a { text-decoration: none; }
}
