/* CCR Rater — Static HTML version (converted from Streamlit)
   Tip: edit this file only (no inline styles needed). */

:root{
  --bg-overlay: rgba(255,255,255,.82);
  --card-bg: rgba(255,255,255,.75);
  --text: #111;
  --muted: rgba(0,0,0,.65);
  --border: rgba(0,0,0,.08);
  --shadow: 0 8px 24px rgba(0,0,0,.10);
  --radius: 16px;
  --radius-sm: 12px;
  --accent: #111;
  --danger: #b42318;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background-image: url("assets/bg.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

a{ color: inherit; }
.container{
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 18px 48px;
}

.shell{
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 18px;
}

.brand h1{
  margin:0 0 6px;
  font-size: 26px;
  letter-spacing: -.02em;
}

.brand p{
  margin:0;
  color: var(--muted);
  line-height: 1.35;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  font-size: 13px;
  color: rgba(0,0,0,.75);
}

.stepper{
  margin: 18px 0 22px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

.step{
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  font-size: 13px;
  color: rgba(0,0,0,.78);
  cursor: pointer;
  user-select: none;
}

.step.active{
  background: #111;
  color: #fff;
  border-color: rgba(0,0,0,.25);
}

.main{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items:start;
}

@media (max-width: 1099px){
  .main{ grid-template-columns: 1fr; }
  .live-panel{ position: static !important; width: auto !important; }
}

.section-title{
  margin: 0 0 8px;
  font-size: 18px;
}

.subtle{
  margin: 0 0 18px;
  color: var(--muted);
}

.card{
  background: rgba(255,255,255,.70);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 760px){
  .grid-2{ grid-template-columns: 1fr; }
}

.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin-bottom: 12px;
}
label{
  font-size: 13px;
  color: rgba(0,0,0,.75);
}
input[type="text"], input[type="url"], input[type="number"], textarea, select{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  outline:none;
  background: rgba(255,255,255,.88);
}
textarea{ min-height: 90px; resize: vertical; }

.inline{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}

.btnrow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

button{
  appearance:none;
  border:none;
  border-radius: 12px;
  padding: 10px 14px;
  background: #111;
  color:#fff;
  cursor:pointer;
  font-weight: 600;
}
button.secondary{
  background: rgba(0,0,0,.08);
  color:#111;
  border: 1px solid var(--border);
  font-weight: 600;
}
button.danger{
  background: var(--danger);
}
button:disabled{
  opacity: .5;
  cursor:not-allowed;
}

hr{
  border:none;
  border-top: 1px solid rgba(0,0,0,.10);
  margin: 14px 0;
}

.dim{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.78);
  margin-bottom: 10px;
}
.dim h4{
  margin:0 0 6px;
  font-size: 14px;
}
.dim p{
  margin:0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.range-row{
  display:grid;
  grid-template-columns: 1fr 60px;
  gap: 10px;
  align-items:center;
}
.range-val{
  text-align:right;
  font-variant-numeric: tabular-nums;
  color: rgba(0,0,0,.75);
}

.small{
  font-size: 12px;
  color: var(--muted);
}

.live-panel{
  position: sticky;
  top: 18px;
  width: 340px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
}

.score-big{
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 6px 0 0;
}
.score-sub{
  margin: 0 0 12px;
  color: var(--muted);
}
.kv{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0,0,0,.12);
  font-size: 13px;
}
.kv:last-child{ border-bottom:none; }
.kv b{ font-weight: 650; }
.kv span{ color: rgba(0,0,0,.75); }

.table{
  width:100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  text-align:left;
  vertical-align: top;
}
.table th{
  font-size: 12px;
  color: rgba(0,0,0,.65);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.footer{
  margin-top: 18px;
  text-align:center;
  color: rgba(0,0,0,.55);
  font-size: 13px;
}
.footer a{ text-decoration: underline; }
