/* app.css — public AI Usage Survey styling. Advantage-branded (navy #22315F),
   card-based layout, accessible form controls, responsive Likert + star widgets. */

:root {
  --navy: #22315f;
  --navy-dark: #1a2649;
  --ink: #1f2430;
  --muted: #5c6672;
  --line: #e2e6ec;
  --bg: #f4f6f9;
  --card: #ffffff;
  --accent: #2f66d0;
  --error: #c0392b;
  --error-bg: #fdecea;
  --star: #f2b705;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(17, 24, 39, .08), 0 1px 2px rgba(17, 24, 39, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* Header / footer */
.site-header { background: var(--navy); color: #fff; }
.header-inner { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.logo { height: 40px; width: auto; display: block; background: #fff; padding: 4px 8px; border-radius: 6px; }
.brand-tag { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.site-footer { color: var(--muted); font-size: 13px; text-align: center; padding: 28px 0 40px; }

/* Cards */
main { padding: 24px 0 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.intro h1 { margin: 0 0 8px; color: var(--navy); font-size: 26px; }
.lead { margin: 0 0 12px; color: var(--muted); }
.req-note { margin: 0; font-size: 13px; color: var(--muted); }
.section h2 { margin: 0 0 4px; color: var(--navy); font-size: 20px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.section-intro { margin: 6px 0 18px; color: var(--muted); font-size: 14px; }

/* Questions */
.q-wrap + .q-wrap { margin-top: 4px; }
.q, fieldset.q { border: 0; margin: 0 0 20px; padding: 0; }
fieldset.q { min-width: 0; }
.q-label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
legend.q-label { padding: 0; }
.req { color: var(--error); }
.q-help { margin: 0 0 8px; font-size: 13px; color: var(--muted); }

.q-input, .q-select, .q-textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 10px 12px; border: 1px solid #c8cfdb; border-radius: 8px; background: #fff;
}
.q-textarea { resize: vertical; }
.q-input:focus, .q-select:focus, .q-textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 102, 208, .18);
}
.other-text { margin-top: 10px; }
.other-text[hidden] { display: none; }

/* Checkbox / radio option lists */
.opts { display: grid; gap: 8px; }
@media (min-width: 560px) { .opts { grid-template-columns: 1fr 1fr; } }
.opt { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.opt:hover { border-color: #c8cfdb; background: #fbfcfe; }
.opt input { margin-top: 3px; flex: none; }

/* Likert matrix */
.likert-scroll { overflow-x: auto; }
.likert-table { border-collapse: collapse; width: 100%; min-width: 460px; }
.likert-table th, .likert-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.likert-table thead th { font-size: 12px; color: var(--muted); font-weight: 600; vertical-align: bottom; }
.likert-row-label { text-align: left; font-weight: 500; min-width: 190px; }
.likert-cell { display: inline-flex; padding: 6px; cursor: pointer; }

/* Star rating */
.stars { display: inline-flex; gap: 4px; }
.star { cursor: pointer; line-height: 1; }
.star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-glyph { font-size: 30px; color: #d5dbe6; transition: color .08s; }
.star input:focus-visible + .star-glyph { outline: 2px solid var(--accent); border-radius: 4px; }
.star input:checked + .star-glyph,
.star.filled .star-glyph { color: var(--star); }
.rating-ends { display: flex; justify-content: space-between; max-width: 210px; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* Errors */
.has-error .q-input, .has-error .q-select, .has-error .q-textarea { border-color: var(--error); }
.has-error .q-label, .has-error legend.q-label { color: var(--error); }
.q-error { margin: 8px 0 0; color: var(--error); font-size: 13px; font-weight: 500; }
.form-error-summary { background: var(--error-bg); border: 1px solid #f5c6cb; color: var(--error); padding: 14px 16px; border-radius: 8px; margin-bottom: 18px; }

/* Submit */
.submit-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.btn-primary {
  font: inherit; font-weight: 600; color: #fff; background: var(--navy);
  border: 0; border-radius: 8px; padding: 13px 26px; cursor: pointer;
}
.btn-primary:hover { background: var(--navy-dark); }
.btn-primary:focus-visible { outline: 3px solid rgba(47, 102, 208, .5); outline-offset: 2px; }
.privacy-note { margin: 0; font-size: 13px; color: var(--muted); }

/* Honeypot + screen-reader-only */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Thank-you page */
.thanks { text-align: center; padding: 40px 22px; }
.thanks .check { width: 64px; height: 64px; border-radius: 50%; background: #e7f6ec; color: #1e7e46; display: inline-flex; align-items: center; justify-content: center; font-size: 34px; margin-bottom: 12px; }
.thanks h1 { color: var(--navy); margin: 0 0 8px; }
.thanks p { color: var(--muted); margin: 0 auto; max-width: 460px; }
