/* Free pattern and reference pages (tools/site-patterns), on top of vintage.css: one Wildflower color per section. */

/* From the tour: a window frame for Studio screens, and the Studio's warning callouts. */
.tr-window { border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 30px 70px -30px #22272b55, 0 0 0 1px #22272b14; }
.tr-bar { height: 30px; background: #ece8e1; display: flex; align-items: center; gap: 7px; padding-left: 12px; }
.tr-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d4cec4; }
.tr-window img { display: block; width: 100%; height: auto; }
.tr-callout { padding: 0.85rem 1rem; background: #fbe9e9; border-left: 4px solid #c0392b; border-radius: 3px; font: 0.86rem/1.55 var(--mono); color: #7a1f17; margin: 0.75rem 0 1rem; }
.tr-callout span { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; margin-bottom: 0.15rem; }
.tr-warn { background: #fbf1dc; border-color: #E8A51E; color: #6d4b06; }

.pt-cover .vp-now { padding-left: 6%; }
.pt-hero { padding-block: 2.5rem 2.25rem; }
.pt-hero .vp-lead { max-width: 44rem; }
.pt-hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 3rem; align-items: center; }
.pt-cta { margin-top: 1.6rem; }
.pt-btn-dark { background: var(--teal); color: #fff; border: 0; }
.pt-btn-line { background: none; border: 1px solid var(--line); color: var(--ink); }
.pt-btn-line:focus-visible, .pt-btn-dark:focus-visible { outline-color: var(--teal); }

.pt-big { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.75rem; max-width: 52rem; }
.pt-big div { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.7rem; align-items: baseline; padding: 1.1rem 1.25rem; background: var(--vp-card); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 4px; }
.pt-big span { font: 600 0.72rem var(--mono); letter-spacing: 0.06em; color: var(--muted); }
.pt-big b { font: 400 1.35rem/1.25 var(--display); }
.pt-big i { grid-column: 1 / -1; font-style: normal; color: var(--c); font: 600 1.1rem var(--mono); padding-block: 0.1rem; }

.pt-text { font-size: 1.02rem; line-height: 1.8; color: var(--muted); max-width: 42rem; }
.pt-text + .pt-text { margin-top: 0.9rem; }
.pt-text a, .pt-list a, .pt-faq a, .pt-fig a { color: var(--teal); }
.pt-h3 { font: 600 1rem/1.4 var(--sans); margin: 2rem 0 0.5rem; }
.pt-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-top: 1.25rem; }
.pt-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 3rem; align-items: center; }
.pt-narrowshot { max-width: 26rem; justify-self: center; width: 100%; }
.pt-wide { margin-top: 2rem; }

.pt-table tbody th { font: 500 0.92rem/1.5 var(--sans); color: var(--ink); text-transform: none; letter-spacing: 0; white-space: normal; }
.pt-table td:nth-child(2) { font: 500 0.92rem/1.5 var(--sans); color: var(--ink); white-space: normal; }
.pt-table td { color: var(--muted); }
.pt-table caption { caption-side: top; text-align: left; font: 600 0.95rem var(--sans); color: var(--ink); padding-bottom: 0.5rem; }
.pt-table td b { color: var(--teal); }
.pt-terms code { font: 500 0.8rem var(--mono); color: var(--teal); background: var(--mist); padding: 0.1rem 0.35rem; border-radius: 3px; margin-left: 0.25rem; white-space: nowrap; }
.pt-terms th[scope="row"] { font-weight: 500; }
.pt-arrow { color: var(--muted); margin-right: 0.5rem; }
.pt-narrow { max-width: 34rem; }

.pt-trouble { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.pt-trouble > div { background: var(--vp-card); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 4px; padding: 1.15rem 1.25rem; }
.pt-trouble h3 { font: 600 1rem/1.35 var(--sans); margin: 0 0 0.35rem; }
.pt-trouble p { font-size: 0.92rem; color: var(--muted); line-height: 1.65; }
.pt-check { margin-top: 1.75rem; max-width: 46rem; }
.pt-check h3 { font: 600 1rem/1.4 var(--sans); margin-bottom: 0.4rem; }
.pt-check p { color: var(--muted); line-height: 1.7; }
.pt-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.pt-links a { color: var(--teal); }

.pt-both { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1.25rem; }
.pt-both figure { margin: 0; background: var(--vp-card); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 4px; padding: 1.1rem 1.25rem; }
.pt-both figcaption { font: 600 0.72rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.pt-both p { line-height: 1.7; }

.pt-steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; counter-reset: pt; }
.pt-steps li { counter-increment: pt; background: var(--vp-card); border: 1px solid var(--line); border-radius: 4px; padding: 1.1rem 1.2rem; font-size: 0.92rem; color: var(--muted); line-height: 1.6; }
.pt-steps li::before { content: counter(pt); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; font: 600 0.9rem var(--mono); margin-bottom: 0.7rem; }
.pt-steps b { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 0.2rem; }
.pt-fig { margin: 0; background: #FFFDF9; border: 1px solid var(--line); border-radius: 4px; padding: 1.25rem; }
.pt-fig img { display: block; width: 100%; height: auto; }
.pt-fig figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }
.pt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.pt-list li { padding-left: 1.4rem; position: relative; line-height: 1.7; color: var(--muted); }
.pt-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.pt-list b { color: var(--ink); }
.pt-faq { margin-top: 1.25rem; max-width: 46rem; border-top: 1px solid var(--line); }
.pt-faq details { border-bottom: 1px solid var(--line); padding-block: 0.9rem; }
.pt-faq summary { font-weight: 600; cursor: pointer; }
.pt-faq p { color: var(--muted); line-height: 1.7; margin-top: 0.5rem; }

@media (max-width: 860px) {
  .pt-hero-split, .pt-two, .pt-split, .pt-both, .pt-big { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .pt-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pt-cover .vp-now { padding-left: 0; }
  .pt-cover .vp-thenandnow { margin: 0; }
}
@media (max-width: 520px) {
  .pt-steps { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .tr-window, .pt-cta, .pt-faq, #check .tr-window { display: none; }
}

/* How to read crochet charts */
.pt-short { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; counter-reset: ps; max-width: 60rem; }
.pt-short li { counter-increment: ps; background: var(--vp-card); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 4px; padding: 0.9rem 1rem; font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.pt-short b { display: block; color: var(--ink); font-size: 0.98rem; margin-bottom: 0.15rem; }
.pt-short b::before { content: counter(ps) ". "; color: var(--c); }
.pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pt-symbols td.pt-sym { width: 52px; padding-right: 0.8rem; vertical-align: middle; }
.pt-symbols td.pt-sym svg { display: block; width: 44px; height: 52px; }
.pt-symbols th[scope="row"], .pt-symbols td { vertical-align: middle; }
.pt-chartread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-top: 1.25rem; }
.pt-key { list-style: none; padding: 0.9rem 0 0; margin: 0.9rem 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.pt-key li { display: flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }
.pt-key svg { width: 30px; height: 36px; flex: none; }
.pt-mini li { padding-block: 0.7rem; }
.pt-mini p { font-size: 0.92rem; }
@media (max-width: 600px) {
  .pt-symbols thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pt-symbols tr { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 0.6rem; padding-block: 0.6rem; border-top: 1px solid var(--line); }
  .pt-symbols td, .pt-symbols th { border: 0; padding: 0; }
  .pt-symbols td.pt-sym { grid-row: span 3; width: auto; }
  .pt-symbols td:nth-child(3)::before { content: "UK: "; }
}
@media (max-width: 860px) {
  .pt-chartread { grid-template-columns: minmax(0, 1fr); }
  .pt-short { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}


/* Crochet hook sizes */
.hk-none { color: var(--muted); font-style: italic; }
.hk-flag { display: inline-block; margin-left: 0.4rem; font: 600 0.68rem var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pt-table tr.hk-same td { color: var(--ink); }
.hk-vintage { max-width: 52rem; }
.hk-vintage td b { color: var(--ink); font-weight: 600; }
.hk-bar-cell { width: 40%; min-width: 9rem; }
.hk-track { position: relative; display: block; height: 0.6rem; border-radius: 999px; background: var(--line); }
.hk-range { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: #E9773A; opacity: 0.55; }
.hk-mark { position: absolute; top: -0.2rem; width: 0.2rem; height: 1rem; margin-left: -0.1rem; border-radius: 1px; background: var(--ink); }
.hk-scale { display: flex; justify-content: space-between; font: 500 0.68rem var(--mono); color: var(--muted); text-transform: none; letter-spacing: 0; }
.hk-sources { margin: 1rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; font-size: 0.92rem; line-height: 1.5; }
@media (max-width: 40rem) { .hk-bar-cell { display: none; } }
.hk-vintage td { white-space: nowrap; }

/* Stitch pages */
.pt-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt-facts div:nth-child(odd) { padding-left: 0; border-left: 0; }
.pt-facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
.pt-howwords { margin: 2.25rem 0 0; font-size: 1.15rem; }
.pt-howlist { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.8rem; counter-reset: hw; max-width: 46rem; }
.pt-howlist li { counter-increment: hw; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.9rem; align-items: start; line-height: 1.75; }
.pt-howlist li::before { content: counter(hw); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--c); color: #fff; font: 600 0.9rem var(--mono); }

/* Reference pages: abbreviations, symbols, writing a pattern */
.pt-one { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
.pt-howlist li > span b { color: var(--ink); }
.pt-code { margin: 0; padding: 1.4rem; background: #1b1f22; color: #d9e4e2; border-radius: 6px; font: 0.85rem/1.7 var(--mono); overflow: auto; }
.pt-example { align-items: start; }
.pt-lead code, .vp-lead code, .pt-text code { font: 500 0.9em var(--mono); color: var(--teal); background: var(--mist); padding: 0.05rem 0.3rem; border-radius: 3px; }

/* Free patterns index and the beginners page */
.pt-cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1.1rem; }
.hm-card { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; background: #fffdf9; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 6px; padding: 1rem 1.1rem 1.2rem; text-decoration: none; color: var(--ink); }
.hm-card:hover { border-color: var(--c); }
.hm-card-img { display: grid; place-items: center; aspect-ratio: 1 / 0.8; margin-bottom: 0.4rem; overflow: hidden; }
.hm-card-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.hm-card b { font: 400 1.25rem/1.25 var(--display); }
.hm-card-text { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.pt-trouble h3 a { color: inherit; }
.pt-stitches { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.1rem; }
.pt-stitch { position: relative; display: flex; flex-direction: column; gap: 0.3rem; height: 100%; background: #fffdf9; border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.1rem 1.2rem; text-decoration: none; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.pt-stitch:hover { border-color: var(--teal); }
.pt-stitch img { width: 100%; height: auto; border-radius: 4px; margin-bottom: 0.4rem; }
.pt-stitch b { font: 400 1.25rem/1.25 var(--display); color: var(--ink); }
.pt-stitch b span { color: var(--teal); font-size: 0.95rem; }
.pt-uk { font: 0.75rem/1.4 var(--mono); color: var(--muted); }
.pt-turn { color: var(--ink); }
.pt-step-n { position: absolute; top: 0.6rem; left: 0.6rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--teal); color: #fff; font: 600 0.85rem var(--mono); }
/* Choosing a crochet hook */
.ch-heads { display: block; width: 100%; height: auto; }
#handles .pt-list, #sore-hands .pt-list, #materials .pt-list { max-width: 46rem; }
@media (max-width: 520px) { .pt-short { grid-template-columns: minmax(0, 1fr); } }
#start .pt-short b::before { color: var(--ink); }
@media print { .pt-faq.ch-faq { display: block; } .ch-faq details { display: block; } }

/* Crochet hook for granny squares */
.gh-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: end; margin: 1.5rem 0; max-width: 52rem; }
.gh-sq { margin: 0; text-align: center; }
.gh-sq-box { display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 1; }
.gh-sq img { display: block; height: auto; }
.gh-sq figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.45; }
.gh-sq figcaption b { color: var(--ink); }
#flat .pt-list, #match .pt-list, #four-hooks .pt-list { max-width: 46rem; }
@media (max-width: 720px) { .gh-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gh-nw { white-space: nowrap; }
#four-hooks .pt-short b::before { color: var(--ink); }
#by-project .pt-list, #dk-worsted .pt-list { max-width: 46rem; }
#by-project .pt-short b::before { color: var(--ink); }
@media (max-width: 560px) {
  .dk-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .dk-weights { table-layout: fixed; width: 100%; font-size: 0.85rem; }
  .dk-weights th[scope="row"] { width: 34%; }
  .dk-weights th, .dk-weights td { padding-inline: 0.3rem; white-space: normal; }
  .dk-stack tr { display: grid; grid-template-columns: minmax(0, 1fr); padding-block: 0.6rem; border-bottom: 1px solid var(--line); }
  .dk-stack th, .dk-stack td { border: 0; padding: 0.1rem 0; }
  .dk-stack td:empty { display: none; }
}
.dk-weights td { font: 400 0.92rem/1.5 var(--sans); color: var(--muted); }
.dk-weights td:nth-child(3) { font-weight: 600; color: var(--ink); }
/* More crochet guides, at the foot of each guide */
.guide-links { list-style: none; padding: 0; margin: 0.5rem 0 1.25rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.guide-links a { display: block; height: 100%; padding: 1rem 1.2rem; background: var(--vp-card); border: 1px solid var(--line); border-left: 4px solid var(--vp-gold); border-radius: 4px; color: var(--ink); text-decoration: none; font: 400 1.15rem/1.3 var(--display); }
.guide-links li:nth-child(2) a { border-left-color: var(--vp-magenta); }
.guide-links li:nth-child(3) a { border-left-color: var(--vp-tangerine); }
.guide-links li:nth-child(4) a { border-left-color: var(--vp-leaf); }
.guide-links a:hover { text-decoration: underline; }
@media (max-width: 520px) { .guide-links { grid-template-columns: 1fr; } }
