:root{
  --bg:#0f172a; --panel:#ffffff; --ink:#0f172a; --muted:#64748b;
  --line:#e2e8f0; --accent:#0369a1; --accent-soft:#e0f2fe;
}
*{box-sizing:border-box}
body{
  margin:0; background:#f1f5f9; color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans JP",sans-serif;
  line-height:1.7;
}
.wrap{max-width:860px;margin:0 auto;padding:0 20px}

.hero{
  background:linear-gradient(150deg,#0f172a,#1e3a5f 60%,#0369a1);
  color:#fff;padding:56px 0 64px;margin-bottom:-32px;
}
.kicker{
  font-size:11px;letter-spacing:.22em;color:#7dd3fc;margin:0 0 10px;font-weight:700;
}
.hero h1{margin:0 0 14px;font-size:32px;letter-spacing:.02em}
.lead{margin:0;color:#cbd5e1;max-width:44em;font-size:15px}

.card{
  background:var(--panel);border-radius:14px;padding:28px;
  box-shadow:0 10px 30px rgba(15,23,42,.10);border:1px solid var(--line);
}

.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
@media(max-width:640px){.grid{grid-template-columns:1fr}}

.field{display:flex;flex-direction:column;gap:6px}
.field>span{font-size:13px;font-weight:700;color:#334155}
.field em{font-style:normal;font-weight:400;color:var(--muted);font-size:11px;margin-left:4px}
input[type=text],input[type=number],select{
  padding:10px 12px;border:1px solid var(--line);border-radius:9px;
  font-size:14px;font-family:inherit;background:#fff;color:var(--ink);
}
input:focus,select:focus{outline:2px solid var(--accent-soft);border-color:var(--accent)}

.checks{
  border:1px solid var(--line);border-radius:11px;padding:16px 18px;margin:22px 0 0;
}
.checks legend{font-size:13px;font-weight:700;padding:0 6px;color:#334155}
.checks label{display:flex;gap:9px;align-items:flex-start;font-size:14px;padding:5px 0;cursor:pointer}
.checks input{margin-top:5px;flex:none}

.btn{
  margin-top:22px;width:100%;padding:14px;border:0;border-radius:10px;
  background:var(--accent);color:#fff;font-size:15px;font-weight:700;
  font-family:inherit;cursor:pointer;transition:.15s;
}
.btn:hover{background:#075985}

/* ---- result ---- */
#result{margin-top:26px}
.scoreCard{
  background:var(--panel);border-radius:14px;border:1px solid var(--line);
  box-shadow:0 10px 30px rgba(15,23,42,.10);overflow:hidden;margin-bottom:20px;
}
.scoreHead{display:flex;align-items:center;gap:24px;padding:26px 28px;flex-wrap:wrap}
.dial{
  width:118px;height:118px;border-radius:50%;flex:none;
  display:grid;place-items:center;position:relative;
}
.dial .inner{
  width:92px;height:92px;background:#fff;border-radius:50%;
  display:grid;place-items:center;line-height:1.1;
}
.dial b{font-size:30px;display:block}
.dial small{font-size:10px;color:var(--muted);letter-spacing:.1em}
.scoreMeta h2{margin:0 0 4px;font-size:19px}
.scoreMeta .band{font-size:14px;font-weight:700}
.scoreMeta p{margin:6px 0 0;color:var(--muted);font-size:13px}

.kpis{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line)}
@media(max-width:640px){.kpis{grid-template-columns:1fr}}
.kpi{padding:18px 22px;border-right:1px solid var(--line)}
.kpi:last-child{border-right:0}
.kpi span{display:block;font-size:11px;color:var(--muted);letter-spacing:.06em;margin-bottom:4px}
.kpi b{font-size:22px}
.kpi i{font-style:normal;font-size:12px;color:var(--muted);margin-left:3px}

.section{
  background:var(--panel);border-radius:14px;border:1px solid var(--line);
  padding:24px 28px;margin-bottom:20px;box-shadow:0 6px 20px rgba(15,23,42,.06);
}
.section h3{margin:0 0 18px;font-size:15px;letter-spacing:.04em}

.bar{margin-bottom:16px}
.bar .top{display:flex;justify-content:space-between;font-size:13px;margin-bottom:5px}
.bar .top b{font-weight:700}
.bar .track{height:9px;background:#f1f5f9;border-radius:99px;overflow:hidden}
.bar .fill{height:100%;border-radius:99px;transition:width .6s cubic-bezier(.2,.8,.2,1)}
.bar .note{font-size:11px;color:var(--muted);margin-top:4px}

.action{border-left:3px solid var(--line);padding:2px 0 2px 16px;margin-bottom:20px}
.action.p-最優先{border-color:#dc2626}
.action.p-高{border-color:#ea580c}
.action.p-中{border-color:#ca8a04}
.action.p-継続{border-color:#0369a1}
.action .tag{
  display:inline-block;font-size:10px;font-weight:700;letter-spacing:.08em;
  padding:2px 8px;border-radius:99px;background:#f1f5f9;color:#475569;margin-bottom:6px;
}
.action.p-最優先 .tag{background:#fee2e2;color:#991b1b}
.action.p-高 .tag{background:#ffedd5;color:#9a3412}
.action h4{margin:0 0 7px;font-size:15px}
.action p{margin:0 0 6px;font-size:13.5px;color:#334155}
.action p.how{color:var(--muted);font-size:12.5px}
.action p.how::before{content:"打ち手 ";font-weight:700;color:#475569}

.disclaimer{
  font-size:11.5px;color:var(--muted);line-height:1.75;
  margin:28px 0 48px;padding:14px 16px;background:#e2e8f0;border-radius:9px;
}

/* ---- steps ---- */
.steps{
  display:flex;gap:8px;list-style:none;padding:0;margin:20px 0 0;flex-wrap:wrap;
}
.steps li{
  font-size:12px;color:#94a3b8;display:flex;align-items:center;gap:6px;
}
.steps li:not(:last-child)::after{content:"›";margin-left:6px;color:#475569}
.steps b{
  display:grid;place-items:center;width:18px;height:18px;border-radius:50%;
  background:rgba(255,255,255,.12);color:#7dd3fc;font-size:10px;
}

/* ---- next step ---- */
.nextStep{border:1px solid #bae6fd;background:linear-gradient(180deg,#f0f9ff,#fff)}
.nsLead{font-size:13.5px;color:#334155;margin:0 0 16px}
.nsLead b{color:var(--accent)}

/* ---- bcp doc ---- */
.docHead .dhTop{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.dhMeta{margin:0;font-size:12.5px;color:var(--muted)}
.dhNote{margin:14px 0 0;font-size:11.5px;color:var(--muted);line-height:1.7}
.btnSm{
  padding:10px 18px;border:0;border-radius:8px;background:var(--accent);color:#fff;
  font-size:13px;font-weight:700;font-family:inherit;cursor:pointer;flex:none;
}
.btnSm:hover{background:#075985}
.btnSm:disabled{background:#94a3b8;cursor:default}

.sec{border-bottom:1px solid var(--line);padding:2px 0}
.sec:last-child{border-bottom:0}
.sec summary{
  cursor:pointer;padding:13px 0;font-size:14.5px;font-weight:700;
  display:flex;align-items:center;gap:10px;list-style:none;
}
.sec summary::-webkit-details-marker{display:none}
.sec summary::before{content:"▾";color:var(--muted);font-size:11px;transition:.2s}
.sec:not([open]) summary::before{transform:rotate(-90deg)}
.secno{
  font-size:10px;letter-spacing:.06em;color:#fff;background:var(--accent);
  padding:2px 7px;border-radius:4px;font-weight:700;
}
.sec pre{
  margin:0 0 16px;padding:16px 18px;background:#f8fafc;border-radius:9px;
  border:1px solid var(--line);font-family:"Hiragino Sans","Noto Sans JP",monospace;
  font-size:12.5px;line-height:1.95;white-space:pre-wrap;word-break:break-word;color:#1e293b;
}

.jtable{width:100%;border-collapse:collapse;font-size:12.5px}
.jtable th{
  text-align:left;padding:9px 10px;background:#f1f5f9;border-bottom:2px solid var(--line);
  font-size:11.5px;letter-spacing:.04em;color:#475569;
}
.jtable td{padding:10px;border-bottom:1px solid var(--line);vertical-align:top}
.jtable .jf{font-weight:700;width:30%;color:#0f172a}
.jtable .jm{width:24%;color:var(--accent)}
.jtable .jh{color:var(--muted);font-size:12px}

/* ---- download buttons ---- */
.dlBtns{display:flex;gap:8px;flex:none}
.btnSm.ghost{background:#fff;color:var(--accent);box-shadow:inset 0 0 0 1px #bae6fd}
.btnSm.ghost:hover{background:#f0f9ff}

/* ---- insurance ---- */
.gapBanner{
  display:flex;align-items:center;gap:20px;padding:20px 22px;border-radius:11px;
  background:linear-gradient(135deg,#fef2f2,#fff);border:1px solid #fecaca;
}
.gapBanner.ok{background:linear-gradient(135deg,#f0fdf4,#fff);border-color:#bbf7d0}
.gbNum{font-size:31px;font-weight:800;color:#dc2626;flex:none;line-height:1.2}
.gapBanner.ok .gbNum{color:#16a34a;font-size:34px}
.gbTxt b{font-size:14.5px;display:block;margin-bottom:4px}
.gbTxt p{margin:0;font-size:12.5px;color:#475569;line-height:1.7}

.layer{
  border:1px solid var(--line);border-radius:11px;padding:18px 20px;margin-bottom:14px;
  border-left-width:4px;
}
.layer.gap{border-left-color:#dc2626;background:#fffbfb}
.layer.ok{border-left-color:#16a34a}
.layer.neutral{border-left-color:#94a3b8}
.layer.opt{border-left-color:#0369a1}

.lyHead{display:flex;align-items:flex-start;gap:12px;margin-bottom:11px;flex-wrap:wrap}
.lyTier{
  font-size:10.5px;font-weight:700;letter-spacing:.05em;background:#0f172a;color:#fff;
  padding:3px 8px;border-radius:4px;flex:none;margin-top:2px;
}
.lyTitle{flex:1;min-width:150px}
.lyTitle h4{margin:0;font-size:15px}
.lyTitle p{margin:2px 0 0;font-size:12px;color:var(--muted)}
.lyRight{display:flex;flex-direction:column;gap:4px;align-items:flex-end;flex:none}
.lyStatus{font-size:10.5px;font-weight:700;padding:3px 9px;border-radius:99px;white-space:nowrap}
.lyStatus.gap{background:#fee2e2;color:#991b1b}
.lyStatus.ok{background:#dcfce7;color:#166534}
.lyStatus.neutral{background:#f1f5f9;color:#475569}
.lyStatus.opt{background:#e0f2fe;color:#075985}
.lyPri{font-size:10px;color:#9a3412;font-weight:700}

.lyRole{margin:0 0 12px;font-size:13px;color:#334155}
.lyNeed{
  display:flex;justify-content:space-between;align-items:baseline;
  padding:9px 13px;background:#f8fafc;border-radius:7px;margin-bottom:12px;
}
.lyNeed span{font-size:11.5px;color:var(--muted)}
.lyNeed b{font-size:17px}
.lyDesign{margin:0 0 11px;padding-left:19px}
.lyDesign li{font-size:12.5px;color:#475569;margin-bottom:5px;line-height:1.75}
.lyCaution{
  margin:0;font-size:12px;color:#7c2d12;background:#fff7ed;
  padding:9px 12px;border-radius:7px;line-height:1.7;
}
.layer.ok .lyCaution{color:#365314;background:#f7fee7}
.layer.opt .lyCaution{color:#0c4a6e;background:#f0f9ff}

.discTodo{border:1px solid #fed7aa;background:linear-gradient(180deg,#fff7ed,#fff)}
.discOk{border:1px solid #bbf7d0;background:linear-gradient(180deg,#f0fdf4,#fff)}

.orderList{margin:0;padding-left:22px}
.orderList li{margin-bottom:13px;font-size:13px}
.orderList li b{display:block;margin-bottom:3px}
.orderList li span{color:var(--muted);font-size:12.5px;line-height:1.7}

.discl{background:#f8fafc}
.discl p{margin:0 0 6px;font-size:11.5px;color:var(--muted);line-height:1.75}
.discl p:last-child{margin-bottom:0}

/* ---- jigyokei ---- */
.jbody{padding:0 0 16px}
.ftable{width:100%;border-collapse:collapse;font-size:12.5px;margin-bottom:6px}
.ftable th{
  text-align:left;padding:9px 11px;background:#f1f5f9;border:1px solid var(--line);
  font-weight:700;width:27%;vertical-align:top;color:#334155;
}
.ftable td{padding:9px 11px;border:1px solid var(--line);vertical-align:top;line-height:1.8}
.ftable td.blank{color:#b45309;background:#fffbeb}
.rtable th{width:22%;background:#f8fafc}
.etable th{width:auto;background:#e0f2fe;text-align:left}
.etable td.en{font-weight:700;width:30%}
.etable thead th{border-bottom:2px solid #bae6fd}

.jgroup{margin-bottom:16px}
.jgroup h5{
  margin:0 0 8px;font-size:13px;color:var(--accent);
  padding-bottom:5px;border-bottom:1px solid #e0f2fe;
}
.mlist{margin:0;padding-left:20px}
.mlist li{font-size:12.5px;color:#334155;margin-bottom:7px;line-height:1.85}
.jnote{margin:8px 0 0;font-size:11.5px;color:var(--muted);line-height:1.7}

.checkList{list-style:none;margin:0;padding:0}
.checkList li{
  display:flex;gap:10px;align-items:flex-start;font-size:13px;
  padding:8px 0;border-bottom:1px solid #f1f5f9;line-height:1.7;
}
.checkList li:last-child{border-bottom:0}
.checkList li span{
  flex:none;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;
  font-size:11px;font-weight:700;margin-top:2px;
}
.checkList li.ok span{background:#dcfce7;color:#166534}
.checkList li.ng span{background:#fee2e2;color:#991b1b}
.checkList li.ng{color:#991b1b;font-weight:600}

.blankBox{border:1px solid #fed7aa;background:linear-gradient(180deg,#fffbeb,#fff)}
.blankList{margin:0;padding-left:20px}
.blankList li{font-size:12.5px;color:#78350f;margin-bottom:7px;line-height:1.75}

.stepList{margin:0;padding-left:22px}
.stepList li{margin-bottom:16px;font-size:13px}
.stTop{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:4px}
.stTop b{font-size:13.5px}
.stLead{
  font-size:10.5px;font-weight:700;color:#075985;background:#e0f2fe;
  padding:2px 8px;border-radius:99px;white-space:nowrap;flex:none;
}
.stepList li p{margin:0;font-size:12.5px;color:var(--muted);line-height:1.8}

.planLink{margin:18px 0 0}
.planLink a{
  display:inline-block;padding:8px 16px;border-radius:99px;
  background:rgba(255,255,255,.14);color:#7dd3fc;text-decoration:none;
  font-size:12.5px;font-weight:700;transition:.15s;
}
.planLink a:hover{background:rgba(255,255,255,.22)}
