/* Needful Things Software - every page shares this. Warm hardware-store colors: pine green, rust, mustard. */
:root {
  --ink: #1f1c18; --paper: #faf6ee; --panel: #ffffff; --muted: #615a50; --line: #e3dacb;
  --pine: #23413a; --pine-deep: #172d28; --on-pine: #f4efe4; --on-pine-muted: #c3cfc6;
  --rust: #b8532c; --mustard: #e0ad3a; --mustard-soft: #f6e4b5; --teal: #1f6f73; --plum: #7a3e6b; --green: #3b7a3a;
  --focus: #2f7fd0; --ok: #2e7d50;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
  --radius: 12px; --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eee7da; --paper: #15130f; --panel: #201d18; --muted: #b3a998; --line: #3b352c;
    --pine: #14261f; --pine-deep: #0d1a15; --rust: #ec8a5f; --mustard: #f0c35c; --mustard-soft: #4a3c1c;
    --teal: #6cc3c7; --plum: #d79bc7; --green: #8fcf8c; --focus: #7fb6ea; --ok: #6fcf97; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eee7da; --paper: #15130f; --panel: #201d18; --muted: #b3a998; --line: #3b352c;
  --pine: #14261f; --pine-deep: #0d1a15; --rust: #ec8a5f; --mustard: #f0c35c; --mustard-soft: #4a3c1c;
  --teal: #6cc3c7; --plum: #d79bc7; --green: #8fcf8c; --focus: #7fb6ea; --ok: #6fcf97; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.05rem; line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.15; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.eyebrow { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust); }

.strip { background: var(--pine-deep); color: var(--on-pine-muted); font-size: 0.88rem; }
.strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.strip a { color: var(--on-pine); }

header.site { position: sticky; top: 0; z-index: 20; background: var(--pine); color: var(--on-pine); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; min-width: 0; }
.brand img { border-radius: 10px; flex: none; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1; display: block; }
.brand small { display: block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-pine-muted); margin-top: 3px; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.1rem; }
nav.main a { font-weight: 700; text-decoration: none; color: var(--on-pine); }
nav.main a:hover { color: var(--mustard); }
@media (max-width: 760px) { nav.main .hide-sm { display: none; } }
.cart-btn { font: inherit; font-weight: 700; background: var(--mustard); color: #2a1f05; border: 0; border-radius: 8px; padding: 0.45rem 0.85rem; cursor: pointer; white-space: nowrap; }
.cart-count { display: inline-block; min-width: 1.3rem; padding: 0 0.3rem; margin-left: 0.35rem; border-radius: 99px; background: var(--pine-deep); color: var(--on-pine); font-size: 0.85rem; text-align: center; }

.hero { background: var(--pine); color: var(--on-pine); padding: 3.5rem 0 3.8rem;
  background-image: radial-gradient(circle at 85% 30%, rgba(224,173,58,0.18), transparent 45%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.hero .eyebrow { color: var(--mustard); }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 1.5rem + 3vw, 3.6rem); line-height: 1.07; margin-top: 0.6rem; }
.hero h1 em { color: var(--mustard); font-style: normal; }
.hero .lead { margin-top: 1.1rem; color: var(--on-pine-muted); max-width: 38rem; font-size: 1.12rem; }
.hero .deal { margin-top: 1.1rem; display: inline-block; background: rgba(224,173,58,0.14); border-left: 4px solid var(--mustard); padding: 0.55rem 0.9rem; border-radius: 6px; }
.hero .actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero .logo { justify-self: center; width: min(100%, 260px); height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.4)); }
.crumbs { font-size: 0.9rem; color: var(--on-pine-muted); margin-bottom: 0.6rem; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } .hero .logo { width: 150px; } }
.btn { display: inline-block; text-decoration: none; font: inherit; font-weight: 700; padding: 0.75rem 1.15rem; border-radius: 8px; border: 0; cursor: pointer; }
.btn.gold { background: var(--mustard); color: #2a1f05; }
.btn.ghost { background: transparent; color: var(--on-pine); box-shadow: inset 0 0 0 2px var(--on-pine-muted); }

section { padding: 3.5rem 0; scroll-margin-top: 4.5rem; }
section:nth-of-type(even) { background: var(--panel); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head h2 { margin-top: 0.35rem; }
.section-head p:last-child:not(.eyebrow) { margin-top: 0.7rem; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.4rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-top: 6px solid var(--rust); border-radius: var(--radius);
  padding: 1.4rem; display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
section:nth-of-type(even) .card { background: var(--paper); }
.card.c-teal { border-top-color: var(--teal); } .card.c-plum { border-top-color: var(--plum); } .card.c-green { border-top-color: var(--green); }
.card .kind { letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.card h3 { font-family: var(--display); font-weight: 800; font-size: 1.55rem; line-height: 1.15; }
.card h3 a { text-decoration: none; } .card h3 a:hover { text-decoration: underline; }
.card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; color: var(--muted); font-size: 0.97rem; }
.card ul strong { color: var(--ink); }
.card .runs { font-size: 0.88rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 0.6rem; margin-top: auto; }
.buycard { max-width: 34rem; }
.buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.price { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--rust); }
.price small { font-family: var(--body); font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.add { font: inherit; font-weight: 700; padding: 0.6rem 1rem; border-radius: 8px; border: 2px solid var(--rust); background: var(--rust); color: #fff; cursor: pointer; }
.add.in { background: transparent; color: var(--rust); }
.dl { font-size: 0.95rem; border: 1px dashed var(--line); border-radius: 8px; padding: 0.55rem 0.75rem; }
.dl a { font-weight: 700; color: var(--teal); }
.dl span { color: var(--muted); font-size: 0.88rem; }
.renew-note { font-size: 0.9rem; color: var(--muted); font-style: italic; }

.features, .faq { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 1.1rem; }
.features div, .faq div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
section:nth-of-type(even) .features div, section:nth-of-type(even) .faq div { background: var(--paper); }
.features h3, .faq h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.features p, .faq p { color: var(--muted); font-size: 0.97rem; }

.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.2rem; counter-reset: step; padding: 0; margin: 0; }
.how li { list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; color: var(--muted); }
.how li strong { display: block; color: var(--ink); margin-bottom: 0.25rem; }
.how li::before { counter-increment: step; content: "Step " counter(step); display: block; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust); font-size: 0.85rem; }
.who { margin-top: 1.6rem; color: var(--muted); max-width: 46rem; }

footer { background: var(--pine-deep); color: var(--on-pine-muted); padding: 2.5rem 0; font-size: 0.9rem; }
footer .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1.5rem; }
footer b { color: var(--on-pine); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.85rem; display: block; margin-bottom: 0.4rem; }
footer a { color: var(--on-pine); }

/* the cart */
.drawer-back { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(100%, 27rem); z-index: 41; background: var(--panel); color: var(--ink);
  box-shadow: -10px 0 30px rgba(0,0,0,0.3); display: flex; flex-direction: column; transform: translateX(105%); transition: transform 0.22s ease; }
.drawer.open { transform: none; }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } html { scroll-behavior: auto; } }
.drawer .head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 3px solid var(--mustard); }
.drawer .head h2 { font-size: 1.6rem; }
.drawer .close { font: inherit; font-size: 1.6rem; line-height: 1; background: transparent; border: 0; color: var(--ink); cursor: pointer; padding: 0.2rem 0.5rem; }
.drawer .body { overflow-y: auto; padding: 1rem 1.2rem 1.5rem; display: grid; gap: 1rem; align-content: start; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.8rem; align-items: center; padding-bottom: 0.7rem; border-bottom: 1px dashed var(--line); }
.lines .nm { font-weight: 700; }
.lines .amt { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { font: inherit; font-weight: 700; width: 2.2rem; height: 2.1rem; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.qty button:disabled { opacity: 0.35; cursor: default; }
.qty output { min-width: 1.8rem; text-align: center; font-weight: 700; }
.remove { font: inherit; font-size: 0.88rem; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; justify-self: end; }
.sub { display: flex; justify-content: space-between; gap: 0.8rem; font-size: 0.97rem; }
.sub span:last-child { white-space: nowrap; font-weight: 700; }
.sub.save { color: var(--ok); font-weight: 700; }
.total { display: flex; justify-content: space-between; border-top: 2px solid var(--ink); padding-top: 0.6rem; font-weight: 700; font-size: 1.2rem; }
.discount { background: var(--mustard-soft); border-radius: 8px; padding: 0.7rem 0.85rem; font-size: 0.95rem; }
.fine { font-size: 0.88rem; color: var(--muted); }
.empty { color: var(--muted); }
form.order { display: grid; gap: 0.7rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
form.order h3 { letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.95rem; color: var(--rust); }
form.order label { display: grid; gap: 0.2rem; font-weight: 700; font-size: 0.93rem; }
form.order input, form.order textarea { font: inherit; font-weight: 400; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); width: 100%; }
form.order .req { color: var(--rust); }
form.order .bot { position: absolute; left: -9999px; }
form.order button[type=submit] { font: inherit; font-weight: 700; padding: 0.85rem; border-radius: 8px; border: 0; background: var(--rust); color: #fff; cursor: pointer; }
form.order button[disabled] { opacity: 0.6; cursor: wait; }
.form-msg { font-weight: 700; min-height: 1.2em; }
.form-msg.err { color: var(--rust); } .form-msg.ok { color: var(--ok); }
.callbuy { display: block; text-align: center; text-decoration: none; font-weight: 700; padding: 0.75rem; border-radius: 8px; background: var(--mustard); color: #2a1f05; }
.thanks { background: var(--paper); border: 2px solid var(--ok); border-radius: var(--radius); padding: 1rem; }
.thanks h3 { font-family: var(--display); font-size: 1.4rem; margin-bottom: 0.4rem; }
