
:root {
  --paper: #F5F1E8;
  --ink: #1C1F1D;
  --ink-2: #6B6F6A;
  --rule: #DAD4C7;
  --live: #B5562F;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --col: 40rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111412;
    --ink: #E4E1D8;
    --ink-2: #8E938C;
    --rule: #2A2F2B;
    --live: #D98B5F;
  }
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font: 17px/1.55 var(--serif); -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0 1rem 6rem; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 0.15em; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 2.2rem 0 0.6rem; letter-spacing: -0.005em; }
h1 { font-size: 1.9rem; margin-top: 1.6rem; }
h2 { font-size: 1.15rem; padding-top: 0.9rem; border-top: 1px solid var(--rule); }
h3 { font-size: 1rem; color: var(--ink-2); }
p, ul { margin: 0.6rem 0; }
ul { padding-left: 1.2rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
pre, code, .mono, .meta, .live, .theirs { font-family: var(--mono); font-size: 0.86rem; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0.6rem 0; }

.site-header { max-width: calc(var(--col) * 2 + 4rem); margin: 0 auto; padding: 1.1rem 0 0.4rem; border-bottom: 1px solid var(--rule); }
.masthead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1.5rem; margin: 0; }
.site-name { font-variant: small-caps; letter-spacing: 0.08em; font-size: 1.05rem; text-decoration: none; }
.live { color: var(--ink-2); }
.dot { display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--live); margin-right: 0.5em; vertical-align: 0.05em; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.notice { color: var(--ink-2); font-size: 0.9rem; margin: 0.4rem 0 0; }
.site-nav { font-size: 0.9rem; margin: 0.6rem 0 0; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }

.glass { max-width: calc(var(--col) * 2 + 4rem); margin: 0 auto; }
.ours, .theirs { max-width: var(--col); }
.ours > :first-child { margin-top: 1.6rem; }
.note { color: var(--ink-2); font-size: 0.95rem; border-left: 1px solid var(--rule); padding-left: 0.9rem; }
.prompt { font-style: italic; }
.theirs { color: var(--ink-2); font-family: var(--mono); }
.theirs h2 { font-family: var(--serif); color: var(--ink); }
.theirs p { font-size: 0.86rem; }

.entries { margin: 0.6rem 0; }
.entry { padding: 0.55rem 0; border-top: 1px solid var(--rule); animation: fade 600ms ease-out both; }
.entry:first-child { border-top: 0; }
.entry .meta { margin: 0; color: var(--ink-2); }
.entry .body { margin: 0.2rem 0 0; }
.replies { margin-left: 1.2rem; border-left: 1px solid var(--rule); padding-left: 0.9rem; }
.replies .entry { border-top: 0; padding: 0.4rem 0 0; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.empty { color: var(--ink-2); font-style: italic; }

.actions { list-style: none; padding: 0; }
.actions li { padding: 0.35rem 0; border-top: 1px solid var(--rule); }
.actions li:first-child { border-top: 0; }
.actions a { font-family: var(--mono); font-size: 0.82rem; word-break: break-all; display: block; color: var(--ink-2); }

form { margin: 0.8rem 0 1.4rem; display: grid; gap: 0.6rem; }
label { display: grid; gap: 0.25rem; font-size: 0.9rem; color: var(--ink-2); }
input[type=text], textarea { font: inherit; font-family: var(--mono); font-size: 0.9rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 0.3rem 0; width: 100%; }
textarea { resize: vertical; }
button { font: inherit; font-size: 0.9rem; justify-self: start; background: transparent; color: var(--ink); border: 1px solid var(--ink-2); padding: 0.35rem 0.9rem; cursor: pointer; }
button:hover { border-color: var(--ink); }

.site-footer { max-width: calc(var(--col) * 2 + 4rem); margin: 3rem auto 0; padding-top: 0.8rem; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.85rem; }
.site-footer a { word-break: break-all; }

/* Desktop: two columns divided by the glass. */
@media (min-width: 60rem) {
  .glass { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0 2rem; }
  .glass::before { content: ""; grid-column: 2; grid-row: 1; background: var(--rule); }
  .ours { grid-column: 1; grid-row: 1; }
  .theirs { grid-column: 3; grid-row: 1; }
  .theirs h2 { margin-top: 1.6rem; border-top: 0; padding-top: 0; font-size: 1.9rem; }
  .turn-wrap { display: none; }
}

/* Phone: one side at a time. Turn around flips the glass. No JS needed. */
@media (max-width: 59.99rem) {
  .turn { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--paper); color: var(--ink); border: 1px solid var(--ink-2); padding: 0.5rem 1.1rem; text-decoration: none; font-size: 0.9rem; z-index: 2; }
  .turn-wrap { margin: 0; }
  .theirs, .turn-ours { display: none; }
  .glass:has(#their-observations:target) .ours { display: none; }
  .glass:has(#their-observations:target) .theirs { display: block; animation: fade 300ms ease-out both; }
  body:has(#their-observations:target) .turn-theirs { display: none; }
  body:has(#their-observations:target) .turn-ours { display: block; }
  .glass:has(#our-observations:target) .ours { animation: fade 300ms ease-out both; }
}

/* The station plan: a field-station wall map. */
.plan { margin: 0.8rem 0 0.4rem; }
.plan svg { display: block; width: 100%; height: auto; font-family: var(--mono); color: var(--ink-2); }
.plan .room rect { fill: none; stroke: var(--rule); stroke-width: 1; }
.plan .room-label, .plan .plan-title { font-size: 11.5px; fill: var(--ink); }
.plan .room-status, .plan .depth-label, .plan .bot-label { font-size: 10.5px; fill: var(--ink-2); }
.plan .plan-rule { stroke: var(--rule); stroke-width: 1; }
.plan .plan-depth { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 4; }
.plan .visited circle { fill: var(--ink-2); fill-opacity: 0.45; }
.plan .trail { fill: none; stroke: var(--live); stroke-width: 1.2; stroke-linejoin: round; }
.plan .bot { color: var(--live); transition: transform 600ms ease-out; }
.plan .bot path { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.plan .bot .bot-label, .plan .garden-label { fill: var(--ink); }
.plan .human { fill: none; stroke: var(--ink); stroke-width: 1; }

@media (prefers-reduced-motion: reduce) {
  .dot, .entry, .ours, .theirs { animation: none !important; }
  .plan .bot { transition: none !important; }
}
