:root {
  /* Light only: the form sits inside your (light) website, and the logo's black "J" needs a light background. */
  color-scheme: light;
  --bg: #ffffff;
  --card: #ffffff;
  --text: #1b1f24;
  --muted: #5b6470;
  --line: #d5dae1;
  --brand: #1e27a8;       /* JPro blue, sampled from the logo */
  --brand-dark: #161d80;
  --focus: #1e27a8;
  --accent: #1e27a8;
  --accent-text: #ffffff;
  --error: #b42318;
  --error-bg: #fef3f2;
  --field-bg: #ffffff;
  --readonly-bg: #f3f5f8;
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 4px; }
.lede { margin: 0 0 20px; font-size: 1.05rem; }
.lede .hint { display: inline-block; margin-top: 2px; }

.brand {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 4px 0 16px; margin-bottom: 20px; border-bottom: 3px solid var(--brand);
}
.brand .logo { display: block; flex: none; }
.brand .logo img { display: block; height: 60px; width: auto; }
.contact { font-style: normal; text-align: right; font-size: .9rem; line-height: 1.45; color: var(--muted); }
.contact a { color: var(--brand); text-decoration: none; font-weight: 500; }
.contact a:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .brand { flex-direction: column; align-items: flex-start; gap: 10px; }
  .brand .logo img { height: 48px; }
  .contact { text-align: left; }
}
.req { color: var(--error); }

fieldset { border: 0; border-top: 1px solid var(--line); margin: 0 0 12px; padding: 20px 0 4px; }
legend { font-weight: 600; font-size: 1.05rem; padding: 0 0 8px; }

.field { margin-bottom: 14px; min-width: 0; }
label, .label { display: block; font-weight: 500; margin-bottom: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) {
  .row, .row.three { grid-template-columns: 1fr; gap: 0; }
}

input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 44px;
}
textarea { resize: vertical; }
input[readonly] { background: var(--readonly-bg); color: var(--muted); }
select:disabled { opacity: .6; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .dropzone:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.filter { margin-bottom: 6px; min-height: 38px; padding: 6px 10px; font-size: .95rem; }
[aria-invalid="true"] { border-color: var(--error); }

.hint { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
.error { color: var(--error); font-size: .9rem; margin: 4px 0 0; }
.error:empty { display: none; }
.banner { padding: 10px 12px; border-radius: var(--radius); margin: 0 0 16px; }
.error-banner { background: var(--error-bg); color: var(--error); }

.choice { display: flex; gap: 20px; }
.choice label { display: flex; align-items: center; gap: 8px; font-weight: 400; min-height: 44px; margin: 0; }
.choice input { width: 20px; height: 20px; min-height: 0; margin: 0; }

.details { margin-bottom: 4px; }

.dropzone {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  min-height: 64px; cursor: pointer; color: var(--accent); font-weight: 600;
  margin-top: 6px;
}
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.thumbs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumbs li { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--readonly-bg); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .noimg { display: flex; align-items: center; justify-content: center; height: 100%; padding: 6px; font-size: .75rem; color: var(--muted); text-align: center; word-break: break-all; }
.thumbs button {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}

.btn {
  font: inherit; font-weight: 600; border-radius: var(--radius); padding: 12px 20px; min-height: 44px;
  border: 1px solid var(--line); background: var(--field-bg); color: var(--text); cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); width: 100%; margin-top: 8px; }
.btn.primary:hover:not([disabled]) { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn[disabled] { opacity: .6; cursor: progress; }
.ref { font-size: 1.1rem; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
