:root {
    --ink: #163e43;
    --teal: #08665f;
    --coral: #c44835;
    --blue: #2754b9;
    --gold: #e8ac26;
    --purple: #76529e;
    --muted: #526a70;
    --border: #dce5e6;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.7;
}

a {
    color: var(--teal);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

a:hover {
    color: #074a45;
}

a:focus-visible, summary:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 5px;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

figure {
    margin: 0;
    min-width: 0;
}

figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

p {
    margin: 0 0 1.1em;
}

h1, h2, h3, h4 {
    line-height: 1.15;
    margin: 0 0 .65em;
}

h1, h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
}

h1 {
    font-size: clamp(42px, 5vw, 66px);
    letter-spacing: -.035em;
}

h2 {
    font-size: clamp(32px, 3.7vw, 47px);
    letter-spacing: -.025em;
}

h3 {
    font-size: 23px;
    line-height: 1.3;
}

h4 {
    font-size: 22px;
    line-height: 1.3;
}

ul {
    padding-left: 1.25em;
}

li {
    margin-bottom: .65em;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 10;
    padding: 12px 20px;
    background: #fff;
}

.skip-link:focus {
    top: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    border-top: 6px solid var(--teal);
    border-bottom: 1px solid var(--border);
}

.header-inner, .page-shell, .site-footer > div {
    width: min(1180px, calc(100% - 64px));
    margin-inline: auto;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-block: 22px;
}

.wordmark {
    font: bold 29px Georgia, serif;
    text-decoration: none;
}

.wordmark span {
    display: block;
    margin-top: 7px;
    font: 12px Arial, sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.header-inner nav {
    display: flex;
    gap: 26px;
    font-size: 15px;
}

.header-inner nav a {
    text-decoration: none;
    font-weight: bold;
}

.breadcrumbs {
    padding-block: 24px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    margin: 0;
}

.breadcrumbs li + li::before {
    content: '›';
    margin-right: 12px;
    color: var(--muted);
}

.hero {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 38px;
    align-items: center;
    padding: 30px 0 42px;
}

.eyebrow {
    font-size: 12px;
    line-height: 1.5;
    font-weight: bold;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 12px;
}

.hero-intro {
    font-size: 21px;
    line-height: 1.5;
}

.hero-copy > p:not(.eyebrow) {
    max-width: 55ch;
}

.hero-figure img {
    border-radius: 36px 5px 5px 5px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    margin-top: 26px;
}

.button {
    background: var(--teal);
    color: #fff;
    padding: 12px 20px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: bold;
}

.button:hover {
    background: #074a45;
    color: #fff;
}

.text-action {
    font-size: 15px;
    font-weight: bold;
}

.guide-section {
    padding-block: 70px 0;
    scroll-margin-top: 24px;
}

.section-heading {
    max-width: 900px;
    margin-bottom: 30px;
}

.section-heading .eyebrow {
    color: var(--teal);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 30px;
}

.split > * {
    min-width: 0;
}

.split figure img {
    border-radius: 5px;
}

.internal-callout {
    margin-block: 30px;
    background: #edf6f2;
    border-left: 4px solid var(--teal);
    padding: 24px 28px;
}

.internal-callout .eyebrow {
    color: var(--teal);
}

.internal-callout p {
    max-width: 85ch;
}

.internal-callout a {
    font-weight: bold;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-block: 30px;
}

.method-grid article {
    padding: 25px 22px 10px;
    background: #eff6f6;
    border-top: 4px solid var(--teal);
}

.method-grid article:nth-child(2) {
    background: #fff1ec;
    border-color: var(--coral);
}

.method-grid article:nth-child(3) {
    background: #f4f0f8;
    border-color: var(--purple);
}

.method-tag {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: bold;
}

.editorial-note {
    padding-left: 24px;
    border-left: 4px solid var(--gold);
    margin-block: 30px;
}

.calculation {
    padding: 28px 32px;
    background: #f4f0f8;
    margin-block: 30px;
    border-top: 4px solid var(--purple);
}

.calculation .eyebrow {
    color: #674588;
}

.calculation h3 {
    font-size: clamp(23px, 3vw, 31px);
}

.tools-layout {
    margin-top: 32px;
}

.troubleshooting {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 36px;
    margin-block: 24px 32px;
}

.troubleshooting > div {
    padding-block: 18px;
    border-top: 1px solid var(--border);
}

dt {
    font-weight: bold;
    margin-bottom: 8px;
}

dd {
    margin: 0;
}

.resources {
    margin-top: 38px;
    background: #edf3ff;
    padding: 28px;
    border-top: 4px solid var(--blue);
    scroll-margin-top: 24px;
}

.resources-heading {
    margin-bottom: 22px;
}

.resources-heading .eyebrow {
    color: var(--blue);
}

.resources-heading h3 {
    font-family: Georgia, serif;
    font-size: 29px;
    margin-bottom: 8px;
}

.resources-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.resource-grid > :only-child {
    grid-column: 1 / -1;
}

.resource-card {
    background: #fff;
    padding: 24px;
    border: 1px solid #d6e1f6;
    border-radius: 4px;
}

.resource-source {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 3px 12px;
    margin-bottom: 18px;
}

.resource-source strong {
    color: var(--blue);
    font-size: 18px;
}

.resource-source span {
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.resource-type {
    color: #3d5680;
    font-size: 13px;
    margin-bottom: 8px;
}

.resource-card p:not(.resource-type) {
    font-size: 16px;
}

.resource-card a {
    color: var(--blue);
    font-weight: bold;
    font-size: 16px;
}

.continuation {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 25px;
    border-block: 1px solid var(--border);
    padding-block: 23px;
    margin-top: 34px;
}

.continue-link {
    text-decoration: none;
    font-weight: bold;
    max-width: 60%;
}

.continue-link small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: normal;
    margin-bottom: 4px;
}

.project-chooser {
    width: 240px;
    max-width: 100%;
    font-size: 15px;
    color: var(--teal);
}

.project-chooser summary {
    cursor: pointer;
    font-weight: bold;
    padding: 4px 0;
}

.project-chooser nav {
    display: grid;
    gap: 8px;
    padding: 15px 0 0 16px;
}

.project-chooser a {
    padding-block: 3px;
}

.site-footer {
    margin-top: 70px;
    padding-block: 36px;
    background: #123e42;
    color: #dae8e7;
}

.site-footer a {
    color: #fff;
}

.site-footer > div > a {
    font: 25px Georgia, serif;
    text-decoration: none;
}

.site-footer p {
    margin-block: 12px;
    font-size: 15px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 26px;
    }
    .hero-copy {
        max-width: 730px;
    }
    .hero-figure img {
        border-radius: 4px 35px 4px 4px;
    }
    .method-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .split {
        gap: 26px;
    }
}

@media (max-width: 680px) {
    body {
        font-size: 16px;
    }
    .header-inner, .page-shell, .site-footer > div {
        width: calc(100% - 36px);
    }
    .header-inner {
        align-items: start;
        flex-direction: column;
        gap: 17px;
    }
    .header-inner nav {
        gap: 24px;
    }
    .breadcrumbs {
        font-size: 12px;
        padding-block: 20px 8px;
    }
    .hero {
        padding-top: 24px;
    }
    .hero-intro {
        font-size: 19px;
    }
    .guide-section {
        padding-top: 48px;
    }
    .split, .resource-grid, .troubleshooting {
        grid-template-columns: 1fr;
    }
    .resources {
        padding: 20px 16px;
    }
    .resource-card {
        padding: 20px 16px;
    }
    .internal-callout, .calculation {
        padding: 22px 20px;
    }
    .continuation {
        flex-direction: column;
        gap: 20px;
    }
    .continue-link {
        max-width: 100%;
    }
    .project-chooser {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.orientation-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 24px 28px;
    background: #fff1ec;
    border-bottom: 4px solid var(--coral);
}

.orientation-strip p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.orientation-strip strong {
    display: block;
    margin-bottom: 4px;
}

.stitch-grid, .text-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 36px;
    margin-block: 28px;
}

.stitch-grid > div {
    border-top: 2px solid var(--gold);
    padding-top: 22px;
}

.stitch-grid h4 {
    font-size: 21px;
}

.starting-points {
    border-left: 4px solid var(--purple);
    background: #f5f2f8;
    padding: 25px 28px 8px;
    margin-block: 30px;
}

.swatch-layout {
    margin-top: 36px;
}

.progress-layout figure {
    width: min(100%, 390px);
    margin-inline: auto;
}

.troubleshooting > div:last-child {
    grid-column: 1 / -1;
}

@media (max-width: 680px) {
    .orientation-strip, .stitch-grid, .text-pair {
        grid-template-columns: 1fr;
    }
    .orientation-strip {
        gap: 17px;
        padding: 22px;
    }
    .starting-points {
        padding: 22px 20px;
    }
}

