/* MA Designs intake. Colors and type from brand/BRAND.md. Light only. */
:root {
  --ma-headline: #01567C;
  --ma-button: #000000;
  --ma-total: #95562F;
  --ma-label: #313B57;
  --ma-header-row: #ECFFF8;
  --ma-cream: #F8E9D5;
  --ma-white: #FFFFFF;
  --ma-text: #1A1A1A;
  --ma-border: #D9DEE3;
  --ma-tint: rgba(1, 86, 124, 0.06);
  --ma-error: #95562F;
  --radius: 12px;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ma-white);
  color: var(--ma-text);
  font-family: "Pontano Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
h1, h2 { font-family: "adonis-web", Georgia, "Times New Roman", serif; font-weight: 400; color: var(--ma-headline); margin: 0 0 8px; line-height: 1.2; }
h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-family: inherit; font-weight: 600; color: var(--ma-headline); font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
a { color: var(--ma-headline); text-decoration: none; }
a:hover { text-decoration: underline; }
.meta, label, legend { color: var(--ma-label); font-size: 14px; }
.total { color: var(--ma-total); font-weight: 600; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ma-white); padding: 8px 12px; border: 1px solid var(--ma-headline); border-radius: 8px; }
.skip:focus { left: var(--gutter); z-index: 10; }

.site-header { display: flex; justify-content: center; padding: 28px var(--gutter) 8px; }
.logo { display: block; width: 132px; height: auto; }
.wrap { max-width: 640px; margin: 0 auto; padding: 8px var(--gutter) 40px; }
.site-footer { text-align: center; padding: 8px var(--gutter) 32px; }

.card { background: var(--ma-white); border: 1px solid var(--ma-border); border-radius: var(--radius); padding: 24px 20px; margin-top: 16px; }
.note { background: var(--ma-tint); border-radius: 10px; padding: 12px 14px; margin: 4px 0 16px; }
.note p { margin: 0; }
.intro { color: var(--ma-label); }

.progress { height: 4px; background: var(--ma-header-row); border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.bar { height: 100%; width: 0; background: var(--ma-headline); transition: width 240ms ease; }
.step-label { margin-bottom: 4px; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12px; }

/* Questions */
.q { margin: 22px 0 0; }
.q.sub { margin-top: 12px; padding-left: 14px; border-left: 3px solid var(--ma-header-row); }
.q-label { display: block; font-size: 16px; color: var(--ma-text); font-weight: 600; margin-bottom: 4px; }
.q-help { display: block; margin: -2px 0 8px; }
.req { color: var(--ma-total); font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; float: left; width: 100%; }
legend + * { clear: both; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; color: var(--ma-text);
  background: var(--ma-white); border: 1px solid var(--ma-border); border-radius: 10px; margin-top: 4px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='none' stroke='%23313B57' stroke-width='1.6' d='M3 6l5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .opt:has(:focus-visible) {
  outline: 2px solid var(--ma-headline); outline-offset: 2px;
}
.is-invalid input, .is-invalid select, .is-invalid textarea, .is-invalid .opt { border-color: var(--ma-error); }

.opts { display: grid; gap: 8px; margin-top: 6px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--ma-border); border-radius: 10px; cursor: pointer; font-size: 16px; color: var(--ma-text); background: var(--ma-white); }
.opt input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--ma-headline); }
.opt:hover { background: var(--ma-header-row); }
.opt:has(input:checked) { border-color: var(--ma-headline); background: var(--ma-tint); }

.q-error { color: var(--ma-error); font-size: 14px; margin: 6px 0 0; }
.error-box { background: var(--ma-tint); border-left: 3px solid var(--ma-error); border-radius: 8px; padding: 10px 14px; margin: 12px 0; color: var(--ma-text); font-size: 15px; }
.error-box ul { margin: 6px 0 0; padding-left: 18px; }
.error-box a { color: var(--ma-error); text-decoration: underline; }

.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.turnstile { margin-top: 20px; }

/* Buttons */
.btn { font: inherit; text-transform: uppercase; letter-spacing: 0.1em; font-size: 14px; border-radius: 8px; padding: 13px 22px; min-height: 48px; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--ma-button); color: var(--ma-white); }
.btn-primary:hover { background: #1A1A1A; }
.btn-secondary { background: transparent; color: var(--ma-headline); border-color: var(--ma-headline); }
.btn-secondary:hover { background: var(--ma-header-row); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.actions { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 28px; }
#intro .btn { margin-top: 8px; width: 100%; }

@media (min-width: 600px) {
  h1 { font-size: 38px; }
  h2 { font-size: 30px; }
  .card { padding: 32px 36px; }
  .site-header { padding-top: 40px; }
  .logo { width: 150px; }
  .actions { flex-direction: row; justify-content: space-between; }
  .actions .btn { min-width: 140px; }
  #intro .btn { width: auto; }
  .opts.two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .wrap { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .bar { transition: none; } }

/* Admin */
.admin .wrap { max-width: 980px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.tab { font: inherit; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--ma-border); background: var(--ma-white); color: var(--ma-label); cursor: pointer; }
.tab[aria-selected="true"] { border-color: var(--ma-headline); color: var(--ma-headline); background: var(--ma-tint); }
.grid { display: grid; gap: 14px; }
.row { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--ma-border); }
.row:last-child { border-bottom: 0; }
.row .title { font-weight: 600; }
.row button.link { font: inherit; color: var(--ma-headline); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-weight: 600; font-size: 16px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--ma-header-row); color: var(--ma-label); margin-right: 6px; }
.pill.warn { background: var(--ma-tint); color: var(--ma-total); }
table.sum { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 15px; }
table.sum th { text-align: left; background: var(--ma-header-row); color: var(--ma-label); font-weight: 600; padding: 8px 10px; font-size: 14px; }
table.sum td { padding: 8px 10px; border-bottom: 1px solid var(--ma-border); vertical-align: top; }
table.sum td:first-child { color: var(--ma-label); width: 42%; }
.sum-head { background: var(--ma-header-row); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; }
.sum-head .biz { font-size: 22px; color: var(--ma-headline); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; background: var(--ma-header-row); padding: 10px 12px; border-radius: 8px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
pre.notes { white-space: pre-wrap; font: inherit; margin: 4px 0 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
@media (min-width: 768px) {
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* Programmatic focus on the step heading is for screen readers; no ring. */
#section-title:focus, #done h1:focus { outline: none; }
