:root {
  color-scheme: light;
  --forest: #1b3026;
  --ink: #203a2e;
  --canvas: #f5f1e7;
  --paper: #fffcf5;
  --rule: #ded6c6;
  --muted: #555b4d;
  --soft: #dce6d5;
  --warm: #ecd6a3;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, main:focus-visible { outline: 2px solid #a77c39; outline-offset: 4px; }
svg { width: 1.28rem; height: 1.28rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: fixed; left: 1rem; top: 1rem; z-index: 5; padding: .8rem; background: var(--paper); transform: translateY(-200%); }
.skip:focus { transform: none; }
.layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; align-self: start; min-height: 100vh; display: flex; flex-direction: column; background: var(--forest); color: var(--soft); padding: 23px 19px 20px; }
.wordmark { display: grid; gap: 11px; padding: 0 5px 18px; border-bottom: 1px solid #405749; color: #fcf3dd; font: 23px/1.13 Georgia, serif; }
.seal { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #587459; border-radius: 50%; background: #2d4938; color: #dde0ac; }
.seal img { display: block; width: 30px; height: 30px; }
.brand-text { display: grid; gap: 5px; }
.established { font: .72rem/1.15 "Segoe UI", system-ui, sans-serif; letter-spacing: .13em; text-transform: uppercase; color: #d8c398; }
nav { display: grid; gap: 4px; margin-top: 15px; }
nav a { display: flex; min-height: 45px; align-items: center; gap: 12px; padding: 8px 11px; border-radius: 6px; border: 1px solid transparent; font-size: .94rem; }
nav a:hover { background: #2b4436; }
nav a[aria-current="page"] { background: #355442; border-color: #52745d; color: #fff8e6; }
.sidebar-note { margin: auto 5px 0; padding-top: 24px; font-size: .8rem; color: #c4d3bc; }
main { min-width: 0; }
.content { max-width: 1240px; margin: 0 auto; padding: 30px 38px 38px; }
h1, h2, h3 { font-family: Georgia, serif; font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 4.2vw, 2.85rem); line-height: 1.13; letter-spacing: -.025em; }
h2 { font-size: 1.6rem; line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.23; }
p { margin: 0; line-height: 1.5; }
.intro { color: var(--muted); margin: 8px 0 23px; }
.hero { position: relative; isolation: isolate; min-height: 312px; display: flex; align-items: end; padding: 25px 29px; color: #fffae9; border-radius: 9px; overflow: hidden; background: var(--forest); }
.hero img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: 53% 51%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(25deg, #172a1fee 1%, #172a1f9c 34%, #172a1f00 75%); }
.hero h2 { font-size: clamp(1.85rem, 3.4vw, 2.35rem); }
.hero p { margin-top: 7px; }
.hero .hero-est { margin: 0 0 7px; color: #f3dfb4; text-transform: uppercase; font-size: .72rem; letter-spacing: .17em; }
.section-title { margin: 24px 0 12px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 10px; }
.card, .jump, .back { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.card { padding: 20px; }
.jump { display: flex; align-items: center; gap: 11px; padding: 15px 17px; min-height: 54px; font-weight: 600; }
.jump:hover, a.card:hover, .back:hover { background: #eeedde; border-color: #9ba38b; }
.back { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 13px; margin-bottom: 12px; }
.meta { margin-top: 4px; color: var(--muted); font-size: .94rem; }
.copy { margin-top: 9px; }
.stack { display: grid; gap: 9px; }
.sample { margin-top: 20px; color: var(--muted); font-size: .875rem; }
.profile { min-height: 135px; }
.profile::after { background: none; }
.profile h2 { text-wrap: initial; }
.tree-card { display: grid; gap: 6px; min-height: 140px; align-content: start; }
.tree-card svg { margin-bottom: 6px; color: #587459; }
.timeline .card { border-left: 3px solid #b5a17a; }
time { color: var(--muted); display: block; margin-bottom: 4px; font-size: .875rem; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 184px minmax(0, 1fr); }
  .content { padding-inline: 24px; }
}
@media (max-width: 650px) {
  .layout { display: block; }
  .sidebar { position: relative; min-height: 0; padding: max(11px, env(safe-area-inset-top)) 18px 11px; }
  .wordmark { display: flex; align-items: center; gap: 10px; border: 0; padding: 0; font-size: 1.23rem; }
  .seal { width: 34px; height: 34px; }
  .seal img { width: 25px; height: 25px; }
  .brand-break, .sidebar-note { display: none; }
  nav { position: fixed; inset: auto 0 0; z-index: 2; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; background: var(--forest); margin: 0; padding: 6px 6px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid #405749; }
  nav a { flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 1px; font-size: clamp(.63rem, 2.9vw, .82rem); white-space: nowrap; }
  .content { padding: 22px 17px calc(90px + env(safe-area-inset-bottom)); }
  .intro { margin-bottom: 17px; }
  .hero { min-height: 244px; padding: 19px; }
  .hero img { object-position: 61% center; }
  .hero p { max-width: 24ch; }
  .profile { min-height: 123px; }
  .card { padding: 16px; }
  .jump { padding: 12px; min-height: 52px; }
}
@media (max-width: 374px) { .trees-grid { grid-template-columns: 1fr; } }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-actions { margin-bottom: 16px; }
.tree-actions { margin-top: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; color: var(--ink); min-height: 44px; padding: 8px 13px; font: inherit; cursor: pointer; text-align: center; }
.button:hover { background: #eeedde; border-color: #9ba38b; }
.button.primary { background: var(--forest); color: #fff8e6; border-color: var(--forest); }
.button.primary:hover { background: #355442; border-color: #355442; }
.button:disabled { opacity: .65; cursor: wait; }
.backup-card { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; }
.profile.with-photo { min-height: 265px; }
.profile.with-photo::after { background: linear-gradient(20deg, #16291fed 5%, #16291f83 46%, transparent 76%); }
.card-photo { width: 100%; aspect-ratio: 2.5; object-fit: cover; border-radius: 5px; margin-bottom: 4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); gap: 8px; }
.photo-card { min-width: 0; display: grid; gap: 5px; padding: 5px; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.photo-card img { width: 100%; aspect-ratio: 1.55; object-fit: cover; border-radius: 5px; }
.photo-card span { padding: 2px 4px 4px; overflow-wrap: anywhere; font-size: .875rem; }
.entry-link { margin: 8px 0 0; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.tree-card h2, .profile h2, .timeline h3, article h2 { overflow-wrap: anywhere; }
dialog { width: min(540px, calc(100% - 24px)); max-height: min(88dvh, 800px); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 9px; padding: 20px; box-shadow: 0 12px 48px #14221947; }
dialog::backdrop { background: #142319a0; }
dialog h2 { margin-bottom: 14px; }
dialog label { display: grid; gap: 5px; margin-bottom: 10px; font-weight: 600; }
dialog :is(input, textarea, select) { min-width: 0; width: 100%; min-height: 42px; border: 1px solid #bdb6a6; border-radius: 5px; background: var(--canvas); color: var(--ink); padding: 7px; font: inherit; font-weight: 400; }
dialog textarea { resize: vertical; min-height: 66px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 9px; }
.form-actions { display: flex; gap: 8px; justify-content: end; margin-top: 14px; }
.form-error { color: #852f20; margin-top: 8px; }
#photo-viewer { width: min(900px, calc(100% - 24px)); }
.viewer-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.viewer-header h2 { margin: 0; }
#viewer-image { display: block; width: 100%; max-height: 64dvh; object-fit: contain; }
.notice { position: fixed; z-index: 4; right: 15px; bottom: 15px; max-width: min(420px, calc(100% - 30px)); background: var(--forest); color: #fff8e6; padding: 9px 14px; border-radius: 6px; }
@media (max-width: 650px) {
  .notice { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .profile.with-photo { min-height: 205px; }
}
@media (max-width: 390px) { .field-grid { grid-template-columns: 1fr; } }

.archive-list {
  list-style: none;
  padding: 0;
  margin: .75rem 0;
  display: grid;
  gap: .75rem;
}

.archive-list li {
  display: grid;
  gap: .25rem;
  overflow-wrap: anywhere;
}

.archive-list li span {
  font-size: .875rem;
}

.preview-notice {
  display: grid;
  gap: .2rem;
  max-width: 1020px;
  margin: 0 auto 1rem;
  padding: .7rem .9rem;
  border: 1px solid var(--rule);
  border-radius: .5rem;
  background: var(--soft);
  color: var(--ink);
  font-size: .85rem;
}

#photo-viewer button[hidden] { display: none; }
