:root {
  color-scheme: light;
  --ink: #262139;
  --muted: #5f5870;
  --paper: #fffefe;
  --wash: #f3f0fa;
  --edge: #dad3e8;
  --carbon: #492d86;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--wash);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--carbon); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid #7351bf; outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 5; padding: .65rem; transform: translateY(-200%); background: var(--paper); }
.skip:focus { transform: translateY(0); }
.masthead { border-bottom: 1px solid var(--edge); background: var(--paper); }
.masthead-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.masthead nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: .6rem 1.3rem; }
.masthead nav a, .site-footer nav a { font-size: .9rem; text-decoration: none; }
.masthead nav a:hover, .site-footer nav a:hover { text-decoration: underline; }
.wordmark, .footer-brand { color: var(--ink); font-weight: 760; letter-spacing: -.04em; text-decoration: none; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.2rem; }
.mark { position: relative; width: 30px; height: 30px; flex: none; border-radius: 7px; background: var(--carbon); }
.mark::before { content: ""; position: absolute; inset: 6px 8px 9px 9px; border: 1.5px solid white; border-radius: 2px; }
.mark::after { content: ""; position: absolute; width: 16px; height: 4px; left: 7px; bottom: 6px; background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 4px); }
.intro { padding-block: clamp(1.6rem, 4.75vw, 3.55rem) clamp(1.25rem, 3vw, 2.25rem); }
.intro h1, .policy h1 {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(2.15rem, 5.2vw, 4rem);
  letter-spacing: -.06em;
  line-height: 1.01;
  text-wrap: balance;
}
.intro p { max-width: 70ch; margin: .85rem 0 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.55; text-wrap: pretty; }
.tool-wrap, .print-guide { scroll-margin-top: 1rem; }
.print-guide { padding-block: clamp(2.75rem, 6vw, 5.5rem); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); }
.guide-copy, .faq { font-size: 1rem; line-height: 1.65; }
.guide-copy :is(h2,h3), .faq h2 { line-height: 1.2; letter-spacing: -.035em; }
.guide-copy h2, .faq h2 { margin: 0 0 .9rem; font-size: 1.75rem; }
.guide-copy h3 { margin: 1.5rem 0 .5rem; font-size: 1.14rem; }

.guide-copy p, .guide-copy ul, .guide-copy ol { margin: 0 0 .9rem; }
.guide-copy ol, .guide-copy ul { padding-left: 1.35rem; }
.guide-copy li + li { margin-top: .45rem; }
.faq details { border-top: 1px solid var(--edge); padding-block: .85rem; }
.faq details:last-child { border-bottom: 1px solid var(--edge); }
.faq summary { cursor: pointer; font-weight: 680; }
.faq details p { margin: .55rem 0 0; color: var(--muted); }
.site-footer { background: var(--paper); border-top: 1px solid var(--edge); }
.footer-inner { min-height: 68px; }
.policy { max-width: 720px; padding-block: 3.5rem 4.5rem; }
.policy h1 { margin-bottom: 1.5rem; }
.policy h2 { margin-top: 1.65rem; font-size: 1.35rem; }
@media (max-width: 700px) {
  .wrap { width: calc(100% - 1.75rem); }
  .masthead-inner { min-height: 55px; }
  .masthead nav { gap: .75rem; }
  .masthead nav a { font-size: .82rem; }
  .print-guide { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 520px) {
  .masthead-inner { flex-direction: column; align-items: flex-start; gap: .35rem; padding-block: .55rem; }
  .masthead nav a { display: inline-flex; align-items: center; min-height: 32px; }
}


.guide-page { padding-bottom: clamp(3rem, 7vw, 5rem); }
.guide-page .guide-column { max-width: 780px; }
.guide-page .intro { padding-bottom: clamp(1.6rem, 4vw, 2.5rem); }
.guide-page .tool-wrap + .guide-copy { padding-top: clamp(2rem, 4.5vw, 3.5rem); }
.guide-page .guide-copy h2 { margin-top: 2rem; }
.guide-page .guide-copy h2:first-child { margin-top: 0; }
.guide-copy img { display: block; max-width: 100%; height: auto; }


.stencil-library, .stencil-design { padding-bottom: clamp(3rem, 8vw, 5.5rem); }
.stencil-library > .guide-copy { max-width: 67ch; }
.stencil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 1rem; list-style: none; margin: 1.75rem 0 0; padding: 0; }
.stencil-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--edge); border-radius: .75rem; background: var(--paper); color: var(--ink); text-decoration: none; overflow: clip; }
.stencil-card:hover { border-color: var(--carbon); }
.stencil-card:hover .stencil-card-title { text-decoration: underline; }
.stencil-card-art { --art-inset: 1.25rem; position: relative; flex: none; aspect-ratio: 6/5; background: white; border-bottom: 1px solid var(--edge); }
.stencil-card-art img { position: absolute; inset: var(--art-inset); width: calc(100% - 2 * var(--art-inset)); height: calc(100% - 2 * var(--art-inset)); object-fit: contain; }
.stencil-card-title { font-weight: 700; margin: .8rem 1rem .2rem; }
.stencil-card-detail { margin: 0 1rem 1rem; font-size: .88rem; line-height: 1.4; color: var(--muted); }
.library-back { display: inline-block; margin-bottom: 1rem; font-size: .9rem; }
.stencil-design-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
.stencil-download-panel { display: grid; justify-items: center; gap: 1rem; border: 1px solid var(--edge); border-radius: .75rem; background: var(--paper); padding: clamp(1.25rem, 4vw, 2.5rem); }
.stencil-download-panel img { width: 100%; max-width: 300px; max-height: 340px; height: auto; object-fit: contain; }
.stencil-download { background: var(--carbon); color: white; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; border-radius: .5rem; padding: .6rem 1rem; font-weight: 650; text-decoration: none; }
.stencil-download:hover { background: #36216a; }
@media (max-width: 700px) {
  .stencil-design-columns { grid-template-columns: 1fr; }
  .stencil-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .stencil-card-art { --art-inset: .7rem; }
  .stencil-card-title { margin-inline: .65rem; }
  .stencil-card-detail { margin-inline: .65rem; }
}


.stencil-resources { margin-top: 2rem; line-height: 1.5; }
.stencil-resources h2 { margin: 0 0 .65rem; font-size: 1.2rem; letter-spacing: -.025em; }
.stencil-resources ul { padding-left: 1.2rem; margin: 0; }
.stencil-resources li + li { margin-top: .45rem; }


.guide-copy img:is([src*="artwork-to-linework."], [src*="print-multi-sheet."], [src*="a4-actual-size."]) { width: 100%; aspect-ratio: 30/17; object-fit: cover; border: 1px solid var(--edge); border-radius: .65rem; }
.guide-copy p:has(> img + img) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.guide-copy p:has(> img) + p > em { display: block; color: var(--muted); font-size: .88rem; }


/* polish pass 2026-11-21 */
.masthead nav a { color: var(--ink); }
.masthead nav a:hover { color: var(--carbon); }
.guide-copy p:has(> img) { margin-inline: 0; padding: .6rem; background: var(--paper); border: 1px solid var(--edge); border-radius: 14px; }
.guide-copy p:has(> img) img { display: block; border-radius: 10px; }
.guide-copy em { color: #3a3350; }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-weight: 700; color: var(--carbon); font-size: 1.15rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.stencil-art--svg { margin: 0 0 .9rem; background: #fff; }
.stencil-art--svg svg { display: block; width: 100%; height: auto; }
.stencil-art-note { margin: .1rem 0 .8rem; font-size: .82rem; color: var(--muted); }
button.stencil-download { width: 100%; border: 0; cursor: pointer; }
.stencil-related { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--edge); }
.stencil-related h2 { font-size: 1.05rem; margin: 0 0 .9rem; }
.stencil-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem 1.4rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stencil-related li { font-size: .95rem; }
.stencil-related a { font-weight: 620; text-decoration: none; }
.stencil-related a:hover { text-decoration: underline; }
.stencil-related span { display: block; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.stencil-card-art svg { display: block; width: 100%; height: auto; }
@media (max-width: 640px) {
  .tool-wrap .ss-import { display: grid; grid-template-columns: 1fr; gap: .6rem; }
  .tool-wrap .ss-import-start { flex-direction: column; align-items: stretch; gap: .55rem; }
  .tool-wrap .ss-import-start .ss-button { width: 100%; }
  .tool-wrap .ss-import-start .ss-text-button { justify-self: center; }
  .tool-wrap .ss-measure { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; }
  .tool-wrap .ss-measure strong { white-space: nowrap; }
}


/* design review pass 2 (2026-11-21) */
.guide-copy h2 { margin-top: 3rem; }
.guide-copy > h2:first-child { margin-top: 0; }
.guide-copy p { max-width: 70ch; margin-bottom: 1.2em; }
.stencil-art-note { font-size: .875rem; line-height: 1.5; color: #6b7280; margin: .75rem 0 0; }
.stencil-related { margin-top: 5rem; padding: 2rem 1.6rem; background: #f7f5fb; border-radius: 16px; border-top: 0; }
.stencil-related ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem 2rem; }
@media (max-width: 900px) { .stencil-related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .stencil-related ul { grid-template-columns: 1fr; } .stencil-design .intro h1 { font-size: 2.25rem; letter-spacing: -.02em; } .stencil-design .intro { margin-bottom: 1rem; } }


/* library + review pass 3 (2026-11-21) */
.guide-copy a { text-underline-offset: 3px; }
.stencil-library .guide-copy { font-size: 1rem; line-height: 1.65; }
.stencil-grid li { display: flex; }
.stencil-card { display: flex; flex-direction: column; height: 100%; }
.stencil-card-art { display: flex; align-items: center; justify-content: center; background: #f8f8fa; border-radius: 12px; overflow: hidden; }
.stencil-card-art img, .stencil-card-art svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.stencil-card-title { font-size: .96rem; line-height: 1.35; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stencil-card-detail { font-size: .84rem; line-height: 1.45; }
@media (max-width: 600px) {
  .stencil-library .intro { margin-bottom: 1.2rem; }
  .stencil-library .guide-copy p { margin-bottom: .9em; }
  .stencil-card-art { aspect-ratio: 4 / 3; }
}


/* final polish (2026-11-21) */
.guide-copy p { line-height: 1.75; margin-bottom: 1.4em; }
.stencil-download { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.stencil-art-note { margin-top: .8rem; color: #666; }
.stencil-related ul { gap: 1rem 1.25rem; }
.stencil-related li { background: #fff; border: 1px solid var(--edge); border-radius: 12px; padding: 1rem 1.1rem; }
@media (max-width: 600px) {
  .masthead-inner { flex-wrap: wrap; padding-block: .6rem; row-gap: .3rem; }
  .masthead nav { gap: .35rem 1rem; width: 100%; }
  .masthead nav a { font-size: .85rem; }
}


/* about / guide pass (2026-11-21) */
.guide-page .guide-column { width: min(760px, calc(100% - 3rem)); margin-inline: auto; }
.guide-cta { margin: 2.5rem 0 0; }
.guide-cta a { display: inline-flex; align-items: center; justify-content: center; padding: .85rem 1.5rem; border-radius: 999px; background: var(--carbon); color: #fff; font-weight: 620; text-decoration: none; }
.guide-cta a:hover { background: #3a2169; }
.site-footer { background: var(--paper); border-top: 1px solid var(--edge); padding-block: 1.6rem; margin-top: 4rem; }
@media (max-width: 768px) {
  h1 { font-size: clamp(1.75rem, 7.5vw, 2.5rem); }
  .guide-page .guide-column { width: calc(100% - 2.5rem); }
  .site-footer { margin-top: 3rem; padding-block: 1.2rem; }
  .site-footer nav { gap: .5rem 1.1rem; }
}


/* about pass 3 (2026-11-21) */
.guide-page .guide-column { display: block; width: min(820px, calc(100% - 3rem)); margin-left: auto; margin-right: auto; }
.guide-cta a { padding: .95rem 1.9rem; }
.site-footer { padding-block: 2.4rem; }
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .masthead-inner { flex-direction: column; align-items: flex-start; gap: .55rem; padding-block: .8rem; }
  .masthead nav { width: 100%; gap: .5rem 1.1rem; }
  .site-footer { padding-block: 1.6rem; }
}


/* mobile header final (2026-11-21) */
@media (max-width: 768px) {
  .masthead-inner { padding-block: .55rem; gap: .35rem; }
  .masthead nav { gap: .25rem .85rem; }
  .masthead nav a { font-size: .8rem; }
  .intro h1 { font-size: 2rem; margin-bottom: .4rem; }
  .guide-copy h2 { font-size: 1.4rem; }
}
