/* Shared foundations: tokens, local fonts, native controls, layout, dialog and base print rules. */

@import url('styles/brand.css');
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter,system-ui,-apple-system,sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--green);
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  box-shadow: 0 0 0 2px white;
  outline-offset: 4px;
}
[hidden] {
  display: none!important;
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  background: white;
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 10px;
}
.review-note {
  background: #e7ece7;
  border-bottom: 1px solid #ccd8ce;
  padding: 10px 24px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.review-note strong {
  color: var(--green);
}
.wrap {
  max-width: 1180px;
  margin: auto;
  padding: 0 32px;
}
header {
  background: white;
  border-bottom: 1px solid var(--line);
}
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.wordmark {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--green);
  border: 0;
  background: none;
  padding: 0;
}
.wordmark span {
  font-weight: 400;
}
nav {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
nav button {
  border: 0;
  background: none;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
  border-radius: var(--radius);
}
nav button[aria-current=page] {
  background: var(--pale);
  color: var(--green);
  font-weight: 700;
}
.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: var(--radius);
  padding: 11px 19px;
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  text-decoration: none;
  font-weight: 650;
}
.btn:hover {
  background: #163d25;
}
.btn.secondary {
  background: transparent;
  color: var(--green);
}
.btn.secondary:hover {
  background: var(--pale);
}
.btn.light {
  background: white;
  color: var(--green);
  border-color: white;
}
.btn.small {
  font-size: 14px;
  padding: 8px 13px;
  min-height: 42px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  font-weight: 750;
  color: var(--green);
  margin: 0 0 15px;
}
h1,
h2,
h3 {
  color: var(--green);
  line-height: 1.16;
  letter-spacing: -.7px;
}
h1 {
  font-size: clamp(34px,4.6vw,57px);
  margin: 0 0 22px;
  max-width: 760px;
}
h2 {
  font-size: 29px;
  margin: 0 0 18px;
}
h3 {
  font-size: 20px;
  margin: 0 0 12px;
}
p {
  margin: 0 0 16px;
}
.lead {
  font-size: 19px;
  line-height: 1.65;
  max-width: 720px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.section {
  padding: 46px 0;
}
.hero {
  padding: 58px 0 42px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 56px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 25px;
}
.card p:last-child {
  margin-bottom: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
}
.two {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 24px;
}
.badge {
  display: inline-block;
  border-radius: 30px;
  background: var(--paper);
  color: var(--ink);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 14px;
}
.badge.warning {
  background: #f8eddb;
  color: var(--amber);
}
.list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.list li {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  display: flex;
  gap: 14px;
}
.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pale);
  color: var(--green);
  font-size: 14px;
  font-weight: bold;
}
.list strong {
  display: block;
  color: var(--green);
}
.dark {
  background: var(--green);
  color: white;
  padding: 34px;
  border-radius: 9px;
}
.dark h2,
.dark h3 {
  color: white;
}
.dark .muted {
  color: #e0e9df;
}
.small-heading {
  font-size: 24px;
}
.page-heading {
  padding: 42px 0 20px;
}
.narrow {
  max-width: 820px;
}
.notice {
  background: #fff4df;
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 3px;
  margin: 18px 0;
  font-size: 14px;
  color: #634718;
}
.info {
  background: var(--pale);
  border-left: 3px solid var(--green);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14px;
}
.steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 25px 0;
  list-style: none;
}
.steps button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 10px 15px;
  border-radius: var(--radius);
  min-height: 44px;
}
.steps button[aria-current=step] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.editor {
  display: grid;
  grid-template-columns: minmax(0,1fr) 285px;
  gap: 26px;
  align-items: start;
}
.editor aside {
  position: sticky;
  top: 16px;
}
.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-weight: 650;
  color: var(--green);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #b9c1bb;
  border-radius: var(--radius);
  background: white;
  padding: 11px 12px;
  color: var(--ink);
}
.field textarea {
  min-height: 95px;
  resize: vertical;
}
.field small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.field:last-child {
  margin-bottom: 0;
}
.editor .actions {
  margin-bottom: 0;
}
.check-list {
  margin: 0;
  padding-left: 20px;
}
.check-list li {
  margin-bottom: 10px;
}
.result-header {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: start;
}
.record-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.record-field {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  break-inside: avoid;
}
.record-field dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}
.record-field dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.empty {
  color: var(--amber);
  font-style: italic;
}
.resource {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.resource .actions {
  margin-top: auto;
  padding-top: 10px;
}
.separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
.status-line {
  display: flex;
  align-items: start;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 8px;
}
.compact {
  margin-bottom: 8px;
}
/* One footer for public pages and the Fieldbook workspace. */
.site-footer {
  margin-top:0;
  padding:0;
  background:var(--brand-deep);
  color:var(--paper);
}
.site-footer .brand-landscape-edge { height:24px; }
.site-footer .foot {
  max-width:1448px;
  padding:52px max(32px,5vw) 60px;
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  align-items:start;
  gap:64px;
}
.footer-identity img { display:block; width:300px; max-width:100%; height:auto; }
.footer-identity p { margin:12px 0 0; font-size:16px; }
.footer-dot { color:var(--brand-amber); font-weight:700; }
.site-footer .footer-links { display:flex; flex-direction:column; gap:0; }
.site-footer .text-button {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  width:100%;
  min-height:48px;
  padding:13px 0;
  border-top:1px solid #ffffff45;
  color:var(--paper);
  text-decoration:none;
  font-size:16px;
}
.site-footer .text-button span { color:var(--brand-amber); }
.site-footer .text-button:hover { text-decoration:underline; }
.site-footer :focus-visible { outline-color:var(--brand-amber); box-shadow:none; }
@media(max-width:800px) {
  .site-footer .foot { grid-template-columns:1fr; gap:32px; padding:36px 6% 44px; }
  .footer-identity img { width:260px; }
}
.workbench {
  background: #edf0ec;
  border-top: 1px solid #ccd4cd;
  padding: 20px 0 28px;
}
.workbench h2 {
  font-size: 17px;
  letter-spacing: 0;
  margin: 0 0 5px;
}
.workbench p {
  font-size: 13px;
}
.scenario-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 13px 0;
}
.scenario-tabs button {
  padding: 8px 12px;
  min-height: 42px;
  border: 1px solid #a6b7aa;
  background: white;
  border-radius: 4px;
  color: var(--green);
  font-size: 13px;
}
.scenario-tabs button[aria-pressed=true] {
  background: var(--green);
  color: white;
}
.scenario-next {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.review-state {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 10px;
  font-size: 13px;
  margin: 16px 0;
}
.review-state div {
  background: white;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.review-state strong {
  display: block;
  color: var(--green);
}
details {
  margin-top: 14px;
}
summary {
  cursor: pointer;
  color: var(--green);
  min-height: 35px;
}
#state-fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  font-size: 13px;
}
#state-fields p {
  margin: 0;
  background: white;
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#notice-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  max-width: 520px;
  width: calc(100% - 36px);
  color: var(--ink);
}
#notice-dialog::backdrop {
  background: #142c2260;
}
.dialog-close {
  float: right;
  margin: 0 0 15px 15px;
}
#notice-dialog h2 {
  font-size: 24px;
}
.choices label {
  display: flex;
  align-items: start;
  gap: 10px;
  margin: 15px 0;
}
.choices input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  flex-shrink: 0;
}
.no-print {
  display: block;
}
.print-only {
  display: none;
}
@media(max-width:900px) {
  .head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .editor {
    grid-template-columns: 1fr;
  }
  .editor aside {
    position: static;
  }
  .two {
    gap: 16px;
  }
  .review-state {
    grid-template-columns: 1fr 1fr;
  }
}
@media(max-width:600px) {
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .review-note {
    padding: 9px 20px;
    display: block;
    font-size: 12px;
  }
  .review-note span {
    display: block;
    margin-top: 3px;
  }
  .head {
    padding-top: 18px;
    padding-bottom: 15px;
  }
  nav {
    gap: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3,1fr);
  }
  nav button {
    font-size: 12px;
    padding: 9px 6px;
    min-height: 44px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 35px 0;
    gap: 25px;
  }
  .lead {
    font-size: 17px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .grid,
  .two,
  .record-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 28px 0;
  }
  .card {
    padding: 21px;
  }
  .dark {
    padding: 25px;
  }
  .page-heading {
    padding-top: 30px;
  }
  .actions .btn {
    flex: 1 1 auto;
  }
  .result-header {
    display: block;
  }
  h2 {
    font-size: 26px;
  }
  .steps button {
    font-size: 13px;
    padding: 10px;
  }
  #state-fields {
    grid-template-columns: 1fr;
  }
}
@media print {
  @page {
    size: A4;
    margin: 17mm;
  }
  body {
    background: white;
    font-size: 11pt;
    line-height: 1.45;
  }
  .review-note,
  header,
  footer,
  .workbench,
  .no-print,
  .actions,
  .platform-after {
    display: none!important;
  }
  main .view {
    display: none!important;
  }
  #result {
    display: block!important;
  }
  .wrap {
    padding: 0;
    max-width: none;
  }
  .card {
    padding: 0;
    border: 0;
  }
  .result-header {
    display: block;
  }
  h1 {
    font-size: 27pt;
  }
  h2 {
    font-size: 18pt;
  }
  .record-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .notice,
  .info {
    padding: 10px;
    border: 1px solid #888;
    background: white;
  }
  .print-only {
    display: block;
  }
  .record-field {
    break-inside: avoid;
  }
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 8px 0;
  min-height: 44px;
  text-align: left;
}




/* Shared brand primitives. Decoration never carries task status or meaning. */
.brand-section-marker { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:36px; height:40px; background:var(--green); color:white; border-bottom:4px solid var(--brand-amber); font-size:15px; font-weight:700; line-height:1; }
.brand-heading::after, .page-heading>h1::after, .page-heading>div>h1::after { content:""; display:block; width:44px; height:4px; margin-top:20px; background:var(--brand-amber); }
.brand-landscape-edge { height:16px; background:url('assets/landscape-ribbon.svg') center / 100% 100% no-repeat; }
input:not([type=checkbox]):not([type=radio]), textarea, select { border-color:var(--control-border); }
summary:focus-visible { outline:3px solid var(--focus); outline-offset:4px; box-shadow:0 0 0 2px white; }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *, *::before, *::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; } }

/* Site-wide status pattern: neutral facts, explicit attention counts, no safety score. */
.status-summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.status-label {
  color: var(--muted);
}
.status-badge {
  display: inline-block;
  max-width: 100%;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.status-badge--attention {
  color: var(--amber);
  background: var(--attention-surface);
  border-color: var(--attention-border);
}
