*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
--bg:#1a1612;--bg-alt:#231e18;--surface:#2c2520;--border:#3d342c;
--text:#e8e0d8;--text-muted:#a09488;--accent:#d97706;--accent-light:#fbbf24;
--danger:#dc2626;--success:#16a34a;
--font:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
--radius:8px;--shadow:0 2px 12px rgba(0,0,0,.35);
--max-width:960px;
}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.6;-webkit-font-smoothing:antialiased}
img,svg{max-width:100%;height:auto}
.container{max-width:var(--max-width);margin:0 auto;padding:0 1.25rem}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Header */
.site-header{background:var(--bg-alt);border-bottom:1px solid var(--border);padding:.75rem 0;position:sticky;top:0;z-index:100}
.site-header .container{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}
.logo{display:flex;align-items:center;gap:.5rem;color:var(--text);text-decoration:none;font-weight:700;font-size:1.1rem}
.logo svg{flex-shrink:0}
.main-nav{display:flex;gap:1.25rem;flex-wrap:wrap}
.main-nav a{color:var(--text-muted);text-decoration:none;font-size:.9rem;transition:color .15s}
.main-nav a:hover,.main-nav a:focus{color:var(--accent-light)}

/* Hero */
.hero{background:linear-gradient(135deg,var(--bg-alt) 0%,var(--surface) 100%);padding:4rem 0 3.5rem;text-align:center}
.hero h1{font-size:clamp(1.8rem,4vw,2.8rem);font-weight:800;line-height:1.2;margin-bottom:1rem;color:var(--accent-light)}
.hero-sub{font-size:1.1rem;color:var(--text-muted);max-width:600px;margin:0 auto 2rem}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:.4rem;padding:.65rem 1.5rem;border-radius:var(--radius);font-size:.95rem;font-weight:600;text-decoration:none;cursor:pointer;border:2px solid transparent;transition:all .15s;font-family:inherit}
.btn-primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.btn-primary:hover,.btn-primary:focus{background:#b45309;border-color:#b45309}
.btn-secondary{background:var(--surface);color:var(--text);border-color:var(--border)}
.btn-secondary:hover,.btn-secondary:focus{background:var(--border)}
.btn-outline{background:transparent;color:var(--text-muted);border-color:var(--border)}
.btn-outline:hover,.btn-outline:focus{color:var(--text);border-color:var(--text-muted)}
.btn-danger{background:transparent;color:var(--danger);border-color:var(--danger)}
.btn-danger:hover,.btn-danger:focus{background:var(--danger);color:#fff}
.btn-sm{padding:.35rem .75rem;font-size:.8rem}

/* Sections */
.section{padding:3rem 0}
.section-alt{background:var(--bg-alt)}
.section h2{font-size:1.6rem;font-weight:700;margin-bottom:.5rem;color:var(--accent-light)}
.section-intro{color:var(--text-muted);margin-bottom:1.5rem;max-width:680px}

/* Selector */
.selector-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;margin-bottom:1.5rem}
.field-group label{display:block;font-size:.85rem;font-weight:600;margin-bottom:.3rem;color:var(--text-muted)}
.field-group select,.field-group input,.worksheet-meta input{width:100%;padding:.6rem .75rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);font-size:.95rem;font-family:inherit;appearance:auto}
.field-group select:focus,.worksheet-meta input:focus{outline:2px solid var(--accent);outline-offset:1px}

/* Spec Table */
.spec-table-wrap{margin-top:1rem}
.spec-table-wrap table{width:100%;border-collapse:collapse;font-size:.92rem}
.spec-table-wrap th,.spec-table-wrap td{padding:.65rem .85rem;text-align:left;border-bottom:1px solid var(--border)}
.spec-table-wrap th{background:var(--surface);color:var(--accent-light);font-weight:600}
.spec-table-wrap tr:last-child td{border-bottom:none}
.spec-table-wrap tr:hover td{background:rgba(255,255,255,.02)}

/* Sequence */
.sequence-list{list-style:none;counter-reset:step;display:flex;flex-direction:column;gap:0;margin-top:1.5rem}
.sequence-list li{display:flex;gap:1.25rem;padding:1.25rem 0;border-bottom:1px solid var(--border)}
.sequence-list li:last-child{border-bottom:none}
.step-num{flex-shrink:0;width:2.5rem;height:2.5rem;background:var(--accent);color:#fff;border:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:1.1rem;border-radius:50%}
.sequence-list h3{font-size:1.05rem;font-weight:700;margin-bottom:.25rem}
.sequence-list p{color:var(--text-muted);font-size:.92rem}

/* Symptom */
.symptom-controls{margin-bottom:1.5rem}
.symptom-controls select{max-width:400px}
.symptom-result{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem}
.symptom-cause{margin-bottom:.75rem;padding-bottom:.75rem;border-bottom:1px solid var(--border)}
.symptom-cause:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}
.symptom-cause h4{font-size:.95rem;font-weight:700;color:var(--accent-light);margin-bottom:.2rem}
.symptom-cause p{color:var(--text-muted);font-size:.9rem}

/* Worksheet */
.worksheet-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}
.table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius);margin-bottom:1rem}
#worksheet-table{width:100%;border-collapse:collapse;font-size:.9rem}
#worksheet-table th{background:var(--surface);color:var(--accent-light);font-weight:600;padding:.55rem .75rem;text-align:left;border-bottom:2px solid var(--border);white-space:nowrap}
#worksheet-table td{padding:.4rem .75rem;border-bottom:1px solid var(--border);vertical-align:middle}
#worksheet-table input{width:100%;padding:.35rem .5rem;background:transparent;border:1px solid transparent;border-radius:4px;color:var(--text);font-size:.88rem;font-family:inherit;min-width:80px}
#worksheet-table input:hover{border-color:var(--border)}
#worksheet-table input:focus{outline:2px solid var(--accent);outline-offset:0;border-color:transparent}
#worksheet-table tbody tr:hover{background:rgba(255,255,255,.02)}
.worksheet-meta{margin-top:1rem}
.worksheet-meta label{display:block;font-size:.85rem;font-weight:600;margin-bottom:.3rem;color:var(--text-muted)}
.worksheet-meta input{max-width:400px}

/* Mistakes */
.mistake-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1.25rem;margin-top:1.5rem}
.mistake-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem}
.mistake-card h3{font-size:1rem;font-weight:700;color:var(--accent-light);margin-bottom:.4rem}
.mistake-card p{color:var(--text-muted);font-size:.88rem}

/* Notes */
#notes p{color:var(--text-muted);font-size:.92rem;margin-bottom:.75rem;max-width:680px}
.last-updated{font-size:.8rem;color:var(--text-muted);margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--border)}

/* Empty state */
.empty-state{color:var(--text-muted);font-style:italic;padding:1rem 0}

/* Footer */
.site-footer{background:var(--bg-alt);border-top:1px solid var(--border);padding:2.5rem 0 1.5rem;margin-top:2rem}
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1.5rem;margin-bottom:1.5rem}
.footer-grid strong{display:block;margin-bottom:.4rem;font-size:.9rem}
.footer-grid p,.footer-grid a{color:var(--text-muted);font-size:.85rem;text-decoration:none}
.footer-grid a:hover{color:var(--accent-light)}
.footer-links{list-style:none;display:flex;flex-direction:column;gap:.25rem}
.footer-copy{text-align:center;font-size:.8rem;color:var(--text-muted);padding-top:1rem;border-top:1px solid var(--border)}

/* Print */
@media print{
.site-header,.site-footer,.worksheet-actions,.btn,.symptom-controls,.selector-grid{display:none!important}
body{background:#fff;color:#000}
.section,.section-alt{background:#fff;padding:1rem 0}
.table-wrap{border:none}
#worksheet-table input{border:1px solid #ccc;color:#000}
}

/* Responsive */
@media(max-width:640px){
.hero{padding:2.5rem 0 2rem}
.sequence-list li{flex-direction:column;gap:.5rem}
.selector-grid{grid-template-columns:1fr}
.mistake-grid{grid-template-columns:1fr}
.main-nav{gap:.75rem}
.main-nav a{font-size:.82rem}
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
