/* Harris & Partners brand (guidelines Jan 2021): black, white and greys, Harris Green
   #12DD8B as the single accent. Display: Source Serif Extra Light in green on black.
   Text: Poppins. Mobile first. */
:root {
  --green: #12dd8b;
  --green-dark: #0aa868;
  --ink: #000;
  --muted: #555;
  --line: #e2e2e2;
  --soft: #f6f6f6;
  --error: #b00020;
  --radius: 10px;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --page: 760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Masthead: dark logo on black, as on the brand's stationery and website masthead. */
.masthead { background: #000; color: #fff; }
.masthead-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
.masthead .logo { display: block; height: 44px; width: auto; }

/* Title band: Source Serif Extra Light in Harris Green on black (green on white fails contrast). */
.hero { background: #000; color: #fff; border-bottom: 4px solid var(--green); }
.hero-inner { max-width: var(--page); margin: 0 auto; padding: 18px 16px 30px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--green);
  margin: 0;
}
.hero .lead { color: #e6e6e6; font-size: 1.05rem; margin: 12px 0 0; max-width: 40em; }

main {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 24px 16px 64px;
  flex: 1;
}

h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.2; }
main h1 { font-size: 1.6rem; margin: 0 0 12px; }
.lead { font-size: 1.05rem; margin: 0 0 20px; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.site-footer p { max-width: var(--page); margin: 0 auto; padding: 16px; }
.site-footer a { color: inherit; }
.description { white-space: pre-wrap; color: var(--muted); }
.muted { color: var(--muted); }
a { color: var(--ink); text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 16px 0;
}
.stack > * + * { margin-top: 14px; }
.stack > p { margin-bottom: 0; }
.event-name { font-weight: 700; font-size: 1.1rem; margin: 0; }
.when { margin: 8px 0 16px; }

label, .label { display: block; font-weight: 600; margin-bottom: 4px; }
.req { color: var(--green-dark); }
.fixed { margin: 0; padding: 10px 12px; background: var(--soft); border-radius: 8px; }

input, select, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  padding: 10px 12px;
  border: 1px solid #bdbdbd;
  border-radius: 8px;
  background: #fff;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 1px;
  border-color: var(--ink);
}
[aria-invalid="true"] { border-color: var(--error); }

.row2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }

.button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--green);
  background: var(--green);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--green-dark); border-color: var(--green-dark); }
.button.secondary { background: #fff; border-color: var(--ink); }
.button.secondary:hover { background: var(--soft); }
.button.danger { background: #fff; border-color: var(--error); color: var(--error); }
form .button[type="submit"] { width: 100%; }
@media (min-width: 560px) { form .button[type="submit"] { width: auto; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.error { color: var(--error); margin: 4px 0 0; }
.error.banner { border: 1px solid var(--error); border-radius: 8px; padding: 10px 12px; }

/* Picker */
.picker-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 8px; }
.durations { border: 0; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.durations legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.pill { display: inline-block; margin: 0; font-weight: 400; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-block; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; cursor: pointer; }
.pill input:checked + span { background: var(--green); border-color: var(--green); font-weight: 700; }
.pill input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.tz { flex: 1 1 220px; margin: 0; }
.tz span { display: block; font-weight: 600; margin-bottom: 4px; }

.status { color: var(--muted); min-height: 1.5em; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 8px 0 20px; }
.day {
  font: inherit; text-align: center; padding: 8px 4px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; line-height: 1.25;
}
.day .dow { display: block; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; }
.day .date { font-weight: 700; }
.day[aria-pressed="true"] { background: var(--green); border-color: var(--green); }
.day.pager { font-weight: 600; border-style: dashed; }
.day[aria-pressed="true"] .dow { color: var(--ink); }
.times h2 { font-size: 1.1rem; margin: 0 0 10px; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.time {
  display: block; text-align: center; padding: 10px 6px; font-weight: 600;
  border: 2px solid var(--green); border-radius: 8px; text-decoration: none;
}
.time:hover { background: var(--green); }

/* Admin */
main.wide { max-width: 1200px; }
body.admin .masthead-inner { max-width: 1200px; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 4px 18px; flex: 1; }
.masthead nav a { color: #fff; text-decoration: none; font-weight: 600; padding: 2px 0; border-bottom: 3px solid transparent; }
.masthead nav a:hover { color: var(--green); }
.masthead nav a[aria-current="page"] { border-bottom-color: var(--green); }
.masthead .who { color: #bdbdbd; font-size: 0.85rem; }
.flash { background: #e8fcf3; border: 1px solid var(--green); border-radius: 8px; padding: 10px 12px; }
.narrow { max-width: 720px; }
h2 { font-size: 1.25rem; margin: 28px 0 8px; }
h3 { font-size: 1.05rem; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.filters label { margin: 0; font-size: 0.9rem; }
.filters select, .filters input { width: auto; min-width: 9rem; padding: 8px 10px; }
.filters label.check { align-self: center; }
.filters label.check input { min-width: 0; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-weight: 700; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data tr.cancelled td { color: var(--muted); }
table.data td input:not([type="checkbox"]), table.data td select { padding: 6px 8px; min-width: 8rem; }
table.data input.num { width: 5rem; min-width: 0; }
.tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--soft); font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.radio-row { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.radio-row legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.week { display: grid; gap: 8px; }
.day-row { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; max-width: 720px; }
.inline-form label { flex: 1 1 260px; margin: 0; }
.link-list li { margin: 6px 0; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; }
