@font-face{
  font-family:"VelaSans";
  src:url("../assets/fonts/VelaSans-Regular.ttf") format("truetype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

:root{
  --text:#0e0e0e;
  --muted:#6b7280;
  --border:#d7d9df;
  --border2:#e7e8ec;
  --container:1180px;
  --black:#0e0e0e;
  --bg:#ffffff;
  --green:#1a7a43;
  --green-bg:#edf7f1;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:"VelaSans",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
}
button,input{ font:inherit; }
[hidden]{ display:none !important; }

/* ── Topbar ─────────────────────────────────────────────────────────── */
.topbar{
  width:100%;
  padding:22px 0;
}
.topbar__inner{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
}
.topbar__left{ justify-self:start; }
.topbar__right{ justify-self:end; }

.brand{ display:flex; align-items:center; gap:20px; justify-self:center; }
.brand__logo{ height:24px; display:block; }
.brand__divider{ width:1px; height:42px; background:#c9c9c9; }
.brand__title{ font-weight:700; font-size:32px; line-height:1; }

.pillBtn{
  height:42px;
  padding:0 24px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:#111;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:opacity .15s ease, background .15s ease;
}
.pillBtn:active{ transform:translateY(1px); }
.pillBtn--dark{ background:var(--black); border-color:var(--black); color:#fff; }
.pillBtn--dark:hover{ opacity:.9; }
.pillBtn--dark:disabled{ opacity:.45; cursor:default; }
.pillBtn--light:hover{ background:#f5f5f5; }
.pillBtn--wide{ width:100%; }

/* ── Page ───────────────────────────────────────────────────────────── */
.page{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
  padding:16px 0 80px;
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero{
  text-align:center;
  padding:32px 0 36px;
}
.hero__title{
  margin:0;
  font-size:36px;
  font-weight:900;
  letter-spacing:-0.02em;
  line-height:1.1;
}
.hero__sub{
  margin:12px 0 0;
  font-size:16px;
  color:var(--muted);
}

/* ── Subscription grid ──────────────────────────────────────────────── */
.subGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

/* ── Subscription card ──────────────────────────────────────────────── */
.subCard{
  border:1px solid var(--border);
  border-radius:22px;
  padding:28px;
  display:flex;
  flex-direction:column;
  gap:20px;
  background:#fff;
}
.subCard.is-active{
  border-color:#b2d9c3;
  background:var(--green-bg);
}

.subCard__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.subCard__title{
  font-size:22px;
  font-weight:900;
  letter-spacing:-0.01em;
  line-height:1.15;
}
.subCard__price{
  text-align:right;
  flex-shrink:0;
}
.subCard__price strong{
  display:block;
  font-size:26px;
  font-weight:900;
  letter-spacing:-0.02em;
  line-height:1.1;
}
.subCard__price span{
  font-size:12px;
  color:var(--muted);
}

.subCard__desc{
  font-size:14px;
  color:var(--muted);
  line-height:1.5;
}

.subCard__features{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.subCard__feature{
  font-size:14px;
  display:flex;
  align-items:baseline;
  gap:8px;
}
.subCard__feature::before{
  content:"✓";
  font-weight:900;
  color:var(--green);
  flex-shrink:0;
}

.subCard__books{
  border-top:1px solid var(--border2);
  padding-top:16px;
}
.subCard__books .label{
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:var(--muted);
  margin-bottom:8px;
}
.bookPills{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.bookPill{
  font-size:12px;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
  background:#f0f0f0;
  color:#444;
  white-space:nowrap;
}
.subCard.is-active .bookPill{
  background:#d2edd e;
  color:#1a5c33;
}

.subCard__actions{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.subCard__status{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  font-weight:900;
  color:var(--green);
}
.subCard__status::before{
  content:"✓";
}
.subCard__cancelBtn{
  background:none;
  border:none;
  padding:0;
  font-size:13px;
  color:var(--muted);
  cursor:pointer;
  text-decoration:underline;
  text-align:left;
}
.subCard__cancelBtn:hover{ color:#d05656; }

/* ── Code step ──────────────────────────────────────────────────────── */
.codeWrap{
  display:flex;
  justify-content:center;
  margin-top:40px;
}
.codeCard{
  width:min(520px, 100%);
  border:1px solid var(--border);
  border-radius:22px;
  padding:28px;
  display:grid;
  gap:18px;
}
.codeCard__title{
  font-size:20px;
  font-weight:900;
}
.codeCard__text{
  font-size:14px;
  color:var(--muted);
  line-height:1.5;
  margin-top:-10px;
}
.codeBox{
  border:1px solid var(--border2);
  border-radius:18px;
  padding:16px 18px;
  background:#fafafa;
}
.codeBox__label{ font-size:12px; color:var(--muted); }
.codeBox__value{
  margin-top:8px;
  font-size:34px;
  font-weight:900;
  letter-spacing:0.1em;
}
.field{ display:grid; gap:8px; }
.field__label{ font-size:13px; font-weight:900; }
.input{
  width:100%;
  height:50px;
  border:1px solid var(--border);
  border-radius:14px;
  padding:0 16px;
  font-size:15px;
  outline:none;
  background:#fff;
  color:var(--text);
}
.input:focus{ border-color:var(--black); }
.codeActions{ display:flex; gap:10px; justify-content:flex-end; }

/* ── Hints ──────────────────────────────────────────────────────────── */
.hint{
  min-height:20px;
  margin:0;
  font-size:13px;
  line-height:1.35;
  color:var(--muted);
}
.hint.is-error{ color:#d05656; }
.hint.is-ok{ color:var(--green); }
.pageHint{ margin-top:20px; text-align:center; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media(max-width:860px){
  .topbar__inner,.page{ width:calc(100% - 32px); }
  .subGrid{ grid-template-columns:1fr; }
  .hero__title{ font-size:28px; }
}
@media(max-width:600px){
  .topbar__inner{ grid-template-columns:1fr; gap:12px; justify-items:center; }
  .topbar__left{ justify-self:center; }
  .subCard{ padding:20px; }
  .subCard__head{ flex-direction:column; }
  .subCard__price{ text-align:left; }
}
