/* ===== Reset & Base ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;line-height:1.6;color:#1e293b;background:#f8fafc;min-height:100vh}
img,svg{display:block;max-width:100%}
button,input{font:inherit;color:inherit}
a{color:inherit;text-decoration:none}
ul,ol{list-style:none}

/* ===== Utilities ===== */
.container{width:100%;max-width:1160px;margin:0 auto;padding:0 1.5rem}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.625rem 1.25rem;border-radius:.5rem;font-weight:600;font-size:.9rem;cursor:pointer;border:2px solid transparent;transition:background .15s,border-color .15s,color .15s;white-space:nowrap}
.btn-primary{background:#4f46e5;color:#fff;border-color:#4f46e5}
.btn-primary:hover{background:#4338ca;border-color:#4338ca}
.btn-sm{padding:.375rem .875rem;font-size:.8rem}
.btn-ghost{background:transparent;border-color:#cbd5e1;color:#475569}
.btn-ghost:hover{border-color:#94a3b8;color:#1e293b}
.btn-lg{padding:.875rem 2rem;font-size:1rem}
.btn:disabled{opacity:.45;cursor:not-allowed}

/* ===== Header ===== */
.site-header{background:#fff;border-bottom:1px solid #e2e8f0;position:sticky;top:0;z-index:100}
.site-header .container{display:flex;align-items:center;justify-content:space-between;height:56px}
.logo{display:flex;align-items:center;gap:.5rem;font-weight:700;font-size:1rem;color:#1e293b}
.logo svg{flex-shrink:0}
.site-nav{display:flex;gap:1.5rem;font-size:.875rem}
.site-nav a{color:#475569;padding:.25rem 0;border-bottom:2px solid transparent;transition:color .15s,border-color .15s}
.site-nav a:hover,.site-nav a:focus{color:#4f46e5;border-bottom-color:#4f46e5}

/* ===== Hero ===== */
.hero{padding:3.5rem 0 3rem;text-align:center;background:linear-gradient(180deg,#eef2ff 0%,#f8fafc 100%)}
.hero h1{font-size:clamp(1.6rem,4vw,2.6rem);font-weight:800;line-height:1.2;color:#1e293b;max-width:640px;margin:0 auto .75rem}
.hero-sub{font-size:1.1rem;color:#475569;max-width:520px;margin:0 auto 1.5rem}
.hero .btn-primary{margin-bottom:.75rem}
.hero-note{font-size:.8rem;color:#94a3b8}

/* ===== Assessment ===== */
.assessment-section{padding:2.5rem 0 3rem}
.assessment-layout{display:grid;grid-template-columns:1fr 320px;gap:2rem;align-items:start}
.questions-col h2{font-size:1.4rem;font-weight:700;margin-bottom:.25rem}
.section-intro{color:#64748b;margin-bottom:1.5rem;font-size:.95rem}

.question-card{background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;padding:1.25rem;margin-bottom:1rem;transition:box-shadow .15s}
.question-card:focus-within,.question-card.answered{border-color:#c7d2fe;box-shadow:0 0 0 3px rgba(79,70,229,.1)}
.question-card h3{font-size:1rem;font-weight:600;margin-bottom:.15rem}
.q-hint{font-size:.8rem;color:#94a3b8;margin-bottom:.75rem}

.option-group{display:flex;flex-wrap:wrap;gap:.5rem}
.opt-btn{padding:.5rem .875rem;border-radius:.5rem;border:2px solid #e2e8f0;background:#f8fafc;font-size:.825rem;cursor:pointer;transition:all .15s;text-align:left;line-height:1.3}
.opt-btn:hover{border-color:#c7d2fe;background:#eef2ff}
.opt-btn.selected{border-color:#4f46e5;background:#4f46e5;color:#fff;box-shadow:0 2px 8px rgba(79,70,229,.3)}

.input-row{display:flex;align-items:center;gap:.75rem;margin-top:.5rem}
.input-row label{font-size:.85rem;font-weight:600;color:#475569;white-space:nowrap}
.input-row input{flex:1;max-width:160px;padding:.5rem .75rem;border:2px solid #e2e8f0;border-radius:.5rem;background:#fff;font-size:.9rem;transition:border-color .15s}
.input-row input:focus{outline:none;border-color:#4f46e5;box-shadow:0 0 0 3px rgba(79,70,229,.1)}
.field-hint{font-size:.78rem;color:#94a3b8;margin-top:.35rem}

/* ===== Score Panel ===== */
.score-panel{position:sticky;top:72px}
.score-panel-inner{background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;padding:1.5rem;text-align:center}
.score-panel-inner h2{font-size:1.1rem;font-weight:700;margin-bottom:1rem}

.meter-svg{width:140px;height:140px;margin:0 auto;display:block}
.meter-bg{fill:none;stroke:#e2e8f0;stroke-width:10}
.meter-fill{fill:none;stroke:#4f46e5;stroke-width:10;stroke-linecap:round;transform:rotate(-90deg);transform-origin:60px 60px;transition:stroke-dashoffset .6s ease,stroke .3s}
.meter-value{font-size:2rem;font-weight:800;fill:#1e293b}
.meter-label{font-size:.7rem;fill:#94a3b8}

.score-label{margin-top:.75rem;font-size:.9rem;font-weight:600;color:#475569;min-height:1.5em}

.score-breakdown{margin:1rem 0;text-align:left;font-size:.78rem;color:#64748b}
.score-breakdown .bar-row{display:flex;align-items:center;gap:.5rem;margin-bottom:.35rem}
.score-breakdown .bar-label{width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.score-breakdown .bar-track{flex:1;height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden}
.score-breakdown .bar-fill{height:100%;border-radius:3px;background:#4f46e5;transition:width .4s ease;width:0}
.score-breakdown .bar-val{width:28px;text-align:right;font-weight:600}

.action-area{text-align:left;margin:1rem 0}
.action-area h4{font-size:.85rem;font-weight:600;margin-bottom:.5rem;color:#1e293b}
.action-area ul{font-size:.8rem;color:#475569;padding-left:1.2rem}
.action-area ul li{margin-bottom:.35rem;list-style:disc}

.score-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;margin-top:.75rem}
.panel-note{font-size:.75rem;color:#94a3b8;margin-top:.75rem;min-height:1.2em}

/* ===== Guide ===== */
.guide-section{padding:3rem 0 4rem}
.guide-section h2{font-size:1.4rem;font-weight:700;margin-bottom:1.5rem;text-align:center}
.guide-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:1.5rem}
.guide-card{background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;padding:1.5rem}
.guide-card h3{font-size:1rem;font-weight:600;margin-bottom:.5rem;color:#1e293b}
.guide-card p{font-size:.875rem;color:#475569;margin-bottom:.5rem;line-height:1.6}
.guide-card p:last-child{margin-bottom:0}

.checklist{padding-left:1.25rem;margin:.5rem 0}
.checklist li{font-size:.875rem;color:#475569;margin-bottom:.35rem;list-style:disc;line-height:1.55}
.checklist li strong{color:#1e293b}

.script-example{background:#f1f5f9;border-radius:.5rem;padding:1rem;margin:.75rem 0}
.script-example blockquote{font-size:.825rem;color:#475569;line-height:1.6;border-left:3px solid #4f46e5;padding-left:.75rem}
.script-example blockquote p{margin-bottom:.25rem}

.rate-template{background:#1e293b;color:#e2e8f0;padding:1rem;border-radius:.5rem;font-size:.8rem;line-height:1.6;overflow-x:auto;margin-top:.5rem;font-family:'SF Mono','Fira Code',monospace}

.faq-list dt{font-size:.875rem;font-weight:600;color:#1e293b;margin-top:.75rem}
.faq-list dd{font-size:.85rem;color:#475569;margin-top:.2rem;line-height:1.55}
.faq-list dt:first-child{margin-top:0}

.last-updated{text-align:center;margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid #e2e8f0}
.last-updated p{font-size:.78rem;color:#94a3b8;max-width:600px;margin:0 auto;line-height:1.6}

/* ===== Footer ===== */
.site-footer{background:#fff;border-top:1px solid #e2e8f0;padding:2rem 0 1.5rem}
.footer-top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;margin-bottom:1rem}
.footer-nav{display:flex;gap:1.25rem;font-size:.825rem;flex-wrap:wrap}
.footer-nav a{color:#64748b;transition:color .15s}
.footer-nav a:hover{color:#4f46e5}
.footer-note{font-size:.8rem;color:#94a3b8;text-align:center}
.footer-note a{color:#4f46e5;text-decoration:underline}

/* ===== Responsive ===== */
@media(max-width:860px){
  .assessment-layout{grid-template-columns:1fr}
  .score-panel{position:static;margin-top:1rem;order:-1}
  .score-panel-inner{display:grid;grid-template-columns:140px 1fr;gap:1rem;align-items:start;text-align:left}
  .score-panel-inner h2{grid-column:1/-1}
  .score-actions{justify-content:flex-start}
}
@media(max-width:600px){
  .hero{padding:2.5rem 0 2rem}
  .guide-grid{grid-template-columns:1fr}
  .option-group{flex-direction:column}
  .opt-btn{text-align:left}
  .score-panel-inner{grid-template-columns:1fr;text-align:center}
  .score-actions{justify-content:center}
  .site-header .container{flex-wrap:wrap;height:auto;padding:.75rem 1.5rem;gap:.5rem}
  .site-nav{gap:1rem;font-size:.8rem}
}

/* ===== Focus styles ===== */
:focus-visible{outline:2px solid #4f46e5;outline-offset:2px;border-radius:2px}

/* ===== Print ===== */
@media print{
  .site-header,.site-footer,.score-actions,.hero-note,.panel-note,.assessment-section .questions-col,.site-nav{display:none}
  .score-panel{position:static}
  .score-panel-inner{border:none;padding:0}
  body{background:#fff}
  .guide-section{page-break-before:always}
}



/* 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;
}
