/*
Theme Name: AI Shorts Guide
Template: generatepress
Description: Child theme for aishortsguide.com. Reading-first layout, self-hosted fonts, content components used by the editorial playbook.
Version: 1.0.0
Text Domain: aishortsguide
*/

/* Layout: single reading column (760px) inside a 1200px frame; vertical 9:16 motifs in cards and hero */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/bricolage-800.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/instrument-sans.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/jetbrains-mono-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
	--bg: #fbf8f9; --surface: #ffffff; --sunken: #f4eef2;
	--ink: #23162a; --muted: #66566a; --line: #e8dee6;
	--accent: #b81f57; --accent-ink: #ffffff; --accent-soft: #f8d7e3;
	--amber: #8f5c10; --amber-soft: #fcebd2;
	--good: #2b7349; --good-soft: #d9f1e1; --bad: #b3261e; --bad-soft: #f8dcda; --info-soft: #e4ecf7; --info: #2c5282;
	--f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
	--f-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
	--f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
	--r: 12px; --read: 760px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141016; --surface: #1d1720; --sunken: #251d29;
		--ink: #f2eaf1; --muted: #b8a9b9; --line: #3a2e40;
		--accent: #ff6b9c; --accent-ink: #1d1420; --accent-soft: #4a1f33;
		--amber: #e3a84a; --amber-soft: #3e2e14;
		--good: #6fd197; --good-soft: #173523; --bad: #ff8a80; --bad-soft: #3d1a1a; --info-soft: #1b2a3d; --info: #9cc2f0;
		color-scheme: dark;
	}
}

html body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 18px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
body a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 800; color: var(--ink); text-wrap: balance; letter-spacing: -0.015em; }
h1, .entry-title { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.08; margin-bottom: 0.4em; }
.entry-content h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.15; margin: 2.2em 0 0.6em; scroll-margin-top: 90px; }
.entry-content h3 { font-size: 1.2rem; line-height: 1.25; margin: 1.6em 0 0.4em; font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 1.1em; }
.entry-content li { margin-bottom: 0.35em; }
code, kbd, .mono { font-family: var(--f-mono); font-size: 0.88em; }

/* Frame */
body .site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
body .inside-header { padding: 14px 20px; }
body .main-title { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; margin: 0; letter-spacing: -0.02em; }
body .main-title a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.aisg-mark { width: 20px; height: 34px; border-radius: 5px; background: var(--accent); position: relative; flex: none; }
.aisg-mark::after { content: ""; position: absolute; left: 7px; top: 11px; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent var(--accent-ink); }
body .main-navigation, body .main-navigation ul ul { background: transparent; }
body .main-navigation .main-nav ul li a, body .menu-toggle { color: var(--ink); font-size: 0.95rem; font-weight: 600; padding-left: 14px; padding-right: 14px; line-height: 52px; }
body .main-navigation .main-nav ul li:hover > a, body .main-navigation .main-nav ul li.current-menu-item > a { color: var(--accent); background: transparent; }
body .main-navigation.toggled .main-nav ul ul, body .main-navigation .main-nav ul ul { background: var(--surface); }
body .site-content { padding-block: 28px 56px; }
body.one-container .site-content, body .inside-article, body.separate-containers .inside-article, body .one-container .site-content { background: transparent; padding: 0; }
body .site.grid-container { background: transparent; }
.single .inside-article, .page:not(.home) .inside-article { max-width: var(--read); margin-inline: auto; padding-inline: 20px; }
.archive .site-main { max-width: 1100px; margin-inline: auto; padding-inline: 20px; }
.entry-header { margin-bottom: 18px; }

/* Breadcrumbs + byline */
.aisg-crumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 0.85rem; color: var(--muted); }
.aisg-crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--line); }
.aisg-crumbs a { color: var(--muted); text-decoration: none; }
.aisg-crumbs a:hover { color: var(--accent); }
.aisg-byline { font-size: 0.88rem; color: var(--muted); margin: 0; }
.aisg-byline a { color: var(--muted); }
.aisg-hero-img { margin: 20px 0 8px; }
.aisg-hero-img img { width: 100%; height: auto; border-radius: var(--r); display: block; aspect-ratio: 16 / 9; object-fit: cover; }

/* Components */
.aisg-answer { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 18px 20px; margin: 8px 0 22px; font-size: 1.05rem; }
.aisg-answer p:last-child { margin-bottom: 0; }
.aisg-toc { margin: 0 0 28px; }
.aisg-toc details { background: var(--sunken); border-radius: var(--r); padding: 14px 18px; }
.aisg-toc summary { cursor: pointer; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.aisg-toc ol { margin: 10px 0 0 1.2em; padding: 0; font-size: 0.95rem; columns: 2 220px; column-gap: 28px; }
.aisg-toc li { break-inside: avoid; margin-bottom: 4px; }
.aisg-toc a { color: var(--ink); text-decoration: none; }
.aisg-toc a:hover { color: var(--accent); text-decoration: underline; }

.aisg-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 26px; }
.aisg-specs > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.aisg-specs dt { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.aisg-specs dd { margin: 2px 0 0; font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; line-height: 1.2; font-variant-numeric: tabular-nums; }

.aisg-table { overflow-x: auto; margin: 0 0 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.entry-content .aisg-table table { margin: 0; border: 0; width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.entry-content .aisg-table th, .entry-content .aisg-table td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content .aisg-table th { background: var(--sunken); font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 500; white-space: nowrap; }
.entry-content .aisg-table tr:last-child td { border-bottom: 0; }
.entry-content .aisg-table td { font-variant-numeric: tabular-nums; }

.entry-content .aisg-steps { list-style: none; counter-reset: step; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.aisg-steps > li { counter-increment: step; position: relative; padding: 14px 16px 14px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin: 0; }
.aisg-steps > li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--f-mono); font-size: 0.85rem; display: grid; place-items: center; }

.aisg-callout { border-radius: var(--r); padding: 14px 18px; margin: 0 0 24px; background: var(--info-soft); border-left: 4px solid var(--info); }
.aisg-callout--tip { background: var(--good-soft); border-left-color: var(--good); }
.aisg-callout--warn { background: var(--amber-soft); border-left-color: var(--amber); }
.aisg-callout p:last-child { margin-bottom: 0; }

.aisg-proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0 0 26px; }
.aisg-pros, .aisg-cons { border-radius: var(--r); padding: 14px 18px; border: 1px solid var(--line); background: var(--surface); }
.aisg-pros h3, .aisg-cons h3 { margin-top: 0; font-size: 1rem; }
.aisg-pros h3 { color: var(--good); } .aisg-cons h3 { color: var(--bad); }
.aisg-pros ul, .aisg-cons ul { margin: 0 0 0 1.1em; }

.aisg-takeaways { background: var(--sunken); border-radius: var(--r); padding: 6px 20px 8px; margin: 32px 0; }
.entry-content .aisg-takeaways h2 { margin-top: 0.8em; font-size: 1.25rem; }

.aisg-faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.aisg-faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.aisg-faq summary::-webkit-details-marker { display: none; }
.aisg-faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-family: var(--f-mono); font-size: 1.2rem; color: var(--accent); }
.aisg-faq details[open] summary::after { content: "−"; }
.aisg-faq details p { margin: 8px 0 0; }

.aisg-sources { margin-top: 36px; font-size: 0.88rem; color: var(--muted); }
.entry-content .aisg-sources h2 { font-size: 1.1rem; }
.aisg-sources li { overflow-wrap: anywhere; }

.aisg-editorial { margin: 36px 0 0; padding: 16px 18px; border: 1px dashed var(--line); border-radius: var(--r); font-size: 0.9rem; color: var(--muted); }
.aisg-editorial p { margin: 0; }

/* Cards (related, home, hubs) */
.aisg-related { max-width: var(--read); margin: 44px auto 0; padding-inline: 20px; }
.aisg-related h2 { font-size: 1.35rem; margin-bottom: 14px; }
.aisg-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.entry-content .aisg-cards { margin: 0 0 30px; }
.aisg-card { margin: 0; }
.aisg-card a { display: grid; gap: 6px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; height: 100%; padding-bottom: 14px; transition: border-color .15s; }
.aisg-card a:hover { border-color: var(--accent); }
.aisg-card__img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.aisg-card__kicker { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); padding-inline: 14px; margin-top: 4px; }
.aisg-card__title { font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; line-height: 1.2; padding-inline: 14px; }

/* Home */
.home .inside-article { max-width: 1100px; margin-inline: auto; padding-inline: 20px; }
.aisg-home-hero { display: grid; gap: 18px; padding: 24px 0 36px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.aisg-home-hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); max-width: 16ch; margin: 0; }
.aisg-home-hero p { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0; }
.aisg-eyebrow { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.aisg-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 0 0 40px; }
.aisg-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 8px; align-content: start; }
.entry-content .aisg-section h2 { margin: 0; font-size: 1.3rem; }
.aisg-section p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.aisg-section ul { margin: 6px 0 0 1.1em; }

/* Archive */
.archive .page-header { margin-bottom: 24px; }
.archive .page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.archive article .inside-article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.archive .entry-title { font-size: 1.35rem; margin: 0 0 6px; }
.archive .entry-title a { color: var(--ink); text-decoration: none; }
.archive .entry-summary p { margin: 0; color: var(--muted); }

/* Footer */
body .site-footer, body .site-info { background: var(--sunken); color: var(--muted); }
body .inside-site-info { padding: 28px 20px; }
.aisg-footer { display: grid; gap: 14px; width: 100%; font-size: 0.9rem; }
.aisg-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.aisg-footer a { color: var(--ink); text-decoration: none; }
.aisg-footer a:hover { color: var(--accent); }
.aisg-footer small { color: var(--muted); }

@media (max-width: 768px) {
	html body { font-size: 17px; }
	.aisg-toc ol { columns: 1; }
	.aisg-steps > li { padding-left: 52px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
