/* Georgetown Community: "Front Porch" design system
   Warm, hand-made and legible. Haint-blue porch ceiling header with a terracotta
   awning, linen page, stitched cards, rubber-stamp dates, sturdy controls.
   CSP-safe: no inline styles/scripts, fonts self-hosted, SVGs as data URIs. */

/* ---------- Fonts (SIL OFL, see static/fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.f1f8a8210104.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-ext-400-normal.fe905e20f857.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.13a58e05dfd2.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-ext-700-normal.764b69c9ccc8.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-400-italic.de4c0c22fd4e.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-ext-400-italic.43bf22741c7e.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/young-serif-latin-400-normal.de140f3124a8.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/young-serif-latin-ext-400-normal.e5cce58aeb58.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --linen: #faf3e8;
  --card: #fffaf2;
  --soft: #f1e6d6;         /* quiet fills: tag.muted, hover rows, code */
  --ink: #2b2420;
  --muted: #62574e;
  --clay: #a4431f;
  --clay-hover: #8a3718;
  --clay-ink: #ffffff;
  --sage: #4f6b46;
  --haint: #d5e8e8;
  --stitch: #c9b69c;

  --success: #3b5634;  --success-bg: #e3eddd;
  --warning: #6a4a0c;  --warning-bg: #f7e8c6;
  --danger:  #8f2f1a;  --danger-bg:  #f6ded5;
  --info:    #24504f;  --info-bg:    #dcebeb;

  --radius: 14px;
  --radius-sm: 10px;
  --pill: 999px;
  --tap: 44px;
  --font-body: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Young Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* The awning edge. SVG data URIs can't read CSS vars, so the colour is baked in and swapped per theme. */
  --awning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='14' viewBox='0 0 32 14'%3E%3Cpath fill='%23a4431f' d='M0 0h32v6a8 8 0 0 1-16 0A8 8 0 0 1 0 6z'/%3E%3C/svg%3E");
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%232b2420' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Front Porch is intentionally light-only; there is no dark palette. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font: 400 18px/1.6 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--clay); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--clay-hover); text-decoration-thickness: 2.5px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: 0; }
h1 { font-size: clamp(1.85rem, 4.5vw, 2.4rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }
h1 a, h2 a, h3 a, h4 a { color: inherit; text-decoration: none; }
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover { color: inherit; text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 2px; }
p { margin: 0 0 0.85rem; }
strong, b { font-weight: 700; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 2px dashed var(--stitch); margin: 1.5rem 0; }

::selection { background: var(--clay); color: var(--clay-ink); }

:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
.medium { max-width: 840px; }
.narrow { max-width: 620px; }

.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus { left: 12px; z-index: 20; background: var(--card); color: var(--ink); padding: 10px 16px; border: 2px solid var(--ink); border-radius: var(--pill); }
.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; }

/* ---------- Header: porch ceiling + awning ---------- */
.site-header { background: var(--haint); position: relative; margin-bottom: 14px; }
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px;
  background: var(--awning) repeat-x left top / 32px 14px; pointer-events: none;
}
.header-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; padding-block: 12px 14px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: var(--tap); }
.brand:hover { color: var(--ink); }
.brand-name { font: 400 1.4rem/1.1 var(--font-display); }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-mark .roof { fill: none; stroke: var(--clay); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .cord, .brand-mark .rays { fill: none; stroke: var(--clay); stroke-width: 2; stroke-linecap: round; }
.brand-mark .lamp { fill: var(--clay); }

.main-nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.main-nav a, .mobile-nav a, .account-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 8px 12px;
  color: var(--ink); font-weight: 700; text-decoration: none; border-radius: var(--pill);
}
.main-nav a:hover, .mobile-nav a:hover, .account-link:hover {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 3px;
}
.account-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.account-nav form { margin: 0; }
.account-nav .link-button { color: var(--ink); padding-inline: 12px; }
.account-nav a.button, .account-nav a.button:hover { color: var(--clay-ink); }

.header-search { display: flex; gap: 6px; align-items: center; }
.header-search input[type="search"] { width: 11rem; min-height: var(--tap); padding: 6px 12px; border-radius: var(--pill); }
.header-search .button { min-height: var(--tap); }

.mobile-menu { display: none; }

/* Wide screens: two tiers inside the haint band. Row 1 brand | search + account; row 2 the full nav. */
@media (min-width: 860px) {
  /* Signed-out / pending: nav is just "News", so keep one row. */
  .site-header:not(.has-member-nav) .main-nav { order: 2; flex: 1 1 auto; margin-inline: 0; padding-top: 0; border-top: 0; }
  .site-header:not(.has-member-nav) .account-nav { order: 3; }
  .header-inner { flex-wrap: wrap; row-gap: 2px; padding-bottom: 8px; }
  .brand { order: 1; }
  .account-nav { order: 2; margin-left: auto; flex-wrap: nowrap; }
  .main-nav {
    order: 3; flex: 1 1 100%; flex-wrap: wrap; gap: 2px 4px; margin-inline: -12px;
    padding-top: 4px; border-top: 2px dashed var(--stitch);
  }
  .main-nav a { white-space: nowrap; }
}
@media (min-width: 860px) and (max-width: 1039px) { .header-search input[type="search"] { width: 8.5rem; } }
.mobile-menu > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 8px 18px;
  border: 2px solid var(--ink); border-radius: var(--pill); font-weight: 700; cursor: pointer; list-style: none;
  background: var(--card);
}
.mobile-menu > summary::-webkit-details-marker { display: none; }
.mobile-menu > summary::before { content: "\2630"; font-size: 1.05em; line-height: 1; }
.mobile-menu[open] > summary::before { content: "\2715"; }
.mobile-nav { display: flex; flex-direction: column; padding: 8px 0 4px; }
.mobile-nav a { border-radius: var(--radius-sm); }

.mobile-account { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0 8px; border-top: 2px dashed var(--stitch); }
.mobile-account form { margin: 0; }
.mobile-account .link-button { color: var(--ink); justify-content: flex-start; padding-inline: 12px; }
.mobile-account .button { align-self: flex-start; }

@media (max-width: 859px) {
  .main-nav, .account-nav { display: none; }
  .header-inner { flex-wrap: nowrap; justify-content: space-between; position: relative; }
  .brand { min-width: 0; }
  .brand { gap: 8px; }
  .brand-name { font-size: 1.2rem; line-height: 1.08; max-width: 7.2em; overflow-wrap: break-word; }
  .mobile-menu > summary { padding: 6px 14px; gap: 6px; font-size: 17px; }
  .mobile-menu { display: block; flex: none; position: static; }
  .mobile-panel {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 10;
    background: var(--haint); padding: 4px 16px 18px; border-bottom: 3px solid var(--clay);
    box-shadow: 0 10px 18px rgb(0 0 0 / 0.18);
  }
  .header-search { flex: 1 1 100%; }
  .header-search input[type="search"] { flex: 1; width: auto; }
}
@media (max-width: 380px) { .brand-name { font-size: 1.1rem; } .brand-mark { width: 36px; height: 36px; } }

main { flex: 1; padding-block: 28px 56px; }

.site-footer { border-top: 2px dashed var(--stitch); color: var(--muted); font-size: 17px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding-block: 18px 28px; }
.site-footer a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* ---------- Buttons ---------- */
.button, button, input[type="submit"], input[type="button"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 8px 22px; border-radius: var(--pill);
  border: 2px solid var(--clay); background: var(--clay); color: var(--clay-ink);
  font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; text-align: center;
}
.button:hover, button:hover, input[type="submit"]:hover {
  background: var(--clay-hover); border-color: var(--clay-hover); color: var(--clay-ink); text-decoration: none;
}
.button:active, button:active { transform: translateY(1px); }
.button.secondary, button.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.button.secondary:hover, button.secondary:hover { background: var(--soft); color: var(--ink); border-color: var(--ink); }
.button.danger, button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.button.danger:hover, button.danger:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.button.small, button.small { padding: 6px 16px; font-size: 0.94rem; }
button:disabled, .button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.link-button, button.link-button {
  background: none; border: 0; padding: 8px 4px; min-height: var(--tap); border-radius: 4px;
  color: var(--clay); font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover, button.link-button:hover { background: none; border: 0; color: var(--clay-hover); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 1.1rem; }
.actions form { margin: 0; }

/* ---------- Cards & layout ---------- */
.card {
  background: var(--card); border: 2px dashed var(--stitch); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
@media (min-width: 640px) { .card { padding: 24px; } }
.card > :last-child { margin-bottom: 0; }
.stack > .card:last-child { margin-bottom: 0; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head > a:not(.button) { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 899px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
.home-grid aside h2 { font-size: 1.3rem; }

.hero { padding: clamp(8px, 3vw, 28px) 0 clamp(20px, 4vw, 36px); margin-bottom: 8px; max-width: 42rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.12; margin-bottom: 0.9rem; }
.hero h1 em { font-style: normal; color: var(--clay); }
.hero .actions { margin-top: 1.4rem; }
.eyebrow { font-weight: 700; font-size: 17px; color: var(--sage); margin-bottom: 0.4rem; letter-spacing: 0.02em; }
.lede { font-size: 1.12rem; max-width: 60ch; color: var(--muted); }

.announcement h3 { font-size: 1.45rem; }
.announcement.pinned { border: 3px solid var(--clay); position: relative; }
.announcement.pinned .tag:first-child, .tag.pinned-tag {
  background: var(--sage); color: var(--linen); padding: 3px 12px; font-size: 15px;
}

.meta { color: var(--muted); font-size: 17px; }
.list-row .meta, .plain-list .meta { display: block; }
.empty { color: var(--muted); font-style: italic; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: var(--pill); font-size: 15px; font-weight: 700; line-height: 1.45;
  background: var(--soft); color: var(--clay); vertical-align: 0.08em; white-space: nowrap;
}
.tag.muted { background: var(--soft); color: var(--muted); }
.tag.ok { background: var(--success-bg); color: var(--success); }
.badge {
  display: inline-block; min-width: 1.6em; padding: 0 0.45em; border-radius: var(--pill); text-align: center;
  background: var(--clay); color: var(--clay-ink); font-size: 15px; font-weight: 700; line-height: 1.55;
}
.badge.muted { background: var(--soft); color: var(--muted); }

.notice {
  background: var(--warning-bg); color: var(--ink); border: 2px solid var(--warning);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
}
.notice a { color: inherit; font-weight: 700; }

.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.message {
  padding: 12px 16px 12px 18px; border-radius: var(--radius-sm); margin-bottom: 8px;
  background: var(--info-bg); color: var(--info); border-left: 6px solid currentColor; font-weight: 700;
}
.message.success { background: var(--success-bg); color: var(--success); }
.message.warning { background: var(--warning-bg); color: var(--warning); }
.message.error { background: var(--danger-bg); color: var(--danger); }
.message.info { background: var(--info-bg); color: var(--info); }
.message a { color: inherit; }

/* ---------- Lists ---------- */
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 10px 0; border-top: 2px dashed var(--stitch); display: flex; flex-direction: column; }
.plain-list li:first-child { border-top: 0; padding-top: 0; }
.plain-list li > a { font-weight: 700; }

.list-card { padding: 6px 0; }
.list-card .empty { padding: 14px 20px; margin: 0; }
.list-card-title { padding: 14px 20px 4px; margin: 0; font-size: 1.3rem; }
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; min-height: 60px;
  padding: 14px 20px; border-top: 2px dashed var(--stitch); color: inherit; text-decoration: none;
}
.list-card > .list-row:first-child, .list-card-title + .list-row { border-top: 0; }
a.list-row:hover { background: var(--soft); color: inherit; }
a.list-row:hover strong { text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a.list-row:focus-visible { outline-offset: -3px; border-radius: var(--radius-sm); }
.list-row-side { text-align: right; flex-shrink: 0; }
.grow { flex: 1; min-width: 0; }

/* Rubber-stamp dates */
.event-row { justify-content: flex-start; gap: 18px; }
.date-chip, .stamp {
  flex: none; width: 68px; height: 68px; border-radius: 50%;
  border: 4px double var(--clay); color: var(--clay);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(-6deg); line-height: 1; background: transparent;
}
.date-chip span, .stamp span { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.date-chip strong, .stamp strong { font: 400 1.6rem/1 var(--font-display); margin-top: 2px; }
.event-row:nth-of-type(even) .date-chip, .stamp-list li:nth-child(even) .date-chip { transform: rotate(4deg); }

.result-list .meta, .result-list .snippet { display: block; }
.section-head h2 .badge { vertical-align: 0.2em; margin-left: 4px; font-family: var(--font-body); }
.stamp-list { list-style: none; padding: 0; margin: 0; }
.stamp-list li { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.stamp-list li + li { border-top: 2px dashed var(--stitch); }
.stamp-list li > div { min-width: 0; }
.stamp-list a { font-weight: 700; }
.stamp-list .meta { display: block; }

.quick-links { display: flex; flex-direction: column; gap: 2px; }
.quick-links a { display: flex; align-items: center; min-height: var(--tap); font-weight: 700; }

/* ---------- Posts ---------- */
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 17px; margin-top: 8px; align-items: center; }
.post-actions a { display: inline-flex; align-items: center; min-height: var(--tap); }
.post-actions form { margin: 0; }
.post.internal { background: var(--warning-bg); border-color: var(--warning); }

.prose { overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 0.85rem; }
.prose li + li { margin-top: 0.25rem; }
.prose blockquote { margin: 0 0 0.85rem; padding: 4px 0 4px 16px; border-left: 4px solid var(--stitch); color: var(--muted); }
.prose pre { background: var(--soft); padding: 12px; border-radius: var(--radius-sm); overflow-x: auto; }
.prose code { font-size: 0.9em; background: var(--soft); padding: 1px 5px; border-radius: 5px; }
.prose pre code { background: none; padding: 0; }
.prose table { display: block; overflow-x: auto; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.2rem; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 1rem; }
.details dt { color: var(--muted); font-weight: 700; }
.details dd { margin: 0; }
@media (max-width: 480px) { .details { grid-template-columns: 1fr; gap: 0; } .details dd { margin-bottom: 8px; } }

/* ---------- Forms (sturdy controls) ---------- */
.form > div, .form > p, .form > fieldset { margin-bottom: 1.1rem; }
.form > button, .form > .button { margin-top: 4px; }
label, legend { display: block; font-weight: 700; margin-bottom: 6px; }
fieldset { border: 2px dashed var(--stitch); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 1rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"],
input[type="datetime-local"], input[type="time"], input[type="number"], input[type="url"], input[type="tel"],
input[type="file"], select, textarea {
  width: 100%; min-height: var(--tap); padding: 9px 14px;
  border: 2px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font: 400 1rem/1.4 var(--font-body);
}
input[type="file"] { padding: 7px 10px; }
input::file-selector-button {
  font: 700 0.94rem var(--font-body); margin-right: 12px; padding: 6px 14px; border-radius: var(--pill);
  border: 2px solid var(--ink); background: var(--soft); color: var(--ink); cursor: pointer;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
select { appearance: none; padding-right: 40px; background: var(--card) var(--select-arrow) no-repeat right 14px center / 14px 9px; }
textarea { resize: vertical; min-height: 7rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
input:focus, select:focus, textarea:focus { outline: 3px solid var(--clay); outline-offset: 2px; border-color: var(--ink); }
input[type="checkbox"], input[type="radio"] {
  width: 22px; height: 22px; min-height: 0; margin: 0 10px 0 0; accent-color: var(--clay); flex: none; vertical-align: -4px;
}
.helptext, .form .helptext { display: block; color: var(--muted); font-size: 17px; margin-top: 6px; font-weight: 400; }
.helptext ul { margin: 4px 0 0; padding-left: 1.2rem; }
.errorlist { list-style: none; padding: 0; margin: 6px 0; color: var(--danger); font-size: 17px; font-weight: 700; }
.errorlist li::before { content: "! "; }
.errorlist.nonfield, .errorlist.nonform { background: var(--danger-bg); padding: 10px 14px; border-radius: var(--radius-sm); }
.form div:has(> .errorlist) input, .form div:has(> .errorlist) select, .form div:has(> .errorlist) textarea { border-color: var(--danger); }
.form div:has(> input[type="checkbox"]) { display: flex; flex-wrap: wrap; align-items: center; }
.form div:has(> input[type="checkbox"]) > label { order: 2; margin: 0; }
.form div:has(> input[type="checkbox"]) > input { order: 1; }
.form div:has(> input[type="checkbox"]) > .helptext, .form div:has(> input[type="checkbox"]) > .errorlist { order: 3; flex-basis: 100%; }
.choice { display: flex; align-items: center; font-weight: 400; min-height: var(--tap); margin: 2px 0; cursor: pointer; }
.choices { border: 0; padding: 0; margin: 0 0 1rem; }
.choices .choice { padding: 6px 14px; border: 2px solid var(--stitch); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--card); }
.choices .choice:has(input:checked) { border-color: var(--clay); background: var(--soft); }

.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.inline-form input[type="text"], .inline-form input[type="email"], .inline-form input[type="search"] { width: auto; min-width: 0; flex: 1 1 160px; }
.inline-form select { width: auto; }
.inline-form label { margin: 0; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }
.filter-bar input, .filter-bar select { width: auto; flex: 1 1 180px; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 17px; }
th, td { text-align: left; padding: 10px 8px; border-top: 2px dashed var(--stitch); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; border-top: 0; }

/* ---------- Polls ---------- */
.results { list-style: none; padding: 0; margin: 1.2rem 0; }
.results li { margin-bottom: 1rem; }
.result-label { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.result-label > span:last-child { color: var(--muted); white-space: nowrap; font-weight: 700; }
progress {
  display: block; width: 100%; height: 14px; appearance: none; -webkit-appearance: none;
  border: 2px solid var(--ink); border-radius: var(--pill); background: var(--card); overflow: hidden; color: var(--clay);
}
progress::-webkit-progress-bar { background: var(--card); border-radius: var(--pill); }
progress::-webkit-progress-value { background: var(--clay); border-radius: var(--pill); }
progress::-moz-progress-bar { background: var(--clay); border-radius: var(--pill); }

/* ---------- Request status ---------- */
.status {
  display: inline-block; padding: 2px 12px; border-radius: var(--pill); font-size: 15px; font-weight: 700; line-height: 1.45;
  background: var(--soft); color: var(--muted); border: 2px solid currentColor; white-space: nowrap;
}
.status-open { background: var(--warning-bg); color: var(--warning); }
.status-in_review { background: var(--info-bg); color: var(--info); }
.status-approved, .status-resolved { background: var(--success-bg); color: var(--success); }
.status-denied { background: var(--danger-bg); color: var(--danger); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0; color: var(--muted); }
.pagination a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 6px 18px;
  border: 2px solid var(--ink); border-radius: var(--pill); color: var(--ink); font-weight: 700; text-decoration: none;
}
.pagination a:hover { background: var(--soft); color: var(--ink); }

/* ---------- Status pages (errors, pending, empty states) ---------- */
.porch-note { text-align: center; padding-block: 32px; }
.porch-note .porch-mark { width: 72px; height: 72px; margin: 0 auto 12px; display: block; }
.porch-note .actions { justify-content: center; }
.porch-note .code { font: 400 1rem var(--font-body); font-weight: 700; color: var(--sage); letter-spacing: 0.06em; margin-bottom: 4px; }
.standalone main { display: flex; align-items: center; }
.standalone main > .card { width: 100%; }

/* ---------- Checklists / result lists (available for feature templates) ---------- */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.checklist li + li { border-top: 2px dashed var(--stitch); }
.checklist li::before {
  content: ""; flex: none; width: 24px; height: 24px; margin-top: 2px; border: 2px solid var(--ink); border-radius: 50%;
}
.checklist li.done::before { background: var(--sage); border-color: var(--sage); box-shadow: inset 0 0 0 4px var(--card); }
.checklist li.done { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.section-head > .meta { flex-basis: 100%; margin: 0; }
.result-list { list-style: none; padding: 0; margin: 0; }
.result-list > li { padding: 14px 0; }
.result-list > li + li { border-top: 2px dashed var(--stitch); }
.result-list .result-title { font: 400 1.2rem/1.3 var(--font-display); display: block; }
.result-list .snippet { margin: 4px 0 0; }
mark { background: var(--warning-bg); color: var(--ink); padding: 0 2px; border-radius: 3px; }
.flag-card { border: 3px solid var(--danger); border-style: solid; }

/* ---------- allauth pages ---------- */
.auth-page h1 { margin-bottom: 1rem; }
.auth-page h2 { margin-top: 1.4rem; }
.auth-page form {
  background: var(--card); border: 2px dashed var(--stitch); border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px;
}
.auth-page form p, .auth-page form > div { margin-bottom: 1.1rem; }
.auth-page form button, .auth-page form input[type="submit"] { margin: 0 8px 8px 0; }
.auth-page form button[type="button"], .auth-page form button[name="action_remove"], .auth-page form button[value="remove"] {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.auth-page hr { border: 0; border-top: 2px dashed var(--stitch); margin: 1.5rem 0; }
.auth-page ul { padding-left: 1.3rem; }
.auth-page ul li + li { margin-top: 4px; }
.auth-page table { margin-bottom: 1rem; }
.auth-page label:has(input[type="checkbox"]), .auth-page label:has(input[type="radio"]) { display: flex; align-items: center; font-weight: 400; min-height: var(--tap); }
.auth-page code { background: var(--soft); padding: 2px 6px; border-radius: 5px; font-size: 0.95em; overflow-wrap: anywhere; }
.auth-page img { background: #fff; padding: 8px; border-radius: var(--radius-sm); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .list-row { flex-wrap: wrap; padding-inline: 16px; }
  .list-card-title, .list-card .empty { padding-inline: 16px; }
  .list-row-side { text-align: left; }
  .event-row { flex-wrap: nowrap; }
  .actions > .button, .hero .actions .button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .button:active, button:active { transform: none; }
}

@media print {
  .site-header, .site-footer, .actions, .post-actions, .mobile-menu { display: none; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #999; }
}

/* ---------- Password show/hide (static/js/password-toggle.js) ---------- */
.password-field { position: relative; display: block; }
.password-field input { padding-right: 56px; }
.password-field .password-toggle {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); min-height: 0; padding: 0; margin: 0;
  background: transparent; border: 0; border-radius: 999px; box-shadow: none;
  color: var(--muted); cursor: pointer;
}
.password-field .password-toggle:hover { background: var(--soft); color: var(--ink); border: 0; }
.password-field .password-toggle:active { transform: translateY(-50%); }
.password-field .password-toggle:focus-visible { outline: 3px solid var(--clay); outline-offset: 1px; }
.password-field .password-toggle svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Member review list (templates/accounts/member_list.html) ---------- */
/* Stacked rows instead of a table, so the action buttons are never off-screen on a phone. */
.member-list { list-style: none; margin: 0; padding: 0; }
.member {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding-block: 16px; border-top: 2px dashed var(--stitch);
}
.member:first-child { border-top: 0; padding-top: 4px; }
.member-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.member-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.member-actions .inline-form { flex-wrap: nowrap; }
@media (max-width: 640px) {
  .member-actions { flex: 1 1 100%; }
  .member-actions .inline-form { flex: 1 1 100%; }
}
