/* TheatreStack discovery form */
:root {
  --navy: #232943;
  --blue: #6274B0;
  --blue-dark: #4b5c99;
  --soft: #A7B2D5;
  --pale: #F2F4FB;
  --ink: #232943;
  --muted: #5d6275;
  --line: #cfd5e8;
  --white: #fff;
  --radius: 10px;
  --focus: 0 0 0 3px rgba(98, 116, 176, .45);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 7.5rem; }
body {
  margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--pale);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Lato, Inter, Arial, sans-serif; line-height: 1.2; }
a { color: var(--blue-dark); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 1.25rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--navy); color: #fff; padding: .5rem 1rem; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: .5rem; }
.hp { position: absolute; left: -9999px; }
.brand-blue { color: var(--blue); }

/* Header */
.site-header { background: var(--white); border-bottom: 4px solid var(--blue); padding: 1.5rem 0 1rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.site-header h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 900; color: var(--navy); }
.subtitle { margin: .25rem 0 0; font-family: Lato, sans-serif; font-weight: 700; color: var(--blue); font-size: 1.15rem; }
.logo { width: 150px; height: auto; flex-shrink: 0; }
.intro { margin: 1rem 0 .4rem; max-width: 52rem; }
.intro-small { margin: 0; color: var(--muted); font-size: .9rem; }

/* Progress / nav */
.progress-nav { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.progress-nav .wrap { max-width: 1100px; }
.progress-row { display: flex; align-items: center; gap: .75rem; padding-top: .6rem; flex-wrap: wrap; }
.progress-bar { flex: 0 0 140px; height: 8px; background: rgba(255,255,255,.2); border-radius: 99px; overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--soft); transition: width .3s; }
.progress-text { font-size: .85rem; font-weight: 600; }
.save-status { font-size: .8rem; color: var(--soft); margin-left: auto; }
.section-nav { list-style: none; display: flex; gap: .15rem; justify-content: space-between; flex-wrap: wrap; margin: 0; padding: .5rem 0 .6rem; overflow-x: auto; scrollbar-width: thin; }
.section-nav a {
  display: flex; align-items: center; gap: .4rem; white-space: nowrap; text-decoration: none;
  color: #dfe3f3; font-size: .8rem; padding: .3rem .55rem .3rem .3rem; border-radius: 99px; border: 1px solid transparent;
}
.section-nav a:hover { background: rgba(255,255,255,.08); }
.section-nav a[aria-current] { background: rgba(255,255,255,.14); border-color: var(--soft); color: #fff; }
.nav-num { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: rgba(255,255,255,.15); font-weight: 700; font-size: .75rem; }
.section-nav a.done .nav-num { background: var(--soft); color: var(--navy); }
.section-nav a.done .nav-num { font-size: 0; }
.section-nav a.done .nav-num::after { content: "✓"; font-size: .8rem; }

/* Sections */
main { padding: 1.5rem 1.25rem 2rem; }
.q-section, .review { background: var(--white); border-radius: var(--radius); padding: 1.25rem 1.5rem 1.5rem; margin-bottom: 1.25rem; border: 1px solid #e3e7f3; }
.q-section.highlight { border: 2px solid var(--blue); box-shadow: 0 4px 18px rgba(98,116,176,.15); }
.q-section h2 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; margin: 0 0 1rem; padding-bottom: .5rem;
  border-bottom: 2px solid var(--soft); font-size: 1.3rem; color: var(--navy);
}
.q-section h2 .num, .review h3 .num {
  display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 1rem; align-self: center;
}
.q-section h2 .note { font-family: Inter, sans-serif; font-style: italic; font-weight: 400; font-size: .9rem; color: var(--muted); }
.section-intro { margin: 0 0 .4rem; }
.quote-list { margin: 0 0 1rem; padding-left: 1.2rem; color: #404660; font-style: italic; font-size: .95rem; }

/* Fields */
.field { margin-top: 1rem; }
.field > label, .group-label { display: block; font-weight: 600; margin-bottom: .35rem; }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 8px; padding: .55rem .7rem; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 2.75rem; overflow: hidden; }
input:hover, textarea:hover { border-color: var(--soft); }
input:focus, textarea:focus, button:focus-visible, a:focus-visible, .check input:focus-visible + label { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
::placeholder { color: #9aa0b4; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.grid-2 .field { margin-top: .75rem; }
.money { display: flex; align-items: center; gap: .5rem; max-width: 22rem; }
.money input { max-width: 10rem; }
.affix { font-weight: 600; color: var(--muted); }

/* Checkboxes */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.check-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.checks.cols-3 .check-list { display: grid; grid-template-columns: repeat(3, 1fr); }
.check { position: relative; display: flex; align-items: center; gap: .5rem; }
.checks.cols-2 .check-list { display: grid; grid-template-columns: repeat(2, 1fr); }
.check input[type=checkbox], .check input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .check label::before { border-radius: 50%; }
.choice .check input:checked + label::before { background: var(--blue); box-shadow: inset 0 0 0 3px #fff; }
.checks.choice + .field, .field + .checks, .checks + .checks { margin-top: 1.1rem; }
.check label {
  display: flex; align-items: center; gap: .55rem; width: 100%; cursor: pointer; padding: .55rem .75rem;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font-size: .95rem; user-select: none;
}
.check label::before {
  content: ""; flex: 0 0 1.1rem; height: 1.1rem; border: 2px solid var(--soft); border-radius: 4px; background: #fff;
}
.check input:checked + label { border-color: var(--blue); background: var(--pale); }
.check input:checked + label::before {
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.5' d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E") center/80% no-repeat;
  border-color: var(--blue);
}
.check.has-detail { flex-wrap: wrap; }
.check.has-detail label { width: auto; }
.check .detail { flex: 1 1 8rem; width: auto; padding: .45rem .6rem; }
.systems { display: grid; gap: .9rem; }
.systems fieldset { display: grid; grid-template-columns: 9rem 1fr; align-items: center; gap: .5rem; padding-bottom: .9rem; border-bottom: 1px dashed #e1e5f2; }
.systems fieldset:last-child { border-bottom: 0; padding-bottom: 0; }
.systems legend { float: left; margin: 0; padding-top: .5rem; }
.systems .check-list { grid-column: 2; }
.systems .check label { padding: .4rem .65rem; font-size: .9rem; }

/* Row tables */
.table-wrap { overflow-x: auto; }
.rows-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; }
.rows-table th {
  background: var(--pale); color: var(--navy); text-align: left; font-size: .82rem; font-weight: 700;
  padding: .55rem .5rem; border-bottom: 2px solid var(--soft); vertical-align: bottom;
}
.rows-table td { padding: .4rem .3rem; vertical-align: top; border-bottom: 1px solid #edf0f8; }
.rows-table .col-remove { width: 2.75rem; text-align: center; }
.rows-table input[type=text], .rows-table textarea { padding: .45rem .55rem; font-size: .93rem; }
.rows-table textarea { min-height: 2.6rem; }
.cell-label, .ex-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
tr.example td { color: #8a8fa3; font-style: italic; font-size: .88rem; background: #fafbfe; padding: .5rem .5rem; }
.ex-tag {
  display: inline-block; font-style: normal; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--blue); background: var(--pale); border: 1px solid var(--soft); border-radius: 4px; padding: 0 .35rem; margin-right: .4rem;
}
.btn-remove {
  font: inherit; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1.5px solid transparent; background: transparent;
  color: #8a8fa3; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.btn-remove:hover { color: #b3261e; background: #fdecea; border-color: #f3c3be; }
.remove-text { display: none; }

/* Rating 1–5 */
.rating legend.cell-label { position: absolute; }
.rating-opts { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.rating-opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-opts label {
  display: grid; place-items: center; width: 2.2rem; height: 2.4rem; cursor: pointer; font-weight: 600; color: var(--muted);
  border-left: 1px solid var(--line); user-select: none;
}
.rating-opts label:nth-of-type(1) { border-left: 0; }
.rating-opts label:hover { background: var(--pale); }
.rating-opts input:checked + label { background: var(--blue); color: #fff; }
.rating-opts input:focus-visible + label { box-shadow: inset 0 0 0 3px var(--soft); }
.rv-label { display: none; }
.print-value { display: none; }

/* Privacy note and consent */
.privacy-note { margin: 1.5rem 0 0; padding: 1rem 1.25rem; background: #fff; border: 1px solid var(--line, #dfe3f0); border-left: 4px solid var(--blue, #6274B0); border-radius: 10px; font-size: .92rem; color: #3a4060; }
.privacy-note h2 { font-family: 'Lato', sans-serif; font-size: 1.05rem; margin: 0 0 .4rem; color: var(--navy, #232943); }
.privacy-note p { margin: .35rem 0; }
.privacy-note a, .consent a { color: var(--blue-dark, #4a5a96); }
.consent { margin: .75rem 0 1rem; padding: .85rem 1rem; background: #fff; border: 1px solid #c9d0e6; border-radius: 10px; }
.consent.invalid { border-color: #b3261e; box-shadow: 0 0 0 2px rgba(179,38,30,.15); }
.consent-label { display: flex; gap: .65rem; align-items: flex-start; cursor: pointer; font-weight: 500; line-height: 1.45; }
.consent-label input { flex: none; width: 1.25rem; height: 1.25rem; margin-top: .1rem; accent-color: var(--blue, #6274B0); }
.consent-hint { margin: .45rem 0 0 1.9rem; font-size: .85rem; color: #5b6180; }
.consent-error { margin: .35rem 0 0 1.9rem; font-size: .9rem; color: #b3261e; font-weight: 600; }
.consent-error:empty { display: none; }
.rating-static { font-style: normal; font-weight: 600; }

/* Buttons */
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; padding: .7rem 1.2rem; border: 2px solid var(--blue);
  min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
}
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: #343c5f; }
.btn-secondary { background: #fff; color: var(--navy); }
.btn-secondary:hover { background: var(--pale); }
.btn-link { background: none; border-color: transparent; color: var(--blue-dark); text-decoration: underline; padding-inline: .5rem; }
.btn-add { margin-top: .6rem; background: var(--pale); color: var(--navy); border: 1.5px dashed var(--blue); padding: .5rem 1rem; }
.btn-add:hover { background: #e6eaf7; }
.btn:disabled { opacity: .6; cursor: wait; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; padding: 1rem 0; }

/* Review */
.review h2 { margin: 0 0 .25rem; font-size: 1.6rem; color: var(--navy); }
.review h2:focus { outline: none; }
.review-lead { margin: 0 0 1rem; color: var(--muted); }
.review-section { position: relative; padding: .5rem 0 1rem; border-bottom: 1px solid #e6e9f4; }
.review-section h3 { display: flex; align-items: center; gap: .6rem; font-size: 1.1rem; margin: .75rem 5rem .6rem 0; }
.review-section .num { min-width: 1.6rem !important; height: 1.6rem !important; font-size: .85rem !important; }
.review-section dl { display: grid; grid-template-columns: minmax(10rem, 34%) 1fr; gap: .4rem 1.25rem; margin: 0; }
.review-section dt { font-weight: 600; font-size: .93rem; }
.review-section dd { margin: 0; white-space: pre-wrap; }
.empty { color: #8a8fa3; font-style: italic; }
.edit-link { position: absolute; top: 1.1rem; right: 0; font-size: .9rem; font-weight: 600; }
.review-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: .5rem; }
.review-table th { background: var(--pale); text-align: left; padding: .45rem .5rem; border: 1px solid #dfe3f1; font-size: .8rem; }
.review-table td { padding: .45rem .5rem; border: 1px solid #dfe3f1; vertical-align: top; white-space: pre-wrap; }
.notice { background: #fff8e6; border: 1px solid #f0d58a; border-left: 5px solid #e2b33c; border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; }
.notice ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.send-box { margin-top: 1.5rem; background: var(--pale); border-radius: var(--radius); padding: 1.1rem 1.25rem; border: 1px solid #dde2f2; }
.send-box h3 { margin: 0 0 .35rem; }
.send-box p { margin: 0 0 .9rem; }
.send-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.send-result { margin: .9rem 0 .4rem !important; font-weight: 600; min-height: 1.2em; }
.send-result.ok { color: #1e6b3a; }
.send-result.err { color: #b3261e; }

.thanks { text-align: center; color: var(--muted); font-style: italic; font-size: .92rem; margin: 1rem 0 0; }
.site-footer { background: var(--navy); color: #c9cfe6; font-size: .8rem; text-align: center; padding: 1.1rem 0; margin-top: 1.5rem; }
.site-footer a { color: #fff; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 760px) {
  html { scroll-padding-top: 8rem; }
  .section-nav { flex-wrap: nowrap; justify-content: flex-start; }
  body { font-size: 16px; }
  .wrap { padding: 0 1rem; }
  main { padding: 1rem 1rem 1.5rem; }
  .logo { width: 92px; }
  .site-header { padding-top: 1rem; }
  .q-section, .review { padding: 1rem 1rem 1.25rem; }
  .checks.cols-3 .check-list, .checks.cols-2 .check-list { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .systems fieldset { grid-template-columns: 1fr; }
  .systems legend { float: none; padding: 0; margin-bottom: .4rem; }
  .systems .check-list { grid-column: 1; }
  .save-status { margin-left: 0; width: 100%; padding-bottom: 0; }
  .progress-bar { flex-basis: 90px; }
  .nav-label { display: none; }
  .section-nav a[aria-current] .nav-label { display: inline; }

  /* Tables become stacked cards */
  .table-wrap { overflow: visible; }
  .rows-table, .rows-table tbody, .rows-table tr, .rows-table td { display: block; width: 100%; }
  .rows-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rows-table tr { position: relative; border: 1.5px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem .7rem; margin-bottom: .75rem; background: #fff; }
  .rows-table tr.example { border-style: dashed; background: #fafbfe; }
  .rows-table tbody.rows { counter-reset: row; }
  .rows-table tbody.rows tr { counter-increment: row; padding-top: .5rem; }
  .rows-table tbody.rows tr::before {
    content: attr(data-noun) " " counter(row); display: block; font-family: Lato, sans-serif; font-weight: 700;
    color: var(--blue); font-size: .95rem; padding-bottom: .3rem; margin-bottom: .2rem; border-bottom: 1px solid #edf0f8;
  }
  .rows-table td { border: 0; padding: .3rem 0; background: transparent !important; }
  .rows-table td[style] { width: 100% !important; }
  .cell-label, .ex-label, .rating legend.cell-label {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
    display: block; font-weight: 600; font-size: .85rem; color: var(--navy); margin-bottom: .2rem; font-style: normal;
  }
  .ex-label { display: inline; color: #6d7288; }
  tr.example td { font-size: .9rem; }
  .rows-table td.col-remove { position: static; text-align: right; padding-top: .4rem; }
  tr.example td.col-remove { display: none; }
  .btn-remove { display: inline-flex; align-items: center; gap: .3rem; width: auto; height: auto; border-radius: 8px; padding: .35rem .7rem; font-size: .9rem; border-color: #ead2cf; color: #9b2c22; }
  .remove-text { display: inline; }
  .rating-opts { display: flex; width: 100%; }
  .rating-opts label { flex: 1; width: auto; height: 2.75rem; }
  .btn-add { width: 100%; }
  .form-actions .btn, .send-actions .btn { width: 100%; }
  .review-section dl { grid-template-columns: 1fr; gap: .1rem; }
  .review-section dd { margin-bottom: .55rem; }
  .review-table thead { display: none; }
  .review-table, .review-table tbody, .review-table tr, .review-table td { display: block; width: 100%; }
  .review-table tr { border: 1px solid #dfe3f1; border-radius: 8px; margin-bottom: .6rem; padding: .4rem .6rem; }
  .review-table td { border: 0; padding: .15rem 0; }
  .review-table .rv-label { display: inline; font-weight: 600; color: var(--navy); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Print ---------- */
@media print {
  @page { size: A4; margin: 12mm 12mm 14mm; }
  body { background: #fff; font-size: 10pt; }
  .no-print, .progress-nav, .skip-link, .intro-small, .btn-remove, .col-remove, .btn-add, .edit-link { display: none !important; }
  .wrap, main { max-width: none; padding: 0; }
  .site-header { border-bottom: 2px solid var(--blue); padding: 0 0 .4rem; }
  .logo { width: 90px; }
  .q-section, .review { border: 0 !important; box-shadow: none !important; padding: 0; margin: 0 0 .6rem; break-inside: auto; }
  .q-section h2 { font-size: 12pt; margin-bottom: .4rem; break-after: avoid; }
  .q-section h2 .num { min-width: 1.4rem; height: 1.4rem; font-size: 9pt; }
  input[type=text], input[type=email], input[type=tel], textarea { display: none !important; }
  .print-value { display: block; min-height: 1.5em; border-bottom: 1px solid #999; padding: .1rem .2rem; white-space: pre-wrap; overflow-wrap: anywhere; }
  .field .print-value { min-height: 2.6em; }
  .check .print-value { flex: 1 1 6rem; min-height: 1.3em; }
  .money .print-value { min-width: 6rem; }
  .check label { border: 0; padding: .1rem 0; }
  .check input:not(:checked) + label { color: #555; }
  .checks.cols-3 .check-list, .checks.cols-2 .check-list { gap: .15rem 1rem; }
  .rows-table th, .rows-table td { border: 1px solid #bbb; }
  tr { break-inside: avoid; }
  .rating-opts label { width: 1.5rem; height: 1.5rem; }
  .site-footer { background: none; color: #666; border-top: 1px solid #ccc; margin-top: .5rem; padding: .4rem 0 0; font-size: 7.5pt; }
  .site-footer a, a { color: inherit; text-decoration: none; }
  .thanks { font-size: 8.5pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Company code gate */
body.gated #progress-nav, body.gated #discovery-form, body.gated #intro-small, body.gated .thanks { display: none !important; }
.gate { background: var(--white); border: 2px solid var(--blue); border-radius: var(--radius); padding: 1.5rem 1.75rem 1.25rem; max-width: 640px; margin: 1rem auto 2rem; box-shadow: 0 4px 18px rgba(98,116,176,.15); }
.gate h2 { margin: 0 0 .5rem; font-size: 1.5rem; color: var(--navy); }
.gate-lead { margin: 0 0 1.1rem; }
.code-sample, .code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .04em; white-space: nowrap; }
.gate-form > label { display: block; font-weight: 600; margin-bottom: .35rem; }
.gate-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.gate-row input { flex: 1 1 220px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; padding: .6rem .75rem; }
.gate-row input::placeholder { letter-spacing: .08em; color: #a3a9bd; }
.gate-row input[aria-invalid=true] { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179,38,30,.15); }
.gate-hint { margin: .4rem 0 0; color: var(--muted); font-size: .85rem; }
.gate-error { margin: .6rem 0 0; color: #b3261e; font-weight: 600; min-height: 1.2em; }
.gate-error:empty { display: none; }
.gate-help { margin: 1.1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.gate.busy #gate-btn { opacity: .7; cursor: progress; }
.company-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; background: var(--white); border: 1px solid #e3e7f3; border-left: 4px solid var(--blue); border-radius: var(--radius); padding: .6rem 1rem; margin-bottom: 1.25rem; font-size: .95rem; }
.company-bar .btn-link { margin-left: auto; padding: .25rem .5rem; font-size: .9rem; }
.company-note { flex-basis: 100%; margin: .25rem 0 0; color: #7a5a00; font-size: .9rem; }
input.locked { background: #eef0f7; color: var(--navy); border-style: dashed; cursor: not-allowed; font-weight: 600; }
.field-hint { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.field-hint::before { content: "🔒 "; }
.save-status.ok { color: #b9f0c9; }
.save-status.warn { color: #ffd88a; }
.save-later-result { background: #eef8f1; border: 1px solid #b7dfc3; border-left: 5px solid #2e8b57; border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; }
.save-later-result.err { background: #fff4f2; border-color: #f1b8b0; border-left-color: #b3261e; }
.save-later-result p { margin: .2rem 0; }
.save-later-result .link-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.save-later-result .link-row input { flex: 1 1 260px; font-size: .9rem; }
@media (max-width: 760px) {
  .gate { padding: 1.2rem 1.1rem 1rem; margin-top: .25rem; }
  .gate-row .btn { width: 100%; }
  .company-bar .btn-link { margin-left: 0; padding-left: 0; }
}
@media print { .gate, .company-bar .btn-link, .save-later-result { display: none !important; } }

/* ---------- team code: name step ---------- */
.team-start .grid-2 .field { margin-top: 0; }
.team-start .grid-2 label { display: block; font-weight: 600; margin-bottom: .35rem; }
.team-start .grid-2 input { width: 100%; }
.team-start .optional { font-weight: 400; color: var(--muted); }
.team-start #ts-btn { margin-top: .5rem; }
.team-start .company-note { margin: 0 0 1rem; }
.gate-help .btn-link { padding: 0; }
#privacy-team { margin-top: .5rem; }

/* ---------- v1.4 compact sizing ----------
   The form felt "zoomed in". Everything that is sized in rem (spacing, padding, headings, buttons) is scaled
   from the root, so one root change shrinks it all evenly. Percentages (not px) keep the user's own browser
   text-size setting working. Desktop: root 90% (≈ -10%), body text 15px, headings trimmed a little more.
   Phones: root 93.75% (≈ -6%), body + every input stay at 16px (stops iOS zoom-on-focus), tap targets ≥ 44px. */
@media screen {
  html { font-size: 90%; }                                   /* 14.4px at the default 16px */
  body { font-size: 1.0417rem; line-height: 1.5; }           /* 15px */
  .site-header { padding: 1.1rem 0 .8rem; }
  .site-header h1 { font-size: clamp(1.4rem, 3.4vw, 2rem); } /* 28.8px max (was 35px) */
  .subtitle { font-size: 1.05rem; }
  .logo { width: 130px; }
  .intro { margin: .8rem 0 .3rem; }
  .q-section, .review { padding: 1.1rem 1.35rem 1.3rem; margin-bottom: 1.1rem; }
  .q-section h2 { font-size: 1.25rem; margin-bottom: .85rem; }  /* 18px (was 20.8px) */
  .q-section h2 .num { min-width: 1.6rem; height: 1.6rem; font-size: .9rem; }
  .gate { padding: 1.35rem 1.6rem 1.1rem; }
  .gate h2 { font-size: 1.35rem; }                            /* 19.4px (was 24px) */
  .gate-row input { font-size: 1.2rem; padding: .5rem .7rem; }
  .review h2 { font-size: 1.45rem; }
  .field-hint, .gate-hint, .consent-hint { font-size: .9rem; } /* keep small print ≥ 13px */
  .section-nav a { font-size: .82rem; }
  .check label { font-size: 1rem; }                          /* 14.4px option text */
}
@media screen and (max-width: 760px) {
  html { font-size: 93.75%; }                                /* 15px at the default 16px */
  body { font-size: 1.0667rem; }                             /* 16px */
  input[type=text], input[type=email], input[type=tel], textarea,
  .rows-table input[type=text], .rows-table textarea, .check .detail,
  .save-later-result .link-row input { font-size: max(16px, 1.0667rem); min-height: 44px; }
  .gate-row input { font-size: 1.25rem; }
  .site-header h1 { font-size: 1.45rem; }
  .logo { width: 84px; }
  .check label { min-height: 44px; }
  .rating-opts label { min-height: 44px; height: auto; }
  .btn, .btn-remove, .company-bar .btn-link { min-height: 44px; }
}
.ts-shared { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; margin: 1rem 0 .5rem; }
.ts-shared legend { float: left; width: 100%; font-weight: 600; padding: 0; margin: 0 0 .4rem; }
.ts-shared legend + * { clear: both; }
.ts-opt { display: flex; gap: .55rem; align-items: center; padding: .4rem 0; cursor: pointer; }
.ts-opt input { width: 1.15rem; height: 1.15rem; accent-color: var(--blue); }
.ts-shared .field-hint-plain { margin: .35rem 0 0; }
