/* ============================================================
   /website-buttons (internal/pages/websitebuttons): a centred hero with
   the three colourways, the builder (choices on the left; the preview in a
   row of stand-in buttons, the HTML and the downloads on the right) and the
   rules for using the g. website-buttons.js drives the builder; --wb-w,
   --wb-h and --wb-r size the stand-ins like the chosen button.
   ============================================================ */

.wb-hero{padding:140px 0 8px;text-align:center}
.wb-hero-copy h1{font-size:clamp(40px,5.2vw,66px);line-height:1.02;margin:12px auto 18px;max-width:820px;color:var(--w-ink)}
.wb-sub{font-size:18px;line-height:1.55;color:var(--w-mut);margin:0 auto;max-width:620px}
.wb-hero-row{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin-top:34px}
.wb-hero-btn{display:inline-block;line-height:0;border-radius:4px;box-shadow:0 10px 24px rgba(20,32,24,.14)}

/* ---- The builder ---- */
.wb-make{padding:48px 0 10px;scroll-margin-top:90px}
.wb-card{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:36px;padding:32px;border-radius:24px;background:var(--w-panel);border:1px solid var(--w-line);box-shadow:rgba(31,35,33,.05) 0 6px 22px}
.wb-card [hidden]{display:none!important}
.wb-controls h2{margin:0 0 22px;font-size:26px;color:var(--w-ink)}
.wb-field{margin:0 0 22px;padding:0;border:0;min-width:0}
.wb-field legend{margin:0 0 10px;padding:0;font-size:14px;font-weight:700;color:var(--w-ink)}

.wb-chips{display:flex;flex-wrap:wrap;gap:8px}
.wb-chip{position:relative;cursor:pointer}
.wb-chip input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.wb-chip > span{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:980px;border:1px solid var(--w-line2);background:var(--site-card);font-size:14px;font-weight:600;line-height:1.2;color:var(--w-ink2);transition:border-color var(--dur-base) var(--ease-standard),background var(--dur-base) var(--ease-standard),box-shadow var(--dur-base) var(--ease-standard)}
.wb-chip:hover > span{border-color:var(--green-300)}
.wb-chip input:checked + span{border-color:var(--green-500);background:rgba(51,117,77,.09);box-shadow:inset 0 0 0 1px var(--green-500);color:var(--green-800)}
.wb-chip input:focus-visible + span{box-shadow:0 0 0 3px var(--w-focus)}
.wb-dim{font-size:12px;font-weight:600;color:var(--w-mut);font-variant-numeric:tabular-nums}

.wb-swatch{display:inline-block;width:14px;height:14px;border-radius:50%}
.wb-swatch--green{background:#00c956}
.wb-swatch--black{background:#000}
.wb-swatch--white{background:#fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.25)}
.wb-outline{display:inline-block;border:2px solid currentColor;opacity:.7}
.wb-outline--rect{width:20px;height:12px;border-radius:2px}
.wb-outline--pill{width:20px;height:12px;border-radius:6px}
.wb-outline--square{width:13px;height:13px;border-radius:3px}
.wb-outline--circle{width:13px;height:13px;border-radius:50%}

.wb-target{margin-top:14px}
.wb-label{display:block;margin:0 0 6px;font-size:13.5px;font-weight:600;color:var(--w-ink2)}
.wb-input{display:flex;align-items:center;gap:2px;height:46px;padding:0 14px;border-radius:12px;border:1px solid var(--w-input-line);background:var(--site-card);transition:border-color var(--dur-base) var(--ease-standard),box-shadow var(--dur-base) var(--ease-standard)}
.wb-input:focus-within{border-color:var(--green-500);box-shadow:0 0 0 3px var(--w-glow)}
.wb-input span{flex:none;font-size:15px;color:var(--w-mut)}
.wb-input input{flex:1;min-width:0;height:100%;padding:0;border:0;background:transparent;font:inherit;font-size:15px;color:var(--w-ink);outline:none}
.wb-input input::placeholder{color:var(--w-ph2)}
.wb-hint{margin:8px 0 0;font-size:13.5px;line-height:1.5;color:var(--w-mut)}
.wb-hint b{color:var(--w-ink2)}
.wb-note{margin:10px 0 0;font-size:13.5px;font-weight:600;line-height:1.45;color:var(--green-700)}
.wb-note:empty{display:none}
.wb-note.is-bad{color:#a32218}

/* ---- Preview, HTML, downloads ---- */
.wb-output{min-width:0}
.wb-out-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.wb-out-head + .wb-code{margin-top:0}
.wb-preview + .wb-out-head{margin-top:26px}
.wb-out-head h3{margin:0;font-size:15px;font-weight:700;color:var(--w-ink)}
.wb-out-head h3 label{cursor:default}
.wb-bg{display:inline-flex;padding:3px;border-radius:980px;background:var(--w-inset)}
.wb-bg button{padding:6px 13px;border:0;border-radius:980px;background:transparent;font:inherit;font-size:13px;font-weight:600;color:var(--w-mut);cursor:pointer}
.wb-bg button[aria-pressed="true"]{background:var(--site-card);color:var(--w-ink);box-shadow:0 1px 3px rgba(31,35,33,.12)}
.wb-bg button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--w-focus)}

.wb-preview{display:flex;flex-wrap:wrap;align-items:center;gap:14px 20px;min-height:132px;padding:28px 26px;border-radius:16px;background:#f3f3f3;transition:background var(--dur-slow) var(--ease-standard)}
.wb-preview[data-bg="dark"]{background:#17191d}
.wb-preview-title{font-family:var(--font-sans);font-size:21px;font-weight:700;line-height:1.2;color:#1b1b1b}
.wb-preview[data-bg="dark"] .wb-preview-title{color:#fff}
.wb-preview-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.wb-ph{display:inline-block;width:var(--wb-w);height:var(--wb-h);border-radius:var(--wb-r);background:rgba(0,0,0,.11)}
.wb-preview[data-bg="dark"] .wb-ph{background:rgba(255,255,255,.14)}
.wb-live{display:inline-flex;line-height:0}

.wb-code{display:block;width:100%;min-height:150px;margin:0;padding:14px 16px;border:0;border-radius:14px;background:var(--w-appinset);color:var(--text-hi);font-family:var(--font-mono);font-size:12.5px;line-height:1.55;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;resize:vertical}
.wb-code:focus-visible{outline:none;box-shadow:0 0 0 3px var(--w-focus)}
.wb-copy i{font-size:12px}
.wb-copy.is-copied{background:var(--green-700)}
.wb-paste{margin:10px 0 0;font-size:13.5px;line-height:1.5;color:var(--w-mut)}
.wb-downloads{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.wb-downloads .btn-f i{font-size:12px}

/* ---- Using the g ---- */
.wb-rules{padding:64px 0 96px}
.wb-rules h2{margin:0 0 22px;font-size:30px;color:var(--w-ink)}
.wb-rules-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.wb-rule{padding:26px 26px 24px;border-radius:20px;background:var(--w-panel);border:1px solid var(--w-line)}
.wb-rule-icon{display:grid;place-items:center;width:36px;height:36px;margin-bottom:14px;border-radius:10px;background:rgba(51,117,77,.1);color:var(--green-600);font-size:15px}
.wb-rule h3{margin:0 0 8px;font-size:17px;font-weight:700;color:var(--w-ink)}
.wb-rule p{margin:0;font-size:14.5px;line-height:1.55;color:var(--w-mut)}
.wb-kit{margin:24px 0 0;font-size:15px;line-height:1.55;color:var(--w-mut)}
.wb-kit a{color:var(--green-700);font-weight:600;text-decoration:underline;text-underline-offset:3px}

@media (max-width:980px){
  .wb-hero{padding-top:120px}
  .wb-card{grid-template-columns:minmax(0,1fr);gap:30px;padding:26px}
  .wb-rules-grid{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:560px){
  .wb-card{padding:20px 16px;border-radius:20px}
  .wb-preview{padding:22px 18px}
  .wb-preview-title{font-size:18px}
  .wb-hero-row{gap:10px}
  .wb-hero-btn svg{width:69px;height:39px}
  .wb-ph:nth-child(3){display:none}
}
