:root {
    --td-green: #159447;
    --td-red: #c72a26;
    --td-yellow: #c79600;
    --td-blue: #2354b8;

    --td-text: #252525;
    --td-text-muted: #686868;
    --td-background: #ffffff;
    --td-surface: #f7f8f9;
    --td-border: #e2e5e8;
    --td-code-background: #f3f4f6;

    --td-font: Arial, Helvetica, sans-serif;
    --td-font-mono: Consolas, "Courier New", monospace;
    /* Site-wide typography and rhythm: adjust these first. */
    --td-font-size: 15px;
    --td-line-height: 1.45;
    --td-paragraph-spacing: 0.7rem;
    --td-heading-line-height: 1.2;
    --td-heading-h1: 1.8rem;
    --td-heading-h2: 1.45rem;
    --td-heading-h3: 1.2rem;
    --td-font-small: 0.9rem;
    --td-font-lead: 1.05rem;
    /* Shared layout and homepage tuning. */
    --td-sidebar-width: 230px;
    --td-content-width: 1040px;
    --td-article-width: 880px;
    --td-home-content-width: 1100px;
    /* Homepage band controls (current generated HTML, no wrapper changes). */
    /* Hero uses the image's own aspect ratio: wide image = shallow band. */
    --td-home-hero-width: 100%;
    /* Intro starts at its heading and ends before Featured. */
    --td-home-intro-top-space: 1.0rem;
    --td-home-intro-paragraph-gap: 1.0rem;
    --td-home-intro-bottom-space: 1.0rem;
    /* The Featured band can grow when cards contain more content. */
    --td-home-featured-min-height: 420px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--td-background);
    font-size: var(--td-font-size);
}

body {
    margin: 0;
    color: var(--td-text);
    background: var(--td-background);
    font-family: var(--td-font);
    font-size: 1rem;
    line-height: var(--td-line-height);
}

h1,
h2,
h3 {
    color: var(--td-text);
    line-height: var(--td-heading-line-height);
    text-wrap: balance;
}

h1 { font-size: var(--td-heading-h1); }
h2 { font-size: var(--td-heading-h2); }
h3 { font-size: var(--td-heading-h3); 
     margin-top: 28px;
     margin-bottom: 14px;
}
p {
    margin: 0 0 var(--td-paragraph-spacing);
}

a {
    color: var(--td-blue);
    text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
    text-decoration-thickness: 2px;
}

ul,
ol {
    margin: 0 0 1.25rem;
    padding-left: 1.75rem;
}

blockquote {
    margin: 2rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 3px solid var(--td-red);
    color: var(--td-text-muted);
}

code {
    font-family: var(--td-font-mono);
}

pre {
    overflow-x: auto;
    padding: 1rem 1.25rem;
    border: 1px solid var(--td-border);
    border-radius: 6px;
    background: var(--td-code-background);
}

pre code {
    font-size: 0.95rem;
}

table {
    width: 100%;
    margin: 1.5rem 0 2rem;
    border-collapse: collapse;
}

th,
td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--td-border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--td-surface);
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
}

hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 1px solid var(--td-border);
}
