/* Shared look for checkout, sign-in, course and admin pages.
   Colours are variables: each course can set its own (see the course "theme" in the admin area). */
:root{
  color-scheme: light;
  --bg:#fdfbf5; --surface:#ffffff; --soft:#f4f7f1; --line:#dfe7de;
  --ink:#14332b; --muted:#5d7d72; --deep:#1f5d43; --deep-2:#143f2f;
  --accent:#e0a423; --accent-lit:#f7c95a; --accent-ink:#3d2a05; --accent-soft:#fbe9bd;
  --good:#2f7d4f; --bad:#a33a2a;
  --font-body:'Outfit',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-script:'Caveat',cursive;
}
*{ box-sizing:border-box; }
html,body{ margin:0; }
body{ background:var(--bg); color:var(--ink); font-family:var(--font-body); line-height:1.65;
  -webkit-font-smoothing:antialiased; min-height:100vh; }
h1,h2,h3{ margin:0; line-height:1.2; font-weight:600; letter-spacing:-.01em; text-wrap:balance; }
p{ margin:0 0 1rem; }
a{ color:var(--deep); }
button{ font:inherit; cursor:pointer; border:none; }
[hidden]{ display:none !important; }
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:6px; }
.script{ font-family:var(--font-script); font-weight:600; }
.muted{ color:var(--muted); }

/* top bar */
.bar{ display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap;
  padding:.9rem clamp(1rem,4vw,1.5rem); border-bottom:1px solid var(--line); background:var(--bg); }
.brand{ display:flex; align-items:center; gap:.55rem; font-weight:600; text-decoration:none; color:var(--ink); }
/* The Will and the Way mark. It takes the page's colour (--mark, or the text colour),
   so it matches each course's colour scheme. Use: <span class="mark" aria-hidden="true"></span> */
.mark{ display:block; width:30px; height:30px; flex-shrink:0; background:var(--mark, var(--ink));
  -webkit-mask:url(/assets/logo-mark.png) center/contain no-repeat; mask:url(/assets/logo-mark.png) center/contain no-repeat; }
.brand small{ display:block; font-size:.66rem; font-weight:400; color:var(--muted); letter-spacing:.14em; text-transform:uppercase; line-height:1.2; }
.linkbtn{ background:none; color:var(--muted); font-size:.9rem; padding:.3rem 0; text-decoration:none; }
.linkbtn:hover{ color:var(--ink); }

/* buttons */
.cta{ display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  background:linear-gradient(135deg,var(--accent-lit),var(--accent)); color:var(--accent-ink);
  font-weight:600; font-size:1rem; padding:.95rem 2rem; border-radius:100px; text-decoration:none;
  box-shadow:0 8px 22px rgba(224,164,35,.28); transition:transform .2s ease, box-shadow .2s ease; }
.cta:hover{ transform:translateY(-1px); box-shadow:0 12px 28px rgba(224,164,35,.38); }
.cta:disabled{ opacity:.5; cursor:not-allowed; transform:none; }
.ghost{ background:var(--surface); border:1px solid var(--line); color:var(--ink); font-weight:500;
  padding:.7rem 1.3rem; border-radius:100px; font-size:.94rem; text-decoration:none; }
.ghost:hover{ border-color:var(--deep); }
.solid{ background:var(--deep); color:#fff; font-weight:600; padding:.7rem 1.3rem; border-radius:100px; font-size:.94rem; }
.solid:hover{ background:var(--deep-2); }

/* forms */
.fld{ margin-bottom:1.1rem; }
.fld label{ display:block; font-size:.93rem; font-weight:500; margin-bottom:.4rem; }
.fld input, .fld textarea, .fld select{ width:100%; border:1px solid var(--line); border-radius:10px; padding:.75rem .85rem;
  font:inherit; font-size:1rem; color:var(--ink); background:var(--bg); }
.fld textarea{ resize:vertical; min-height:90px; }
.fld input:focus, .fld textarea:focus, .fld select:focus{ outline:2px solid var(--deep); outline-offset:-1px; }
.hint{ font-size:.83rem; color:var(--muted); margin-top:.3rem; }
.err{ font-size:.86rem; color:var(--bad); margin-top:.35rem; }
.fld.bad input{ border-color:var(--bad); }
.check{ display:flex; gap:.65rem; align-items:flex-start; font-size:.93rem; line-height:1.5; margin-bottom:1.2rem; cursor:pointer; }
.check input{ margin-top:.25rem; width:18px; height:18px; flex-shrink:0; accent-color:var(--deep); }
.notice{ padding:.85rem 1rem; border-radius:12px; background:var(--soft); border:1px solid var(--line); font-size:.93rem; margin-bottom:1.2rem; }
.notice.bad{ background:#fbeeea; border-color:#efc9bf; color:#6d2417; }

.panel{ background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:clamp(1.3rem,4vw,1.8rem); }

/* narrow single-column pages (sign-in) */
.narrow{ max-width:460px; margin:0 auto; padding:clamp(2rem,6vw,3.5rem) 1rem 4rem; }
.narrow h1{ font-size:clamp(1.5rem,4vw,1.9rem); margin-bottom:.5rem; }
.footer{ text-align:center; font-size:.82rem; color:var(--muted); padding:2rem 1rem 2.5rem; }
.footer a{ color:var(--muted); }

.spin{ display:inline-block; width:16px; height:16px; border:2px solid currentColor; border-right-color:transparent;
  border-radius:50%; animation:spin .8s linear infinite; vertical-align:-3px; }
@keyframes spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ *{ animation:none !important; transition:none !important; } }
