/* Roll On - roll-on.uk
   One stylesheet for all three pages. Colours come from the app itself:
   pitch green from the icon, bench amber from the substitution badges.
   Editing copy? You want the .html files, not this one. */

/* ============================================================
     TOKENS
     Palette derives from the app itself: the icon green, the
     bench-badge amber (#E39A34 in ColorHex.swift), and a chalk
     off-white biased green like pitch line-marking.
     ============================================================ */
  :root {
    --pitch:       #1E7A4D;
    --pitch-deep:  #0F4630;
    --pitch-dark:  #0A2E1F;
    --amber:       #C87816;
    --ink:         #10201A;
    --muted:       #5A6960;
    --chalk:       #F4F6F0;
    --ground:      #EEF1EA;
    --surface:     #FFFFFF;
    --surface-2:   #F7F9F4;
    --line:        rgba(16, 32, 26, 0.13);
    --line-soft:   rgba(16, 32, 26, 0.07);
    --shadow:      0 1px 2px rgba(16,32,26,.05), 0 12px 32px -12px rgba(16,32,26,.18);

    --font-ui:  -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
    --font-read: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --measure: 63ch;
    --radius: 14px;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --pitch:      #46A876;
      --pitch-deep: #0D3A28;
      --pitch-dark: #071B13;
      --amber:      #E9A94A;
      --ink:        #E3EAE2;
      --muted:      #93A498;
      --chalk:      #F4F6F0;
      --ground:     #0A1310;
      --surface:    #101B16;
      --surface-2:  #16241D;
      --line:       rgba(227, 234, 226, 0.15);
      --line-soft:  rgba(227, 234, 226, 0.08);
      --shadow:     0 1px 2px rgba(0,0,0,.4), 0 16px 40px -16px rgba(0,0,0,.6);
    }
  }

  /* ============================================================ BASE */
  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  a { color: inherit; }

  :where(a, button, summary):focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
    border-radius: 4px;
  }

  html { scroll-behavior: smooth; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  }


  /* ============================================================ SITE */
  .wrap {
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 52px);
  }

  /* --- top nav ---
     Anything tappable is at least 44px tall, which is Apple's minimum for a
     finger. The nav's own padding is wound back to match, so the bar ends up
     the height it always was - the links just fill more of it. */
  .nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .brand {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    min-height: 44px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 17px;
  }

  .mark { width: 26px; height: 26px; border-radius: 7px; display: block; flex-shrink: 0; }

  .navlinks { display: flex; gap: 2px; flex-wrap: wrap; }

  .navlink {
    text-decoration: none;
    background: none;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: color .15s, background .15s;
  }
  .navlink:hover { color: var(--ink); background: var(--surface-2); }
  .navlink[aria-current="page"] { color: var(--ink); font-weight: 650; background: var(--surface-2); }


  /* --- hero: deep pitch ground with chalk markings --- */
  .hero {
    position: relative;
    background: linear-gradient(168deg, var(--pitch-deep) 0%, var(--pitch-dark) 100%);
    color: var(--chalk);
    overflow: hidden;
    isolation: isolate;
  }

  .hero-marks {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--chalk);
    opacity: .12;
    z-index: -1;
  }

  .hero-body {
    padding: clamp(46px, 8vw, 78px) 0 clamp(42px, 7vw, 66px);
    max-width: 46ch;
  }

  .hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--chalk) 68%, transparent);
    margin: 0 0 20px;
  }

  h1.hero-title {
    font-size: clamp(2.3rem, 6.2vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.038em;
    font-weight: 800;
    margin: 0;
    max-width: 11ch;
    text-wrap: balance;
  }

  .hero-deck {
    font-family: var(--font-read);
    font-size: clamp(1.02rem, 2.1vw, 1.2rem);
    line-height: 1.55;
    color: color-mix(in srgb, var(--chalk) 84%, transparent);
    max-width: 42ch;
    margin: 22px 0 0;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
  }

  .btn {
    appearance: none;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .12s ease, background .15s, border-color .15s;
  }
  .btn:active { transform: translateY(1px); }

  .btn-primary { background: var(--chalk); color: var(--pitch-dark); }
  .btn-primary:hover { background: #fff; }

  .btn-solid { background: var(--pitch); color: #fff; }
  .btn-solid:hover { background: color-mix(in srgb, var(--pitch) 88%, #000); }

  .btn-ghost {
    background: transparent;
    color: var(--chalk);
    border-color: color-mix(in srgb, var(--chalk) 34%, transparent);
  }
  .btn-ghost:hover { border-color: var(--chalk); background: color-mix(in srgb, var(--chalk) 9%, transparent); }

  /* --- generic section --- */
  .section { padding: clamp(44px, 6.5vw, 68px) 0; }
  .section + .section { border-top: 1px solid var(--line-soft); }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--pitch);
    margin: 0 0 14px;
    font-weight: 600;
  }

  h2.sec-title {
    font-size: clamp(1.45rem, 3.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.028em;
    line-height: 1.15;
    margin: 0;
    text-wrap: balance;
  }

  .sec-lede {
    font-family: var(--font-read);
    font-size: 1.06rem;
    line-height: 1.62;
    color: var(--muted);
    max-width: var(--measure);
    margin: 16px 0 0;
  }

  /* --- feature rows --- */
  .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px 34px;
    margin-top: 38px;
  }

  .feature h3 {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 14px 0 6px;
  }

  .feature p {
    font-family: var(--font-read);
    font-size: 15.5px;
    line-height: 1.58;
    color: var(--muted);
    margin: 0;
  }

  .feature-ico {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: color-mix(in srgb, var(--pitch) 13%, transparent);
    color: var(--pitch);
  }

  /* --- the data promise panel --- */
  .promise {
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: clamp(26px, 4vw, 38px);
    margin-top: 8px;
  }

  .promise-claim {
    font-family: var(--font-ui);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0;
    max-width: 22ch;
  }
  .promise-claim em { font-style: normal; color: var(--pitch); }

  .promise-list {
    list-style: none;
    padding: 0;
    margin: 26px 0 0;
    display: grid;
    gap: 14px;
    max-width: var(--measure);
  }
  .promise-list li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
    font-family: var(--font-read);
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--muted);
  }
  .promise-list svg { margin-top: 3px; color: var(--pitch); }
  .promise-list b { color: var(--ink); font-weight: 650; }

  /* ============================================================
     PRIVACY PAGE - section rail + 63ch measure
     ============================================================ */
  .doc-head { padding: clamp(38px, 5.5vw, 56px) 0 26px; border-bottom: 1px solid var(--line-soft); }

  .doc-title {
    font-size: clamp(1.9rem, 4.6vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.034em;
    line-height: 1.08;
    margin: 12px 0 0;
    text-wrap: balance;
  }

  .doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .02em;
  }

  .doc-layout {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 40px;
    padding: 40px 0 clamp(50px, 7vw, 76px);
    align-items: start;
  }
  /* minmax(0, …) rather than a bare 1fr: a 1fr track takes its minimum from the
     content, and the glance table's min-width: 560px would push the column
     wider than the phone and send the whole page sideways. */
  @media (max-width: 780px) {
    .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .rail { position: static !important; }
  }

  .rail {
    position: sticky;
    top: 20px;
    font-size: 13.5px;
  }
  .rail-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
  }
  .rail a {
    display: block;
    padding: 7px 0 7px 12px;
    color: var(--muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    line-height: 1.35;
    transition: color .15s, border-color .15s;
  }
  .rail a:hover { color: var(--ink); border-left-color: var(--line); }
  .rail a.active { color: var(--pitch); border-left-color: var(--pitch); font-weight: 600; }

  /* Below 780px the rail stops being a sidebar and becomes a list you tap, so
     the rows go to 44px for a finger. Left alone above that, where it is a
     mouse target and nine tall rows would crowd the sticky column. This has to
     sit after the rule above, not up in the earlier breakpoint block: same
     specificity, so source order decides. */
  @media (max-width: 780px) {
    .rail a { padding-block: 13px; }
  }

  /* Text holds the reading measure; tables and callouts take the full column. */
  .prose { font-family: var(--font-read); }
  .prose > p, .prose > ul, .prose > h2 { max-width: var(--measure); }
  .prose h2 {
    font-family: var(--font-ui);
    font-size: 1.24rem;
    font-weight: 750;
    letter-spacing: -0.022em;
    margin: 44px 0 12px;
    scroll-margin-top: 24px;
  }
  .prose h2:first-child { margin-top: 0; }
  .prose p { margin: 0 0 16px; line-height: 1.68; }
  .prose ul { margin: 0 0 18px; padding-left: 20px; }
  .prose li { margin-bottom: 11px; line-height: 1.62; }
  .prose strong { font-weight: 650; }
  .prose a { color: var(--pitch); text-underline-offset: 3px; }

  /* at-a-glance table */
  .table-scroll { overflow-x: auto; margin: 0 0 34px; border: 1px solid var(--line); border-radius: var(--radius); }

  table.glance {
    border-collapse: collapse;
    width: 100%;
    min-width: 560px;
    font-family: var(--font-ui);
    font-size: 13.5px;
  }
  table.glance th {
    text-align: left;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  table.glance td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
    line-height: 1.45;
    color: var(--muted);
  }
  table.glance tr:last-child td { border-bottom: 0; }
  table.glance td:first-child { color: var(--ink); font-weight: 600; }

  .where {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .04em;
    padding: 3px 7px;
    border-radius: 5px;
    white-space: nowrap;
    border: 1px solid;
  }
  .where.priv  { color: var(--pitch); border-color: color-mix(in srgb, var(--pitch) 35%, transparent); background: color-mix(in srgb, var(--pitch) 8%, transparent); }
  .where.look  { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); }
  .where.local { color: var(--muted); border-color: var(--line); background: var(--surface-2); }
  .where.web   { color: var(--ink); border-color: var(--line); background: transparent; }

  .never {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin: 0 0 34px;
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
  }
  .never b { color: var(--ink); display: block; margin-bottom: 5px; font-size: 13px; }

  /* ============================================================ SUPPORT */
  .contact-card {
    background: var(--pitch-deep);
    color: var(--chalk);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 36px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 30px;
  }

  .contact-card p {
    margin: 0 0 12px;
    font-family: var(--font-read);
    font-size: 15.5px;
    line-height: 1.6;
    color: color-mix(in srgb, var(--chalk) 80%, transparent);
    max-width: 46ch;
  }
  .contact-card p:last-child { margin-bottom: 0; }

  /* Heads the contact card. It used to be the address itself, as a link; the
     address is no longer printed anywhere, so this is plain text now and the
     button beside it is the thing you press. Mono to match the doc meta. */
  .contact-card .contact-head {
    font-family: var(--font-mono);
    font-size: clamp(15px, 2.4vw, 17px);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--chalk);
    margin: 0 0 10px;
    max-width: none;
  }

  /* Only ever seen with JavaScript off, so nobody will notice this is plain.
     It carries the contact address spelled out in words - see the note in
     support.html before touching the markup. */
  .fallback {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    font-family: var(--font-read);
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--muted);
    max-width: var(--measure);
  }
  /* nowrap so it does not break at the hyphen in the middle of the domain,
     which reads as two separate words. Short enough to fit the narrowest phone. */
  .fallback strong {
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--ink);
    white-space: nowrap;
  }

  /* .contact-card p is more specific than .fallback on its own, so the size and
     the top margin have to be restated here or the card would flatten them. */
  .contact-card .fallback {
    margin-top: 16px;
    font-size: 14.5px;
    border-top-color: color-mix(in srgb, var(--chalk) 20%, transparent);
    color: color-mix(in srgb, var(--chalk) 70%, transparent);
    max-width: 46ch;
  }
  .contact-card .fallback strong { color: var(--chalk); }

  .faq { margin-top: 34px; border-top: 1px solid var(--line-soft); max-width: var(--measure); }
  .faq details { border-bottom: 1px solid var(--line-soft); }
  .faq summary {
    cursor: pointer;
    padding: 16px 28px 16px 0;
    font-weight: 650;
    font-size: 15.5px;
    letter-spacing: -0.012em;
    list-style: none;
    position: relative;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after {
    content: "";
    position: absolute;
    right: 4px; top: 50%;
    width: 8px; height: 8px;
    border-right: 1.8px solid var(--muted);
    border-bottom: 1.8px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .18s ease;
  }
  .faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
  .faq p {
    font-family: var(--font-read);
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--muted);
    margin: 0 0 18px;
  }
  .faq p:last-child { margin-bottom: 20px; }

  .steps { counter-reset: step; list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 26px; max-width: var(--measure); }
  .steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 14px;
    font-family: var(--font-read);
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--muted);
  }
  /* Every li holds exactly one content child. A loose text node would otherwise
     become an anonymous grid item and land back in the 26px counter column. */
  .steps li > span { min-width: 0; }

  .steps b {
    display: block;
    color: var(--ink);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.015em;
  }

  .steps .path {
    display: block;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 9px 0;
  }
  .steps .path i { font-style: normal; color: var(--pitch); padding: 0 3px; }

  .steps li::before {
    content: counter(step);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--pitch);
    background: color-mix(in srgb, var(--pitch) 12%, transparent);
    width: 26px; height: 26px;
    border-radius: 50%;
    display: grid; place-items: center;
    margin-top: 1px;
  }


  /* ============================================================ FOOTER */
  .foot {
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    padding: 22px 0;
    font-size: 13.5px;
    color: var(--muted);
  }
  .foot-inner { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; }
  .foot-links { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
  .foot a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--line);
  }
  .foot a:hover { color: var(--ink); }

  /* 44px tall for a finger. The gap drops to compensate, so the two links stay
     about as far apart as they looked before. */
  .foot-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
  }

  /* --- screenshots --- */
  .shots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 3vw, 30px);
    margin-top: 38px;
  }

  .shot { margin: 0; }

  .shot-frame {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-2);
    padding: 7px;
    overflow: hidden;
    line-height: 0;
  }

  .shot-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
  }

  .shot figcaption {
    font-family: var(--font-read);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 14px;
  }

  /* Narrow screens stack. This was a horizontal scroller, which hid two of the
     three images off-screen with nothing to suggest they were there - it read as
     a page with one screenshot. A taller page beats invisible content. */
  @media (max-width: 640px) {
    .shots {
      grid-template-columns: 1fr;
      gap: 34px;
    }
    .shot {
      max-width: 320px;
      margin-inline: auto;
    }
  }
