/*
Theme Name: Compendium
Theme URI: https://example.com/compendium
Author: Your Name
Author URI: https://example.com
Description: A thoughtful curated-digest theme with a dated issue masthead, an editor's note, a signature numbered digest with one-line summaries and quiet topic sections. A refined editorial serif (Newsreader) with a Work Sans UI, per-category accents, light and dark modes, self-hosted fonts and one-click demo content with original artwork.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
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: compendium
Tags: blog, news, magazine, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template
*/

:root {
  --bg: #faf8f2;
  --surface: #ffffff;
  --surface-2: #f0ede3;
  --text: #22251f;
  --text-2: #4a4d44;
  --muted: #83867a;
  --line: #e4e0d3;
  --accent: #2f6b4f;
  --accent-ink: #ffffff;
  --accent-hover: #22251f;
  --accent-hover-ink: #ffffff;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w-display: 600;
  --lh-display: 1.12;
  --track-display: 0;

  --radius: 8px;
  --radius-ui: 6px;
  --footer-bg: #22251f;
  --footer-text: #f0ede3;
  --footer-muted: #a1a496;
  --footer-line: rgba(255,255,255,.12);
  --overlay: linear-gradient(180deg, rgba(15,17,12,0) 30%, rgba(15,17,12,.9) 100%);
}
:root[data-theme="dark"] {
  --bg: #181a15;
  --surface: #1f211b;
  --surface-2: #272a22;
  --text: #eef0e6;
  --text-2: #c7cabc;
  --muted: #8a8d7e;
  --line: #2f3228;
  --accent: #5aa07e;
  --accent-ink: #181a15;
  --accent-hover: #eef0e6;
  --accent-hover-ink: #181a15;
  --footer-bg: #101209;
}

body { font-size: 18px; }
.meta, .cat, .primary-menu a, .mobile-menu a, .section-link, .widget-title, .btn, .header-cta { font-family: var(--font-ui); }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; letter-spacing: 0; }
h1, h2, h3, h4, .card__title, .mini__title, .entry-title, .section-title { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }
.entry-content { font-family: var(--font-body); }

.site-header { border-bottom: 1px solid var(--line); }
.primary-menu > li > a { font-weight: 600; font-size: .86rem; text-transform: uppercase; letter-spacing: .06em; }
.header-cta { background: var(--accent); color: #fff; border-radius: var(--radius-ui); font-weight: 600; }
.cat { color: hsl(var(--cat-hue,150) 44% 38%); font-family: var(--font-ui); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .71rem; }
[data-theme="dark"] .cat { color: hsl(var(--cat-hue,150) 46% 64%); }
.card-overlay .cat { color: #fff; }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section-head { border-top: 2px solid var(--text); padding-top: .6rem; align-items: center; }

/* ---------- Issue masthead ---------- */
.cm-issue { padding-bottom: clamp(14px, 2vw, 22px); }
.cm-issue__head { display: flex; align-items: baseline; gap: 1rem; justify-content: space-between; border-bottom: 2px solid var(--text); padding-bottom: .5rem; margin-bottom: 1rem; }
.cm-issue__kicker { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }
.cm-issue__date { font-family: var(--font-ui); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.cm-note { font-family: var(--font-body); font-size: 1.14rem; line-height: 1.6; color: var(--text-2); max-width: 72ch; font-style: italic; margin: 0; }
.cm-note__label { font-family: var(--font-ui); font-style: normal; font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); margin-right: .4rem; }

/* ---------- Digest ---------- */
.cm-digest { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 clamp(28px, 4vw, 56px); }
@media (min-width: 800px) { .cm-digest { grid-template-columns: 1fr 1fr; } }
.cm-digestitem { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding: 1.3rem 0; border-top: 1px solid var(--line); }
.cm-digestitem__num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--accent); line-height: 1; }
.cm-digestitem__title { font-family: var(--font-display); font-size: 1.32rem; line-height: 1.18; margin: .3rem 0 .4rem; font-weight: 600; }
.cm-digestitem__sum { font-family: var(--font-body); font-size: 1rem; line-height: 1.55; color: var(--text-2); }
.cm-digestitem .cat { display: inline-block; margin-bottom: .15rem; }

/* ---------- Sections ---------- */
.cm-band { background: var(--surface-2); padding-block: clamp(32px, 4vw, 52px); }
.cm-latest .card .media { aspect-ratio: 16/10; }

/* ---------- Signup ---------- */
.cm-signup .signup--band { background: var(--text); color: #fff; border-radius: var(--radius); padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.cm-signup .signup--band .signup__title { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
.cm-signup .signup--band .signup__desc { color: rgba(255,255,255,.88); }
.cm-signup .signup--band .signup__form { min-width: 320px; }
.cm-signup .signup--band .signup__button { background: var(--accent); color: #fff; }
.cm-signup .signup--band .signup__note { color: rgba(255,255,255,.78); }
@media (max-width: 760px) { .cm-signup .signup--band { grid-template-columns: 1fr; } .cm-signup .signup--band .signup__form { min-width: 0; } }

.entry-content { font-size: 1.18rem; line-height: 1.75; }
.entry-content blockquote { border-left: 3px solid var(--accent); font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.4; }
