/* File Tide website. Same "calm tiles" design as the app (app/web/styles.css): the colour tokens,
   tiles, kickers, big numbers and status chips are copied from there so the site looks like the app.
   Light by default, the app's navy dark theme when the computer is in dark mode or the toggle says so. */

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

:root {
    --page:#e6e6e3; --win:#fbfbfa; --line:#ededea;
    --text:#1f2420; --muted:#7b7b76; --t2:#55554f; --t3:#8a8a84;
    --tile:#fff; --ring:#ecece8; --div:#f1f1ee; --soft:#f0f0ed; --soft2:#f6f6f3;
    --grnS:#e7f1fd; --grnK:#55554f; --grnM:#7b7b76; --acc:#1f6fd1; --track:rgba(31,111,209,.14); --grnT:#1f6fd1; --grnD:#cde1f8;
    --okT:#1f9a55;
    --ink:#1f2420; --inkT:#fff; --inkK:#c9d2cc; --inkD:#aeb6b0;
    --pill:#1f2420; --pillT:#fff;
    --hover:rgba(31,36,32,.05); --focus:rgba(31,111,209,.45);
    --sky:#97d1fa;
    --heroGlow:rgba(151,209,250,.55);
    --shadow:0 0 0 1px rgba(0,0,0,.04),0 18px 50px rgba(20,30,24,.10);
    --ease:cubic-bezier(.2,.8,.2,1);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --page:#121a2a; --win:#0c1320; --line:#18223a;
        --text:#e8eef8; --muted:#8a96ad; --t2:#b3bed2; --t3:#7f8aa1;
        --tile:#131c2e; --ring:#1d2940; --div:#1b263a; --soft:#172236; --soft2:#101828;
        --grnS:#11305a; --grnK:#ffffff; --grnM:#c9d8ee; --acc:#5aa9f2; --track:rgba(120,180,250,.18); --grnT:#7cc2fb; --grnD:#1d3f68;
        --okT:#4cd38a;
        --ink:#dde7f7; --inkT:#0c1320; --inkK:#4b5a75; --inkD:#56657f;
        --pill:#dde7f7; --pillT:#0c1320;
        --hover:rgba(160,190,240,.06); --focus:rgba(90,169,242,.5);
        --heroGlow:rgba(40,110,200,.28);
        --shadow:0 0 0 1px rgba(255,255,255,.06),0 18px 50px rgba(0,0,0,.45);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --page:#121a2a; --win:#0c1320; --line:#18223a;
    --text:#e8eef8; --muted:#8a96ad; --t2:#b3bed2; --t3:#7f8aa1;
    --tile:#131c2e; --ring:#1d2940; --div:#1b263a; --soft:#172236; --soft2:#101828;
    --grnS:#11305a; --grnK:#ffffff; --grnM:#c9d8ee; --acc:#5aa9f2; --track:rgba(120,180,250,.18); --grnT:#7cc2fb; --grnD:#1d3f68;
    --okT:#4cd38a;
    --ink:#dde7f7; --inkT:#0c1320; --inkK:#4b5a75; --inkD:#56657f;
    --pill:#dde7f7; --pillT:#0c1320;
    --hover:rgba(160,190,240,.06); --focus:rgba(90,169,242,.5);
    --heroGlow:rgba(40,110,200,.28);
    --shadow:0 0 0 1px rgba(255,255,255,.06),0 18px 50px rgba(0,0,0,.45);
    color-scheme: dark;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--win); color: var(--text);
    font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    font-size: 16px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--grnT); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---------- App tiles (same as the app) ---------- */
.t { border-radius: 18px; padding: 24px 24px 22px; display: flex; flex-direction: column; background: var(--tile); box-shadow: inset 0 0 0 1px var(--ring); min-width: 0; position: relative; }
.t.soft { background: var(--soft); box-shadow: none; }
.t.grn { background: var(--grnS); box-shadow: none; }
.t.grn .k, .t.grn .d { color: var(--grnK); }
.t.grn .m { color: var(--grnM); }
.t.ink { background: var(--ink); box-shadow: none; color: var(--inkT); }
.t.ink .k { color: var(--inkK); }
.t.ink .d { color: var(--inkD); }
.k { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--t2); min-height: 18px; }
.k svg.i { width: 17px; height: 17px; }
.k .r { margin-left: auto; font-weight: 500; color: var(--t3); font-size: 12.5px; white-space: nowrap; }
.big { font-size: 46px; font-weight: 600; letter-spacing: -1.4px; line-height: 1; margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.big small { font-size: 20px; letter-spacing: 0; font-weight: 500; margin-left: 2px; opacity: .6; }
.big.md { font-size: 40px; }
.ttl { font-size: 19px; font-weight: 600; letter-spacing: -.2px; }
.d { font-size: 14.5px; margin-top: 10px; color: var(--t2); line-height: 1.5; }
.bar { height: 6px; border-radius: 3px; background: var(--track); margin: 16px 0 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--acc); border-radius: 3px; }
.mbar { width: 110px; height: 5px; border-radius: 3px; background: var(--track); overflow: hidden; }
.mbar i { display: block; height: 100%; width: 0; background: var(--acc); border-radius: 3px; }
.m { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--t2); }
.ic { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; color: var(--t2); flex: none; }
.ic svg.i { width: 17px; height: 17px; }
.st { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.st svg.i { width: 15px; height: 15px; stroke-width: 2; }
.st.g { color: var(--text); } .st.g svg.i { color: var(--okT); } .st.n { color: var(--t3); } .st.v { color: var(--t2); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 24px; border-radius: 23px; border: 0; cursor: pointer;
    background: var(--pill); color: var(--pillT); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap;
    transition: transform .15s var(--ease), filter .15s; }
.btn:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }
.btn svg.i { width: 18px; height: 18px; }
.btn.acc { background: var(--acc); color: #fff; }
/* Dark mode: white text on a slightly deeper blue than the accent, so the label stays easy to read */
:root[data-theme="dark"] .btn.acc { background: #2f80d8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.acc { background: #2f80d8; } }
.btn.sec { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--ring); }
.btn.sec:hover { background: var(--hover); }
.btn.soon { cursor: default; color: var(--t3); }
.btn.soon:hover { transform: none; background: transparent; }
.btn.sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 18px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--win) 80%, transparent);
    backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 18px; letter-spacing: -.2px; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 26px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) { color: var(--t2); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 10px; }
.nav a:not(.btn):hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav a[aria-current] { color: var(--text); }
.theme-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--t2); background: none; border: 0; cursor: pointer; }
.theme-btn:hover { background: var(--hover); color: var(--text); }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; } :root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
    :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}
@media (max-width: 720px) { .hide-sm { display: none; } }
.brand span { white-space: nowrap; }
@media (max-width: 420px) { .nav { gap: 0; } .nav a:not(.btn) { padding: 8px; } .nav .btn.sm { padding: 0 14px; } .brand { font-size: 17px; gap: 8px; } .brand img { width: 34px; } }

/* ---------- Hero: the app's welcome screen ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 64px; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto -10%; height: 90%; pointer-events: none;
    background: radial-gradient(60% 60% at 20% 30%, var(--heroGlow), transparent 70%), radial-gradient(50% 50% at 85% 20%, var(--heroGlow), transparent 70%); }
.hero-in { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 1040px) { .hero-in { grid-template-columns: 430px 1fr; gap: 56px; } .hero { padding: 96px 0 104px; } }
.app-mark { width: 96px; height: 64px; display: block; }
.app-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hero h1 { font-size: clamp(36px, 5.6vw, 52px); letter-spacing: -1.4px; line-height: 1.08; margin-top: 26px; }
.hero .lead { font-size: 18px; color: var(--t2); margin-top: 16px; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.cta-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--t3); }
.cta-note svg.i { width: 15px; height: 15px; }
.fade-up > * { animation: fadeUp .5s var(--ease) both; }
.fade-up > :nth-child(2) { animation-delay: 50ms; } .fade-up > :nth-child(3) { animation-delay: 100ms; }
.fade-up > :nth-child(4) { animation-delay: 150ms; } .fade-up > :nth-child(n+5) { animation-delay: 200ms; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Welcome demo (driven by static/js/demo.js, a copy of the app's WelcomeDemo) */
.demo { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 178px; gap: 14px; min-width: 0; }
.demo > .t { overflow: hidden; animation: fadeUp .5s var(--ease) both; animation-delay: 160ms; box-shadow: inset 0 0 0 1px var(--ring), var(--shadow); }
.demo > .t.grn { box-shadow: var(--shadow); }
.demo > .t:nth-child(2) { animation-delay: 220ms; } .demo > .t:nth-child(3) { animation-delay: 280ms; }
.demo .demo-main { grid-column: span 2; min-height: 248px; }
.demo-tag { font-size: 11.5px !important; font-weight: 600 !important; color: var(--t3); background: var(--soft); padding: 2px 8px; border-radius: 8px; }
.demo-route { display: flex; align-items: center; gap: 8px; margin-top: 14px; min-width: 0; font-size: 12.5px; color: var(--t2); transition: opacity .3s var(--ease); }
.demo-place { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--soft); font-weight: 600; white-space: nowrap; }
.demo-place svg.i { width: 14px; height: 14px; color: var(--t3); }
.demo-arrow { width: 15px !important; height: 15px !important; color: var(--t3); }
.demo-rows { margin-top: 12px; position: relative; transition: opacity .3s var(--ease); }
.drow { display: flex; align-items: center; gap: 12px; height: 44px; border-top: 1px solid var(--div); }
.drow:first-child { border-top: 0; }
.drow .ic { width: 28px; height: 28px; border-radius: 8px; }
.drow .ic svg.i { width: 15px; height: 15px; }
.drow .n { font-weight: 600; font-size: 13px; }
.drow .s { font-size: 12px; color: var(--t3); margin-top: 1px; }
.drow .dst { flex: none; min-width: 150px; display: flex; justify-content: flex-end; align-items: center; }
.drow .prog { display: flex; align-items: center; gap: 10px; }
.drow .prog b { width: 34px; text-align: right; font-weight: 600; font-size: 12.5px; color: var(--t2); }
.demo-prog .big { font-size: 40px; }
.demo-check .big small { opacity: .55; }
.demo-check .d { min-height: 36px; font-size: 13.5px; }
@media (max-width: 560px) {
    .demo { grid-template-rows: auto 168px; gap: 10px; }
    .demo > .t { padding: 18px 16px 16px; }
    .drow .dst { min-width: 0; }
    .drow .mbar { width: 56px; }
    .demo-prog .big, .demo .big.md { font-size: 32px; letter-spacing: -1px; }
    .demo-check .d { font-size: 12.5px; }
}

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.band { background: var(--soft2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 660px; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.8px; line-height: 1.15; }
.sec-head p { color: var(--t2); font-size: 17.5px; margin-top: 12px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.tiles { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tiles.three { grid-template-columns: repeat(3, 1fr); } }
.tiles .t .ttl { margin-top: 16px; }
@media (min-width: 1000px) { .tiles.three .wide { grid-column: span 2; } }
.uc-rows { margin-top: 18px; }
.uc-rows .lrow:first-child { border-top: 1px solid var(--div); }
.tiles .t .d { margin-top: 6px; }
.tile-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--t2); display: grid; place-items: center; }
.t.grn .tile-ic { background: var(--tile); color: var(--acc); }
.t.ink .tile-ic { background: rgba(127,127,127,.18); color: var(--inkT); }
.tile-ic svg.i { width: 20px; height: 20px; }
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Speed tiles */
.speed { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .speed { grid-template-columns: 1fr 1fr 1fr; } }
.speed .t { min-height: 190px; }
.speed .big { margin-top: 28px; }

/* Story */
.story { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .story { grid-template-columns: 1fr 1fr; } }
.story p { color: var(--t2); font-size: 17.5px; }
.list-t { padding: 6px 20px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--div); }
.lrow:first-child { border-top: 0; }
.lrow .n { font-weight: 600; font-size: 14px; }
.lrow .s { font-size: 12.5px; color: var(--t3); }

/* Permissions */
.perm { display: flex; gap: 14px; align-items: flex-start; }
.perm + .perm { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--div); }
.t.grn .perm + .perm { border-color: var(--grnD); }
.perm b { display: block; font-size: 15px; }
.perm span { color: var(--t2); font-size: 14.5px; }
.t.grn .perm span { color: var(--grnM); }

/* Download */
.dl-grid { display: grid; gap: 14px; max-width: 820px; margin: 0 auto; grid-template-columns: 1fr; }
@media (min-width: 680px) { .dl-grid { grid-template-columns: 1fr 1fr; } }
.dl-card { align-items: flex-start; padding: 28px; }
.dl-card .os { width: 34px; height: 34px; color: var(--text); }
.dl-card .ttl { margin-top: 18px; font-size: 22px; }
.dl-card .d { margin: 4px 0 22px; font-size: 14px; color: var(--t3); }
.dl-card.mine { box-shadow: inset 0 0 0 2px var(--acc); }
.dl-card:not(.mine) .yours { display: none; }
.dl-card .yours { position: absolute; top: 22px; right: 22px; font-size: 12px; font-weight: 600; color: var(--grnT); background: var(--grnS); padding: 3px 10px; border-radius: 10px; }
.dl-foot { text-align: center; color: var(--t3); font-size: 14px; margin-top: 22px; }

/* ---------- Legal and support pages ---------- */
.doc { padding: 56px 0 88px; }
.doc .wrap { max-width: 840px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -1px; }
.doc .updated { color: var(--t3); margin: 10px 0 30px; }
.doc h2 { font-size: 22px; margin: 40px 0 10px; letter-spacing: -.3px; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--t2); }
.doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: .45em; }
.doc strong { color: var(--text); font-weight: 600; }
.doc .t { margin: 22px 0; }
.doc .t p:last-child { margin-bottom: 0; }
.doc .t.grn p, .doc .t.grn li { color: var(--grnK); }
.table-scroll { overflow-x: auto; margin: 12px 0 20px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--ring); vertical-align: top; color: var(--t2); }
.doc th { color: var(--text); font-weight: 600; }
.faq details { background: var(--tile); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--ring); padding: 16px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.faq details p { margin: 10px 0 0; }
.contact-tiles { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 24px 0 8px; }
@media (min-width: 640px) { .contact-tiles { grid-template-columns: 1fr 1fr; } }
.contact-tiles .ttl { margin-top: 14px; font-size: 17px; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 14.5px; }
.foot-in { display: grid; gap: 18px; }
@media (min-width: 820px) { .foot-in { grid-template-columns: 1fr auto; align-items: center; } }
.foot-brand { display: flex; gap: 12px; align-items: center; }
.foot-brand img { width: 40px; height: 26px; object-fit: contain; }
.foot-brand span { display: block; color: var(--t3); font-size: 13.5px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--t2); }
.foot-note { grid-column: 1 / -1; color: var(--t3); font-size: 13px; margin: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-up > *, .demo > .t { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn:hover { transform: none; }
}

/* Room for the sticky header when a link scrolls to a section */
section[id] { scroll-margin-top: 64px; }   /* also keeps native jumps clear of the header */
