:root{
  --cozy-radius-sm:12px;
  --cozy-radius:18px;
  --cozy-radius-lg:28px;
  --cozy-shadow:0 14px 38px rgba(75,35,52,.10);
  --cozy-shadow-hover:0 18px 44px rgba(95,18,54,.16);
}

.public-page,.student-page{background:linear-gradient(145deg,#fbf5f1 0%,var(--paper) 48%,#f8edf1 100%)}
.public-header{background:rgba(255,250,247,.7);backdrop-filter:blur(12px)}
.public-page .edition{padding:8px 12px;border-radius:999px;background:rgba(95,18,54,.82);color:#fff;text-shadow:none;backdrop-filter:blur(8px)}
.hero-copy h1,.student-main h1,.enrollment-heading h1,.completion-panel h1{line-height:1.06}
.hero-kicker{display:inline-flex;align-items:center;gap:8px;padding:7px 11px;border-radius:999px;background:#f6dfe8;letter-spacing:.11em}
.hero-kicker::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--rose);box-shadow:0 0 0 4px rgba(213,49,112,.12)}
.access-button,.submit-button{border-radius:999px;box-shadow:0 9px 22px rgba(143,23,78,.20);transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
.access-button:hover,.submit-button:hover{transform:translateY(-2px);box-shadow:0 13px 28px rgba(143,23,78,.26)}
.quiet-button{border-radius:999px;background:rgba(255,255,255,.72);transition:background .18s ease,border-color .18s ease,transform .18s ease}
.quiet-button:hover{background:#fff;border-color:#c99aae;transform:translateY(-1px)}
.process-note{border:1px solid rgba(143,23,78,.12);border-top:0;border-radius:var(--cozy-radius-lg);box-shadow:var(--cozy-shadow)}
.enrollment-letter-link{display:inline-flex;margin-top:7px;color:var(--wine);font-size:14px;font-weight:700;text-decoration:underline;text-underline-offset:3px}.enrollment-letter-link:hover{color:var(--wine-dark)}.enrollment-letter-link:focus-visible{outline:3px solid rgba(213,49,112,.27);outline-offset:3px;border-radius:2px}
.note-number{width:72px;min-height:48px;flex:0 0 72px;display:flex;align-items:center;justify-content:center;padding:0 6px;border-radius:15px;background:#f6dfe8;white-space:nowrap;text-align:center;line-height:1;overflow:visible}
.hero-copy .public-alert{width:100%;max-width:575px;min-height:44px;height:auto;margin:0 auto 18px;overflow:visible;white-space:normal;overflow-wrap:anywhere;line-height:1.45;text-align:center}

.login-dialog,.confirm-dialog,.enrollment-dialog{border-radius:var(--cozy-radius-lg);box-shadow:0 30px 90px rgba(37,16,26,.36)}
.login-dialog,.confirm-dialog{overflow-y:auto;overscroll-behavior:contain}
.enrollment-dialog{overflow:hidden}
.enrollment-form{display:flex;flex-direction:column;max-height:calc(100vh - 24px);min-height:0}
.enrollment-form>header,.enrollment-form>footer{flex:0 0 auto}
.enrollment-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.dialog-shell{border-radius:inherit;background:linear-gradient(160deg,#fffdfb 0%,var(--cream) 100%)}
.dialog-mark{border-radius:14px;box-shadow:0 7px 16px rgba(143,23,78,.22);transform:rotate(-3deg)}
.dialog-close{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;transition:background .18s ease,transform .18s ease}
.dialog-close:hover{background:#f4e1e8;transform:rotate(5deg)}
.public-form input,.enrollment-body select,.enrollment-body input:not([type=checkbox]):not([type=radio]){border-radius:var(--cozy-radius-sm);background:#fffdfc;border-color:#dfd1d6;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
.public-form input:hover,.enrollment-body select:hover,.enrollment-body input:not([type=checkbox]):not([type=radio]):hover{border-color:#caa1b2;background:#fff}
.public-form input:focus,.enrollment-body select:focus,.enrollment-body input:not([type=checkbox]):not([type=radio]):focus{outline:0;border-color:var(--rose);box-shadow:0 0 0 4px rgba(213,49,112,.12)}
.public-alert{border:1px solid #f0c3d2;border-left:0;border-radius:var(--cozy-radius-sm);box-shadow:0 8px 20px rgba(118,22,56,.06)}

.student-header{margin:14px clamp(14px,3vw,34px) 0;height:80px;border:1px solid rgba(143,23,78,.10);border-radius:22px;box-shadow:0 8px 28px rgba(75,35,52,.07)}
.student-main{padding-top:56px}
.student-list{gap:14px}
.student-row,.empty-students{border-radius:var(--cozy-radius);box-shadow:0 8px 24px rgba(75,35,52,.06);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.student-row:hover{transform:translateY(-3px);box-shadow:var(--cozy-shadow-hover)}
.student-avatar{border-radius:16px;background:linear-gradient(145deg,#f6dce7,#eed0dc);box-shadow:inset 0 0 0 1px rgba(143,23,78,.08)}

.enrollment-heading{margin-bottom:26px}
.enrollment-form>header,.enrollment-form>footer{background:rgba(255,250,245,.94)}
.enrollment-body{background:linear-gradient(180deg,#fffdfb,#fff9f6)}
.wizard-progress{height:7px;border-radius:999px;background:#eadce2}
.wizard-progress span{border-radius:inherit;background:linear-gradient(90deg,var(--wine),var(--rose))}
.choice-grid{gap:16px}
.choice-card span{padding:20px;border-radius:var(--cozy-radius);box-shadow:0 7px 22px rgba(75,35,52,.06);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.choice-card:hover span{transform:translateY(-3px);border-color:#d1a6b8;box-shadow:var(--cozy-shadow-hover)}
.choice-card input:checked+span{border-color:var(--wine);box-shadow:0 10px 28px rgba(143,23,78,.14),inset 0 0 0 2px var(--wine);background:#fff8fb;transform:translateY(-2px)}
.discount-badge{border-radius:999px;padding:6px 10px}
.new-responsible,.voucher-benefit,.savings-panel,.activation-notice,.contract-parties,.contract-saving{border-left:0;border-radius:var(--cozy-radius);box-shadow:0 7px 22px rgba(75,35,52,.06)}
.new-responsible{background:#fff4f7;border:1px solid #efd5df;padding:24px}
.voucher-benefit,.savings-panel,.contract-saving{border:1px solid #cfe8d9}
.activation-notice,.contract-parties{border:1px solid #ead1db}
.completion-panel{border-radius:var(--cozy-radius-lg);border-color:rgba(143,23,78,.12);box-shadow:var(--cozy-shadow);padding:clamp(26px,5vw,44px)}
.voucher-box{border-radius:var(--cozy-radius);box-shadow:0 13px 30px rgba(143,23,78,.20)}
.voucher-box.voucher-used{border-left:0}
.contract-table-wrap{border-radius:var(--cozy-radius);box-shadow:0 7px 22px rgba(75,35,52,.06)}
.contract-table thead th:first-child{border-top-left-radius:var(--cozy-radius)}
.contract-table thead th:last-child{border-top-right-radius:var(--cozy-radius)}
.consent{padding:14px 16px;border-radius:var(--cozy-radius-sm);background:#fff;border:1px solid var(--line)}
.consent input{accent-color:var(--wine)}
.cep-feedback{display:block;min-height:18px;color:var(--muted);font-size:12px;font-weight:500;line-height:1.4}
.cep-feedback[data-state="loading"]{color:var(--wine)}
.cep-feedback[data-state="success"]{color:#14653f}
.cep-feedback[data-state="error"]{color:#9b2449}

@media(max-width:860px){
  .public-header{border-radius:0 0 22px 22px}
  .hero-copy{border-radius:28px 28px 0 0}
  .process-note{border:1px solid rgba(143,23,78,.12)}
}
@media(max-width:520px){
  .student-header{margin:8px 8px 0;padding-inline:14px;border-radius:18px}
  .login-dialog,.confirm-dialog,.enrollment-dialog{border-radius:22px}
  .choice-card span,.new-responsible{padding:17px}
  .hero-kicker{padding:6px 9px}
  .note-number{width:64px;flex-basis:64px;font-size:21px}
}
@media(prefers-reduced-motion:reduce){
  .access-button,.submit-button,.quiet-button,.dialog-close,.student-row,.choice-card span{transition:none}
  .access-button:hover,.submit-button:hover,.quiet-button:hover,.student-row:hover,.choice-card:hover span,.choice-card input:checked+span{transform:none}
}

@media(min-width:861px){
  .public-page::after{inset-inline-start:33%}
  .public-main{grid-template-columns:minmax(360px,33%) minmax(0,67%)}
  .hero-copy{padding-inline:clamp(28px,4.6vw,88px);padding-bottom:40px}
  .hero-copy h1{font-size:clamp(44px,4vw,66px)}
  .hero-lead{font-size:16px}
  .process-note{
    align-self:center;
    justify-self:center;
    width:min(480px,calc(100% - 64px));
    margin:70px 32px 0;
  }
}

@media(min-width:861px) and (max-width:1600px){
  .public-header{height:88px;padding-inline:clamp(32px,4vw,58px)}
  .school-logo{width:176px}
  .public-main{min-height:0}
  .hero-copy{max-width:none;padding:18px 40px 22px}
  .hero-kicker{margin-bottom:16px}
  .hero-copy h1{max-width:none;font-size:48px;line-height:1.02;letter-spacing:-.035em}
  .hero-lead{max-width:none;margin:20px 0;font-size:15px;line-height:1.55}
  .hero-copy .public-alert{max-width:none;min-height:42px;margin-bottom:14px;padding:10px 12px;font-size:12px}
  .access-button{min-height:50px;padding-inline:20px;gap:18px;font-size:13px}
  .access-note{margin-top:10px;font-size:11px}
  .process-note{width:min(440px,calc(100% - 48px));margin:20px 24px 0;padding:22px 24px;gap:18px}
  .process-note p{font-size:14px;line-height:1.48}
  .public-footer{height:44px;padding-inline:40px}
}

@media(min-width:861px) and (max-width:1600px) and (max-height:760px){
  .public-header{height:78px}
  .school-logo{width:158px}
  .hero-copy{padding-block:10px 14px}
  .hero-copy h1{font-size:44px}
  .hero-lead{margin-block:14px}
  .process-note{margin-top:8px;padding-block:18px}
  .process-note p{margin-top:5px}
  .public-footer{height:38px}
}
