/* iksydk.com
   Document typography for compliance pages. Most visitors arrive deep-linked
   from an app-store listing on a phone, so this is tuned for reading first:
   comfortable measure, generous leading, and a masthead that tells someone who
   landed on privacy.html whose site they are on. */

:root {
    color-scheme: light dark;

    --paper:      #FBFCFD;
    --ink:        #1A2027;
    --ink-muted:  #5A6672;
    --rule:       #DFE4E9;
    --accent:     #14606B;
    --accent-hi:  #0E4A53;

    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --measure: 68ch;
    --pad: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper:      #14181C;
        --ink:        #E2E7EB;
        --ink-muted:  #98A2AC;
        --rule:       #2A3138;
        --accent:     #4FB3C0;
        --accent-hi:  #6FC7D2;
    }
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

/* ---------- masthead ----------
   Present on every page so a deep-linked visitor is never stranded. */

.masthead {
    /* Same measure and centring as main and footer, so the masthead rule, the
       text column and the footer rule all share one vertical alignment. */
    max-width: var(--measure);
    margin: 0 auto;
    border-bottom: 1px solid var(--rule);
    padding: 1rem var(--pad);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
}

.masthead-name {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
}

.masthead-name:hover { color: var(--accent); }

.masthead nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    font-size: 0.875rem;
}

/* ---------- content ---------- */

main {
    max-width: var(--measure);
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 3.5rem) var(--pad) clamp(3rem, 8vw, 5rem);
}

h1 {
    font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
    margin: 0 0 1.5rem;
}

h2 {
    font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 2.5rem 0 0.75rem;
}

p { margin: 0 0 1.25rem; }

ul { margin: 0 0 1.25rem; padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

strong { font-weight: 600; }

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

a:hover { color: var(--accent-hi); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Lead paragraph: the first paragraph after the title carries the "what is
   this document" context, so it gets slightly more room to breathe. */
.lead { color: var(--ink-muted); }

/* ==========================================================================
   Arcade treatment, legal pages only
   ========================================================================== */

/* ---------- Arcade type: Fredoka (display) + Nunito (body) ----------
   site/ and txlabs/ deploy to different origins, so site/style.css cannot
   reference txlabs/assets/fonts/. The two woff2 files are duplicated at
   site/assets/fonts/ instead (both OFL, redistribution permitted; the
   licence lives alongside them at site/assets/fonts/OFL.txt), keeping each
   directory self-contained. Weight ranges match txlabs/assets/styles.css
   exactly: Fredoka tops out at 700 by design, so a rule asking for 800
   resolves to 700 -- that is intended, not a bug. */

@font-face {
    font-family: "Fredoka";
    src: url("assets/fonts/fredoka.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: "Nunito";
    src: url("assets/fonts/nunito.woff2") format("woff2");
    font-weight: 200 1000;
    font-display: swap;
}

/* ---------- Arcade tokens, legal pages only ----------
   Declared on body.legal rather than :root on purpose: --ink and --ink-muted
   exist in both design languages with different values, and redefining them
   globally would restyle site/index.html, which this change must not alter.
   Values copied verbatim from txlabs/assets/styles.css :root -- including
   --display/--body, so site/index.html keeps the --sans system stack. */

body.legal {
    --canvas: #F4F1EA;
    --card: #FFFFFF;
    --card-lip: #E3DCCA;
    --ink: #26241F;
    --ink-body: #4A5750;
    --ink-muted: #5D6660;
    --green: #1FBF74;
    --green-lip: #16794A;
    --green-tint: #DCEEE4;
    --green-tint-ink: #0E5A3A;
    --green-tint-lip: #B6D8C6;

    --display: "Fredoka", "Trebuchet MS", sans-serif;
    --body: "Nunito", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* site/index.html keeps the document styling above. The three compliance
   pages take the Arcade look so a visitor arriving from the Golf site is
   not thrown into a different-looking company. */

body.legal {
    background: var(--canvas);
    color: var(--ink-body);
    font-family: var(--body);
}

body.legal .masthead {
    border-bottom: 1px solid var(--card-lip);
}

body.legal .masthead-name {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}

body.legal .masthead-name:hover { color: var(--green-lip); }

body.legal .masthead nav a {
    color: var(--ink-body);
    font-weight: 600;
}

body.legal .masthead nav a:hover { color: var(--green-lip); }

body.legal h1 {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

body.legal h2 {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-lip);
}

body.legal .lead { color: var(--ink-muted); }

body.legal strong { font-weight: 800; color: var(--ink); }

body.legal a {
    color: var(--green-tint-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

body.legal a:hover { color: var(--green-lip); }

body.legal :focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

/* the third-party-link lists sit inside a card, echoing the Arcade "card
   with a solid lip" component rather than a shadow */
body.legal main > div {
    background: var(--card);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    margin: 0 0 1.25rem;
    box-shadow: 0 4px 0 var(--card-lip);
}

body.legal main > div p:last-of-type { margin-bottom: 1.25rem; }
body.legal main > div ul:last-child { margin-bottom: 0; }

/* The privacy policy's "short version" summary. Same card as above -- it is a
   main > div and inherits that rule -- tinted green so a plain-language summary
   sitting above thirteen numbered sections reads as a callout rather than as the
   first of them. The last-paragraph margin the link-list card wants would leave a
   gap under a single-paragraph callout, so it is zeroed here. */
body.legal main > div.callout {
    background: var(--green-tint);
    box-shadow: 0 4px 0 var(--green-tint-lip);
}

body.legal main > div.callout p:last-of-type { margin-bottom: 0; }

/* No h3 rule here on purpose. privacy.html briefly split section 3 into Android
   and iOS subheads; Crashlytics on iOS removed the difference and the section is
   one list again, so nothing under site/ uses h3. txlabs/support.html does, but
   that site has its own stylesheet — adding a rule here would not reach it. */

/* The collected-data table on privacy.html. Laid out as a block with its own
   horizontal scroll so a two-column table cannot widen the page on a phone --
   most visitors here arrived deep-linked from a store listing. */
body.legal table {
    display: block;
    overflow-x: auto;
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
}

body.legal th,
body.legal td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--card-lip);
}

body.legal th {
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink);
}

body.legal tbody tr:last-child td { border-bottom: none; }

/* ---------- footer ---------- */

footer {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 1.5rem var(--pad) 3rem;
    border-top: 1px solid var(--rule);
    color: var(--ink-muted);
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: baseline;
}

footer p { margin: 0; }

footer a { color: var(--ink-muted); }
footer a:hover { color: var(--accent); }

body.legal footer {
    border-top: 1px solid var(--card-lip);
}

body.legal footer a:hover { color: var(--green-lip); }

/* ---------- index signpost ---------- */

.docs {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    border-top: 1px solid var(--rule);
}

.docs li {
    margin: 0;
    border-bottom: 1px solid var(--rule);
}

.docs a {
    display: block;
    padding: 1rem 0;
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
}

.docs a:hover { color: var(--accent); }

.docs span {
    display: block;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--ink-muted);
}
