/* We Run booking. Brand values from we-run.co.uk (see docs/brand.md). */
:root {
  --accent: #0179ff;
  --accent-deep: #00539b;
  --accent-on-dark: #5aa5ff;
  --text: #002d38;
  --text-2: #3f5d66;
  --muted: #6b8189;
  --ground: #faf9f5;
  --surface: #ffffff;
  --tint: #ddeaec;
  --navy: #072832;
  --panel: #123c46;
  --line: #d9e3e5;
  --ok: #0a7a52;
  --ok-bg: #e3f5ec;
  --warn: #8a4b00;
  --warn-bg: #fff3e0;
  --error: #b42318;
  --error-bg: #fdecea;
  --radius: 16px;
  --radius-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 16px; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Header band */
.band {
  background: radial-gradient(120% 140% at 0% 0%, #0b4a6e 0%, var(--navy) 55%);
  color: #fff;
}
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.topbar img { height: 28px; width: auto; }
.topbar a { color: #fff; text-decoration: none; font-size: 15px; }
.intro { padding: 16px 0 32px; }
.intro h1 { font-size: 30px; line-height: 36px; margin-bottom: 8px; }
.intro p { color: #c9dbe0; margin: 0; }

/* Landing: coach list */
.coaches { list-style: none; margin: -16px 0 32px; padding: 0; display: grid; gap: 12px; }
.coach-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--surface); border-radius: var(--radius); padding: 12px;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(0, 45, 56, 0.08), 0 4px 16px rgba(0, 45, 56, 0.06);
  min-height: 112px;
}
.coach-card:active { transform: scale(0.99); }
.coach-card img, .coach-card .ph {
  width: 88px; height: 112px; border-radius: var(--radius-sm); object-fit: cover; flex: none;
  background: var(--tint);
}
.coach-card .eyebrow { color: var(--accent); font-size: 13px; line-height: 16px; font-weight: 500; }
.coach-card h2 { font-size: 20px; line-height: 26px; }
.coach-card p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; line-height: 20px; }
.coach-card .go { margin-left: auto; color: var(--accent); flex: none; font-size: 24px; padding-right: 4px; }

/* Coach page hero */
.hero { display: flex; gap: 16px; padding: 8px 0 24px; align-items: flex-start; }
.hero img, .hero .ph {
  width: 112px; height: 148px; border-radius: var(--radius-sm); object-fit: cover; flex: none;
  border: 3px solid var(--accent); background: var(--panel);
}
.hero .eyebrow { color: var(--accent-on-dark); font-size: 16px; font-style: italic; }
.hero h1 { font-size: 34px; line-height: 38px; }
.hero .blurb { color: #c9dbe0; font-size: 15px; line-height: 20px; margin: 8px 0 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 20px; }
.ticks li::before {
  content: ''; flex: none; width: 20px; height: 20px; border-radius: 6px; margin-top: 0;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.quote { border-top: 1px solid rgba(255, 255, 255, 0.15); padding: 16px 0 24px; margin: 0; }
.quote .stars { color: #2ee59d; letter-spacing: 2px; font-size: 15px; }
.quote p { font-style: italic; color: #e3eef1; font-size: 15px; line-height: 22px; margin: 4px 0 0; }

/* Sections */
.section { padding: 24px 0 8px; }
.section h2 { font-size: 22px; line-height: 28px; margin-bottom: 4px; }
.section .sub { color: var(--text-2); font-size: 15px; margin-bottom: 16px; }

/* Day picker and times */
.day { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0, 45, 56, 0.06); }
.day h3 { font-size: 17px; line-height: 22px; margin-bottom: 12px; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.times a {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  border: 1.5px solid var(--accent); border-radius: 999px; color: var(--accent);
  font-weight: 600; text-decoration: none; font-size: 16px;
}
.times a:active { background: var(--accent); color: #fff; }
.more { text-align: center; margin: 8px 0 24px; }

/* Notices */
.notice { border-radius: var(--radius); padding: 16px; margin: 16px 0; font-size: 15px; line-height: 22px; }
.notice.info { background: var(--tint); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.error { background: var(--error-bg); color: var(--error); }
.notice strong { display: block; margin-bottom: 4px; }

/* Forms */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px 16px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(0, 45, 56, 0.06); }
.slot-summary { display: flex; gap: 12px; align-items: center; }
.slot-summary img, .slot-summary .ph { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; background: var(--tint); }
.slot-summary .when { font-weight: 600; font-size: 17px; line-height: 22px; }
.slot-summary .who { color: var(--text-2); font-size: 15px; }
label { display: block; font-weight: 600; font-size: 15px; margin: 16px 0 4px; }
label .opt { font-weight: 400; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; line-height: 18px; margin: 4px 0 0; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=password], textarea, select {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
  color: var(--text); background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; min-height: 48px; appearance: none; -webkit-appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(1, 121, 255, 0.15); }
.field-error { color: var(--error); font-size: 14px; margin: 4px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 28px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: #fff; font: inherit; font-weight: 600; font-size: 17px;
  text-decoration: none; cursor: pointer;
}
.btn.block { width: 100%; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.danger { background: var(--error); border-color: var(--error); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn:disabled { opacity: 0.6; }
.privacy { color: var(--muted); font-size: 13px; line-height: 18px; margin: 16px 0 0; }
.actions { display: grid; gap: 12px; margin: 16px 0; }

footer { color: var(--muted); font-size: 13px; padding: 24px 0 40px; text-align: center; }
footer a { color: var(--muted); }

/* Admin */
.admin-nav { display: flex; gap: 16px; flex-wrap: wrap; padding: 4px 0 16px; }
.admin-nav a { color: #fff; text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.admin-nav a.on { border-color: var(--accent-on-dark); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.error { background: var(--error-bg); color: var(--error); }
.pill.muted { background: var(--tint); color: var(--text-2); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.hours-grid { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; align-items: center; }
.hours-grid label { margin: 0; }
.inline-form { display: inline; }
.stack > * + * { margin-top: 12px; }
.list-coach { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-coach img, .list-coach .ph { width: 48px; height: 60px; object-fit: cover; border-radius: 8px; background: var(--tint); flex: none; }
.list-coach .meta { color: var(--muted); font-size: 13px; }
.booking .meta { color: var(--muted); font-size: 14px; }
.booking .goal { margin: 12px 0 0; padding: 12px; background: var(--ground); border-radius: var(--radius-sm); font-size: 15px; white-space: pre-line; }
.checkbox { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.checkbox input { width: 20px; height: 20px; }
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .hours-grid { grid-template-columns: 1fr; gap: 4px; }
  .hours-grid label { margin-top: 8px; }
}
