:root{
    --navy:#121c2d;
    --text:#2f3e55;
    --muted:#66758c;
    --line:#cbd5e1;
    --soft:#f2f5f8;
    --green:#138a3d;
    --green-bg:#f0fff5;
  }
  *{box-sizing:border-box}
  html{background:#eef1f5}
  body{
    margin:0;
    padding:28px 14px;
    background:#eef1f5;
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;
    font-size:11px;
    line-height:1.42;
  }
  .document{max-width:850px;margin:0 auto}
  .page{
    width:100%;
    min-height:1120px;
    background:#fff;
    padding:42px 58px 54px;
    margin:0 auto 22px;
    box-shadow:0 2px 18px rgba(18,28,45,.10);
    position:relative;
    overflow:hidden;
  }

  /* Header / footer */
  .header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    border-bottom:3px solid var(--navy);
    padding-bottom:13px;
    margin-bottom:22px;
  }
  .brand{min-width:0}
  .brand h1{
    margin:0;
    color:var(--navy);
    font-size:25px;
    line-height:1.05;
    letter-spacing:-.35px;
    font-weight:800;
  }
  .brand .address{
    margin-top:8px;
    font-size:11px;
    color:#53647d;
  }
  .badge{
    flex:0 0 auto;
    margin-left:18px;
    background:var(--navy);
    color:#fff;
    border-radius:5px;
    padding:9px 17px;
    font-size:14px;
    line-height:1;
    font-weight:800;
    letter-spacing:.1px;
  }
  .footer{
    position:absolute;
    left:58px;right:58px;bottom:28px;
    border-top:1px solid #dbe2ea;
    padding-top:9px;
    display:flex;justify-content:space-between;
    color:#64748b;font-size:10px;
  }

  h2{
    color:var(--navy);
    font-size:20px;
    margin:0 0 16px;
    line-height:1.2;
  }
  h3{
    color:var(--navy);
    font-size:13px;
    margin:0 0 10px;
  }
  p{margin:0 0 12px}
  .intro{font-size:12px;line-height:1.55}

  /* Page 1 */
  .programs,.instructions{
    border:1px solid #cbd5e1;
    border-radius:6px;
    background:#f7fafc;
    padding:18px;
    margin-top:20px;
  }
  .programs-title{
    color:var(--navy);
    font-size:14px;
    font-weight:800;
    padding-bottom:11px;
    border-bottom:1px solid #cbd5e1;
    margin-bottom:13px;
  }
  .program-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
  .program{
    background:#fff;
    border:1px solid #dbe3ec;
    border-radius:4px;
    min-height:43px;
    display:flex;align-items:center;
    padding:8px 15px;
    font-size:12px;font-weight:700;color:#29364b;
  }
  .program .tick{
    width:20px;height:20px;display:grid;place-items:center;
    background:var(--navy);color:#fff;border-radius:3px;
    font-size:13px;margin-right:10px;flex:0 0 20px
  }
  .instructions{margin-top:32px}
  .instructions h3{font-size:14px;margin-bottom:8px}
  .instructions ol{margin:0;padding-left:22px}
  .instructions li{padding-left:2px;margin:4px 0;font-size:12px}

  /* Page 2 */
  .section{margin-bottom:16px}
  .section-title{
    background:#f0f3f7;
    border-left:4px solid var(--navy);
    color:var(--navy);
    font-size:13px;
    font-weight:800;
    padding:7px 10px;
    margin-bottom:0;
    letter-spacing:.05px;
  }
  table.form-table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
  }
  .form-table td{
    border:1px solid #cbd5df;
    padding:7px 8px 6px;
    vertical-align:top;
    height:48px;
  }
  .form-table .label{
    display:block;
    color:#53647a;
    font-size:8.3px;
    line-height:1.15;
    font-weight:800;
    text-transform:uppercase;
    margin-bottom:5px;
    letter-spacing:.05px;
  }
  input[type=text],input[type=email],input[type=tel],input[type=date],input[type=number]{
    width:100%;
    border:0;
    border-bottom:1px solid #d8e0e8;
    background:#fff;
    color:#172033;
    font:600 11px Arial,Helvetica,sans-serif;
    padding:2px 1px 3px;
    outline:none;
  }
  input:focus, textarea:focus{
    border-bottom:2px solid #45698f;
    background:#fbfdff;
  }
  .checks{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:7px 12px;
    margin-top:2px;
  }
  .check{
    display:inline-flex;align-items:center;gap:4px;
    font-size:10px;font-weight:600;color:#26364c;
    white-space:nowrap;
  }
  .check input{
    width:13px;height:13px;margin:0;
    accent-color:var(--navy);
  }
  .small-note{font-size:8px;color:#718096}
  .three-col td{height:61px}
  .four-col td{height:55px}
  .owner td{height:54px}

  /* Agreement pages */
  .agreement-title{
    text-align:center;color:var(--navy);
    font-size:17px;font-weight:800;
    margin:0 0 18px;
  }
  .agreement{
    font-size:11px;
    line-height:1.48;
    text-align:left;
  }
  .agreement p{margin:0 0 14px}
  .agreement .lead{
    text-align:justify;
  }
  .agreement strong{color:#253247}
  .payment{
    border:1.5px solid #16a34a;
    background:var(--green-bg);
    border-radius:6px;
    padding:13px 18px 10px;
    margin-top:17px;
  }
  .payment-title{
    color:var(--green);
    font-size:14px;
    font-weight:800;
    margin-bottom:8px;
  }
  .payment-grid{
    display:grid;grid-template-columns:1fr 1fr;gap:0 18px;
  }
  .pay-row{
    display:grid;grid-template-columns:auto 1fr;
    gap:8px;border-bottom:1px dashed #b7e5c7;
    padding:4px 0;
  }
  .pay-row b{color:#08752f}
  .pay-row span{font-family:"Courier New",monospace;font-weight:700;color:#26364c;text-align:right}
  .signature-area{
    margin-top:26px;border-top:2px solid #dfe6ee;padding-top:18px;
  }
  .signature-heading{
    font-size:13px;font-weight:800;color:var(--navy);margin-bottom:18px;
  }
  .sig-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px 28px}
  .sig-block .role{font-size:11px;font-weight:800;color:var(--navy);margin-bottom:8px}
  .sig-pad{
    border-bottom:1.5px solid #536176;
    height:55px;position:relative;background:#fff;
  }
  .sig-pad canvas{width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}
  .sig-label{
    margin-top:5px;font-size:9.5px;font-weight:800;color:#53647a;text-transform:uppercase
  }
  .sig-input{
    margin-top:13px
  }
  .sig-input input{height:25px}
  .muted-rule{height:1px;background:#dbe3ec;margin:10px 0}

  .actions{
    max-width:850px;margin:0 auto 20px;
    display:flex;justify-content:center;gap:10px;
  }
  .actions button{
    border:0;border-radius:6px;padding:12px 20px;
    font:700 13px Arial;cursor:pointer;
  }
  .btn-clear{background:#fff;border:1px solid #cbd5e1!important;color:#243249}
  .btn-submit{background:var(--navy);color:#fff}
  #status{max-width:850px;margin:-8px auto 18px;text-align:center;font-weight:700}

  @media(max-width:760px){
    body{padding:10px 0;font-size:10px}
    .page{padding:28px 20px 52px;margin-bottom:12px;min-height:auto;box-shadow:none}
    .footer{left:20px;right:20px;bottom:20px}
    .brand h1{font-size:20px}.badge{font-size:11px;padding:8px 11px}
    .program-grid,.payment-grid,.sig-grid{grid-template-columns:1fr}
    .form-table td{padding:6px;height:auto}
    .programs,.instructions{padding:13px}
  }

  @media print{
    html,body{background:#fff}
    body{padding:0}
    .page{width:210mm;height:297mm;min-height:297mm;margin:0;box-shadow:none;page-break-after:always}
    .page:last-of-type{page-break-after:auto}
    .actions,#status{display:none}
  }