/* Fieldnotes uses the farm's shared navigation with a lighter observation surface. */
.fieldnotes-page {
    --fn-ink: #264b60;
    --fn-muted: #6e91a2;
    --fn-blue: #49a9d3;
    --fn-line: #dfedf5;
    background: radial-gradient(ellipse 60% 35% at 90% 7%, #e1f6ff, transparent 100%),
        radial-gradient(ellipse 50% 30% at 3% 39%, #fffbea, transparent 100%), #f6fbff;
    color: var(--fn-ink);
}
.fieldnotes-page #main-content { min-height: 100vh; }
.fn-shell { width: min(100% - 3rem, 1180px); margin: 0 auto; padding: calc(var(--nav-height) + 2.5rem) 0 3rem; }
.fn-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; color: var(--fn-muted); font-size: 0.78rem; }
.fn-breadcrumb a { color: inherit; text-decoration: none; border-bottom: 1px solid #b8dce9; }
.fn-breadcrumb a:hover, .fn-breadcrumb a:focus-visible { color: #26779b; }
.fn-breadcrumb > span[aria-hidden] { color: #93b8c9; }
.fn-hero { padding-top: clamp(3.5rem, 7vw, 5.8rem); }
.fn-eyebrow { margin: 0; color: #378db3; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.19em; }
.fn-eyebrow > span { margin-right: 0.35rem; color: #ffc34e; font-size: 1.2rem; vertical-align: -0.07em; }
.fn-hero-top { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin: 1.3rem 0 2.4rem; }
.fn-hero h1 { margin: 0; color: var(--fn-ink); font-size: clamp(2.55rem, 5.4vw, 4.5rem); font-weight: 500; letter-spacing: 0.07em; line-height: 1.42; }
.fn-hero h1 span { color: #57b5d6; }
.fn-lead { margin: 1.3rem 0 0; color: #789aac; font-size: 0.9rem; line-height: 2; }
.fn-clock { display: flex; min-width: 10rem; flex-direction: column; align-items: end; gap: 0.4rem; padding-bottom: 0.3rem; color: var(--fn-muted); font-size: 0.82rem; }
.fn-clock > span { color: var(--fn-ink); font-size: clamp(1.5rem, 3vw, 2rem); font-variant-numeric: tabular-nums; font-weight: 350; letter-spacing: 0.04em; }
.fn-clock small { font-size: 0.66rem; }
.fn-trial { display: flex; align-items: center; gap: 0.8rem; margin: 0 0 1.15rem; color: var(--fn-muted); font-size: 0.76rem; }
.fn-trial span { padding: 0.32rem 0.75rem; border: 1px solid #a7dbe9; border-radius: 999px; background: #e8f8ff; color: #28779b; font-weight: 700; }
.fn-cards { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(0.8rem, 2vw, 1.4rem); }
.fn-temperature-panel, .fn-humidity-panel { position: relative; min-width: 0; min-height: 25rem; overflow: hidden; padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: 1.5rem; box-shadow: 0 16px 40px rgb(92 176 218 / 0.075); }
.fn-temperature-panel { background: linear-gradient(133deg, #d9f3ff 0%, #e6f8ff 55%, #fff9df 100%); }
.fn-humidity-panel { background: linear-gradient(138deg, #fff4bd 0%, #fff9db 62%, #eaffee 100%); }
.fn-card-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: start; }
.fn-card-top h2 { margin: 0; color: var(--fn-ink); font-size: 0.94rem; font-weight: 650; letter-spacing: 0.06em; }
.fn-sun-icon { color: #f4b72f; font-size: 1.9rem; line-height: 1; }
.fn-leaf-icon { color: #76bda0; font-size: 1.8rem; line-height: 1; }
.fn-temp-value, .fn-humidity-value { position: relative; z-index: 1; display: flex; align-items: flex-start; color: var(--fn-ink); font-variant-numeric: tabular-nums; font-weight: 280; line-height: 1.15; letter-spacing: -0.07em; }
.fn-temp-value { margin-top: 1.35rem; font-size: clamp(5rem, 10vw, 8.6rem); }
.fn-humidity-value { margin-top: 3rem; font-size: clamp(4.8rem, 8vw, 6.6rem); }
.fn-temp-value small, .fn-humidity-value small { margin: 0.45em 0 0 0.25em; font-size: 0.28em; font-weight: 500; letter-spacing: 0; }
.fn-temp-foot { position: relative; z-index: 1; display: grid; gap: 0.65rem; margin-top: 1.2rem; padding-bottom: 5rem; }
.fn-temp-foot p { margin: 0; color: #66899a; font-size: 0.8rem; line-height: 1.65; }
.fn-temp-foot .fn-range { color: #60879c; font-size: 0.78rem; }
.fn-range strong { color: var(--fn-ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.fn-range > span { margin: 0 0.35rem; color: #a9d5e4; }
.fn-landscape { position: absolute; inset: auto 0 0; height: 8rem; overflow: hidden; pointer-events: none; }
.fn-landscape-sun { position: absolute; right: 16%; bottom: 2.5rem; width: 4.2rem; aspect-ratio: 1; border-radius: 50%; background: #ffd65e; box-shadow: 0 0 0 1rem rgb(255 214 94 / 0.18); opacity: 0.85; }
.fn-hill { position: absolute; left: -10%; width: 120%; height: 9rem; border-radius: 50% 50% 0 0; }
.fn-hill-back { bottom: -6.8rem; transform: rotate(-5deg); background: #a9decb; }
.fn-hill-front { bottom: -8rem; transform: rotate(5deg); background: #82caba; }
.fn-humidity-gauge { position: relative; z-index: 1; width: min(80%, 20rem); margin-top: 1.7rem; }
.fn-gauge-track { height: 0.5rem; overflow: hidden; border-radius: 99px; background: #eedfa0; }
.fn-gauge-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #f3b83c; transition: width 0.5s ease; }
.fn-gauge-labels { display: flex; justify-content: space-between; margin-top: 0.45rem; color: #8b875a; font-size: 0.73rem; }
.fn-humidity-foot { position: relative; z-index: 1; margin: 2.3rem 0 0; color: #6b8068; font-size: 0.8rem; line-height: 1.7; }
.fn-plant { position: absolute; right: 3.5rem; bottom: -0.75rem; width: 8rem; height: 11rem; opacity: 0.65; transform: rotate(8deg); pointer-events: none; }
.fn-stem { position: absolute; left: 50%; bottom: 0; width: 2px; height: 100%; background: #8bbb88; transform: rotate(12deg); }
.fn-leaf { position: absolute; width: 3.4rem; height: 1.5rem; background: #a9d999; border-radius: 100% 4% 100% 4%; }
.fn-leaf-a { left: 0.4rem; bottom: 2.5rem; transform: rotate(27deg); }
.fn-leaf-b { left: 4rem; bottom: 4.2rem; transform: rotate(-35deg); }
.fn-leaf-c { left: 0.3rem; bottom: 6.5rem; transform: rotate(24deg); }
.fn-leaf-d { left: 4rem; bottom: 8.6rem; transform: rotate(-33deg); }
.fn-reading-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; margin: 1rem 0 0; color: var(--fn-muted); font-size: 0.78rem; }
.fn-reading-meta p { margin: 0; line-height: 1.7; }
#fieldnotes-status.is-error { color: #b26254; }
.fn-history { padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(4rem, 7vw, 6rem); }
.fn-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.7rem; }
.fn-section-heading h2 { margin: 0.85rem 0 0.6rem; color: var(--fn-ink); font-size: clamp(1.65rem, 3vw, 2.2rem); font-weight: 550; letter-spacing: 0.06em; }
.fn-section-heading p:last-child { margin: 0; color: var(--fn-muted); font-size: 0.82rem; }
.fn-day-controls { display: flex; align-items: center; gap: 0.5rem; }
.fn-day-controls button, .fn-metric-switch button { cursor: pointer; border: 1px solid #dceff8; background: white; color: var(--fn-ink); font: inherit; }
.fn-day-controls button:first-child, .fn-day-controls button:last-child { width: 2.8rem; min-height: 2.8rem; border-radius: 50%; font-size: 1.15rem; }
#fn-date-pill { min-width: 8.2rem; min-height: 2.8rem; padding: 0.4rem 0.8rem; border-radius: 99px; font-size: 0.78rem; }
.fn-day-controls button:disabled { opacity: 0.32; cursor: default; }
.fn-chart-panel { padding: clamp(1.2rem, 3vw, 2.2rem); border: 1px solid #e4f1f8; border-radius: 1.5rem; background: #fff; box-shadow: 0 18px 45px rgb(60 144 190 / 0.065); }
.fn-chart-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.5rem; color: #7f9fb0; font-size: 0.78rem; }
.fn-metric-switch { display: flex; gap: 0.35rem; }
.fn-metric-switch button { min-height: 2.3rem; padding: 0.3rem 0.9rem; border-radius: 99px; color: #6c97a9; font-size: 0.78rem; }
.fn-metric-switch button[aria-pressed="true"] { border-color: #8ed0e9; background: #e7f7ff; color: #247fa9; font-weight: 700; }
.fn-chart-wrap { position: relative; min-height: 17.5rem; margin-top: 0.7rem; }
#fn-chart { display: block; width: 100%; height: 16.5rem; overflow: visible; }
#fn-chart[hidden] { display: none; }
#fn-chart-empty { display: grid; min-height: 16.5rem; place-items: center; margin: 0; color: var(--fn-muted); font-size: 0.86rem; text-align: center; }
#fn-chart-empty[hidden] { display: none; }
.fn-chart-hours { display: flex; justify-content: space-between; padding-left: 6.4%; padding-right: 1.8%; color: #7f9fb0; font-size: 0.72rem; }
.fn-data-note { margin: 1rem 0 0; color: var(--fn-muted); font-size: 0.76rem; line-height: 1.8; }
.fn-links { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-bottom: 4rem; }
.fn-links a, .fn-footer a { color: #287eaa; text-decoration-color: #8bc9df; text-underline-offset: 0.25em; }
.fn-links a { font-size: 0.88rem; }
.fn-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.8rem 0 0; border-top: 1px solid var(--fn-line); color: #7f9daf; font-size: 0.75rem; }
.fieldnotes-page button:hover:not(:disabled) { filter: brightness(0.97); }
.fieldnotes-page button:focus-visible, .fieldnotes-page a:focus-visible { outline: 2px solid #439bcb; outline-offset: 3px; }
@media (max-width: 800px) {
    .fn-shell { width: min(100% - 2rem, 1180px); }
    .fn-cards { grid-template-columns: 1fr; }
    .fn-temperature-panel, .fn-humidity-panel { min-height: 21rem; }
    .fn-humidity-value { margin-top: 1.6rem; }
}
@media (max-width: 560px) {
    .fn-shell { padding-top: calc(var(--nav-height) + 1.3rem); }
    .fn-hero { padding-top: 3rem; }
    .fn-hero-top { display: block; margin-bottom: 1.6rem; }
    .fn-hero h1 { font-size: clamp(2.4rem, 9vw, 3.2rem); }
    .fn-clock { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 0.4rem; margin-top: 1.7rem; }
    .fn-clock small { display: none; }
    .fn-temperature-panel, .fn-humidity-panel { min-height: 20rem; padding: 1.4rem; border-radius: 1.2rem; }
    .fn-temp-value { font-size: clamp(5.2rem, 20vw, 7.4rem); }
    .fn-humidity-value { font-size: clamp(4.8rem, 19vw, 6.2rem); }
    .fn-plant { right: 1.5rem; opacity: 0.4; }
    .fn-section-heading { align-items: start; flex-direction: column; }
    .fn-day-controls { align-self: flex-end; }
    .fn-chart-panel { padding: 1.2rem 0.8rem; }
    .fn-chart-wrap { min-height: 12rem; }
    #fn-chart { height: 11rem; }
    #fn-chart text { display: none; }
    #fn-chart-empty { min-height: 11rem; }
    .fn-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .fn-gauge-track span { transition: none; }
}

/* Fieldnotes v3: three continuous days on a 24-hour-wide viewport. */
.fieldnotes-page {
    --fn-chart-grid: #dcebf3;
    --fn-chart-boundary: #83b7cc;
    --fn-chart-label: #698fa3;
    position: relative;
    isolation: isolate;
}
.fieldnotes-page::before, .fieldnotes-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease;
}
.fieldnotes-page::after {
    background: radial-gradient(circle at 12% 17%, rgb(236 246 255 / .7) 0 1px, transparent 2px),
        radial-gradient(circle at 83% 12%, rgb(236 246 255 / .6) 0 1px, transparent 2px),
        radial-gradient(circle at 70% 46%, rgb(236 246 255 / .35) 0 1px, transparent 2px),
        radial-gradient(ellipse at 82% 8%, #344d70 0, transparent 42%),
        linear-gradient(155deg, #162740, #0d1b32 70%);
    background-size: 280px 220px, 360px 280px, 430px 330px, auto, auto;
}
.fieldnotes-page #main-content { position: relative; z-index: 1; }
html[data-fn-sky="dawn"] .fieldnotes-page::before {
    opacity: 1;
    background: radial-gradient(ellipse at 85% 20%, #fff1d9, transparent 48%),
        linear-gradient(155deg, #dce8f5, #f9f3e9 75%);
}
html[data-fn-sky="dusk"] .fieldnotes-page::before {
    opacity: 1;
    background: radial-gradient(ellipse at 80% 8%, #ffd8ac, transparent 45%),
        linear-gradient(155deg, #dbe7f1, #f5e5e4 62%, #e4e4f1);
}
html[data-fn-sky="night"] .fieldnotes-page::after { opacity: 1; }
html[data-fn-sky="dawn"] .fieldnotes-page { --fn-ink: #334b68; --fn-muted: #647d93; }
html[data-fn-sky="dusk"] .fieldnotes-page { --fn-ink: #474968; --fn-muted: #716c85; }
html[data-fn-sky="night"] .fieldnotes-page {
    --fn-ink: #e8f3ff;
    --fn-muted: #b4c8da;
    --fn-line: #405673;
    --fn-chart-grid: #354e69;
    --fn-chart-boundary: #829fbb;
    --fn-chart-label: #b8cbdd;
}
.fn-temperature-panel::before, .fn-humidity-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.6s ease;
}
.fn-temperature-panel::before { background: linear-gradient(135deg, #29455e, #233b57 70%, #45506b); }
.fn-humidity-panel::before { background: linear-gradient(135deg, #3c465c, #304a51 70%, #325563); }
html[data-fn-sky="night"] .fn-temperature-panel::before,
html[data-fn-sky="night"] .fn-humidity-panel::before { opacity: 1; }
.fn-landscape, .fn-plant { z-index: 1; }
.fn-hero h1, .fn-hero h1 span, .fn-lead, .fn-temp-foot p, .fn-humidity-foot,
.fn-gauge-labels, .fn-chart-top, .fn-scroll-guide, .fn-data-note, .fn-breadcrumb,
.fn-reading-meta, .fn-section-heading h2, .fn-section-heading p,
.fn-chart-panel, .fn-return-latest, .fn-metric-switch button,
.fn-temp-value, .fn-humidity-value, .fn-card-top h2, .fn-clock > span,
.fn-range strong, .fn-axis {
    transition: color 1.2s ease, background-color 1.2s ease, border-color 1.2s ease;
}
html[data-fn-sky="night"] .fn-hero h1 span { color: #a4d9f0; }
html[data-fn-sky="night"] .fn-lead,
html[data-fn-sky="night"] .fn-temp-foot p,
html[data-fn-sky="night"] .fn-humidity-foot,
html[data-fn-sky="night"] .fn-gauge-labels,
html[data-fn-sky="night"] .fn-chart-top,
html[data-fn-sky="night"] .fn-scroll-guide { color: #bdcfe0; }
html[data-fn-sky="night"] .fn-range strong { color: #f6fbff; }
html[data-fn-sky="night"] .fn-hill-back { background: #547783; }
html[data-fn-sky="night"] .fn-hill-front { background: #3b656e; }
html[data-fn-sky="night"] .fn-sun-icon { font-size: 0; }
html[data-fn-sky="night"] .fn-sun-icon::after { content: "☾"; color: #e5eff9; font-size: 1.9rem; }
html[data-fn-sky="night"] .fn-landscape-sun {
    background: #ecf5ed;
    box-shadow: 0 0 0 1rem rgb(221 242 255 / .1), 0 0 2rem rgb(221 242 255 / .3);
}
html[data-fn-sky="night"] .fn-gauge-track { background: #53636b; }
html[data-fn-sky="night"] .fn-gauge-track span { background: #e4bc68; }
html[data-fn-sky="night"] .fn-trial span { background: #294864; border-color: #658ca6; color: #d5efff; }
html[data-fn-sky="night"] .fn-chart-panel { background: #1d3049; border-color: #47617b; }
html[data-fn-sky="night"] .fn-metric-switch button,
html[data-fn-sky="night"] .fn-return-latest,
html[data-fn-sky="night"] #fn-retry {
    background: #2b425c; border-color: #66809a; color: #e6f2ff;
}
html[data-fn-sky="night"] .fn-metric-switch #fn-show-temp[aria-pressed="true"] {
    background: #315b75; border-color: #8cd3f2; color: #eefaff;
}
html[data-fn-sky="night"] .fn-metric-switch #fn-show-humi[aria-pressed="true"] {
    background: #625138; border-color: #e8bf6c; color: #fff5da;
}
html[data-fn-sky="night"] .fn-links a,
html[data-fn-sky="night"] .fn-footer a,
html[data-fn-sky="night"] .fn-breadcrumb a { color: #a3daf5; }
html[data-fn-sky="night"] #fieldnotes-status.is-error { color: #ffb7a8; }

.fn-reading-meta > div { display: grid; gap: .2rem; }
.fn-status-wrap { justify-items: end; text-align: right; }
#fn-retry, .fn-return-latest {
    min-height: 2.5rem;
    padding: .35rem 1rem;
    border: 1px solid #b9ddea;
    border-radius: 999px;
    background: #fff;
    color: #287eaa;
    font: inherit;
    font-size: .78rem;
    cursor: pointer;
}
#fn-retry[hidden] { display: none; }
#fn-retry:disabled { opacity: .55; cursor: wait; }
.fn-return-latest { white-space: nowrap; }
.fn-metric-switch button { display: inline-flex; align-items: center; gap: .42rem; }
.fn-metric-dot { display: inline-block; width: .58rem; height: .58rem; border-radius: 50%; }
.fn-temp-dot { background: #49a9d3; }
.fn-humi-dot { background: #d49a36; }
.fn-metric-switch #fn-show-humi[aria-pressed="true"] {
    border-color: #e9c98d; background: #fff5df; color: #94652b;
}
.fn-scroll-guide { margin: .9rem 0 .4rem; color: var(--fn-muted); font-size: .75rem; }
.fn-chart-layout { display: flex; min-width: 0; align-items: stretch; gap: .3rem; }
.fn-axis { position: relative; flex: 0 0 3.1rem; height: 280px; color: var(--fn-chart-label); font-variant-numeric: tabular-nums; transition: opacity .25s ease; }
.fn-axis.is-inactive { opacity: .28; }
.fn-axis strong { position: absolute; top: 0; width: 100%; font-size: .75rem; font-weight: 700; }
.fn-axis span { position: absolute; width: 100%; transform: translateY(-50%); font-size: .69rem; }
.fn-axis-temp { text-align: right; }
.fn-axis-humi { text-align: left; }
.fn-chart-viewport {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #8bc5de transparent;
    cursor: grab;
}
.fn-chart-viewport.is-dragging { cursor: grabbing; user-select: none; }
#fn-chart { display: block; width: 300%; max-width: none; height: 280px; pointer-events: none; }
#fn-chart[hidden] { display: none; }
#fn-chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    min-height: 0;
    margin: 0;
    color: var(--fn-muted);
    text-align: center;
}
#fn-chart-empty[hidden] { display: none; }
#fn-chart .fn-grid { stroke: var(--fn-chart-grid); stroke-width: 1; stroke-dasharray: 5 7; }
#fn-chart .fn-hour-grid { stroke: var(--fn-chart-grid); stroke-width: 1; }
#fn-chart .fn-day-boundary { stroke: var(--fn-chart-boundary); stroke-width: 2; stroke-dasharray: 7 6; }
#fn-chart .fn-day-label { fill: var(--fn-chart-label); font-size: 17px; font-weight: 700; }
#fn-chart .fn-hour-label { fill: var(--fn-chart-label); font-size: 15px; }
#fn-chart .fn-line { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#fn-chart .fn-line-temp { stroke: #49a9d3; }
#fn-chart .fn-line-humi { stroke: #d49a36; }
#fn-chart .fn-dot-temp { fill: #49a9d3; }
#fn-chart .fn-dot-humi { fill: #d49a36; }
.fn-visible-range { margin-top: .4rem; color: var(--fn-muted); font-size: .75rem; text-align: center; font-variant-numeric: tabular-nums; }
.fn-value-updated { animation: fn-refresh .65s ease-out; }
@keyframes fn-refresh { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 560px) {
    .fn-status-wrap { justify-items: start; text-align: left; }
    .fn-return-latest { align-self: flex-end; }
    .fn-chart-layout { gap: .15rem; }
    .fn-axis { flex-basis: 2.35rem; height: 215px; }
    .fn-axis span { font-size: .6rem; }
    #fn-chart { height: 215px; }
    #fn-chart text { display: block; }
    #fn-chart .fn-day-label { font-size: 34px; }
    #fn-chart .fn-hour-label { font-size: 28px; }
    .fn-chart-top { align-items: start; }
    .fn-scroll-guide { padding: 0 .35rem; }
}
@media (prefers-reduced-motion: reduce) {
    .fieldnotes-page::before, .fieldnotes-page::after,
    .fn-temperature-panel::before, .fn-humidity-panel::before { transition: none; }
    .fn-value-updated { animation: none; }
}
