/* ISRATAS story-style membership registration. Matches site tokens. */
html,body{height:100%;margin:0}
html.story-lock,body.story-page{overflow:hidden;height:100%;height:100dvh}
body.story-page{
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--parchment);
  text-rendering:optimizeLegibility;
}
body.story-page::after{z-index:0}
.story-skip{
  position:absolute;
  inset-inline-start:1rem;
  top:-60px;
  z-index:40;
  background:var(--ocean);
  color:#fff;
  padding:.6rem 1rem;
  border-radius:6px;
  text-decoration:none;
}
.story-skip:focus{top:1rem}
.story-app{
  position:relative;
  z-index:1;
  height:100vh;
  height:100dvh;
  display:flex;
  justify-content:center;
  align-items:stretch;
  overflow:hidden;
}
.story-frame{
  width:100%;
  height:100%;
  max-height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg,var(--paper) 0%,var(--parchment) 100%);
  position:relative;
  overflow:hidden;
}
@media (min-width:800px){
  .story-app{
    align-items:center;
    padding:2rem 1.5rem;
    background:
      radial-gradient(ellipse at 50% 0%,rgba(201,212,176,.45),transparent 55%),
      var(--sand);
  }
  .story-frame{
    width:390px;
    height:min(844px,92vh);
    min-height:0;
    border-radius:28px;
    border:1px solid var(--line);
    box-shadow:0 30px 60px -28px rgba(63,84,64,.45);
    overflow:hidden;
  }
}
.story-top{
  display:grid;
  gap:.7rem;
  padding:max(.7rem,env(safe-area-inset-top)) 1rem .4rem;
  flex:none;
}
.story-top-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.6rem;
}
.story-brand{
  display:flex;
  align-items:center;
  gap:.5rem;
  text-decoration:none;
  color:var(--ocean);
  min-width:0;
}
.story-brand img{width:36px;height:36px;display:block}
.story-brand-name{
  font-family:var(--font-head);
  font-size:1.05rem;
  letter-spacing:.08em;
  font-weight:400;
}
.story-close{
  appearance:none;
  border:1px solid var(--line);
  background:rgba(255,255,255,.7);
  color:var(--ocean);
  width:40px;
  height:40px;
  border-radius:50%;
  cursor:pointer;
  font:600 .95rem/1 var(--font-body);
  text-decoration:none;
  display:grid;
  place-items:center;
}
.story-close:hover{background:#fff;border-color:var(--ocean)}
.story-pips{
  display:flex;
  gap:4px;
  list-style:none;
  margin:0;
  padding:0;
}
.story-pips li{flex:1;min-width:0}
.story-pips button,
.story-pips span.pip{
  display:block;
  width:100%;
  height:3px;
  border:0;
  padding:0;
  border-radius:99px;
  background:rgba(63,84,64,.16);
  appearance:none;
  cursor:default;
}
.story-pips button[data-can-go="1"]{cursor:pointer}
.story-pips li.is-done button,
.story-pips li.is-done span.pip{background:var(--ocean-soft)}
.story-pips li.is-current button,
.story-pips li.is-current span.pip{background:var(--ochre)}
.story-stage{
  flex:1;
  min-height:0;
  position:relative;
  display:flex;
  flex-direction:column;
}
.story-screen{
  display:none;
  flex:1;
  min-height:0;
  flex-direction:column;
  opacity:0;
  transform:translateX(-16px);
}
.story-screen.is-on{
  display:flex;
  opacity:1;
  transform:none;
  animation:story-in .38s ease both;
}
@keyframes story-in{
  from{opacity:0;transform:translateX(-18px)}
  to{opacity:1;transform:none}
}
@media (prefers-reduced-motion:reduce){
  .story-screen.is-on{animation:none}
  .story-screen{transition:none}
}
.story-body{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:.4rem 1.25rem 1.4rem;
  -webkit-overflow-scrolling:touch;
}
.story-kicker{
  margin:0 0 .45rem;
  font-size:.8rem;
  font-weight:600;
  letter-spacing:.08em;
  color:var(--teal);
}
.story-title{
  font-family:var(--font-head);
  font-weight:400;
  font-size:clamp(1.55rem,6vw,2rem);
  line-height:1.25;
  color:var(--ocean);
  margin:0 0 .7rem;
}
.story-lead{
  margin:0 0 1.1rem;
  color:var(--muted);
  font-size:1.02rem;
  line-height:1.65;
}
.story-lead + .story-lead{margin-top:-.55rem}
.story-fields{display:grid;gap:.9rem}
.story-frame .field label,
.story-legend{
  font-size:.86rem;
  font-weight:600;
  color:var(--muted);
}
.story-frame .field input,
.story-frame .field select,
.story-frame .field textarea{
  font:inherit;
  font-size:1.05rem;
  padding:.8rem .95rem;
  border:1px solid #e3dccd;
  border-radius:3px;
  background:#fff;
  color:var(--ink);
  width:100%;
}
.story-frame .field textarea{min-height:6.2rem;resize:vertical;line-height:1.6}
.story-frame .field input:focus,
.story-frame .field select:focus,
.story-frame .field textarea:focus{
  border-color:var(--teal);
  outline:none;
  box-shadow:0 0 0 3px rgba(90,110,69,.15);
}
.story-hint{margin:.15rem 0 0;font-size:.86rem;color:#5a5e50;line-height:1.55}
.story-chips{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
}
.story-chips label{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  border:1px solid var(--line);
  background:#fff;
  padding:.48rem .72rem;
  border-radius:3px;
  cursor:pointer;
  font-size:.95rem;
  color:var(--ink);
}
.story-chips label:has(input:checked){
  background:var(--teal-mist);
  border-color:var(--ocean-soft);
  color:var(--ocean);
  font-weight:600;
}
.story-chips input{
  position:absolute;
  opacity:0;
  pointer-events:none;
  width:1px;
  height:1px;
}
.story-consent{
  display:flex;
  gap:.6rem;
  align-items:flex-start;
  margin:0;
  padding:.2rem 0;
  font-size:.98rem;
  line-height:1.55;
  color:var(--ink);
}
.story-consent input{
  margin-top:.3rem;
  flex:none;
  accent-color:var(--teal);
  width:1.1rem;
  height:1.1rem;
}
.story-note{
  margin:0;
  font-size:.9rem;
  line-height:1.6;
  color:var(--ink);
  background:#f4f1ea;
  border:1px solid var(--line);
  border-radius:3px;
  padding:.75rem .9rem;
}
.story-error{
  margin:0 0 .6rem;
  color:#7a2e1a;
  background:#fceee8;
  border:1px solid #e8c4b6;
  border-radius:3px;
  padding:.7rem .9rem;
  font-size:.92rem;
}
.story-error[hidden],
.story-file-warn[hidden],
.story-field-msg[hidden],
.story-budget[hidden]{display:none}
.story-file-warn,
.story-field-msg{margin:.2rem 0 0;font-size:.88rem;color:#7a2e1a;line-height:1.5}
.story-file-warn.is-ok{color:var(--ink)}
.story-budget{
  margin:0;
  font-size:.88rem;
  color:var(--ink);
  background:#f3f0e6;
  border:1px solid var(--line);
  border-radius:3px;
  padding:.65rem .9rem;
  line-height:1.55;
}
.story-budget.is-over{color:#7a2e1a;background:#fceee8;border-color:#e8c4b6}
.story-nav{
  flex:none;
  display:flex;
  gap:.7rem;
  align-items:center;
  padding:.85rem 1.25rem max(1rem,env(safe-area-inset-bottom));
  background:linear-gradient(180deg,rgba(252,250,245,0),var(--paper) 28%);
}
.story-nav .btn{flex:1;justify-content:center;min-height:48px}
.story-nav .btn[disabled],
.story-nav .btn[aria-disabled="true"]{
  opacity:.45;
  cursor:not-allowed;
  pointer-events:none;
}
.story-nav .btn-back{flex:0 0 auto;min-width:7.2rem}
.story-resume-actions,
.story-done-actions{display:grid;gap:.7rem;margin-top:1.2rem}
.story-done{text-align:center;padding-top:1.2rem}
.story-done .story-mark{
  width:64px;
  height:64px;
  margin:0 auto 1rem;
  display:block;
}
.story-pay-hook{
  margin-top:1.2rem;
  font-size:.9rem;
  color:var(--muted);
  line-height:1.55;
}
.price-pair{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
.visually-hidden{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}
.story-hp{position:absolute;left:-9999px;height:0;overflow:hidden}

[hidden],
.story-nav[hidden],
.story-nav .btn[hidden]{display:none!important}
.story-title:focus,.story-title:focus-visible{outline:none}
.story-file{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;padding:.55rem .7rem;border:1px solid #e3dccd;border-radius:3px;background:#fff}
.story-file input[type=file]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.story-file-btn{
  display:inline-flex;align-items:center;justify-content:center;
  font:600 .92rem/1 var(--font-body);
  padding:.55rem .9rem;border-radius:999px;cursor:pointer;
  border:1px solid rgba(63,84,64,.35);color:var(--ocean);background:rgba(255,255,255,.8);
}
.story-file-btn:hover{border-color:var(--ocean);background:rgba(63,84,64,.06)}
.story-file-name{font-size:.9rem;color:var(--muted);min-width:0;flex:1}

.story-gender .story-chips{margin-top:.15rem}

.story-tracks{display:grid;gap:.7rem}
.story-track{
  display:flex;
  flex-direction:column;
  gap:.35rem;
  position:relative;
  border:1px solid var(--line);
  background:#fff;
  padding:.9rem 1rem;
  border-radius:3px;
  cursor:pointer;
  color:var(--ink);
}
.story-track input{
  position:absolute;
  opacity:0;
  pointer-events:none;
  width:1px;
  height:1px;
}
.story-track:has(input:checked){
  border-color:var(--ocean-soft);
  background:var(--teal-mist);
}
.story-track:has(input:focus-visible){outline:2px solid var(--ochre);outline-offset:2px}
.story-track-name{
  font-family:var(--font-head);
  font-size:1.3rem;
  color:var(--ocean);
  line-height:1.2;
}
.story-track-desc{margin:0;color:var(--muted);font-size:.95rem;line-height:1.55}
