/* Self-hosted fonts: no third-party requests. Put the woff2 files in static/fonts/. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #EAF1EE;
  --surface: #FFFFFF;
  --ink: #16324A;
  --ink-hover: #0B1B29;
  --muted: #3B5566;
  /* Accent alternatives: #1F6F8B (sea blue), #2F6B3A (palm green) */
  --accent: #B4471F;
  --photo-1: #D6E4DE;
  --photo-2: #C9DAD3;
  --photo-3: #BDD0C8;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --max: 1120px;
  /* Corners: small for controls (inputs, buttons, notices, tags), medium
     for cards and photos, large for the hero and dialogs. Round things
     (avatar, + and close buttons) use 50%. */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
}

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

/* [hidden] must win over a class that sets display. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* The page is a column at least as tall as the window: <main> takes the
   space left over, so the footer sits at the bottom of a short page and
   after the content of a long one. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
}

main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--ink);
}

a:hover {
  color: var(--ink-hover);
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 700;
}

h2 {
  margin: 0 0 20px;
  font-size: 30px;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* width: 100% keeps it full width in the body's column, where margin: auto
   alone would shrink it to its content. */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}

.brand-icon {
  margin-right: 8px;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 10px 14px;
  font-weight: 600;
  text-decoration: none;
}

/* Account: the avatar, and its menu */

.account {
  position: relative;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.avatar::-webkit-details-marker {
  display: none;
}

.avatar:hover {
  filter: brightness(0.9);
}

.avatar:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  min-width: 220px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(22, 50, 74, 0.18);
}

.account-who {
  margin: 0;
  padding: 8px 12px 12px;
  font-size: 14px;
  color: var(--muted);
}

.account-who strong {
  display: block;
  color: var(--ink);
}

.account-menu a,
.account-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu a:hover,
.account-menu button:hover {
  background: var(--bg);
}

.account-menu form {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--bg);
}

/* Hero */

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 48px;
}

.hero-text,
.hero-photo {
  flex: 1 1 420px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
}

.lede {
  margin: 0;
  max-width: 32rem;
  font-size: 20px;
}

.hero-photo {
  margin: 0;
  height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--photo-2);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* White band: events + photos */

.band {
  background: var(--surface);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.upcoming {
  flex: 1 1 320px;
  min-width: 0;
}

.photos {
  flex: 2 1 520px;
  min-width: 0;
}

.events {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* The title is the card's link, stretched over all of it. */
.event-card {
  position: relative;
}

.event-title {
  text-decoration: none;
}

.event-title::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}

.event-title:focus-visible {
  outline: none;
}

.event-title:focus-visible::after {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.event-card:hover .event-title {
  text-decoration: underline;
}

.event-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 64px;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--display);
  line-height: 1.1;
}

.event-month {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.event-day {
  font-size: 26px;
  font-weight: 700;
}

.event-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.event-title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
}

.event-meta {
  color: var(--muted);
}

.empty {
  margin: 0;
  color: var(--muted);
}

.more {
  display: inline-block;
  margin-top: 24px;
  font-weight: 600;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.photo-grid a {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--photo-1);
}

.photo-grid li:nth-child(3n+2) a {
  background: var(--photo-2);
}

.photo-grid li:nth-child(3n) a {
  background: var(--photo-3);
}

.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Settings */

.settings {
  padding-top: 24px;
  padding-bottom: 56px;
}

.settings h1 {
  margin: 0 0 24px;
  font-size: clamp(32px, 5vw, 44px);
}

.settings-list {
  margin: 0 0 24px;
}

.settings-list dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-list dd {
  margin: 4px 0 0;
  font-size: 20px;
}

.settings-tabs {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  border-bottom: 2px solid var(--photo-3);
}

.settings-tabs a {
  margin-bottom: -2px;
  padding: 10px 16px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.settings-tabs a:hover {
  color: var(--ink);
}

.settings-tabs a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.settings-tabs + .workspace-settings {
  margin-top: 24px;
}

.workspace-settings,
.account-settings {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.workspace-settings h2,
.account-settings h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
}

.workspace-settings h3,
.account-settings h3 {
  margin: 0;
  font-size: 20px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 36rem;
}

.settings-form label {
  margin-top: 4px;
  font-weight: 600;
}

.settings-form input,
.settings-form textarea,
.settings-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--muted);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.settings-form .settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-form .settings-check input {
  width: auto;
  margin: 0;
}

.settings-form input.short {
  max-width: 6rem;
}

.workspace-settings button,
.account-settings button,
.upload form button {
  align-self: flex-start;
  margin-top: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.workspace-settings button:hover,
.account-settings button:hover,
.upload form button:hover {
  filter: brightness(0.9);
}

.workspace-settings button.quiet {
  margin: 0;
  padding: 6px 12px;
  background: none;
  color: var(--ink);
  text-decoration: underline;
}

.hint {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

.members {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.members li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--bg);
}

.member-who {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  min-width: 0;
}

/* An email or edit form goes on its own line under the member. */
.members li {
  flex-wrap: wrap;
}

.member-email {
  overflow-wrap: anywhere;
}

.member-edit {
  flex-basis: 100%;
}

.member-edit summary {
  width: fit-content;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.member-edit summary:hover {
  color: var(--ink);
}

.member-edit .settings-form {
  margin-top: 8px;
}

.member-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.member-you,
.member-phone,
.member-email {
  font-weight: 400;
  color: var(--muted);
}

.settings-notice,
.settings-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-weight: 600;
}

.settings-error {
  color: var(--accent);
}

/* Photos */

.photos-page {
  padding-top: 24px;
  padding-bottom: 56px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.photos-page h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
}

.photos-page > .settings-notice {
  margin-bottom: 24px;
  background: var(--surface);
}

.add-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  cursor: pointer;
}

.add-button:hover {
  filter: brightness(0.9);
}

.add-button:focus-visible,
.dialog-close:focus-visible,
.link-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.add-button svg,
.dialog-close svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.upload {
  width: min(34rem, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
}

.upload::backdrop {
  background: rgba(22, 50, 74, 0.55);
}

.dialog-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload h2 {
  margin: 0;
  font-size: 22px;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -8px -8px -8px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--bg);
}

.dialog-close svg {
  width: 22px;
  height: 22px;
}

.upload form button:disabled {
  cursor: progress;
  filter: saturate(0.5);
}

.delete-preview {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--photo-1);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* The accent button is .upload form button's; this is the quiet one. */
.upload .dialog-actions button.quiet {
  padding: 10px 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.upload-problems {
  display: grid;
  gap: 4px;
  padding-left: 32px;
  list-style: disc;
}

.gallery {
  margin-top: 32px;
}

.photos-page .photo-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 40vw), 1fr));
}

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.pager a {
  padding: 10px 0;
  font-weight: 600;
}

.pager a[rel="next"] {
  justify-self: end;
}

.pager-where {
  color: var(--muted);
}

/* A photo's page */

.photo-page.wrap,
.event-page.wrap {
  max-width: 880px;
  padding-top: 24px;
  padding-bottom: 56px;
}

.back {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 600;
}

.photo-page > .settings-notice {
  margin-bottom: 20px;
  background: var(--surface);
}

.photo-detail h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.photo-added {
  margin: 6px 0 0;
  color: var(--muted);
}

.photo-figure {
  margin: 24px 0 0;
}

/* The frame is the photo's own shape: as wide as the page allows, and no
   taller than most of the screen, so its caption is in reach. */
.photo-figure a {
  display: block;
  width: fit-content;
  max-width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--photo-1);
}

.photo-figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 75vh;
}

.photo-description {
  margin-top: 16px;
  font-size: 19px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.photo-detail > .empty {
  margin-top: 16px;
}

.photo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.action-button {
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.action-button:hover {
  filter: brightness(0.9);
}

.action-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.action-button.quiet {
  background: none;
  color: var(--accent);
}

/* Calendar */

.calendar-page,
.list-page {
  padding-top: 24px;
  padding-bottom: 56px;
}

.calendar-page h1,
.list-page h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
}

.calendar-page > .settings-notice,
.list-page > .settings-notice {
  margin-bottom: 24px;
  background: var(--surface);
}

.calendar-month + .calendar-month {
  margin-top: 32px;
}

.calendar-month h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.calendar-month .event-card {
  background: var(--surface);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0 12px;
}

.field-row > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* Providers */

.list-group + .list-group {
  margin-top: 32px;
}

.list-group h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.provider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
  gap: 12px;
}

/* The name is the card's link, stretched over it; the phone sits above that
   link, so it still calls. */
.provider-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.provider-name {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.provider-name::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}

.provider-name:focus-visible {
  outline: none;
}

.provider-name:focus-visible::after {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.provider-card:hover .provider-name {
  text-decoration: underline;
}

.provider-address {
  color: var(--muted);
  white-space: pre-line;
}

.provider-call {
  position: relative;
  z-index: 1;
  width: fit-content;
  font-weight: 600;
}

.provider-detail h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.provider-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 20px;
  margin: 20px 0 0;
}

.provider-facts dt {
  font-weight: 600;
  color: var(--muted);
}

.provider-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.provider-address-full {
  white-space: pre-line;
}

.provider-people {
  margin-top: 28px;
}

.provider-people h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.provider-people ul {
  display: grid;
  gap: 10px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow-wrap: anywhere;
}

.contact-role,
.contact-notes-text {
  color: var(--muted);
}

.contact-notes-text {
  white-space: pre-line;
}

/* The people rows of a provider form: name and role, phone and email, then
   notes across. */
.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}

.contact-rows legend {
  margin-bottom: 6px;
  padding: 0;
  font-weight: 600;
}

.contact-rows [data-contacts] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bg);
}

.contact-row .contact-notes {
  grid-column: 1 / -1;
}

/* A link, not one of the dialog's accent buttons. */
.upload .contact-rows .link-button {
  align-self: flex-start;
  margin: 0;
  padding: 4px 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
}

/* Files */

.file-rows {
  display: grid;
  gap: 10px;
}

/* The name is the row's link to the file's page, stretched over it; the
   download link sits above that, so it still downloads. */
.file-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.file-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-name {
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.file-name::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}

.file-name:focus-visible {
  outline: none;
}

.file-name:focus-visible::after {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.file-row:hover .file-name {
  text-decoration: underline;
}

.file-about {
  font-size: 15px;
  color: var(--muted);
}

.file-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none;
  gap: 16px;
}

.file-download {
  position: relative;
  z-index: 1;
  flex: none;
  font-weight: 600;
}

.file-detail h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.file-detail .file-about {
  margin: 8px 0 0;
  font-size: 17px;
}

/* A doc's page: its markdown as HTML. */
.doc-body {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow-wrap: anywhere;
}

.doc-body > :first-child {
  margin-top: 0;
}

.doc-body > :last-child {
  margin-bottom: 0;
}

.doc-body h1,
.doc-body h2,
.doc-body h3 {
  margin: 1.2em 0 0.4em;
  font-family: var(--display);
  line-height: 1.2;
}

.doc-body h1 {
  font-size: 28px;
}

.doc-body h2 {
  font-size: 23px;
}

.doc-body h3 {
  font-size: 19px;
}

.doc-body p,
.doc-body ul,
.doc-body ol,
.doc-body blockquote,
.doc-body pre,
.doc-body table {
  margin: 0 0 1em;
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.4em;
}

.doc-body ul {
  list-style: disc;
}

.doc-body ol {
  list-style: decimal;
}

.doc-body li + li {
  margin-top: 0.25em;
}

.doc-body li:has(> input[type="checkbox"]) {
  list-style: none;
  margin-left: -1.4em;
}

.doc-body blockquote {
  padding-left: 14px;
  border-left: 3px solid var(--photo-3);
  color: var(--muted);
}

.doc-body code {
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.92em;
}

.doc-body pre {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow-x: auto;
}

.doc-body pre code {
  padding: 0;
  background: none;
}

.doc-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.doc-body th,
.doc-body td {
  padding: 6px 10px;
  border: 1px solid var(--photo-2);
  text-align: left;
}

.doc-body hr {
  margin: 1.5em 0;
  border: 0;
  border-top: 1px solid var(--photo-2);
}

.doc-body img {
  border-radius: var(--radius-sm);
}

/* Writing a doc: the full width of the page, not a settings form's. */
.doc-form {
  max-width: none;
}

.doc-form textarea {
  min-height: 50vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  line-height: 1.55;
}

.doc-form .hint code {
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.doc-page h1 {
  margin: 0 0 20px;
  font-size: clamp(30px, 5vw, 40px);
}

.dialog-or {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--bg);
}

.dialog-or .action-button {
  justify-self: start;
}

/* The Download button is a link styled as one. */
a.action-button {
  display: inline-block;
  text-decoration: none;
}

a.action-button:hover {
  color: #FFFFFF;
}

a.action-button.quiet:hover {
  color: var(--accent);
}

/* An event's page */

.event-detail h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.event-when {
  margin: 12px 0 0;
  font-size: 19px;
  font-weight: 600;
}

.event-repeats,
.event-where {
  margin: 4px 0 0;
  color: var(--muted);
}

.event-notes {
  margin: 20px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.event-people {
  margin-top: 24px;
}

.event-people h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.event-people ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-people li {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 600;
}

.event-host {
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* The invite list in an event form. */
.invitees {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}

.invitees legend {
  margin-bottom: 6px;
  padding: 0;
  font-weight: 600;
}

.event-page > .settings-notice {
  margin-bottom: 20px;
  background: var(--surface);
}

/* Sign in */

/* Sign in has no header, so the form starts lower on the page. */
.signin {
  max-width: 28rem;
  padding-top: clamp(48px, 12vh, 120px);
  padding-bottom: 56px;
}

.signin h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.05;
}

.signin form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.signin label {
  font-weight: 600;
}

.signin input {
  padding: 12px 14px;
  border: 1px solid var(--muted);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 20px;
}

.signin button {
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.signin button:hover {
  filter: brightness(0.9);
}

.signin .again {
  background: none;
  color: var(--ink);
  text-decoration: underline;
}

.signin-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
}

.signin-dev {
  margin: 16px 0 0;
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding-top: 32px;
  padding-bottom: 48px;
  font-size: 15px;
  text-align: center;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 4px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--ink);
}
