/* ==========================================================================
   defense-survey.com — Defense Organizational Climate Assessment (DOCA)
   Shared stylesheet
   ========================================================================== */

:root {
  --navy-900: #0b1c2c;
  --navy-800: #12293d;
  --navy-700: #1b3c56;
  --navy-600: #24506f;
  --navy-500: #2f6690;
  --accent:   #b8860b;
  --accent-lt:#d4a72c;
  --ink:      #1a2129;
  --ink-soft: #4a5560;
  --ink-mute: #6b7783;
  --line:     #d9dfe5;
  --line-lt:  #e9edf1;
  --bg:       #ffffff;
  --bg-alt:   #f4f6f8;
  --bg-tint:  #eef2f6;
  --ok:       #2d6a4f;
  --ok-bg:    #e7f3ec;
  --warn:     #8a5a00;
  --warn-bg:  #fdf4e3;
  --err:      #9b2226;
  --err-bg:   #fbeaea;
  --radius:   6px;
  --shadow:   0 1px 3px rgba(11, 28, 44, .10), 0 6px 20px rgba(11, 28, 44, .06);
  --shadow-sm:0 1px 2px rgba(11, 28, 44, .08);
  --wrap:     1140px;
  --font:     "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--navy-600); }
a:hover { color: var(--navy-800); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--navy-900); margin: 0 0 .5em; }
h1 { font-size: 2.25rem; letter-spacing: -.015em; }
h2 { font-size: 1.6rem; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 10px 18px; font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Notice bar ---------- */
.notice-bar {
  background: var(--navy-900);
  color: #cfd9e2;
  font-size: .8125rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.notice-bar .wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.notice-bar strong { color: #fff; }
.notice-bar .dot { color: var(--accent-lt); }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy-800);
  border-bottom: 4px solid var(--accent);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark {
  width: 46px; height: 46px; flex: 0 0 46px;
  display: grid; place-items: center;
  border: 2px solid var(--accent); border-radius: 50%;
  color: var(--accent-lt); font-weight: 700; font-size: .95rem; letter-spacing: .04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { color: #fff; font-size: 1.2rem; font-weight: 700; letter-spacing: .01em; }
.brand-sub  { color: #9db2c6; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid #46617c;
  color: #fff; padding: 8px 12px; border-radius: var(--radius);
  font-size: .9rem; cursor: pointer;
}

.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 9px 14px; color: #dbe4ec; text-decoration: none;
  font-size: .93rem; font-weight: 500; border-radius: var(--radius);
}
.site-nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.site-nav a[aria-current="page"] { background: var(--navy-600); color: #fff; }
.site-nav .nav-cta {
  background: var(--accent); color: var(--navy-900); font-weight: 700; margin-left: 8px;
}
.site-nav .nav-cta:hover { background: var(--accent-lt); color: var(--navy-900); }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(11,28,44,.94), rgba(27,60,86,.88)),
    repeating-linear-gradient(45deg, #12293d 0 18px, #16324a 18px 36px);
  color: #eaf0f5; padding: 68px 0 60px;
}
.hero h1 { color: #fff; max-width: 20ch; }
.hero .lede { font-size: 1.14rem; color: #c8d5e0; max-width: 62ch; }
.eyebrow {
  display: inline-block; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-lt); font-weight: 700; margin-bottom: 14px;
  border-left: 3px solid var(--accent); padding-left: 10px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: var(--radius);
  font-size: .97rem; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; font-family: inherit; transition: background .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--navy-900); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-lt); border-color: var(--accent-lt); color: var(--navy-900); }
.btn-ghost { background: transparent; color: #fff; border-color: #6d8299; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-secondary { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.btn-secondary:hover { background: var(--navy-800); color: #fff; }
.btn-outline { background: #fff; color: var(--navy-700); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy-600); color: var(--navy-800); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: .875rem; }

/* Outbound link marker */
.ext::after {
  content: "\2197"; display: inline-block; margin-left: .35em;
  font-size: .85em; line-height: 1; vertical-align: baseline;
}

/* ---------- Sections ---------- */
.section { padding: 62px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line-lt); border-bottom: 1px solid var(--line-lt); }
.section-head { max-width: 70ch; margin-bottom: 34px; }
.section-head p { color: var(--ink-soft); font-size: 1.03rem; }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); font-size: .95rem; }
.card-num {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-700); color: #fff; font-weight: 700; font-size: .95rem; margin-bottom: 14px;
}
.card-icon {
  width: 42px; height: 42px; border-radius: var(--radius); margin-bottom: 14px;
  background: var(--bg-tint); color: var(--navy-600);
  display: grid; place-items: center; font-size: 1.25rem; font-weight: 700;
}

/* ---------- Stats ---------- */
.stat-strip { background: var(--navy-800); color: #fff; padding: 40px 0; }
.stat-strip .grid-4 { gap: 18px; }
.stat { text-align: center; padding: 8px; }
.stat-num { font-size: 2.1rem; font-weight: 700; color: var(--accent-lt); line-height: 1.1; }
.stat-lbl { font-size: .86rem; color: #b9c8d6; margin-top: 4px; }

/* ---------- Factor list ---------- */
.factor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.factor-list li {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--navy-500);
  border-radius: var(--radius); padding: 14px 18px; font-size: .95rem;
}
.factor-list strong { display: block; color: var(--navy-800); }
.factor-list span { color: var(--ink-mute); font-size: .89rem; }

/* ---------- Callout ---------- */
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  background: var(--warn-bg); border-radius: var(--radius); padding: 18px 20px; margin: 26px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout h3 { font-size: 1rem; margin-bottom: .35em; }
.callout-info { background: var(--bg-tint); border-left-color: var(--navy-500); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 22px 0; }
table.data { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .93rem; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--navy-800); color: #fff; font-weight: 600; border-bottom: none; }
table.data tbody tr:nth-child(even) { background: var(--bg-alt); }

/* ---------- Accordion ---------- */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: #fff;
}
.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 600; color: var(--navy-800);
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--navy-500); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-bottom: 1px solid var(--line-lt); }
.faq .faq-body { padding: 15px 18px; color: var(--ink-soft); font-size: .95rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; position: relative; padding-left: 56px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-700); color: #fff; font-weight: 700;
}
.steps h3 { margin-bottom: .25em; }
.steps p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: #fff; padding: 52px 0; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #c5d2de; max-width: 60ch; margin: 0 auto 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #a9bacb; font-size: .9rem; padding: 46px 0 26px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #a9bacb; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-bottom {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .84rem; color: #8ba0b4;
}

/* ---------- Page header (interior) ---------- */
.page-head {
  background: var(--navy-800); color: #fff; padding: 44px 0 38px; border-bottom: 4px solid var(--accent);
}
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: #c2d0dc; max-width: 66ch; margin-bottom: 0; }
.breadcrumb { font-size: .84rem; color: #93a8bb; margin-bottom: 12px; }
.breadcrumb a { color: #93a8bb; text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* ==========================================================================
   Survey instrument
   ========================================================================== */

.survey-shell { background: var(--bg-alt); padding: 34px 0 70px; min-height: 60vh; }
.survey-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 880px; margin: 0 auto;
}
.survey-card-body { padding: 30px 34px 34px; }

/* Progress */
.progress-head { padding: 20px 34px 0; }
.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: .85rem; color: var(--ink-mute); margin-bottom: 8px; flex-wrap: wrap;
}
.progress-meta strong { color: var(--navy-800); font-size: .95rem; }
.progress-track { height: 8px; background: var(--line-lt); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 99px; transition: width .3s ease; }

.step-dots { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 34px 0; }
.step-dot {
  font-size: .74rem; padding: 4px 9px; border-radius: 99px; background: var(--bg-tint);
  color: var(--ink-mute); border: 1px solid transparent; white-space: nowrap;
}
.step-dot.is-active { background: var(--navy-700); color: #fff; }
.step-dot.is-done { background: var(--ok-bg); color: var(--ok); border-color: #bfdccb; }

/* Section intro */
.sec-title { border-bottom: 2px solid var(--line-lt); padding-bottom: 12px; margin-bottom: 8px; }
.sec-title h2 { margin-bottom: .2em; font-size: 1.42rem; }
.sec-desc { color: var(--ink-soft); font-size: .96rem; margin-bottom: 24px; }
.scale-hint {
  background: var(--bg-tint); border-radius: var(--radius); padding: 10px 14px;
  font-size: .86rem; color: var(--ink-soft); margin-bottom: 22px;
}

/* Question block */
.q { padding: 20px 0; border-bottom: 1px solid var(--line-lt); }
.q:last-of-type { border-bottom: none; }
.q-head { display: flex; gap: 12px; margin-bottom: 14px; }
.q-num {
  flex: 0 0 auto; font-size: .78rem; font-weight: 700; color: var(--navy-500);
  background: var(--bg-tint); border-radius: 4px; padding: 2px 7px; height: fit-content; margin-top: 2px;
}
.q-text { font-size: 1rem; color: var(--ink); font-weight: 500; margin: 0; }
.q-req { color: var(--err); margin-left: 3px; }
.q-note { display: block; font-size: .86rem; color: var(--ink-mute); font-weight: 400; margin-top: 4px; }
.q.is-invalid { background: var(--err-bg); border-radius: var(--radius); padding-left: 14px; padding-right: 14px; }
.q-error { color: var(--err); font-size: .85rem; font-weight: 600; margin-top: 8px; display: none; }
.q.is-invalid .q-error { display: block; }

/* Likert scale */
.likert { display: grid; gap: 6px; }
.likert.cols-6 { grid-template-columns: repeat(6, 1fr); }
.likert.cols-5 { grid-template-columns: repeat(5, 1fr); }
.likert.cols-4 { grid-template-columns: repeat(4, 1fr); }
.likert.cols-3 { grid-template-columns: repeat(3, 1fr); }
.likert.cols-2 { grid-template-columns: repeat(2, 1fr); }
.likert label {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px;
  text-align: center; padding: 12px 8px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .82rem; color: var(--ink-soft); cursor: pointer; background: #fff; line-height: 1.3;
  transition: border-color .12s, background .12s;
}
.likert label:hover { border-color: var(--navy-500); background: var(--bg-alt); }
.likert input { margin: 0; accent-color: var(--navy-600); width: 17px; height: 17px; }
.likert input:focus-visible { outline: 2px solid var(--navy-500); outline-offset: 3px; }
.likert label:has(input:checked) {
  border-color: var(--navy-600); background: var(--bg-tint); color: var(--navy-800); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--navy-600);
}

/* Stacked choice list */
.choices { display: grid; gap: 8px; }
.choices label {
  display: flex; align-items: flex-start; gap: 11px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  font-size: .94rem; color: var(--ink); background: #fff; transition: border-color .12s, background .12s;
}
.choices label:hover { border-color: var(--navy-500); background: var(--bg-alt); }
.choices input { margin: 3px 0 0; accent-color: var(--navy-600); width: 17px; height: 17px; flex: 0 0 auto; }
.choices label:has(input:checked) { border-color: var(--navy-600); background: var(--bg-tint); font-weight: 500; }
.choices.two-col { grid-template-columns: 1fr 1fr; }

/* Text inputs */
.field-label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; color: var(--navy-800); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(47,102,144,.16);
}
textarea { min-height: 120px; resize: vertical; }
.char-count { font-size: .8rem; color: var(--ink-mute); text-align: right; margin-top: 5px; }

/* Nav */
.survey-nav {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 20px 34px; border-top: 1px solid var(--line-lt); background: var(--bg-alt); flex-wrap: wrap;
  border-radius: 0 0 var(--radius) var(--radius);
}
.survey-nav-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.save-state { font-size: .82rem; color: var(--ink-mute); }
.save-state.is-saved { color: var(--ok); }

.form-alert {
  display: none; margin-bottom: 20px; padding: 13px 16px; border-radius: var(--radius);
  background: var(--err-bg); border: 1px solid #e6bcbc; color: var(--err); font-size: .92rem; font-weight: 500;
}
.form-alert.is-shown { display: block; }

/* Landing / done panels */
.panel-center { text-align: center; padding: 46px 34px; }
.panel-center .big-check {
  width: 66px; height: 66px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 2rem;
}
.summary-list { text-align: left; max-width: 520px; margin: 24px auto 0; display: grid; gap: 8px; }
.summary-row {
  display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px;
  background: var(--bg-alt); border-radius: var(--radius); font-size: .92rem;
}
.summary-row span:last-child { font-weight: 600; color: var(--navy-800); }

.consent-box {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt);
  padding: 18px 20px; margin: 22px 0; text-align: left; font-size: .92rem; color: var(--ink-soft);
}
.consent-box ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 99px; background: var(--bg-tint); color: var(--navy-700);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }

.muted { color: var(--ink-mute); font-size: .88rem; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  h1 { font-size: 1.8rem; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; width: 100%; padding-bottom: 12px; }
  .site-nav .nav-cta { margin-left: 0; text-align: center; }
  .likert.cols-6, .likert.cols-5, .likert.cols-4, .likert.cols-3 { grid-template-columns: 1fr; }
  .likert label { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 11px 14px; }
  .choices.two-col { grid-template-columns: 1fr; }
  .survey-card-body { padding: 22px 18px 26px; }
  .progress-head, .step-dots, .survey-nav { padding-left: 18px; padding-right: 18px; }
  .survey-nav { flex-direction: column-reverse; align-items: stretch; }
  .survey-nav .btn { width: 100%; text-align: center; }
  .survey-nav-right { flex-direction: column-reverse; align-items: stretch; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}
@media print {
  .site-header, .site-footer, .notice-bar, .survey-nav, .step-dots, .hero-actions { display: none !important; }
  body { background: #fff; }
}
