/* Condon Acres Results Portal — shared styles.
   Palette + signature components per SPEC §6 and the concept mockups. */

:root {
  --oat: #F5F2E7;        /* feed-sack paper */
  --card: #FDFBF3;       /* card surface */
  --pine: #2E4B3C;       /* farm-gate green */
  --pine-deep: #223A2D;
  --barn: #9E3B2F;       /* barn red */
  --ink: #242A20;
  --muted: #6E7361;
  --line: #DCD6C1;
  --sage: #EBEBDC;
  --f: #A85472;  --f-bg: #F7E7EE;   /* female */
  --m: #3A6B8C;  --m-bg: #E4EEF5;   /* male   */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--oat);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: Georgia, "Times New Roman", serif; }
.mono  { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
a { color: var(--barn); }

/* ---------- top nav ---------- */
.pnav {
  background: var(--pine);
  color: #F4F0E2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px;
}
.wordmark {
  font-family: Georgia, serif;
  font-size: 17px;
  letter-spacing: .02em;
  color: #F4F0E2;
  text-decoration: none;
}
.wordmark small {
  display: block;
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .72;
  margin-top: 2px;
}
.whoami { font-size: 12px; opacity: .85; }
.whoami a { color: inherit; }

main.wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 16px 48px;
  flex: 1;
}

/* ---------- type ---------- */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--barn);
}
.hello { font-family: Georgia, serif; font-size: 21px; font-weight: 400; color: var(--pine-deep); margin-top: 6px; }
.hello-sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 16px; }
.sec-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pine);
  margin: 2px 0 9px;
}
.copy { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 6px 0 14px; }

/* ---------- cards & lists ---------- */
.order-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #FBF8EC;
  padding: 14px 15px;
  margin-bottom: 18px;
}
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.order-head .id { font-size: 13px; font-weight: 700; }
.order-head .meta { font-size: 11px; color: var(--muted); }

.rows { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--card); }
.row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-top: 1px solid var(--line); }
.row:first-child { border-top: none; }
.row .who { flex: 1; min-width: 0; }
.row .who b { font-size: 13.5px; display: block; }
.row .who i { font-style: normal; font-size: 11px; color: var(--muted); }
.row .side { text-align: right; }
.row .side small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.cert-link { font-size: 11px; font-weight: 700; color: var(--barn); text-decoration: none; white-space: nowrap; }

/* ---------- signature components ---------- */
.band {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  padding: 3px 8px 3px 7px;
  border-radius: 5px;
  letter-spacing: .03em;
}
.band::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.9); }
.band.blu { background: #3A6B8C; }
.band.grn { background: #4C7A4F; }
.band.yel { background: #B5871F; }
.band.pnk { background: #A85472; }
.band.red { background: #9E3B2F; }

.egg {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 5px 13px;
  border: 1.5px solid;
  border-radius: 48% 48% 46% 46% / 64% 64% 40% 40%;
  white-space: nowrap;
}
.egg.f { color: var(--f); border-color: var(--f); background: var(--f-bg); }
.egg.m { color: var(--m); border-color: var(--m); background: var(--m-bg); }

.chip {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--sage);
  color: var(--pine);
}
.chip.warn { background: #F3E4CB; color: #8A6215; }

/* ---------- 4-step status tracker ---------- */
.track { display: flex; align-items: flex-start; }
.step { flex: 1; text-align: center; position: relative; }
.step::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.step:first-child::before { display: none; }
.step.done::before, .step.now::before { background: var(--pine); }
.step .pip {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--line);
  margin: 0 auto 6px;
  position: relative;
  z-index: 1;
  border: 2.5px solid var(--card);
}
.step.done .pip { background: var(--pine); }
.step.now .pip { background: var(--barn); box-shadow: 0 0 0 3px #F0D9D4; }
.step span { font-size: 9.5px; line-height: 1.25; display: block; color: var(--muted); }
.step.now span { color: var(--barn); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  background: var(--barn);
  color: #FBF3EA;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 9px;
  letter-spacing: .02em;
  text-decoration: none;
}
.btn:hover { background: #8A3329; }

/* ---------- forms ---------- */
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 11px; font-weight: 700; color: var(--pine); margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.rows.spaced .row { align-items: flex-start; }
.row .inc { margin-top: 9px; width: 16px; height: 16px; accent-color: var(--pine); flex: none; }
.sample-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sample-fields input:first-child { grid-column: 1 / -1; }
.sample-fields-wide { grid-template-columns: 1fr 1fr 1fr; }
.sample-fields-wide input:first-child { grid-column: auto; }

.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form select { width: auto; flex: 1; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filter-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--sage);
  color: var(--pine);
  text-decoration: none;
}
.filter-chip.active { background: var(--pine); color: #fff; }

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.admin-toolbar a { color: var(--pine); font-weight: 600; text-decoration: none; }
.inline-form-tight { display: inline; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.q-row { text-decoration: none; color: inherit; cursor: pointer; }
.q-row:hover { background: var(--sage); }

.cert-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 13px;
}
.cert-grid dt { color: var(--muted); }
.cert-grid dd { font-weight: 600; }

/* ---------- sample provenance photo ---------- */
.sample-photo { margin: 16px 0 0; }
.sample-photo img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.sample-photo figcaption { font-size: 11px; color: var(--muted); margin-top: 6px; }

.photo-thumb {
  display: block;
  max-width: 200px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 10px;
}

.errors ul { list-style: none; }
.errors li { font-size: 12.5px; color: var(--barn); font-weight: 600; margin-bottom: 8px; }
.banner-ok {
  background: var(--sage);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--pine-deep);
  margin-bottom: 16px;
}

/* ---------- footer ---------- */
.page-footer { text-align: center; font-size: 11.5px; color: var(--muted); padding: 18px 16px 28px; }
