/*
  Food Forest – styled to the Scouts brand (purple primary, forest green and teal supporting colours,
  Nunito Sans). To self-host the brand font (OFL licence, keeps the CSP 'self'-only), add
  wwwroot/fonts/NunitoSans.woff2 and an @font-face rule here; until then the system UI font is used.
*/

:root {
    --scouts-purple: #7413dc;
    --scouts-purple-dark: #4d0d94;
    --scouts-purple-light: #f2eafc;
    --scouts-teal: #088486;
    --scouts-forest: #205b41;
    --scouts-forest-light: #e7f1ec;
    --scouts-green: #23a950;
    --scouts-navy: #003982;
    --scouts-red: #ed3f23;
    --scouts-yellow: #ffe627;
    --scouts-pink: #ffb4e5;
    --beige: #f6eedc;
    --beige-border: #e3d5b3;

    --text: #1d1d1f;
    --text-muted: #5b5b66;
    --border: #d9d6e0;
    --surface: #ffffff;
    --background: #f7f6fa;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(29, 29, 31, .06), 0 4px 16px rgba(29, 29, 31, .06);
    --focus: 0 0 0 3px #ffe627, 0 0 0 5px #1d1d1f;
    font-family: "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--background);
    line-height: 1.55;
    font-size: 1.0625rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 800; color: var(--text); }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--scouts-purple); text-underline-offset: 2px; }
a:hover { color: var(--scouts-purple-dark); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1:focus { outline: none; box-shadow: none; }
img { max-width: 100%; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--scouts-yellow); color: #000; padding: .5rem 1rem; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 1rem; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
main { flex: 1; padding: 2rem 0 3rem; }

/* ---------- Header ---------- */
.site-header { background: var(--scouts-purple); color: #fff; }
.site-header .container { display: flex; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap; padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 900; font-size: 1.35rem; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand .logo { width: 56px; height: auto; flex: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.brand small { display: block; font-size: .72rem; font-weight: 600; opacity: .85; letter-spacing: .02em; }
.header-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-left: auto; }
.header-actions form { margin: 0; }

/* User tile: the signed-in user's account menu */
.user-tile { position: relative; }
.user-tile summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .25rem .6rem .25rem .25rem; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; }
.user-tile summary::-webkit-details-marker { display: none; }
.user-tile summary:hover, .user-tile[open] summary { background: rgba(255, 255, 255, .26); }
.user-tile summary:focus-visible { outline: none; box-shadow: var(--focus); }
.user-tile .avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--scouts-yellow); color: #000; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: .85rem; flex: none; }
.user-tile .chevron { width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.user-tile[open] .chevron { transform: rotate(-135deg) translateY(-2px); }
.user-tile-menu { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 1100; min-width: 16rem; background: var(--surface); color: var(--text); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(29, 29, 31, .22); border: 1px solid var(--border); overflow: hidden; }
.user-tile-who { padding: .8rem 1rem; background: var(--scouts-purple-light); }
.user-tile-who strong, .user-tile-who span { display: block; overflow-wrap: anywhere; }
.user-tile-who span { font-size: .85rem; color: var(--text-muted); }
.user-tile-menu ul { list-style: none; margin: 0; padding: .35rem 0; }
.user-tile-menu li + li:last-child { border-top: 1px solid var(--border); margin-top: .35rem; padding-top: .35rem; }
.user-tile-menu a, .user-tile-menu button, .user-tile-menu .disabled { display: block; width: 100%; text-align: left; padding: .55rem 1rem; color: var(--text); text-decoration: none; font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; }
.user-tile-menu a:hover, .user-tile-menu a:focus-visible, .user-tile-menu button:hover, .user-tile-menu button:focus-visible { background: var(--scouts-purple-light); color: var(--scouts-purple); outline: none; }
.user-tile-menu .disabled { color: var(--text-muted); cursor: default; }
.user-tile-menu .disabled small { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; background: var(--border); font-size: .72rem; font-weight: 700; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--scouts-purple); text-decoration: underline; cursor: pointer; }

/* Management menu, down the left for people who manage a site */
.container.with-menu { max-width: 1400px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; align-items: start; }
.manage-menu { position: sticky; top: 1rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--scouts-purple); padding: 1rem .6rem; }
.manage-menu ul { list-style: none; margin: 0; padding: 0; }
.manage-menu-title { margin: 0 .5rem .5rem; font-weight: 900; font-size: 1.05rem; color: var(--scouts-purple); }
.manage-menu-group { margin: 1rem .5rem .3rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.manage-menu a { display: block; padding: .4rem .55rem; border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.manage-menu a:hover { background: var(--scouts-purple-light); color: var(--scouts-purple); }
.manage-menu a.active { background: var(--scouts-purple); color: #fff; }
.page-body { min-width: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--scouts-forest); color: #fff; padding: 2rem 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .provided-by { margin: .75rem 0 0; opacity: .9; }
.scouts-logo { display: flex; align-items: center; }
.scouts-logo img { height: 44px; width: auto; display: block; }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Page furniture ---------- */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-header h1 { margin-bottom: .25rem; }
.page-header .lead { color: var(--text-muted); margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 800; color: var(--scouts-teal); margin-bottom: .35rem; }
.breadcrumbs { font-size: .92rem; margin-bottom: 1rem; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs span[aria-hidden] { margin: 0 .4rem; }
.muted { color: var(--text-muted); }
.small { font-size: .9rem; }
.uppercase { text-transform: uppercase; }
.uppercase::placeholder { text-transform: none; }
.pre-line { white-space: pre-line; }
.section-gap { margin-top: 2rem; }
.spaced { margin-top: 1rem; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain legend { padding: 0; }

.hero { background: linear-gradient(135deg, var(--scouts-forest) 0%, var(--scouts-teal) 100%); color: #fff; border-radius: calc(var(--radius) * 1.5); padding: clamp(1.75rem, 5vw, 3.25rem); margin-bottom: 2rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.hero .eyebrow { color: var(--scouts-yellow); }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); }
.hero p { font-size: 1.15rem; opacity: .95; }
.hero-intro { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }
.hero-logo { width: clamp(140px, 16vw, 200px); height: auto; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); }
.hero-card { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius); padding: 1.5rem; }
.hero-card label { color: #fff; }
.hero-card h2 { color: #fff; font-size: 1.2rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.card + .card { margin-top: 1.25rem; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; height: 100%; }
.card-link:hover { color: inherit; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(29,29,31,.08), 0 10px 24px rgba(29,29,31,.1); }
.card-link h3 { color: var(--scouts-purple); }
.card.accent-forest { border-top: 5px solid var(--scouts-forest); }
.card.accent-purple { border-top: 5px solid var(--scouts-purple); }
.card.accent-teal { border-top: 5px solid var(--scouts-teal); }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 2fr 1fr; align-items: start; }
.stack > * + * { margin-top: 1.25rem; }

.meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--text-muted); font-size: .92rem; margin: 0; }
.meta dt { font-weight: 800; color: var(--text); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0; }
.facts dt { font-weight: 800; }
.facts dd { margin: 0; }

.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 800; background: var(--scouts-purple-light); color: var(--scouts-purple-dark); white-space: nowrap; }
.badge.forest { background: var(--scouts-forest-light); color: var(--scouts-forest); }
.badge.grey { background: #ececf0; color: #45454f; }
.badge.red { background: #fde4df; color: #a32612; }
.tree-ref { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: .08em; }
.coords { display: inline-flex; flex-wrap: wrap; gap: .25rem .8rem; align-items: baseline; }
.grid-ref { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; color: var(--text-muted); }
.w3w { color: #e11f26; font-weight: 700; text-decoration: none; }
.w3w:hover { text-decoration: underline; }

.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; padding: .1rem .55rem; border-radius: 999px; background: var(--scouts-forest); color: #fff; font-weight: 800; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.15rem; border-radius: 8px; border: 2px solid var(--scouts-purple); background: var(--scouts-purple); color: #fff; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--scouts-purple-dark); border-color: var(--scouts-purple-dark); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--scouts-purple); }
.btn.secondary:hover { background: var(--scouts-purple-light); }
.btn.forest { background: var(--scouts-forest); border-color: var(--scouts-forest); }
.btn.forest:hover { background: #164430; border-color: #164430; }
.btn.yellow { background: var(--scouts-yellow); border-color: var(--scouts-yellow); color: #000; }
.btn.danger { background: #fff; border-color: var(--scouts-red); color: #b62a14; }
.btn.danger:hover { background: #fde4df; }
.btn.danger.solid { background: var(--scouts-red); color: #fff; }
.btn.small { padding: .35rem .75rem; font-size: .9rem; }
.btn.block { width: 100%; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
.form { max-width: 640px; }
.field { margin-bottom: 1.15rem; }
.field label, .label { display: block; font-weight: 800; margin-bottom: .3rem; }
.field .hint { display: block; color: var(--text-muted); font-size: .9rem; margin: -.15rem 0 .4rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=number], select, textarea {
    width: 100%; padding: .65rem .8rem; border: 2px solid var(--border); border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--scouts-purple); outline: none; box-shadow: 0 0 0 3px rgba(116, 19, 220, .2); }
textarea { min-height: 110px; resize: vertical; }
.check, .field label.check { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .55rem; font-weight: 600; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--scouts-purple); flex: none; }
.check small { display: block; color: var(--text-muted); font-weight: 400; }
.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .25rem 1rem; }
.validation-message, .field-error { color: #b62a14; font-weight: 700; font-size: .92rem; margin-top: .3rem; }
.validation-errors { color: #b62a14; }
input.invalid, select.invalid, textarea.invalid { border-color: var(--scouts-red); }
.privacy-flag { border-left: 5px solid var(--scouts-yellow); background: #fffbe0; padding: .75rem 1rem; border-radius: 6px; font-size: .93rem; margin-bottom: 1.25rem; }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin-bottom: 0; flex: 1; min-width: 180px; }

/* ---------- Alerts ---------- */
.alert { padding: .9rem 1.1rem; border-radius: 8px; margin-bottom: 1.25rem; border-left: 5px solid; font-weight: 600; }
.alert.info { background: #e6f0fc; border-color: var(--scouts-blue, #006ddf); }
.alert.success { background: var(--scouts-forest-light); border-color: var(--scouts-green); }
.alert.warning { background: #fffbe0; border-color: #e0c600; }
.alert.error { background: #fde4df; border-color: var(--scouts-red); }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 800; background: #faf9fc; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.table .actions { justify-content: flex-end; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs a { padding: .65rem 1rem; text-decoration: none; font-weight: 800; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a:hover { color: var(--scouts-purple); }
.tabs a.active { color: var(--scouts-purple); border-color: var(--scouts-purple); }

/* ---------- Rich content ---------- */
.rich-content { overflow-wrap: anywhere; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin-top: 1.25em; }
.rich-content blockquote { border-left: 4px solid var(--scouts-teal); margin: 1em 0; padding: .25em 1em; color: var(--text-muted); }
.rich-content ul, .rich-content ol { padding-left: 1.4em; }

.editor { border: 2px solid var(--border); border-radius: 8px; background: #fff; }
.editor:focus-within { border-color: var(--scouts-purple); box-shadow: 0 0 0 3px rgba(116, 19, 220, .2); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: .2rem; padding: .4rem; border-bottom: 1px solid var(--border); background: #faf9fc; border-radius: 8px 8px 0 0; }
.editor-toolbar button { border: 1px solid transparent; background: transparent; border-radius: 5px; padding: .3rem .55rem; font: inherit; font-size: .9rem; font-weight: 800; cursor: pointer; min-width: 2.2rem; color: var(--text); }
.editor-toolbar button:hover { background: var(--scouts-purple-light); border-color: var(--border); }
.editor-toolbar .sep { width: 1px; background: var(--border); margin: .2rem .25rem; }
.editor-area { min-height: 220px; padding: .9rem 1rem; outline: none; }
.editor-area:empty::before { content: attr(data-placeholder); color: var(--text-muted); }

/* ---------- Misc ---------- */
.donator { display: flex; gap: 1rem; align-items: center; }
/* Maps */
.tree-map { height: 420px; border-radius: var(--radius); border: 1px solid var(--border); background: #e8efe6; z-index: 0; }
.tree-map.tall { height: 560px; }
.tree-map.short { height: 280px; }
.map-pin { background: var(--scouts-forest); color: #fff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.map-pin-label { font-weight: 800; font-size: .8rem; line-height: 1; }
.map-pin:hover, .map-pin:focus { background: var(--scouts-purple); outline: none; }
.map-area { cursor: pointer; }
.map-area-pill { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; background: var(--scouts-forest); color: #fff; border: 2px solid #fff; border-radius: 999px; padding: .25rem .3rem .25rem .7rem; font-weight: 800; font-size: .85rem; line-height: 1.2; box-shadow: 0 1px 5px rgba(0,0,0,.45); }
.map-area-count { background: #fff; color: var(--scouts-forest); border-radius: 999px; min-width: 1.5rem; padding: 0 .35rem; text-align: center; }
.map-area:hover .map-area-pill, .map-area:focus .map-area-pill { background: var(--scouts-purple); }
.map-area:focus { outline: none; }
.map-area:focus-visible .map-area-pill { box-shadow: var(--focus); }
.area-list { list-style: none; margin: 0; padding: 0; }
.area-list li + li { margin-top: .35rem; }
.area-list a { display: flex; align-items: center; gap: .75rem; border: 1px solid var(--border); border-radius: 10px; padding: .55rem .75rem; color: inherit; text-decoration: none; }
.area-list a:hover, .area-list a:focus-visible { border-color: var(--scouts-forest); background: var(--scouts-forest-light); }
.area-list .name { flex: 1; font-weight: 700; }
.area-list .name small { display: block; font-weight: 400; color: var(--text-muted); }
.area-thumbs { display: flex; flex: none; }
.area-thumbs img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: var(--border); }
.area-thumbs img + img { margin-left: -8px; }
.back-link { display: inline-block; margin-bottom: .5rem; font-weight: 700; }
.map-layout { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); align-items: start; }
.map-layout .tree-map { position: sticky; top: 1rem; }
.type-filter { list-style: none; margin: 0; padding: 0; }
.type-filter li + li { margin-top: .35rem; }
.type-filter button { width: 100%; display: flex; align-items: center; gap: .75rem; text-align: left; background: none; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .75rem; font: inherit; color: inherit; cursor: pointer; }
.type-filter button:hover { border-color: var(--scouts-forest); }
.type-filter button[aria-pressed="true"] { border-color: var(--scouts-forest); background: var(--scouts-forest); color: #fff; }
.type-filter button[aria-pressed="true"] .count-pill { background: #fff; color: var(--scouts-forest); }
.type-filter .name { flex: 1; font-weight: 700; }
.type-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--border); }
.tree-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1rem; }
.tree-links li { break-inside: avoid; padding: .2rem 0; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.map-layout.reverse { grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr); }
.map-layout.single { grid-template-columns: minmax(0, 1fr); }
.whats-growing { margin-top: 1.25rem; }
.whats-growing .type-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1rem; align-items: start; }
.whats-growing .type-filter li + li { margin-top: 0; }
.type-details { margin-top: .35rem; padding: .6rem .8rem .4rem; background: var(--beige); border: 1px solid var(--beige-border); border-radius: var(--radius); }
.type-details h3 { margin: .6rem 0 .3rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.type-details h3:first-child { margin-top: .2rem; }
.type-recipes { margin: 0; padding-left: 1.1rem; }
.whats-growing .type-recipes li + li { margin-top: .2rem; }
.type-areas { list-style: none; margin: 0 0 .5rem; padding: 0; }
.whats-growing .type-areas > li + li { margin-top: .3rem; }
.type-areas details { background: var(--surface); border: 1px solid var(--beige-border); border-radius: 8px; padding: .35rem .6rem; }
.type-areas summary { cursor: pointer; font-weight: 700; }
.type-areas .tree-links { margin-top: .35rem; }
.my-tree-list { list-style: none; margin: 0; padding: 0; }
.my-tree-list li { padding: .6rem 0; border-top: 1px solid var(--border); }
.my-tree-list li:first-child { border-top: 0; padding-top: 0; }
.my-tree-list a { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.my-tree-list a strong { display: block; color: var(--scouts-purple); }
.my-tree-list .small { margin: .25rem 0 0 calc(40px + .75rem); }
@media (max-width: 860px) {
    .map-layout, .map-layout.reverse { grid-template-columns: 1fr; }
    .whats-growing .type-filter { grid-template-columns: 1fr; }
    .map-layout .tree-map { position: static; height: 340px; }
}

/* Tree type photos */
.tree-photo { margin: 0 0 1rem; }
.tree-photo img { display: block; width: 100%; border-radius: calc(var(--radius) - 4px); object-fit: cover; background: var(--border); }
.tree-photo.large img { aspect-ratio: 3 / 2; }
.tree-photo.card-top { margin: -1.5rem -1.5rem 1rem; }
.tree-photo.card-top img { aspect-ratio: 16 / 9; border-radius: var(--radius) var(--radius) 0 0; }
.tree-photo.card-top figcaption { padding: 0 1.5rem; }
.tree-photo figcaption { margin-top: .35rem; font-size: .75rem; color: var(--text-muted); }
.photo-current { max-width: 320px; }

.donator-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--border); padding: 4px; flex: none; }
.donator-logo.placeholder { display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.6rem; color: var(--scouts-purple); background: var(--scouts-purple-light); border: 0; }
.quote { font-style: italic; color: var(--text-muted); margin: .4rem 0 0; }
.stars { color: #e0a800; letter-spacing: .05em; white-space: nowrap; }
.stars .empty { color: #cfcbd8; }
.rating-input { display: inline-flex; gap: .15rem; }
.rating-input button { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: #cfcbd8; padding: 0 .1rem; }
.rating-input button.on { color: #e0a800; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-state h3 { color: var(--text); }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat-tile .value { font-size: 2rem; font-weight: 900; color: var(--scouts-purple); line-height: 1.1; }
.stat-tile .label { color: var(--text-muted); font-weight: 700; font-size: .9rem; margin: 0; }
.qr { width: 180px; height: 180px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.safety { border-left: 5px solid var(--scouts-red); background: #fff4f2; }
.auth-card { max-width: 480px; margin: 1rem auto; }
.loading { color: var(--text-muted); padding: 2rem 0; }
.confirm { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }

#blazor-error-ui { background: #fffbe0; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .75rem 1.25rem; position: fixed; width: 100%; z-index: 1000; font-weight: 700; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

@media (max-width: 860px) {
    .hero, .grid-2 { grid-template-columns: 1fr; }
    .hero-intro { flex-direction: column; align-items: flex-start; }
    .container.with-menu { grid-template-columns: 1fr; gap: 1rem; }
    .manage-menu { position: static; padding: .6rem; }
    .manage-menu nav { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
    .manage-menu ul { display: contents; }
    .manage-menu-group { display: none; }
    .manage-menu-title { margin: 0 .5rem 0 .25rem; width: 100%; }
    .manage-menu a { padding: .3rem .6rem; font-size: .9rem; }
}

@media print {
    .site-header, .site-footer, .manage-menu, .no-print { display: none !important; }
    .container.with-menu { display: block; }
    body { background: #fff; }
    .card { box-shadow: none; border: 0; }
}
