/*
  LAWMAKER — Dev Dispatch (blog) shared stylesheet
  ────────────────────────────────────────────────────────────
  The blog inherits the landing page's editorial design system:
  same tokens, type, nav and footer as ../index.html. Posts are
  hand-built HTML like the landing page's product panels.

  Type   : Archivo (display) · Public Sans (body) · Space Mono (labels)
  Colour : warm newsprint paper + near-black ink + indigo primary.
*/

:root {
    --ink: #17151f;
    --ink-2: #2b2838;
    --paper: #f5f3ee;
    --paper-2: #edeae1;
    --card: #ffffff;
    --line: #e3dfd4;
    --line-2: #d6d1c4;
    --muted: #6a6577;
    --muted-2: #908b9c;
    --indigo: #4733e6;
    --indigo-deep: #2c1ca0;
    --indigo-soft: #efedfd;
    --red: #db3a2c;
    --green: #11a877;
    --amber: #efa636;
    --pink: #ff5a7e;

    --maxw: 1200px;
    --prose: 760px;
    --r: 16px;
    --r-lg: 24px;
    --shadow: 0 1px 2px rgba(23, 21, 31, .04), 0 18px 40px -20px rgba(23, 21, 31, .22);
    --shadow-lg: 0 2px 4px rgba(23, 21, 31, .05), 0 40px 80px -28px rgba(23, 21, 31, .38);

    --font-display: "Archivo", system-ui, sans-serif;
    --font-body: "Public Sans", system-ui, sans-serif;
    --font-mono: "Space Mono", ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 800;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

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

.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--indigo);
    display: block;
    max-width: 100%;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--indigo);
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* ── Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    padding: 14px 22px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--indigo);
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(71, 51, 230, .6);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -10px rgba(71, 51, 230, .7);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line-2);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--ink);
    transform: translateY(-2px);
}

.btn-light {
    background: #fff;
    color: var(--ink);
}

.btn-light:hover {
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
}

.btn-outline-light:hover {
    border-color: #fff;
    transform: translateY(-2px);
}

/* ── Nav ───────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 243, 238, .82);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.brand .seal {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--indigo);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
    box-shadow: 0 6px 14px -6px rgba(71, 51, 230, .7);
}

.brand .chip {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--indigo);
    border: 1.4px solid var(--indigo);
    border-radius: 5px;
    padding: 2px 6px;
    margin-left: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 15px;
    font-weight: 600;
}

.nav-links a {
    color: var(--muted);
    transition: color .15s;
}

.nav-links a:hover,
.nav-links a.on {
    color: var(--ink);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: background .15s, color .15s;
}

.icon-btn:hover {
    background: var(--paper-2);
    color: var(--ink);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* ── Blog masthead (index) ─────────────────── */
.blog-head {
    position: relative;
    padding: 84px 0 64px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(120% 120% at 85% -10%, rgba(71, 51, 230, .07), transparent 55%);
}

.blog-head::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(23, 21, 31, .055) 1.1px, transparent 1.1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    pointer-events: none;
}

.blog-head .wrap {
    position: relative;
}

.blog-head h1 {
    font-size: clamp(38px, 5.4vw, 68px);
    font-weight: 900;
    letter-spacing: -0.035em;
    margin: 22px 0 0;
    max-width: 800px;
}

.blog-head p {
    font-size: 19px;
    color: var(--muted);
    margin: 20px 0 0;
    max-width: 620px;
}

/* ── Post list (index) ─────────────────────── */
.post-list {
    padding-top: 26px;
    padding-bottom: 100px;
}

.post-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 36px;
    padding: 44px 0;
    border-bottom: 1px solid var(--line);
    align-items: start;
}

.post-item-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 6px;
}

.post-date {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--indigo);
    border: 1.2px solid var(--indigo);
    border-radius: 5px;
    padding: 3px 7px;
    white-space: nowrap;
}

.tag.amber {
    color: #976511;
    border-color: rgba(239, 166, 54, .8);
}

.post-item h2 {
    font-size: clamp(26px, 3.2vw, 40px);
    letter-spacing: -0.025em;
}

.post-item h2 a {
    transition: color .15s;
}

.post-item h2 a:hover {
    color: var(--indigo);
}

.post-item .excerpt {
    color: var(--muted);
    font-size: 17.5px;
    margin: 16px 0 0;
    max-width: 680px;
}

.post-item .more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-weight: 700;
    font-size: 15.5px;
    color: var(--indigo);
    transition: gap .15s;
}

.post-item .more:hover {
    gap: 12px;
}

/* ── Article (post pages) ──────────────────── */
.post-hero {
    position: relative;
    padding: 84px 0 56px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(120% 120% at 85% -10%, rgba(71, 51, 230, .07), transparent 55%);
}

.post-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(23, 21, 31, .055) 1.1px, transparent 1.1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    pointer-events: none;
}

.post-hero .wrap {
    position: relative;
}

.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.post-hero h1 {
    font-size: clamp(36px, 5vw, 62px);
    font-weight: 900;
    letter-spacing: -0.035em;
    margin: 20px 0 0;
    max-width: 860px;
}

.post-hero .standfirst {
    font-size: 21px;
    color: var(--muted);
    margin: 24px 0 0;
    max-width: 700px;
    line-height: 1.55;
}

.article {
    padding: 64px 28px 40px;
}

.prose {
    max-width: var(--prose);
    margin: 0 auto;
}

.prose>p {
    color: var(--ink-2);
    margin: 0 0 26px;
}

.prose h2 {
    font-size: clamp(26px, 3vw, 34px);
    margin: 56px 0 20px;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose ul {
    color: var(--ink-2);
    margin: 0 0 26px;
    padding-left: 24px;
}

.prose li {
    margin-bottom: 9px;
}

.prose b,
.prose strong {
    font-weight: 700;
    color: var(--ink);
}

.prose .kicker {
    font-size: 20px;
    color: var(--ink-2);
}

.prose .aside {
    font-size: 15.5px;
    color: var(--muted);
    border-left: 3px solid var(--line-2);
    padding: 2px 0 2px 18px;
    margin: 0 0 26px;
}

.pull {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(24px, 2.8vw, 32px);
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--ink);
    border-left: 4px solid var(--indigo);
    padding: 6px 0 6px 26px;
    margin: 44px 0;
}

.pull .attr {
    display: block;
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 11.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 14px;
}

/* Figures — panels sit slightly wider than the prose column */
.post-fig {
    max-width: 860px;
    margin: 44px auto;
}

.post-fig figcaption {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 16px;
    text-align: center;
}

/* ── Browser frame (same as the landing page) ── */
.frame {
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.frame-bar {
    height: 40px;
    background: linear-gradient(180deg, #fbfafc, #f1eff4);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
}

.frame-bar i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: block;
}

.frame-bar .url {
    margin-left: 14px;
    flex: 1;
    height: 22px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted-2);
    gap: 7px;
}

.frame-body {
    position: relative;
    overflow: hidden;
    background: #fff;
    padding: 24px;
}

/* ── Panel bits reused from the landing page ── */
.leg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.leg-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.01em;
}

.leg-pill {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--muted);
    white-space: nowrap;
}

.leg-pill.red {
    color: var(--red);
    background: rgba(219, 58, 44, .1);
    border-color: rgba(219, 58, 44, .2);
}

.prop-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.prop-row {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.prop-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.prop-law {
    font-weight: 700;
    font-size: 13.5px;
}

.prop-diff {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prop-prev {
    font-size: 13px;
    background: rgba(219, 58, 44, .07);
    color: #b3271b;
    border: 1px solid rgba(219, 58, 44, .18);
    border-radius: 8px;
    padding: 6px 11px;
    text-decoration: line-through;
    text-decoration-color: rgba(179, 39, 27, .45);
}

.prop-arrow {
    color: var(--indigo);
    font-weight: 800;
    flex: none;
}

.prop-next {
    font-size: 13px;
    background: rgba(17, 168, 119, .1);
    color: #0a7d57;
    border: 1px solid rgba(17, 168, 119, .22);
    border-radius: 8px;
    padding: 6px 11px;
    font-weight: 600;
}

.prop-next.bad {
    background: rgba(219, 58, 44, .08);
    color: #b3271b;
    border-color: rgba(219, 58, 44, .2);
}

/* Mood / modifier chips (dashboard style) */
.dash-mods {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dash-mod {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 11px 6px 6px;
}

.dm-ic {
    width: 25px;
    height: 25px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 13px;
    flex: none;
}

/* ── Law option-spectrum panel ─────────────── */
.law-ladder {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.law-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 13.5px;
    font-weight: 600;
    background: var(--paper);
}

.law-opt .lo-tag {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    flex: none;
}

.law-opt.default {
    background: var(--indigo-soft);
    border-color: var(--indigo);
}

.law-opt.default .lo-tag {
    color: var(--indigo);
    font-weight: 700;
}

.law-opt.spicy {
    background: rgba(219, 58, 44, .06);
    border-color: rgba(219, 58, 44, .3);
}

.law-opt.spicy .lo-tag {
    color: var(--red);
    font-weight: 700;
}

/* ── Credit-rating table panel ─────────────── */
.rating-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin-top: 16px;
}

.rating-table th {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--muted);
    text-align: left;
    padding: 0 12px 10px;
    border-bottom: 1px solid var(--line);
}

.rating-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
}

.rating-table tr:last-child td {
    border-bottom: 0;
}

.rating-table .rc {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12.5px;
    white-space: nowrap;
}

.rating-table .rr {
    font-family: var(--font-display);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.rating-table .good .rc { color: var(--green); }
.rating-table .warn .rc { color: #976511; }
.rating-table .bad .rc { color: var(--red); }
.rating-table .bad .rr { color: var(--red); }

.rating-table tr.imf-row {
    background: var(--indigo-soft);
}

.rating-table tr.imf-row td {
    border-top: 1.5px dashed var(--indigo);
}

.rating-table tr.imf-row .rc,
.rating-table tr.imf-row .rr {
    color: var(--indigo);
}

/* ── Post footer / CTA ─────────────────────── */
.post-foot {
    padding: 24px 0 100px;
}

.post-foot-inner {
    max-width: var(--prose);
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.post-foot-inner .back {
    font-weight: 700;
    font-size: 15.5px;
    color: var(--indigo);
}

.cta {
    background:
        radial-gradient(90% 130% at 100% 0%, rgba(71, 51, 230, .55), transparent 55%),
        radial-gradient(80% 120% at 0% 100%, rgba(219, 58, 44, .3), transparent 55%),
        var(--ink);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 64px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta h2 {
    font-size: clamp(30px, 4vw, 48px);
    color: #fff;
    font-weight: 900;
}

.cta p {
    color: #d2cde0;
    font-size: 19px;
    margin: 18px auto 0;
    max-width: 560px;
}

.cta-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.cta-band {
    padding: 0 0 100px;
}

/* ── Footer ────────────────────────────────── */
footer {
    padding: 64px 0 48px;
    border-top: 1px solid var(--line);
}

.foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.foot p {
    color: var(--muted);
    font-size: 14.5px;
    margin: 12px 0 0;
    max-width: 280px;
}

.foot-links {
    display: flex;
    gap: 56px;
    flex-wrap: wrap;
}

.foot-col h5 {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin: 0 0 16px;
}

.foot-col a {
    display: block;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 11px;
    transition: color .15s;
}

.foot-col a:hover {
    color: var(--indigo);
}

.foot-bottom {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted-2);
    font-size: 13.5px;
}

/* ── Reveal animation ──────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 960px) {
    .nav-links {
        display: none;
    }

    .post-item {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 36px 0;
    }

    .post-item-side {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding-top: 0;
    }
}

@media (max-width: 680px) {
    body {
        font-size: 16.5px;
    }

    .wrap {
        padding: 0 20px;
    }

    .blog-head,
    .post-hero {
        padding-top: 56px;
    }

    .article {
        padding: 44px 20px 32px;
    }

    .cta {
        padding: 48px 24px;
    }

    .cta-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-btns .btn {
        width: 100%;
        white-space: normal;
    }

    .frame-body {
        padding: 16px;
    }

    .rating-table th,
    .rating-table td {
        padding-left: 8px;
        padding-right: 8px;
    }

    .foot {
        gap: 28px;
    }

    .foot-links {
        gap: 36px;
    }
}

@media (max-width: 380px) {
    /* As on the landing page: let pills wrap rather than clip */
    .leg-pill,
    .law-opt .lo-tag,
    .prop-vote {
        white-space: normal;
    }
}

@media (max-width: 520px) {
    .nav-inner {
        height: 62px;
    }

    .icon-btn {
        display: none;
    }

    .brand {
        font-size: 20px;
    }

    .brand .chip {
        display: none;
    }

    .nav-right .btn {
        padding: 9px 14px;
        font-size: 14px;
    }

    .btn {
        font-size: 15px;
        padding: 12px 18px;
    }
}
