/* Bafflebid. The shared look (/_look/look.css) loads after this and sets the type, colours
   and buttons; this file lays out the landing page, the tool and the printed quote. */

* { box-sizing: border-box; }
body { margin: 0; }
header.top, main, .site-footer { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
main.narrow { max-width: 44rem; }
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem; padding-top: 1rem; padding-bottom: 0.5rem; }
header.top nav { font-size: 0.9375rem; }
.small { font-size: 0.875rem; color: var(--muted, #5a5f6b); }
.lede { font-size: 1.125rem; max-width: 52rem; }
img, svg { max-width: 100%; height: auto; }
code { font-size: 0.9em; background: var(--quiet, #f2efe7); padding: 0 0.25em; border-radius: 4px; }
.problems { color: var(--wrong, #9b1c31); }
.other-tab { border-color: var(--ink, #1d2a36); }
.editable[inert] { opacity: 0.6; }
.sent { display: none; border-left: 4px solid #2e7d4f; padding: 0.2rem 0.8rem; }
.sent:target { display: block; }
.link-form { display: grid; gap: 0.5rem; max-width: 24rem; }
.link-form input { font: inherit; padding: 0.45rem 0.55rem; border: 1px solid var(--line, #d8d2c4); border-radius: 6px; }

/* --- landing page ---------------------------------------------------------------------- */
.hero { display: grid; gap: 0.75rem 2rem; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "text" "fig" "act"; padding: 0.25rem 0 1rem; }
.hero-text { grid-area: text; }
.hero-act { grid-area: act; }
.hero h1 { font-size: clamp(1.85rem, 4vw, 2.5rem); margin: 0.25rem 0 0.4rem; }
.hero .sub { font-size: 1.125rem; line-height: 1.5; margin: 0; }
.hero .proof-fig { grid-area: fig; margin: 0; background: var(--surface, #fff); border: 1px solid var(--line, #e4dfd3);
  border-radius: 12px; padding: 0.6rem; }
.hero .proof-fig img { display: block; width: 100%; height: auto; }
.hero .proof-fig figcaption { font-size: 0.8125rem; color: var(--muted, #5a5f6b); margin-top: 0.35rem; }
.hero .actions { margin: 0 0 0.5rem; }
.look .hero .actions .cta { font-size: 1.125rem; }
.hero .priceline { margin: 0; font-size: 0.9375rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; }
.look .hero .priceline .buy-small { min-height: 40px; padding: 0.4rem 1rem; background: var(--surface, #fff); color: var(--accent); }
.look .hero .priceline .buy-small:hover { color: var(--accent-fg); }
.hero .behind-wrap { margin-top: 0.6rem; font-size: 0.875rem; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "text fig" "act fig"; align-items: start; }
}
.objections { list-style: none; padding: 0; display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 860px) { .objections { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.objections li { background: var(--surface, #fff); border: 1px solid var(--line, #e4dfd3); border-radius: 12px; padding: 1rem 1.1rem; }
.objections strong { display: block; margin-bottom: 0.3rem; }
.offer { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); background: var(--surface, #fff);
  border: 1px solid var(--line, #e4dfd3); border-radius: 12px; padding: 1rem 1.25rem; }
@media (min-width: 760px) { .offer { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; } }
.cols { display: grid; gap: 0 2rem; }
@media (min-width: 860px) { .cols { grid-template-columns: 1fr 1fr; } }

/* --- the tool -------------------------------------------------------------------------- */
.panel { background: var(--surface, #fff); border: 1px solid var(--line, #e4dfd3); border-radius: 12px;
  padding: 0.75rem 1rem 1rem; margin: 1rem 0; }
.look .panel h2 { margin-top: 0.25rem; font-size: 1.3rem; }
.look .panel h3 { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
.bar { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem 0.8rem; }
.bar > label { display: grid; gap: 0.2rem; }
.bar p { flex-basis: 100%; margin: 0.25rem 0 0; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
label { font-size: 0.9375rem; }
input[type=text], select, textarea { font: inherit; font-size: 0.9375rem; padding: 0.35rem 0.45rem;
  border: 1px solid var(--line, #d8d2c4); border-radius: 6px; background: var(--bg, #faf8f3); color: var(--fg, #1a1e26); }
input[disabled] { color: var(--muted, #5a5f6b); font-style: italic; }
textarea { width: 100%; }
label.block { display: grid; gap: 0.2rem; margin: 0.6rem 0; }
.look .buttons button, .look .file-button, .look button.add, .look .box-buttons button {
  min-height: 40px; padding: 0.4rem 0.9rem; font-size: 0.9375rem; background: var(--surface, #fff); color: var(--accent); }
.look .buttons button:hover, .look button.add:hover, .look .box-buttons button:hover { color: var(--accent-fg); }
.file-button { position: relative; display: inline-flex; align-items: center; border: 1.5px solid var(--accent);
  border-radius: 10px; font-weight: 600; cursor: pointer; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.grid, .grid3, .grid4 { display: grid; gap: 0.5rem 0.8rem; align-items: end; }
.grid { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid label, .grid3 label, .grid4 label { display: grid; gap: 0.2rem; font-size: 0.875rem; }
.grid input.num, .grid3 input.num, .grid4 input.num { width: 100%; }
label.check { display: flex; gap: 0.4rem; align-items: center; }
fieldset { border: 1px solid var(--line, #e4dfd3); border-radius: 10px; margin: 0; padding: 0.4rem 0.75rem 0.7rem; min-width: 0; }
legend { font-weight: 600; font-size: 0.9375rem; padding: 0 0.3rem; }
.box-head { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: end; margin-bottom: 0.6rem; }
.box-head label { display: grid; gap: 0.2rem; }
.box-head .grow { flex: 1 1 14rem; }
.box-head input.num { width: 5rem; }
.box-buttons { display: flex; gap: 0.4rem; }
.box-cols { display: grid; gap: 0.7rem; }
@media (min-width: 900px) { .box-cols { grid-template-columns: 1fr 1fr; } }
.solve { margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: center; font-size: 0.9375rem; }
.box-out { margin-top: 0.8rem; }
.box-out p { margin: 0.3rem 0; }
.checks { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.25rem; }
.checks li { font-size: 0.9375rem; }
.checks li span { display: inline-block; min-width: 4.2rem; font-weight: 600; font-size: 0.8125rem; padding: 0.05rem 0.4rem;
  border-radius: 6px; text-align: center; margin-right: 0.3rem; }
.checks li.ok span { background: #e3f1e7; color: #1f6038; }
.checks li.bad span { background: #fbe4e6; color: #9b1c31; }
.checks li.bad { color: #9b1c31; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.inputs { border-collapse: collapse; width: 100%; min-width: 36rem; margin-bottom: 0.5rem; }
table.inputs th { text-align: left; font-size: 0.8125rem; padding: 0.2rem 0.25rem; white-space: nowrap; }
table.inputs td { padding: 0.15rem 0.2rem; }
table.inputs td.c { text-align: center; }
table.inputs input[type=text] { width: 100%; min-width: 4.5rem; }
.look table.inputs button.remove { min-height: 32px; padding: 0 0.6rem; background: transparent; color: var(--muted);
  border-color: var(--line); box-shadow: none; font-size: 1.1rem; line-height: 1; }
.checks-line { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: center; }
table.list { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
table.list th, table.list td { text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line, #e4dfd3); }
table.list td.n, table.list th.n { text-align: right; white-space: nowrap; }
table.money { max-width: 40rem; }
table.money tr.sum td { font-weight: 600; }
table.money tr.total td { font-weight: 700; font-size: 1.05rem; border-bottom: 2px solid currentColor; }
figure.sheet { margin: 0.75rem 0 1.25rem; }
figure.sheet figcaption { font-weight: 600; margin-bottom: 0.3rem; }
figure.sheet svg { display: block; width: 100%; max-width: 900px; height: auto; }
.quote-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 1.25rem 0; }
.look button.big { font-size: 1.125rem; }
.buy-box { border-color: var(--accent, #23443a); border-width: 2px; }
.access { padding: 0.6rem 0.9rem; border-radius: 10px; background: var(--wrong-bg, #fcefef); }
.access.ok { background: #e3f1e7; }
.logo-line { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
#logo-preview { max-height: 56px; max-width: 200px; }
button.quiet { opacity: 0.85; }

/* --- the customer quote ----------------------------------------------------------------- */
.quote-sheet { background: #fff; color: #1a1e26; border: 1px solid #ddd; border-radius: 6px; padding: 1.6rem 1.8rem;
  max-width: 50rem; font-size: 0.9375rem; }
.q-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; border-bottom: 2px solid #1a1e26; padding-bottom: 0.8rem; }
.q-shop { display: flex; gap: 0.9rem; align-items: flex-start; }
.q-logo { max-height: 64px; max-width: 160px; }
.q-name { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.2rem; }
.q-contacts { margin: 0; font-size: 0.875rem; line-height: 1.4; }
.q-meta { text-align: right; }
.q-meta p { margin: 0; font-size: 0.875rem; }
.q-meta .q-title { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.2rem; }
.q-for { margin: 0.9rem 0; }
.quote-sheet table { border-collapse: collapse; width: 100%; margin: 0.6rem 0 1rem; }
.quote-sheet th, .quote-sheet td { text-align: left; padding: 0.35rem 0.4rem; border-bottom: 1px solid #ddd; }
.quote-sheet th { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.03em; color: #555; }
.quote-sheet .n { text-align: right; white-space: nowrap; }
.quote-sheet tfoot td { border-bottom: 0; }
.quote-sheet tr.q-total td { font-weight: 700; font-size: 1.1rem; border-top: 2px solid #1a1e26; }
.q-note { font-size: 0.8125rem; color: #555; margin: 0; }

@media print {
  /* Printing from the page's button shows the quote alone, on as few pages as it takes. */
  body[data-print="quote"] header.top, body[data-print="quote"] .site-footer,
  body[data-print="quote"] main > :not(#tool), body[data-print="quote"] #tool > :not(#quote-view),
  body[data-print="quote"] #quote-view > :not(#quote-sheet) { display: none !important; }
  body[data-print="quote"] main, body[data-print="quote"] #quote-view { margin: 0; padding: 0; border: 0; max-width: none; }
  body[data-print="quote"] #quote-sheet { max-width: none; border: 0; padding: 0; }
  @page { margin: 0.6in; }
}
