/* mulebuyqc.org — hand-written static styles.
   Colour direction: off-white ground, deep blue-grey text, small earth-brown problem tags.
   No dashboards, no warning-marketing. */

:root {
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --ink: #26313c;          /* deep blue-grey body */
  --ink-soft: #4d5a67;
  --ink-faint: #6b7885;
  --ground: #f7f4ee;       /* off-white page */
  --surface: #ffffff;
  --surface-2: #f1ece3;
  --line: #e0d9cd;
  --line-strong: #cabfac;
  --brand: #2f4858;        /* dark slate-blue for headings/links */
  --brand-strong: #223642;
  --earth: #8a5a3c;        /* small-area problem tag */
  --earth-soft: #f0e4d8;
  --earth-ink: #6f4326;
  --accent-line: #b98a5e;
  --focus: #2f6fa8;

  --maxw: 1240px;
  --measure: 68ch;
  --radius: 8px;
  --radius-sm: 5px;

  --gap-section: 56px;     /* real boundary gap between major blocks (desktop) */
  --pad-x: 20px;

  --h1: 48px; --h1-lh: 1.15;
  --h2: 28px;
  --h3: 18px;
  --body: 16px; --body-lh: 1.7;
  --small: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--body);
  line-height: var(--body-lh);
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 { color: var(--brand-strong); line-height: 1.25; margin: 0; letter-spacing: -0.01em; overflow-wrap: break-word; }
h1 { font-size: var(--h1); font-weight: 800; line-height: var(--h1-lh); letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--h2); font-weight: 700; line-height: 1.3; text-wrap: balance; }
h3 { font-size: var(--h3); font-weight: 600; line-height: 1.4; }
p { margin: 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.measure { max-width: var(--measure); }

/* ---------- skip link ---------- */
.skip { position: absolute; left: -9999px; top: 0; background: var(--brand-strong); color: #fff; padding: 10px 16px; z-index: 60; border-radius: 0 0 6px 0; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 18px; min-height: 62px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: 18px; color: var(--brand-strong); text-decoration: none; letter-spacing: -0.02em; }
.brand .mark { color: var(--earth); }
.brand small { font-weight: 500; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.01em; }

.nav { margin-left: auto; }
.nav summary { list-style: none; cursor: pointer; font-size: var(--small); font-weight: 600; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--brand-strong); background: var(--surface); display: inline-flex; align-items: center; gap: 8px; }
.nav summary::-webkit-details-marker { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.nav li { margin: 0; }
.nav a { font-size: var(--small); font-weight: 500; color: var(--ink-soft); text-decoration: none; padding: 8px 10px; border-radius: var(--radius-sm); display: block; }
.nav a:hover { background: var(--surface-2); color: var(--brand-strong); }
.nav a[aria-current="page"] { color: var(--brand-strong); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent-line); border-radius: 0; }

/* header search */
.hsearch { display: flex; gap: 6px; width: 100%; max-width: 320px; }
.hsearch input { flex: 1 1 auto; min-width: 0; }

@media (max-width: 819px) {
  .nav ul { display: none; flex-direction: column; width: 100%; margin-top: 10px; gap: 2px; }
  .nav[open] ul { display: flex; }
  .nav { margin-left: auto; width: auto; }
  .nav[open] { width: 100%; }
  .nav a { padding: 10px 8px; border-bottom: 1px solid var(--line); }
}
@media (min-width: 820px) {
  .nav summary { display: none; }
  .nav ul { display: flex !important; }
}

/* ---------- inputs & buttons ---------- */
input[type="search"], input[type="text"] {
  font: inherit; font-size: var(--small); padding: 9px 11px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); width: 100%;
}
.btn {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; text-decoration: none; line-height: 1.2;
  min-height: 44px; justify-content: center;
}
.btn-primary { background: var(--brand-strong); color: #fff; border-color: var(--brand-strong); }
.btn-primary:hover { background: #16262f; color: #fff; }
.btn-outline { background: var(--surface); color: var(--brand-strong); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--surface-2); color: var(--brand-strong); }
.btn-sm { padding: 8px 12px; font-size: var(--small); min-height: 38px; }

/* ---------- layout blocks ---------- */
main { display: block; }
.stack { display: flex; flex-direction: column; gap: var(--gap-section); }
.section-pad { padding: 40px 0; }         /* used for single hero band where a background is needed */
.page-lead { padding-top: 34px; }

.hero { background: linear-gradient(180deg, #fbf9f4 0%, var(--ground) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { padding: 46px 0 42px; }
.hero p.lead { font-size: 19px; line-height: 1.6; color: var(--ink-soft); margin-top: 16px; max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--earth); margin-bottom: 12px; }

.tasklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 26px; }
.tasklink { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; }
.tasklink:hover { border-color: var(--line-strong); background: #fffdf9; }
.tasklink strong { display: block; color: var(--brand-strong); font-size: 16px; }
.tasklink span { display: block; color: var(--ink-soft); font-size: var(--small); margin-top: 5px; line-height: 1.5; }
.tasklink .arrow { color: var(--earth); font-weight: 700; }

.block h2 + .sub { color: var(--ink-soft); margin-top: 10px; max-width: var(--measure); }
.block > .head { margin-bottom: 22px; }

/* two-column info */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.cols > * { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: var(--small); line-height: 1.6; }
.card ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: var(--small); line-height: 1.65; }
.card ul li { margin: 3px 0; }

/* problem tag (small earth-brown) */
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--earth-ink); background: var(--earth-soft); border: 1px solid #e2cdb6; padding: 2px 9px; border-radius: 999px; letter-spacing: 0.01em; }
.tag.neutral { color: var(--ink-soft); background: var(--surface-2); border-color: var(--line); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 20px; }
.grid > * { min-width: 0; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.pcard a.thumb { display: block; background: var(--surface-2); aspect-ratio: 1 / 1; overflow: hidden; }
.pcard a.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .title { font-size: var(--small); line-height: 1.45; font-weight: 600; color: var(--brand-strong); text-decoration: none; overflow-wrap: break-word; }
.pcard .title:hover { text-decoration: underline; }
.pcard .meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pcard .price { font-size: var(--small); font-weight: 700; color: var(--ink); }
.pcard .price .approx { font-weight: 400; color: var(--ink-faint); font-size: 12px; }
.pcard .qcflag { font-size: 11px; font-weight: 600; }
.qc-yes { color: var(--earth-ink); }
.qc-no { color: var(--ink-faint); }

/* ---------- breadcrumb ---------- */
.crumbs { font-size: 13px; color: var(--ink-faint); padding: 18px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs li::after { content: "/"; margin-left: 6px; color: var(--line-strong); }
.crumbs li:last-child::after { content: ""; }
.crumbs li[aria-current] { color: var(--ink-soft); }

/* ---------- product detail ---------- */
.pdetail { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 34px; align-items: start; }
.pdetail > * { min-width: 0; }
.pmain-img { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pmain-img img { width: 100%; height: auto; }
.pinfo h1 { font-size: 30px; line-height: 1.25; }
.priceline { margin: 18px 0 6px; }
.priceline .p1 { font-size: 24px; font-weight: 800; color: var(--ink); }
.priceline .p2 { font-size: 16px; color: var(--ink-soft); margin-left: 8px; }
.price-note { font-size: 13px; color: var(--ink-faint); line-height: 1.6; max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 14px; }
.redirect-note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent-line); border-radius: var(--radius); padding: 14px 16px; font-size: var(--small); color: var(--ink-soft); line-height: 1.6; }
.attrs { margin: 20px 0 0; border-top: 1px solid var(--line); }
.attrs dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0 0; font-size: var(--small); }
.attrs dt { color: var(--ink-faint); }
.attrs dd { margin: 0; color: var(--ink); overflow-wrap: break-word; }

/* QC block */
.qc-block { margin-top: 8px; }
.qc-block h2 { font-size: 22px; }
.qc-lead { color: var(--ink-soft); font-size: var(--small); line-height: 1.65; max-width: var(--measure); margin-top: 8px; }
.qc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.qc-gallery > * { min-width: 0; }
.qc-shot { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 3 / 4; }
.qc-shot img { width: 100%; height: 100%; object-fit: cover; }
.qc-empty { margin-top: 16px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 18px; color: var(--ink-soft); font-size: var(--small); line-height: 1.65; }
.qc-empty strong { color: var(--brand-strong); }

/* ---------- article ---------- */
.article { max-width: 74ch; }
.article h2 { font-size: 24px; margin-top: 8px; }
.article h3 { font-size: 17px; margin-top: 4px; }
.article p { margin: 0 0 2px; color: var(--ink); }
.article ul, .article ol { margin: 0; padding-left: 22px; color: var(--ink); }
.article li { margin: 6px 0; }
.article .note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent-line); border-radius: var(--radius); padding: 14px 16px; font-size: var(--small); color: var(--ink-soft); }
.prose-stack { display: flex; flex-direction: column; gap: 22px; }
.prose-stack section { display: flex; flex-direction: column; gap: 10px; }

/* checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { position: relative; padding-left: 28px; color: var(--ink); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 10px; height: 10px; border: 2px solid var(--accent-line); border-radius: 3px; }

/* faq */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 16px; margin: 0; }
.faq details + details { margin-top: 12px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--brand-strong); padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--earth); font-weight: 700; margin-right: 10px; }
.faq details[open] summary::before { content: "–"; }
.faq .ans { padding: 0 0 14px; color: var(--ink-soft); font-size: var(--small); line-height: 1.7; }

/* status band */
.statusrow { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.statusrow .dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-line); margin-top: 7px; }
.statusrow div { min-width: 0; }
.statusrow strong { color: var(--brand-strong); }
.statusrow p { color: var(--ink-soft); font-size: var(--small); line-height: 1.6; margin-top: 4px; }

/* related */
.related h2 { font-size: 22px; }

/* category chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--brand-strong); font-size: var(--small); font-weight: 600; background: var(--surface); }
.chip:hover { background: var(--surface-2); }
.chip .n { color: var(--ink-faint); font-weight: 500; }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-strong); color: #cdd8e0; margin-top: 64px; padding: 40px 0 30px; font-size: var(--small); }
.site-footer a { color: #e7edf1; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-grid > * { min-width: 0; }
.foot-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: #9fb2bf; margin: 0 0 12px; font-weight: 700; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-note { border-top: 1px solid #3a5361; margin-top: 28px; padding-top: 18px; color: #9fb2bf; line-height: 1.65; }
.foot-note p { margin: 0 0 8px; }
.foot-brand { font-weight: 800; color: #fff; font-size: 16px; }

/* ---------- utility ---------- */
.small { font-size: var(--small); color: var(--ink-soft); }
.muted { color: var(--ink-faint); }
.mt-s { margin-top: 10px; } .mt-m { margin-top: 20px; } .mt-l { margin-top: 32px; }
.src-attr { font-size: 12px; color: var(--ink-faint); margin-top: 8px; }
.emptystate { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 20px; color: var(--ink-soft); font-size: var(--small); }
.pagelist { columns: 2; column-gap: 30px; }
.pagelist a { display: inline-block; margin-bottom: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .pdetail { grid-template-columns: 1fr; gap: 22px; }
  .pmain-img { max-width: 460px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  :root {
    --h1: 32px; --h1-lh: 1.2;
    --h2: 22px;
    --h3: 16px;
    --body: 15px; --body-lh: 1.6;
    --small: 13px;
    --gap-section: 40px;
    --pad-x: 16px;
  }
  .hero-inner { padding: 34px 0 30px; }
  .hero p.lead { font-size: 17px; }
  .pinfo h1 { font-size: 26px; }
  .priceline .p1 { font-size: 21px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
  .pagelist { columns: 1; }
  .article, .measure { max-width: 100%; }
}
@media (max-width: 400px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
