:root{
    --navy:#0F2242;
    --navy-soft:#28406A;
    --gold:#B8863E;
    --gold-light:#D4AF6A;
    --cream:#FAF6EE;
    --paper:#FFFFFF;
    --line:#E4D9C3;
    --text:#1C2A42;
    --text-muted:#5B6B85;
    --radius:6px;
    --nav-height:52px;
  }
  html{ scroll-behavior:smooth; }
  *{box-sizing:border-box; margin:0; padding:0;}
  body{
    font-family:'Heebo', sans-serif;
    background:var(--cream);
    color:var(--text);
    line-height:1.6;
  }
  h1,h2,h3,.display{
    font-family:'Frank Ruhl Libre', serif;
  }

  /* ---------- Top navigation ---------- */
  .site-nav{
    position:sticky;
    top:0;
    z-index:100;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
    gap:22px;
    min-height:var(--nav-height);
    padding:8px 12px;
    background:var(--navy);
    border-bottom:1px solid rgba(212,175,106,.35);
    box-shadow:0 4px 16px rgba(0,0,0,.2);
  }
  .site-nav a{
    position:relative;
    color:#EDE4D0;
    text-decoration:none;
    font-family:'Frank Ruhl Libre', serif;
    font-size:.85rem;
    font-weight:700;
    letter-spacing:.18em;
    padding:8px 2px;
  }
  .site-nav a::after{
    content:"";
    position:absolute;
    left:0; right:100%;
    bottom:2px;
    height:2px;
    background:var(--gold);
    transition:right .2s ease;
  }
  .site-nav a:hover{ color:var(--gold-light); }
  .site-nav a:hover::after{ right:0; }
  .site-nav .nav-dot{
    color:var(--gold);
    opacity:.5;
    font-size:.7rem;
  }
  @media (max-width:420px){
    .site-nav{ gap:10px; }
    .site-nav a{ font-size:.62rem; letter-spacing:.06em; }
  }

  /* Offsets so anchor jumps land below the sticky nav, not under it */
  #tiers-section, #honor-roll, #available-list{
    scroll-margin-top:calc(var(--nav-height) + 16px);
  }
  a{color:inherit;}
  img{max-width:100%; display:block;}

  /* ---------- Arch frame motif (echoes logo) ---------- */
  .arch-rule{
    height:3px;
    background:linear-gradient(90deg, transparent, var(--gold) 15%, var(--gold) 85%, transparent);
    width:100%;
  }
  .arch-corner{
    position:absolute;
    width:64px; height:64px;
    border-top:4px solid var(--gold);
    opacity:.55;
  }
  .arch-corner.tl{top:14px; left:14px; border-left:4px solid var(--gold); border-top-left-radius:14px;}
  .arch-corner.tr{top:14px; right:14px; border-right:4px solid var(--gold); border-top:4px solid var(--gold); border-top-right-radius:14px;}

  /* ---------- Hero ---------- */
  header.hero{
    position:relative;
    background:var(--navy);
    color:#F3EEE1;
    padding:56px 24px 64px;
    text-align:center;
    overflow:hidden;
  }
  header.hero::before{
    content:"";
    position:absolute; inset:10px;
    border:1px solid rgba(212,175,106,.35);
    border-radius:18px;
    pointer-events:none;
  }
  .logo-wrap{
    max-width:220px;
    margin:0 auto 22px;
    background:#fff;
    border-radius:50%;
    padding:14px;
    box-shadow:0 8px 30px rgba(0,0,0,.35);
  }

  /* ---------- Hebrew dedication block ---------- */
  .dedication{
    direction:rtl;
    font-family:'David Libre', 'Frank Ruhl Libre', serif;
    max-width:640px;
    margin:0 auto 30px;
    padding-bottom:26px;
    border-bottom:1px solid rgba(212,175,106,.3);
  }
  .dedication .lead-line{
    font-size:clamp(.95rem, 2.3vw, 1.15rem);
    color:var(--gold-light);
    font-weight:500;
    margin-bottom:2px;
    letter-spacing:.01em;
  }
  .dedication .title-line{
    font-size:clamp(2.1rem, 6vw, 3.4rem);
    font-weight:700;
    color:#fff;
    line-height:1.1;
    margin:2px 0 4px;
    text-shadow:0 2px 18px rgba(212,175,106,.25);
  }
  .dedication .sub-line{
    font-size:clamp(1rem, 2.6vw, 1.25rem);
    color:#E7DEC9;
    font-weight:500;
    margin-bottom:14px;
  }
  .dedication .honor-line{
    font-size:clamp(.9rem, 2.2vw, 1.05rem);
    color:#CBD3E3;
    font-weight:400;
    margin-bottom:2px;
  }
  .dedication .name-line{
    font-size:clamp(1.15rem, 3vw, 1.55rem);
    color:var(--gold-light);
    font-weight:700;
    margin-bottom:14px;
  }
  .dedication .verse-line{
    font-size:clamp(.85rem, 2vw, 1rem);
    color:#AEB9CE;
    font-style:italic;
    font-weight:300;
    letter-spacing:.01em;
  }

  header.hero h1{
    font-size:clamp(1.6rem, 4vw, 2.5rem);
    font-weight:700;
    letter-spacing:.02em;
    margin-bottom:10px;
    color:#fff;
  }
  header.hero p.tagline{
    max-width:560px;
    margin:0 auto;
    color:#CBD3E3;
    font-size:1.02rem;
    font-weight:300;
  }
  header.hero .hebrew{
    font-family:'Frank Ruhl Libre', serif;
    direction:rtl;
    font-size:1.15rem;
    color:var(--gold-light);
    margin-top:16px;
  }

  /* ---------- Layout ---------- */
  main{
    width:100%;
  }
  .container{
    max-width:880px;
    margin:0 auto;
    padding:0 24px;
  }
  section.band-a, section.band-b{
    padding:56px 0;
  }
  section.band-a{ background:var(--paper); }
  section.band-b{ background:#F5EEDD; }
  .eyebrow{
    text-transform:uppercase;
    letter-spacing:.14em;
    font-size:.72rem;
    color:var(--gold);
    font-weight:600;
    margin-bottom:8px;
  }
  section h2{
    font-size:1.65rem;
    color:var(--navy);
    margin-bottom:6px;
  }
  section > p.lead{
    color:var(--text-muted);
    max-width:640px;
    margin-bottom:26px;
  }

  /* ---------- Pledge tiers (tablet cards) ---------- */
  .tiers{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:14px;
  }
  @media (max-width:640px){
    .tiers{ grid-template-columns:repeat(2, 1fr); }
  }
  @media (max-width:400px){
    .tiers{ grid-template-columns:1fr; }
  }
  .tier{
    position:relative;
    background:var(--paper);
    border:1px solid var(--line);
    border-top:4px solid var(--gold);
    border-radius:var(--radius);
    padding:22px 14px 18px;
    text-align:center;
    cursor:pointer;
    transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  }
  .tier:hover{ transform:translateY(-3px); box-shadow:0 10px 24px rgba(15,34,66,.12); }
  .tier.selected{
    border-color:var(--gold);
    background:linear-gradient(180deg, #FFFCF5, #FFF);
    box-shadow:0 10px 24px rgba(184,134,62,.25);
  }
  .tier .amount{
    font-family:'Frank Ruhl Libre', serif;
    font-size:1.5rem;
    font-weight:700;
    color:var(--navy);
  }
  .tier .label{
    margin-top:4px;
    font-size:.78rem;
    color:var(--text-muted);
    letter-spacing:.03em;
  }
  .tier input{ position:absolute; opacity:0; pointer-events:none; }
  .tier .check{
    position:absolute; top:8px; right:10px;
    width:16px; height:16px;
    border-radius:50%;
    border:2px solid var(--line);
    background:#fff;
  }
  .tier.selected .check{
    border-color:var(--gold);
    background:var(--gold);
    box-shadow:inset 0 0 0 3px #fff;
  }

  /* ---------- Payment plan pills ---------- */
  .plans{ display:flex; gap:8px; flex-wrap:wrap; }

  /* On mobile, payment plans: One-Time gets its own full row, the 3
     duration options share the row below it. Currency pills (#currencies)
     are unaffected since this targets #plans specifically. */
  @media (max-width:640px){
    #plans{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
    #plans .plan:first-child{ grid-column:1 / -1; }
  }
  .plan{
    flex:1;
    min-width:110px;
    background:var(--paper);
    border:1px solid var(--line);
    border-radius:999px;
    padding:12px 18px;
    text-align:center;
    cursor:pointer;
    font-weight:500;
    transition:all .15s ease;
    position:relative;
  }
  .plan input{ position:absolute; opacity:0; pointer-events:none; }
  .plan.selected{
    background:var(--navy);
    color:#fff;
    border-color:var(--navy);
  }
  .monthly-note{
    margin-top:16px;
    padding:14px 18px;
    background:#FFF9EC;
    border:1px dashed var(--gold);
    border-radius:var(--radius);
    font-size:.95rem;
    color:var(--navy);
  }
  .monthly-note strong{ color:var(--gold); }

  /* ---------- Dedication item selector ---------- */
  select.item-select{
    width:100%;
    padding:14px 16px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    font-family:'Heebo', sans-serif;
    font-size:1rem;
    background:#fff;
    color:var(--text);
    cursor:pointer;
  }
  select.item-select:disabled{
    background:#F2EEE3;
    color:var(--text-muted);
    cursor:not-allowed;
  }
  select.item-select:focus{
    outline:2px solid var(--gold);
    outline-offset:1px;
    border-color:var(--gold);
  }
  .item-note{
    margin-top:12px;
    font-size:.88rem;
    color:var(--text-muted);
  }
  .item-note.empty{ color:#8A2A1F; font-weight:500; }

  /* ---------- Privacy / anonymity card ---------- */
  .privacy-card{
    margin:6px 0 24px;
    padding:16px 18px;
    background:#FFF9EC;
    border:1px solid var(--gold);
    border-radius:var(--radius);
  }
  .privacy-toggle{
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    margin:0;
  }
  .privacy-toggle input{
    width:19px;
    height:19px;
    margin:0;
    accent-color:var(--gold);
    cursor:pointer;
    flex-shrink:0;
  }
  .privacy-title{
    font-weight:600;
    color:var(--navy);
    font-size:.95rem;
  }
  .privacy-desc{
    margin:6px 0 0 29px;
    color:var(--text-muted);
    font-size:.85rem;
    line-height:1.5;
  }

  /* ---------- Honor roll (public dedications list) ---------- */
  .honor-roll-list{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:22px;
    margin-top:28px;
  }
  .honor-roll-loading{
    text-align:center;
    color:var(--text-muted);
    grid-column:1/-1;
  }
  .total-raised{
    position:relative;
    max-width:340px;
    margin:0 auto 28px;
    padding:18px 22px;
    background:linear-gradient(180deg, var(--navy), var(--navy-soft));
    border:1px solid var(--gold);
    border-radius:8px;
    text-align:center;
    color:#fff;
    box-shadow:0 10px 24px rgba(15,34,66,.16);
    overflow:hidden;
  }
  .total-raised::before{
    content:"";
    position:absolute;
    inset:4px;
    border:1px solid rgba(212,175,106,.4);
    border-radius:5px;
    pointer-events:none;
  }
  .total-raised .trl-label{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    text-transform:uppercase;
    letter-spacing:.14em;
    font-size:.65rem;
    color:var(--gold-light);
    margin-bottom:6px;
  }
  .total-raised .trl-label::before,
  .total-raised .trl-label::after{
    content:"";
    height:1px;
    width:18px;
    background:linear-gradient(90deg, transparent, var(--gold));
  }
  .total-raised .trl-label::after{ background:linear-gradient(90deg, var(--gold), transparent); }
  .total-raised .trl-amount{
    font-family:'Frank Ruhl Libre', serif;
    font-size:clamp(1.4rem, 4vw, 1.75rem);
    font-weight:700;
    color:#fff;
    text-shadow:0 2px 16px rgba(212,175,106,.25);
  }
  .total-raised .trl-sub{
    margin-top:5px;
    font-size:.74rem;
    color:#CBD3E3;
    letter-spacing:.02em;
  }
  .honor-roll-group h3{
    font-size:1rem;
    color:var(--gold);
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:10px;
    border-bottom:1px solid var(--line);
    padding-bottom:6px;
  }
  .honor-roll-group h3.sub-group-heading{
    margin-top:20px;
  }
  .honor-roll-group ul{
    list-style:none;
  }
  .honor-roll-group li{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:7px 0;
    border-bottom:1px dashed var(--line);
    font-size:.92rem;
  }
  .honor-roll-group li .item-label{
    color:var(--navy);
    font-weight:500;
  }
  .honor-roll-group li .item-name{
    color:var(--text-muted);
    text-align:right;
    direction:ltr;
  }

  /* ---------- Still-available list ---------- */
  .available-list{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:22px;
    margin-top:28px;
  }
  .available-group h3{
    font-size:1rem;
    color:var(--gold);
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:12px;
    border-bottom:1px solid var(--line);
    padding-bottom:6px;
  }
  .available-group h3.sub-group-heading{
    margin-top:18px;
  }
  .available-chips{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }
  .available-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:#fff;
    border:1px solid var(--line);
    border-left:3px solid var(--gold);
    border-radius:999px;
    padding:6px 14px;
    font-size:.85rem;
    color:var(--navy);
  }
  .available-chip::before{
    content:"";
    width:6px;
    height:6px;
    border-radius:50%;
    background:var(--gold);
    flex-shrink:0;
  }


  /* ---------- Form ---------- */
  form .field{ margin-bottom:18px; }
  label{
    display:block;
    font-size:.82rem;
    font-weight:600;
    color:var(--navy);
    margin-bottom:6px;
    letter-spacing:.01em;
  }
  .optional-tag{
    font-weight:400;
    font-size:.75rem;
    color:var(--text-muted);
    text-transform:none;
    letter-spacing:normal;
  }
  input[type=text], input[type=email], input[type=tel], textarea, select{
    width:100%;
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    font-family:'Heebo', sans-serif;
    font-size:.98rem;
    background:#fff;
    color:var(--text);
  }
  input:focus, textarea:focus, select:focus{
    outline:2px solid var(--gold);
    outline-offset:1px;
    border-color:var(--gold);
  }
  textarea{ min-height:96px; resize:vertical; }
  .grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
  }
  @media (max-width:560px){ .grid-2{ grid-template-columns:1fr; } }

  .summary{
    background:var(--navy);
    color:#F3EEE1;
    border-radius:var(--radius);
    padding:20px 22px;
    margin-bottom:22px;
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:12px;
  }
  .summary div span.k{ display:block; font-size:.72rem; text-transform:uppercase; letter-spacing:.1em; color:var(--gold-light); margin-bottom:4px;}
  .summary div span.v{ font-family:'Frank Ruhl Libre', serif; font-size:1.2rem; }

  button.submit{
    width:100%;
    padding:16px;
    background:var(--gold);
    color:var(--navy);
    border:none;
    border-radius:var(--radius);
    font-size:1.05rem;
    font-weight:700;
    font-family:'Frank Ruhl Libre', serif;
    letter-spacing:.02em;
    cursor:pointer;
    transition:background .15s ease;
  }
  button.submit:hover{ background:var(--gold-light); }
  button.submit:disabled{ opacity:.6; cursor:not-allowed; }

  #status{
    margin-top:16px;
    padding:14px 16px;
    border-radius:var(--radius);
    font-size:.95rem;
    display:none;
  }
  #status.ok{ display:block; background:#E7F5EA; color:#215A32; border:1px solid #B8DFC1; }
  #status.err{ display:block; background:#FBE9E7; color:#8A2A1F; border:1px solid #F0BBB2; }
  .payment-cta{
    display:inline-block;
    margin-top:12px;
    padding:11px 22px;
    background:var(--navy);
    color:#fff;
    text-decoration:none;
    font-weight:600;
    font-size:.9rem;
    border-radius:var(--radius);
    transition:background .15s ease;
  }
  .payment-cta:hover{ background:var(--navy-soft); }

  footer{
    text-align:center;
    padding:30px 20px 50px;
    color:var(--text-muted);
    font-size:.85rem;
  }
  .footer-credit{
    margin-top:8px;
    font-size:.78rem;
    color:var(--text-muted);
    opacity:.8;
  }
  .footer-credit a{
    color:var(--gold);
    text-decoration:none;
  }
  .footer-credit a:hover{
    text-decoration:underline;
  }
