/*
Theme Name: Latent
Theme URI: https://example.com/latent
Author: Your Name
Description: An editorial AI news theme in the colours of viridis, the colour map of machine-learning charts. A three-column hero with a "brief" panel, explainers with a key-terms glossary on every story, copyable prompts readers can try, a reading progress bar and topic columns. 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: latent
Tags: news, blog, education, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f2f8;
  --text: #1b1528;
  --text-2: #453e56;
  --muted: #6f6880;
  --line: #e6e2ee;
  --accent: #177a75;
  --accent-ink: #ffffff;
  --deep: #1f0f33;
  --vir-green: #5ec962;
  --vir-yellow: #fde725;
  --viridis: linear-gradient(90deg, #440154, #3b528b 28%, #21918c 54%, #5ec962 78%, #fde725);
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w-display: 400;
  --track-display: -0.01em;
  --lh-display: 1.04;
  --radius: 14px;
  --radius-ui: 999px;
  --footer-bg: #1f0f33;
  --footer-text: #efeaf7;
  --footer-muted: #b0a5c3;
  --footer-line: rgba(255,255,255,.12);
  --overlay: linear-gradient(180deg, rgba(31,15,51,0) 22%, rgba(31,15,51,.93) 100%);
  --accent-hover: #1f0f33;
  --accent-hover-ink: #ffffff;
}
:root[data-theme="dark"] {
  --bg: #120a1e;
  --surface: #1a1129;
  --surface-2: #221636;
  --text: #efeaf7;
  --text-2: #cdc4dc;
  --muted: #9b91ae;
  --line: #2f2443;
  --accent: #4fd1c5;
  --accent-ink: #0f0818;
  --deep: #0c0616;
  --footer-bg: #0c0616;
  --accent-hover: #efeaf7;
  --accent-hover-ink: #120a1e;
}

body { font-size: 17px; }
.site-header { position: sticky; top: 0; border-bottom: 0; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--viridis); }
.brand__name { font-family: var(--font-display); font-size: 2.1rem; font-weight: 400; letter-spacing: -.01em; }
.brand__mark { width: 38px; height: 38px; color: var(--text); }
.primary-menu > li > a { font-weight: 600; font-size: .95rem; }
.cat, .entry-cat { font-size: .8rem; font-weight: 700; color: var(--accent); }
.card__title { font-size: 1.5rem; line-height: 1.08; }
.mini__title { font-family: var(--font-display); font-size: 1.28rem; font-weight: 400; line-height: 1.12; }
.section-title { font-size: clamp(2.1rem, 3.8vw, 3rem); }
.widget-title { font-family: var(--font-display); font-size: 1.7rem; font-weight: 400; }
.btn, .header-cta { font-weight: 700; }

/* ---------- Hero ---------- */
.lt-hero { display: grid; gap: 20px; padding-block: clamp(24px, 3vw, 40px); }
@media (min-width: 760px) { .lt-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lt-hero__lead { grid-column: 1 / -1; } }
@media (min-width: 1140px) { .lt-hero { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr); } .lt-hero__lead { grid-column: auto; } }
.lt-lead.card-overlay { height: 100%; min-height: 540px; border-radius: 20px; }
.lt-lead .card__body { padding: clamp(22px, 3vw, 40px); gap: .7rem; }
.lt-lead .card__title { font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1; max-width: 16ch; }
.lt-lead .card__excerpt { color: rgba(255,255,255,.85); max-width: 50ch; }
.lt-lead .cat, .lt-dark-card .cat, .lt-brief .cat { color: var(--vir-green); }
.lt-hero__pair { display: grid; gap: 20px; }
.lt-dark-card { padding: 10px 10px 20px; border-radius: 18px; background: var(--deep); color: #efeaf7; }
.lt-dark-card .media { border-radius: 12px; }
.lt-dark-card .card__body { padding-inline: 8px; }
.lt-dark-card .card__title { font-size: 1.55rem; }
.lt-dark-card .card__title a { color: #fff; }
.lt-dark-card .meta { color: #b0a5c3; }
.lt-brief { padding: 1.5rem 1.5rem .7rem; border-radius: 18px; background: var(--deep); color: #efeaf7; }
.lt-brief__title { font-size: 2.2rem; color: #fff; }
.lt-brief .mini { padding-block: 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.lt-brief .mini__title { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; line-height: 1.32; }
.lt-brief .mini__title a { color: #fff; }
.lt-brief .meta { color: #b0a5c3; }

/* ---------- Explainers, prompt, columns ---------- */
.lt-explainers { background: var(--surface-2); }
.lt-explainers .card .media { aspect-ratio: 4 / 3; }
.lt-count { display: inline-block; margin-top: .35rem; font-size: .82rem; font-weight: 600; color: var(--accent); }
.lt-prompt-band__grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .lt-prompt-band__grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.lt-prompt-band__title { font-size: clamp(2.6rem, 5vw, 4rem); line-height: .98; }
.lt-prompt-band__text { margin-top: .8rem; color: var(--text-2); }
.lt-prompt-band__text a { color: var(--accent); font-weight: 600; }
.lt-prompt { position: relative; overflow: hidden; padding: 1.6rem 1.6rem 1.4rem; border-radius: 20px; background: var(--deep); color: #efeaf7; }
.lt-prompt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--viridis); }
.lt-prompt .lt-prompt__text { margin: 0 0 1.1rem; font-size: 1.1rem; line-height: 1.6; color: #fff; }
.lt-prompt .lt-prompt__title { margin: 0 0 .7rem; font-size: 1.8rem; color: #fff; }
.lt-prompt__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.lt-prompt__copy { background: var(--vir-green); color: #1f0f33; }
.lt-prompt__copy:hover { background: var(--vir-yellow); color: #1f0f33; }
.lt-prompt__status { font-size: .9rem; color: var(--vir-green); }
.entry-content .lt-prompt { margin-top: 2.4rem; }
.lt-cols-band { border-top: 1px solid var(--line); }
.lt-cols { display: grid; gap: 36px; }
@media (min-width: 900px) { .lt-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lt-col__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: .5rem; margin-bottom: .3rem; border-bottom: 1px solid var(--text); }
.lt-col__name { font-size: 2rem; }
.lt-col .mini { padding-block: .85rem; border-bottom: 1px solid var(--line); }

/* ---------- Sidebar ---------- */
.signup--sidebar { position: relative; overflow: hidden; background: var(--deep); color: #efeaf7; }
.signup--sidebar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--viridis); }
.signup--sidebar .signup__title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; }
.signup--sidebar .signup__button { background: var(--vir-green); color: #1f0f33; }

/* ---------- Single ---------- */
.lt-progress { position: fixed; z-index: 200; top: 0; left: 0; right: 0; height: 4px; pointer-events: none; }
.lt-progress span { display: block; width: calc(var(--p, 0) * 100%); height: 100%; background: var(--viridis); background-size: 100vw 100%; }
.entry-title { font-size: clamp(2.6rem, 5.6vw, 4.4rem); line-height: 1; }
.entry-content blockquote { border-left-color: #21918c; font-family: var(--font-display); font-size: 1.8rem; font-weight: 400; line-height: 1.2; }
.lt-terms { margin-top: 2.4rem; padding: 1.5rem 1.6rem; border-radius: 18px; background: var(--surface-2); }
.entry-content .lt-terms__title { margin: 0 0 1rem; font-size: 1.9rem; }
.lt-terms dl { display: grid; gap: 1rem; margin: 0; }
.lt-terms dt { font-weight: 700; }
.lt-terms dd { margin: .15rem 0 0; color: var(--text-2); }
.site-footer .brand__name { color: var(--footer-text); }
.site-footer .brand__mark { color: var(--footer-text); }
.site-footer .signup { background: rgba(255,255,255,.05); color: var(--footer-text); padding: 1.4rem; }
.site-footer .signup__title { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; }
.site-footer .signup__button { background: var(--vir-green); color: #1f0f33; }
