/* andybridson.com — shared design system ("Ab" identity) */

/* One face per file. The fallback faces are metric-matched to Arial
   (Arimo / Liberation Sans on Linux) so a late swap does not reflow. */
@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url('fonts/archivo-variable.woff2') format('woff2');
}
@font-face {
    font-family: 'Archivo Fallback';
    src: local('Arial'), local('Arimo'), local('Liberation Sans');
    size-adjust: 90.79%;
    ascent-override: 96.7%;
    descent-override: 23.13%;
    line-gap-override: 0%;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/instrument-sans-variable.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Sans Fallback';
    src: local('Arial'), local('Arimo'), local('Liberation Sans');
    size-adjust: 96.98%;
    ascent-override: 100.02%;
    descent-override: 25.78%;
    line-gap-override: 0%;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono Fallback';
    src: local('Courier New'), local('Liberation Mono');
    size-adjust: 99.98%;
    ascent-override: 102.52%;
    descent-override: 27.5%;
    line-gap-override: 0%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* colour tokens */
    --cream:        #ffffff;  /* page / content background */
    --ink:          #0f172a;  /* dark rail bg + primary heading/text ink */
    --orange:       #2563eb;  /* accent on cream, 4.5:1 at body size */
    --orange-on-dark: #60a5fa; /* accent on the ink rail, 4.5:1 */
    --body:         #334155;  /* body copy */
    --muted:        #475569;  /* intros / leads on cream */
    --muted-2:      #526075;  /* secondary muted on cream (nav, card copy) */
    --dark-muted:   #cbd5e1;  /* light-on-dark muted (sidebar nav, intro) */
    --dark-faint:   #94a3b8;  /* dark-rail meta / faint */
    --dark-border:  #334155;  /* outline border on dark */
    --hairline:     #e2e8f0;  /* primary hairlines */
    --hairline-soft:#eef2f7; /* list-row hairlines */
    --panel:        #ffffff;  /* card / panel fill */
    --mono-muted:   #526075;  /* mono meta on cream, 4.5:1 */
    --selection:    #dbeafe;
    --code-bg:      rgba(15, 23, 42, 0.05);

    /* type */
    --font-display: 'Archivo', 'Archivo Fallback', sans-serif;
    --font-body:    'Instrument Sans', 'Instrument Sans Fallback', system-ui, sans-serif;
    --font-mono:    'IBM Plex Mono', 'IBM Plex Mono Fallback', ui-monospace, monospace;

    /* spacing / radius */
    --sidebar-w:    280px;
    --radius-sm:    4px;
    --radius-md:    6px;
    --radius-lg:    8px;
}

html { font-size: 16px; }

body {
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange); }

::selection { background: var(--selection); }

/* ── SHELL / GRID ── */
.shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    background: var(--cream);
}

/* ── SIDEBAR (standard: About / Work / case studies) ── */
.sidebar {
    background: var(--ink);
    color: var(--cream);
    padding: 40px 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar__top {
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.sidebar__mark {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 26px;
    line-height: 1;
    align-self: flex-start;
}
/* The b uses the Patched logo gradient; plain blue is the fallback where text clipping is unsupported. */
.sidebar__mark span {
    color: var(--orange-on-dark);
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sidebar a:hover { color: #93c5fd; }

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
}
.sidebar__nav a { padding: 7px 0; color: var(--dark-muted); }
.sidebar__nav a.is-current { color: #fff; }

.sidebar__meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--dark-muted);
}
.sidebar__about { font: 400 14px/1.55 var(--font-body); color: var(--dark-muted); }
.sidebar__rss { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 500 14px/1.6 var(--font-body); color: var(--cream); }
.sidebar__place { font: 400 12px/1.8 var(--font-mono); }

/* ── SIDEBAR (home hero variant) ── */
.sidebar--home {
    justify-content: space-between;
    gap: 24px;
}

.sidebar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar__coords {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dark-faint);
    letter-spacing: 0.06em;
}

.sidebar__hero {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sidebar__name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 4.875rem;
    line-height: 0.86;
    letter-spacing: -0.04em;
}
.sidebar__name span { color: var(--orange); }

.sidebar__intro {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.5;
    color: var(--dark-muted);
    max-width: 36ch;
}

.sidebar__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.sidebar__links {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dark-faint);
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

/* ── CONTENT COLUMN ── */
.content {
    padding: 56px 60px;
    width: 100%;
    max-width: 900px;
}
.content--home {
    max-width: 820px;
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
}
.content--narrow { max-width: 760px; }
.content--wide { max-width: 900px; }
.content--article { max-width: 800px; }

.content__nav {
    display: flex;
    gap: 26px;
    justify-content: flex-end;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-2);
    margin-bottom: 30px;
}
.content__nav a.is-current { color: var(--ink); }

/* ── SECTION LABEL (used throughout) ── */
.label {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--orange);
    font-weight: 600;
}

/* ── BUTTONS / LINKS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 13px 24px;
    border-radius: var(--radius-sm);
    transition: opacity 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn--primary, .btn--primary:hover { background: var(--orange); color: #fff; }
.btn--dark, .btn--dark:hover { background: var(--ink); color: var(--cream); }
.btn--outline { border: 1px solid var(--dark-border); }
.btn--outline, .btn--outline:hover { color: var(--cream); }
.btn--outline:hover { border-color: var(--orange); }

.link-accent { color: var(--orange); font-weight: 600; }
.link-accent:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── HOME ── */
.home-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid var(--hairline);
}
.home-section:first-child { padding-top: 0; border-top: none; padding-bottom: 24px; border-bottom: 1px solid var(--hairline); }

.home-section p:not(.label) { font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--body); }

.home-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}
.home-section__more { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--mono-muted); }

.home-work__lede { font-family: var(--font-body); font-size: 15px; line-height: 1.5; color: var(--body); }
.home-work__lede strong { color: var(--ink); }

.home-transformations { display: flex; flex-direction: column; }
.home-transformation {
    display: grid;
    grid-template-columns: 92px 1fr;
    column-gap: 18px;
    row-gap: 4px;
    padding: 14px 0;
    border-top: 1px solid var(--hairline-soft);
}
.home-transformation__org {
    grid-row: 1 / 3;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mono-muted);
    padding-top: 3px;
}
.home-transformation__title { font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.home-transformation__result { font-family: var(--font-body); font-size: 12.5px; line-height: 1.4; color: var(--muted-2); }

/* ── PAGE HEADINGS ── */
.page-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 64px;
    letter-spacing: -0.04em;
    line-height: 0.9;
}
.page-title span { color: var(--orange); }

.page-lead {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 16px;
    max-width: 52ch;
}

/* ── WORK ── */
.work-list {
    display: flex;
    flex-direction: column;
    margin-top: 44px;
    border-bottom: 1px solid var(--hairline);
}
.work-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 0;
    border-top: 1px solid var(--hairline);
}
.work-card__meta {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--orange);
}
.work-card__title { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); }
.work-card__body { max-width: 62ch; font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--muted-2); }
.work-card__result { font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: var(--mono-muted); }
.work-card:hover .work-card__title,
.work-card:hover .work-card__result { color: var(--orange); }

.case-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 2.4rem;
    background: var(--hairline);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.case-stats--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-stat { background: var(--cream); padding: 1.4rem 1.2rem; }
.case-stat strong { display: block; font-family: var(--font-display); font-size: 1.75rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.case-stat strong em { font-style: normal; color: var(--orange); }
.case-stat span { display: block; margin-top: 0.45rem; font-family: var(--font-mono); font-size: 0.68rem; line-height: 1.35; color: var(--mono-muted); }

.case-evidence {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 2rem 0;
    background: var(--hairline);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.case-evidence__item { background: var(--panel); padding: 1.25rem; }
.case-evidence__item strong { display: block; font-family: var(--font-display); font-size: 0.95rem; line-height: 1.25; color: var(--ink); }
.case-evidence__item span { display: block; margin-top: 0.55rem; font-family: var(--font-body); font-size: 0.85rem; line-height: 1.5; color: var(--muted-2); }

/* ── ABOUT ── */
.about-lead {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-top: 32px;
}

.about-body {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--body);
}

.about-cta { margin-top: 32px; }

/* ── ARTICLE (case study body) ── */
.article { max-width: 800px; }

.article__back {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-2);
    margin-bottom: 24px;
}
.article__back:hover { color: var(--orange); }

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--mono-muted);
    margin: 0 0 18px;
}

.post__tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--orange);
}

.post-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 4.6vw, 2.9rem);
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin: 0 0 1rem;
    color: var(--ink);
}

.dek {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    font-weight: 400;
    color: var(--muted);
    line-height: 1.45;
    letter-spacing: -0.01em;
    margin: 0 0 2.2rem;
}

.article h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 2.6rem 0 1rem;
    color: var(--ink);
}

.article p { font-family: var(--font-body); margin: 0 0 1.4rem; line-height: 1.62; color: var(--body); }

.article blockquote {
    margin: 2rem 0;
    padding: 0.2rem 0 0.2rem 1.25rem;
    border-left: 3px solid var(--orange);
    color: var(--muted);
    font-size: 1.08rem;
}
.article blockquote p:last-child { margin-bottom: 0; }

.article__figure { margin: 2rem 0 2.2rem; }
.article__figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sm);
}

.article__table { margin: 0 0 1.6rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.article table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.5; }
.article th {
    text-align: left;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding: 0 1rem 0.6rem 0;
    border-bottom: 1px solid var(--hairline);
}
.article td {
    padding: 0.7rem 1rem 0.7rem 0;
    border-bottom: 1px solid var(--hairline-soft);
    vertical-align: top;
    color: var(--body);
}
.article td:first-child { font-weight: 500; color: var(--ink); white-space: nowrap; }

.article ul { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.article li { font-family: var(--font-body); margin-bottom: 0.4rem; line-height: 1.6; color: var(--body); }

.article a { color: var(--orange); text-decoration: none; }
.article a:hover { text-decoration: underline; text-underline-offset: 4px; }

.article a.btn,
.article a.btn:hover { text-decoration: none; }
.article a.btn--primary, .article a.btn--primary:hover { color: #fff; }
.article a.btn--dark, .article a.btn--dark:hover { color: var(--cream); }
.article a.btn--outline, .article a.btn--outline:hover { color: var(--cream); }

.article code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--code-bg);
    padding: 0.12em 0.36em;
    border-radius: 5px;
}

.article pre {
    background: var(--code-bg);
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.5;
    margin: 0 0 1.6rem;
    -webkit-overflow-scrolling: touch;
}
.article pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
}

.service-callout {
    margin-top: 2rem;
    padding: 1.5rem;
    border-left: 3px solid var(--orange);
    background: var(--code-bg);
    line-height: 1.65;
    color: var(--body);
}

.case-cta {
    margin-top: 2.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--hairline);
}
.case-cta p { font-family: var(--font-body); color: var(--body); line-height: 1.62; }
.case-cta .btn { margin-top: 0.75rem; }

.post-end {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--mono-muted);
    margin-top: 2.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--hairline);
}
.post-end a { color: var(--mono-muted); }
.post-end a:hover { color: var(--orange); }

.subscribe {
    margin-top: 2.6rem;
    padding: 1.5rem;
    border-left: 3px solid var(--orange);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.subscribe p { margin: 0; font-family: var(--font-body); line-height: 1.55; color: var(--ink); }
.subscribe p strong { font-weight: 700; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }

    .sidebar,
    .sidebar--home {
        position: static;
        height: auto;
        padding: 24px;
        gap: 20px;
    }

    .sidebar__top { gap: 24px; }

    .sidebar__nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 18px;
    }
    .sidebar__nav a { padding: 4px 0; }

    .sidebar__meta { margin-top: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
    .sidebar__about { flex: 1 1 100%; }

    .sidebar--home { flex-direction: column; }
    .sidebar__hero { gap: 18px; }
    .sidebar__name { font-size: clamp(2.5rem, 10vw, 3.5rem); }
    .sidebar__intro { max-width: 60ch; }

    .content, .content--narrow, .content--wide, .content--article {
        max-width: none;
        padding: 40px 24px;
    }
    .content--home { padding: 24px; }

    .content__nav { justify-content: flex-start; flex-wrap: wrap; gap: 14px 22px; }

    .case-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .case-stats--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .sidebar__top { gap: 14px; }
    .sidebar__nav { flex-wrap: nowrap; gap: 4px 16px; font-size: 14px; }
    .sidebar, .content, .content--narrow, .content--wide, .content--article, .content--home {
        padding: 20px 18px;
    }
    .page-title { font-size: clamp(2rem, 10.5vw, 44px); }
    .home-transformation { grid-template-columns: 1fr; }
    .home-transformation__org { grid-row: auto; padding-top: 0; }
    .case-stats--compact,
    .case-evidence { grid-template-columns: 1fr; }
    .subscribe { flex-direction: column; align-items: flex-start; }
}

/* ── JOURNAL: blog home, archives and articles ── */
.journal .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.journal-shell { width: 100%; max-width: 1000px; min-width: 0; padding: 0 60px; }
.journal-shell--listing { max-width: 1200px; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 10; padding: 12px 18px; background: var(--ink); color: var(--cream); }
.skip-link:hover { color: var(--cream); }
.skip-link:focus { top: 12px; }
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 5px; }
.journal-intro { padding: 56px 0 48px; }
.journal-intro h1 { font: 900 clamp(3rem, 5.5vw, 5rem)/0.98 var(--font-display); letter-spacing: -0.055em; margin: 26px 0 24px; }
.journal-intro h1 span, .journal-archive-header h1 span { color: var(--orange); }
.journal-intro > p:last-child { color: var(--muted); font-size: 21px; line-height: 1.5; }
.journal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding-bottom: 56px; }
.journal-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 20px 0 32px; border-top: 2px solid var(--ink); }
.journal-section-heading > a { font-size: 14px; color: var(--muted); }
.journal-post-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; font: 400 11px/1.7 var(--font-mono); color: var(--muted-2); }
.journal-post-meta > a { color: var(--orange); font-weight: 500; }
.journal-feature h2 { font: 800 clamp(2rem, 3.7vw, 3rem)/1.12 var(--font-display); letter-spacing: -0.04em; max-width: 22ch; margin: 18px 0 22px; }
.journal-excerpt { font-size: 18px; line-height: 1.65; color: var(--body); max-width: 60ch; }
.journal-read { display: inline-flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--orange); padding: 0 0 8px; margin-top: 28px; }
.journal-read span { color: var(--orange); font-size: 22px; }
.journal-rail { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; align-self: start; gap: 32px; border-top: 2px solid var(--ink); padding-top: 24px; }
.journal-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.journal-category span { color: var(--orange); }
.journal-author { padding-top: 0; }
.journal-author p { color: var(--body); font-size: 15px; line-height: 1.65; margin: 20px 0 16px; }
.journal-author p a { text-decoration: underline; text-underline-offset: 3px; }
.journal-text-link, .journal-work-link { font-size: 14px; font-weight: 500; }
.journal-work-link { display: flex; justify-content: space-between; margin-top: 0; padding-top: 20px; border-top: 1px solid var(--hairline); }
.journal-rail > .journal-text-link { display: inline-block; }
.journal-footer { border-top: 1px solid var(--ink); padding: 25px 0 32px; color: var(--muted); font: 400 14px/1.7 var(--font-body); }
.journal-footer a:hover { color: var(--orange); }
.content .journal-footer { margin-top: 56px; padding-bottom: 0; }
.journal-archive-header { padding: 60px 0 52px; }
.journal-archive-header h1 { font: 900 clamp(2.5rem, 4.5vw, 4rem)/1.05 var(--font-display); letter-spacing: -0.05em; margin: 20px 0; }
.journal-archive-header > p:last-child { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 50ch; }
.journal-archive .journal-feature { padding-top: 24px; border-top: 2px solid var(--ink); }
.journal-feature--compact, .journal-archive .journal-feature--compact { padding-top: 40px; border-top: 1px solid var(--hairline); }
.journal-feature--compact h2 { font-size: clamp(1.375rem, 6vw, 1.75rem); line-height: 1.2; letter-spacing: -0.03em; max-width: 30ch; margin: 12px 0 10px; }
.journal-feature--compact .journal-excerpt { font-size: 16px; line-height: 1.6; }
.journal-feature--compact .journal-read { gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 0; padding: 0; margin-top: 14px; }
.journal-feature--compact .journal-read span { font-size: 16px; }
.journal-feature--compact .journal-read:hover { color: var(--orange); }
.journal-article { max-width: 72ch; margin: 0 auto; padding: 44px 0 72px; font-size: 19px; }
.journal-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted-2); margin-bottom: 44px; }
.journal-article-header h1 { font: 900 clamp(2.5rem, 5vw, 4rem)/1.07 var(--font-display); letter-spacing: -0.045em; margin: 24px 0; }
.journal-byline { color: var(--muted-2); font-size: 14px; margin: 0 0 40px; padding-bottom: 28px; border-bottom: 1px solid var(--hairline); }
.journal-article-image { display: block; width: 100%; height: auto; margin: 32px 0; }
.journal-prose { max-width: 70ch; }
.journal-prose p { margin-bottom: 1.4em; font-size: 19px; line-height: 1.8; color: var(--body); }
.journal-prose h2 { font: 800 1.6rem/1.25 var(--font-display); letter-spacing: -0.025em; margin: 2.2em 0 0.9em; }
.journal-prose a { text-decoration: underline; text-underline-offset: 4px; }
.journal-prose ul { margin: 0 0 1.4em 1.25em; }
.journal-prose li { margin-bottom: 0.5em; font-size: 19px; line-height: 1.7; color: var(--body); }
.journal-article-end { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: 15px; }
@media (min-width: 1100px) {
    .journal-grid { grid-template-columns: minmax(0, 1fr) 210px; gap: 40px; }
}
@media (min-width: 901px) and (max-width: 1200px) {
    .journal-shell { padding: 0 40px; }
}
@media (max-width: 900px) {
    .journal .shell { grid-template-columns: minmax(0, 1fr); }
    .journal-shell { padding: 0 24px; }
}
@media (max-width: 700px) {
    .journal-shell { padding: 0 22px; }
    .journal-intro { padding: 44px 0 40px; }
    .journal-intro h1 { margin: 22px 0; }
    .journal-intro > p:last-child { font-size: 18px; max-width: 30ch; }
    .journal-grid { grid-template-columns: 1fr; gap: 46px; padding-bottom: 48px; }
    .journal-feature h2 { max-width: 24ch; }
    .journal-author p { max-width: 52ch; }
    .journal-archive-header { padding: 40px 0; }
    .journal-article { padding: 28px 0 48px; }
    .journal-breadcrumb { margin-bottom: 32px; }
    .journal-prose p { font-size: 18px; line-height: 1.75; }
    .journal-prose li { font-size: 18px; }
}
@media (max-width: 380px) {
    .journal-intro h1 { font-size: clamp(2.5rem, 13.75vw, 3.25rem); }
    .journal-archive-header h1 { font-size: clamp(2rem, 11.25vw, 2.5rem); }
}

/* ── HOME: redesigned homepage (index.html only; every selector is .home-* scoped) ── */
.home-main { max-width: 860px; padding: 64px 0 72px; display: flex; flex-direction: column; gap: 72px; }
.home-main a { text-decoration: none; }
.home-hero { display: flex; flex-direction: column; gap: 24px; }
.home-hero h1 { font: 900 76px/0.98 var(--font-display); letter-spacing: -3px; word-spacing: 6px; }
.home-hero h1 span { color: var(--orange); }
.home-hero__lede { max-width: 640px; font-size: 21px; line-height: 1.5; color: var(--body); }

.home-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-hero .home-actions { margin-top: 8px; }
.home-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--radius-md); font: 600 15px/1.2 var(--font-body); }
.home-btn--primary { background: var(--ink); color: var(--cream); }
.home-btn--primary:hover { color: var(--cream); background: #1e293b; }
.home-btn--outline { border: 1.5px solid var(--ink); color: var(--ink); }
.home-btn--outline:hover { background: var(--ink); color: var(--cream); }
.home-btn--light { background: var(--cream); color: var(--ink); }
.home-btn--light:hover { color: var(--ink); background: #fff; }
.home-btn--ghost { border: 1.5px solid var(--dark-border); color: var(--cream); }
.home-btn--ghost:hover { color: #fff; border-color: var(--cream); }

.home-section-block { display: flex; flex-direction: column; gap: 28px; border-top: 2px solid var(--ink); padding-top: 24px; }
.home-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.home-section-head h2 { font-size: 15px; }
.home-section-head > a { font-size: 15px; }
.home-section-head > a:hover, .home-rows a:hover .home-rows__title, .home-feature h3 a:hover { color: var(--orange); }

.home-feature { display: flex; flex-direction: column; gap: 14px; }
.home-feature .journal-post-meta { font-size: 13px; line-height: 1.6; color: var(--muted); gap: 6px; }
.home-feature__cat { color: var(--orange); }
.home-feature h3 { font: 900 40px/1.08 var(--font-display); letter-spacing: -1.2px; }
.home-feature p { max-width: 680px; font-size: 18px; line-height: 1.6; color: var(--body); }
.home-feature__read { align-self: flex-start; font-weight: 600; font-size: 15px; border-bottom: 2px solid var(--orange); padding-bottom: 4px; }

.home-rows { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.home-rows a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.home-rows__title { flex: 1 1 360px; font-size: 18px; font-weight: 600; }
.home-rows__meta { font: 400 13px/1.6 var(--font-mono); color: var(--muted); }

.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.home-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
.home-card:hover { background: #f8fafc; border-color: #cbd5e1; }
.home-card__kicker { font: 500 14px/1.5 var(--font-body); color: var(--muted); }
.home-card__title { font: 800 21px/1.2 var(--font-display); }
.home-card__result { margin-top: auto; font-size: 14px; font-weight: 600; color: #1d4ed8; }

.home-available { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; background: var(--ink); color: var(--cream); border-radius: var(--radius-lg); padding: 40px; scroll-margin-top: 24px; }
.home-available__copy { flex: 1 1 380px; display: flex; flex-direction: column; gap: 14px; }
.home-available__lead { font: 800 28px/1.2 var(--font-display); letter-spacing: -0.5px; }
.home-available__text { font-size: 16px; color: var(--dark-muted); }

.home-footer { max-width: 860px; margin: 0 0 40px; }

@media (max-width: 900px) {
    .home-main { padding-top: 48px; }
}
@media (max-width: 760px) {
    .sidebar__meta { display: none; }
    .home-main { padding: 40px 0 32px; }
    .home-hero h1 { font-size: 52px; letter-spacing: -2px; }
    .home-hero__lede { font-size: 18px; }
    .home-feature h3 { font-size: 30px; }
    .home-available { padding: 28px 24px; }
    .home-available__lead { font-size: 24px; }
}
@media (max-width: 380px) {
    .home-hero h1 { font-size: clamp(2.5rem, 13.5vw, 3.25rem); }
    .home-btn { flex: 1 1 100%; justify-content: center; }
}
