/* Rowan Care Advisory forms. Same palette, buttons and square corners as rowancareadvisory.co.uk
   (brand palette of 19 Sept 2026: white, warm cream, sage, soft blue, deep green and blue text, no yellow).
   No web fonts are loaded: Open Sans is used only if it is already on the reader's device, otherwise Arial. */
:root {
  --white: #ffffff;
  --cream: #fcfbf7;
  --sage: #f0f4ee;
  --sage-mid: #7f9f8a;
  --line: #dde4da;
  --green: #24463a;
  --green-dark: #1a3429;
  --navy: #1d3447;
  --blue: #1f5d8a;
  --blue-soft: #e3ebf0;
  --muted: #4a5a57;
  --error: #a4262c;
  --error-soft: #fbeeee;
  --font: "Open Sans", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.t-lg { font-size: 112.5%; }
html.t-xl { font-size: 125%; }
body { margin: 0; background: var(--cream); color: var(--navy); font: 1.125rem/1.6 var(--font); }
a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--green); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px;
}
h1, h2, h3 { color: var(--green); font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--green); color: var(--white); padding: 8px 12px; z-index: 99; }

/* Header, as on the site: utility bar, logo row, green bar */
.util { background: var(--navy); color: #e7eef4; font-size: .9rem; }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 16px; }
.util .wrap { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-block: 6px; flex-wrap: wrap; }
.tsize { display: flex; align-items: center; gap: 6px; }
.tsize button { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.45); border-radius: 2px;
  cursor: pointer; font-family: var(--font); font-weight: 700; line-height: 1; min-width: 34px; min-height: 30px; padding: 3px 7px; }
.tsize button[aria-pressed="true"] { background: var(--white); color: var(--navy); }
.logo-row { background: var(--white); border-bottom: 6px solid var(--green); }
.logo-row .wrap { padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--green); }
.brand-name { font-size: 1.45rem; font-weight: 700; line-height: 1; letter-spacing: .02em; }
.brand-name small { display: block; font-size: .64rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; margin-top: 6px; }

main { display: block; padding-block: 24px 48px; }
.card { background: var(--white); border: 1px solid var(--line); padding: 20px 16px 24px; }
.intro { color: var(--navy); }
.lead { font-size: 1.15rem; }

/* Progress and saving */
.progress { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap;
  margin-bottom: 14px; color: var(--muted); font-size: 1rem; }
.progress strong { color: var(--green); font-size: 1.05rem; }
.bar { height: 8px; background: var(--sage); margin-bottom: 20px; }
.bar span { display: block; height: 100%; background: var(--green); width: 0; }
.save-state { min-height: 1.6em; }

/* Questions */
.q { margin: 0 0 28px; padding: 0; border: 0; min-width: 0; }
.q > legend, .q > .label, .q label.label { display: block; font-weight: 700; color: var(--navy); font-size: 1.15rem;
  margin: 0 0 6px; padding: 0; }
.q .hint { display: block; color: var(--muted); margin: 0 0 10px; font-size: 1.05rem; }
.req-note { color: var(--muted); font-size: 1rem; margin-bottom: 18px; }
.optional { font-weight: 400; color: var(--muted); }

input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  display: block; width: 100%; font: inherit; color: var(--navy); background: var(--white);
  border: 2px solid var(--navy); border-radius: 0; padding: 10px 12px; min-height: 52px;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
input[readonly] { background: var(--sage); border-color: var(--sage-mid); }
input.short { max-width: 8em; }
select { appearance: auto; }
.name-parts { display: grid; grid-template-columns: 1fr; gap: 12px; }
.name-parts label { font-weight: 400; display: block; margin-bottom: 4px; }

/* Radio and tick-box answers as large tappable rows */
.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; min-height: 52px;
  background: var(--white); border: 2px solid var(--line); cursor: pointer; line-height: 1.45; }
.choice:hover { border-color: var(--sage-mid); }
.choice input { flex: none; width: 26px; height: 26px; margin: 0; accent-color: var(--green); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--green); background: var(--sage); }
.choice:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }
.tick .choice { background: var(--cream); }

.info { background: var(--blue-soft); border-left: 6px solid var(--blue); padding: 12px 14px; margin: 0 0 28px; }
.info p:last-child { margin: 0; }

/* Errors */
.q.has-error { border-left: 5px solid var(--error); padding-left: 14px; }
.error-text { display: block; color: var(--error); font-weight: 700; margin: 0 0 8px; }
.has-error input[type=text], .has-error input[type=email], .has-error input[type=number], .has-error select,
.has-error textarea { border-color: var(--error); }
.error-summary { border: 4px solid var(--error); padding: 14px 16px; margin: 0 0 24px; background: var(--white); }
.error-summary h2 { color: var(--error); font-size: 1.25rem; }
.error-summary ul { margin: 0; padding-left: 1.2em; }
.error-summary a { color: var(--error); font-weight: 700; overflow-wrap: anywhere; }
.choice span, .info p { overflow-wrap: anywhere; }

/* Buttons, as on the site */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--green); color: var(--white);
  font: 700 1.1rem/1.2 var(--font); text-decoration: none; padding: 14px 24px; min-height: 52px; border: 2px solid var(--green);
  border-radius: 3px; cursor: pointer; text-align: center; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.btn.outline { background: var(--white); color: var(--green); }
.btn.outline:hover { background: var(--sage); color: var(--green); }
.btn.link { background: transparent; border-color: transparent; color: var(--blue); text-decoration: underline; padding-inline: 4px; }
.btn.link:hover { color: var(--green); background: transparent; }
.btn[disabled] { opacity: .65; cursor: wait; }
.nav-buttons { display: flex; flex-direction: column-reverse; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.nav-buttons .btn { width: 100%; }
.save-later { margin-top: 16px; text-align: center; }
.notice { background: var(--sage); border-left: 6px solid var(--green); padding: 12px 14px; margin-top: 14px; }
.notice.warn { background: var(--error-soft); border-left-color: var(--error); }

/* Files */
.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--sage); padding: 10px 12px; }
.file-list .btn { min-height: 44px; padding: 8px 14px; font-size: 1rem; }
input[type=file] { font: inherit; max-width: 100%; }

/* Messages that replace the form (thank you, link not working) */
.message h1 { margin-bottom: .6em; }
.ref { display: inline-block; font-weight: 700; font-size: 1.3rem; letter-spacing: .03em; background: var(--sage);
  border: 2px solid var(--green); padding: 6px 12px; margin: 4px 0 16px; }

/* Honeypot: off screen and out of the tab order; people never see it */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

footer { background: var(--navy); color: #cdd8e2; font-size: .95rem; padding-block: 28px; }
footer a { color: #e7eef4; }
footer a:hover { color: var(--white); }
footer p { margin: 0 0 .5em; }

@media (min-width: 640px) {
  h1 { font-size: 2.3rem; }
  .card { padding: 32px 36px 36px; }
  .name-parts { grid-template-columns: 1fr 1fr; }
  .nav-buttons { flex-direction: row; justify-content: space-between; }
  .nav-buttons .btn { width: auto; min-width: 10em; }
  .nav-buttons .next { margin-left: auto; }
}
@media (prefers-reduced-motion: no-preference) { .bar span { transition: width .3s ease; } }
@media print { .util, .nav-buttons, .save-later, footer { display: none; } body { background: #fff; } }
.tsize .ts-1 { font-size: .8rem; }
.tsize .ts-2 { font-size: .95rem; }
.tsize .ts-3 { font-size: 1.1rem; }
