/* Print It Make It — shared design system */
:root {
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --ink: #2D2A26;
  --muted: #6B6459;
  --line: #E8E1D5;
  --brand: #E85D4A;
  --brand-dark: #C74634;
  --accent: #2A9D8F;
  --accent-light: #E3F2F0;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(45, 42, 38, 0.07);
  --maxw: 1080px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* header / footer */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -0.3px; }
.brand span { color: var(--brand); }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 60px; padding: 34px 0; color: var(--muted); font-size: 14.5px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* hero */
.hero { padding: 54px 0 30px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.8px; line-height: 1.15; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.sub { color: var(--muted); max-width: 620px; margin: 14px auto 0; font-size: 18px; }

/* tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 34px 0 10px; }
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px;
  color: var(--ink); transition: transform .12s ease, box-shadow .12s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(45,42,38,.11); text-decoration: none; }
.tool-card .emoji { font-size: 30px; }
.tool-card h3 { font-size: 18.5px; letter-spacing: -0.2px; }
.tool-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.tool-card .go { color: var(--brand); font-weight: 700; font-size: 14.5px; }

/* content */
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px clamp(20px, 4vw, 40px); margin: 26px 0; }
.article h2 { font-size: 24px; margin: 26px 0 12px; letter-spacing: -0.4px; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 18.5px; margin: 20px 0 8px; }
.article p, .article li { color: #45403A; }
.article ul, .article ol { padding-left: 22px; margin: 10px 0; }
.article li { margin: 5px 0; }
.section-intro { max-width: 760px; margin: 8px 0 4px; color: var(--muted); }

/* tool widget */
.tool-box {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 24px clamp(16px, 3vw, 30px); margin: 26px 0; box-shadow: 6px 6px 0 rgba(45,42,38,.12);
}
.tool-box .controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 18px; }
.tool-box label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.tool-box select, .tool-box input[type="number"] {
  font: inherit; font-size: 15px; padding: 9px 12px; border: 1.5px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); min-width: 110px;
}
.tool-box select:focus, .tool-box input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: 15.5px;
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  padding: 11px 22px; cursor: pointer; transition: background .12s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.secondary:hover { background: var(--bg); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: #21867A; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.dropzone {
  border: 2.5px dashed var(--line); border-radius: 12px; padding: 34px 20px;
  text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-light); }
.dropzone strong { color: var(--ink); }

.status { font-size: 14px; color: var(--muted); margin-top: 8px; min-height: 20px; }
canvas.pattern { max-width: 100%; height: auto; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* bead inventory / result tables */
.inventory { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bead-chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px 4px 5px; font-size: 13.5px; background: #fff;
}
.bead-chip .sw { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
.bead-chip .sym { font-weight: 800; color: var(--muted); font-size: 12px; }

/* result frame */
.result-area { margin-top: 20px; display: none; }
.result-area.show { display: block; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
details summary { cursor: pointer; font-weight: 700; font-size: 16.5px; }
details p { margin-top: 8px; color: #45403A; }

/* worksheet */
.ws-sheet { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px 30px; margin-top: 18px; }
.ws-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 34px; }
.ws-item { font-size: 19px; padding: 7px 2px; border-bottom: 1px dotted #D8D2C6; font-variant-numeric: tabular-nums; }
.ws-ans { display: inline-block; min-width: 64px; border-bottom: 1.5px solid #B9B2A4; }

/* converter result */
.conv-result { font-size: 26px; font-weight: 800; margin-top: 16px; color: var(--accent); min-height: 36px; }
table.chart { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
table.chart th, table.chart td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
table.chart th { background: var(--bg); font-size: 13.5px; }

/* calendar */
.cal-wrap { overflow-x: auto; }
table.shiftcal { border-collapse: collapse; margin-top: 16px; font-size: 13px; width: 100%; min-width: 720px; }
table.shiftcal th, table.shiftcal td { border: 1px solid var(--line); width: 14.28%; text-align: center; padding: 6px 4px; }
table.shiftcal th { background: var(--ink); color: #fff; font-size: 12.5px; }
table.shiftcal td .d { font-weight: 700; display: block; }
table.shiftcal td.off { color: #C9C2B4; }
table.shiftcal td .tag { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 700; color: #fff; }

@media print {
  .site-header, .site-footer, .no-print, .tool-box .controls, .dropzone { display: none !important; }
  body { background: #fff; }
  .article, .tool-box { border: none; box-shadow: none; padding: 0; }
  .result-area { display: block !important; }
}
@media (max-width: 640px) {
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 13.5px; }
  .ws-grid { grid-template-columns: 1fr; }
}
