@font-face { font-family: "Quicksand"; src: url("/assets/fonts/quicksand-300.ttf") format("truetype"); font-style: normal; font-weight: 300; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/assets/fonts/quicksand-400.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/assets/fonts/quicksand-500.ttf") format("truetype"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/assets/fonts/quicksand-600.ttf") format("truetype"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/assets/fonts/quicksand-700.ttf") format("truetype"); font-style: normal; font-weight: 700; font-display: swap; }

:root {
    --ink: #1f2b24;
    --muted: #66726b;
    --paper: #fbfaf4;
    --panel: #ffffff;
    --line: #dfe4dc;
    --green: #315c45;
    --green-deep: #214332;
    --green-soft: #e5eee7;
    --gold: #d7a94c;
    --shadow: 0 18px 50px rgba(42, 55, 45, 0.09);
    --radius: 22px;
    --control-radius: 7px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { color-scheme: light; }

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 0%, rgba(215, 169, 76, 0.13), transparent 30rem),
        linear-gradient(180deg, #f7f6ef 0, var(--paper) 26rem);
    font-family: "Quicksand", ui-sans-serif, system-ui, sans-serif;
    line-height: 1.55;
}

a { color: inherit; }

button, input, select, textarea { font: inherit; }
input::placeholder, textarea::placeholder { color: #888888; opacity: 1; }

.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 780;
    letter-spacing: -0.02em;
}
.brand > span:last-child { max-width: min(52vw, 420px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: var(--green);
    font-family: "Quicksand", sans-serif;
    font-size: 1.35rem;
}

.header-note { color: var(--muted); font-size: 0.88rem; }
.account-menu { position: relative; }
.account-menu summary { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #cbd5cc; border-radius: 50%; color: white; background: var(--green); cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu summary:focus-visible { background: var(--green-deep); outline: 3px solid rgba(49, 92, 69, 0.18); }
.account-icon { position: relative; display: block; width: 22px; height: 22px; }
.account-icon::before { content: ""; position: absolute; top: 1px; left: 7px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.account-icon::after { content: ""; position: absolute; right: 2px; bottom: 1px; left: 2px; height: 10px; border-radius: 10px 10px 4px 4px; background: currentColor; }
.account-menu-panel { position: absolute; z-index: 10; top: calc(100% + 8px); right: 0; display: grid; min-width: 180px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.account-menu-panel a { padding: 10px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 0.88rem; font-weight: 720; }
.account-menu-panel a:hover, .account-menu-panel a:focus-visible { background: var(--green-soft); outline: none; }
.account-menu-divider { height: 1px; margin: 6px 5px; background: var(--line); }

main { padding: 42px 0 80px; }

/* Signed-out landing page */
.landing-page { color: #080808; background: #fff; }
.landing-header { display: grid; min-height: 138px; place-items: center; padding: 22px 20px 20px; background: #f0f0f0; text-align: center; }
.landing-wordmark { display: grid; gap: 2px; color: #050505; text-decoration: none; }
.landing-wordmark > span { font-size: clamp(2.15rem, 5vw, 3.65rem); font-weight: 560; letter-spacing: -0.055em; line-height: 1; }
.landing-wordmark sup { margin-left: 3px; font-size: 0.42em; font-weight: 500; letter-spacing: 0; vertical-align: top; }
.landing-wordmark small { color: #707070; font-size: clamp(0.7rem, 1.8vw, 1rem); font-weight: 780; letter-spacing: 0.07em; text-transform: uppercase; }
.landing-main { width: 100%; padding: 0 0 46px; overflow: hidden; }
.landing-hero { display: grid; gap: 34px; width: min(1180px, 100%); margin: 0 auto; padding: clamp(42px, 7vw, 82px) max(24px, calc((100% - 1100px) / 2)) 0; }
.landing-intro { max-width: 920px; }
.landing-intro h1 { max-width: none; margin: 0 0 28px; font-family: "Quicksand", sans-serif; font-size: clamp(3.1rem, 8vw, 6.7rem); font-weight: 600; letter-spacing: -0.065em; line-height: 0.98; }
.landing-intro p { max-width: 900px; margin: 0; font-size: clamp(1.05rem, 2.4vw, 1.7rem); font-weight: 390; letter-spacing: -0.022em; line-height: 1.46; }
.screen-carousel { display: grid; gap: 12px; min-width: 0; margin-top: 4px; }
.carousel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.carousel-heading > p { margin: 0; color: #6e7278; font-size: 0.78rem; font-weight: 760; letter-spacing: 0.08em; text-transform: uppercase; }
.carousel-controls { display: flex; gap: 8px; }
.carousel-controls button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #cbd0d8; border-radius: 50%; color: #272b31; background: white; cursor: pointer; font-size: 1.7rem; line-height: 1; }
.carousel-controls button:hover, .carousel-controls button:focus-visible { border-color: #777e88; outline: 3px solid rgba(0, 168, 62, 0.16); }
.screen-carousel-track { display: flex; gap: 20px; overflow-x: auto; padding: 3px 2px 10px; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #aeb5c0 transparent; }
.screen-preview-card { display: grid; min-width: min(340px, 78vw); flex: 0 0 calc((100% - 40px) / 3); grid-template-rows: minmax(290px, 1fr) auto; overflow: hidden; padding: 0; border: 0; border-radius: 22px; color: #090909; background: #e7ebf3; cursor: pointer; scroll-snap-align: start; text-align: left; }
.screen-preview-card:hover, .screen-preview-card:focus-visible { outline: 4px solid rgba(0, 168, 62, 0.28); outline-offset: -4px; }
.placeholder-screen { display: grid; min-height: 290px; align-content: start; padding: 18px; background: #e7ebf3; }
.placeholder-toolbar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; background: rgba(255,255,255,0.72); }
.placeholder-toolbar i { width: 7px; height: 7px; border-radius: 50%; background: #b2bac8; }
.placeholder-content { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: center; min-height: 220px; padding: 20px 12px 4px; }
.placeholder-content i { display: block; min-height: 72px; border-radius: 8px; background: rgba(255,255,255,0.68); box-shadow: inset 0 0 0 1px rgba(100,110,125,0.08); }
.placeholder-screen-pasture .placeholder-content i:first-child { grid-column: 1 / -1; min-height: 118px; clip-path: polygon(7% 25%, 40% 7%, 92% 19%, 81% 88%, 28% 95%, 3% 61%); background: #c8d8bc; }
.placeholder-screen-flock .placeholder-content { grid-template-columns: 1fr; gap: 8px; }
.placeholder-screen-flock .placeholder-content i { min-height: 38px; border-radius: 5px; }
.placeholder-screen-reports .placeholder-content { align-items: end; }
.placeholder-screen-reports .placeholder-content i { min-height: 55px; border-radius: 5px 5px 0 0; background: #9bc4a9; }
.placeholder-screen-reports .placeholder-content i:nth-child(2) { min-height: 140px; }
.placeholder-screen-reports .placeholder-content i:nth-child(3) { min-height: 95px; }
.screen-preview-copy { display: grid; min-height: 138px; align-content: center; gap: 4px; padding: 19px 22px 22px; background: rgba(255,255,255,0.22); text-align: center; }
.screen-preview-copy strong { font-size: 1.18rem; }
.screen-preview-copy small { color: #555d68; font-size: 0.8rem; }
.screen-preview-copy > span { margin-top: 7px; color: #007f32; font-size: 0.76rem; font-weight: 780; }
.landing-actions { display: grid; width: min(100%, 500px); gap: 12px; justify-self: center; margin-top: 4px; }
.landing-button { display: flex; min-height: 66px; align-items: center; justify-content: center; border: 4px solid #00a83e; border-radius: 999px; color: #009b39; background: white; font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 740; text-decoration: none; }
.landing-button-primary { color: white; background: #00a83e; }
.landing-button:hover, .landing-button:focus-visible { border-color: #007d2f; outline: none; }
.landing-button-primary:hover, .landing-button-primary:focus-visible { background: #007d2f; }
dialog::backdrop { background: rgba(0, 0, 0, 0.85); }
.screenshot-lightbox { position: relative; width: min(900px, calc(100% - 34px)); max-width: none; height: min(86vh, 900px); max-height: none; overflow: hidden; padding: 0; border: 0; border-radius: 30px; color: #080808; background: #e7ebf3; box-shadow: 0 28px 90px rgba(0,0,0,0.34); }
.screenshot-lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.screenshot-lightbox .lightbox-placeholder { min-height: 0; height: 100%; padding: clamp(24px, 6vw, 64px); }
.screenshot-lightbox .placeholder-toolbar { height: 45px; }
.screenshot-lightbox .placeholder-content { min-height: 0; height: 100%; }
.lightbox-copy { position: absolute; inset: 50% auto auto 50%; display: grid; width: min(80%, 540px); gap: 6px; padding: 22px; border-radius: 12px; background: rgba(231,235,243,0.88); text-align: center; transform: translate(-50%, -50%); }
.lightbox-copy strong { font-size: clamp(1.35rem, 4vw, 2.15rem); }
.lightbox-copy span { font-size: clamp(0.95rem, 2vw, 1.3rem); }
.lightbox-close { position: absolute; z-index: 3; top: 10px; right: 10px; display: grid; width: 66px; height: 66px; place-items: center; padding: 0 0 7px; border: 0; border-radius: 50%; color: white; background: rgba(0,0,0,0.25); cursor: pointer; font-size: 3.25rem; font-weight: 280; line-height: 1; }
.lightbox-close:hover, .lightbox-close:focus-visible { background: rgba(0,0,0,0.42); outline: 3px solid rgba(255,255,255,0.75); }

/* Password-free sign in */
.signin-dialog { position: relative; width: min(712px, calc(100% - 34px)); max-width: none; height: min(760px, calc(100dvh - 52px)); max-height: none; overflow: hidden; padding: 0; border: 0; border-radius: 30px; color: #090909; background: white; box-shadow: 0 28px 90px rgba(0,0,0,0.36); }
.signin-dialog[open] { display: block; }
.signin-dialog .signin-close { top: 8px; right: 8px; }
.signin-viewport { width: 100%; height: 100%; overflow: hidden; }
.signin-track { display: flex; width: 200%; height: 100%; transform: translateX(0); transition: transform 360ms cubic-bezier(.22,.72,.24,1); }
.signin-dialog[data-step="request"] .signin-track { transform: translateX(-50%); }
.signin-panel { display: grid; width: 50%; flex: 0 0 50%; grid-template-rows: auto minmax(0, 1fr) auto; padding: 86px 68px 54px; }
.signin-panel-header { position: relative; margin-right: 2px; border-bottom: 2px solid #697486; }
.signin-panel-header h2 { margin: 0 0 7px; font-size: clamp(1.85rem, 5vw, 2.45rem); font-weight: 400; letter-spacing: -0.035em; text-transform: uppercase; }
.signin-back { position: absolute; right: calc(100% + 20px); bottom: 7px; padding: 0; border: 0; color: #9ca0a4; background: transparent; cursor: pointer; font-size: 2.2rem; line-height: 1; }
.signin-panel-body { padding-top: 36px; }
.signin-panel-body h3 { margin: 0 0 10px; font-size: 1.45rem; font-weight: 700; }
.signin-panel-body > p { margin-bottom: 28px; font-size: 1.28rem; line-height: 1.45; }
.signin-panel-body form { display: grid; gap: 14px; }
.signin-panel-body form > label, .signin-contact > label { font-size: 1.18rem; font-weight: 700; }
.signin-methods { display: grid; gap: 13px; margin: 4px 0 22px; }
.signin-methods label { display: flex; align-items: center; gap: 13px; cursor: pointer; font-size: 1.35rem; }
.signin-methods input { width: 25px; height: 25px; margin: 0; accent-color: #737373; }
.signin-contact { display: grid; gap: 8px; }
.signin-contact[hidden] { display: none; }
.signin-contact input, .signin-panel-body input[name="code"] { width: 100%; min-height: 72px; padding: 0 16px; border: 2px solid #b7b7b7; border-radius: 7px; background: white; font-size: 1.25rem; }
.signin-panel-body input:focus { border-color: #00a83e; outline: 3px solid rgba(0,168,62,0.16); }
.signin-action { width: min(100%, 455px); min-height: 76px; justify-self: center; border: 5px solid #00ad42; border-radius: 999px; color: #00a23c; background: white; cursor: pointer; font-size: 1.35rem; font-weight: 700; }
.signin-action-primary { color: white; background: #00ad42; }
.signin-action:hover, .signin-action:focus-visible { border-color: #007e30; outline: none; }
.signin-action-primary:hover, .signin-action-primary:focus-visible { background: #007e30; }
.signin-destination { margin-bottom: 12px !important; }
.signin-resend { display: block; margin: 0 auto 48px; padding: 0; border: 0; color: #090909; background: transparent; cursor: pointer; font-size: 1.18rem; text-decoration: underline; text-underline-offset: 3px; }
.signin-error { margin: 0 !important; color: #a52f26; font-size: 0.86rem !important; font-weight: 700; }
.signin-preview-code { margin: 0 !important; padding: 8px 11px; border-radius: 6px; color: #3b5543; background: #e5eee7; font-size: 0.82rem !important; }

/* Farm setup */
.setup-page { background: #fff; }
.setup-site-header { position: relative; display: grid; min-height: 108px; place-items: center; padding: 14px 76px; background: #f0f0f0; }
.setup-back { position: absolute; top: 50%; left: 25px; display: grid; width: 45px; height: 45px; place-items: center; border-radius: 50%; color: #a4a7aa; background: #dedede; font-size: 1.8rem; text-decoration: none; transform: translateY(-50%); }
.setup-wordmark > span { font-size: clamp(1.9rem, 5vw, 2.7rem); }
.setup-wordmark small { font-size: clamp(0.62rem, 1.6vw, 0.82rem); }
.setup-main { width: min(760px, calc(100% - 44px)); margin: 0 auto; padding: 78px 0 90px; }
.setup-screen { max-width: none; }
.setup-screen-heading, .setup-section-heading { margin: 0 0 48px; border-bottom: 2px solid #697486; }
.setup-screen-heading h1, .setup-section-heading h2 { margin: 0 0 6px; font-size: clamp(1.85rem, 5vw, 2.35rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.15; text-transform: uppercase; }
.setup-page .setup-form { padding: 0; border: 0; border-radius: 0; background: white; box-shadow: none; }
.setup-page .form-grid { grid-template-columns: 1fr; gap: 58px; }
.setup-page .field-full { grid-column: auto; }
.setup-page .field > label, .setup-page .field-label, .setup-page .setup-fieldset legend { font-size: 1.15rem; font-weight: 700; }
.setup-page .field input:not([type="radio"]):not([type="checkbox"]) { min-height: 64px; border: 2px solid #b7b7b7; border-radius: 7px; font-size: 1.15rem; }
.setup-page .animal-selectors { gap: 12px; }
.setup-page .animal-selector { border: 3px solid #737373; border-radius: 7px; }
.setup-page .animal-selector-toggle { min-height: 82px; padding: 0 18px; font-size: 1.25rem; }
.setup-page .animal-selector-toggle strong { font-weight: 400; }
.setup-page .animal-layout-options { padding: 18px; }
.setup-page .choice-grid { grid-template-columns: 1fr; gap: 12px; }
.setup-page .choice-card { position: relative; min-height: 82px; padding: 16px 56px 16px 18px; border: 3px solid #737373; border-radius: 7px; }
.setup-page .choice-card::after { content: ""; position: absolute; top: 30px; right: 20px; width: 12px; height: 12px; border-right: 3px solid #111; border-bottom: 3px solid #111; transform: rotate(45deg); }
.setup-page .choice-card strong { font-size: 1.25rem; font-weight: 400; }
.setup-page .choice-card > span { margin-top: 4px; font-size: 0.84rem; }
.setup-page .setup-fieldset { margin: 0; padding-top: 0; border: 0; }
.setup-page .setup-fieldset legend { margin-bottom: 12px; }
.setup-page .setup-section-heading { margin: 42px 0 -24px; }
.setup-page .contact-section > .hint { max-width: 650px; margin: -5px 0 24px; color: #222; font-size: 1rem; }
.setup-page .contact-methods { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 26px; }
.setup-page .contact-method { min-height: 38px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 1.25rem; }
.setup-page .contact-method:has(input:checked) { border: 0; background: transparent; box-shadow: none; }
.setup-page .contact-method input { width: 26px; height: 26px; }
.setup-page .contact-input label { font-size: 1.15rem; }
.setup-page .remember-choice { margin-top: 12px; }
.setup-create-action { justify-content: center; margin-top: 60px; }
.setup-create-action .button { width: min(100%, 480px); min-height: 72px; border-radius: 999px; background: #00ad42; font-size: 1.28rem; box-shadow: none; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 52px;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    max-width: 760px;
    margin-bottom: 20px;
    font-family: "Quicksand", sans-serif;
    font-size: clamp(3rem, 7vw, 5.9rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.hero-copy { max-width: 650px; color: #526058; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero-visual { display: grid; gap: 18px; }
.hero-action { justify-self: center; min-width: 180px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--control-radius);
    cursor: pointer;
    text-decoration: none;
    font-weight: 750;
}

.button-primary { color: white; background: var(--green); box-shadow: 0 10px 25px rgba(49, 92, 69, 0.2); }
.button-primary:hover { background: var(--green-deep); }
.button:disabled { cursor: not-allowed; opacity: 0.48; box-shadow: none; }
.button-secondary { border-color: var(--line); background: var(--panel); }

.farm-card {
    overflow: hidden;
    border: 1px solid rgba(49, 92, 69, 0.13);
    border-radius: 30px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.field-map {
    position: relative;
    min-height: 320px;
    background: linear-gradient(135deg, #9ab18a, #d0c995 55%, #779268);
}

.field-map::before,
.field-map::after {
    content: "";
    position: absolute;
    inset: 15% 14% 16% 12%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 45% 30% 38% 22%;
    transform: rotate(-4deg);
}

.field-map::after {
    inset: 39% 13% 15% 45%;
    border-width: 2px 0 0 2px;
    border-radius: 0;
    transform: rotate(8deg);
}

.map-label {
    position: absolute;
    z-index: 1;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: 0 5px 18px rgba(32, 48, 37, 0.15);
}

.map-label-one { top: 22%; left: 22%; }
.map-label-two { right: 18%; bottom: 26%; }

.card-body { padding: 22px 24px 24px; }
.card-kicker { color: var(--muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; }
.card-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.card-row strong { font-family: "Quicksand", sans-serif; font-size: 1.7rem; font-weight: 500; }
.status { color: var(--green); font-size: 0.83rem; font-weight: 800; }

/* Signed-in application shell */
.member-page { color: #090909; background: #fff; }
.member-shell-header { position: relative; z-index: 20; background: #fff; }
.member-brand-bar { display: flex; min-height: 84px; align-items: center; justify-content: space-between; gap: 28px; padding: 12px max(22px, calc((100% - 1160px) / 2)); color: #fff; background: #00ad42; }
.member-farm-name { min-width: 0; overflow: hidden; color: #fff; font-size: clamp(1.55rem, 3.2vw, 2.35rem); font-weight: 700; letter-spacing: -0.04em; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.member-byline { flex: 0 0 auto; font-size: clamp(1.25rem, 2.7vw, 2rem); font-style: italic; font-weight: 400; letter-spacing: -0.035em; white-space: nowrap; }
.member-byline sup { margin-left: 3px; font-size: 0.42em; vertical-align: top; }
.member-context-stripe { height: 16px; background: #00ad42; }
.member-page-bar { display: flex; min-height: 128px; align-items: center; justify-content: space-between; gap: 30px; padding: 20px max(22px, calc((100% - 1160px) / 2)); box-shadow: 0 7px 14px rgba(0, 0, 0, 0.17); }
.member-page-identity { display: flex; min-width: 0; align-items: center; gap: 24px; text-decoration: none; }
.member-home-icon { display: grid; width: 76px; height: 76px; flex: 0 0 76px; place-items: center; border-radius: 8px; color: #fff; background: #00ad42; }
.member-home-icon img { display: block; width: 58px; height: 58px; object-fit: contain; }
.member-page-identity strong { overflow: hidden; font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.collection-page-identity { display: flex; min-width: 0; align-items: center; gap: 24px; }
.collection-page-identity strong { overflow: hidden; font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.collection-page-identity > span:last-child { flex: 0 0 auto; font-size: clamp(1.35rem, 3.5vw, 2.15rem); font-weight: 400; letter-spacing: -0.035em; white-space: nowrap; }
.member-back-button { display: grid; width: 76px; height: 76px; flex: 0 0 76px; place-items: center; border-radius: 50%; color: #fff; background: #00ad42; text-decoration: none; }
.member-back-button span { margin-top: -5px; font-size: 3.65rem; font-weight: 300; line-height: 1; }
.member-back-button:hover, .member-back-button:focus-visible { background: #008d36; outline: 4px solid rgba(0, 173, 66, 0.2); }
.member-page-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 28px; }
.member-greeting { color: #666; font-size: clamp(1rem, 2.5vw, 1.75rem); font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-menu { position: relative; }
.site-menu summary { position: relative; display: grid; width: 48px; height: 48px; place-items: center; color: #68747a; cursor: pointer; list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary > span, .site-menu summary > span::before, .site-menu summary > span::after { display: block; width: 34px; height: 4px; background: currentColor; }
.site-menu summary > span { position: relative; }
.site-menu summary > span::before, .site-menu summary > span::after { position: absolute; left: 0; content: ""; }
.site-menu summary > span::before { top: -11px; }
.site-menu summary > span::after { top: 11px; }
.site-menu summary:hover, .site-menu summary:focus-visible { color: #00ad42; outline: none; }
.site-menu-panel { position: absolute; z-index: 30; top: calc(100% + 14px); right: 0; display: grid; width: min(340px, calc(100vw - 32px)); padding: 10px; border: 1px solid #d5dadd; border-radius: 7px; background: #fff; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22); }
.site-menu-panel a, .site-menu-action-button { display: flex; width: 100%; min-height: 48px; align-items: center; padding: 8px 16px 8px 43px; border: 0; color: #1b1b1b; border-radius: 5px; background: transparent; font: inherit; font-size: 1rem; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.site-menu-panel a:hover, .site-menu-panel a:focus-visible, .site-menu-action-button:hover, .site-menu-action-button:focus-visible { color: #006d2a; background: #eef8f1; outline: none; }
.site-menu-panel a.is-current { position: relative; color: #006d2a; }
.site-menu-panel a.is-current::before { position: absolute; left: 16px; color: #00ad42; content: "✓"; font-size: 1.15rem; font-weight: 700; }
.site-menu-actions a, .site-menu-actions .site-menu-action-button, .site-menu-logout .site-menu-action-button { padding-left: 16px; }
.site-menu-actions form, .site-menu-logout { margin: 0; }
.site-menu-action-button.is-destructive { color: #9d372e; }
.site-menu-action-button.is-destructive:hover, .site-menu-action-button.is-destructive:focus-visible { color: #7d241d; background: #fbefed; }
.site-menu-separator { height: 1px; margin: 8px 8px; background: #cfd5d8; }
.member-main { width: min(712px, calc(100% - 44px)); margin: 0 auto; padding: 76px 0 90px; }

/* Signed-in home lists */
.member-home, .member-collection-page { display: grid; gap: 58px; }
.member-home-section { min-width: 0; }
.member-section-heading { display: flex; min-height: 62px; align-items: end; justify-content: space-between; gap: 22px; border-bottom: 2px solid #5f6978; }
.member-section-heading h2 { min-width: 0; margin: 0 0 6px; font-size: clamp(1.8rem, 5vw, 2.55rem); font-weight: 400; letter-spacing: -0.045em; line-height: 1.15; }
.member-section-heading h2 a { text-decoration: none; }
.member-section-add { display: grid; width: 56px; height: 56px; flex: 0 0 56px; place-items: center; margin-bottom: 5px; padding: 0 0 5px; border: 0; border-radius: 50%; color: #fff; background: #adc1c5; cursor: pointer; font-size: 3rem; font-weight: 300; line-height: 1; text-decoration: none; }
.member-section-add:hover, .member-section-add:focus-visible { background: #849fa5; outline: 3px solid rgba(0, 173, 66, 0.18); }
.member-row-list { display: grid; }
.member-list-row { display: grid; min-height: 74px; grid-template-columns: 64px minmax(0, 1fr) 30px; gap: 18px; align-items: center; padding: 7px 0 7px 32px; color: #090909; text-decoration: none; }
.member-list-row:hover, .member-list-row:focus-visible { background: #f5f8f6; outline: none; }
.member-list-row strong { min-width: 0; overflow: hidden; font-size: clamp(1.55rem, 4.7vw, 2.35rem); font-weight: 400; letter-spacing: -0.035em; text-overflow: ellipsis; white-space: nowrap; }
.collection-count { display: grid; width: 64px; height: 64px; place-items: center; border: 2px solid #5f6978; border-radius: 8px; color: #4f5968; font-size: 1.8rem; font-weight: 400; }
.member-list-dot { width: 9px; height: 9px; justify-self: center; border-radius: 50%; background: #556071; }
.member-row-chevron { display: block; width: 15px; height: 15px; border-top: 4px solid #aaa; border-right: 4px solid #aaa; transform: rotate(45deg); }
.member-list-row .member-row-chevron { justify-self: end; margin-right: 2px; }
.member-favorite-icon { color: #566273; font-family: Arial, sans-serif; font-size: 3.2rem; font-weight: 400; line-height: 1; text-align: center; }
.member-section-link-heading { align-items: center; }
.member-section-link-heading h2 { margin-bottom: 4px; }
.member-heading-chevron { display: grid; width: 42px; height: 42px; place-items: center; margin-right: -6px; text-decoration: none; }
.member-settings-section { margin-top: 4px; }
.member-placeholder-list .member-list-row { grid-template-columns: 64px minmax(0, 1fr) 30px; }
.member-list-row-empty strong { color: #59645e; font-size: clamp(1.15rem, 3.8vw, 1.7rem); }

.app-home { display: grid; gap: 30px; }
.app-home-heading { max-width: 780px; }
.app-home-heading h1 { margin-bottom: 16px; font-size: clamp(2.6rem, 6vw, 4.8rem); }
.app-home-heading > p:last-child { max-width: 650px; color: var(--muted); font-size: 1rem; }
.flock-page-heading { display: grid; max-width: none; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: start; }
.flock-heading-copy > p:last-child { max-width: 650px; color: var(--muted); font-size: 1rem; }
.flock-page-heading > .button { margin-top: 32px; }
.farm-tile-section { display: grid; gap: 14px; }
.tile-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.tile-section-heading .eyebrow { margin-bottom: 4px; }
.tile-section-heading h2 { margin-bottom: 13px; font: 600 1.55rem "Quicksand", sans-serif; }
.farm-tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 13px; }
.farm-access-tile { display: grid; min-height: 132px; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 17px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--panel); box-shadow: 0 8px 24px rgba(42, 55, 45, 0.05); text-decoration: none; transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.farm-access-tile:hover, .farm-access-tile:focus-visible { border-color: #aebfb1; box-shadow: 0 14px 32px rgba(42, 55, 45, 0.1); outline: none; transform: translateY(-2px); }
.species-icon { display: grid; width: 72px; height: 72px; place-items: center; color: var(--green-deep); font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-size: 3.35rem; filter: grayscale(1) brightness(0); opacity: 0.76; line-height: 1; transform: scaleX(-1); }
.species-icon-chickens { font-family: "Segoe UI Symbol", "Segoe UI Emoji", sans-serif; }
.species-icon-other { transform: none; }
.species-icon-small { width: 46px; height: 46px; font-size: 2.25rem; }
.tile-copy { display: grid; gap: 4px; }
.tile-copy strong { font: 600 1.28rem "Quicksand", sans-serif; }
.tile-copy > span { color: var(--muted); font-size: 0.82rem; }
.tile-chevron { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; align-self: center; justify-self: end; color: #7f9184; }
.tile-chevron::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.tile-chevron-right::before { transform: rotate(-45deg); }
.tile-chevron-down::before { transform: rotate(45deg) translate(-1px, -1px); }
.pasture-shape { display: block; width: 72px; height: 66px; border: 3px solid var(--green); background: #cbd8b9; clip-path: polygon(8% 22%, 42% 4%, 92% 18%, 80% 86%, 31% 96%, 3% 64%); }
.pasture-shape-canvas { display: block; width: 72px; height: 66px; }
.pasture-shape-large { width: 180px; height: 150px; }
.pasture-tile-empty { border-style: dashed; background: rgba(255, 255, 255, 0.58); }
.pasture-tile-empty .pasture-shape { opacity: 0.62; }
.report-icon { display: flex; width: 72px; height: 66px; align-items: end; justify-content: center; gap: 6px; padding: 10px; color: var(--green); }
.report-icon i { display: block; width: 12px; border-radius: 2px 2px 0 0; background: currentColor; }
.report-icon i:nth-child(1) { height: 38%; }
.report-icon i:nth-child(2) { height: 70%; }
.report-icon i:nth-child(3) { height: 52%; }
.report-icon-large { width: 110px; height: 86px; padding: 8px; }
.report-icon-large i { width: 18px; }
.empty-record-panel { display: grid; max-width: 680px; justify-items: start; gap: 8px; }
.empty-record-panel h2 { margin: 0; font: 600 1.55rem "Quicksand", sans-serif; }
.empty-record-panel p { color: var(--muted); }
.empty-record-panel .button { margin-top: 8px; }
.profile-option-list { display: grid; max-width: 720px; }
.profile-option { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 10px; background: white; text-decoration: none; }
.profile-option span:first-child { display: grid; gap: 3px; }
.profile-option small { color: var(--muted); }
.animal-list { display: grid; max-width: 760px; gap: 12px; }
.animal-list-toolbar { display: grid; width: min(100%, 280px); gap: 5px; }
.animal-list-toolbar label { font-size: 0.78rem; font-weight: 780; }
.animal-list-toolbar select { min-height: 42px; padding: 0 38px 0 12px; border: 1px solid #cfd7d0; border-radius: var(--control-radius); color: var(--ink); background: white; }
.animal-list-toolbar select:focus { outline: 3px solid rgba(49, 92, 69, 0.14); border-color: var(--green); }
.animal-record-grid { display: grid; gap: 8px; }
.animal-record-card { display: grid; min-height: 58px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; text-decoration: none; transition: border-color 150ms ease, transform 150ms ease; }
.animal-record-card:hover, .animal-record-card:focus-visible { border-color: #9caf9e; outline: none; transform: translateY(-1px); }
.animal-record-card[hidden] { display: none; }
.animal-record-copy { display: grid; min-width: 0; gap: 1px; }
.animal-record-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.animal-record-details { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); }
.animal-detail-separator { margin: 0 2px; color: #a4aca7; }
.animal-thumbnail { width: 38px; height: 38px; border-radius: 5px; object-fit: cover; }
.animal-record-card .species-icon-small { width: 38px; height: 38px; font-size: 1.9rem; }
.animal-filter-empty { margin: 4px 0 0; color: var(--muted); font-size: 0.86rem; }
.animal-collection-page .member-main { width: 100%; max-width: none; padding: 28px 0 150px; }
.collection-record-page { min-height: 62vh; }
.animal-collection-page .animal-list { max-width: none; gap: 22px; }
.animal-collection-page .animal-list-toolbar { width: min(712px, calc(100% - 64px)); margin: 0 auto; }
.animal-collection-page .animal-list-toolbar label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.animal-collection-page .animal-list-toolbar select { width: auto; max-width: 100%; min-height: 56px; padding: 0 48px 0 18px; border: 0; border-radius: 7px; color: #111; background-color: #c9c9c9; font-size: 1.35rem; font-weight: 500; }
.animal-collection-page .animal-record-grid { gap: 0; border-top: 1px solid #e0e4e8; }
.animal-collection-page .animal-record-card { min-height: 176px; grid-template-columns: 128px minmax(0, 1fr) 32px; gap: 32px; padding: 24px max(32px, calc((100% - 716px) / 2)); border: 0; border-bottom: 1px solid #dfe3e7; border-radius: 0; }
.animal-collection-page .animal-record-card:hover, .animal-collection-page .animal-record-card:focus-visible { border-color: #dfe3e7; background: #f6f8f7; transform: none; }
.animal-collection-page .animal-thumbnail, .animal-collection-page .animal-record-card .species-icon-small { width: 128px; height: 128px; border-radius: 14px; }
.animal-collection-page .animal-record-card .species-icon-small { font-size: 5.4rem; }
.animal-collection-page .animal-record-copy { gap: 8px; }
.animal-collection-page .animal-record-copy strong { font-size: clamp(2rem, 5vw, 2.65rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.08; }
.animal-collection-page .animal-record-details { gap: 11px; overflow: hidden; color: #566175; font-size: clamp(1.35rem, 4vw, 2rem); line-height: 1.2; white-space: nowrap; }
.animal-collection-page .animal-record-details > span:not(.animal-detail-separator) { overflow: hidden; text-overflow: ellipsis; }
.animal-collection-page .animal-record-card .tile-chevron { width: 28px; height: 42px; }
.animal-collection-page .animal-record-card .tile-chevron::before { width: 18px; height: 18px; border-width: 5px; color: #a2acbc; }
.animal-collection-page .animal-filter-empty { width: min(712px, calc(100% - 64px)); margin: 0 auto; font-size: 1rem; }
.collection-empty-panel { width: min(712px, calc(100% - 44px)); margin: 20px auto 0; }
.collection-floating-add { position: fixed; z-index: 15; right: max(22px, calc((100% - 1120px) / 2)); bottom: max(22px, env(safe-area-inset-bottom)); display: flex; min-width: 240px; min-height: 68px; align-items: center; justify-content: center; padding: 0 28px; border-radius: 999px; color: #fff; background: #00ad42; box-shadow: 0 10px 30px rgba(0, 96, 38, 0.28); font-size: 1.35rem; font-weight: 700; text-decoration: none; }
.collection-floating-add:hover, .collection-floating-add:focus-visible { background: #008d36; outline: 4px solid rgba(0, 173, 66, 0.22); }

/* Animal record dashboard */
.animal-detail-page { background: #f3f4f5; }
.animal-detail-page .member-main { width: min(780px, 100%); padding: 0 0 90px; }
.animal-detail { display: grid; gap: 0; }
.animal-mini-dashboard { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 26px; padding: 58px 28px 42px; background: #fff; }
.animal-photo-stack { display: grid; align-content: start; justify-items: start; gap: 8px; }
.animal-dashboard-photo { position: relative; display: grid; width: 232px; aspect-ratio: 1; place-items: center; overflow: hidden; border-radius: 10px; background: #edf0ed; box-shadow: -7px 7px 0 #d9deda, -13px 13px 0 #ecefed; }
.animal-dashboard-photo img { width: 100%; height: 100%; object-fit: cover; }
.animal-dashboard-photo .species-icon { width: 100%; height: 100%; font-size: 7.5rem; }
.animal-photo-count { position: absolute; right: 8px; bottom: 8px; display: grid; min-width: 32px; height: 32px; place-items: center; padding: 0 8px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, 0.68); font-size: 0.86rem; font-weight: 700; }
.animal-photo-stack > small { color: #69716c; font-size: 0.78rem; }
.animal-dashboard-copy { min-width: 0; align-self: center; }
.animal-dashboard-main { margin: 0 0 30px; overflow: hidden; font-size: 1.7rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.animal-comparison-list { display: grid; gap: 18px; }
.animal-comparison { display: grid; min-width: 0; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: center; }
.animal-comparison > strong { overflow: hidden; color: #62666a; font-size: 1.55rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.comparison-track { position: relative; display: block; height: 28px; background: #e0e1e2; }
.comparison-value { display: block; width: 100%; height: 100%; appearance: none; border: 0; background: transparent; }
.comparison-value::-webkit-progress-bar { background: transparent; }
.comparison-value::-webkit-progress-value { background: #00ad42; }
.comparison-value::-moz-progress-bar { background: #00ad42; }
.comparison-below .comparison-value::-webkit-progress-value { background: #bb7a22; }
.comparison-below .comparison-value::-moz-progress-bar { background: #bb7a22; }
.comparison-average { position: absolute; z-index: 1; top: -10px; left: 50%; width: 2px; height: 48px; background: #5e6062; transform: translateX(-50%); }

.animal-detail-accordion { border-top: 7px solid #e1e4e7; }
.animal-detail-section { position: relative; border-bottom: 7px solid #e1e4e7; background: #fff; }
.animal-detail-section > summary { display: grid; min-height: 140px; grid-template-columns: 54px minmax(0, 1fr) auto 30px; gap: 28px; align-items: center; padding: 22px 50px; cursor: pointer; list-style: none; }
.animal-detail-section > summary::-webkit-details-marker { display: none; }
.animal-detail-section > summary:hover, .animal-detail-section > summary:focus-visible { background: #f6f8f7; outline: none; }
.animal-detail-section > summary > strong { color: #111; font-size: 2.15rem; font-weight: 500; }
.animal-section-icon { display: grid; width: 50px; height: 50px; place-items: center; color: #747d8d; }
.animal-section-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.animal-section-preview { max-width: 260px; overflow: hidden; color: #566175; font-size: 1.85rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.animal-section-chevron { width: 20px; height: 20px; border-right: 5px solid #9aa4b4; border-bottom: 5px solid #9aa4b4; transform: rotate(45deg); transition: transform 160ms ease; }
.animal-detail-section[open] > summary { padding-right: 50px; }
.animal-detail-section[open] > summary .animal-section-preview { display: none; }
.animal-detail-section[open] > summary .animal-section-chevron { justify-self: end; transform: rotate(225deg); }
.animal-section-add { position: absolute; z-index: 2; top: 43px; right: 82px; display: none; width: 54px; height: 54px; place-items: center; padding: 0 0 4px; border: 0; border-radius: 50%; color: #fff; background: #00ad42; cursor: pointer; font-size: 2.4rem; font-weight: 300; line-height: 1; }
.animal-detail-section[open] > .animal-section-add { display: grid; }
.animal-section-add:hover, .animal-section-add:focus-visible { background: #008d36; outline: 3px solid rgba(0, 173, 66, 0.2); }
.activity-summary-tools { position: absolute; z-index: 3; top: 46px; right: 148px; display: none; align-items: center; gap: 12px; }
.animal-detail-section[open] > .activity-summary-tools { display: flex; }
.activity-tool-button { display: grid; width: 48px; height: 48px; place-items: center; padding: 7px; border: 0; border-radius: 4px; color: #9aa4b4; background: transparent; cursor: pointer; }
.activity-tool-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.activity-tool-button:hover, .activity-tool-button:focus-visible { color: #5e6878; background: #eef0f1; outline: none; }
.activity-tool-button[aria-pressed="true"] { color: #fff; background: #979797; }
.activity-section > .activity-section-add { top: 154px; right: auto; left: 51px; }
.activity-section > .animal-section-body { min-height: 92px; padding-left: 138px; }
.animal-section-body { padding: 8px 32px 30px; }
.animal-statistics-list, .animal-lineage-list { display: grid; margin: 0; }
.animal-statistics-list > div, .animal-lineage-list > div { display: grid; min-height: 50px; grid-template-columns: minmax(130px, 0.65fr) minmax(0, 1.35fr); gap: 22px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e6e9e7; }
.animal-statistics-list dt, .animal-lineage-list dt { color: #616c66; font-size: 0.84rem; font-weight: 700; }
.animal-statistics-list dd, .animal-lineage-list dd { margin: 0; font-size: 1rem; }
.animal-lineage-list a { color: #007e30; font-weight: 700; text-underline-offset: 3px; }
.animal-section-hint { margin: 18px 0 0; color: #777f7b; font-size: 0.78rem; }
.activity-tools { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 12px; margin-bottom: 18px; }
.activity-tools label { display: grid; gap: 5px; color: #616c66; font-size: 0.72rem; font-weight: 700; }
.activity-tools select, .activity-tools input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cbd3ce; border-radius: 5px; color: #111; background: #fff; }
.activity-query-panels { display: grid; gap: 10px; }
.activity-control-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 9px; align-items: center; margin: 0 0 12px; }
.activity-control-row[hidden] { display: none; }
.activity-control-row select, .activity-control-row input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #8f9692; border-radius: 5px; color: #111; background: #fff; font: inherit; }
.activity-control-row button { min-width: 34px; min-height: 34px; padding: 0; border: 0; color: #66707c; background: transparent; cursor: pointer; font-size: 1.55rem; line-height: 1; }
.activity-control-row button:hover, .activity-control-row button:focus-visible { color: #111; outline: 2px solid rgba(0, 173, 66, 0.25); }
.activity-list { display: grid; }
.activity-record { display: block; width: 100%; padding: 16px 0; border: 0; border-bottom: 1px solid #cdd2d0; color: inherit; background: transparent; cursor: pointer; font: inherit; text-align: left; }
.activity-record:hover, .activity-record:focus-visible { background: #f6f8f7; outline: none; }
.activity-record[hidden] { display: none; }
.activity-record > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.activity-type-tag { display: inline-flex; min-height: 28px; align-items: center; color: #111; font-size: 1rem; font-weight: 500; }
.activity-record time { color: #68726d; font-size: 0.78rem; }
.activity-record p { margin: 5px 0 0; overflow: hidden; color: #758091; text-overflow: ellipsis; white-space: nowrap; }
.activity-empty { margin: 8px 0 0; color: #717a75; font-size: 0.86rem; }
.animal-activity-dialog { width: min(580px, calc(100% - 30px)); }
.animal-activity-dialog form { display: grid; gap: 16px; }
.animal-activity-dialog form > label { display: grid; gap: 6px; color: #4e5a53; font-size: 0.8rem; font-weight: 750; }
.animal-activity-dialog form > label small { font-weight: 500; }
.animal-activity-dialog input, .animal-activity-dialog select, .animal-activity-dialog textarea { width: 100%; min-height: 46px; padding: 9px 11px; border: 1px solid #cbd3ce; border-radius: 5px; color: #111; background: #fff; }
.animal-activity-dialog textarea { resize: vertical; }
.animal-note-date-help { margin: -4px 0 0; color: #717a75; font-size: 0.78rem; }
.activity-view-date { margin: 2px 0 18px; color: #68726d; }
.activity-view-description { margin: 0 0 22px; white-space: pre-wrap; }
.activity-view-description.has-no-description { color: #777f7b; font-style: italic; }
.pasture-record-grid { max-width: 760px; }
.pasture-record-card { grid-template-columns: 42px minmax(0, 1fr) auto; }
.pasture-record-card small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.pasture-thumbnail { width: 42px; height: 42px; }
.pasture-collection-page .member-main { width: 100%; max-width: none; padding: 28px 0 150px; }
.pasture-list-page { min-height: 62vh; }
.pasture-list-toolbar { display: grid; width: min(712px, calc(100% - 64px)); margin: 0 auto 22px; gap: 5px; }
.pasture-list-toolbar label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.pasture-list-toolbar select { width: auto; max-width: 100%; min-height: 56px; padding: 0 48px 0 18px; border: 0; border-radius: 7px; color: #111; background-color: #c9c9c9; font-size: 1.35rem; font-weight: 500; opacity: 1; }
.pasture-list-toolbar small { color: #777f7b; font-size: 0.72rem; }
.pasture-collection-page .pasture-record-grid { max-width: none; gap: 0; border-top: 1px solid #e0e4e8; }
.pasture-collection-page .pasture-record-card { min-height: 150px; grid-template-columns: 104px minmax(0, 1fr) 32px; gap: 32px; padding: 22px max(32px, calc((100% - 716px) / 2)); border: 0; border-bottom: 1px solid #dfe3e7; border-radius: 0; }
.pasture-collection-page .pasture-record-card:hover, .pasture-collection-page .pasture-record-card:focus-visible { border-color: #dfe3e7; background: #f6f8f7; transform: none; }
.pasture-collection-page .pasture-thumbnail { width: 104px; height: 104px; }
.pasture-collection-page .pasture-record-copy { gap: 8px; }
.pasture-collection-page .pasture-record-copy strong { font-size: clamp(2rem, 5vw, 2.65rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.08; }
.pasture-collection-page .pasture-record-copy small { color: #566175; font-size: clamp(1rem, 3vw, 1.35rem); }
.pasture-collection-page .pasture-record-card .tile-chevron { width: 28px; height: 42px; }
.pasture-collection-page .pasture-record-card .tile-chevron::before { width: 18px; height: 18px; border-width: 5px; color: #a2acbc; }
.pasture-list-empty { width: min(712px, calc(100% - 64px)); margin: 0 auto; }
.pasture-overview-map { position: relative; width: min(100%, 800px); aspect-ratio: 5 / 3; overflow: hidden; border: 1px solid #bdc8bf; border-radius: 6px; background: #eef1ed; }
.pasture-overview-map img, .pasture-outline-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.pasture-overview-map img { object-fit: contain; }
.pasture-outline-overlay { z-index: 1; }
.pasture-edge-labels, .pasture-edge-inputs { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.pasture-edge-labels span, .pasture-edge-inputs input { position: absolute; transform: translate(-50%, -50%); }
.pasture-edge-labels span { min-width: 74px; padding: 5px 8px; border-radius: 3px; color: #17231c; background: rgba(255, 255, 255, 0.9); box-shadow: 0 1px 5px rgba(24, 45, 32, 0.18); font-size: 0.72rem; font-weight: 750; text-align: center; white-space: nowrap; }
.pasture-outline-stage .pasture-edge-inputs input, .pasture-dimensions-map .pasture-edge-inputs input { width: 96px; min-height: 36px; padding: 5px 7px; border: 1px solid #597163; border-radius: 4px; color: #111; background: rgba(255, 255, 255, 0.96); box-shadow: 0 1px 6px rgba(24, 45, 32, 0.2); font: inherit; font-size: 0.76rem; font-weight: 750; text-align: center; pointer-events: auto; }
.pasture-outline-stage .pasture-edge-inputs input.pasture-edge-preview { border-color: #a5aaa7; color: #5f6461; background: rgba(239, 240, 239, 0.96); box-shadow: 0 1px 4px rgba(50, 53, 51, 0.14); pointer-events: none; }
.pasture-edge-inputs input:focus { z-index: 4; border-color: var(--green); outline: 3px solid rgba(0, 173, 66, 0.2); }
.pasture-detail-page .member-main { width: min(840px, 100%); padding: 0; }
.pasture-detail { min-height: 70vh; background: #f3f4f5; }
.pasture-detail-content { display: grid; gap: 18px; padding: 32px 20px; background: #fff; }
.pasture-detail-content > p { margin: 0; color: #566175; }
.pasture-view-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.pasture-view-choice > span { color: #111; font-size: 1.15rem; font-weight: 750; }
.pasture-view-choice select { width: 100%; min-height: 70px; padding: 0 58px 0 18px; border: 1px solid #6e7471; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 1.55rem; }
.pasture-current-layout { border: 0; border-radius: 0; background: #fff; cursor: pointer; touch-action: none; }
.pasture-current-layout canvas { pointer-events: auto; }
.pasture-selection-help { text-align: center; }
.pasture-record-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; }
.pasture-selected-segment, .pasture-multi-selection { border-top: 8px solid #e1e4e7; background: #fff; }
.pasture-selected-segment > h2, .pasture-multi-selection { margin: 0; padding: 28px 32px; }
.pasture-selected-segment > h2 { display: flex; align-items: center; gap: 14px; font-size: 1.45rem; font-weight: 650; text-transform: uppercase; }
.selected-segment-swatch { width: 54px; height: 24px; border: 2px solid #241c38; background: rgba(105, 79, 190, 0.50); transform: skew(-22deg); }
.pasture-selected-segment .animal-section-body p { margin: 0; color: #566175; }
.pasture-multi-selection { display: grid; gap: 14px; }
.pasture-multi-selection[hidden], .pasture-selected-segment[hidden] { display: none; }
.pasture-multi-selection h2, .pasture-multi-selection p { margin: 0; }
.pasture-multi-selection form { display: flex; justify-content: flex-end; }
.pasture-dimensions-action { width: max-content; justify-self: end; }
.pasture-dimensions-page { min-height: 70vh; padding: 28px 20px; background: #fff; }
.pasture-dimensions-form { display: grid; gap: 18px; }
.pasture-dimensions-form > p { margin: 0; color: #566175; }
.pasture-dimensions-map { width: 100%; }
.pasture-segments-action { width: max-content; justify-self: end; }
.pasture-segments-page { min-height: 70vh; padding: 28px 20px; background: #fff; }
.pasture-segments-form { display: grid; gap: 18px; }
.pasture-segments-form > p { margin: 0; color: #566175; }
.segment-edit-mode { display: grid; gap: 6px; color: #4e5a53; font-size: 0.78rem; font-weight: 750; }
.segment-edit-mode select { min-height: 54px; padding: 8px 46px 8px 14px; border: 1px solid #7a837e; border-radius: 6px; color: #111; background: #fff; font: inherit; font-size: 1.12rem; }
.pasture-segment-notice { min-height: 42px; padding: 10px 12px; border-left: 4px solid #879b8e; color: #425149; background: #f0f4f1; font-size: 0.82rem; }
.pasture-segment-map { width: 100%; cursor: crosshair; touch-action: none; }
.pasture-segment-editor { pointer-events: auto; }
.pasture-segment-labels span { min-width: 64px; padding: 4px 6px; font-size: 0.66rem; }
.pasture-segment-labels span.is-temporary-length { color: #4d5350; background: rgba(232, 234, 233, 0.96); }
.animal-entry-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfd7d0; border-radius: 6px; color: var(--ink); background: white; resize: vertical; }
.breed-composition { display: grid; gap: 13px; }
.breed-rows { display: grid; gap: 10px; }
.breed-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 38px; gap: 10px; align-items: end; }
.breed-name-control { display: grid; }
.breed-name-control select, .breed-name-control input { grid-area: 1 / 1; }
.breed-percentage { display: grid; gap: 5px; color: var(--muted); font-size: 0.7rem; font-weight: 750; }
.breed-percentage input { min-height: 48px; }
.breed-remove { display: grid; width: 38px; height: 48px; place-items: center; padding: 0; border: 1px solid #d9c4c0; border-radius: 6px; color: #9d372e; background: #fff; cursor: pointer; font-size: 1.5rem; }
.breed-remove:hover, .breed-remove:focus-visible { border-color: #9d372e; outline: 3px solid rgba(157, 55, 46, 0.12); }
.breed-add { width: max-content; color: var(--green); font-weight: 750; }
.breed-total { margin: -2px 0 0; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.breed-total.is-invalid { color: #a52f26; }
.pasture-entry-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfd7d0; border-radius: 6px; color: var(--ink); background: white; resize: vertical; }
.animal-type-form-page { min-height: 62vh; background: #fff; }
.animal-type-form { display: grid; max-width: 720px; gap: 30px; margin: 0 auto; padding: 0; box-shadow: none; }
.pasture-outline-field { gap: 11px; }
.record-kind-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0; border: 0; }
.record-kind-choice legend { grid-column: 1 / -1; margin-bottom: 4px; color: var(--ink); font-size: 0.78rem; font-weight: 780; }
.record-kind-choice label { display: grid; min-height: 82px; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 13px; border: 1px solid #cfd7d0; border-radius: 6px; background: #fff; cursor: pointer; }
.record-kind-choice input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }
.record-kind-choice label > span { display: grid; gap: 2px; }
.record-kind-choice small { color: #777f7b; font-size: 0.72rem; font-weight: 500; }
.pasture-image-control { display: grid; max-width: 430px; gap: 6px; color: var(--ink); font-size: 0.78rem; font-weight: 780; }
.pasture-image-control input { min-height: auto; padding: 9px; border: 1px solid #cfd7d0; border-radius: 6px; background: white; }
.pasture-outline-stage { position: relative; width: 100%; aspect-ratio: 5 / 3; overflow: hidden; border-radius: 6px; }
.pasture-outline-editor { display: block; width: 100%; height: 100%; border: 1px solid #bdc8bf; border-radius: 6px; background: #eef1ed; cursor: crosshair; touch-action: none; }
.pasture-outline-editor:focus { outline: 3px solid rgba(49, 92, 69, 0.14); border-color: var(--green); }
.pasture-editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pasture-editor-toolbar > div { display: flex; flex-wrap: wrap; gap: 16px; }
.photo-preview { position: relative; display: grid; width: 148px; height: 148px; place-items: center; overflow: hidden; padding: 0; border: 1px dashed #b9c2bb; border-radius: 6px; color: #919a94; background: #f4f5f3; cursor: pointer; font-size: 0.8rem; font-weight: 750; }
.photo-preview:hover, .photo-preview:focus-visible { border-color: var(--green); color: var(--green); outline: 3px solid rgba(49, 92, 69, 0.14); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-editor-dialog { width: min(580px, calc(100% - 24px)); }
.photo-editor-dialog > p { margin-bottom: 16px; color: var(--muted); font-size: 0.86rem; }
.photo-crop-stage { position: relative; width: min(380px, 100%); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border: 1px solid #c9d0ca; background: #edf0ed; cursor: grab; touch-action: none; }
.photo-crop-stage.is-dragging { cursor: grabbing; }
.photo-crop-stage img { position: absolute; max-width: none; user-select: none; pointer-events: none; transform-origin: center; }
.photo-zoom-control { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 18px; color: var(--ink); font-size: 0.82rem; font-weight: 780; }
.photo-zoom-control input { width: 100%; accent-color: var(--green); }
.photo-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.photo-editor-actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.photo-remove { color: #9d372e; }
.future-upload { display: grid; min-height: 72px; align-content: center; gap: 2px; padding: 10px 13px; border: 1px dashed #b9c6bb; border-radius: 6px; color: var(--muted); background: #f7f9f7; }
.future-upload span { color: var(--ink); font-weight: 720; }

.wizard-wrap { max-width: 920px; margin: 0 auto; }
.wizard-header { margin-bottom: 28px; }
.wizard-header h1 { max-width: 820px; font-size: clamp(2.4rem, 6vw, 4.4rem); }
.wizard-header > p { max-width: 680px; color: var(--muted); }

.steps { display: flex; gap: 10px; margin-bottom: 30px; }
.step { display: flex; flex: 1; align-items: center; gap: 10px; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.step::before { content: ""; width: 10px; height: 10px; border: 2px solid #b6c0b8; border-radius: 50%; }
.step-active { color: var(--green); }
.step-active::before, .step-complete::before { border-color: var(--green); background: var(--green); }

.panel { padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label, .field-label { font-size: 0.87rem; font-weight: 780; }
.field input, .field select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #cfd7d0;
    border-radius: 6px;
    color: var(--ink);
    background: white;
}
.field input:focus, .field select:focus { outline: 3px solid rgba(49, 92, 69, 0.14); border-color: var(--green); }
.fixed-display-style { display: flex; min-height: 42px; align-items: center; padding: 0 11px; border: 1px solid #d7ddd8; border-radius: 5px; color: var(--muted); background: #f5f7f5; font-weight: 650; }
.hint { margin: 0; color: #888888; font-size: 0.8rem; }
.field-error { margin: 0; color: #a52f26; font-size: 0.78rem; font-weight: 800; }
[aria-invalid="true"] { border-color: #b34b42 !important; }
.notice-error { font-weight: 800; }

.template-groups { display: grid; gap: 18px; }
.template-group { padding: 20px; border: 1px solid var(--line); border-radius: 18px; }
.template-group h2 { margin-bottom: 3px; font: 600 1.22rem "Quicksand", sans-serif; }
.template-group > p { margin-bottom: 16px; color: var(--muted); font-size: 0.88rem; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card { display: block; min-height: 100%; padding: 16px; border: 1px solid #d5ddd6; border-radius: var(--control-radius); cursor: pointer; transition: 160ms ease; }
.choice-card strong { display: block; margin-bottom: 4px; }
.choice-card span { display: block; color: var(--muted); font-size: 0.82rem; }
.choice-card small { display: block; margin-top: 10px; color: var(--green); font-weight: 750; }
.choice input:checked + .choice-card { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.choice input:focus-visible + .choice-card { outline: 3px solid rgba(49, 92, 69, 0.2); }

.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.summary-list { display: grid; gap: 0; margin: 24px 0; border-top: 1px solid var(--line); }
.summary-item { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.summary-item dt { color: var(--muted); font-size: 0.83rem; font-weight: 700; }
.summary-item dd { margin: 0; font-weight: 720; }
.notice { margin-bottom: 20px; padding: 14px 16px; border-radius: 13px; color: #3f5947; background: var(--green-soft); font-size: 0.86rem; }
.notice-error { color: #743d35; background: #f6e7e3; }
.notice-success { color: #31533d; background: #e1efe5; }

.settings-heading h1 { margin-bottom: 16px; }
.form-library { display: grid; gap: 12px; }
.form-definition-tile { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--panel); box-shadow: 0 10px 30px rgba(42, 55, 45, 0.05); text-decoration: none; transition: border-color 150ms ease, transform 150ms ease; }
.form-definition-tile:hover, .form-definition-tile:focus-visible { border-color: #9caf9e; outline: none; transform: translateY(-1px); }
.form-definition-tile h2 { margin: 0 0 5px; font: 600 1.35rem "Quicksand", sans-serif; }
.form-definition-tile p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.form-tile-cue { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 780; }
.form-tile-cue small { font-size: 0.75rem; }
.form-tile-cue .tile-chevron { color: var(--green); }
.template-library { display: grid; gap: 14px; }
.template-library-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--panel); box-shadow: 0 10px 30px rgba(42, 55, 45, 0.05); text-decoration: none; transition: border-color 150ms ease, transform 150ms ease; }
.template-library-card:hover, .template-library-card:focus-visible { border-color: #9caf9e; outline: none; transform: translateY(-1px); }
.template-library-card h2 { margin: 4px 0; font: 600 1.45rem "Quicksand", sans-serif; }
.template-library-card p { margin: 0; color: var(--muted); font-size: 0.84rem; }
.template-type { color: var(--green); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.template-card-actions { display: flex; align-items: center; gap: 12px; }
.scope-badge { display: inline-flex; width: max-content; padding: 6px 10px; border-radius: 999px; font-size: 0.73rem; font-weight: 780; }
.scope-global { color: #4f6056; background: #edf0ed; }
.scope-farm { color: #31533d; background: var(--green-soft); }
.scope-line { margin-top: 18px; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.library-heading > div { min-width: 0; }
.library-heading .button { flex: 0 0 auto; margin-bottom: 4px; }
.template-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 13px; color: var(--muted); font-size: 0.76rem; }
.template-preview-panel { display: grid; gap: 24px; }
.template-preview-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.template-preview-heading h2, .template-action-panel h2, .template-secondary-actions h2, .merge-conflicts h2 { margin: 0; font: 600 1.55rem "Quicksand", sans-serif; }
.template-scope-section { display: grid; gap: 10px; }
.template-scope-section h3 { margin: 0; color: var(--muted); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }
.template-data-point-list { display: grid; border-top: 1px solid var(--line); }
.template-data-point { display: grid; grid-template-columns: minmax(180px, 0.7fr) minmax(100px, 0.3fr); gap: 5px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.template-data-point small { color: var(--muted); text-align: right; }
.template-data-point p { grid-column: 1 / -1; margin: 0; color: #888888; font-size: 0.8rem; }
.template-action-panel, .template-secondary-actions { display: grid; grid-template-columns: minmax(230px, 0.9fr) minmax(320px, 1.1fr); gap: 34px; margin-top: 18px; }
.template-action-panel > div > p:last-child, .template-secondary-actions > div > p { margin: 8px 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.55; }
.template-action-panel form, .template-secondary-actions form { display: grid; align-content: start; gap: 12px; }
.template-action-panel label, .template-secondary-actions label { display: grid; gap: 6px; color: var(--muted); font-size: 0.76rem; font-weight: 750; }
.template-action-panel select, .template-secondary-actions input { min-height: 44px; padding: 8px 11px; border: 1px solid #cfd7d0; border-radius: var(--control-radius); color: var(--ink); background: white; }
.template-action-panel .button, .template-secondary-actions .button { justify-self: start; }
.template-delete-row { display: flex; justify-content: flex-end; padding-top: 18px; }
.destructive-link { color: #9d372e; }
.button-danger { color: white; background: #9d372e; }
.merge-template-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.merge-template-form .field-full { grid-column: 1 / -1; }
.merge-template-form select, .merge-template-form input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #cfd7d0; border-radius: var(--control-radius); background: white; }
.merge-conflicts { margin-bottom: 18px; border-color: #e3bbb5; background: #fff8f6; }
.merge-conflicts p, .merge-conflicts li { color: #743d35; font-size: 0.84rem; }
.conflict-resolution-form { display: grid; gap: 12px; margin-top: 18px; }
.conflict-choice { display: grid; gap: 8px; margin: 0; padding: 14px; border: 1px solid #e3bbb5; border-radius: var(--control-radius); background: white; }
.conflict-choice legend { padding: 0 5px; color: var(--ink); font-weight: 760; }
.conflict-choice label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 0.82rem; }
.conflict-choice input { accent-color: var(--green); }

.field-editor { padding-bottom: 24px; }
.field-editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; font-weight: 750; }
.text-link { padding: 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover, .text-link:focus-visible { color: var(--green-deep); outline: none; }
.field-editor-list { display: grid; gap: 0; }
.field-editor-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(340px, 1.4fr); gap: 14px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.field-editor-row:first-child { padding-top: 0; }
.field-editor-title p { margin: 8px 0 0; color: #888888; font-size: 0.8rem; }
.inline-label { width: min(100%, 310px); padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; color: var(--ink); background: transparent; font-weight: 780; }
.inline-label:hover, .inline-label:focus { border-color: #cfd7d0; background: white; outline: none; }
.type-chip { display: inline-flex; margin-left: 6px; padding: 3px 7px; border-radius: 7px; color: var(--muted); background: #eef1ee; font-size: 0.66rem; font-weight: 750; text-transform: uppercase; }
.type-system { color: #725521; background: #f7edd7; }
.field-editor-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.field-editor-controls label, .help-editor, .add-field-form label { display: grid; gap: 5px; color: var(--muted); font-size: 0.73rem; font-weight: 720; }
.field-editor-controls select, .help-editor input, .add-field-form input, .add-field-form select, .add-field-form textarea { min-height: 40px; padding: 8px 10px; border: 1px solid #cfd7d0; border-radius: 5px; color: var(--ink); background: white; }
.add-field-form textarea { resize: vertical; }
.check-control { display: flex !important; min-height: 40px; flex-direction: row; align-items: center; gap: 7px !important; color: var(--ink) !important; }
.check-control input { width: 17px; height: 17px; accent-color: var(--green); }
.help-editor { grid-column: 1 / -1; }
.add-field-panel { display: grid; grid-template-columns: minmax(200px, 0.7fr) minmax(360px, 1.3fr); gap: 34px; margin-top: 20px; }
.add-field-panel h2 { margin-bottom: 8px; font: 600 1.45rem "Quicksand", sans-serif; }
.add-field-panel p:not(.eyebrow) { color: var(--muted); font-size: 0.86rem; }
.add-field-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.add-field-form .field-full { grid-column: 1 / -1; }
.add-field-form .button { justify-self: end; grid-column: 1 / -1; }
.add-data-point-link { display: flex; width: 100%; align-items: center; gap: 9px; padding: 18px 3px; border: 0; border-bottom: 1px solid var(--line); color: var(--green); background: transparent; cursor: pointer; font-size: 0.86rem; font-weight: 800; text-align: left; }
.add-data-point-link > span:first-child { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 1.05rem; line-height: 1; }
.add-data-point-link:hover, .add-data-point-link:focus-visible { color: var(--green-deep); background: #f6f9f6; outline: none; }
.form-dialog > p { margin: 0 0 20px; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.reset-choice-list { display: grid; gap: 9px; }
.reset-choice { display: flex; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: var(--control-radius); cursor: pointer; }
.reset-choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.reset-choice input { margin-top: 3px; accent-color: var(--green); }
.reset-choice span { display: grid; gap: 3px; }
.reset-choice small { color: var(--muted); line-height: 1.35; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.add-field-form .dialog-actions { justify-self: stretch; }
.type-specific-control[hidden] { display: none !important; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.animal-selectors { display: grid; gap: 10px; margin-top: 4px; }
.animal-selector { border: 1px solid #d5ddd6; border-radius: var(--control-radius); background: white; overflow: clip; }
.animal-selector-toggle { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 20px; padding: 0 16px; cursor: pointer; }
.animal-selector-toggle:hover { background: #f7f9f7; }
.animal-selector-checkbox:focus-visible + .animal-selector-toggle { outline: 3px solid rgba(49, 92, 69, 0.2); outline-offset: -3px; }
.animal-selector-checkbox:checked + .animal-selector-toggle { color: var(--green-deep); background: var(--green-soft); }
.animal-chevron { transition: transform 150ms ease; }
.animal-selector-checkbox:checked + .animal-selector-toggle .animal-chevron { transform: rotate(180deg); }
.animal-selector-checkbox:not(:checked) ~ .animal-layout-options { display: none; }
.animal-layout-options { padding: 16px; border-top: 1px solid var(--line); }
.animal-layout-options > p { margin-bottom: 12px; color: var(--muted); font-size: 0.82rem; }
.layout-choice-list { display: grid; gap: 10px; }
.layout-choice { position: relative; display: block; }
.layout-choice > input { position: absolute; opacity: 0; pointer-events: none; }
.layout-choice-body { display: grid; gap: 5px; padding: 14px; border: 1px solid #d5ddd6; border-radius: var(--control-radius); cursor: pointer; }
.layout-choice-body > span:not(.layout-choice-heading) { color: var(--muted); font-size: 0.82rem; }
.layout-choice-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.layout-choice-heading small { padding: 3px 7px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-weight: 750; }
.layout-choice > input:checked + .layout-choice-body { border-color: var(--green); background: #f5f9f5; box-shadow: inset 0 0 0 1px var(--green); }
.layout-choice > input:focus-visible + .layout-choice-body { outline: 3px solid rgba(49, 92, 69, 0.2); }
.field-count-button { justify-self: start; padding: 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 0.78rem; font-weight: 780; text-decoration: underline; text-underline-offset: 3px; }
.field-dialog { width: min(520px, calc(100% - 30px)); padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; box-shadow: var(--shadow); }
.field-dialog::backdrop { background: rgba(0, 0, 0, 0.85); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin-bottom: 10px; font: 600 1.6rem "Quicksand", sans-serif; }
.dialog-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--control-radius); color: var(--ink); background: white; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.field-dialog ul { columns: 2; margin: 10px 0 0; padding-left: 20px; }
.field-dialog li { break-inside: avoid; margin-bottom: 7px; }
.field-dialog-note { margin: 18px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.76rem; }

.setup-fieldset { min-width: 0; margin: 8px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); }
.setup-fieldset legend { padding: 0; font-size: 0.98rem; font-weight: 780; }
.pasture-choice .choice-card { padding: 18px; }
.pasture-choice .field-count-button { margin-top: 12px; }
.contact-section > .hint { margin: -2px 0 10px; }
.contact-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-method { display: flex; min-height: 48px; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #d5ddd6; border-radius: var(--control-radius); cursor: pointer; }
.contact-method:has(input:checked) { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.contact-method input, .remember-choice input { width: 17px; height: 17px; min-height: 17px; padding: 0; border: 0; accent-color: var(--green); }
.contact-input { display: grid; gap: 8px; margin-top: 4px; }
.contact-input[hidden] { display: none; }
.contact-input input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #cfd7d0; border-radius: 6px; }
.remember-choice { display: flex; align-items: center; gap: 9px; margin-top: 4px; font-size: 0.87rem; cursor: pointer; }
.verify-wrap { max-width: 680px; }
.verify-panel { display: grid; gap: 22px; }
.preview-code { display: grid; gap: 4px; padding: 18px; border: 1px dashed #9bb1a0; border-radius: var(--control-radius); background: var(--green-soft); text-align: center; }
.preview-code span { color: var(--muted); font-size: 0.78rem; font-weight: 780; text-transform: uppercase; letter-spacing: 0.08em; }
.preview-code strong { font-size: 2rem; letter-spacing: 0.25em; }
.preview-code small { color: var(--muted); }
.code-input { max-width: 260px; font-size: 1.35rem; letter-spacing: 0.3em; text-align: center; }

.layout-switch-panel { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.2fr); gap: 30px; margin-bottom: 20px; }
.layout-switch-panel h2 { margin-bottom: 8px; font: 600 1.45rem "Quicksand", sans-serif; }
.layout-switch-panel p:not(.eyebrow) { color: var(--muted); font-size: 0.84rem; }
.layout-switch-options { display: grid; gap: 8px; margin-bottom: 12px; }
.layout-switch-choice { display: flex; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: var(--control-radius); cursor: pointer; }
.layout-switch-choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.layout-switch-choice input { accent-color: var(--green); }
.layout-switch-choice span { display: grid; gap: 2px; }
.layout-switch-choice small { color: var(--muted); }

.site-footer { padding: 0 0 36px; color: var(--muted); font-size: 0.8rem; }

@media (max-width: 780px) {
    .header-note { display: none; }
    main { padding-top: 24px; }
    .hero { grid-template-columns: 1fr; gap: 32px; min-height: auto; }
    .landing-header { min-height: 112px; padding-block: 18px; }
    .landing-hero { gap: 30px; padding: 46px 0 0 28px; }
    .landing-intro, .carousel-heading, .landing-actions { width: calc(100% - 28px); }
    .landing-intro h1 { margin-bottom: 26px; font-size: clamp(3.1rem, 13.5vw, 5.7rem); }
    .landing-intro p { font-size: clamp(1.05rem, 4.5vw, 1.45rem); line-height: 1.48; }
    .screen-preview-card { min-width: 0; flex-basis: min(72vw, 340px); grid-template-rows: minmax(390px, 54vh) auto; }
    .screen-carousel-track { padding-right: 28px; }
    .landing-actions { margin-top: 2px; }
    .screenshot-lightbox { height: calc(100dvh - 50px); border-radius: 28px; }
    .signin-dialog { height: min(760px, calc(100dvh - 44px)); }
    .signin-panel { padding: 84px 44px 44px; }
    .setup-main { padding-top: 62px; }
    .farm-card { max-width: 520px; }
    .field-map { min-height: 240px; }
    .form-grid, .choice-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .steps { overflow-x: auto; }
    .step { min-width: max-content; }
    .summary-item { grid-template-columns: 1fr; gap: 3px; }
    .template-library-card, .template-card-actions { align-items: flex-start; flex-direction: column; }
    .library-heading { align-items: flex-start; flex-direction: column; }
    .template-action-panel, .template-secondary-actions { grid-template-columns: 1fr; }
    .field-editor-row, .add-field-panel, .layout-switch-panel { grid-template-columns: 1fr; }
    .field-dialog ul { columns: 1; }
    .contact-methods { grid-template-columns: 1fr; }
    .farm-tile-grid { grid-template-columns: 1fr; }
    .flock-page-heading { grid-template-columns: 1fr; gap: 6px; }
    .flock-page-heading > .button { width: max-content; margin-top: 0; }
    .member-brand-bar { min-height: 74px; }
    .member-page-bar { min-height: 106px; padding-block: 16px; }
    .member-home-icon { width: 62px; height: 62px; flex-basis: 62px; }
    .member-home-icon img { width: 47px; height: 47px; }
    .member-back-button { width: 62px; height: 62px; flex-basis: 62px; }
    .member-back-button span { font-size: 3rem; }
    .collection-page-identity { gap: 17px; }
    .member-page-identity { gap: 17px; }
    .member-page-tools { gap: 16px; }
    .member-main { padding-top: 58px; }
    .member-home, .member-collection-page { gap: 48px; }
    .animal-collection-page .member-main { padding-top: 26px; }
    .animal-collection-page .animal-record-card { grid-template-columns: 104px minmax(0, 1fr) 28px; gap: 26px; min-height: 150px; }
    .animal-collection-page .animal-thumbnail, .animal-collection-page .animal-record-card .species-icon-small { width: 104px; height: 104px; }
    .animal-collection-page .animal-record-card .species-icon-small { font-size: 4.5rem; }
    .animal-mini-dashboard { grid-template-columns: 185px minmax(0, 1fr); gap: 28px; }
    .animal-dashboard-photo { width: 176px; }
    .animal-dashboard-photo .species-icon { font-size: 6.3rem; }
}

@media (max-width: 480px) {
    .shell { width: min(100% - 22px, 1160px); }
    .site-header { min-height: 66px; }
    main { padding-bottom: 50px; }
    .landing-main { padding-bottom: 34px; }
    .landing-header { min-height: 92px; }
    .landing-wordmark > span { font-size: 2.35rem; }
    .landing-wordmark small { font-size: 0.66rem; }
    .landing-hero { padding-top: 38px; padding-left: 20px; }
    .landing-intro, .carousel-heading, .landing-actions { width: calc(100% - 20px); }
    .landing-intro h1 { font-size: clamp(2.85rem, 14vw, 4.2rem); }
    .screen-preview-card { flex-basis: 78vw; }
    .screen-carousel-track { padding-right: 20px; }
    .carousel-heading > p { font-size: 0.68rem; }
    .landing-button { min-height: 58px; }
    .lightbox-close { width: 58px; height: 58px; font-size: 2.85rem; }
    .signin-dialog { width: calc(100% - 24px); height: calc(100dvh - 30px); border-radius: 25px; }
    .signin-panel { padding: 76px 28px 30px; }
    .signin-panel-header h2 { font-size: 1.75rem; }
    .signin-panel-body { padding-top: 28px; }
    .signin-panel-body h3 { font-size: 1.2rem; }
    .signin-panel-body > p { font-size: 1.04rem; }
    .signin-methods label { font-size: 1.15rem; }
    .signin-contact input, .signin-panel-body input[name="code"] { min-height: 60px; }
    .signin-action { min-height: 62px; }
    .signin-resend { margin-bottom: 30px; }
    .setup-site-header { min-height: 92px; padding-inline: 62px; }
    .setup-back { left: 14px; width: 40px; height: 40px; }
    .setup-main { width: calc(100% - 38px); padding: 54px 0 70px; }
    .setup-page .form-grid { gap: 48px; }
    .panel { padding: 18px; border-radius: 18px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .form-actions form, .form-actions form .button { width: 100%; }
    .add-field-form { grid-template-columns: 1fr; }
    .merge-template-form { grid-template-columns: 1fr; }
    .merge-template-form .field-full { grid-column: auto; }
    .template-data-point { grid-template-columns: 1fr; }
    .template-data-point small { text-align: left; }
    .add-field-form .field-full, .add-field-form .button { grid-column: auto; }
    .form-definition-tile { padding: 17px; }
    .dialog-actions { flex-direction: column-reverse; }
    .dialog-actions .button { width: 100%; }
    .photo-editor-actions { align-items: stretch; flex-direction: column-reverse; }
    .photo-editor-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
    .photo-editor-actions > div .button:first-child { grid-column: 1 / -1; }
    .breed-row { grid-template-columns: minmax(0, 1fr) 88px 36px; gap: 7px; }
    .breed-remove { width: 36px; }
    .record-kind-choice { grid-template-columns: 1fr; }
    .pasture-outline-stage .pasture-edge-inputs input, .pasture-dimensions-map .pasture-edge-inputs input { width: 78px; min-height: 32px; padding: 3px 5px; font-size: 0.68rem; }
    .pasture-edge-labels span { min-width: 62px; padding: 4px 6px; font-size: 0.64rem; }
    .pasture-dimensions-action { width: 100%; }
    .pasture-segments-action { width: 100%; }
    .pasture-segments-page { padding: 20px 14px; }
    .pasture-segment-labels span { min-width: 54px; padding: 3px 4px; font-size: 0.58rem; }
    .member-brand-bar { min-height: 62px; gap: 14px; padding-inline: 15px; }
    .member-farm-name { font-size: 1.2rem; }
    .member-byline { font-size: 1rem; }
    .member-page-bar { min-height: 88px; gap: 12px; padding: 13px 15px; }
    .member-home-icon { width: 52px; height: 52px; flex-basis: 52px; }
    .member-home-icon img { width: 40px; height: 40px; }
    .member-context-stripe { height: 9px; }
    .member-back-button { width: 52px; height: 52px; flex-basis: 52px; }
    .member-back-button span { font-size: 2.55rem; }
    .collection-page-identity { gap: 11px; }
    .collection-page-identity strong { font-size: 1.75rem; }
    .collection-page-identity > span:last-child { font-size: 1.05rem; }
    .member-page-identity { gap: 12px; }
    .member-page-identity strong { font-size: 1.75rem; }
    .member-page-tools { gap: 6px; }
    .member-greeting { display: none; }
    .site-menu summary { width: 42px; height: 42px; }
    .site-menu summary > span, .site-menu summary > span::before, .site-menu summary > span::after { width: 30px; height: 3px; }
    .site-menu summary > span::before { top: -9px; }
    .site-menu summary > span::after { top: 9px; }
    .site-menu-panel { top: calc(100% + 10px); }
    .member-main { width: calc(100% - 32px); padding: 44px 0 64px; }
    .member-home, .member-collection-page { gap: 42px; }
    .member-section-heading { min-height: 53px; }
    .member-section-heading h2 { margin-bottom: 5px; font-size: 1.65rem; }
    .member-section-add { width: 46px; height: 46px; flex-basis: 46px; font-size: 2.4rem; }
    .member-list-row { min-height: 62px; grid-template-columns: 52px minmax(0, 1fr) 24px; gap: 12px; padding-left: 18px; }
    .member-list-row strong { font-size: 1.45rem; }
    .collection-count { width: 52px; height: 52px; font-size: 1.45rem; }
    .member-row-chevron { width: 12px; height: 12px; border-width: 3px; }
    .member-favorite-icon { font-size: 2.6rem; }
    .member-placeholder-list .member-list-row { grid-template-columns: 52px minmax(0, 1fr) 24px; }
    .animal-collection-page .member-main { padding: 20px 0 120px; }
    .animal-collection-page .animal-list { gap: 16px; }
    .animal-collection-page .animal-list-toolbar { width: calc(100% - 32px); }
    .animal-collection-page .animal-list-toolbar select { min-height: 46px; padding-inline: 14px 40px; font-size: 1rem; }
    .animal-collection-page .animal-record-card { min-height: 118px; grid-template-columns: 82px minmax(0, 1fr) 22px; gap: 16px; padding: 16px; }
    .animal-collection-page .animal-thumbnail, .animal-collection-page .animal-record-card .species-icon-small { width: 82px; height: 82px; border-radius: 10px; }
    .animal-collection-page .animal-record-card .species-icon-small { font-size: 3.5rem; }
    .animal-collection-page .animal-record-copy { gap: 5px; }
    .animal-collection-page .animal-record-copy strong { font-size: 1.55rem; }
    .animal-collection-page .animal-record-details { gap: 7px; font-size: 1.05rem; }
    .animal-collection-page .animal-record-card .tile-chevron::before { width: 13px; height: 13px; border-width: 4px; }
    .animal-collection-page .animal-filter-empty { width: calc(100% - 32px); }
    .pasture-list-toolbar { width: calc(100% - 32px); }
    .pasture-list-toolbar select { min-height: 46px; padding-inline: 14px 40px; font-size: 1rem; }
    .pasture-collection-page .pasture-thumbnail { width: 82px; height: 82px; }
    .pasture-collection-page .pasture-record-copy strong { font-size: 1.55rem; }
    .pasture-collection-page .pasture-record-copy small { font-size: 1rem; }
    .pasture-detail-page .member-context-stripe { height: 8px; }
    .pasture-detail-page .member-page-bar { min-height: 66px; padding-block: 8px; }
    .pasture-detail-page .member-back-button { width: 40px; height: 40px; flex-basis: 40px; }
    .pasture-detail-page .member-back-button span { font-size: 2rem; }
    .pasture-detail-page .member-page-identity strong { font-size: 1.55rem; }
    .pasture-detail-page .member-main { padding-top: 0; }
    .pasture-detail-content { padding: 20px 14px; }
    .collection-floating-add { right: 18px; bottom: max(16px, env(safe-area-inset-bottom)); left: 18px; min-width: 0; min-height: 60px; font-size: 1.15rem; }
    .animal-detail-page .member-context-stripe { height: 8px; }
    .animal-detail-page .member-page-bar { min-height: 66px; padding-block: 8px; }
    .animal-detail-page .member-back-button { width: 40px; height: 40px; flex-basis: 40px; }
    .animal-detail-page .member-back-button span { font-size: 2rem; }
    .animal-detail-page .member-page-identity strong { font-size: 1.55rem; }
    .animal-detail-page .member-main { padding-top: 0; }
    .animal-detail { gap: 0; }
    .animal-mini-dashboard { grid-template-columns: 122px minmax(0, 1fr); gap: 18px; padding: 30px 14px 22px; }
    .animal-dashboard-photo { width: 116px; border-radius: 8px; box-shadow: -5px 5px 0 #d9deda, -9px 9px 0 #ecefed; }
    .animal-dashboard-photo .species-icon { font-size: 4.2rem; }
    .animal-photo-count { right: 5px; bottom: 5px; min-width: 26px; height: 26px; padding-inline: 6px; font-size: 0.7rem; }
    .animal-photo-stack > small { font-size: 0.72rem; }
    .animal-dashboard-main { margin-bottom: 19px; font-size: 1.08rem; }
    .animal-comparison-list { gap: 11px; }
    .animal-comparison { grid-template-columns: 54px minmax(0, 1fr); gap: 8px; }
    .animal-comparison > strong { font-size: 0.94rem; }
    .comparison-track { height: 14px; }
    .comparison-average { top: -5px; width: 1px; height: 24px; }
    .animal-detail-accordion { border-top-width: 4px; }
    .animal-detail-section { border-bottom-width: 4px; }
    .animal-detail-section > summary { min-height: 72px; grid-template-columns: 28px minmax(0, 1fr) auto 18px; gap: 16px; padding: 10px 26px; }
    .animal-detail-section > summary > strong { font-size: 1.25rem; }
    .animal-section-icon { width: 28px; height: 28px; }
    .animal-section-preview { max-width: 122px; font-size: 1.16rem; }
    .animal-section-chevron { width: 12px; height: 12px; border-width: 3px; }
    .animal-detail-section[open] > summary { padding-right: 26px; }
    .animal-section-add { top: 16px; right: 84px; width: 38px; height: 38px; font-size: 1.75rem; }
    .activity-summary-tools { top: 14px; right: 88px; gap: 10px; }
    .activity-tool-button { width: 44px; height: 44px; }
    .activity-tool-button { padding: 7px; }
    .activity-section > .activity-section-add { top: 84px; left: 21px; }
    .activity-section > .animal-section-body { min-height: 72px; padding-left: 90px; }
    .animal-section-body { padding: 5px 26px 24px; }
    .animal-statistics-list > div, .animal-lineage-list > div { grid-template-columns: 105px minmax(0, 1fr); gap: 14px; }
    .activity-tools { grid-template-columns: 1fr; }
}
/* One-time production initialization */
.initialize-page .site-header {
    border-top: 0.35rem solid var(--green, #00ad45);
}

.initialize-card {
    max-width: 36rem;
    margin: 3rem auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid #d9dde0;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
}

.initialize-card h1 {
    margin-bottom: 1rem;
}

.initialize-form {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.initialize-form input {
    width: 100%;
}

.initialize-form button,
.initialize-home {
    margin-top: 0.75rem;
}

.initialize-results {
    margin: 1.5rem 0;
}

.initialize-results div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #d9dde0;
}

.initialize-results dd {
    font-weight: 700;
}
