/* ============ Interactive protocol reader ============ */

.proto-shell{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  max-width: 1180px;
  margin: 0 auto;
}
@media (max-width: 900px){
  .proto-shell{ grid-template-columns: 1fr; }
  .proto-sidebar{ position:static !important; order:2; }
}

.proto-topbar{
  background: var(--salvia-dark); color:#fff; padding: 14px 24px;
  display:flex; align-items:center; justify-content:space-between;
}
.proto-topbar .brand{ font-family:'Fraunces',serif; font-size:1.05rem; }
.proto-topbar .brand span{ color: #F1E4DA; }
.proto-topbar a.back{ color:#fff; font-size:0.85rem; opacity:0.85; }
.proto-topbar a.back:hover{ opacity:1; color:#fff; }

.proto-sidebar{
  position: sticky; top:0; align-self:start; height:100vh; overflow-y:auto;
  padding: 28px 18px; border-right:1px solid var(--line); background: var(--cream-2);
}
.proto-sidebar h4{
  font-family:'Karla',sans-serif; text-transform:uppercase; letter-spacing:0.08em;
  font-size:0.72rem; color:var(--ink-soft); margin: 0 0 10px 6px;
}
.proto-sidebar ul{ list-style:none; margin:0 0 22px; padding:0; }
.proto-sidebar li a{
  display:block; padding: 8px 10px; border-radius:8px; font-size:0.9rem;
  color: var(--ink); text-decoration:none; line-height:1.3;
}
.proto-sidebar li a:hover{ background: var(--salvia-tint); text-decoration:none; }
.proto-sidebar li a.active{ background: var(--salvia); color:#fff; font-weight:600; }
.proto-progress{
  margin: 0 6px 20px; padding: 12px; background:#fff; border-radius:10px; border:1px solid var(--line);
}
.proto-progress .bar{ height:6px; background: var(--line); border-radius:6px; overflow:hidden; margin-top:8px; }
.proto-progress .fill{ height:100%; background: var(--terracota); width:0%; transition:width .3s; }
.proto-progress span{ font-size:0.78rem; color: var(--ink-soft); }

.proto-content{ padding: 40px 48px 100px; max-width: 760px; }
.proto-content h2{
  margin-top: 2.2em; padding-top: 0.4em; scroll-margin-top: 20px;
  border-top: 1px solid var(--line);
}
.proto-content h2:first-of-type{ border-top:none; margin-top:0; }
.proto-content figure{ margin: 24px 0; }
.proto-content figure img{ border:1px solid var(--line); }
.proto-content figcaption{ font-size:0.85rem; color: var(--ink-soft); text-align:center; margin-top:8px; }
.proto-content strong{ color: var(--ink); }
.proto-content em{ color: var(--salvia-dark); }

.proto-callout{
  position: relative;
  background: linear-gradient(135deg, var(--terracota) 0%, var(--terracota-dark) 100%);
  color: #fff;
  padding: 26px 28px 26px 64px;
  border-radius: 16px;
  margin: 32px 0;
  box-shadow: 0 10px 28px rgba(77,52,48,0.28);
  border-left: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.proto-callout:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(77,52,48,0.34);
}
.proto-callout::before{
  content: "💡";
  position: absolute;
  left: 20px; top: 24px;
  font-size: 1.4rem;
  width: 34px; height: 34px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
}
.proto-callout p{ margin: 0; color: #fff; }
.proto-callout strong{
  color: var(--beige);
  font-family: 'Fraunces', serif;
  font-size: 1.02em;
}
.proto-callout em{ color: #fff; font-style: italic; opacity: 0.95; }

.proto-table{ width:100%; border-collapse: collapse; margin: 20px 0; font-size:0.88rem; }
.proto-table th{ background: var(--salvia-tint); color: var(--salvia-dark); padding:10px; text-align:left; border:1px solid var(--line); }
.proto-table td{ border:1px solid var(--line); padding:2px; }
.cell-input{
  width:100%; border:none; background:transparent; padding:9px 8px; font-family:'Karla',sans-serif;
  font-size:0.86rem; color: var(--ink);
}
.cell-input:focus{ outline: 2px solid var(--salvia); border-radius:4px; }

.check-list{ list-style:none; padding-left:0; margin: 18px 0; }
.check-li{ margin-bottom: 4px; }
.check-item{
  display:flex; align-items:flex-start; gap:12px; padding: 9px 10px; border-radius:8px; cursor:pointer;
}
.check-item:hover{ background: var(--salvia-tint); }
.check-item input[type=checkbox]{
  margin-top: 4px; width:18px; height:18px; accent-color: var(--terracota); flex-shrink:0; cursor:pointer;
}
.check-item span{ flex:1; }
.check-item:has(input:checked) span{ color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--salvia); }

.proto-save-note{
  position: fixed; bottom: 20px; right: 20px; background: var(--ink); color:#fff;
  padding: 10px 18px; border-radius: 30px; font-size:0.82rem; opacity:0; transition: opacity .3s;
  pointer-events:none; z-index:80;
}
.proto-save-note.show{ opacity:0.92; }

.proto-locked-banner{
  background: var(--terracota); color:#fff; text-align:center; padding: 10px; font-size:0.85rem;
}

/* ---------- Password gate ---------- */
.proto-gate{
  position: fixed; inset: 0; z-index: 999;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.proto-gate-card{
  background: #fff; max-width: 380px; width: 100%;
  padding: 36px 30px; border-radius: 18px;
  box-shadow: 0 14px 40px rgba(46,42,38,0.15);
  text-align: center;
}
.proto-gate-logo{ height: 48px; margin-bottom: 18px; }
.proto-gate-card h2{ margin: 0 0 6px; font-size: 1.4rem; }
.proto-gate-card input{
  width: 100%; padding: 12px 14px; margin-top: 18px;
  border: 1.5px solid var(--line); border-radius: 30px;
  font-size: 1rem; text-align: center; box-sizing: border-box;
}
.proto-gate-card input:focus{ outline: none; border-color: var(--salvia); }
