/* v4 UI – minimal, dark, readable */
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: var(--bg0);
  color:var(--text);
}
code{ background:rgba(255,255,255,.06); padding:2px 6px; border-radius:8px; border:1px solid rgba(255,255,255,.10); }

.topbar{ position:sticky; top:0; z-index:10; background:rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom:1px solid var(--line); }
.topbar__inner{ max-width:1400px; margin:0 auto; padding:12px 16px; display:flex; justify-content:space-between; gap:16px; align-items:center; }
.title{ font-weight:900; letter-spacing:.2px; }
.titleRow{ display:flex; align-items:center; gap:12px; }
.titleLogo{ width:32px; height:32px; border-radius:8px; object-fit:cover; box-shadow: var(--shadow); }
.titleHome{ display:flex; align-items:center; gap:12px; color:inherit; text-decoration:none; }
.titleHome:hover{ text-decoration:underline; }
.badge{ display:inline-block; margin-left:8px; padding:2px 8px; border-radius:999px; border:1px solid rgba(211,97,53,.45); background:rgba(211,97,53,.12); font-size:12px; }
.subtitle{ margin-top:4px; color:var(--muted2); font-size:12px; line-height:1.4; max-width: 640px; }
.topbar__actions{ display:flex; gap:10px; align-items:center; }
.topnav{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.topnav a{
  font-size:12px; color:var(--text);
  padding:8px 10px; border-radius:999px; border:1px solid var(--line);
  text-decoration:none; background:rgba(255,255,255,.70);
}
.topnav a:hover{ border-color:rgba(211,97,53,.45); color:var(--text); }
.link{ color:var(--accent); text-decoration:none; font-weight:700; font-size:12px; }
.pill{ border:1px solid var(--line); background:var(--panel2); padding:6px 10px; border-radius:999px; font-size:12px; color:var(--text); }

.steps{
  max-width:1400px; margin:12px auto 0; padding:0 16px;
  display:flex; gap:10px; flex-wrap:wrap;
}
.step{
  border:1px solid var(--line);
  background:#ffffff;
  padding:6px 10px; border-radius:999px;
  font-size:12px; color:var(--muted); font-weight:800;
}

.layout{
  max-width:1400px; margin:0 auto; padding:12px 16px 16px;
  display:grid; gap:16px;
  grid-template-columns: minmax(320px, 420px) minmax(320px, 440px) minmax(360px, 1fr);
}
.scoreBar{
  max-width:1400px; margin:8px auto 0; padding:0 16px;
}
.scoreBox{
  display:flex; align-items:center; gap:14px;
  border:1px solid var(--line); border-radius:14px;
  background:#ffffff; padding:10px 12px; box-shadow: var(--shadow);
}
.scoreNum{ font-size:18px; font-weight:900; }
.scoreLabel{ font-weight:800; }
.scoreBreak{ font-size:12px; color:var(--muted2); }
@media (max-width: 1200px){
  .layout{ grid-template-columns:1fr; }
  .topbar{ position:relative; }
  .topnav{ display:none; }
}

.card{ border:1px solid var(--line); border-radius:16px; background:#ffffff; overflow:hidden; box-shadow: var(--shadow); }
.card__head{ padding:14px 14px 10px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:flex-end; gap:14px; background:#ffffff; }
.card__head h2{ margin:0; font-size:14px; }
.card__body{ padding:14px; }
.mini{ color:var(--muted); font-size:12px; line-height:1.4; }

label{ display:block; font-size:12px; color:var(--muted2); margin:12px 0 6px; }
input, textarea, select{
  width:100%; padding:10px 12px; border-radius:12px;
  border:1px solid var(--line); background:var(--panel2);
  color:var(--text); outline:none;
}
textarea{ min-height: 84px; resize:vertical; }
.help{ margin-top:6px; font-size:11px; color:var(--muted); }

.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.grid3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
@media (max-width: 520px){ .grid2,.grid3{ grid-template-columns:1fr; } }

.sep{ border:0; height:1px; background:var(--line); margin:16px 0; }

.sectionHead{ display:flex; justify-content:space-between; gap:12px; align-items:flex-end; }
.sectionTitle{ font-weight:900; font-size:13px; }
.sectionActions{ display:flex; gap:10px; flex-wrap:wrap; }

.actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 8px; }
.btn{
  cursor:pointer; user-select:none;
  border:1px solid var(--line);
  background:#ffffff;
  color:var(--text);
  padding:10px 12px; border-radius:12px;
  font-weight:800; font-size:12px;
}
.btn:hover{ background:#ffffff; }
.btn--primary{ background:rgba(211,97,53,.18); border-color:rgba(211,97,53,.45); }
.btn--ghost{ background:transparent; }

.hint{ margin-top:10px; color:var(--muted); font-size:12px; line-height:1.45; }

.tabs{ display:flex; gap:8px; }
.tab{
  border:1px solid var(--line); background:#ffffff;
  color:var(--text); padding:8px 10px; border-radius:12px; font-weight:900; font-size:12px; cursor:pointer;
}
.tab--active{ border-color:rgba(211,97,53,.55); background:rgba(211,97,53,.12); }

.code{
  margin:0; padding:14px; max-height: 72vh; overflow:auto;
  background:#ffffff; border-top:1px solid var(--line);
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size:12px; line-height:1.5; white-space:pre;
}

.siteFooter{ margin-top:28px; border-top:1px solid var(--line); color:var(--muted2); font-size:12px; }
.siteFooter__inner{ max-width:1400px; margin:0 auto; padding:16px; }
.siteFooter__note{ margin-top:10px; }
.siteFooter__copy{ margin-top:14px; }

/* Facts */
.factRow{
  display:grid; grid-template-columns: 1fr 1fr 42px; gap:10px;
  padding:10px; border:1px solid rgba(255,255,255,.10); border-radius:14px;
  background:#ffffff; margin-top:10px;
}
.factRow--standard{ display:none; }
.factMeta{ display:flex; gap:8px; align-items:center; margin-top:6px; }
.tag{ font-size:11px; font-weight:900; padding:2px 8px; border-radius:999px; border:1px solid var(--line); color:var(--muted2); }
.tag--req{ border-color: rgba(230,170,104,.55); background: rgba(230,170,104,.18); color: #E6AA68; }
.tag--rec{ border-color: rgba(127,176,105,.55); background: rgba(127,176,105,.18); color: #7FB069; }
.tag--std{ border-color: rgba(127,176,105,.55); background: rgba(127,176,105,.18); color: #7FB069; }
.delBtn{ padding:10px 0; display:flex; align-items:center; justify-content:center; font-size:16px; }
.delBtn[disabled]{ opacity:.35; cursor:not-allowed; }

/* Modal */
.modal{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.55); backdrop-filter: blur(4px); padding:18px; }
.modal[aria-hidden="false"]{ display:flex; }
.modal__content{ width:min(760px, 100%); border:1px solid rgba(255,255,255,.18); border-radius:16px; background:rgba(15,23,42,.95); box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.modal__head{ display:flex; justify-content:space-between; gap:12px; align-items:center; padding:14px; border-bottom:1px solid rgba(255,255,255,.12); }
.modal__title{ font-weight:900; }
.modal__body{ padding:14px; color:var(--text); }
.modal__body ul{ margin:0; padding-left:18px; line-height:1.6; }
