/* Sona's Woodshop: painted shop wall, walnut, plywood and safety yellow */
:root {
  --wall: #e7ece4;      /* sage-painted shop wall */
  --wall-2: #dde4d9;
  --paper: #fbfaf6;     /* graph paper / cards */
  --ink: #1e2b24;       /* green-black pencil */
  --ink-2: #4b5a51;
  --walnut: #5a3a22;
  --ply: #d8b285;
  --ply-dark: #a36c3d;
  --yellow: #f2b705;    /* safety yellow: actions */
  --line: #c7d0c3;
  --grid: rgba(30, 43, 36, 0.07);
  --r-sm: 6px;
  --r-md: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wall: #18201b; --wall-2: #1e2822; --paper: #222c26; --ink: #ecefe9; --ink-2: #b4bfb7;
    --line: #34413a; --grid: rgba(236, 239, 233, 0.06); --walnut: #8a5a33;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--wall); color: var(--ink);
  font: 17px/1.6 "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: "Zilla Slab", Georgia, serif; line-height: 1.12; margin: 0; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 21px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: #1e2b24; padding: 8px 14px; border-radius: var(--r-sm); z-index: 99; }
.skip:focus { left: 8px; }
.small { font-size: 14px; color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 16px;
  padding: 12px 20px; border-radius: var(--r-sm); border: 2px solid var(--ink); cursor: pointer; text-decoration: none;
}
.btn-yellow { background: var(--yellow); color: #1e2b24; box-shadow: 3px 3px 0 var(--ink); }
.btn-yellow:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn-dark { background: var(--ink); color: var(--wall); }
.btn-dark:hover { background: var(--walnut); border-color: var(--walnut); color: #fff; }
.btn.big { font-size: 19px; padding: 16px 28px; }
.link-btn { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; color: var(--walnut); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .link-btn { color: var(--ply); } }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--wall) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Zilla Slab", Georgia, serif; font-weight: 700; font-size: 22px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-weight: 600; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav .nav-cta { background: var(--ink); color: var(--wall); padding: 8px 16px; border-radius: var(--r-sm); }
.nav .nav-cta:hover { text-decoration: none; background: var(--walnut); color: #fff; }
.menu-btn { display: none; width: 44px; height: 44px; border: 2px solid var(--ink); background: transparent; border-radius: var(--r-sm); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-btn span { width: 20px; height: 2px; background: var(--ink); display: block; }
@media (max-width: 760px) {
  .menu-btn { display: flex; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--wall); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { margin-top: 10px; text-align: center; border-bottom: 0; }
}

/* Hero */
.hero { padding: 56px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.4vw, 82px); font-weight: 700; letter-spacing: -0.02em; line-height: 0.98; max-width: 12ch; }
.lede { font-size: 20px; color: var(--ink-2); max-width: 46ch; margin: 22px 0 26px; }
.hero-search { display: flex; gap: 10px; max-width: 520px; }
.hero-search input {
  flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--paper); color: var(--ink);
}
.hero-links { margin-top: 16px; }
.hero-links a { font-weight: 600; color: var(--walnut); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-links a { color: var(--ply); } }
.hero-art { margin: 0; }
.hero-art svg { width: 100%; height: auto; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-search { flex-direction: column; }
}

/* Tape measure strip: the signature */
.tape { margin-top: 48px; height: 58px; background: var(--yellow); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); overflow: hidden; }
.tape-inner {
  height: 100%;
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 96px),
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 24px),
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 12px);
  background-size: 100% 30px, 100% 22px, 100% 14px, 100% 9px;
  background-repeat: repeat-x;
  background-position: 0 0;
  position: relative;
}
.tape-num { position: absolute; bottom: 6px; transform: translateX(-50%); font: 700 15px/1 "Zilla Slab", serif; color: #1e2b24; }

/* Sections */
.section { padding: 84px 0; }
.section-sub { color: var(--ink-2); max-width: 62ch; margin: 12px 0 28px; font-size: 18px; }

/* Categories */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 960px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cats { grid-template-columns: repeat(2, 1fr); } }
.cat {
  display: flex; flex-direction: column; text-decoration: none; background: var(--paper); border: 2px solid var(--ink);
  border-radius: var(--r-md); padding: 14px 14px 16px; min-width: 0;
}
.cat:hover { background: var(--yellow); color: #1e2b24; }
.cat-art { display: block; background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 14px 14px; border-radius: var(--r-sm); margin-bottom: 12px; }
.cat:hover .cat-art { background-color: #fbfaf6; }
.cat-name { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 20px; line-height: 1.15; }
.cat-note { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.cat:hover .cat-note { color: #1e2b24; }
.cat-count { font-size: 13px; font-weight: 700; margin-top: 8px; }

/* Start here: numbered because it's a real sequence */
.start { background: var(--walnut); color: #f3ede3; }
.start .section-sub { color: #e2d3bd; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ply); }
.steps li { counter-increment: step; padding: 26px 26px 6px 0; position: relative; }
.steps li + li { padding-left: 26px; border-left: 1px solid rgba(216, 178, 133, 0.4); }
.steps li::before { content: counter(step); display: block; font: 700 64px/1 "Zilla Slab", serif; color: var(--yellow); margin-bottom: 10px; }
.steps h3 { color: #fff; margin-bottom: 8px; }
.steps p { color: #e9dfcf; }
.start .link-btn { color: var(--yellow); }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 22px 0 6px; border-left: 0; border-top: 1px solid rgba(216, 178, 133, 0.4); }
  .steps li:first-child { border-top: 0; }
}

/* Projects */
.proj-head .section-sub { margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  font: inherit; font-weight: 600; font-size: 15px; padding: 7px 14px; border-radius: 999px; border: 2px solid var(--ink);
  background: transparent; color: var(--ink); cursor: pointer;
}
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--wall); }
.filter-right { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-right select, .filter-right input {
  font: inherit; font-size: 15px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--paper); color: var(--ink);
}
.result-count { font-size: 14px; color: var(--ink-2); margin: 8px 0 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
@media (max-width: 380px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.card-art {
  position: relative; padding: 14px 20px; border-bottom: 2px solid var(--ink);
  background-color: #fbfaf6; background-image: linear-gradient(rgba(30,43,36,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(30,43,36,.08) 1px, transparent 1px); background-size: 16px 16px;
}
.card-art svg { margin: 0 auto; height: 150px; width: auto; }
.badge { position: absolute; top: 12px; left: 12px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 2px solid #1e2b24; color: #1e2b24; }
.badge.new { background: var(--yellow); }
.badge.pop { background: #fff; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { color: var(--ink-2); font-size: 16px; }
.cutlist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 4px 0 18px; padding: 12px 0 0; border-top: 1px dashed var(--line); }
.cutlist div { min-width: 0; }
.cutlist dt { font-size: 13px; color: var(--ink-2); }
.cutlist dd { margin: 0; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.card .btn { margin-top: auto; align-self: flex-start; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 9px; height: 9px; border-radius: 2px; border: 1.5px solid var(--ink); }
.pips i.on { background: var(--ply-dark); border-color: var(--ply-dark); }
.empty { grid-column: 1 / -1; text-align: center; padding: 40px; background: var(--paper); border: 2px dashed var(--line); border-radius: var(--r-md); }

/* Bundles */
.series { background: var(--wall-2); }
.bundles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .bundles { grid-template-columns: 1fr; } }
.bundle { background: var(--paper); border-left: 8px solid var(--ply); border-radius: var(--r-sm); padding: 22px 22px 18px; }
.bundle h3 { margin-bottom: 8px; }
.bundle p { color: var(--ink-2); font-size: 16px; }
.bundle ol { margin: 0; padding-left: 20px; }
.bundle li { margin: 6px 0; }
.bundle li span { font-size: 13px; color: var(--ink-2); margin-left: 6px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
.about-copy h2 { margin-bottom: 18px; }
.about-copy p { font-size: 18px; max-width: 60ch; }
.sig { font: 600 26px/1 "Zilla Slab", serif; color: var(--walnut); margin-top: 18px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sig { color: var(--ply); } }
.timeline-wrap h3 { margin-bottom: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--ply-dark); }
.timeline li { position: relative; padding: 0 0 18px 22px; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); }
.timeline b { font-family: "Zilla Slab", serif; font-size: 20px; }
.timeline span { color: var(--ink-2); font-size: 16px; }

/* Tips */
.tips { display: grid; gap: 12px; max-width: 820px; }
.tips details { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-md); }
.tips summary { list-style: none; cursor: pointer; padding: 16px 20px; font: 700 21px/1.2 "Zilla Slab", serif; display: flex; justify-content: space-between; align-items: center; }
.tips summary::-webkit-details-marker { display: none; }
.tips summary span::before { content: "+"; font-size: 26px; line-height: 1; }
.tips details[open] summary span::before { content: "–"; }
.tips ul { margin: 0; padding: 0 20px 18px 40px; }
.tips li { margin: 8px 0; max-width: 66ch; }

/* Contact */
.contact { background: var(--ink); color: var(--wall); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .contact { background: #0f1512; } }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact p { font-size: 18px; color: #cfd8d1; max-width: 54ch; margin-top: 14px; }
.contact-card .small { color: #b6c2ba; margin-top: 16px; }

/* Footer */
.site-foot { background: var(--wall-2); }
.ply-edge { height: 18px; background: repeating-linear-gradient(180deg, #e6c99d 0 3px, #b9874f 3px 4px, #dcb684 4px 7px, #a97640 7px 8px); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 28px; padding-top: 40px; padding-bottom: 24px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h3 { font-size: 18px; margin-bottom: 10px; }
.foot-grid nav a { display: block; text-decoration: none; padding: 3px 0; }
.foot-grid nav a:hover { text-decoration: underline; }
.foot-logo { font-size: 22px; margin-bottom: 8px; }
.foot-bottom { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 28px; font-size: 14px; color: var(--ink-2); }
.foot-bottom p { margin: 0; }

/* Dialog */
dialog { width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 40px); border: 2px solid var(--ink); border-radius: var(--r-md); padding: 0 28px 28px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(20, 28, 23, 0.6); }
.dialog-close-row { position: sticky; top: 0; display: flex; justify-content: flex-end; padding-top: 10px; background: var(--paper); margin: 0 -28px; padding-right: 12px; }
.close { font-size: 28px; line-height: 1; width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: var(--r-sm); }
.plan-art { background: #fbfaf6; border-radius: var(--r-sm); padding: 8px; margin-bottom: 14px; background-image: linear-gradient(rgba(30,43,36,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(30,43,36,.08) 1px, transparent 1px); background-size: 16px 16px; }
.plan-art svg { height: 170px; width: auto; margin: 0 auto; }
#planBody h2 { font-size: 32px; margin-bottom: 10px; }
#planBody h3 { margin: 22px 0 8px; }
.plan-sum { color: var(--ink-2); font-size: 18px; }
.plan-cut { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 520px) { .plan-cut { grid-template-columns: 1fr 1fr; } }
.tools { columns: 2; padding-left: 20px; margin: 0; }
@media (max-width: 520px) { .tools { columns: 1; } }
.plan-steps { padding-left: 22px; margin: 0; }
.plan-steps li { margin: 8px 0; }
.sona-note { margin: 22px 0 16px; padding: 16px 18px; background: color-mix(in srgb, var(--yellow) 22%, var(--paper)); border-left: 6px solid var(--yellow); border-radius: var(--r-sm); }
.sona-note p { margin: 4px 0 0; }
