/* Mutt Guitars — "Vintage catalog" theme.
   Retro look in colors, headings and logo only; the builder UI stays clean and modern. */
:root {
  --cream: #FAF6EC;
  --ink: #2B2B2B;
  --seafoam: #7FB7A4;
  --seafoam-dark: #3F7F6A;
  --rust: #A0522D;
  --rust-dark: #7E3E20;
  --card: #FFFFFF;
  --line: #E4DCCB;
  --muted: #6B6458;
  --block: #A0522D;
  --block-bg: #FBEDE6;
  --warn: #8A6100;
  --warn-bg: #FFF4D6;
  --note-bg: #EEF5F2;
  --preview-bg: #E7E7E4;
  --radius: 12px;
  --heading: "Rockwell", "Roboto Slab", "Georgia", "Cambria", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --total-h: 64px;
  --strip-h: 64px; /* bottom strip under the total bar: the host's "Powered by Netlify" badge (64px tall, pinned bottom right) sits on it */
}
* { box-sizing: border-box; }
/* Nothing may stick out sideways: phones could otherwise zoom out past the page edge and show a blank strip.
   clip (not hidden) keeps the pinned drawing working. */
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink); font-family: var(--ui); font-size: 15px; line-height: 1.45;
  padding-bottom: calc(var(--total-h) + var(--strip-h) + 24px + env(safe-area-inset-bottom));
}
a { color: var(--rust-dark); }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; letter-spacing: 0.01em; margin: 0 0 0.6em; }
h2 { font-size: 1.25rem; color: var(--ink); border-bottom: 2px solid var(--seafoam); padding-bottom: 0.3em; }
h3 { font-size: 1rem; }

/* Header + logo */
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 14px 20px 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-img { display: block; height: 56px; width: auto; }
.footer-badge { float: right; width: 64px; height: auto; margin: 0 0 8px 16px; }
.tagline { margin: 0; color: var(--muted); font-family: var(--heading); font-style: italic; }
.sample-banner { margin: 0 20px 12px; padding: 8px 12px; border: 1px dashed var(--rust); border-radius: 8px; background: #FFF9EE; font-size: 0.9rem; }

/* Layout: guitar large on the left, parts on the right */
.layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, 1fr); gap: 18px; padding: 0 20px; align-items: start; }
.col-left { position: sticky; top: 10px; display: grid; gap: 18px; }
.col-right { display: grid; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }

/* Preview */
.preview-card { padding: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 10px; }
.preview { background: var(--preview-bg); border-radius: 10px; aspect-ratio: 1117 / 427; width: 100%; overflow: hidden; display: grid; place-items: center; }
.preview svg { width: 100%; height: 100%; display: block; }
.preview .loading { color: var(--muted); }
.dims { margin: 8px 2px 0; color: var(--muted); font-size: 0.88rem; }

/* Segmented buttons + switch */
.seg { display: inline-flex; border: 1px solid #CFC6B3; border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { font: inherit; font-size: 0.9rem; border: 0; background: transparent; padding: 7px 14px; cursor: pointer; color: var(--ink); min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--seafoam); color: #10261F; font-weight: 600; }
.seg button:focus-visible, .btn:focus-visible, select:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }
.seg.small button { padding: 4px 10px; min-height: 30px; font-size: 0.82rem; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.92rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 40px; height: 22px; border-radius: 999px; background: #CFC6B3; position: relative; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--seafoam-dark); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--rust); outline-offset: 2px; }

/* Part pickers */
.slot { border-top: 1px solid var(--line); padding: 12px 0; }
.slot:first-child { border-top: 0; padding-top: 0; }
.slot-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.slot-head h3 { margin: 0; }
select { width: 100%; font: inherit; font-size: 0.92rem; padding: 8px 10px; border: 1px solid #CFC6B3; border-radius: 8px; background: #fff; color: var(--ink); min-height: 40px; }
select:disabled { background: #F4F1EA; color: var(--muted); }
.part-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.part-meta .price { color: var(--ink); font-weight: 600; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.badge-sample { background: #EFE7D6; color: #6B5A33; }
.badge-verify { background: var(--warn-bg); color: var(--warn); border: 1px solid #E8C770; }
.badge-custom { background: #E3F0EB; color: var(--seafoam-dark); }
.badge-stock { background: #F3E1D8; color: var(--rust); }
.option-pick { display: grid; gap: 3px; margin-top: 8px; font-size: 0.8rem; color: var(--muted); }
.custom-form { display: grid; gap: 10px; margin-top: 8px; }
.custom-form fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; border: 1px solid var(--line, #ddd6c6); border-radius: 8px; padding: 8px 10px 10px; margin: 0; }
.custom-form legend { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0 4px; }
.spec-sheet { font-size: 0.83rem; }
.spec-sheet summary { cursor: pointer; font-weight: 600; }
.spec-sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 6px 0 0; }
.spec-sheet dt { color: var(--muted); }
.spec-sheet dd { margin: 0; }
.custom-form label { display: grid; gap: 3px; font-size: 0.8rem; color: var(--muted); }
.custom-note { grid-column: 1 / -1; font-size: 0.83rem; background: var(--note-bg); border-radius: 8px; padding: 8px 10px; margin: 0; }
.fit-hint { font-size: 0.8rem; color: var(--muted); margin: 4px 0 0; }

/* Fit checks */
.check { border-radius: 8px; margin: 0 0 8px; border: 1px solid transparent; }
.check summary { cursor: pointer; padding: 9px 12px; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.check summary::-webkit-details-marker { display: none; }
.check summary::after { content: "Why?"; margin-left: auto; font-size: 0.78rem; text-decoration: underline; color: var(--muted); white-space: nowrap; }
.check[open] summary::after { content: "Hide"; }
.check .body { padding: 0 12px 10px; font-size: 0.9rem; }
.check .why { color: var(--muted); }
.check .lvl { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 4px; flex: none; }
.check.block { background: var(--block-bg); border-color: #E7C2B0; }
.check.block .lvl { background: var(--block); color: #fff; }
.check.warn { background: var(--warn-bg); border-color: #F0D58C; }
.check.warn .lvl { background: #C98F00; color: #fff; }
.check.note, .check.suggest { background: var(--note-bg); border-color: #CFE3DB; }
.check.note .lvl, .check.suggest .lvl { background: var(--seafoam-dark); color: #fff; }
.all-good { background: var(--note-bg); padding: 10px 12px; border-radius: 8px; margin: 0 0 8px; }
.notice { background: #FFF9EE; border-left: 4px solid var(--rust); padding: 8px 10px; border-radius: 6px; margin: 0 0 8px; font-size: 0.88rem; }

/* Checklist */
.list { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.list th, .list td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.list td.num, .list th.num { text-align: right; white-space: nowrap; }
.list .slot-name { color: var(--muted); font-size: 0.78rem; display: block; }
.list .why { color: var(--muted); font-size: 0.8rem; display: block; }
.nolink { color: var(--muted); font-size: 0.8rem; }
.subhead { font-family: var(--heading); font-size: 1rem; margin: 18px 0 6px; }
.notes, .tools { margin: 0; padding-left: 1.2em; font-size: 0.9rem; }
.notes li, .tools li { margin: 3px 0; }
.difficulty { display: flex; align-items: center; gap: 10px; }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 16px; height: 10px; border-radius: 2px; background: #E4DCCB; display: block; }
.meter i.on { background: var(--rust); }
.shipping-lines { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; padding-left: 1.2em; }

/* Pinned running total */
.total-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--strip-h) + env(safe-area-inset-bottom)); z-index: 20; min-height: var(--total-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: var(--ink); color: var(--cream);
  border-top: 4px solid var(--seafoam);
}
.bottom-strip {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--strip-h) + env(safe-area-inset-bottom));
  padding: 0 210px env(safe-area-inset-bottom) 20px; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; align-content: center;
  background: #1E1E1E; color: #CFC6B3; font-size: 0.8rem; border-top: 1px solid #3A3A3A;
}
.bottom-strip strong { color: var(--cream); font-family: var(--heading); letter-spacing: 0.03em; }
.bottom-strip a { color: #CFC6B3; }
.total-figures { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: baseline; }
.total-figures .big { font-family: var(--heading); font-size: 1.45rem; font-weight: 800; color: #fff; }
.total-figures .lbl { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: #CFC6B3; margin-right: 6px; }
.total-figures .warnflag { color: #FFB38A; font-weight: 700; }
.btn { font: inherit; font-weight: 600; border-radius: 999px; padding: 9px 16px; border: 0; cursor: pointer; min-height: 40px; }
.btn-primary { white-space: nowrap; background: var(--seafoam); color: #10261F; }
.btn-primary:hover { background: #95C7B6; }

.site-footer { display: flow-root; padding: 18px 20px 0; font-size: 0.85rem; color: var(--muted); max-width: 900px; }

/* Plain pages */
.plain-page main.prose { max-width: 720px; margin: 10px 20px 40px; }
.plain-page { padding-bottom: 0; }

/* Phones: stack, keep the guitar and the total visible */
@media (max-width: 900px) {
  :root { --total-h: 58px; }
  .site-header { padding: 10px 12px 4px; }
  .logo-img { height: 42px; }
  .footer-badge { width: 52px; }
  .tagline { font-size: 0.85rem; }
  .sample-banner { margin: 0 12px 10px; font-size: 0.8rem; }
  .layout { grid-template-columns: 1fr; padding: 0 10px; gap: 12px; }
  /* Let the cards join the main grid so the drawing can stay pinned while you scroll. */
  .col-left, .col-right { display: contents; }
  .preview-card { position: sticky; top: 0; z-index: 10; padding: 8px; border-radius: 0 0 var(--radius) var(--radius); }
  .toolbar { margin-bottom: 6px; gap: 8px 14px; }
  .dims { font-size: 0.78rem; margin-top: 4px; }
  .card { padding: 12px; }
  .custom-form fieldset { grid-template-columns: 1fr; }
  .total-bar { padding: 8px 12px; }
  .bottom-strip { padding-left: 12px; font-size: 0.75rem; gap: 2px 10px; }
  .total-figures { gap: 0 14px; }
  .total-figures .big { font-size: 1.2rem; }
  .total-figures .opt { display: none; }
  .btn { padding: 8px 12px; font-size: 0.85rem; }
  .list .hide-sm { display: none; }
}

/* Find parts */
.finder summary { cursor: pointer; list-style: none; display: grid; gap: 2px; }
.finder summary::-webkit-details-marker { display: none; }
.finder summary h3::after { content: " ▾"; color: var(--muted); font-size: 0.8em; }
.finder[open] summary h3::after { content: " ▴"; }
.finder-controls { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0 4px; }
.finder-controls label { display: grid; gap: 3px; font-size: 0.8rem; color: var(--muted); min-width: 150px; flex: 1; }
.finder-results { list-style: none; margin: 6px 0 0; padding: 0; max-height: 360px; overflow-y: auto; border-top: 1px solid var(--line, #ddd6c6); }
.finder-results li { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 8px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--line, #ddd6c6); font-size: 0.85rem; }
.finder-results li.nofit { opacity: 0.55; }
.finder-name .why { display: block; }
.finder-brand { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: var(--rust, #A0522D); text-transform: uppercase; }
.finder-results li > .price { font-weight: 700; white-space: nowrap; }
.finder-q input { font: inherit; padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.25); display: inline-block; }
.finder-use, .finder-custom { font: inherit; font-size: 0.8rem; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--seafoam, #7FB7A4); background: #fff; cursor: pointer; }
.finder-use:hover, .finder-custom:hover { background: var(--seafoam, #7FB7A4); color: #fff; }
.finder-use:disabled { cursor: not-allowed; border-color: #ccc; }
.finder-custom { margin: 2px 2px 0 0; }
.phone-price { display: none; }
@media (max-width: 640px) { .finder-results li { grid-template-columns: 24px 1fr auto; } .finder-results li > .price { display: none; } .phone-price { display: inline; } }

/* My builds */
.build-save { display: flex; gap: 8px; }
.build-save input, .build-rename input { flex: 1; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#builds-msg:empty { display: none; }
.builds-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.builds-empty { color: var(--muted); font-size: 0.85rem; }
.build-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.build-info { display: grid; min-width: 0; }
.build-name { font-weight: 600; overflow-wrap: anywhere; }
.build-meta { font-size: 0.8rem; color: var(--muted); }
.build-actions, .build-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.build-rename { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.btn-small { min-height: 32px; padding: 5px 12px; font-size: 0.85rem; background: var(--seafoam); color: #10261F; }
.btn-quiet { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: var(--rust); color: #fff; }

/* Feedback form */
.feedback-form { display: grid; gap: 14px; }
.feedback-form label { display: grid; gap: 4px; font-weight: 600; }
.feedback-form input, .feedback-form select, .feedback-form textarea { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.feedback-form textarea { min-height: 140px; resize: vertical; }
.feedback-form .hint { font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.feedback-form .bot-field { position: absolute; left: -9999px; }

