/* The first-run tour owns this palette. The fieldbook is intentionally unchanged. */
.welcome-onboarding {
  --intro-ink: #f6f9ed; --intro-soft: #c5dcc7; --intro-accent: #d4ec9a;
  --intro-top: max(14px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  --intro-bottom: calc(16px + max(48px, var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))));
  position: relative; isolation: isolate; overflow-x: clip; min-height: 100dvh;
  color: var(--intro-ink); background: radial-gradient(ellipse at 90% 30%, #326a40 0, transparent 57%), linear-gradient(155deg, #173f29 0%, #205735 46%, #0c3526 100%);
  padding: var(--intro-top) 22px var(--intro-bottom);
}
.intro-inner { position: relative; z-index: 1; min-height: calc(100dvh - var(--intro-top) - var(--intro-bottom)); display: flex; flex-direction: column; max-width: 460px; margin: auto; }
.intro-contours { position: absolute; width: 620px; height: 620px; top: 40px; left: 20%; border: 1px solid #b8d9a41c; border-radius: 44% 56% 58% 42%; transform: rotate(-25deg); box-shadow: 0 0 0 22px #c6e4b008, 0 0 0 48px #c6e4b00a, 0 0 0 79px #c6e4b008, 0 0 0 112px #c6e4b008; pointer-events: none; }
.intro-header { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 4px; }
.intro-brand { grid-column: 2; grid-row: 1; justify-self: center; display: block; width: min(100%, 160px); height: auto; filter: drop-shadow(0 6px 10px #05271838); }
.intro-skip { grid-column: 3; grid-row: 1; min-height: 44px; min-width: 44px; border: none; background: transparent; color: #d4e5d3; padding: 10px 0; font-size: 12px; }
.intro-carousel { overflow: hidden; margin-inline: -22px; touch-action: pan-y pinch-zoom; outline-offset: -4px; flex: 1; display: flex; align-items: center; }
.intro-track { display: flex; width: 100%; transform: translateX(calc(var(--step) * -100%)); transition: transform 320ms cubic-bezier(.22,.7,.2,1); }
.intro-slide { flex: 0 0 100%; min-width: 0; padding: 0 22px; }
.intro-art { position: relative; height: clamp(228px, 28dvh, 260px); max-width: 370px; margin: 6px auto 14px; user-select: none; }
.intro-orbit { position: absolute; border: 1px solid #cce5af33; border-radius: 50%; width: 225px; height: 225px; top: 11px; left: calc(50% - 112px); background: radial-gradient(circle, #abce7b16, transparent 66%); }
.intro-orbit-two { width: 290px; height: 180px; left: calc(50% - 145px); top: 42px; transform: rotate(-24deg); }
.intro-record { position: absolute; background: linear-gradient(135deg, #f3f7e8, #dcebcf); border: 1px solid #ffffffb0; border-radius: 23px; color: #183d2b; box-shadow: 0 22px 40px #05271845, 0 4px 9px #05271825; }
.intro-icon { width: 43px; height: 43px; flex: 0 0 43px; display: inline-grid; place-items: center; border-radius: 13px; color: #245c38; background: #e2ebd2; box-shadow: inset 0 1px 0 #fff9; }
.intro-herd-back { position: absolute; width: min(83%, 270px); height: 183px; left: 50%; top: 24px; transform: translateX(-50%) rotate(7deg); border: 1px solid #a4bf7a99; border-radius: 22px; background: #638151; }
.intro-herd-record { width: min(87%, 286px); padding: 15px 13px 13px; left: 50%; top: 12px; transform: translateX(-50%) rotate(-4deg); }
.intro-mini-kicker { display: block; letter-spacing: .12em; font-size: 8px; font-weight: 800; color: #49644c; }
.intro-species-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
.intro-species-tile { min-width: 0; min-height: 63px; display: grid; place-content: center; justify-items: center; gap: 3px; padding: 5px 3px; border: 1px solid #95af7e60; border-radius: 12px; background: #f3f7e8; color: #245c38; font-size: 10px; font-weight: 750; }
.intro-species-tile:nth-child(2), .intro-species-tile:nth-child(3) { background: #e4efd6; }
.intro-floating { position: absolute; z-index: 2; display: flex; align-items: center; gap: 9px; border: 1px solid #bddb9c73; border-radius: 17px; background: linear-gradient(135deg, #376d43, #245635); box-shadow: 0 12px 24px #07271b48, inset 0 1px 0 #c6dfaa26; color: #eef4dd; font-size: 11px; font-weight: 700; padding: 12px 14px; }
.intro-qr { right: clamp(0px, 4%, 16px); bottom: clamp(1px, calc(100% - 229px), 28px); padding: 8px 12px; transform: rotate(5deg); background: #d3e8a8; color: #244e32; }
.intro-production-record { top: 27px; left: calc(50% - 134px); width: 268px; padding: 18px; transform: rotate(-4deg); }
.intro-card-head { display: flex; gap: 10px; align-items: center; }
.intro-card-head small { display: block; font-size: 7px; letter-spacing: .06em; font-weight: 700; color: #49644c; margin-bottom: 5px; }
.intro-card-head strong { display: block; font-size: 11px; }
.intro-chart { display: flex; align-items: end; gap: 9px; height: 98px; border-bottom: 1px solid #a7be9f; padding: 10px 9px 0; background: repeating-linear-gradient(to top, transparent 0, transparent 31px, #74956e25 32px, transparent 33px); }
.intro-chart span { flex: 1; height: var(--bar); background: linear-gradient(#609355, #2f6840); border-radius: 5px 5px 0 0; }
.intro-chart span:nth-child(6) { background: linear-gradient(#bbd480, #88ad5c); }
.intro-chart-labels { display: flex; justify-content: space-between; font-size: 8px; color: #49644c; padding-top: 8px; }
.intro-weight { right: 0; bottom: 15px; padding: 9px 13px; transform: rotate(4deg); }
.intro-weight small { display: block; font-size: 8px; font-weight: 400; color: #d1e5c4; margin-top: 4px; }
.intro-weight .intro-icon { width: 34px; height: 34px; flex-basis: 34px; }
.intro-agenda-record { top: 18px; width: 276px; left: calc(50% - 138px); padding: 17px; transform: rotate(-4deg); }
.intro-agenda-record .intro-card-head { margin-bottom: 9px; }
.intro-mini-row { display: flex; gap: 9px; align-items: center; border-top: 1px solid #b6ccab80; padding-top: 9px; margin-top: 9px; }
.intro-mini-row > span:nth-child(2) { flex: 1; }
.intro-mini-row strong { display: block; font-size: 10px; }
.intro-mini-row small { display: block; color: #49644c; font-size: 8px; margin-top: 3px; }
.intro-mini-row .intro-icon { width: 29px; height: 29px; flex-basis: 29px; border-radius: 9px; }
.intro-mini-row .intro-icon svg { width: 18px; }
.intro-check { right: 0; top: 12px; background: #d3e8a8; color: #244e32; border-radius: 50%; padding: 15px; transform: rotate(10deg); }
.intro-report-back { position: absolute; width: 246px; height: 190px; left: calc(50% - 110px); top: 33px; background: #5a8251; border: 1px solid #a2c38c; border-radius: 19px; transform: rotate(6deg); }
.intro-report-record { width: 265px; left: calc(50% - 133px); top: 13px; padding: 18px; transform: rotate(-5deg); }
.intro-report-summary { display: flex; gap: 10px; padding: 17px 0 7px; font-size: 8px; font-weight: 650; }
.intro-report-graph { display: flex; height: 55px; gap: 8px; align-items: end; border-bottom: 1px solid #adc49f; }
.intro-report-graph span { flex: 1; height: 40%; background: #a3c185; border-radius: 4px 4px 0 0; }
.intro-report-graph span:nth-child(2n) { height: 72%; background: #44764b; }.intro-report-graph span:nth-child(3n) { height: 92%; background: #6a955a; }
.intro-report-lines { display: grid; gap: 6px; padding-top: 11px; }.intro-report-lines i { height: 4px; background: #b4c9a6; border-radius: 5px; }.intro-report-lines i:last-child { width: 68%; }
.intro-formats { right: 1px; bottom: 16px; background: #d3e8a8; color: #244e32; transform: rotate(3deg); }
.intro-formats b { padding: 0 4px; font-weight: 400; }
.intro-copy { text-align: center; }
.intro-eyebrow { color: var(--intro-accent); font-size: 9px; letter-spacing: .16em; font-weight: 750; }
.intro-copy h2 { font-size: clamp(28px, 7.8vw, 37px); line-height: 1.09; letter-spacing: -.035em; font-weight: 700; margin: 11px 0 13px; color: var(--intro-ink); }
.intro-copy p { color: #d4e5d2; font-size: 13px; line-height: 1.65; max-width: 350px; margin: auto; }
.intro-points { padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; list-style: none; color: #d8e8c6; font-size: 10px; }
.intro-points li { display: flex; gap: 5px; align-items: center; }.intro-points svg { color: #cae899; }
.intro-navigation { margin-top: 12px; }
.intro-progress { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 10px; }
.intro-back { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #91b28c40; border-radius: 50%; background: #133e2a; color: #d8e8c6; }
.intro-back:disabled { opacity: .3; cursor: default; }
.intro-dots { display: flex; gap: 0; }.intro-dots button { display: grid; place-items: center; width: clamp(30px, 8vw, 44px); height: 44px; padding: 0; background: transparent; border: 0; }
.intro-dots button span { display: block; width: 7px; height: 7px; border-radius: 10px; background: #88a58a; transition: width 220ms ease, background 220ms ease; }
.intro-dots button[aria-current] span { width: 24px; background: #d4ec9a; }
.intro-count { width: 44px; text-align: right; color: #bfd3b9; font-size: 10px; font-variant-numeric: tabular-nums; }
.intro-primary { display: flex; width: 100%; min-height: 54px; justify-content: center; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #ebf7bc; border-radius: 16px; background: linear-gradient(#ddefad, #c7e292); color: #173e28; font-size: 14px; font-weight: 750; box-shadow: 0 7px 20px #06281840, inset 0 1px 0 #f3fad6; }
.intro-primary:hover { background: #e3f1bf; }.intro-primary:active { transform: translateY(1px); }
.intro-swipe-hint { text-align: center; font-size: 10px; color: #c0d5bc; margin-top: 10px; }
.intro-footer { text-align: center; border-top: 1px solid #a8c59a24; margin-top: 12px; padding-top: 10px; }
.intro-footer > p { font-size: 10px; color: #d3e3c6; font-weight: 600; }
.intro-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }.intro-legal a { display: inline-flex; align-items: center; min-height: 44px; color: #b9d0b3; font-size: 11px; text-decoration: none; }.intro-legal a:hover { text-decoration: underline; }
.intro-error { background: #f1e2cb; color: #563919; padding: 14px; border-radius: 12px; font-size: 12px; }
.welcome-onboarding :focus-visible { outline: 2px solid #edfac7; outline-offset: 4px; }
.intro-copy h2:focus { outline: none; }
@media (max-width: 350px) {
  .welcome-onboarding { padding-inline: 16px; }.intro-carousel { margin-inline: -16px; }.intro-slide { padding-inline: 16px; }
  .intro-header { grid-template-columns: 40px minmax(0, 1fr) 40px; }.intro-art { height: 232px; transform: scale(.92); transform-origin: center; margin-block: 0 2px; }
  .intro-copy p { font-size: 12px; }.intro-copy h2 { font-size: 28px; }.intro-points { gap: 7px; font-size: 9px; }
}
@media (min-height: 850px) { .intro-art { margin-block: 12px 20px; }.intro-copy p { font-size: 14px; }.intro-navigation { margin-top: 23px; } }
@media (prefers-reduced-motion: reduce) { .intro-track, .intro-dots button span { transition: none; } .intro-primary:active { transform: none; } }
@media (forced-colors: active) { .intro-record, .intro-floating, .intro-primary { border: 2px solid ButtonText; }.intro-dots button[aria-current] { outline: 2px solid Highlight; }.intro-brand { forced-color-adjust: none; } }


/* Two new chapters use the same fieldbook palette and custom icon family. */
.intro-finance-back { position: absolute; width: 234px; height: 200px; left: calc(50% - 109px); top: 19px; border: 1px solid #a4bf7a99; border-radius: 21px; background: #638151; transform: rotate(5deg); }
.intro-finance-record { top: 8px; left: calc(50% - 136px); width: 272px; padding: 17px 18px 14px; transform: rotate(-4deg); }
.intro-finance-record .intro-card-head { gap: 9px; margin-bottom: 10px; }
.intro-finance-record .intro-card-head .intro-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; }
.intro-finance-record .intro-card-head small { font-size: 6.5px; }
.intro-ledger-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #b6ccab80; }
.intro-ledger-row .intro-icon { width: 29px; height: 29px; flex-basis: 29px; border-radius: 9px; background: #ccddbb; }
.intro-ledger-row .intro-icon svg { width: 20px; height: 20px; }
.intro-ledger-row:nth-child(3) .intro-icon { background: #e5dfbd; color: #6b6342; }
.intro-ledger-row > span:nth-child(2) { flex: 1; }
.intro-ledger-row strong { display: block; font-size: 10px; }.intro-ledger-row small { display: block; color: #49644c; font-size: 8px; margin-top: 3px; }
.intro-ledger-row > b { font-size: 15px; font-weight: 500; color: #3b6848; }
.intro-ledger-total { display: flex; justify-content: space-between; padding-top: 11px; margin-top: 3px; border-top: 1px solid #9db68d; font-size: 9px; }
.intro-ledger-total strong { font-size: 10px; }
.intro-finance-file { right: 0; bottom: -8px; padding: 10px 13px; background: #d3e8a8; color: #244e32; transform: rotate(4deg); }
.intro-field-map { position: absolute; width: 300px; height: 200px; left: calc(50% - 150px); top: 17px; color: #b8d391; transform: rotate(-5deg); opacity: .7; }
.intro-field-map svg { display: block; width: 100%; height: 100%; }
.intro-place-pin { position: absolute; display: grid; place-items: center; width: 86px; height: 86px; border-radius: 26px; color: #e5f1cd; background: linear-gradient(135deg, #477c49, #215534); border: 1px solid #b9d89277; box-shadow: 0 15px 25px #082e2350; left: calc(50% - 43px); top: 3px; transform: rotate(4deg); }
.intro-place-record { width: 256px; left: calc(50% - 137px); top: 91px; padding: 14px 19px; transform: rotate(-4deg); }
.intro-location-path { display: flex; gap: 12px; align-items: center; padding: 11px 0; color: #49644c; font-size: 10px; border-bottom: 1px solid #aec49f; }
.intro-location-city { display: flex; gap: 10px; align-items: center; padding-top: 11px; }.intro-location-city strong { display: block; font-size: 11px; }.intro-location-city small { display: block; color: #49644c; margin-top: 4px; font-size: 8px; }
.intro-place-lots { right: -1px; bottom: -12px; padding: 10px 13px; background: #d3e8a8; color: #244e32; transform: rotate(4deg); }

/* Access and establishment setup are full-page steps, not modal overlays. */
.entry-inner { position: relative; z-index: 1; max-width: 430px; min-height: calc(100dvh - var(--intro-top) - var(--intro-bottom)); margin: auto; display: flex; flex-direction: column; }
.entry-back { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; color: #e2edda; background: #133e2a85; border: 1px solid #a8c59844; border-radius: 50%; }
.entry-intro { margin: auto 0 32px; padding-top: 34px; text-align: center; }
.entry-intro.compact { margin: 22px 0 25px; padding: 0; }
.entry-intro .intro-eyebrow { display: block; }
.entry-intro h1 { font-size: clamp(27px, 7.7vw, 34px); line-height: 1.12; letter-spacing: -.035em; font-weight: 700; margin: 13px 0; }
.entry-intro p { color: #d2e4cf; font-size: 13px; line-height: 1.6; max-width: 330px; margin: auto; }
.entry-access-actions { display: grid; gap: 12px; margin-bottom: auto; }
.entry-primary, .entry-secondary { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 52px; gap: 10px; padding: 14px 16px; border-radius: 15px; font-size: 14px; font-weight: 700; }
.entry-primary { background: linear-gradient(#ddefad, #c7e292); color: #173e28; border: 1px solid #ebf7bc; box-shadow: 0 7px 20px #06281824; }
.entry-secondary { background: #1e4e32; color: #eef4dd; border: 1px solid #83a57488; }
.entry-primary:hover { background: #e3f1bf; }.entry-secondary:hover { background: #2a603b; }
.entry-card { background: #f3f7ed; color: #203e2b; border: 1px solid #eef5db; border-radius: 23px; padding: 23px 20px; box-shadow: 0 20px 40px #062d2145; }
.entry-card .form { gap: 17px; }.entry-card label { color: #284934; font-size: 12px; font-weight: 650; }
.entry-card input, .entry-card select { min-height: 48px; background: #fffefa; border-color: #cfddc9; border-radius: 12px; font-size: 14px; }
.entry-card input:disabled { opacity: 1; color: #61745b; background: #e9efdf; cursor: not-allowed; -webkit-text-fill-color: #61745b; }
.entry-card .entry-primary { background: #245637; color: #f3f7e7; border-color: #245637; margin-top: 5px; }
.entry-card .entry-primary:hover { background: #326e46; }
.entry-tabs { display: flex; background: #e1ead7; padding: 4px; border-radius: 13px; margin-bottom: 22px; }
.entry-tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: #55704c; font-size: 12px; font-weight: 650; }
.entry-tabs button[aria-pressed="true"] { background: #fafff4; color: #234f32; box-shadow: 0 3px 9px #183b2312; }
.entry-account-state { border-top: 1px solid #ccdcbf; margin-top: 18px; padding-top: 16px; }
.entry-account-state p { font-size: 12px; color: #52654b; line-height: 1.5; margin-bottom: 13px; }
.entry-account-state .entry-secondary { background: transparent; color: #245637; border-color: #a1ba8e; }
.entry-footer { padding-top: 26px; margin-top: auto; }
.entry-card :focus-visible { outline-color: #2c6740; }
@media(max-width:350px) { .entry-card { padding: 18px 15px; }.entry-intro h1 { font-size: 27px; }.entry-intro.compact { margin-top: 16px; } }
.entry-credentials label { display: grid; gap: 8px; }
.entry-credentials input { width: 100%; padding: 12px 14px; border: 1px solid #cfddc9; }
.entry-local-link { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 10px 4px; color: #deedd8; font-size: 12px; font-weight: 600; background: transparent; border: 0; text-decoration: underline; text-underline-offset: 4px; }
.entry-card .entry-local-link { color: #366340; margin-top: 15px; }
.entry-inline-status { background: #e7eedf; border: 1px solid #c6d9ba; color: #34573a; border-radius: 12px; padding: 13px; font-size: 12px; line-height: 1.6; }
.entry-forgot { min-height: 44px; padding: 8px 0; margin: -8px 0; text-align: right; border: 0; background: none; color: #35623f; font-size: 12px; font-weight: 650; }.entry-field-help { margin: -8px 0 0; font-size: 12px; line-height: 1.5; color: #61745b; }

/* Portrait-first startup; the document can still grow for zoom, short windows,
   native keyboard changes, and actual forms. Only decoration is compacted. */
@media (orientation: landscape), (min-width: 600px) {
.welcome-onboarding { --intro-bottom: max(12px, calc(8px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))); overflow: clip; }
.intro-inner { max-width: 460px; }
.intro-brand { width: min(100%, 160px); }
.intro-footer > p { margin-block: 0 2px; }
}
@media (max-height: 760px) and (orientation: landscape), (max-height: 760px) and (min-width: 600px) {
  .intro-art { height: 260px; zoom: .76; transform: none; margin-block: 2px 9px; }
  .intro-navigation { margin-top: 8px; }
  .intro-progress { margin-bottom: 4px; }
  .intro-swipe-hint { margin-top: 6px; }
  .intro-footer { margin-top: 6px; padding-top: 6px; }
  .entry-intro { padding-top: 18px; margin-bottom: 20px; }
  .entry-footer { padding-top: 14px; }
}
@media (max-height: 665px) and (orientation: landscape), (max-height: 665px) and (min-width: 600px) {
  .intro-art { zoom: .62; }
  .intro-brand { width: min(100%, 144px); }
  .intro-copy h2 { margin-block: 6px 8px; }
  .intro-points { margin-top: 9px; }
  .entry-intro { padding-top: 12px; margin-bottom: 15px; }
  .entry-access-actions { gap: 8px; }
}
@media (max-height: 550px) and (orientation: landscape), (max-height: 550px) and (min-width: 600px) {
  .intro-art { display: none; }
}
