/* thisishowtouseai — theme styles
   Editorial-clean base, confident display type, color-coded pillar system.
   Display: Bricolage Grotesque · Reading: Source Serif 4 */

/* ---------- tokens ---------- */
:root {
    --paper: #FBFAF7;
    --surface: #F2F0EA;
    --ink: #191B1C;
    --ink-soft: #5C5F58;
    --line: #E4E1D8;
    --accent: #E4572E;
    --pillar: var(--accent); /* overridden per card/band via inline style */
    --display: var(--gh-font-heading, "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --serif: var(--gh-font-body, "Source Serif 4", Georgia, "Times New Roman", serif);
    --wrap: 1100px;
    --narrow: 700px;
}
/* The site commits to its warm light palette in all color schemes.
   (A designed dark mode can be added deliberately later.) */
:root { color-scheme: light; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; }
body {
    margin: 0;
    font-family: var(--display);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }

.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 20px;
}

/* ---------- header ---------- */
.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 64px;
}
.site-brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; }
.site-logo { height: 28px; width: auto; }
.brand-lockup { display: inline-flex; align-items: center; gap: 8px; }
.brand-lockup-mark { display: block; width: 30px; height: 30px; flex: 0 0 auto; }
.site-wordmark {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}
.site-wordmark em { font-style: normal; color: var(--accent); }

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.site-nav .nav-current a { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle { display: none; }
@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: 0;
        padding: 10px;
        cursor: pointer;
    }
    .nav-toggle span { width: 20px; height: 2px; background: var(--ink); }
    .site-nav { display: none; width: 100%; }
    .site-nav.open { display: block; padding-bottom: 14px; }
    .header-wrap { flex-wrap: wrap; }
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-title {
    font-size: clamp(2.5rem, 6.5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.02;
    margin: 0 0 18px;
    text-wrap: balance;
}
.hero-accent { color: var(--accent); }
.hero-dek {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--ink-soft);
    max-width: 54ch;
    margin: 0;
}

/* ---------- path ---------- */
.path { padding: 44px 0 8px; }
.path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.path-step {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 20px 18px;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
a.path-step:hover { transform: translateY(-3px); border-color: var(--accent); }
.path-num {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent);
}
.path-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; }
.path-desc { font-family: var(--serif); font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }
.path-soon { opacity: 0.55; }

.footer-path { list-style: none; margin: 0 0 10px; padding: 0 0 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.footer-path a { text-decoration: none; font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.footer-path a:hover { color: var(--accent); }

/* ---------- pillar tiles ---------- */
.pillars { padding: 40px 0 8px; }
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 14px;
}
.pillar-tile {
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 18px 16px;
    text-decoration: none;
    background: var(--surface);
    border-top: 4px solid var(--pillar);
    border-radius: 0 0 6px 6px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pillar-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.pillar-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    color: var(--pillar);
}
.pillar-desc {
    font-family: var(--serif);
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pillar-count {
    margin-top: auto;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ---------- cards ---------- */
.featured { padding: 48px 0 8px; }
.featured-grid, .feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px 24px;
}
.feed { padding: 48px 0 72px; }
.feed-standalone { padding-top: 64px; }

.card {
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--pillar);
    padding-top: 16px;
}
.card-image { display: block; margin-bottom: 14px; }
.card-image img { border-radius: 4px; width: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.card-pillar {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pillar);
}
.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 8px 0 10px;
    text-wrap: balance;
}
.card-large .card-title { font-size: 1.6rem; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--pillar); }
.card-excerpt {
    font-family: var(--serif);
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--ink-soft);
    margin: 0 0 12px;
}
.card-meta {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.list-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
}
.list-dek {
    font-family: var(--serif);
    color: var(--ink-soft);
    margin: 0 0 36px;
}

/* ---------- tag band ---------- */
.tag-band {
    background: color-mix(in srgb, var(--pillar) 14%, var(--paper));
    border-bottom: 4px solid var(--pillar);
    padding: 56px 0 40px;
}
.tag-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pillar);
    margin: 0 0 8px;
}
.tag-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
}
.tag-dek {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--ink-soft);
    max-width: 60ch;
    margin: 0;
}

/* ---------- post ---------- */
.post-header { padding: 64px 24px 8px; }
.post-pillar-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--pillar);
    text-decoration: none;
}
.post-pillar-label:hover { text-decoration: underline; }
.post-title {
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.06;
    margin: 10px 0 16px;
    text-wrap: balance;
}
.post-dek {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--ink-soft);
    margin: 0 0 18px;
}
.post-meta { font-size: 0.85rem; color: var(--ink-soft); }
.post-meta-sep { margin: 0 6px; }

.post-feature { margin: 32px auto 8px; }
.post-feature img { border-radius: 6px; width: 100%; }
.post-feature figcaption {
    font-size: 0.82rem;
    color: var(--ink-soft);
    text-align: center;
    margin-top: 8px;
}

/* ---------- reading content ---------- */
.gh-content {
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.72;
    padding-top: 24px;
    padding-bottom: 24px;
}
.gh-content > * + * { margin-top: 1.35em; }
.gh-content h2, .gh-content h3 {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-top: 2em;
    margin-bottom: -0.5em;
}
.gh-content h2 { font-size: 1.65rem; }
.gh-content h3 { font-size: 1.3rem; }
.gh-content a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.gh-content a:hover { text-decoration-thickness: 2px; }
.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content li { margin-bottom: 0.5em; }
.gh-content li::marker { color: var(--accent); }
.gh-content hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2.5em auto;
    width: 120px;
}
.gh-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.35em 0;
    padding: 0.2em 0 0.2em 1.2em;
    color: var(--ink-soft);
}
.gh-content strong { font-weight: 600; }

/* prompt paragraphs: italic body text set in a quiet panel */
.gh-content p em:only-child,
.gh-content p[style] {
    display: block;
}
.gh-content p:has(> em:first-child:last-child) {
    background: var(--surface);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 16px 20px;
    font-size: 1.02rem;
}

.gh-content img { border-radius: 6px; }
.gh-content figcaption { font-size: 0.82rem; color: var(--ink-soft); text-align: center; }
.kg-width-wide { margin-left: -80px; margin-right: -80px; }
.kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.kg-width-full img { border-radius: 0; width: 100%; }
@media (max-width: 900px) { .kg-width-wide { margin-left: 0; margin-right: 0; } }

/* ---------- post footer ---------- */
.post-footer { padding-top: 16px; padding-bottom: 56px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.post-tag-chip {
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--pillar);
    border: 1px solid color-mix(in srgb, var(--pillar) 40%, transparent);
    border-radius: 999px;
    padding: 4px 14px;
    transition: background 0.15s;
}
.post-tag-chip:hover { background: color-mix(in srgb, var(--pillar) 12%, transparent); }
.post-cta {
    border-top: 1px solid var(--line);
    padding-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.post-cta p { font-family: var(--serif); color: var(--ink-soft); margin: 0; }

.read-next { border-top: 1px solid var(--line); padding: 48px 0 72px; }
.read-next-row { margin-bottom: 40px; }
.read-next-row:last-child { margin-bottom: 0; }

/* ---------- pagination ---------- */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    font-size: 0.9rem;
    font-weight: 600;
}
.pagination a {
    text-decoration: none;
    color: var(--accent);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 20px;
    transition: border-color 0.15s;
}
.pagination a:hover { border-color: var(--accent); }
.page-number { color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 48px 0 32px;
    margin-top: 24px;
}
.footer-wrap {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 40px;
    align-items: start;
}
@media (max-width: 800px) { .footer-wrap { grid-template-columns: 1fr; gap: 28px; } }
.footer-tagline {
    font-family: var(--serif);
    font-size: 0.95rem;
    color: var(--ink-soft);
    max-width: 40ch;
    margin: 10px 0 0;
}
.footer-logo { display: block; width: auto; height: 34px; max-width: 100%; }
.footer-brand .brand-lockup-mark { width: 28px; height: 28px; }
.footer-brand .site-wordmark { font-size: 1.05rem; }
.footer-signup-lead {
    font-family: var(--serif);
    font-size: 0.95rem;
    color: var(--ink-soft);
    margin: 0 0 12px;
}
.footer-signup-btn {
    display: inline-block;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    padding: 10px 22px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.footer-signup-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(228, 87, 46, 0.3); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { text-decoration: none; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--ink); }
.footer-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--ink-soft);
}
.footer-signoff { font-weight: 700; color: var(--ink); }
