/* =========================================================
   Accounts: user menu, avatars, log in / sign up, account page
   (loaded on every page, after styles.css)
   ========================================================= */

/* ---------- Avatar (picture or first letter) ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  display: inline-grid; place-items: center;
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(29, 27, 58, .15);
}
.avatar--letter { background: var(--orange); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.avatar--lg { width: 46px; height: 46px; font-size: 1.3rem; }
.avatar--xl { width: 120px; height: 120px; font-size: 3rem; border-width: 4px; }

.plan-badge {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--tint); color: var(--ink-soft);
}
.plan-badge--premium { background: linear-gradient(135deg, #ffd23f, #ff9f1c); color: #4a2b00; }
.plan-badge--teacher { background: var(--teal); color: var(--white); }
.plan-badge[hidden] { display: none; }
.plan-badge--admin { background: var(--ink); color: var(--white); }

/* ---------- User menu in the top bar ---------- */
.usermenu { position: relative; }
.usermenu__btn {
  display: flex; align-items: center; gap: .55rem;
  padding: .3rem .8rem .3rem .3rem;
  border-radius: 999px; border: 2px solid transparent;
  background: var(--tint);
  font: inherit; font-weight: 800; color: inherit; cursor: pointer;
  transition: background .2s, border-color .2s;
}
body:has(.uhero) .nav:not(.is-scrolled) .usermenu__btn { background: rgba(255, 255, 255, .18); color: var(--white); }
.usermenu__btn:hover, .usermenu.is-open .usermenu__btn { border-color: currentColor; }
.usermenu__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu__drop {
  position: absolute; right: 0; top: calc(100% + .6rem);
  width: 250px; padding: .6rem;
  background: var(--white); color: var(--ink);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  display: grid; gap: .15rem;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 50;
}
.usermenu.is-open .usermenu__drop { opacity: 1; visibility: visible; transform: none; }
.usermenu__who { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem .8rem; border-bottom: 2px solid var(--tint); margin-bottom: .3rem; }
.usermenu__who strong { display: block; }
.usermenu__who span { font-size: .82rem; color: var(--ink-soft); font-weight: 700; }
.usermenu__drop a, .usermenu__drop button {
  display: block; width: 100%; text-align: left;
  padding: .6rem .7rem; border-radius: 12px; border: 0; background: none;
  font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
}
.usermenu__drop a::after { display: none; }
.usermenu__drop a:hover, .usermenu__drop button:hover { background: var(--tint); }
.usermenu__upgrade { color: #b86a00 !important; }

@media (max-width: 900px) {
  .usermenu__drop { position: static; width: 100%; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; margin-top: .6rem; }
  .usermenu.is-open .usermenu__drop { display: grid; }
}

/* ---------- Log in / sign up pages ---------- */
.authpage {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 7rem 1rem 3rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(108, 76, 245, .18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 92, 138, .14), transparent 40%),
    var(--bg);
}
.authcard {
  width: 100%; max-width: 440px;
  background: var(--white);
  border-radius: 28px; box-shadow: var(--shadow-lg);
  padding: 2.4rem 2.2rem 2rem;
  animation: cardIn .5s cubic-bezier(.22, 1, .36, 1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.authcard h1 { font-size: 2rem; margin-bottom: .3rem; }
.authcard > p { color: var(--ink-soft); margin-bottom: 1.6rem; }
.authcard__alt { text-align: center; margin-top: 1.4rem; color: var(--ink-soft); font-weight: 700; }
.authcard__alt a { color: var(--purple); text-decoration: underline; }

.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 800; font-size: .92rem; }
.field input {
  width: 100%; padding: .85rem 1rem;
  border: 2px solid #e4e1f5; border-radius: 14px;
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(108, 76, 245, .15); }
.field small { color: var(--ink-soft); font-size: .82rem; }
.field__note { color: var(--ink-soft); font-size: .82rem; margin: 0; }
.field small[hidden], .field__note[hidden], .formnote[hidden] { display: none; }
.formnote { background: #fff6e0; border-radius: 14px; padding: .7rem .9rem; font-size: .88rem; font-weight: 600; color: var(--ink); }
.field__pw { position: relative; }
.field__pw input { padding-right: 4.2rem; }
.field__show {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  border: 0; background: var(--tint); color: var(--ink-soft);
  border-radius: 10px; padding: .35rem .6rem; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer;
}
.form .btn { width: 100%; justify-content: center; }
.form .btn[disabled] { opacity: .6; cursor: wait; }

.formmsg { padding: .75rem 1rem; border-radius: 12px; font-weight: 700; font-size: .92rem; }
.formmsg[hidden] { display: none; }
.formmsg--error { background: #ffeef3; color: #c0254f; }
.formmsg--ok { background: #e6faf5; color: #0b8a72; }

.pwmeter { height: 6px; border-radius: 999px; background: #eeecf8; overflow: hidden; }
.pwmeter span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .3s, background .3s; }

.offline-note { background: #fff8e6; border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1.2rem; font-size: .9rem; line-height: 1.5; }
.offline-note code { background: #fff; padding: .1rem .35rem; border-radius: 6px; }

/* ---------- Account page ---------- */
.acct { padding: 7.5rem 0 4rem; background: var(--bg); min-height: 100vh; }
.acct__grid { display: grid; grid-template-columns: 300px 1fr; gap: 1.6rem; align-items: start; }
.acct__card { background: var(--white); border-radius: 24px; box-shadow: var(--shadow); padding: 1.6rem; border: 2px solid #efecfb; }
.acct__card h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.acct__main { display: grid; gap: 1.6rem; }

.profile { text-align: center; position: sticky; top: 6rem; }
.profile__pic { position: relative; width: 120px; margin: 0 auto 1rem; }
.profile__pic .avatar--xl { box-shadow: var(--shadow); }
.profile__edit {
  position: absolute; right: -4px; bottom: 2px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--white); background: var(--purple); color: var(--white);
  display: grid; place-items: center; cursor: pointer; font-size: 1rem; padding: 0;
}
.profile__edit:hover, .profile__edit:focus-visible { background: var(--pink); }
.avatar--icon { background: var(--white); }

/* ---------- Choosing a profile icon ---------- */
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .7rem; }
.iconpick__group { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); grid-column: 1 / -1; margin-top: .3rem; }
.iconpick button {
  display: grid; justify-items: center; gap: .3rem; padding: .55rem .3rem; border-radius: 16px;
  border: 3px solid transparent; background: var(--tint); cursor: pointer; font: inherit; font-size: .78rem; font-weight: 700; color: var(--ink);
  transition: transform .15s, border-color .15s;
}
.iconpick button:hover, .iconpick button:focus-visible { transform: translateY(-2px); border-color: var(--purple); outline: none; }
.iconpick button.is-on { border-color: var(--teal); background: #e3fbf5; }
.iconpick img { width: 60px; height: 60px; border-radius: 50%; }
@media (max-width: 480px) { .iconpick { grid-template-columns: repeat(4, 1fr); gap: .45rem; } .iconpick img { width: 48px; height: 48px; } .iconpick button { font-size: .68rem; } }
.profile h1 { font-size: 1.6rem; word-break: break-word; }
.profile__email { color: var(--ink-soft); font-weight: 700; font-size: .9rem; margin: .2rem 0 .8rem; word-break: break-all; }
/* no email (students): keep the gap between the name and the plan badge */
.profile__email[hidden] + .plan-badge { margin-top: .6rem; }
.profile__since { color: var(--ink-soft); font-size: .82rem; margin-top: .8rem; }
.profile__links { display: grid; gap: .5rem; margin-top: 1.2rem; }
.profile__links .btn { justify-content: center; }
.profile__remove { background: none; border: 0; color: var(--ink-soft); font: inherit; font-size: .82rem; font-weight: 700; text-decoration: underline; cursor: pointer; margin-top: .3rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.stat { background: var(--tint); border-radius: 18px; padding: 1rem 1.1rem; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.8rem; line-height: 1.1; }
.stat span { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }

.unitbars__hint { margin-top: 1.2rem; color: var(--ink-soft); font-size: .88rem; }
.unitbars { display: grid; gap: .7rem; margin-top: .6rem; }
.unitbar { border: 2px solid #efecfb; border-radius: 18px; transition: border-color .2s, box-shadow .2s; }
.unitbar:hover, .unitbar.is-open { border-color: #ddd7f6; }
.unitbar.is-open { box-shadow: 0 8px 24px rgba(29, 27, 58, .06); }
.unitbar__toggle { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .85rem 1rem .75rem; font: inherit; color: inherit; cursor: pointer; border-radius: 16px; }
.unitbar__toggle:focus-visible { outline: 3px solid rgba(108, 76, 245, .35); }
.unitbar__top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; font-weight: 800; margin-bottom: .45rem; gap: .2rem 1rem; }
.unitbar__top span { color: var(--ink-soft); font-size: .9rem; }
.unitbar__track { display: block; height: 12px; border-radius: 999px; background: #eeecf8; overflow: hidden; }
.unitbar__fill { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1s cubic-bezier(.22, 1, .36, 1); }
.unitbar__more { display: flex; justify-content: space-between; align-items: center; margin-top: .45rem; font-size: .84rem; font-weight: 700; color: var(--ink-soft); }
.unitbar__chev { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f3f1fb; color: var(--ink); font-size: .9rem; transition: transform .25s; }
.unitbar.is-open .unitbar__chev { transform: rotate(180deg); }
.unitbar__panel { padding: .2rem 1rem 1rem; animation: ubIn .25s ease; }
@keyframes ubIn { from { opacity: 0; transform: translateY(-4px); } }
.unitbar__nextup { display: grid; grid-template-columns: 1fr; gap: .1rem; padding: .75rem 1rem; margin-bottom: .8rem; border-radius: 14px; background: #f7f5ff; border-left: 5px solid var(--c, var(--purple)); }
.unitbar__nextup small { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.unitbar__nextup span { font-size: .9rem; color: var(--purple); font-weight: 700; }
.unitbar__nextup:hover { background: #f0edff; }
.tproglist { list-style: none; margin: 0; padding: 0; display: grid; }
.tprog { display: grid; grid-template-columns: minmax(150px, 1.1fr) auto minmax(150px, 1fr); align-items: center; gap: .4rem 1rem; padding: .65rem 0; border-top: 1px solid #f1eff9; }
.tprog__head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tprog__name { font-weight: 800; }
.tprog__name:hover { color: var(--purple); text-decoration: underline; }
.tprog__chip { font-size: .7rem; font-weight: 800; border-radius: 99px; padding: .12rem .5rem; white-space: nowrap; }
.tprog__chip--done { background: #e6faf5; color: #0b8a72; }
.tprog__chip--started { background: #fff4e0; color: #b35c00; }
.tprog__chip--new { background: #f3f1fb; color: var(--ink-soft); }
.tprog__dots { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.qdot { display: inline-grid; place-items: center; min-width: 34px; height: 28px; padding: 0 .3rem; border-radius: 9px; font-size: .74rem; font-weight: 800; background: #f3f1fb; color: var(--ink-soft); border: 2px solid transparent; transition: transform .15s, border-color .15s; }
a.qdot:hover { transform: translateY(-2px); border-color: var(--purple); }
.qdot--full { background: #19c39a; color: var(--white); }
.qdot--tried { background: #ffe2b8; color: #8a4a00; }
.qdot--locked { background: none; font-size: .8rem; }
.tprog__count { font-size: .8rem; font-weight: 800; color: var(--ink-soft); margin-left: .2rem; }
.tprog__next { font-size: .86rem; font-weight: 700; }
.tprog__next a { color: var(--purple); }
.tprog__next a:hover { text-decoration: underline; }
.tprog__next span { color: #0b8a72; }
.unitbar__papers { margin-top: .9rem; }
.unitbar__papers h4 { font-size: .9rem; margin-bottom: .4rem; }
.unitbar__papers div { display: flex; flex-wrap: wrap; gap: .35rem; }
.pchip { font-size: .8rem; font-weight: 700; padding: .25rem .65rem; border-radius: 99px; background: #f3f1fb; color: var(--ink-soft); }
.pchip--done { background: #e6faf5; color: #0b8a72; }
.pchip:hover { text-decoration: underline; }
.unitbar__unitlink { display: inline-block; margin-top: .9rem; font-size: .88rem; font-weight: 800; color: var(--purple); }
.unitbar__unitlink:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .tprog { grid-template-columns: 1fr; gap: .4rem; }
}

.activity { list-style: none; display: grid; gap: .5rem; padding: 0; }
.activity li { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 14px; background: #fbfaff; }
.activity__icon { font-size: 1.2rem; }
.activity__text { flex: 1; font-weight: 700; }
.activity__text small { display: block; color: var(--ink-soft); font-weight: 600; }
.activity__score { font-weight: 800; padding: .2rem .6rem; border-radius: 999px; background: var(--tint); font-size: .85rem; }
.activity__score.is-full { background: #e6faf5; color: #0b8a72; }
.empty-note { color: var(--ink-soft); }

.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.settings h3 { font-size: 1.05rem; margin-bottom: .8rem; }
.plancard { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.2rem 1.4rem; border-radius: 18px; background: var(--tint); }
.plancard[hidden] { display: none; }
.plancard--premium { background: linear-gradient(135deg, #fff4cf, #ffe2b8); }
.plancard strong { font-family: var(--font-head); font-size: 1.3rem; }
.plancard p { color: var(--ink-soft); font-size: .9rem; margin-top: .2rem; }

@media (max-width: 900px) {
  .acct__grid { grid-template-columns: 1fr; }
  .profile { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .settings { grid-template-columns: 1fr; }
}

/* ---------- Upgrade page ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 1.4rem; justify-content: center; margin-top: 2rem; }
.plan { background: var(--white); border-radius: 26px; padding: 2rem; box-shadow: var(--shadow); border: 3px solid #efecfb; display: flex; flex-direction: column; }
.plan--premium { border-color: var(--orange); box-shadow: 0 20px 50px rgba(255, 159, 28, .2); position: relative; }
.plan--premium::before { content: "Best for exams"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--orange); color: var(--white); font-weight: 800; font-size: .78rem; padding: .3rem .9rem; border-radius: 999px; white-space: nowrap; }
.plan h2 { font-size: 1.6rem; }
.plan__price { font-family: var(--font-head); font-size: 2.6rem; margin: .4rem 0 1rem; }
.plan__price small { font-size: 1rem; color: var(--ink-soft); font-family: var(--font-body); font-weight: 700; }
.plan ul { list-style: none; display: grid; gap: .6rem; margin-bottom: 1.6rem; flex: 1; padding: 0; }
.plan li { padding-left: 1.7rem; position: relative; font-weight: 600; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
.plan li.is-no { color: var(--ink-soft); }
.plan li.is-no::before { content: "✕"; color: #c9c6dc; }
.plan .btn { justify-content: center; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Locks on Premium questions ---------- */
.qtab.is-locked { opacity: .75; }
.qtab.is-locked b { background: #fff1d6; color: #b86a00; }
.lockcard { text-align: center; padding: 2.5rem 1rem; }
.lockcard__icon { font-size: 3rem; margin-bottom: .6rem; }
.lockcard h2 { font-size: 1.7rem; margin-bottom: .5rem; }
.lockcard p { color: var(--ink-soft); max-width: 460px; margin: 0 auto 1.4rem; }
.lockcard__btns { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

/* "Sign up to save your progress" nudge */
.savenote { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .8rem 1.1rem; margin-bottom: 1.2rem; border-radius: 16px; background: #fff8e6; font-weight: 700; }
.savenote a { color: var(--purple); text-decoration: underline; }

/* Unit pages: completed subtopics */
.subtopic__done { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--teal); }
.subtopic.is-complete { border-color: var(--teal); background: #f2fcf9; }

/* Anything marked hidden stays hidden, even buttons with their own display style */
[hidden] { display: none !important; }
.settings .form { align-content: start; }

/* Sign up: student or teacher */
.rolepick { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; border: 0; padding: 0; margin: 0; }
.rolepick legend { font-weight: 800; font-size: .92rem; margin-bottom: .35rem; }
.rolepick label { position: relative; display: grid; gap: .15rem; padding: .85rem 1rem; border: 2px solid #e4e1f5; border-radius: 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.rolepick label strong { font-size: 1rem; }
.rolepick label span { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.rolepick input { position: absolute; opacity: 0; pointer-events: none; }
.rolepick label:has(input:checked) { border-color: var(--purple); background: #f6f3ff; }
.rolepick label:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(108, 76, 245, .2); }

.savenote--working { background: #f1edff; font-weight: 600; }
.savenote--working b { font-weight: 800; }
@media (max-width: 420px) {
  .qdot { min-width: 30px; height: 26px; font-size: .7rem; }
  .tprog__dots { gap: .25rem; }
}

/* ---------- My progress: topic headings that open to show their subtopics ---------- */
.tgroups { display: grid; gap: .5rem; }
.tgroups__tools { display: flex; justify-content: flex-end; gap: .2rem; margin: 0 0 .4rem; }
.tgroups__tools button { border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 800; color: var(--purple); cursor: pointer; padding: .2rem .5rem; border-radius: 8px; }
.tgroups__tools button:hover, .tgroups__tools button:focus-visible { background: #f3f1fb; outline: 0; }
.tgroup { border: 2px solid #efecfb; border-radius: 14px; background: var(--white); transition: border-color .2s; }
.tgroup[open] { border-color: #ddd7f6; }
.tgroup > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto 96px auto; align-items: center; gap: .75rem; padding: .7rem .9rem; cursor: pointer; border-radius: 12px; }
.tgroup > summary::-webkit-details-marker { display: none; }
.tgroup > summary:hover { background: #faf9ff; }
.tgroup > summary:focus-visible { outline: 3px solid rgba(108, 76, 245, .35); }
.tgroup__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; font-size: .85rem; background: #f3f1fb; color: var(--ink-soft); }
.tgroup--done .tgroup__icon { background: #19c39a; color: var(--white); }
.tgroup--started .tgroup__icon { background: #ffe2b8; color: #8a4a00; }
.tgroup__name { font-weight: 800; }
.tgroup__meta { font-size: .8rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.tgroup__bar { display: block; height: 8px; border-radius: 999px; background: #eeecf8; overflow: hidden; }
.tgroup__bar span { display: block; height: 100%; border-radius: inherit; }
.tgroup__chev { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #f3f1fb; font-size: .8rem; color: var(--ink); transition: transform .25s; }
.tgroup[open] .tgroup__chev { transform: rotate(180deg); }
.tgroup .tproglist { padding: 0 .9rem .3rem; animation: ubIn .25s ease; }
/* Each subtopic: name + status, with what to do next on the right; its questions underneath */
.tgroup .tprog { grid-template-columns: 1fr auto; grid-template-areas: "head next" "dots dots"; gap: .45rem 1rem; padding: .7rem .1rem; }
.tgroup .tprog__head { grid-area: head; }
.tgroup .tprog__next { grid-area: next; text-align: right; max-width: 22rem; }
.tgroup .tprog__dots { grid-area: dots; }
.qdot--lockedmore { min-width: 0; padding: 0 .6rem; background: none; border: 2px dashed #e3def8; color: var(--ink-soft); font-size: .74rem; white-space: nowrap; }
@media (max-width: 640px) {
  .tgroup > summary { grid-template-columns: auto 1fr auto; row-gap: .15rem; }
  .tgroup__icon { grid-row: 1 / span 2; }
  .tgroup__meta { grid-column: 2; grid-row: 2; }
  .tgroup__bar { display: none; }
  .tgroup__chev { grid-column: 3; grid-row: 1 / span 2; }
  .tgroup .tproglist { padding: 0 .7rem .3rem; }
  .tgroup .tprog { grid-template-columns: 1fr; grid-template-areas: "head" "dots" "next"; }
  .tgroup .tprog__next { text-align: left; max-width: none; }
}

/* Access code box on sign-up and the account page (30 Nov 2026) */
.field__opt { font-weight: 400; opacity: .7; }
.field__code { text-transform: uppercase; letter-spacing: .08em; font-family: ui-monospace, Consolas, monospace; }
.field__code::placeholder { text-transform: none; letter-spacing: normal; font-family: inherit; }
.plancard__code { flex: 1 1 100%; }
.codeform { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.codeform input { flex: 1 1 12rem; min-width: 0; padding: .6rem .8rem; border: 2px solid #e4e1f5; border-radius: 12px; font: inherit; background: var(--white); color: var(--ink); }
.codeform input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(108, 76, 245, .15); }
.plancard__code .formmsg { margin-top: .6rem; }
.codeform .field__code { font-family: ui-monospace, Consolas, monospace; }
