/*
Theme Name: Sewing Machine for Beginners
Template: aff-base
Description: Friendly craft-room look for sewing-machine-for-beginners.com: blush pink, thread teal and dashed stitch lines.
Version: 1.0.0
*/

:root {
	--bg: #fdf7f5;
	--surface: #ffffff;
	--surface-2: #f9e7e4;
	--ink: #2b2230;
	--ink-2: #4d4354;
	--muted: #7b6f7f;
	--line: #f0dcd8;
	--accent: #0d7175;
	--accent-ink: #ffffff;
	--accent-soft: #dcefee;
	--accent-2: #c4446b;
	--blush: #f4c9c6;
	--blush-deep: #e7a3a6;
	--plum: #2b1f2e;
	--good: #1d7a55;
	--bad: #b23a48;
	--radius: 20px;
	--radius-sm: 12px;
	--shadow: 0 1px 2px rgba(60, 30, 50, .05), 0 10px 26px rgba(60, 30, 50, .08);
	--font-display: "DM Serif Display", Georgia, serif;
	--font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--display-weight: 400;
	--display-tracking: -0.005em;
	--stitch: repeating-linear-gradient(90deg, var(--accent) 0 9px, transparent 9px 15px);
	--stitch-v: repeating-linear-gradient(180deg, var(--accent) 0 9px, transparent 9px 15px);
}

/* ---------- Header: a blush hem band with a running stitch ---------- */
.site-header { background: color-mix(in srgb, #ffffff 94%, transparent); border-bottom: 0; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: var(--blush); pointer-events: none; }
.site-header::before { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--stitch); z-index: 1; pointer-events: none; }
.brand__name { font-size: 22px; }
.brand__name::first-letter { color: var(--accent-2); }
.nav__list a { font-weight: 500; }
.nav__list a:hover, .nav__list .current-menu-item a { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--blush-deep); }
.btn { border-radius: 14px; }
.btn--primary { box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--accent); }
.btn--ghost { border-style: dashed; border-color: var(--accent); color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; border-style: solid; }
.kicker { color: var(--accent-2); }

/* ---------- Hero: polka-dot fabric with a stitched panel ---------- */
.hero { position: relative; border-bottom: 0; padding: 76px 0 70px; background:
	radial-gradient(circle at 12px 12px, rgba(196, 68, 107, .12) 2.2px, transparent 2.8px) 0 0 / 24px 24px,
	linear-gradient(180deg, #fbe9e6 0%, var(--bg) 100%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--stitch); opacity: .7; }
.hero__copy { position: relative; padding: 34px 32px 32px; background: rgba(255, 255, 255, .86); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero__copy::before { content: ""; position: absolute; inset: 9px; border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: calc(var(--radius) - 8px); pointer-events: none; }
.hero__title { font-size: clamp(38px, 5vw, 62px); line-height: 1.06; }
.hero__title em { font-style: italic; color: var(--accent-2); }
.hero__text { font-size: 18.5px; }
.hero__art { filter: drop-shadow(0 18px 24px rgba(80, 30, 50, .10)); }

/* ---------- Section headings get a tacked-on stitch ---------- */
.section__head h2 { position: relative; padding-bottom: 10px; }
.section__head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 84px; height: 2px; background: var(--stitch); }

/* ---------- Silo tiles: fabric swatches with pinked tops ---------- */
.silos__grid { gap: 18px; }
.silo { position: relative; padding: 26px 22px 22px; border: 0; border-radius: 6px 6px var(--radius) var(--radius); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.silo::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 8px; background: linear-gradient(135deg, transparent 50%, var(--blush) 50%) 0 0 / 12px 8px, linear-gradient(225deg, transparent 50%, var(--blush) 50%) 0 0 / 12px 8px; }
.silo::after { content: ""; position: absolute; inset: 8px; border: 1.5px dashed var(--blush-deep); border-radius: 4px 4px calc(var(--radius) - 6px) calc(var(--radius) - 6px); pointer-events: none; transition: border-color .15s; }
.silo:nth-child(even)::before { background: linear-gradient(135deg, transparent 50%, var(--accent-soft) 50%) 0 0 / 12px 8px, linear-gradient(225deg, transparent 50%, var(--accent-soft) 50%) 0 0 / 12px 8px; }
.silo:hover { box-shadow: var(--shadow); }
.silo:hover::after { border-color: var(--accent); }
.silo__icon { width: 62px; height: 62px; padding: 11px; border-radius: 50%; background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px var(--blush-deep); }
.silo:nth-child(even) .silo__icon { background: var(--accent-soft); }
.silo__name { font-size: 21px; }

/* ---------- Cards ---------- */
.card__link { border-radius: var(--radius); }
.card__link:hover { border-color: transparent; box-shadow: var(--shadow), inset 0 0 0 2px var(--surface), inset 0 0 0 3.5px var(--blush-deep); }
.card--lg .card__link { background: linear-gradient(160deg, #fbe4e1, var(--surface) 62%); }
.card__icon { color: var(--accent-2); }
.card__more { color: var(--accent); }

.teaser__inner { position: relative; background: var(--accent-soft); }
.teaser__inner::before { content: ""; position: absolute; inset: 12px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); border-radius: calc(var(--radius) * 1.6 - 10px); pointer-events: none; }

.promise__item { border-top: 0; position: relative; padding-top: 30px; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); }
.promise__item::before { content: ""; position: absolute; left: 24px; right: 24px; top: 14px; height: 2px; background: repeating-linear-gradient(90deg, var(--accent-2) 0 9px, transparent 9px 15px); }

/* ---------- Article bits ---------- */
.article__head { background: linear-gradient(180deg, #fbebe8, var(--bg)); border-bottom: 0; position: relative; }
.article__head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--stitch); opacity: .55; }
.silo-head { background: radial-gradient(circle at 12px 12px, rgba(13, 113, 117, .09) 2.2px, transparent 2.8px) 0 0 / 24px 24px, linear-gradient(180deg, #fbebe8, var(--bg)); }
.prose h2 { padding-bottom: 8px; background: repeating-linear-gradient(90deg, var(--blush-deep) 0 8px, transparent 8px 13px) left bottom / 100% 2px no-repeat; }
.prose blockquote { border-left: 0; padding-left: 22px; background: var(--stitch-v) left top / 2px 100% no-repeat; }
.aff-toc li a.is-active { border-left-color: var(--accent-2); }

/* Quick picks: sewing-button bullets */
.quick-picks { border: 0; box-shadow: 0 0 0 1px var(--line); position: relative; }
.quick-picks li { position: relative; padding-left: 56px; }
.quick-picks li::before { content: ""; position: absolute; left: 18px; top: 17px; width: 22px; height: 22px; border-radius: 50%;
	background:
		radial-gradient(circle at 38% 38%, var(--surface) 0 1.6px, transparent 2px),
		radial-gradient(circle at 62% 38%, var(--surface) 0 1.6px, transparent 2px),
		radial-gradient(circle at 38% 62%, var(--surface) 0 1.6px, transparent 2px),
		radial-gradient(circle at 62% 62%, var(--surface) 0 1.6px, transparent 2px),
		var(--accent);
	box-shadow: inset 0 0 0 2.5px color-mix(in srgb, #000 14%, var(--accent)); }
.quick-picks li:nth-child(3n+2)::before { background-color: var(--accent-2); box-shadow: inset 0 0 0 2.5px color-mix(in srgb, #000 14%, var(--accent-2)); }
.quick-picks li:nth-child(3n+3)::before { background-color: #e9a23b; box-shadow: inset 0 0 0 2.5px #c7832a; }

/* Product box: a stitched label tag */
.aff-product { position: relative; border: 0; box-shadow: 0 0 0 1.5px var(--line), var(--shadow); }
.aff-product::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed var(--blush-deep); border-radius: calc(var(--radius) - 6px); pointer-events: none; }
.aff-product__icon { border-radius: 50%; background: var(--surface-2); color: var(--accent-2); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px var(--blush-deep); }
.aff-product__badge { background: var(--accent); }
.aff-product__btn, .aff-cta__btn { border-radius: 12px; position: relative; z-index: 1; }
.aff-cta { border-left: 0; background: var(--surface) var(--stitch-v) 10px 12px / 2px calc(100% - 24px) no-repeat; padding-left: 30px; }

.faq summary::after { color: var(--accent-2); }

/* ---------- Footer: plum, stitched hem ---------- */
.site-footer { position: relative; background: var(--plum); color: #e9dbe2; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: repeating-linear-gradient(90deg, var(--blush) 0 9px, transparent 9px 15px); opacity: .6; }
.site-footer .brand__mark { color: var(--blush); }
.site-footer a:hover { color: #fff; }
.site-footer__legal { border-top: 1px dashed rgba(244, 201, 198, .3); }

/* ==================================================================
 * Tools
 * ================================================================== */

/* Shared choice pills (radio buttons) */
.agt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.agt-pill { position: relative; }
.agt-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.aff-tool .agt-pill label { display: inline-flex; align-items: center; min-height: 42px; margin: 0; padding: 8px 14px; border-radius: 999px; border: 1.5px dashed var(--blush-deep); background: var(--bg); color: var(--ink-2); font-size: 14.5px; font-weight: 500; line-height: 1.25; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.aff-tool .agt-pill label:hover { border-color: var(--accent); color: var(--ink); }
.agt-pill input:checked + label { background: var(--accent); border-style: solid; border-color: var(--accent); color: #fff; }
.agt-pill input:focus-visible + label { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.agt-tool__source { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }

/* Machine finder */
.agt-finder { position: relative; background: var(--surface); }
.agt-finder__intro { color: var(--ink-2); font-size: 15.5px; margin-bottom: 16px; }
.agt-finder fieldset { border: 0; margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1.5px dashed var(--line); min-width: 0; }
.agt-finder legend { padding: 0; margin-bottom: 10px; font: 600 15.5px/1.3 var(--font-body); color: var(--ink); }
.agt-finder legend b { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; background: var(--surface-2); color: var(--accent-2); font-size: 13px; }
.agt-finder__status { font-size: 14px; color: var(--muted); margin: 0; }
.agt-finder__result[hidden] { display: none; }
.agt-finder__result { position: relative; margin-top: 4px; padding: 22px 22px 20px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.agt-finder__result::before { content: ""; position: absolute; inset: 6px; border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 8px; pointer-events: none; }
.agt-finder__type { display: block; font: 400 26px/1.15 var(--font-display); color: var(--ink); margin: 2px 0 8px; }
.agt-finder__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.agt-finder__why { margin: 0 0 12px; color: var(--ink-2); font-size: 15.5px; }
.agt-finder__feats { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.agt-finder__feats li { margin: 0; padding: 4px 10px; border-radius: 999px; background: #fff; font-size: 13.5px; color: var(--ink-2); }
.agt-finder__links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.agt-finder__links li { margin: 0; }
.agt-finder__links a { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 600; font-size: 15.5px; text-decoration: none; box-shadow: 0 0 0 1px var(--line); }
.agt-finder__links a:hover { box-shadow: 0 0 0 2px var(--accent); }
.agt-finder__links a span { color: var(--accent); }
.agt-finder__also { margin: 12px 0 0; font-size: 14.5px; color: var(--ink-2); }
.agt-finder__also a { position: relative; z-index: 1; }
.agt-finder__reset { position: relative; z-index: 1; margin-top: 14px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1.5px dashed var(--accent); background: transparent; color: var(--accent); font: 600 14px/1 var(--font-body); cursor: pointer; }

/* Parts diagram */
.agt-parts__stage { position: relative; border-radius: var(--radius-sm); background: radial-gradient(circle at 10px 10px, rgba(13, 113, 117, .08) 1.8px, transparent 2.3px) 0 0 / 20px 20px, #fffafa; box-shadow: inset 0 0 0 1px var(--line); }
.agt-parts__stage svg { display: block; width: 100%; height: auto; }
.agt-parts .agt-spot { cursor: pointer; outline: none; }
.agt-parts .agt-spot .agt-spot__hit { fill: transparent; }
.agt-parts .agt-spot .agt-spot__dot { fill: var(--accent-2); stroke: #fff; stroke-width: 2.5; transition: fill .15s; }
.agt-parts .agt-spot .agt-spot__ring { fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-dasharray: 4 3; opacity: 0; transition: opacity .15s; }
.agt-parts .agt-spot text { fill: #fff; font: 700 12px/1 var(--font-body); pointer-events: none; }
.agt-parts .agt-spot:hover .agt-spot__dot, .agt-parts .agt-spot:focus-visible .agt-spot__dot, .agt-parts .agt-spot.is-on .agt-spot__dot { fill: var(--accent); }
.agt-parts .agt-spot:hover .agt-spot__ring, .agt-parts .agt-spot:focus-visible .agt-spot__ring, .agt-parts .agt-spot.is-on .agt-spot__ring { opacity: 1; stroke: var(--accent); }
.agt-parts .agt-spot:focus-visible .agt-spot__ring { stroke-dasharray: none; stroke-width: 3; }
.agt-parts [data-part] { transition: filter .15s, opacity .15s; }
.agt-parts svg.has-lit [data-part]:not(.agt-spot) { opacity: .55; }
.agt-parts svg.has-lit [data-part].is-lit { opacity: 1; filter: drop-shadow(0 0 5px rgba(13, 113, 117, .75)); }
.agt-parts__info { margin-top: 14px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--accent-soft); min-height: 112px; }
.agt-parts__info h4 { font: 400 23px/1.2 var(--font-display); margin: 0 0 4px; }
.agt-parts__where { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.agt-parts__what { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.agt-parts__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.agt-parts__list li { margin: 0; }
.agt-parts__list button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 11px 4px 5px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink-2); font: 500 13.5px/1.2 var(--font-body); cursor: pointer; }
.agt-parts__list button b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-2); color: #fff; font-size: 11.5px; }
.agt-parts__list button:hover { border-color: var(--accent); }
.agt-parts__list button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.agt-parts__list button[aria-pressed="true"] b { background: #fff; color: var(--accent); }

/* Needle & fabric chart */
.agt-needle__pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 16px; }
.agt-needle__fabric { font: 400 25px/1.2 var(--font-display); margin: 0 0 12px; }
.agt-needle__rows { display: grid; gap: 12px; }
.agt-needle__row { position: relative; padding: 14px 16px; border-radius: var(--radius-sm); background: #fff; box-shadow: 0 0 0 1px var(--line); }
.agt-needle__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.agt-needle__type { font: 700 17px/1.2 var(--font-body); color: var(--ink); }
.agt-needle__code { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.agt-needle__code i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .18); }
.agt-needle__range { margin-left: auto; font: 700 16px/1.2 var(--font-body); color: var(--accent); }
.agt-needle__point { margin: 0 0 10px; font-size: 14.5px; color: var(--ink-2); }
.agt-needle__scale { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.agt-needle__scale span { display: grid; place-items: center; min-height: 40px; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 12px; line-height: 1.15; text-align: center; border: 1.5px dashed var(--line); }
.agt-needle__scale span.is-on { background: var(--accent); border: 1.5px solid var(--accent); color: #fff; font-weight: 700; }
.agt-needle__scale span.is-na { opacity: .45; }
.agt-needle__legend { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.agt-needle__tip { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14.5px; color: var(--ink-2); }

@media (max-width: 760px) {
	.hero__copy { padding: 26px 20px 24px; }
	.hero__copy::before { inset: 7px; }
	.aff-tool { padding: 18px 16px; }
	.agt-finder__type { font-size: 23px; }
	.agt-needle__range { margin-left: 0; width: 100%; }
	.agt-needle__scale span { min-height: 36px; font-size: 10.5px; }
	.aff-tool .agt-pill label { font-size: 14px; padding: 8px 12px; }
}

/* Tool lists inside .prose: undo the article list indents */
.aff-tool .agt-parts__list, .aff-tool .agt-finder__feats, .aff-tool .agt-finder__links { padding-left: 0; margin-left: 0; }
.aff-tool .agt-parts__list li, .aff-tool .agt-finder__feats li, .aff-tool .agt-finder__links li { margin: 0; }
