/* ===== SchemaHub — shared styles ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Ink & Vermilion — charcoal, vermilion red, gold */
  --primary: #d13c2b;
  --primary-dark: #a93021;
  --accent: #f6c453;
  --dark: #131211;
  --dark-2: #1e1b19;
  --text: #292524;
  --muted: #78716c;
  --line: #e7e5e4;
  --bg: #faf9f7;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--dark);
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 20px; min-height: 64px;
}
.logo { font-size: 1.25rem; font-weight: 800; color: #fff; letter-spacing: .3px; }
.logo span { color: var(--accent); }
.logo:hover { opacity: .9; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav > a, .dd-btn {
  display: block; color: #d6d3d1; font-size: .93rem; font-weight: 500;
  padding: 9px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav > a:hover, .dd-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav > a.active { color: #fff; background: var(--primary); }
.dd-btn.active { color: #fff; background: var(--primary); }

/* dropdown categories */
.dropdown { position: relative; }
.dd-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: var(--dark-2); border: 1px solid #292524;
  border-radius: 10px; padding: 6px; display: none;
  box-shadow: 0 14px 30px rgba(0,0,0,.45);
}
.dropdown:hover .dd-menu, .dropdown:focus-within .dd-menu { display: flex; flex-direction: column; }
.dd-menu a {
  color: #d6d3d1; font-size: .9rem; padding: 8px 12px; border-radius: 7px;
}
.dd-menu a:hover { background: var(--primary); color: #fff; }
.dd-btn::after { content: ' ▾'; font-size: .7em; opacity: .7; }

/* mobile burger */
.nav-toggle, .burger { display: none; }

/* ===== HERO / PAGE BITS ===== */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2b1c17 55%, #4a1f17 100%);
  color: #fff; padding: 72px 20px; text-align: center;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; margin-bottom: 14px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { max-width: 680px; margin: 0 auto 26px; color: #d6d3d1; font-size: 1.07rem; }
.btn {
  display: inline-block; background: var(--primary); color: #fff;
  padding: 12px 26px; border-radius: 9px; font-weight: 600; font-size: .95rem;
  transition: transform .15s, background .15s;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-2px); color:#fff; }
.btn.alt { background: transparent; border: 2px solid var(--accent); }
.btn.alt:hover { background: var(--accent); color: var(--dark); }

main { padding: 48px 0; }
section { scroll-margin-top: 90px; }
h2 { font-size: 1.7rem; margin-bottom: 8px; color: var(--dark); }
h3 { font-size: 1.15rem; margin-bottom: 6px; }
.lead { color: var(--muted); margin-bottom: 28px; }
.section-title { text-align: center; margin-bottom: 34px; }
.section-title .lead { margin-bottom: 0; }

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; box-shadow: 0 2px 8px rgba(15,23,42,.05);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(15,23,42,.1); }
.card .icon { font-size: 1.8rem; margin-bottom: 10px; display: block; }
.card p { color: var(--muted); font-size: .93rem; }
.card a.more { font-size: .88rem; font-weight: 600; display: inline-block; margin-top: 10px; color: #57534e; }
.card a.more:hover { color: #292524; }

.tag {
  display: inline-block; background: #efece9; color: #57534e;
  font-size: .75rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 10px;
}

/* code blocks */
pre {
  background: #0d0d0f; color: #fde68a; border-radius: 12px;
  padding: 18px; overflow-x: auto; font-size: .82rem; line-height: 1.55;
  font-family: 'Cascadia Code', Consolas, monospace; margin: 14px 0;
}
code { font-family: 'Cascadia Code', Consolas, monospace; background: #fdedec; color: var(--primary-dark); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
pre code { background: none; color: inherit; padding: 0; }

/* steps / lists */
.steps { counter-reset: s; list-style: none; display: grid; gap: 16px; }
.steps li {
  counter-increment: s; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px 18px 62px; position: relative;
}
.steps li::before {
  content: counter(s); position: absolute; left: 18px; top: 16px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary);
  color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem;
}
.checklist { list-style: none; display: grid; gap: 8px; }
.checklist li::before { content: '✓ '; color: #16a34a; font-weight: 700; }

.callout {
  background: #fffbeb; border: 1px solid #fcd34d; color: #92400e;
  border-radius: 12px; padding: 16px 20px; margin: 20px 0; font-size: .94rem;
}
.callout.info { background: #f1f5f9; border-color: #d6d3d1; color: #334155; }

/* page header (inner pages) */
.page-head { background: var(--dark-2); color: #fff; padding: 46px 20px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.page-head p { color: #a8a29e; max-width: 700px; margin-top: 8px; }

/* forms */
.form { display: grid; gap: 16px; max-width: 620px; }
.form label { font-weight: 600; font-size: .92rem; display: block; margin-bottom: 5px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 11px 14px; border: 1px solid #d6d3d1;
  border-radius: 9px; font-size: .95rem; font-family: inherit; background: #fff;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }

/* ===== FOOTER ===== */
.site-footer { background: var(--dark); color: #a8a29e; margin-top: 60px; }
.footer-grid {
  max-width: 1100px; margin: 0 auto; padding: 48px 20px 30px;
  display: grid; gap: 32px;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
}
.footer-brand .logo { font-size: 1.2rem; display: inline-block; margin-bottom: 10px; }
.footer-brand p { font-size: .88rem; line-height: 1.6; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.08);
  display: grid; place-items: center; color: #d6d3d1; font-size: .85rem;
}
.footer-social a:hover { background: var(--primary); color: #fff; }
.site-footer h4 {
  color: #fff; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .1em; margin-bottom: 14px;
}
.footer-links { list-style: none; display: grid; gap: 8px; }
.footer-links a { color: #a8a29e; font-size: .9rem; }
.footer-links a:hover { color: var(--accent); padding-left: 3px; transition: .15s; }
.footer-bottom {
  border-top: 1px solid #292524; padding: 18px 20px; text-align: center;
  font-size: .84rem; color: #a8a29e;
}
.footer-bottom a { color: #a8a29e; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .burger {
    display: block; margin-left: auto; color: #fff; font-size: 1.5rem;
    cursor: pointer; padding: 6px 10px; user-select: none;
  }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--dark-2); flex-direction: column; align-items: stretch;
    padding: 10px 16px 18px; gap: 2px; border-bottom: 3px solid var(--primary);
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav > a, .dd-btn { padding: 11px 12px; }
  .dropdown { width: 100%; }
  .dd-menu {
    position: static; display: flex; flex-direction: column;
    box-shadow: none; border: 0; background: rgba(255,255,255,.04); margin-left: 8px;
  }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== SCHEMA GENERATOR ===== */
.gen-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.gen-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.gen-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.gen-types button {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: .15s; font-family: inherit;
}
.gen-types button:hover { border-color: var(--primary); color: var(--primary); }
.gen-types button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.gen-sec {
  margin: 20px 0 12px; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line);
  padding-bottom: 6px; font-weight: 700;
}
.gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gen-grid .full { grid-column: 1 / -1; }
.gen-f { display: grid; gap: 5px; align-content: start; }
.gen-f > span { font-size: .83rem; font-weight: 600; }
.gen-f > span i { color: var(--primary); font-style: normal; }
.gen-f input, .gen-f select, .gen-f textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d6d3d1; border-radius: 8px;
  font-size: .9rem; font-family: inherit; background: #fff; color: var(--text);
}
.gen-f input:focus, .gen-f select:focus, .gen-f textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
.gen-f small { color: var(--muted); font-size: .75rem; }
.gen-days { display: flex; flex-wrap: wrap; gap: 6px; }
.gen-days label {
  display: flex; align-items: center; gap: 5px; font-size: .8rem;
  background: #f5f5f4; border: 1px solid var(--line); padding: 5px 9px;
  border-radius: 7px; cursor: pointer;
}
.gen-tools { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.gen-tools button { font-family: inherit; }
.gen-out { position: sticky; top: 86px; }
.gen-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.gen-bar button { cursor: pointer; font-family: inherit; }
.gen-out pre { max-height: 520px; overflow: auto; margin: 0; }
.gen-note { font-size: .85rem; padding: 12px 14px; border-radius: 10px; margin-top: 12px; }
.gen-note.err { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.gen-note.ok { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.gen-stats { font-size: .8rem; color: var(--muted); margin-top: 10px; }
.qa-item {
  position: relative; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 14px 14px; margin-bottom: 10px; display: grid; gap: 10px;
}
.qa-rm {
  position: absolute; top: 6px; right: 8px; background: none; border: 0;
  color: var(--primary); font-weight: 700; cursor: pointer; font-size: .95rem;
}
.qa-rm:hover { color: var(--primary-dark); }
.qa-add {
  font-family: inherit; border: 1px dashed var(--primary); color: var(--primary);
  background: #fff; padding: 9px 16px; border-radius: 9px; cursor: pointer;
  font-weight: 600; font-size: .88rem; width: 100%;
}
.qa-add:hover { background: #fdedec; }
@media (max-width: 960px) {
  .gen-wrap { grid-template-columns: 1fr; }
  .gen-out { position: static; }
}
