/* HI mokymai — design system + landing page.
   Aesthetic: bright editorial / optimistic-civic. Warm cream paper, fresh green
   (health), warm marigold accent. Bricolage Grotesque (display) + Hanken Grotesk
   (body). Fonts loaded via <link>. */

/* ------------------------------------------------------------------ tokens */
:root {
  --paper:      #f6f2e5;   /* warm cream — page background */
  --paper-2:    #fffdf4;   /* lighter cream — raised surfaces */
  --card:       #ffffff;
  --ink:        #1e2a22;   /* deep warm near-black — text */
  --ink-2:      #57605a;   /* muted body text */
  --green:      #1a7a4a;   /* primary — fresh health green (fills) */
  --green-deep: #0f5b37;   /* darker — hover + green text on light */
  --green-wash: #e4efe5;   /* light tint */
  --gold:       #eaa312;   /* warm marigold — accent */
  --gold-wash:  #faead0;
  --coral:      #e6573b;   /* warm coral — sparing pops */
  --line:       #e7ded0;   /* warm hairline */
  --line-2:     #d7ccb6;

  --shadow-sm: 0 2px 8px rgba(30,42,34,.07);
  --shadow-md: 0 14px 34px -14px rgba(30,42,34,.24);
  --shadow-lg: 0 30px 60px -22px rgba(30,42,34,.32);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;

  --maxw: 1140px;
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--paper);
  /* atmosphere: soft marigold + green glows on warm paper */
  background-image:
    radial-gradient(60rem 38rem at 88% -8%, rgba(234,163,18,.28), transparent 60%),
    radial-gradient(52rem 40rem at -6% 8%, rgba(26,122,74,.13), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
strong, b { font-weight: 700; }

/* ------------------------------------------------------------- typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.4rem, 1.4rem + 4.0vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2.0vw, 2.85rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.015em; }

/* ------------------------------------------------------------- utilities */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.eyebrow {
  font-size: .82rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-deep);
}
.section-tag {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-2);
}
.section-tag::before {
  content: ""; width: 26px; height: 3px; border-radius: 2px;
  background: var(--gold);
}

/* ------------------------------------------------------------ buttons/links */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body);
  font-size: 1.02rem; font-weight: 700;
  padding: 15px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--green-deep); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: var(--shadow-md); }
.btn-gold:hover { background: #d8930a; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-lg { font-size: 1.1rem; padding: 18px 38px; }

.link { color: var(--green-deep); font-weight: 600; text-underline-offset: 3px; }
.link:hover { color: var(--green); }

a:focus-visible, .btn:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* =================================================== generic pages (layout.ts) */
.site-header { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; flex-direction: column; padding: 16px 0; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.brand-sub { font-size: .85rem; color: var(--ink-2); }
.header-link { font-weight: 600; color: var(--green); text-decoration: none; white-space: nowrap; }
.header-link:hover { text-decoration: underline; }
main.wrap { padding-block: 40px 64px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 30px;
  box-shadow: var(--shadow-sm);
}
.card h1 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); margin-bottom: .5em; }
.card p + p { margin-top: .8em; }
.site-footer { background: #123a26; color: #c3d2c6; padding-block: 32px; }
.footer-inner { display: flex; align-items: center; gap: 20px; }
.eu-emblem { flex-shrink: 0; border-radius: 6px; }
.site-footer p { font-size: .9rem; }

/* ============================================================ landing: nav */
.lp-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,242,229,.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.lp-nav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 13px; }
.lp-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.lp-brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
}
.lp-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.lp-brand-text b { font-weight: 700; font-size: .98rem; }
.lp-brand-text span { font-size: .78rem; color: var(--ink-2); }
.lp-nav-actions { display: flex; align-items: center; gap: 22px; }
.lp-nav-link { text-decoration: none; font-weight: 600; font-size: .96rem; color: var(--ink); }
.lp-nav-link:hover { color: var(--green-deep); }

/* ========================================================== landing: hero */
.hero { position: relative; padding-block: clamp(48px, 6vw, 96px) clamp(40px, 5vw, 80px); }
.hero-inner { max-width: 880px; }
.hero h1 { margin-block: 18px 0; }
.hero h1 .accent { color: var(--green-deep); }
.hero-lead {
  font-size: clamp(1.08rem, 1rem + .5vw, 1.32rem);
  color: var(--ink-2); max-width: 40ch; margin-top: 22px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.pill {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--paper-2); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 8px 16px;
  font-size: .9rem; font-weight: 600;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pill.gold .dot { background: var(--gold); }
.pill.coral .dot { background: var(--coral); }

/* ==================================================== landing: statements */
.statements { padding-block: clamp(40px, 5vw, 78px); }
.statement-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  overflow: hidden; background: var(--line-2);
}
.statement {
  background: var(--paper-2); padding: 34px 30px;
  display: flex; flex-direction: column; gap: 14px;
}
.statement-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 3.4rem; line-height: 1; color: var(--gold);
  letter-spacing: -0.03em;
}
.statement p { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; }
.statements-note {
  margin-top: 26px; font-size: 1.06rem; color: var(--ink-2);
  max-width: 62ch;
}
.statements-note strong { color: var(--ink); }

/* ===================================================== landing: section base */
.section { padding-block: clamp(46px, 6vw, 92px); }
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head h2 { margin-top: 14px; }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 1.08rem; }
.section--paper { background: var(--paper-2); border-block: 1px solid var(--line); }

/* ===================================================== landing: skills grid */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column; gap: 12px;
}
.skill:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.skill-num {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: #fff; background: var(--green);
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
}
.skill h3 { margin-top: 4px; }
.skill p { color: var(--ink-2); font-size: 1.02rem; }
.skill-result {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: .5em;
  align-self: flex-start;
  background: var(--green-wash); color: var(--green-deep);
  border-radius: 999px; padding: 7px 14px;
  font-size: .83rem; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
}
.skill-result::before { content: "✓"; font-weight: 700; }

/* ======================================================== landing: program */
.program-list { display: flex; flex-direction: column; }
.slot {
  display: grid; grid-template-columns: 96px 1fr; gap: 26px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.slot:first-child { border-top: none; }
.slot-time {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.3rem; color: var(--green-deep);
}
.slot-body h3 { font-size: 1.18rem; }
.slot-body p { color: var(--ink-2); font-size: 1rem; margin-top: 5px; }
.slot--break { opacity: .72; }
.slot--break .slot-time { color: var(--ink-2); font-size: 1.05rem; }
.slot--break .slot-body h3 { font-size: .98rem; font-weight: 600; font-family: var(--font-body); color: var(--ink-2); }
.slot-tag {
  display: inline-block; margin-top: 9px;
  background: var(--gold-wash); color: #8a5a00;
  border-radius: 7px; padding: 4px 11px;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}

/* ======================================================= landing: lecturer */
.lecturer-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: center; }
.lecturer-photo { position: relative; }
.lecturer-photo img {
  width: 100%; border-radius: var(--r-lg);
  border: 1px solid var(--line); position: relative; z-index: 2;
}
.lecturer-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  background: var(--gold); border-radius: var(--r-lg); z-index: 1;
}
.lecturer-name { margin-top: 12px; }
.lecturer-role { color: var(--green-deep); font-weight: 700; margin-top: 6px; }
.lecturer-bio { margin-top: 16px; color: var(--ink-2); font-size: 1.07rem; }
.lecturer-points { list-style: none; padding: 0; margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.lecturer-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.02rem; }
.lecturer-points li::before {
  content: ""; flex-shrink: 0; margin-top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
}

/* ======================================================== landing: benefits */
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefit {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 28px;
  box-shadow: var(--shadow-sm);
}
.benefit-icon {
  width: 48px; height: 48px; border-radius: 13px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--green-wash); margin-bottom: 16px;
}
.benefit h3 { font-size: 1.18rem; }
.benefit p { color: var(--ink-2); font-size: 1rem; margin-top: 8px; }

/* ============================================================ landing: CTA */
.cta {
  background: linear-gradient(155deg, #1a6e44, #0d4429);
  color: #eef3e9;
  border-radius: var(--r-lg); padding: clamp(40px, 5vw, 68px);
  position: relative; overflow: hidden;
}
.cta::after {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(234,163,18,.46), transparent 68%);
}
.cta-inner { position: relative; z-index: 2; max-width: 56ch; }
.cta h2 { color: #fff; }
.cta p { color: #c9dccd; margin-top: 14px; font-size: 1.1rem; }
.cta .btn { margin-top: 28px; }
.cta-note { margin-top: 16px; font-size: .92rem; color: #93ac9b; }

/* ========================================================= landing: footer */
.lp-footer { background: #123a26; color: #c3d2c6; padding-block: 52px 32px; }
.lp-footer a { color: #fff; }
.lp-footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.13);
}
.lp-footer h4 {
  font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: #87a08f; margin-bottom: 14px;
}
.lp-footer-eu { display: flex; gap: 16px; align-items: flex-start; }
.lp-footer-eu img { border-radius: 5px; flex-shrink: 0; }
.lp-footer-eu p { font-size: .92rem; line-height: 1.55; }
.lp-footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lp-footer ul a { text-decoration: none; font-size: .96rem; }
.lp-footer ul a:hover { text-decoration: underline; }
.lp-footer-bottom {
  padding-top: 22px; font-size: .86rem; color: #87a08f;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ========================================================= load animation */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: rise .7s cubic-bezier(.2,.7,.3,1) backwards; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; }
.reveal.d4 { animation-delay: .32s; }
.reveal.d5 { animation-delay: .40s; }

/* ============================================================== responsive */
@media (max-width: 920px) {
  .statement-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .benefit-grid { grid-template-columns: 1fr; }
  .lecturer-grid { grid-template-columns: 1fr; gap: 36px; }
  .lecturer-photo { max-width: 380px; }
  .lecturer-photo::before { inset: 14px -14px -14px 14px; }
  .lp-footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .lp-nav-link { display: none; }
  .slot { grid-template-columns: 72px 1fr; gap: 16px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================== form pages */
/* Registration form, success page, GDPR notice — all wrapped by the shared
   `layout()` (small header + dark-green footer). Form pages share a single
   readable column and a calm green palette. */

main.wrap { padding-block: 40px 80px; }

.form-intro h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.4rem); margin-bottom: .4em; }
.form-intro p  { color: var(--ink-2); max-width: 60ch; margin-bottom: 28px; }

.form-error {
  background: #fdecea;
  border: 1px solid #f5b8b1;
  color: #8a1f15;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.reg-form { max-width: 760px; }
.reg-form fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px 18px;
  margin-bottom: 22px;
  background: #fff;
}
.reg-form legend {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 10px;
  color: var(--green-deep);
}
.reg-form .field { display: flex; flex-direction: column; margin-bottom: 16px; }
.reg-form .field:last-child { margin-bottom: 0; }
.reg-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.reg-form label { font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.reg-form .hint { color: var(--ink-2); font-size: .85rem; margin-top: 6px; line-height: 1.45; }

.reg-form input[type="text"],
.reg-form input[type="email"],
.reg-form input[type="tel"],
.reg-form input[type="date"],
.reg-form select {
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.reg-form input:focus,
.reg-form select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(44, 143, 84, .18);
}

/* Birth date day/month/year selects */
.reg-form .date-parts { display: flex; gap: 8px; }
.reg-form .date-parts select { flex: 1 1 auto; min-width: 0; }
.reg-form .date-parts select:first-child { flex: 0 1 90px; }
.reg-form .date-parts select:last-child { flex: 0 1 110px; }

.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-list .radio,
.checkbox {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
.radio-list .radio:hover,
.checkbox:hover { background: var(--paper-2); border-color: var(--line-2); }
.radio-list .radio input,
.checkbox input { margin-top: 3px; flex-shrink: 0; }
.radio-list .radio span,
.checkbox span { font-size: .94rem; line-height: 1.45; }
.radio-list .radio strong,
.checkbox strong { color: var(--green-deep); font-weight: 700; margin-right: 4px; }

.cf-turnstile { margin: 8px 0 18px; }

.submit-row { display: flex; justify-content: flex-end; }
.btn-submit {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  padding: 15px 32px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background-color .15s, transform .15s, box-shadow .15s;
}
.btn-submit:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* --- success page ------------------------------------------------------- */
.success { max-width: 640px; text-align: left; }
.success-badge {
  display: inline-flex;
  width: 56px; height: 56px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  font-size: 1.7rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.success h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.2rem); margin-bottom: .5em; }
.success-lead { font-size: 1.05rem; color: var(--ink-2); margin-bottom: 28px; }
.next-steps {
  background: var(--paper-2);
  border-left: 4px solid var(--green);
  padding: 18px 22px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 28px;
}
.next-steps h2 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 10px; }
.next-steps ol { padding-left: 20px; }
.next-steps li { margin-bottom: 6px; line-height: 1.5; }
.portal-box {
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 28px;
  background: #fff;
}
.portal-link {
  font-family: ui-monospace, SF Mono, Menlo, Consolas, monospace;
  font-size: .9rem;
  word-break: break-all;
  color: var(--green-deep);
}
.success .contact { color: var(--ink-2); }

/* --- GDPR notice -------------------------------------------------------- */
.gdpr { max-width: 760px; }
.gdpr h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.2rem); margin-bottom: .2em; }
.gdpr .updated { color: var(--ink-2); font-size: .9rem; margin-bottom: 28px; }
.gdpr h2 { font-family: var(--font-display); font-size: 1.2rem; color: var(--green-deep); margin: 28px 0 10px; }
.gdpr p, .gdpr li { line-height: 1.6; }
.gdpr ul { padding-left: 22px; margin-bottom: 12px; }
.gdpr li { margin-bottom: 6px; }
.gdpr .back { margin-top: 32px; }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 560px) {
  .reg-form .row { grid-template-columns: 1fr; }
  .reg-form fieldset { padding: 18px 18px 14px; }
  .submit-row { justify-content: stretch; }
  .btn-submit { width: 100%; }
}

/* ============================================================== portal */
.portal { max-width: 720px; }
.portal-head { margin-bottom: 28px; }
.portal-head h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.2rem); margin-bottom: 4px; }
.portal-sub { color: var(--ink-2); font-size: 1.05rem; }

.portal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 22px;
}
.portal-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--green-deep);
  margin-bottom: 14px;
}

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; }
dl.kv dt { font-weight: 600; color: var(--ink-2); }
dl.kv dd { margin: 0; }

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--paper-2);
  color: var(--ink);
}
.badge-registered           { background: #fff5d6; color: #6b5108; }
.badge-documents_submitted  { background: #cfe9d9; color: #1a5f37; }
.badge-confirmed            { background: var(--green); color: #fff; }
.badge-cancelled            { background: #fdecea; color: #8a1f15; }

.next-list { padding-left: 22px; }
.next-list li { margin-bottom: 12px; line-height: 1.55; }
.next-list .hint { display: block; color: var(--ink-2); font-size: .9rem; margin-top: 4px; }

.send-link { max-width: 520px; }
.send-link h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem); margin-bottom: .4em; }
.send-link p { color: var(--ink-2); margin-bottom: 22px; }

@media (max-width: 560px) {
  dl.kv { grid-template-columns: 1fr; gap: 0 0; }
  dl.kv dt { margin-top: 12px; }
}

/* ============================================================== slice 3 */
.welcome-banner {
  background: linear-gradient(to right, #e6f4ec, #f4faf6);
  border: 1px solid #cfe9d9;
  border-left: 4px solid var(--green);
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 22px;
}
.welcome-banner h2 { font-family: var(--font-display); color: var(--green-deep); font-size: 1.1rem; margin-bottom: 4px; }
.welcome-banner p { font-size: .95rem; color: var(--ink-2); }

.flash-ok {
  background: #e6f4ec;
  border: 1px solid #b9dec8;
  color: #1a5f37;
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-weight: 500;
}

.portal-card--action { border: 1px solid #f1c75a; background: #fffbe9; }
.portal-card--action h2 { color: #8a6300; }

.upload-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.upload-form input[type="file"] {
  font: inherit;
  padding: 9px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  background: #fff;
  width: 100%;
}
.upload-form .btn-submit { font-size: 1rem; padding: 11px 22px; }

/* slightly tighter secondary button used as a download link */
.portal-card a.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 12px;
}
.portal-card a.btn-secondary:hover { border-color: var(--green); color: var(--green-deep); }

/* ============================================================== admin */
.admin-login { max-width: 520px; }
.admin-login h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem); margin-bottom: .4em; }
.admin-login p { color: var(--ink-2); margin-bottom: 22px; }

.admin-shell { max-width: 1100px; }

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.admin-nav-brand { color: var(--green-deep); font-family: var(--font-display); font-size: 1rem; }
.admin-nav-links { display: flex; gap: 18px; align-items: center; font-size: .95rem; }
.admin-nav-links a { color: var(--ink); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.admin-nav-links a:hover { background: var(--paper-2); }
.admin-nav-links a.is-active { background: var(--green); color: #fff; }
.admin-nav-email { color: var(--ink-2); font-size: .85rem; padding-right: 8px; border-right: 1px solid var(--line); }

.admin-shell h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem); margin-bottom: .25em; }
.admin-sub { color: var(--ink-2); margin-bottom: 22px; font-size: .95rem; }

.admin-export-row { color: var(--ink-2); font-size: .95rem; margin-bottom: 18px; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table thead th { background: var(--paper-2); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #f8fbf9; }
.admin-empty { color: var(--ink-2); font-style: italic; text-align: center; padding: 26px; }

.admin-export-links { display: flex; gap: 10px; font-size: .85rem; }
.admin-files { padding-left: 22px; }
.admin-files li { margin-bottom: 8px; line-height: 1.5; }

/* --- Broadcast tool (slice 5) ------------------------------------------- */

.form-success {
  background: #e7f4ec;
  border: 1px solid #b6dec5;
  color: #1f5b34;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.broadcast-form { max-width: 860px; }

.broadcast-recipients { padding-top: 6px; }
.broadcast-recipients h3 {
  font-family: var(--font-display);
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-2);
  margin: 14px 0 8px;
}
.broadcast-actions { display: flex; gap: 10px; margin-bottom: 14px; }

.broadcast-list { list-style: none; margin: 0 0 14px; padding: 0; }
.broadcast-list li { margin-bottom: 6px; }
.broadcast-list label {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.broadcast-list label:hover { background: #f4f8f5; }
.broadcast-list input[type="checkbox"] { flex-shrink: 0; }
.broadcast-inst { font-weight: 600; }
.broadcast-email { color: var(--ink-2); font-size: .9rem; }

.broadcast-preview {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff;
}
.broadcast-preview summary { cursor: pointer; font-weight: 600; color: var(--green); }
.broadcast-iframe { width: 100%; height: 600px; border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; background: #fff; }

.btn-secondary {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .88rem;
  cursor: pointer;
}
.btn-secondary:hover { background: #f4f8f5; }

.broadcast-log-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; }

.composer-form textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .92rem;
  line-height: 1.55;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
}

.email-body-preview {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9rem;
  background: var(--paper-2);
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* Delivery status badges (slice 6a) */
.badge-delivery-accepted   { background: #fef3c7; color: #7c5b00; }
.badge-delivery-sending    { background: #e0f2fe; color: #075985; }
.badge-delivery-delivered  { background: var(--green); color: #fff; }
.badge-delivery-failed     { background: #fdecea; color: #8a1f15; }
.badge-delivery-canceled   { background: #f3f4f6; color: #4b5563; }
.badge-delivery-unknown    { background: #f3f4f6; color: #6b7280; }
