/* DARK MODE IS OFF: the app looks the same on every device, whatever its light/dark setting. The dark styles are kept
   below under a media query that never matches ('(prefers-color-scheme: dark) and (max-width: 0px)'); to bring dark mode back, put
   '(prefers-color-scheme: dark)' back in place of it, and link look-dark.css again in index.html and demo/build_demo.py. */
/* Viñas & DeLuca — Online Client Intake
   Brand: navy #0A1430, gold #C18A48, white; Montserrat (per the firm logo kit, Oct 2026).
   Layout: flat navy masthead with the full logo → step rail → white form sheet → sticky action bar.
   Everything is scoped under .vdi so the host WordPress theme is not affected. */
.vdi {
  --navy: #0A1430;
  --navy-2: #1a2649;
  --gold: #C18A48;
  --gold-deep: #94652d;
  --gold-wash: #f8f1e7;
  --ink: #0f1830;
  --muted: #576079;
  --line: #d9dce6;
  --wash: #f2f3f7;
  --paper: #ffffff;
  --focus: rgba(193, 138, 72, .38);
  --err: #b3261e;
  --err-wash: #fdeceb;
  --ok: #2c6e49;
  --f-brand: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --r: 6px;
  color-scheme: light;
  font-family: var(--f-brand);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--wash);
  border-radius: 10px;
  overflow: hidden;
  max-width: 880px;
  margin: 0 auto;
  box-shadow: 0 1px 2px rgba(10, 20, 48, .06), 0 12px 40px -16px rgba(10, 20, 48, .28);
}
.vdi *, .vdi *::before, .vdi *::after { box-sizing: border-box; }
.vdi [hidden] { display: none !important; }

/* Masthead */
.vdi-mast {
  background: var(--navy);
  color: #fff;
  padding: 22px 28px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--gold);
}
.vdi-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.vdi-brand img { height: 60px; width: auto; max-width: 100%; display: block; }
.vdi-word { display: flex; flex-direction: column; line-height: 1.1; }
.vdi-word b { font-weight: 400; font-size: 22px; letter-spacing: .16em; color: #fff; }
.vdi-word span { font-weight: 500; font-size: 10.5px; letter-spacing: .42em; color: var(--gold); margin-top: 6px; }
.vdi-mast-r { text-align: right; }
.vdi-mast-r .vdi-eyebrow { color: var(--gold); }
.vdi-mast-r a, .vdi-mast-r strong { color: #fff; text-decoration: none; font-size: 20px; font-weight: 500; letter-spacing: .06em; }
.vdi-eyebrow { font-family: var(--f-brand); text-transform: uppercase; letter-spacing: .24em; font-size: 11px; font-weight: 500; color: var(--gold-deep); }

/* Step rail */
.vdi-rail { list-style: none; margin: 0; padding: 0 28px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; background: var(--paper); border-bottom: 1px solid var(--line); }
.vdi-rail li { padding: 14px 0 12px; border-bottom: 3px solid transparent; margin-bottom: -1px; min-width: 0; }
.vdi-rail .n { font-family: var(--f-brand); font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .1em; }
.vdi-rail .t { display: block; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vdi-rail li.on { border-color: var(--gold); }
.vdi-rail li.on .t, .vdi-rail li.on .n { color: var(--navy); }
.vdi-rail li.done .t { color: var(--ink); }
.vdi-rail li.done .n { color: var(--gold-deep); }

/* Sheet */
.vdi-sheet { background: var(--paper); padding: 30px 28px 8px; }
.vdi-step-h { margin: 0 0 6px; font-family: var(--f-brand); font-weight: 600; font-size: 27px; letter-spacing: -.01em; line-height: 1.15; color: var(--navy); text-wrap: balance; }
.vdi-step-lead { margin: 0 0 22px; color: var(--muted); max-width: 62ch; }
.vdi-sec { border-top: 1px solid var(--line); padding: 22px 0 6px; }
.vdi-step + .vdi-step { margin-top: 30px; padding-top: 30px; border-top: 3px solid var(--navy); }
.vdi-step > .vdi-step-h::before { content: attr(data-n); display: block; font-size: 11px; font-weight: 600; letter-spacing: .24em; color: var(--gold-deep); margin-bottom: 6px; }
.vdi-alert { margin-top: 18px; }
.vdi-sec:first-of-type { border-top: 0; padding-top: 6px; }
.vdi-sec-h { margin: 0 0 4px; font-family: var(--f-brand); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; font-size: 13.5px; letter-spacing: .18em; font-weight: 600; color: var(--navy); }
.vdi-sec-lead { margin: 0 0 14px; color: var(--muted); font-size: 15px; max-width: 64ch; }
.vdi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 18px; padding-top: 8px; }
.vdi-f { grid-column: span 6; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.vdi-f.w3 { grid-column: span 3; }
.vdi-f.w2 { grid-column: span 2; }
.vdi-f.w4 { grid-column: span 4; }
.vdi-lab { font-weight: 600; font-size: 15px; color: var(--ink); }
.vdi-lab .req { color: var(--gold-deep); margin-left: 3px; }
.vdi-help { font-size: 13.5px; color: var(--muted); margin-top: -2px; }
.vdi-note { grid-column: span 6; background: var(--gold-wash); border-left: 3px solid var(--gold); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; font-size: 14.5px; color: var(--ink); }

.vdi input[type=text], .vdi input[type=email], .vdi input[type=tel], .vdi input[type=date], .vdi input[type=number], .vdi select, .vdi textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper);
  border: 1px solid #c8ccd9; border-radius: var(--r); padding: 10px 12px; min-height: 44px; margin: 0;
  transition: border-color .15s, box-shadow .15s;
}
.vdi textarea { min-height: 112px; resize: vertical; line-height: 1.45; }
.vdi select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.vdi input:focus, .vdi select:focus, .vdi textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--focus); }
.vdi .vdi-money { position: relative; }
.vdi .vdi-money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.vdi .vdi-money input { padding-left: 26px; }
.vdi-inline { display: flex; gap: 10px; }
.vdi-inline > * { min-width: 0; }

/* Choice controls */
.vdi-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.vdi-opt { position: relative; display: inline-flex; }
.vdi-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.vdi-opt span { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border: 1px solid #c8ccd9; border-radius: 999px; background: var(--paper); font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; user-select: none; transition: background .12s, border-color .12s, color .12s; }
.vdi-opt:hover span { border-color: var(--navy); }
.vdi-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus); }
.vdi-opt input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.vdi-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.vdi-checks .vdi-opt span { border-radius: var(--r); width: 100%; justify-content: flex-start; }
.vdi-checks .vdi-opt span::before { content: ""; flex: none; width: 16px; height: 16px; border: 1.5px solid #9aa1b6; border-radius: 3px; background: var(--paper); }
.vdi-checks .vdi-opt { display: flex; }
.vdi-checks .vdi-opt input:checked + span { background: var(--gold-wash); border-color: var(--gold); color: var(--ink); }
.vdi-checks .vdi-opt input:checked + span::before { background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--navy); }
.vdi-stack { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.vdi-stack .vdi-opt span { border-radius: var(--r); }

/* Case-type tiles */
.vdi-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.vdi-tile { position: relative; display: flex; }
.vdi-tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.vdi-tile .box { flex: 1; display: grid; grid-template-columns: 38px 1fr; gap: 4px 12px; align-items: start; padding: 14px; border: 1px solid #c8ccd9; border-radius: 8px; background: var(--paper); transition: border-color .15s, background .15s, box-shadow .15s; }
.vdi-tile svg { grid-row: span 2; width: 38px; height: 38px; padding: 7px; border-radius: 8px; background: var(--wash); color: var(--navy); stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vdi-tile b { font-weight: 600; font-size: 15.5px; line-height: 1.25; color: var(--ink); }
.vdi-tile small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.vdi-tile:hover .box { border-color: var(--navy); }
.vdi-tile input:focus-visible + .box { box-shadow: 0 0 0 3px var(--focus); }
.vdi-tile input:checked + .box { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 -3px 0 var(--gold); }
.vdi-tile input:checked + .box b { color: #fff; }
.vdi-tile input:checked + .box small { color: #c3c9da; }
.vdi-tile input:checked + .box svg { background: var(--gold); color: var(--navy); }

/* Repeaters */
.vdi-rep { display: flex; flex-direction: column; gap: 12px; }
.vdi-rep-row { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 14px; background: #fafbfd; }
.vdi-rep-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.vdi-rep-top .vdi-eyebrow { font-size: 11px; }
.vdi-rep-row .vdi-grid { gap: 12px 14px; padding-top: 4px; }
.vdi-link { background: none; border: 0; padding: 4px 2px; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }
.vdi-link:hover { text-decoration: underline; }
.vdi-link.rm { color: var(--muted); font-weight: 500; font-size: 13px; }
.vdi-add { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; border: 1px dashed #a8aec2; border-radius: var(--r); padding: 9px 14px; background: transparent; color: var(--navy); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.vdi-add:hover { border-color: var(--navy); background: var(--wash); }

/* Single checkbox (consents) */
.vdi-consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.vdi-consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); }

/* Errors */
.vdi-f.bad input, .vdi-f.bad select, .vdi-f.bad textarea, .vdi-f.bad .vdi-opt span, .vdi-f.bad .box { border-color: var(--err); }
.vdi-err { font-size: 13.5px; color: var(--err); font-weight: 500; }
.vdi-alert { margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r); background: var(--err-wash); color: var(--err); font-weight: 500; }

/* Action bar */
.vdi-bar { position: static; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
.vdi-bar .meta { font-size: 13px; color: var(--muted); }
.vdi-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 24px; border-radius: var(--r); font-family: var(--f-brand); font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; border: 1px solid var(--navy); transition: background .15s, color .15s; }
.vdi-btn.pri { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.vdi-btn.pri:hover { background: var(--navy-2); }
.vdi-btn.sec { background: transparent; color: var(--navy); }
.vdi-btn.sec:hover { background: var(--wash); }
.vdi-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vdi-btn[disabled] { opacity: .6; cursor: progress; }

.vdi-fine { padding: 14px 28px 20px; font-size: 12.5px; color: var(--muted); background: var(--paper); border-top: 1px solid var(--line); }
.vdi-fine p { margin: 0 0 6px; max-width: 90ch; }

/* Done screen */
.vdi-done { padding: 44px 28px 40px; background: var(--paper); }
.vdi-done .seal { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--gold); margin-bottom: 16px; }
.vdi-done h2 { margin: 0 0 8px; font-family: var(--f-brand); font-weight: 600; font-size: 27px; color: var(--navy); }
.vdi-done p { margin: 0 0 10px; max-width: 60ch; color: var(--ink); }
.vdi-ref { font-weight: 600; letter-spacing: .12em; color: var(--gold-deep); }

.vdi-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .vdi { border-radius: 0; }
  .vdi-mast, .vdi-sheet, .vdi-bar, .vdi-fine, .vdi-done { padding-left: 18px; padding-right: 18px; }
  .vdi-rail { padding: 0 18px; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .vdi-rail .t { display: none; }
  .vdi-rail li { text-align: center; }
  .vdi-rail li.on .t { display: none; }
  .vdi-f.w3, .vdi-f.w2, .vdi-f.w4 { grid-column: span 6; }
  .vdi-step-h { font-size: 25px; }
  .vdi-mast-r { text-align: left; }
  .vdi-brand img { height: 46px; }
  .vdi-word b { font-size: 18px; }
  .vdi-btn { padding: 0 16px; }
  .vdi-bar .meta { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vdi * { transition: none !important; } }

/* Keyboard focus for one-stop-per-question groups */
.vdi-seg:focus-visible, .vdi-stack:focus-visible, .vdi-tiles:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; border-radius: 10px; }
.vdi-seg:focus, .vdi-stack:focus, .vdi-tiles:focus { outline-offset: 5px; }
.vdi-checks .vdi-opt span:focus-visible, .vdi-consent:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.vdi-f { scroll-margin-top: 120px; scroll-margin-bottom: 40px; }

/* Roomier repeating entries (providers, witnesses, family) */
.vdi-rep { gap: 18px; }
.vdi-rep-row { padding: 16px 18px 20px; }
.vdi-rep-row .vdi-grid { gap: 16px 18px; }

/* Phones: compact case-type cards (two per row, title only) and short fields two per row */
@media (max-width: 640px) {
  .vdi-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vdi-tile b { overflow-wrap: anywhere; hyphens: auto; }
  .vdi-tile .box { grid-template-columns: 30px 1fr; gap: 0 10px; padding: 12px 10px; align-items: center; min-height: 64px; }
  .vdi-tile svg { grid-row: auto; width: 30px; height: 30px; padding: 5px; }
  .vdi-tile b { font-size: 14.5px; }
  .vdi-tile small { display: none; }
  .vdi-f.w2 { grid-column: span 3; }
}

/* Language switch (English / Español) */
.vdi-langbar { display: flex; justify-content: flex-end; margin: -10px 0 14px; }
.vdi-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--wash); }
.vdi-lang button { font: inherit; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: 7px 16px; min-height: 36px; cursor: pointer; }
.vdi-lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.vdi-lang button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Photo & document uploads */
.vdi-file { position: absolute !important; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.vdi-ups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; position: relative; }
.vdi-ups.multi { grid-template-columns: 1fr; }
.vdi-ups.busy::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23C18A48' stroke-width='2.5' stroke-dasharray='40 20'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.9s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center/32px no-repeat; border-radius: 8px; }
.vdi-up-slot { min-width: 0; }
.vdi-up { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 72px; padding: 12px 14px; border: 1.5px dashed #b9bfd0; border-radius: 8px; background: #fafbfd; cursor: pointer; transition: border-color .15s, background .15s; }
.vdi-up:hover { border-color: var(--navy); background: var(--paper); }
.vdi-up:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vdi-up.has { border-style: solid; border-color: var(--line); background: var(--paper); cursor: default; }
.vdi-up-ic { width: 44px; height: 44px; border-radius: 8px; background: var(--wash); display: grid; place-items: center; }
.vdi-up-ic svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vdi-up-t { display: flex; flex-direction: column; min-width: 0; }
.vdi-up-t b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.vdi-up-t small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vdi-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.vdi-thumb.file { display: grid; place-items: center; background: var(--navy); color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.vdi-up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.vdi-up-item { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vdi-up-item .vdi-thumb { width: 100%; height: 96px; }
.vdi-up-item small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vdi-up-x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(10, 20, 48, .82); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.vdi-up-x:focus-visible { outline: 3px solid var(--focus); }
.vdi-up-add { grid-column: span 2; min-height: 96px; }
.vdi-up-add .vdi-up-t small { white-space: normal; }
.vdi-up-msg[hidden] { display: none; }
@media (max-width: 640px) {
  .vdi-ups { grid-template-columns: 1fr; }
  .vdi-up-add { grid-column: 1 / -1; }
  .vdi-up-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* "Welcome back" note when saved answers are restored */
.vdi-resume { margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r); background: var(--gold-wash); border-left: 3px solid var(--gold); font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.vdi-resume .vdi-link { white-space: nowrap; }
/* full-quality uploads: progress while the photos and videos go up */
.vdi-upbar { --p: 0%; margin: 0 0 10px; padding: 10px 12px 14px; border-radius: 10px; background: #f3f5fa; font-size: 14px; color: #3b4559; position: relative; overflow: hidden; }
.vdi-upbar::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p); background: #c18a48; transition: width .3s; }

/* a calendar button beside typed dates (MM/DD/YYYY) */
.vd-datew { display: flex; gap: 6px; align-items: stretch; width: 100%; }
.vd-datew > input:first-child { flex: 1 1 auto; min-width: 0; }
.vd-cal { position: relative; flex: 0 0 42px; display: grid; place-items: center; border: 1px solid rgba(90, 79, 216, .35); border-radius: 10px; background: #fff; color: #4b3fd0; cursor: pointer; }
.vd-cal:hover { border-color: #4b3fd0; background: #f4f2fe; }
.vd-cal svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.vd-cal input[type=date] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.vd-cal input[type=date]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
label.f .vd-datew { margin-top: 5px; } label.f .vd-datew > input { margin-top: 0 !important; }
@media (prefers-color-scheme: dark) and (max-width: 0px) { body.th-glass .vd-cal { background: #23204a; color: #b3abff; border-color: rgba(160, 150, 255, .3); } }
.vd-datew > input:first-child { padding-left: 11px !important; padding-right: 6px !important; letter-spacing: -.01em; }
