@layer reset, base, layout, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html, body, h1, h2, h3, p, ul, ol, figure, table, details, summary, dl, dd { margin: 0; padding: 0; }
  img, svg { display: block; max-width: 100%; height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  table { border-collapse: collapse; }
}

@layer base {
  :root {
    --xf-ink: #E9EFED;
    --xf-paper: #111916;
    --xf-sage: #8CAEA1;
    --xf-moss: #202A26;
    --xf-brass: #E7C189;
    --xf-on-sage: #111916;
    --xf-hair: rgba(233, 239, 237, .14);
    --xf-head: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
    --xf-body: "Source Serif 4", Georgia, "Times New Roman", serif;
    --xf-width: 1080px;
    --xf-gutter: clamp(16px, 4vw, 32px);
    color-scheme: dark;
  }
  html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
  body {
    background: var(--xf-paper);
    color: var(--xf-ink);
    font-family: var(--xf-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-wrap: break-word;
  }
  h1, h2, h3 { font-family: var(--xf-head); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
  h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); }
  h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); margin-bottom: .6rem; }
  h3 { font-size: 1.12rem; font-weight: 700; }
  p + p { margin-top: .85rem; }
  a { color: var(--xf-sage); text-underline-offset: 3px; }
  a:hover { color: var(--xf-brass); }
  ul, ol { padding-left: 1.25rem; }
  li + li { margin-top: .35rem; }
  :focus-visible { outline: 3px solid var(--xf-brass); outline-offset: 2px; }
  strong { font-weight: 600; }
}

@layer layout {
  .xf-margin { width: 100%; max-width: var(--xf-width); margin-inline: auto; padding-inline: var(--xf-gutter); }
  .xf-fold { padding-block: clamp(48px, 8vw, 88px); }
  .xf-fold--tint { background: var(--xf-moss); }
  .xf-fold--first { padding-top: clamp(120px, 16vw, 168px); }
  .xf-fold--after-slim { padding-top: clamp(40px, 6vw, 64px); }
  .xf-spread { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 44px); align-items: flex-start; }
  .xf-spread > * { flex: 1 1 300px; min-width: 0; }
  .xf-spread > .xf-spread-wide { flex: 2 1 420px; }
  .xf-pile { display: flex; flex-wrap: wrap; gap: 18px; }
  .xf-pile > * { flex: 1 1 230px; min-width: 0; }
  .xf-measure { max-width: 70ch; }
  main { display: block; }
}

@layer components {
  /* masthead */
  .xf-masthead { position: absolute; inset: 0 0 auto 0; z-index: 30; color: var(--xf-on-sage); transition: background .2s, color .2s; }
  .xf-js .xf-masthead { position: fixed; }
  .xf-masthead--solid { background: var(--xf-paper); color: var(--xf-ink); border-bottom: 1px solid var(--xf-hair); }
  .xf-masthead-row { display: flex; align-items: center; gap: 14px 22px; min-height: 72px; }
  .xf-brand { color: inherit; text-decoration: none; margin-right: auto; display: flex; flex-direction: column; line-height: 1.2; }
  .xf-brand-name { font-family: var(--xf-head); font-weight: 800; font-size: 1.05rem; }
  .xf-brand-tag { font-size: .8rem; opacity: .85; }
  .xf-masthead a:not(.xf-btn) { color: inherit; }
  .xf-tabs { display: flex; gap: 18px; list-style: none; padding: 0; font-family: var(--xf-head); font-weight: 700; font-size: .92rem; }
  .xf-tabs li + li { margin-top: 0; }
  .xf-tabs a { text-decoration: none; }
  .xf-tabs a:hover { text-decoration: underline; }
  .xf-dial { font-family: var(--xf-head); font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .xf-dial svg { width: 18px; height: 18px; }
  .xf-fold-menu { position: relative; display: none; }
  .xf-fold-menu summary { list-style: none; cursor: pointer; font-family: var(--xf-head); font-weight: 700; padding: 6px 12px; border: 1.5px solid currentColor; border-radius: 6px; }
  .xf-fold-menu summary::-webkit-details-marker { display: none; }
  .xf-fold-menu ul { position: absolute; right: 0; top: calc(100% + 8px); background: var(--xf-paper); color: var(--xf-ink); border: 1px solid var(--xf-hair); border-radius: 8px; list-style: none; padding: 10px 16px; min-width: 200px; }
  .xf-fold-menu li { padding: 6px 0; }
  .xf-fold-menu li + li { margin-top: 0; border-top: 1px solid var(--xf-hair); }
  .xf-fold-menu a { color: var(--xf-ink); text-decoration: none; }

  /* buttons */
  .xf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 8px; font-family: var(--xf-head); font-weight: 800; font-size: .98rem; text-decoration: none; border: 2px solid transparent; background: var(--xf-sage); color: var(--xf-on-sage); cursor: pointer; }
  .xf-btn:hover { background: var(--xf-brass); color: var(--xf-on-sage); }
  .xf-btn svg { width: 20px; height: 20px; }
  .xf-btn--ink { background: var(--xf-paper); color: var(--xf-ink); }
  .xf-btn--ink:hover { background: var(--xf-moss); color: var(--xf-brass); }
  .xf-btn--outline { background: transparent; border-color: currentColor; color: inherit; }
  .xf-btn--outline:hover { background: var(--xf-paper); color: var(--xf-ink); }
  .xf-btn--brass { background: var(--xf-brass); color: var(--xf-on-sage); }
  .xf-btn--small { padding: 8px 14px; font-size: .88rem; }
  .xf-btnrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
  .xf-micro { font-size: .92rem; margin-top: 10px; max-width: 52ch; }
  .xf-hours { font-family: var(--xf-head); font-weight: 700; font-size: .92rem; margin-top: 14px; display: flex; align-items: center; gap: 6px; }
  .xf-hours svg { width: 18px; height: 18px; }
  .xf-plainlink { font-family: var(--xf-head); font-weight: 700; }

  /* cover (hero band) */
  .xf-cover { background: var(--xf-sage); color: var(--xf-on-sage); padding-top: 112px; }
  .xf-cover a:not(.xf-btn) { color: var(--xf-on-sage); }
  .xf-cover-row { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 48px); align-items: flex-end; }
  .xf-cover-copy { flex: 1 1 380px; min-width: 0; padding-bottom: clamp(28px, 5vw, 60px); }
  .xf-cover-lede { font-size: 1.15rem; margin-top: 14px; max-width: 46ch; }
  .xf-cover-card.xf-sleeve { flex: 1 1 400px; min-width: 0; margin-bottom: -110px; position: relative; z-index: 2; }
  .xf-cover--slim { padding-bottom: clamp(36px, 6vw, 60px); }
  .xf-cover--slim .xf-cover-lede { max-width: 62ch; }

  /* offset image sleeve */
  .xf-sleeve { position: relative; margin-right: 14px; margin-bottom: 14px; }
  .xf-sleeve::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; background: var(--xf-brass); border-radius: 18px; }
  .xf-sleeve img { position: relative; border-radius: 18px; width: 100%; }
  .xf-sleeve--sage::before { background: var(--xf-sage); }

  /* disclosures */
  .xf-pleats { margin-top: 22px; border-top: 1px solid var(--xf-hair); }
  .xf-pleat { border-bottom: 1px solid var(--xf-hair); }
  .xf-pleat summary { cursor: pointer; list-style: none; padding: 14px 36px 14px 0; position: relative; font-family: var(--xf-head); font-weight: 700; font-size: 1.04rem; }
  .xf-pleat summary::-webkit-details-marker { display: none; }
  .xf-pleat summary::after { content: "+"; position: absolute; right: 6px; top: 10px; font-size: 1.4rem; color: var(--xf-brass); }
  .xf-pleat[open] summary::after { content: "\2013"; }
  .xf-pleat-body { padding: 0 0 16px; max-width: 70ch; }

  /* header-band cards */
  .xf-leaf { border: 1px solid rgba(140, 174, 161, .35); border-radius: 10px; overflow: hidden; background: var(--xf-paper); display: flex; flex-direction: column; }
  .xf-fold--tint .xf-leaf { background: #18211d; }
  .xf-leaf-tab { background: var(--xf-sage); color: var(--xf-on-sage); padding: 12px 16px; display: flex; gap: 10px; align-items: center; }
  .xf-leaf-tab svg { width: 22px; height: 22px; flex: none; }
  .xf-leaf-tab h3 { font-size: 1.02rem; }
  .xf-leaf-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
  .xf-leaf-body a { margin-top: auto; font-family: var(--xf-head); font-weight: 700; }

  /* numbered checklist */
  .xf-ticks { list-style: none; padding: 0; margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
  .xf-ticks li { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
  .xf-ticks-badge { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--xf-moss); color: var(--xf-brass); display: grid; place-items: center; }
  .xf-fold--tint .xf-ticks-badge { background: var(--xf-paper); }
  .xf-ticks-badge svg { width: 22px; height: 22px; }
  .xf-ticks strong { font-family: var(--xf-head); font-weight: 700; display: block; }

  .xf-runs { margin-top: 20px; counter-reset: xfrun; list-style: none; padding: 0; }
  .xf-runs li { counter-increment: xfrun; position: relative; padding-left: 46px; margin-top: 12px; }
  .xf-runs li::before { content: counter(xfrun); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 6px; background: var(--xf-sage); color: var(--xf-on-sage); font-family: var(--xf-head); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
  .xf-runs strong { font-family: var(--xf-head); font-weight: 700; }

  .xf-bullets { margin-top: 16px; margin-bottom: 16px; }
  .xf-bullets li::marker { color: var(--xf-brass); }

  /* table */
  .xf-ledger { margin-top: 22px; overflow-x: auto; border: 1px solid var(--xf-hair); border-radius: 10px; }
  .xf-ledger table { width: 100%; min-width: 560px; font-size: .95rem; }
  .xf-ledger th, .xf-ledger td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--xf-hair); }
  .xf-ledger thead th { background: var(--xf-sage); color: var(--xf-on-sage); font-family: var(--xf-head); }
  .xf-ledger tbody th { font-family: var(--xf-head); font-weight: 700; color: var(--xf-brass); }
  .xf-ledger tr:last-child > * { border-bottom: 0; }

  /* figures and visuals */
  .xf-plate { margin-top: 24px; background: var(--xf-paper); border: 1px solid var(--xf-hair); border-radius: 12px; padding: 14px; }
  .xf-fold--tint .xf-plate { background: #18211d; }
  .xf-plate figcaption { font-size: .85rem; margin-top: 8px; opacity: .85; }
  .xf-plate svg { width: 100%; }
  .xf-photo-cap { font-size: .88rem; margin-top: 22px; opacity: .85; }

  /* town list */
  .xf-towns { list-style: none; padding: 0; margin-top: 18px; }
  .xf-towns li { padding: 10px 0; border-top: 1px solid var(--xf-hair); margin: 0; }
  .xf-towns b { font-family: var(--xf-head); color: var(--xf-brass); }

  /* call slip on inner pages */
  .xf-slip { margin-block: 36px; padding: 22px; border-radius: 12px; background: var(--xf-moss); border-left: 6px solid var(--xf-brass); }
  .xf-slip p:first-child { font-family: var(--xf-head); font-weight: 700; }

  /* form */
  .xf-form { display: flex; flex-wrap: wrap; gap: 14px; background: var(--xf-moss); padding: clamp(18px, 4vw, 30px); border-radius: 12px; position: relative; }
  .xf-field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .xf-field--full { flex-basis: 100%; }
  .xf-field label { font-family: var(--xf-head); font-weight: 700; font-size: .92rem; }
  .xf-field input, .xf-field select, .xf-field textarea { background: var(--xf-paper); border: 1px solid rgba(140, 174, 161, .5); border-radius: 8px; padding: 11px 12px; width: 100%; }
  .xf-field textarea { min-height: 130px; resize: vertical; }
  .xf-form .xf-btn { flex: 0 0 auto; }
  .xf-consent { flex-basis: 100%; font-size: .9rem; }
  .xf-form .xf-micro { flex-basis: 100%; margin-top: 0; }

  /* colophon */
  .xf-colophon { border-top: 1px solid var(--xf-hair); padding-block: 22px; font-size: .86rem; }
  .xf-colophon p + p { margin-top: 6px; }
  .xf-colophon a { color: var(--xf-ink); }

  /* thumb tab (mobile call bar) */
  .xf-thumbtab { display: none; }
  @media (max-width: 767px) {
    .xf-thumbtab { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--xf-paper); border-top: 1px solid var(--xf-hair); padding: 10px 12px; gap: 10px; }
    .xf-thumbtab a { flex: 1; justify-content: center; }
    body { padding-bottom: 76px; }
    .xf-tabs { display: none; }
    .xf-fold-menu { display: block; }
    .xf-brand-tag { display: none; }
    .xf-brand-name { font-size: .95rem; }
    .xf-cover-card.xf-sleeve { margin-bottom: -70px; }
    .xf-fold--first { padding-top: 110px; }
  }
}

@layer components {
  @media (max-width: 1100px) { .xf-tabs { gap: 12px; font-size: .86rem; } }
}

@layer utilities {
  .xf-hide-sm { }
  @media (max-width: 767px) { .xf-hide-sm { display: none !important; } }
  .xf-gap-top { margin-top: 22px; }
  .xf-quiet { opacity: .85; }
}
