/*
 * Hospora Help Centre.
 *
 * Same tokens as the Hospora hub (hospora/src/styles/base.css): light only,
 * 20px panels, pill controls, brand green as the single accent. Fonts are the
 * hub's (Bricolage Grotesque for headings, Geist for text), self-hosted.
 */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --brand: #0b7a57;
  --brand-strong: #0c664a;
  --tint: #e7f2ee;
  --tint-subtle: #f3f8f7;
  --brand-border: rgba(11, 122, 87, 0.18);
  --focus-ring: 0 0 0 3px rgba(11, 122, 87, 0.28);

  --bg: #f5f6f3;
  --surface: #ffffff;
  --ink: #111614;
  --ink-2: #2b3330;
  --muted: #56615c;
  --line: rgba(17, 22, 20, 0.1);
  --line-strong: rgba(17, 22, 20, 0.18);

  --radius-panel: 20px;
  --radius-pill: 999px;
  --measure: 720px;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--brand-strong);
}

:where(a, button, summary):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 560;
  font-size: 15px;
}
.skip:focus {
  top: 16px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 21px;
  letter-spacing: -0.03em;
}
.brand:hover {
  color: var(--ink);
}
.brand svg {
  display: block;
  width: 28px;
  height: 28px;
}
.brand .divider {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}
.brand .section {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--muted);
}
.site-header .back {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 560;
  white-space: nowrap;
  transition: border-color 200ms ease;
}
.site-header .back:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* Layout ------------------------------------------------------------------ */

main {
  flex: 1;
  padding: 36px 0 88px;
}

.crumbs {
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.crumbs li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--line-strong);
}
.crumbs a {
  color: var(--muted);
}
.crumbs a:hover {
  color: var(--ink);
}
.crumbs [aria-current] {
  color: var(--ink-2);
}

/* Article ----------------------------------------------------------------- */

.article-head h1 {
  font-size: clamp(2.3rem, 6.4vw, 3.6rem);
  margin-bottom: 14px;
}
.updated {
  font-size: 14px;
  color: var(--muted);
}
.lead {
  margin-top: 24px;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.glance {
  margin-top: 32px;
  padding: 24px 26px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-panel);
  background: var(--tint-subtle);
}
.glance h2 {
  margin-bottom: 14px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--brand-strong);
}
.glance ul {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.glance li {
  position: relative;
  padding-left: 28px;
}
.glance li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--brand);
  border-bottom: 2.5px solid var(--brand);
  transform: translateY(-60%) rotate(-45deg);
}

.toc {
  margin-top: 36px;
}
.toc h2 {
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol {
  display: grid;
  gap: 4px;
  padding: 0;
  list-style: none;
}
.toc a {
  font-weight: 500;
}

.prose section {
  margin-top: 52px;
}
.prose h2 {
  margin-bottom: 14px;
  font-size: clamp(1.55rem, 3.6vw, 2rem);
}
.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 14px;
}
.prose ul {
  padding-left: 22px;
}
.prose li + li {
  margin-top: 8px;
}
.prose li::marker {
  color: var(--brand);
}

/* Legal documents (terms, privacy): numbered clauses ---------------------- */

.legal .prose section {
  margin-top: 44px;
}
.legal .prose h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.7rem);
}
.legal .prose h3 {
  margin: 26px 0 6px;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.clause {
  display: grid;
  grid-template-columns: 3.1em 1fr;
  gap: 0 4px;
}
.clause + .clause,
.clause + ul,
.prose .clause + p,
.prose ul + .clause,
.prose .table-wrap + .clause {
  margin-top: 12px;
}
.clause .num {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.legal .prose .clause + ul {
  margin-left: 3.1em;
}
.legal .prose ul + .clause {
  margin-top: 14px;
}
.legal .table-wrap {
  margin-left: 3.1em;
}
.intro-note {
  margin-top: 24px;
  color: var(--ink-2);
}
@media (min-width: 641px) {
  .toc--grid ol {
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }
}
@media (max-width: 640px) {
  .clause {
    grid-template-columns: 2.6em 1fr;
  }
  .legal .prose .clause + ul,
  .legal .table-wrap {
    margin-left: 2.6em;
  }
}

/* Fee table --------------------------------------------------------------- */

.table-wrap {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
caption {
  padding: 16px 22px 0;
  text-align: left;
  font-size: 14px;
  color: var(--muted);
}
th,
td {
  padding: 14px 22px;
  text-align: left;
  border-top: 1px solid var(--line);
}
thead th {
  border-top: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
tbody th {
  font-weight: 500;
}
th:last-child,
td:last-child {
  text-align: right;
}
td:last-child {
  font-weight: 650;
  font-size: 1.05rem;
}
tbody tr:last-child td:last-child .cap {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* Where you will see it: simple definition rows -------------------------- */

.where {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  overflow: hidden;
}
.where div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px 24px;
  padding: 16px 22px;
}
.where div + div {
  border-top: 1px solid var(--line);
}
.where dt {
  font-weight: 600;
  color: var(--ink);
}
.where dd {
  margin: 0;
  color: var(--ink-2);
}
.prose .where + p {
  margin-top: 18px;
}

/* FAQ --------------------------------------------------------------------- */

.faq h3 {
  margin: 28px 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.faq h3:first-of-type {
  margin-top: 8px;
}

.contact {
  margin-top: 56px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.contact h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

/* Help home --------------------------------------------------------------- */

.home-head h1 {
  font-size: clamp(2.3rem, 6.4vw, 3.6rem);
  margin-bottom: 14px;
}
.home-head p {
  font-size: 1.15rem;
  color: var(--ink-2);
}
.topic {
  margin-top: 44px;
}
.topic h2 {
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cards {
  display: grid;
  gap: 14px;
}
.card {
  display: block;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 200ms ease,
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
  border-color: var(--brand);
  color: var(--ink);
}
.card:active {
  transform: scale(0.99);
}
.card strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer nav {
  display: flex;
  gap: 24px;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--ink);
}

/* Small screens ----------------------------------------------------------- */

@media (max-width: 640px) {
  body {
    font-size: 16.5px;
  }
  .wrap {
    padding: 0 20px;
  }
  main {
    padding-top: 24px;
  }
  .brand .divider,
  .brand .section {
    display: none;
  }
  .glance,
  .contact,
  .card {
    padding: 20px;
  }
  th,
  td {
    padding: 12px 16px;
  }
  caption {
    padding: 14px 16px 0;
  }
  .where div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 14px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
  }
}
