/*
Theme Name: Wood Lathe Guide
Template: aff-base
Description: Woodshop look for wood-lathe.com: walnut brown, maple cream, safety orange and wood-grain motifs.
Version: 1.0.0
*/

:root {
	--bg: #f8f1e4;
	--surface: #fffaf2;
	--surface-2: #f0e4cd;
	--ink: #2a1c12;
	--ink-2: #4f3b2b;
	--muted: #7c6956;
	--line: #e3d4b9;
	--accent: #6a4329;
	--accent-ink: #fffaf2;
	--accent-soft: #f2e3c9;
	--accent-2: #d35400;
	--good: #3b7a36;
	--bad: #b33a1d;
	--radius: 6px;
	--radius-sm: 4px;
	--shadow: 0 1px 2px rgba(42, 28, 18, .06), 0 10px 26px rgba(42, 28, 18, .08);
	--font-display: "Roboto Slab", Rockwell, Georgia, serif;
	--font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--display-weight: 700;
	--display-tracking: -0.012em;
	--walnut: #4a2f1d;
	--walnut-deep: #24170f;
	--maple: #f3e2c2;
	--orange: #f26b1d;
	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='140' viewBox='0 0 480 140'%3E%3Cg fill='none' stroke='%236a4329' stroke-width='1.1'%3E%3Cpath d='M0 14C70 6 120 26 200 18S330 4 400 12 460 18 480 14' stroke-opacity='.10'/%3E%3Cpath d='M0 38C60 30 130 52 210 42S340 26 410 36 465 40 480 38' stroke-opacity='.07'/%3E%3Cpath d='M0 62C90 52 150 78 240 66S370 50 430 60 470 64 480 62' stroke-opacity='.09'/%3E%3Cpath d='M0 88C80 80 140 100 230 92S360 76 420 86 468 90 480 88' stroke-opacity='.06'/%3E%3Cpath d='M0 114C70 104 150 128 240 118S380 102 440 112 472 116 480 114' stroke-opacity='.09'/%3E%3Cellipse cx='318' cy='64' rx='22' ry='6' stroke-opacity='.08'/%3E%3Cellipse cx='318' cy='64' rx='11' ry='3' stroke-opacity='.08'/%3E%3C/g%3E%3C/svg%3E");
	--grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='140' viewBox='0 0 480 140'%3E%3Cg fill='none' stroke='%23f3e2c2' stroke-width='1.1'%3E%3Cpath d='M0 14C70 6 120 26 200 18S330 4 400 12 460 18 480 14' stroke-opacity='.06'/%3E%3Cpath d='M0 38C60 30 130 52 210 42S340 26 410 36 465 40 480 38' stroke-opacity='.04'/%3E%3Cpath d='M0 62C90 52 150 78 240 66S370 50 430 60 470 64 480 62' stroke-opacity='.05'/%3E%3Cpath d='M0 88C80 80 140 100 230 92S360 76 420 86 468 90 480 88' stroke-opacity='.04'/%3E%3Cpath d='M0 114C70 104 150 128 240 118S380 102 440 112 472 116 480 114' stroke-opacity='.05'/%3E%3C/g%3E%3C/svg%3E");
}

/* Type details */
body { font-weight: 400; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-2); letter-spacing: .14em; }
.kicker::before { content: ""; width: 22px; height: 3px; background: var(--accent-2); border-radius: 2px; }
.prose h2 { padding-top: .2em; }
.prose h2::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 12px; background: var(--accent-2); border-radius: 2px; }

/* Buttons: squared-off, like a tool tag */
.btn { border-radius: var(--radius); letter-spacing: .01em; }
.btn--primary { background: var(--walnut); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22); }
.btn--ghost { border-color: var(--walnut); color: var(--walnut); }
.btn--ghost:hover { background: var(--walnut); color: var(--maple); }

/* Header: maple board with a walnut and safety-orange edge */
.site-header { background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 0; box-shadow: 0 1px 0 rgba(42, 28, 18, .08); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: linear-gradient(var(--accent-2) 0 2px, transparent 2px), var(--grain-light), linear-gradient(90deg, #5a3922, #3f2716 40%, #5e3c24 70%, #432a19); background-size: auto, 480px 40px, auto; pointer-events: none; }
.brand__name { font-size: 20px; letter-spacing: -.01em; }
.brand__name::first-letter { color: var(--accent-2); }
.brand__mark { color: var(--walnut); }
.nav__list a { border-radius: var(--radius); font-weight: 500; }
.nav__list a:hover, .nav__list .current-menu-item a { background: var(--accent-soft); color: var(--walnut-deep); box-shadow: inset 0 -2px 0 var(--accent-2); }

/* Hero: maple with grain lines and a warm work light */
.hero { padding-top: 72px; border-bottom: 0; background:
	radial-gradient(640px 320px at 82% 18%, rgba(242, 107, 29, .14), transparent 70%),
	radial-gradient(900px 420px at 10% 110%, #efdcb8, transparent 70%),
	var(--grain), var(--bg); background-size: auto, auto, 480px 140px, auto; position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: repeating-linear-gradient(90deg, var(--walnut) 0 2px, transparent 2px 12px) bottom / 100% 8px no-repeat, linear-gradient(var(--line), var(--line)) bottom / 100% 1px no-repeat; opacity: .5; }
.hero__title { font-size: clamp(34px, 4.6vw, 56px); }
.hero__text { color: var(--ink-2); }
.hero__art svg { filter: drop-shadow(0 18px 24px rgba(42, 28, 18, .14)); }

/* Silo tiles: end-grain blocks with growth rings behind the icon */
.silo { border-radius: var(--radius); border-top: 4px solid var(--walnut); padding: 22px 20px 20px; background: linear-gradient(180deg, var(--surface), var(--surface)) padding-box; position: relative; overflow: hidden; }
.silo::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 7px, rgba(106, 67, 41, .07) 7px 8.5px); pointer-events: none; }
.silo:hover { border-top-color: var(--accent-2); }
.silo__icon { width: 60px; height: 60px; padding: 10px; border-radius: 50%; color: var(--walnut); background: repeating-radial-gradient(circle at 50% 50%, #f6e8cf 0 4px, #ecd7b3 4px 5.5px); box-shadow: 0 0 0 2px #d9bf93; }
.silo__name { font-size: 19px; }
.silo__count { font-weight: 500; color: var(--accent-2); }

/* Cards */
.card__link { border-radius: var(--radius); }
.card__link:hover { border-color: var(--accent-2); box-shadow: var(--shadow); }
.card__icon { color: var(--walnut); }
.card--lg .card__link { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 62%); border-top: 4px solid var(--walnut); }
.card__more { color: var(--accent-2); }

/* Tool teaser on a walnut board */
.teaser__inner { border-radius: var(--radius); background: var(--grain-light), linear-gradient(135deg, #3d2717, #5b3a23); background-size: 480px 140px, auto; color: var(--maple); }
.teaser__copy h2 { color: #fff7ea; }
.teaser__copy p { color: #ead8bb; }
.teaser .kicker { color: var(--orange); }
.teaser .kicker::before { background: var(--orange); }
.teaser .btn--primary { background: var(--accent-2); }

/* Promise: a rule with ruler ticks on top */
.promise__item { border-top: 0; border-radius: var(--radius); position: relative; padding-top: 34px; border: 1px solid var(--line); }
.promise__item::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-radius: var(--radius) var(--radius) 0 0; background: repeating-linear-gradient(90deg, var(--walnut) 0 1.5px, transparent 1.5px 10px) top left / 100% 7px no-repeat, repeating-linear-gradient(90deg, var(--walnut) 0 2px, transparent 2px 50px) top left / 100% 12px no-repeat, var(--maple); }

/* Silo and article heads */
.silo-head { background: radial-gradient(800px 280px at 90% -20%, rgba(242, 107, 29, .12), transparent 70%), var(--grain), var(--bg); background-size: auto, 480px 140px, auto; }
.silo-head__icon { color: var(--walnut); }
.article__head { background: var(--grain); background-size: 480px 140px; }

/* Quick picks: numbered orange tool tags on a ruler edge */
.quick-picks { counter-reset: pick; border-radius: var(--radius); border-left: 0; position: relative; padding-left: 0; overflow: hidden; }
.quick-picks::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: repeating-linear-gradient(180deg, var(--walnut) 0 2px, transparent 2px 9px), var(--maple); }
.quick-picks li { counter-increment: pick; position: relative; padding-left: 70px; }
.quick-picks li::before { content: counter(pick); position: absolute; left: 24px; top: 15px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; background: var(--accent-2); color: #fff; font: 700 15px/1 var(--font-display); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.quick-picks li::after { content: ""; position: absolute; left: 36px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1.5px var(--accent-2); }

/* Tables: walnut header row */
.prose th { background: var(--walnut); color: #fbf1df; border-bottom-color: var(--walnut); }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }

/* Product box: walnut grain edge and an orange tag */
.aff-product { border: 0; border-radius: var(--radius); box-shadow: 0 0 0 1.5px var(--line), var(--shadow); position: relative; overflow: hidden; padding-left: 30px; }
.aff-product::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--grain-light), linear-gradient(90deg, #6b4429, #432a19); background-size: 120px 60px, auto; }
.aff-product__icon { border-radius: 50%; background: repeating-radial-gradient(circle, #f6e8cf 0 4px, #ecd7b3 4px 5.5px); color: var(--walnut); box-shadow: 0 0 0 2px #d9bf93; }
.aff-product__badge { border-radius: 3px; background: var(--accent-2); }
.aff-product__btn, .aff-cta__btn { border-radius: var(--radius); background: var(--accent-2); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.aff-cta { border-left: 0; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line), var(--shadow); background: linear-gradient(90deg, var(--accent-2) 0 5px, var(--surface) 5px); }

.faq summary::after { color: var(--accent-2); }
.prose blockquote { border-left-color: var(--accent-2); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.aff-tool { border-radius: var(--radius); border-top: 4px solid var(--accent-2); }

/* Footer: dark walnut with grain */
.site-footer { background: var(--grain-light), var(--walnut-deep); background-size: 480px 140px, auto; border-top: 6px solid var(--accent-2); }
.site-footer .brand__mark { color: var(--orange); }

/* ---------- Tools ---------- */
.agt-tool__note { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.agt-tool__lead { font-size: 15.5px; color: var(--ink-2); margin: -4px 0 14px; }

/* Lathe diagram */
.agt-lathe__svg { background: var(--grain), #fbf5ea; background-size: 480px 140px, auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.agt-lathe__svg svg { display: block; width: 100%; height: auto; }
.agt-lathe [data-part] { cursor: pointer; outline: none; }
.agt-lathe [data-part] .agt-hit { fill: transparent; }
.agt-lathe [data-part] .agt-shape { transition: filter .15s; }
.agt-lathe [data-part]:hover .agt-shape, .agt-lathe [data-part].is-on .agt-shape { filter: brightness(1.12) drop-shadow(0 0 4px rgba(242, 107, 29, .65)); }
.agt-lathe [data-part]:focus-visible .agt-hit, .agt-lathe [data-part].is-on .agt-hit { stroke: var(--accent-2); stroke-width: 2.5; stroke-dasharray: 6 4; }
.agt-lathe .agt-pin circle { fill: var(--walnut); stroke: #fffaf2; stroke-width: 2; }
.agt-lathe .agt-pin text { fill: #fffaf2; font: 700 14px/1 "IBM Plex Sans", sans-serif; }
.agt-lathe [data-part].is-on .agt-pin circle, .agt-lathe [data-part]:hover .agt-pin circle { fill: var(--accent-2); }
.agt-lathe__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.agt-lathe__chips button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink-2); font: 600 14px/1 var(--font-body); cursor: pointer; }
.agt-lathe__chips button span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--walnut); color: #fffaf2; font-size: 12px; }
.agt-lathe__chips button[aria-pressed="true"] { border-color: var(--accent-2); background: #fff1e6; color: var(--ink); }
.agt-lathe__chips button[aria-pressed="true"] span { background: var(--accent-2); }
.agt-lathe__panel { padding: 18px 20px; border-radius: var(--radius); background: var(--accent-soft); border-left: 5px solid var(--walnut); }
.agt-lathe__panel h4 { margin: 0 0 6px; font-size: 21px; }
.agt-lathe__panel p { margin: 0 0 10px; font-size: 16px; }
.agt-lathe__panel dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 15px; }
.agt-lathe__panel dt { font-weight: 700; color: var(--walnut); }
.agt-lathe__panel dd { margin: 0; }
.agt-lathe__panel .agt-safe { color: var(--bad); }
.agt-lathe__speeds { margin: 10px 0 0; border-collapse: collapse; font-size: 14.5px; width: 100%; max-width: 360px; }
.agt-lathe__speeds td { padding: 5px 8px; border-bottom: 1px solid rgba(106, 67, 41, .18); }
.agt-lathe__speeds td:last-child { text-align: right; font-weight: 700; }
.agt-safety { margin-top: 16px; padding: 16px 18px 6px; border: 1.5px solid #f3c7a6; border-radius: var(--radius); background: repeating-linear-gradient(-45deg, rgba(242, 107, 29, .07) 0 10px, transparent 10px 20px), #fffaf4; }
.agt-safety h4 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 8px; color: var(--ink); }
.agt-safety h4::before { content: "!"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; background: var(--accent-2); color: #fff; font: 700 14px/1 var(--font-body); }
.agt-safety ul { margin: 0 0 10px; padding-left: 1.2em; font-size: 15px; line-height: 1.5; }
.agt-safety li { margin: 4px 0; }

/* Turning tools visual guide */
.agt-tools__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.agt-tools__tabs button { min-height: 42px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink-2); font: 600 14.5px/1 var(--font-body); cursor: pointer; }
.agt-tools__tabs button[aria-selected="true"] { background: var(--walnut); border-color: var(--walnut); color: #fffaf2; }
.agt-tools__plan { border: 1px solid var(--line); border-radius: var(--radius); background: var(--grain), #fbf5ea; background-size: 480px 140px, auto; padding: 6px; }
.agt-tools__plan svg, .agt-tools__fig svg { display: block; width: 100%; height: auto; }
.agt-tools__figs { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin: 12px 0; }
.agt-tools__fig { margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.agt-tools__fig figcaption { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 2px 4px 4px; }
.agt-tools__card h4 { margin: 4px 0 6px; font-size: 21px; }
.agt-tools__use { display: inline-block; margin: 0 0 10px; padding: 4px 9px; border-radius: 3px; font: 700 12px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; background: var(--walnut); color: #fffaf2; }
.agt-tools__use--warn { background: var(--bad); }
.agt-tools__card dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 15.5px; }
.agt-tools__card dt { font-weight: 700; color: var(--walnut); }
.agt-tools__card dd { margin: 0; }

/* Lathe comparison filter */
.agt-lfilter { margin: -1em 0 1.8em; }
.agt-lfilter .aff-tool__grid { margin-bottom: 10px; }
.agt-lfilter__status { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.agt-lfilter__status strong { font-family: var(--font-display); color: var(--ink); }
.table-wrap.is-filtered tbody tr[hidden] { display: none; }
.prose td.agt-unknown { color: var(--muted); }

@media (max-width: 760px) {
	.agt-tools__figs { grid-template-columns: 1fr; }
	.agt-tools__fig svg { max-height: 170px; }
	.agt-lathe__panel dl, .agt-tools__card dl { grid-template-columns: 1fr; gap: 2px; }
	.agt-lathe__panel dd, .agt-tools__card dd { margin-bottom: 8px; }
	.quick-picks li { padding-left: 62px; }
	.quick-picks li::before { left: 20px; }
	.quick-picks li::after { left: 32px; }
	.aff-product { padding-left: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	.agt-lathe [data-part] .agt-shape { transition: none; }
}

/* Amazon photos: frame in this site's style */
:root { --photo-radius: 6px; --photo-stage: linear-gradient(145deg, var(--walnut), var(--walnut-deep)); --photo-frame: 8px; }
