/* UTS homeowner questionnaires — large, high-contrast, easy to tap */
:root {
  color-scheme: light;
  --ink: #1f2316;
  --ink-soft: #3d4230;
  --olive-dark: #303421;
  --olive: #454F2D;
  --moss: #626931;
  --sage: #868C48;
  --sage-light: #A5AC78;
  --paper: #FBFAF5;
  --panel: #F1F1E6;
  --chosen: #E3E8CC;
  --line: #B9BD9C;
  --focus: #9A5B00;
  --bad: #9B1C1C;
  --radius: 12px;
  font-size: 20px;
}
html.big { font-size: 24px; }
* { box-sizing: border-box; }
body.q-page {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Atkinson Hyperlegible", Verdana, "Segoe UI", system-ui, sans-serif;
  font-size: 1rem; line-height: 1.55;
}
a { color: var(--olive); text-underline-offset: 3px; }
a:hover { color: var(--olive-dark); }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 12px 16px; z-index: 10; }

/* header / footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 40px); background: #fff; border-bottom: 1px solid var(--line); }
.brand img { display: block; width: 210px; height: auto; }
.top-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.help { margin: 0; font-size: .9rem; }
.help a { font-weight: 700; white-space: nowrap; }
.textsize { font: inherit; font-size: .9rem; font-weight: 700; padding: 10px 16px; border-radius: 999px;
  border: 2px solid var(--olive); background: #fff; color: var(--olive); cursor: pointer; min-height: 48px; }
.textsize[aria-pressed="true"] { background: var(--olive); color: #fff; }
.foot { margin-top: 48px; padding: 28px clamp(16px, 4vw, 40px); background: var(--olive-dark); color: #F1F1E6;
  font-size: .85rem; }
.foot a { color: #fff; }
.foot p { margin: 4px 0; }
.foot .sign { font-style: italic; color: var(--sage-light); }

main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.intro { padding: 28px 0 8px; max-width: 820px; }
.eyebrow { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--moss);
  font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.2; margin: 6px 0 8px; color: var(--olive-dark); }
.sub { font-size: 1.05rem; margin: 0 0 16px; color: var(--ink-soft); }
.for-property { margin: 0 0 12px; font-size: 1.05rem; background: var(--chosen); display: inline-block;
  padding: 8px 16px; border-radius: 999px; }
.for-property[hidden] { display: none; }
.welcome { background: #fff; border: 2px solid var(--sage-light); border-radius: var(--radius); padding: 16px 22px;
  margin: 8px 0 16px; }
.welcome p { margin: 0 0 6px; }
.welcome ul { margin: 0; padding-left: 1.2em; }
.welcome li { margin: 6px 0; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--olive); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; font-weight: 700; }
.noscript, .resume { background: #FFF6DB; border: 2px solid #D9B44A; border-radius: var(--radius);
  padding: 14px 20px; margin: 0 0 16px; }
.resume p { margin: 0 0 4px; }

/* layout */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.steps { position: sticky; top: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 6px 10px 10px; font-size: .85rem; max-height: calc(100vh - 32px); overflow: auto; }
.steps summary { cursor: pointer; font-weight: 700; padding: 6px 8px; list-style: none; }
.steps summary::-webkit-details-marker { display: none; }
.steps-count { font-weight: 400; color: var(--ink-soft); }
.steps ol { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; }
.steps li[hidden] { display: none; }
.steps li a { display: flex; gap: 8px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.steps li a::before { content: counter(s); min-width: 1.6em; height: 1.6em; border-radius: 50%; display: inline-grid;
  place-items: center; font-size: .75rem; background: var(--panel); color: var(--ink-soft); flex: none; }
.steps li.done a::before { content: "✓"; background: var(--sage-light); color: var(--olive-dark); }
.steps li.current a { background: var(--chosen); font-weight: 700; }
.steps li.current a::before { background: var(--olive); color: #fff; }

#qform { min-width: 0; }
.progress { height: 10px; background: var(--panel); border-radius: 999px; overflow: hidden; margin: 0 0 18px; }
.progress .bar { height: 100%; width: 0; background: var(--sage); transition: width .3s; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 32px);
  margin-bottom: 24px; }
.js .step:not(.active) { display: none; }
.step[hidden] { display: none; }
.step-head { margin-bottom: 18px; }
.step-count { margin: 0; color: var(--moss); font-weight: 700; font-size: .85rem; letter-spacing: .04em; }
.step h2 { margin: 4px 0 6px; font-size: 1.55rem; line-height: 1.25; color: var(--olive-dark); }
.step h2:focus { outline: none; }
.step-intro { margin: 0; color: var(--ink-soft); }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--panel); flex-wrap: wrap; }
.saved-note { margin: 10px 0 0; font-size: .8rem; color: var(--ink-soft); text-align: right; }
.btn { font: inherit; font-weight: 700; min-height: 56px; padding: 12px 26px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--olive); background: #fff; color: var(--olive); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { background: var(--panel); }
.btn.primary { background: var(--olive); color: #fff; margin-left: auto; }
.btn.primary:hover { background: var(--olive-dark); }
.btn.big { font-size: 1.15rem; min-height: 64px; padding: 14px 34px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* questions */
.q { margin: 0 0 26px; }
.q[hidden], .q-row[hidden], .q-note[hidden] { display: none; }
.q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-label { display: block; font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; padding: 0; color: var(--ink); }
.q-hint { margin: -2px 0 10px; font-size: .88rem; color: var(--ink-soft); }
.q-note { background: var(--panel); border-left: 5px solid var(--sage); padding: 10px 16px; border-radius: 6px;
  font-size: .92rem; margin: 0 0 22px; }
.q input[type=text], .q select, .q textarea {
  font: inherit; width: 100%; min-height: 56px; padding: 10px 14px; border: 2px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); }
.q textarea { min-height: 120px; resize: vertical; }
.q input[type=text]:focus, .q select:focus, .q textarea:focus { border-color: var(--olive); }
.size-s input { max-width: 220px; }
.size-m input { max-width: 440px; }
.money { display: flex; align-items: center; gap: 8px; max-width: 280px; }
.money span { font-weight: 700; font-size: 1.1rem; }
.q-row { display: flex; flex-wrap: wrap; gap: 0 24px; align-items: flex-start; }
.q-row > .q { flex: 1 1 220px; }
.q-row > .q.size-l { flex-basis: 100%; }
.q-row > .q-radio:not(.compact), .q-row > .q-checks { flex-basis: 100%; }
.q-row .size-s input, .q-row .size-m input, .q-row .money { max-width: none; }

/* option tiles */
.opts { display: grid; gap: 10px; }
.opts.cols-1 { grid-template-columns: 1fr; }
.opts.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opts.cols-5, .opts.cols-6 { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.opt-head { grid-column: 1 / -1; margin: 10px 0 0; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--moss); }
.opt-head:first-child { margin-top: 0; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 14px; border: 2px solid var(--line);
  border-radius: 10px; background: #fff; cursor: pointer; line-height: 1.3; }
.opt:hover { border-color: var(--sage); }
.opt input { flex: none; width: 26px; height: 26px; margin: 0; accent-color: var(--olive); cursor: pointer; }
.opt:has(input:checked) { background: var(--chosen); border-color: var(--olive); font-weight: 700; }
.opt:has(input:focus-visible) { outline: 4px solid var(--focus); outline-offset: 2px; }
.other { margin-top: 12px; max-width: 560px; }
.other label { display: block; font-size: .9rem; margin-bottom: 4px; color: var(--ink-soft); }
.compact .opts { max-width: 560px; }

/* tables: bedroom/bath grid, rooms, who-pays */
table.grid, table.rooms, table.pays { border-collapse: separate; border-spacing: 0; width: 100%; }
table.grid th, table.grid td, table.rooms th, table.rooms td, table.pays th, table.pays td {
  padding: 6px; text-align: left; vertical-align: middle; }
table.grid thead th, table.rooms thead th, table.pays thead th { font-size: .82rem; color: var(--ink-soft);
  font-weight: 700; line-height: 1.2; }
table.grid tbody th, table.pays tbody th { font-weight: 700; padding-right: 12px; }
table.grid tbody tr:nth-child(odd), table.rooms tbody tr:nth-child(odd), table.pays tbody tr:nth-child(odd) {
  background: var(--panel); }
table.grid input { text-align: center; min-width: 64px; }
table.grid.single { max-width: 520px; }
table.rooms { max-width: 720px; }
table.rooms tbody th { width: 45%; font-weight: 700; }
table.pays td { text-align: center; }
.pay { display: inline-grid; place-items: center; width: 52px; height: 52px; cursor: pointer; border-radius: 50%; }
.pay input { width: 28px; height: 28px; accent-color: var(--olive); cursor: pointer; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid-total { margin: 8px 0 0; font-weight: 700; color: var(--olive); }
.grid-total:empty { display: none; }

/* units */
.unit { border: 2px solid var(--sage-light); border-radius: var(--radius); padding: 18px 20px 4px; margin: 0 0 22px; }
.unit legend { font-weight: 700; font-size: 1.15rem; padding: 0 8px; color: var(--olive-dark); }
.unit[hidden] { display: none; }
.units-empty[hidden] { display: none; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* review */
.summary { margin: 0 0 24px; }
.sum-sec { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 0 0 14px; }
.sum-sec h3 { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px;
  font-size: 1.1rem; color: var(--olive-dark); }
.sum-sec h3 button { font: inherit; font-size: .85rem; font-weight: 700; min-height: 44px; padding: 6px 16px;
  border-radius: 999px; border: 2px solid var(--olive); background: #fff; color: var(--olive); cursor: pointer; }
.sum-sec ul { margin: 0; padding: 0; list-style: none; }
.sum-sec li { padding: 5px 0; border-top: 1px dashed var(--panel); }
.sum-sec li:first-child { border-top: 0; }
.sum-sec li b { font-weight: 700; }
.sum-empty { color: var(--ink-soft); font-style: italic; margin: 0 0 10px; }
.skip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.small { min-height: 46px; padding: 6px 16px; font-size: .88rem; }
.preview-email { flex-basis: 100%; white-space: pre-wrap; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px; font-size: .8rem; max-height: 480px; overflow: auto; }
.sum-sec.skipped { background: var(--panel); border-style: dashed; }
.send-box { background: var(--panel); border-radius: var(--radius); padding: 20px; display: flex; flex-wrap: wrap;
  gap: 14px; align-items: center; }
.send-box .btn.primary { margin-left: 0; }
.send-status { flex-basis: 100%; margin: 0; font-weight: 700; }
.send-status.bad { color: var(--bad); }
.missing { background: #FDECEC; border: 2px solid var(--bad); color: var(--bad); border-radius: var(--radius);
  padding: 14px 18px; margin: 0 0 18px; font-weight: 700; }
.missing button { font: inherit; }

/* index + thanks */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 10px 0 24px; }
.card { display: block; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 22px;
  text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--olive); background: #fff; }
.card h2 { margin: 0 0 6px; font-size: 1.25rem; color: var(--olive-dark); }
.card p { margin: 0 0 12px; color: var(--ink-soft); }
.card .go { font-weight: 700; color: var(--olive); }
.index-help { font-size: 1rem; }

/* phones and small tablets */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 12px; }
  .steps { position: static; max-height: none; }
  .opts.cols-3, .opts.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  :root { font-size: 19px; }
  html.big { font-size: 22px; }
  .brand img { width: 170px; }
  .opts.cols-2, .opts.cols-3, .opts.cols-4 { grid-template-columns: 1fr; }
  .compact .opts.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact .opt { justify-content: center; padding: 8px; }
  .btn { flex: 1 1 auto; }
  .btn.primary { margin-left: 0; }
  /* stack the tables */
  table.grid thead, table.rooms thead, table.pays thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.rooms, table.rooms tbody, table.rooms tr,
  table.pays, table.pays tbody, table.pays tr { display: block; width: 100%; }
  table.grid tr, table.rooms tr, table.pays tr { padding: 10px 10px 4px; border-radius: 10px; margin-bottom: 8px; }
  table.grid tbody th, table.rooms tbody th, table.pays tbody th { display: block; width: auto; padding: 0 0 6px; }
  table.grid tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0 8px; }
  table.grid tr th { grid-column: 1 / -1; }
  table.grid.single tr { grid-template-columns: 1fr; }
  table.grid td, table.rooms td { display: block; padding: 0 0 8px; width: auto !important; }
  table.grid td::before, table.rooms td::before { content: attr(data-col); display: block; font-size: .8rem;
    color: var(--ink-soft); margin-bottom: 2px; }
  table.grid.single td::before { display: none; }
  table.pays tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  table.pays tr th { grid-column: 1 / -1; }
  table.pays td { display: block; text-align: center; padding: 0 0 6px; }
  table.pays td::before { content: attr(data-col); display: block; font-size: .75rem; color: var(--ink-soft);
    line-height: 1.2; min-height: 2.4em; }
  .pay { width: 48px; height: 48px; }
}

/* printing */
@media print {
  :root, html.big { font-size: 10pt; }
  @page { margin: 0.5in; }
  body.q-page { background: #fff; }
  .top-right, .steps, .step-nav, .saved-note, .progress, .resume, .welcome, .send-box, .foot .privacy,
  .skip, .noscript, .missing, .units-empty { display: none !important; }
  .top { border: 0; padding: 0 0 8pt; }
  .brand img { width: 150px; }
  .layout { display: block; }
  .step { display: block !important; border: 0; padding: 0; margin: 0 0 14pt; break-inside: auto; }
  .step-head { border-bottom: 2px solid #000; margin-bottom: 8pt; }
  .step h2 { font-size: 14pt; }
  .step-count { display: none; }
  .q { margin: 0 0 7pt; break-inside: avoid; }
  .q-checks, .q-radio, .q-rooms, .q-pays, .q-grid { break-inside: auto; }
  .q-label { font-size: 10.5pt; break-after: avoid; }
  .q-hint { font-size: 9pt; margin: 0 0 3pt; }
  .opts { display: block !important; columns: 4; column-gap: 10pt; }
  .opt-head { break-after: avoid; margin: 4pt 0 1pt; font-size: 8pt; column-span: none; }
  .opt { display: block; border: 0; min-height: 0; padding: 1pt 0; background: none !important; font-weight: 400 !important;
    break-inside: avoid; }
  .opt input { width: 10pt; height: 10pt; vertical-align: -1pt; margin-right: 4pt; }
  .q input[type=text], .q select, .q textarea { border: 0; border-bottom: 1px solid #555; border-radius: 0;
    min-height: 17pt; padding: 1pt 2pt; }
  .q textarea { min-height: 50pt; border: 1px solid #555; }
  select { appearance: none; }
  table.grid input { min-width: 0; }
  table.grid tbody tr:nth-child(odd), table.rooms tbody tr:nth-child(odd), table.pays tbody tr:nth-child(odd) {
    background: none; }
  table.grid td, table.rooms td, table.pays td, table.grid th, table.rooms th, table.pays th { border-bottom: 1px solid #ccc; }
  .unit { border: 1px solid #555; break-inside: avoid; }
  .foot { background: none; color: #000; margin: 0; padding: 8pt 0 0; border-top: 1px solid #000; }
  .foot a { color: #000; }
  .if-note { display: inline; }
  /* print a paper copy: every page and every follow-up question */
  body.print-blank .step[hidden], body.print-blank .q[hidden], body.print-blank .q-row[hidden],
  body.print-blank .unit[hidden] { display: block !important; }
  body.print-blank .review { display: none !important; }
  body.print-blank select.is-empty { color: transparent; }
  body.print-blank ::placeholder { color: transparent; }
  body.print-blank .unit[hidden][data-unit="5"], body.print-blank .unit[hidden][data-unit="6"],
  body.print-blank .unit[hidden][data-unit="7"], body.print-blank .unit[hidden][data-unit="8"] { display: none !important; }
  .step + .step { break-before: auto; }
  /* print my answers: just the summary */
  body.print-summary .intro, body.print-summary .step:not(.review), body.print-summary .review .step-head .step-intro {
    display: none !important; }
  body.print-summary .sum-sec { border: 0; border-top: 1px solid #000; border-radius: 0; padding: 6pt 0; break-inside: avoid; }
  body.print-summary .sum-sec h3 button { display: none; }
}
.if-note { display: none; font-size: .8rem; font-weight: 400; color: var(--ink-soft); font-style: italic; }
