/* The paid TV sign-up, built to the approved mockup: docs/Signup.dc.html.
 *
 * EVERY VALUE HERE IS THE MOCKUP'S OWN. The mockup carries its design in
 * inline styles (it is a design-canvas export), so this file is those values
 * lifted into classes — which is also why there are no inline styles in the
 * templates: §15 forbids them outside email and print, and the CSP has no
 * 'unsafe-inline'.
 *
 *     ground      #f6f4ef    page
 *     navy        #1d2f3b    header, order panel, primary button, text
 *     text        #4a585d    secondary copy
 *     gold        #d4a24c    the C in WiConnect, "YOUR ORDER", the chosen card
 *     teal        #0f6e7a    links
 *     line        #c9c3b6    input borders
 *     panel line  #c9d3d9    on navy
 *     card        #ffffff    radius 16, padding 40, shadow 0 8px 28px rgba(29,47,59,.08)
 *     input       radius 10, padding 14px 16px, 17px
 *     button      radius 10, padding 15px 28px, weight 700, 17px
 *     width       1180px, padding 40px 24px 80px, gap 32
 *
 * Archivo for headings and the brand (already vendored by wicw-design);
 * Source Sans 3 for everything else, vendored here as the variable woff2
 * because the mockup links Google Fonts and this portal's CSP has no
 * third-party font origin.
 */

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-var.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

.su {
  --navy: #1d2f3b;
  --navy-soft: #3b5160;
  --text: #4a585d;
  --text-dim: #5b6b75;
  --ground: #f6f4ef;
  --ground-2: #ece8df;
  --card: #ffffff;
  --line: #c9c3b6;
  --line-2: #d8d2c6;
  --on-navy: #f6f4ef;
  --on-navy-dim: #c9d3d9;
  --on-navy-faint: #9fb0ba;
  --gold: #d4a24c;
  --teal: #0f6e7a;
  --teal-dark: #0a4f58;
  --good-bg: #e7f3ef;
  --good: #1f7a55;
  --max: 1180px;
  --head: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  margin: 0;
  background: var(--ground);
  color: var(--navy);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
}

.su a { color: var(--teal); }
.su a:hover { color: var(--teal-dark); }
/* THE HEADER'S LINKS ARE ON NAVY and are not teal links. `.su a` is one
 * specificity point above `.su-brand`, so the wordmark came out teal on navy
 * — the mockup has it white with a gold C, and the comparison shot is what
 * showed it. */
.su .su-brand, .su .su-brand:hover { color: var(--on-navy); }
.su .su-help a, .su .su-help a:hover { color: var(--on-navy); }
.su :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.su h1, .su h2, .su h3 { font-family: var(--head); color: var(--navy);
                         margin: 0; line-height: 1.15; text-wrap: balance; }
.su h1 { font-weight: 800; font-size: 32px; }
.su h2 { font-weight: 800; font-size: 24px; }
.su h3 { font-weight: 700; font-size: 18px; }
.su p  { margin: 0; }

.su-wrap { max-width: var(--max); margin: 0 auto; padding-inline: 24px;
           box-sizing: border-box; }

/* ── the header ─────────────────────────────────────────────────────────── */

.su-head { background: var(--navy); color: var(--on-navy); }
.su-head .su-wrap { display: flex; flex-wrap: wrap; align-items: center;
                    justify-content: space-between; gap: 16px;
                    padding-block: 18px; }
.su-brand { color: var(--on-navy); text-decoration: none;
            font-family: var(--head); font-weight: 900; font-size: 26px;
            letter-spacing: -0.5px; }
.su-brand b { color: var(--gold); font-weight: 900; }
.su-brand span { font-weight: 600; font-size: 18px; color: var(--on-navy-dim); }
.su-help { font-size: 15px; color: var(--on-navy-dim); }
.su-help a { color: var(--on-navy); }

/* ── the two columns ───────────────────────────────────────────────────── */

.su-body { padding-block: 40px 80px; display: flex; flex-wrap: wrap;
           gap: 32px; align-items: flex-start; }
.su-main { flex: 999 1 560px; min-width: 0; display: flex;
           flex-direction: column; gap: 24px; }
.su-aside { flex: 1 1 300px; min-width: 0; display: flex;
            flex-direction: column; gap: 16px; }

/* ── the step bar ──────────────────────────────────────────────────────── */

/* A 4px RULE OVER EACH STEP, which is how the mockup draws it: the rule and
 * the label go navy as the step is reached and stay warm grey ahead of it.
 * Filled pills were my own invention and made four heavy blocks across the
 * top of a page whose weight belongs on the card. */
.su-steps { margin: 0; padding: 0; list-style: none; display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.su-steps li { padding: 10px 0 0; border-top: 4px solid var(--line-2);
               color: #8a9499; }
.su-steps .n { font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
               display: block; }
.su-steps .label { font-size: 16px; }
.su-steps .is-current, .su-steps .is-done { border-top-color: var(--navy);
                                            color: var(--navy); }

/* ── the card ──────────────────────────────────────────────────────────── */

.su-card { background: var(--card); border-radius: 16px; padding: 40px;
           box-shadow: 0 8px 28px rgb(29 47 59 / 8%); }
.su-stack { display: flex; flex-direction: column; gap: 22px; }

/* ── fields ────────────────────────────────────────────────────────────── */

/* `fieldset` IS A FIELD GROUP HERE and must not draw the browser's default
 * box: "How many TVs?" and "Setup" came out ruled off inside the card, which
 * the mockup does not do. */
.su-field { display: flex; flex-direction: column; gap: 6px;
            border: 0; padding: 0; margin: 0; min-width: 0; }
.su-field legend { padding: 0; }
/* A BUTTON IN A COLUMN STRETCHES unless it is told not to: the two email
 * buttons ran the full width of the card. */
.su-stack > .su-btn { align-self: flex-start; }
.su-field label { font-weight: 600; }
.su-field input, .su-field select {
  font: inherit; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font-size: 17px; background: var(--card);
  color: var(--navy); width: 100%; box-sizing: border-box;
}
.su-field input:focus, .su-field select:focus { border-color: var(--teal); }
.su-field .hint { font-size: 15px; color: var(--text); }
.su-row { display: flex; flex-wrap: wrap; gap: 14px; }
.su-row > * { flex: 1 1 8rem; min-width: 0; }

/* ── buttons ───────────────────────────────────────────────────────────── */

/* EVERY STATE, for the reason given at length in static/public.css: a class
 * that names its colour in one state is a class a bare `a` rule can reach
 * into, and that is how /tv shipped a button with an invisible label. */
.su a.su-btn, .su button.su-btn,
.su a.su-btn:link, .su a.su-btn:visited, .su a.su-btn:hover, .su a.su-btn:focus, .su a.su-btn:active, .su button.su-btn:active {
  color: var(--on-navy);
  text-decoration: none;
}
.su-btn { background: var(--navy); border: 0;
          border-radius: 10px; padding: 15px 28px; font: inherit;
          font-weight: 700; font-size: 17px; cursor: pointer;
          display: inline-block; }
.su a.su-btn:hover, .su button.su-btn:hover { background: #16252f; }

.su a.su-btn-gold, .su button.su-btn-gold,
.su a.su-btn-gold:link, .su a.su-btn-gold:visited, .su a.su-btn-gold:hover,
.su a.su-btn-gold:focus, .su a.su-btn-gold:active, .su button.su-btn-gold:active { color: var(--navy); }
.su-btn-gold { background: var(--gold); }
.su a.su-btn-gold:hover, .su button.su-btn-gold:hover { background: #c0902f; }

.su a.su-btn-back, .su button.su-btn-back,
.su a.su-btn-back:link, .su a.su-btn-back:visited, .su a.su-btn-back:hover,
.su a.su-btn-back:focus, .su a.su-btn-back:active, .su button.su-btn-back:active { color: var(--navy); }
.su-btn-back { background: transparent; border: 1px solid var(--line);
               font-weight: 400; font-size: 16px; padding: 15px 22px; }
.su a.su-btn-back:hover, .su button.su-btn-back:hover { background: var(--ground-2); }
/* BACK LEFT, FORWARD RIGHT, as every step of the mockup has it. They sat
 * side by side on the left, which put "Back" where the eye expects the button
 * that continues. */
.su-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
              justify-content: space-between; }
.su-actions .su-right { margin-left: auto; }

/* ── the choice cards: how many TVs, and who sets it up ───────────────── */

.su-choices { display: grid; gap: 12px;
              grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.su-choice { display: block; border: 1px solid var(--line); border-radius: 12px;
             padding: 16px 18px; cursor: pointer; background: var(--card); }
.su-choice:hover { border-color: var(--teal); }
.su-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.su-choice .t { font-weight: 700; display: block; }
.su-choice .d { font-size: 15px; color: var(--text); display: block;
                margin-top: 4px; }
.su-choice .p { font-weight: 700; display: block; margin-top: 6px; }
/* THE CHOSEN ONE IS OBVIOUS WITHOUT A SCRIPT: :has on the label, which every
 * browser this portal supports has had for two years. */
.su-choice:has(input:checked) { border-color: var(--navy); border-width: 2px;
                                padding: 15px 17px;
                                background: var(--ground); }
.su-choice:has(input:focus-visible) { outline: 3px solid var(--gold);
                                      outline-offset: 2px; }

/* THE DUE-TODAY BREAKDOWN. A total nobody can check is a total somebody
 * telephones about: these are the lines that add up to it. */
.su-due .su-parts { list-style: none; margin: 8px 0 0; padding: 0;
                    display: flex; flex-direction: column; gap: 4px; }
.su-due .su-parts li { display: flex; justify-content: space-between;
                       gap: 16px; font-size: 15px; }

/* ── the two doors on the chooser: free WICW.TV, or the full line-up ──
 *
 * NOT .su-choice, which is a radio label and sets `cursor: pointer` on the
 * whole box. These are two different journeys, each with its own button, and
 * a pointer cursor over a box that answers no click is a promise the page
 * does not keep.
 *
 * THE BUTTONS LINE UP along the bottom whatever the copy does: `margin-top:
 * auto` on the wrapper, so the longer description pushes its own button down
 * rather than leaving the pair ragged.
 */
.su-doors { display: grid; gap: 20px;
            grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.su-door { display: flex; flex-direction: column; gap: 14px;
           border: 1px solid var(--line); border-radius: 12px; padding: 24px;
           min-width: 0; }
.su-door .go { margin-top: auto; }
/* box-sizing EXPLICITLY, as everything else in this file that sets
 * `width: 100%` on a padded control does (see .su-field input): there
 * is no global border-box here, so a full-width button with 28px of
 * side padding hangs 56px out of the card it sits in. */
.su-door .su-btn { display: block; width: 100%; text-align: center;
                   box-sizing: border-box; }

/* ── the compact choices: how many TVs ─────────────────────────────────
 *
 * THE MOCKUP'S ROW OF SMALL SQUARES, not six wide cards: "how many
 * televisions" is one digit, and six descriptive cards made the plan step
 * twice as long as the page it was drawn from. The per-option price stays,
 * as the line of help text under the row.
 */

.su-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.su-pill { min-width: 64px; padding: 12px 18px; border-radius: 10px;
           font-size: 17px; font-weight: 700; cursor: pointer; text-align: center;
           border: 2px solid var(--line-2); background: var(--card);
           color: var(--navy); }
.su-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.su-pill:hover { border-color: var(--teal); }
.su-pill:has(input:checked) { border-color: var(--navy); background: var(--navy);
                              color: var(--on-navy); }
.su-pill:has(input:focus-visible) { outline: 3px solid var(--gold);
                                    outline-offset: 2px; }

/* ── the plan, on one line as the mockup draws it ─────────────────────── */

.su-plan { display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
           justify-content: space-between; border: 2px solid var(--line-2);
           border-radius: 12px; padding: 20px; cursor: pointer;
           background: var(--card); }
.su-plan:has(input:checked) { border-color: var(--navy); }
.su-plan:has(input:focus-visible) { outline: 3px solid var(--gold);
                                    outline-offset: 2px; }
.su-plan input { position: absolute; opacity: 0; width: 0; height: 0; }
.su-plan .t { font-weight: 700; font-size: 19px; display: block; }
/* ONE LINE OF FACTS, as the mockup draws it: the channel count and the
 * shared card's rows run together rather than stacking. */
.su-plan .d { color: var(--text); font-size: 15px; }
.su-plan .d::after { content: " \00b7"; }
.su-plan .p { font-family: var(--head); font-weight: 800; font-size: 26px;
              white-space: nowrap; }
.su-plan .p small { font-size: 15px; font-weight: 500; color: var(--text); }
/* THE SHARED PLAN CARD, ON ONE LINE. partials/plan_card.html is a <dl> of
 * label/value rows — right on the TV tab, four lines deep here. Inside a
 * sign-up plan row it reads as the mockup's single run of facts. */
.su-plan .pairs { display: inline-flex; flex-wrap: wrap; gap: 4px 14px;
                  margin: 0; color: var(--text); font-size: 15px;
                  vertical-align: baseline; }
.su-plan .pairs > div { display: flex; gap: 5px; }
.su-plan .pairs dt { font-weight: 600; }
.su-plan .pairs dt::after { content: ""; }
.su-plan .pairs dd { margin: 0; }
.su-plan .caption { color: var(--text); font-size: 15px; margin: 2px 0 0; }

/* ── the stacked setup cards ──────────────────────────────────────────── */

.su-stacked { display: flex; flex-direction: column; gap: 10px; }

/* ── the shared card fields ────────────────────────────────────────────
 *
 * partials/card_fields.html is the ONE card form in this project and it is
 * written against portal.css's .field/.input/.row, which the sign-up frame
 * does not load — so the card step rendered raw browser inputs beside a
 * mockup of a designed one. These map the shared names onto the sign-up's own
 * field styling rather than forking the partial, because a second copy of the
 * card form is exactly what §0.1's gate exists to prevent.
 */

.su .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.su .field label { font-weight: 600; }
.su .input { font: inherit; border: 1px solid var(--line); border-radius: 10px;
             padding: 14px 16px; font-size: 17px; background: var(--card);
             color: var(--navy); width: 100%; box-sizing: border-box; }
.su .input:focus { border-color: var(--teal); }
.su .row { display: flex; flex-wrap: wrap; gap: 14px; }
.su .row > * { flex: 1 1 8rem; min-width: 0; }

/* ── the last screen ──────────────────────────────────────────────────── */

.su-done { display: flex; flex-direction: column; gap: 14px;
           align-items: flex-start; }
.su-done .tick { width: 56px; height: 56px; border-radius: 50%;
                 background: var(--good-bg); color: var(--good);
                 display: flex; align-items: center; justify-content: center;
                 font-size: 26px; font-weight: 700; }
.su-done h1 { font-size: 34px; }
.su-done p { color: var(--text); font-size: 18px; }
.su-next { margin: 0; padding-left: 22px; line-height: 1.7; }

/* ── the consent box ──────────────────────────────────────────────────── */

.su-check { display: flex; gap: 10px; align-items: flex-start;
            color: var(--text); }
.su-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }

/* ── the verdict ───────────────────────────────────────────────────────── */

.su-good { background: var(--good-bg); border: 1px solid #bfe0d2;
           border-radius: 12px; padding: 16px 18px; color: var(--good); }
.su-good b { color: var(--good); }
.su-warn { background: #fdf3e3; border: 1px solid #f0dcc4;
           border-radius: 12px; padding: 16px 18px; color: #7a5212; }
.su-error { background: #fdecec; border: 1px solid #e8b4b4;
            border-radius: 12px; padding: 16px 18px; color: #7b1e15; }

/* ── YOUR ORDER ────────────────────────────────────────────────────────── */

.su-order { background: var(--navy); color: var(--on-navy);
            border-radius: 16px; padding: 28px; display: flex;
            flex-direction: column; gap: 12px; }
.su-order .cap { font-size: 13px; font-weight: 700; letter-spacing: 0.6px;
                 color: var(--gold); }
.su-order .line { display: flex; justify-content: space-between; gap: 12px; }
.su-order .dim { color: var(--on-navy-dim); }
.su-order .total { border-top: 1px solid var(--navy-soft); padding-top: 12px;
                   display: flex; justify-content: space-between; gap: 12px; }
.su-order .note { font-size: 14px; color: var(--on-navy-faint); }
.su-aside .phone { font-size: 15px; color: var(--text); }

/* ── a phone ───────────────────────────────────────────────────────────── */

@media (max-width: 48rem) {
  .su-card { padding: 24px; }
  .su h1 { font-size: 27px; }
  .su-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .su-body { padding-block: 24px 48px; gap: 24px; }
  /* THE PANEL STAYS BELOW THE CARD, as the mockup has it on a narrow
   * screen. Hoisting it above the step bar was my own idea and it pushed the
   * form somebody came to fill in off the first screen. */
  .su-aside { flex-basis: 100%; }
  .su-actions .su-btn { flex: 1 1 100%; text-align: center; }
  .su-plan .p { font-size: 22px; }
}
