:root {
  --bg: #06060f;
  --bg2: #0d1117;
  --surface: #22313f;
  --accent: #4d9fff;
  --accent2: #00d4ff;
  --gold: #e9a23b;
  --text: #fbf8f2;
  --muted: rgba(251, 248, 242, 0.6);
  --radius: 10px;
  --sans: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--sans); background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
}
header { padding: 0 0 14px; }
.wordmark { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin: 0; }
.wordmark .b { color: var(--accent); }
.byline { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.byline a { color: var(--accent); text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.tagline { color: var(--muted); margin: 6px 0 0; font-size: 13px; line-height: 1.4; }
main {
  flex: 1; display: grid; grid-template-columns: 340px 1fr; gap: 24px;
  padding: 24px 32px 32px; align-items: start;
}
.left-col { display: flex; flex-direction: column; }
.panel { background: var(--bg2); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius); padding: 20px; }
.field { margin-bottom: 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select {
  width: 100%; padding: 9px 10px; background: var(--surface); color: var(--text);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; font-size: 15px;
}
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.dims { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.toggle { display: inline-flex; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; overflow: hidden; }
.toggle button { background: transparent; color: var(--muted); border: 0; padding: 6px 14px; cursor: pointer; font-size: 14px; }
.toggle button.active { background: var(--accent); color: #04121f; font-weight: 700; }
.preview-wrap { display: flex; flex-direction: column; gap: 12px; }
.results { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 14px; }
.results .legend { margin-top: 2px; }
.paper { background: #f7f5ef; border-radius: var(--radius); padding: 18px; min-height: 320px; display: flex; align-items: center; justify-content: center; }
.paper svg { max-width: 100%; height: auto; }
.legend { display: flex; gap: 20px; font-size: 13px; color: var(--muted); align-items: center; }
.swatch { display: inline-block; width: 22px; height: 0; border-top: 3px solid; margin-right: 6px; vertical-align: middle; }
.swatch.cut { border-color: #000; }
.swatch.fold { border-color: var(--accent); }
.meta { color: var(--muted); font-size: 13px; }
.meta.fit-ok { color: #45c47a; font-weight: 600; }
.meta.fit-bad { color: var(--gold); font-weight: 600; }
.error { color: var(--gold); font-size: 13px; min-height: 16px; }
.btn {
  display: inline-block; background: var(--gold); color: #1a1205; font-weight: 700;
  padding: 10px 18px; border-radius: 6px; text-decoration: none; border: 0; cursor: pointer; font-size: 15px;
}
.btn[disabled], .btn.disabled { opacity: 0.4; pointer-events: none; }
/* SEO / about content */
.seo { border-top: 1px solid rgba(255,255,255,0.06); padding: 40px 32px; }
.seo-inner { max-width: 760px; margin: 0 auto; }
.seo h2 { font-size: 20px; font-weight: 700; margin: 28px 0 8px; letter-spacing: -0.3px; }
.seo h2:first-child { margin-top: 0; }
.seo h3 { font-size: 15px; font-weight: 600; margin: 18px 0 4px; color: var(--accent); }
.seo p { color: var(--muted); line-height: 1.6; margin: 0 0 10px; }
.seo ol { color: var(--muted); line-height: 1.6; padding-left: 20px; }
.seo li { margin-bottom: 6px; }
.seo code { background: var(--surface); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; color: var(--text); }
.seo strong { color: var(--text); font-weight: 600; }

/* Footer */
footer { padding: 20px 32px 28px; text-align: center; border-top: 1px solid rgba(255,255,255,0.06); font-size: 13px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer .o { color: var(--accent); }
footer .sep { margin: 0 8px; opacity: 0.35; }
footer .copyright { margin-top: 10px; color: var(--muted); opacity: 0.75; }

@media (max-width: 720px) { main { grid-template-columns: 1fr; } .seo { padding: 32px 24px; } }
