/* Woodworking Calculators - lightweight shared styles. No frameworks. */
:root {
  --ink: #26221c;
  --muted: #6f6a5e;
  --accent: #9a6a2f;
  --accent-dark: #7c5423;
  --bg: #faf8f4;
  --card: #ffffff;
  --line: #e4ded2;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px 48px; }

header.site-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 18px 0 8px; flex-wrap: wrap;
}
.site-name { font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.site-name span { color: var(--accent); }
nav.main-nav a { color: var(--muted); text-decoration: none; margin-left: 16px; font-size: .95rem; }
nav.main-nav a:hover { color: var(--accent-dark); text-decoration: underline; }

h1 { font-size: 1.7rem; line-height: 1.3; margin: 18px 0 8px; }
h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin: 16px 0;
}

.tool-list { list-style: none; padding: 0; margin: 0; }
.tool-list li { margin: 10px 0; }
.tool-list a {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; color: var(--ink); text-decoration: none;
}
.tool-list a:hover { border-color: var(--accent); }
.tool-list .tool-title { font-weight: 700; font-size: 1.05rem; }
.tool-list .tool-desc { color: var(--muted); font-size: .92rem; }

/* Calculator rows */
.board-row {
  display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px dashed var(--line);
  grid-template-columns: repeat(2, 1fr);
}
.board-row:last-child { border-bottom: none; }
@media (min-width: 760px) {
  .board-row { grid-template-columns: 1.5fr .8fr .8fr 1.1fr .6fr 1fr .8fr auto; align-items: end; }
}
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.field input, .field select {
  width: 100%; padding: 10px; font-size: 1rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.length-wrap { display: flex; gap: 6px; }
.length-wrap input { flex: 1; }
.length-wrap select { width: 64px; }
.field-result output { display: block; font-size: 1.05rem; font-weight: 700; padding: 8px 0; }
.remove-row {
  background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 38px; height: 38px; font-size: 1.2rem; cursor: pointer; color: var(--muted);
}
.remove-row:hover { color: #b3261e; border-color: #b3261e; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  border-radius: 10px; padding: 11px 18px; font-size: 1rem; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: #fff; color: var(--accent-dark); border: 1px solid var(--accent); }

.waste-row { display: flex; align-items: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.waste-row input { width: 90px; padding: 10px; font-size: 1rem; border: 1px solid var(--line); border-radius: 10px; }

.summary { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .summary { grid-template-columns: repeat(2, 1fr); } }
.summary .item { background: #f4efe6; border-radius: 10px; padding: 12px 14px; }
.summary .item .label { font-size: .8rem; color: var(--muted); }
.summary .item .value { font-size: 1.3rem; font-weight: 700; }

table.ref { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .95rem; }
table.ref th, table.ref td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
table.ref th { background: #f4efe6; }

.formula {
  background: #f4efe6; border-radius: 10px; padding: 14px 16px;
  font-size: 1.05rem; text-align: center; margin: 14px 0;
}

footer.site-footer { color: var(--muted); font-size: .85rem; margin-top: 40px; }

/* Print: show only the shopping list summary */
.print-only { display: none; }
@media print {
  header.site-header, nav.main-nav, .no-print, footer.site-footer { display: none !important; }
  .print-only { display: block; }
  .card { border: none; padding: 0; }
}
