/* InkPocket — the one stylesheet.
   Every real page links this: /index, /privacy, /terms, /support, /changelog
   and their Italian twins under /it/. Until the site went bilingual each page
   inlined its own copy of the block below; with ten pages instead of five that
   arrangement guarantees drift, so the copies were merged here on 2026-08-19.

   Two page shapes, selected by a class on <body>:
     (no class)   the landing page — 1100px wide, lighter veil over the artwork
     .doc-page    privacy / terms / support / changelog — 880px, darker veil,
                  looser line height for long-form reading

   Still inlining their own styles, deliberately: 404.html (the deck-link
   fallback, kept self-contained) and features/contact/faq.html (stale drafts of
   the landing page that nothing links to).

   Colours mirror the app's own tokens — keep them in sync with the app. */

:root{
  --bg:#1c1919;            /* onBackground (dark) */
  --card:#373b70;          /* appPrimary (dark) */
  --text:#ffffff;          /* appLabelColor (dark) */
  --muted:#e3e3e3;         /* Outline */
  --accent:#6d70a4;        /* appPrimaryContainer (dark) */
  --accent2:#3ed598;       /* Tertiary */
  --stroke:rgba(255,255,255,.08);
  /* Darkness of the veil over the background artwork; .doc-page raises it so
     body text stays readable over a busy image. */
  --veil-top:.30;
  --veil-bottom:.30;
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0; color:var(--text); font:16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; background:var(--bg)}
body.doc-page{line-height:1.6; --veil-top:.45; --veil-bottom:.55}

/* Global link colour = app accent */
a{color:var(--accent2)}
a:hover{text-decoration:underline}

.hero-bg{
  position:fixed; inset:0; pointer-events:none; z-index:-1;
  background:
    linear-gradient(180deg, rgba(0,0,0,var(--veil-top)), rgba(0,0,0,var(--veil-bottom))),
    url('/assets/lorcana-bg-hero.jpg') center/cover no-repeat fixed,
    radial-gradient(1400px 800px at 20% -10%, rgba(109,112,164,.32), transparent 60%),
    radial-gradient(1200px 700px at 120% 5%, rgba(62,213,152,.18), transparent 55%),
    radial-gradient(900px 500px at 70% 90%, rgba(255,255,255,.06), transparent 60%),
    var(--bg);
}

.wrap{max-width:1100px; margin:0 auto; padding:24px}
body.doc-page .wrap{max-width:880px}

/* --- Navigation --- */
.nav{position:relative; display:flex; align-items:center; justify-content:center; gap:16px; padding:14px 18px; border:1px solid var(--stroke); border-radius:18px; background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)); backdrop-filter:saturate(140%) blur(6px)}
.brand{display:flex; align-items:center; gap:10px; position:absolute; left:18px; top:50%; transform:translateY(-50%); text-decoration:none; color:var(--text)}
.brand:hover{text-decoration:none}
.logo{width:28px; height:28px; border-radius:8px; display:block; object-fit:cover; box-shadow:inset 0 0 14px rgba(0,0,0,.35); overflow:hidden}
.brand b{letter-spacing:.2px}
.links{display:flex; gap:18px; align-items:center; justify-content:center; flex-wrap:wrap}
.links a{color:var(--text); text-decoration:none; font-weight:500; opacity:.9}
.links a:hover{opacity:1}

/* Language switch. It rides inside .links rather than being pinned to the right
   of the nav: the brand is already absolutely positioned there, and a second
   absolute element collides with the centred links at tablet widths. In flow it
   simply wraps with everything else.

   Text, not flags: a flag is a country, not a language — the Union Jack tells a
   reader in Boston or Sydney that English isn't for them, and Italian is spoken
   outside Italy. Both codes are always shown, one of them marked current, so it
   reads as a switch rather than as a link to somewhere unknown. */
.langswitch{display:flex; align-items:center; gap:2px; margin-left:4px; padding:3px; border:1px solid var(--stroke); border-radius:999px; background:rgba(12,14,21,.5); font-size:12px; font-weight:700; letter-spacing:.4px}
.langswitch a, .langswitch span{padding:3px 9px; border-radius:999px; color:var(--muted); text-decoration:none; line-height:1.2}
.langswitch a:hover{color:var(--text); background:rgba(255,255,255,.07); text-decoration:none}
.langswitch [aria-current="true"]{background:rgba(62,213,152,.16); color:var(--text)}

/* --- Landing page --- */
.hero{position:relative; display:grid; grid-template-columns:1.05fr .95fr; gap:30px; align-items:center; margin-top:36px}
.hero::before{content:""; position:absolute; inset:-24px 0 -24px 0; pointer-events:none; z-index:-1; opacity:.35;
  background:radial-gradient(900px 460px at 52% 8%, rgba(109,112,164,.28), transparent 60%);
  mix-blend-mode:screen}

h1{font-size:52px; line-height:1.08; margin:0 0 12px; text-shadow:0 2px 18px rgba(0,0,0,.35)}
.lead{color:var(--muted); font-size:18px; margin:0 0 18px}
.cta{display:flex; gap:12px; flex-wrap:wrap}

/* Two entry hooks under the hero: one per existing-collection audience. */
.hooks{display:flex; flex-direction:column; align-items:flex-start; gap:8px; margin:0 0 18px; color:var(--muted); font-size:15px}
.hooks span{display:inline-block; position:relative; padding-left:22px; text-align:left}
.hooks span::before{content:"\21B3"; position:absolute; left:0; top:0; color:var(--accent2)}

.hero-phone{width:100%; max-width:420px; display:block; justify-self:end; filter:drop-shadow(0 20px 60px rgba(0,0,0,.6)); transform:perspective(1000px) rotateY(-8deg); transition:transform .25s ease}
.hero-phone:hover{transform:perspective(1000px) rotateY(-2deg)}

.pill{display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid var(--stroke); background:rgba(12,14,21,.6); font-size:13px; color:var(--muted)}
.pill .dot{width:6px; height:6px; border-radius:50%; background:var(--accent); box-shadow:0 0 10px rgba(123,92,255,.65)}

.btn{display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:12px 16px; border-radius:12px; border:1px solid var(--stroke); text-decoration:none; font-weight:600; color:var(--text)}
.btn:hover{text-decoration:none}
.btn-primary{background:linear-gradient(180deg, rgba(109,112,164,.30), rgba(55,59,112,.15))}
.btn-primary:hover{filter:brightness(1.08)}
.btn-ghost{background:rgba(255,255,255,.06)}
.btn-ghost:hover{background:rgba(12,14,21,.9)}
/* The consent banner's controls are real <button>s, which inherit neither the
   page font nor a pointer from the anchors this class was written for. */
button.btn{font-family:inherit; cursor:pointer}
.btn-small{padding:9px 14px; font-size:14px}
.actions{display:flex; gap:12px; flex-wrap:wrap; margin:18px 0 6px}

.section{padding:64px 24px}
.section h2{font-size:28px; margin:0 0 8px}
.section .lead{max-width:760px}

.features-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:16px}
.card{background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border:1px solid var(--stroke); border-radius:16px; padding:18px}
.card h3{margin:0 0 6px; font-size:18px}
.card p{margin:0; color:var(--muted)}

/* The "peek at the app" strip. The minimum is 185px so that all five phones sit
   on one row inside the 1100px wrap: the content card leaves 1014px, and five
   columns plus four 16px gaps need 5x185 + 64 = 989. At the old 220px the fifth
   slot wrapped onto a row of its own and a `1fr` column stretched it to the full
   width — one enormous phone under four small ones. Raise this only along with
   the slot count. */
.screens{display:grid; grid-template-columns:repeat(auto-fit, minmax(185px, 1fr)); gap:16px; align-items:stretch}
.screen-card{border:0; border-radius:16px; background:transparent; overflow:visible}
.screen-card img{display:block; width:100%; height:auto; border-radius:16px; box-shadow:0 14px 40px rgba(0,0,0,.45)}

/* Numbered how-to steps, each with its own screenshot (see #import). */
.steps{display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:22px; align-items:start}
.step-block{display:flex; flex-direction:column; gap:10px}
.step-head{display:flex; align-items:center; gap:10px}
.step-num{flex:0 0 auto; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font-size:14px; font-weight:700; color:var(--text); border:1px solid var(--stroke); background:linear-gradient(180deg, rgba(62,213,152,.30), rgba(62,213,152,.10))}
.step-block h4{margin:0; font-size:17px}
.step-block p{margin:0; color:var(--muted); min-height:4.35em}
.step-block img{display:block; width:100%; height:auto; border-radius:16px; box-shadow:0 14px 40px rgba(0,0,0,.45); margin-top:2px}

.subhead{margin:28px 0 6px; font-size:19px}
.muted-body{margin:0; color:var(--muted)}
.muted-small{color:var(--muted); font-size:14px}

.note{margin-top:22px; padding:14px 16px; border:1px solid var(--stroke); border-left:3px solid var(--accent2); border-radius:12px; background:rgba(62,213,152,.06); color:var(--muted); font-size:15px}
.note p{margin:0 0 8px}
.note p:last-child{margin:0}
.note strong{color:var(--text)}

.badge{display:inline-block; margin-left:8px; padding:2px 8px; border-radius:999px; border:1px solid var(--stroke); background:rgba(255,255,255,.06); color:var(--muted); font-size:11px; font-weight:600; letter-spacing:.3px; text-transform:uppercase; vertical-align:middle}

.cta-banner{display:flex; align-items:center; justify-content:space-between; gap:18px; border:1px solid var(--stroke); border-radius:18px; padding:18px 20px; background:linear-gradient(180deg, rgba(62,213,152,.12), rgba(109,112,164,.12))}
.cta-actions{display:flex; gap:12px; flex-wrap:wrap}

.content-card{border:1px solid var(--stroke); border-radius:16px; padding:18px; background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02))}
.content-card .cta-banner{border:0; padding:18px; background:transparent}

.legal{margin:26px 0; padding:18px; border:1px solid var(--stroke); border-radius:16px; background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02))}
.legal h2{margin:0 0 10px; font-size:18px}
.legal p{margin:0 0 10px; color:var(--muted)}

/* --- Long-form pages (privacy / terms / support / changelog) --- */
.doc{border:1px solid var(--stroke); border-radius:16px; padding:28px; margin:28px 0; background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02))}
.doc h1{font-size:36px; line-height:1.15; margin:0 0 8px}
.doc h2{font-size:20px; margin:32px 0 8px}
.doc h2:first-of-type{margin-top:24px}
.doc p, .doc li{color:var(--muted)}
.doc ul{margin:0 0 12px; padding-left:20px}
.doc li{margin:0 0 6px}
/* Restores the top margin the browser used to give this paragraph, now that the
   landing page's `.lead{margin:0 0 18px}` reaches these pages too. */
.doc .lead{font-size:18px; margin:18px 0}
.updated{color:var(--muted); font-size:14px; opacity:.8; margin:0 0 4px}

.callout{border:1px solid var(--stroke); border-left:3px solid var(--accent2); border-radius:12px; padding:14px 16px; margin:18px 0; background:rgba(62,213,152,.06)}
.callout p{margin:0}

.toc{display:flex; flex-wrap:wrap; gap:10px; margin:20px 0 0; padding:0; list-style:none}
.toc a{display:inline-flex; padding:6px 10px; border-radius:999px; border:1px solid var(--stroke); background:rgba(12,14,21,.5); text-decoration:none; font-size:14px}

.faq details{border:1px solid var(--stroke); border-radius:12px; padding:12px 16px; margin:0 0 10px; background:rgba(255,255,255,.03)}
.faq summary{cursor:pointer; font-weight:600; color:var(--text)}
.faq details[open] summary{margin-bottom:8px}
.faq p:last-child{margin-bottom:0}

footer{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; color:var(--muted); font-size:14px; margin:36px 0}
footer a{color:var(--muted)}

.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0}

/* --- Analytics consent ---

   The banner's words live in each page's own HTML, authored in that page's
   language like everything else — this only places the box, and site.js only
   toggles `hidden`. It never appears on a deck link: 404.html loads neither
   this file nor the script.

   `.consent[hidden]` is load-bearing. The browser's own [hidden]{display:none}
   is a UA rule and loses to .consent{display:flex}, so without it the banner
   would be on screen from the first paint, before anything has decided whether
   to ask. */
.consent{position:fixed; left:12px; right:12px; bottom:12px; z-index:50; margin:0 auto; max-width:760px;
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  padding:14px 16px; border:1px solid var(--stroke); border-radius:14px;
  background:rgba(12,14,21,.94); box-shadow:0 10px 30px rgba(0,0,0,.45)}
.consent[hidden]{display:none}
.consent p{margin:0; flex:1 1 320px; color:var(--muted); font-size:14px; line-height:1.5}
.consent-actions{display:flex; gap:8px; flex-wrap:wrap}

/* --- Changelog --- */

/* Milestone track — a rail that snakes across three rows of five. Every piece
   of the line is drawn by the steps themselves, so nothing needs a width
   computing: a step paints the segment to its right, and the two steps at the
   ends of the bends paint a U-turn into the row below.

   The drop is `100% + var(--drop)`: 100% is the row's real height, so the bend
   follows it if a label ever wraps and a row grows — a hard-coded height was
   tried twice and broke both times. --drop is 20px, which is 4px shorter than
   the 24 the arithmetic gives (22 row gap + 12 rail offset + 2 border − 12 own
   top). That is deliberate and was settled by eye: at 24 the line runs to the
   centre of the dot below and reads as overshooting it, at 20 it meets the
   dot's upper edge. Don't "correct" it back to 24 — the geometry is right and
   the look is wrong. */
.track{--drop:20px; display:grid; grid-template-columns:repeat(5, 1fr); row-gap:22px; list-style:none; margin:18px 0 0; padding:0}
.step{position:relative; height:64px; padding-top:28px; text-align:center}
/* Load-bearing, and it has to out-specify `.doc li{margin:0 0 6px}` (0,1,1) — a
   plain `.step` (0,1,0) loses to it however late it appears. A grid item's
   margin grows its row, which leaves every bend 6px short. */
.track .step{margin:0}

/* segment from this dot to the next one along the row */
.step::before{content:""; position:absolute; top:12px; left:50%; right:-50%; height:2px; background:rgba(255,255,255,.12)}
.step:nth-child(5n)::before, .step:last-child::before{display:none}
.step.done::before{background:rgba(62,213,152,.55)}
.step.now::before{background:linear-gradient(90deg, rgba(62,213,152,.55), rgba(255,255,255,.12))}

/* the bends: out to the edge, down one row, back in to the dot below */
.step.turn-right::after, .step.turn-left::after{content:""; position:absolute; top:12px; height:calc(100% + var(--drop)); border:2px solid rgba(255,255,255,.12)}
.step.turn-right::after{left:50%; right:0; border-left:0; border-top-right-radius:16px; border-bottom-right-radius:16px}
.step.turn-left::after{left:0; right:50%; border-right:0; border-top-left-radius:16px; border-bottom-left-radius:16px}
.step.lit::after{border-color:rgba(62,213,152,.55)}

.step .dot{position:absolute; top:7px; left:50%; transform:translateX(-50%); width:12px; height:12px; border-radius:50%; background:var(--bg); border:2px solid rgba(255,255,255,.28)}
.step.done .dot{background:var(--accent2); border-color:var(--accent2)}
.step.now .dot{border-color:var(--accent2); box-shadow:0 0 0 5px rgba(62,213,152,.14)}
.step .label{display:block; padding:0 7px; font-size:12.5px; line-height:1.3; color:var(--muted)}
.step.done .label{color:var(--text)}

.step.flag .dot{width:13px; height:13px; border-radius:3px; transform:translateX(-50%) rotate(45deg)}
.step.flag .label{font-size:11px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:var(--text)}
.step.flag:not(.done) .dot{background:var(--bg); border-color:var(--accent2)}
.step.flag:not(.done) .label{color:var(--accent2)}

.track-note{font-size:14px; margin:12px 0 0}

.toolbar{display:flex; align-items:center; justify-content:flex-end; margin:20px 0 0; padding-top:16px; border-top:1px solid var(--stroke)}
.feed{font-size:14px; color:var(--muted); text-decoration:none; white-space:nowrap}
.feed:hover{color:var(--text)}

.timeline{position:relative; margin:24px 0 0; padding-left:26px}
.timeline::before{content:""; position:absolute; left:5px; top:12px; bottom:12px; width:1px; background:linear-gradient(180deg, rgba(62,213,152,.45), var(--stroke))}

.entry{position:relative; margin:0 0 34px; scroll-margin-top:24px}
.entry:last-child{margin-bottom:6px}
.entry::before{content:""; position:absolute; left:-26px; top:7px; width:11px; height:11px; border-radius:50%; background:var(--bg); border:2px solid var(--accent2); box-shadow:0 0 0 4px rgba(62,213,152,.10)}
.entry:target{margin-left:-14px; padding-left:14px; border-left:2px solid var(--accent2); border-radius:2px}

.entry-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.doc .entry h2{font-size:19px; margin:0}
.doc .entry h2 a{color:var(--text); text-decoration:none}
.doc .entry h2 a:hover{color:var(--accent2)}
.latest{font-size:11px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; padding:3px 9px; border-radius:999px; border:1px solid rgba(62,213,152,.35); background:rgba(62,213,152,.14); color:var(--text)}

.items{list-style:none; margin:12px 0 0; padding:0}
.items li{display:flex; align-items:flex-start; gap:12px; margin:0 0 9px}
.tag{flex:0 0 auto; margin-top:3px; width:76px; text-align:center; font-size:10px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; padding:3px 0; border-radius:6px; border:1px solid var(--stroke); background:rgba(255,255,255,.06); color:var(--muted)}
.t-new{border-color:rgba(62,213,152,.35); background:rgba(62,213,152,.14); color:#9ff0cb}
.t-fixed{border-color:rgba(109,112,164,.45); background:rgba(109,112,164,.20); color:#c6c8ee}
.t-changed{border-color:rgba(255,196,84,.30); background:rgba(255,196,84,.12); color:#f3d59a}
.t-privacy{border-color:rgba(255,255,255,.22); background:rgba(255,255,255,.10); color:#ffffff}

/* --- Responsive. Widest breakpoint first: at 480px all three apply. --- */
@media (max-width:980px){
  .hero{grid-template-columns:1fr; text-align:center}
  .hero-phone{justify-self:center; max-width:320px}
  .cta{justify-content:center}
  .hooks{align-items:center}
}

/* Too narrow to snake: the rail stands up, the bends go away, and every step
   draws the segment below it instead of the one beside it. */
@media (max-width:719px){
  .track{display:block; position:relative; padding-left:26px}
  .track .step{height:auto; padding:0 0 15px; text-align:left}
  .track .step::before{display:block; top:6px; bottom:-15px; left:-21px; right:auto; width:2px; height:auto}
  .track .step:last-child::before{display:none}
  .track .step.now::before{background:linear-gradient(180deg, rgba(62,213,152,.55), rgba(255,255,255,.12))}
  .track .step::after{display:none}
  .track .step .dot{left:-26px; top:3px; transform:none}
  .track .step.flag .dot{transform:translateX(0) rotate(45deg)}
  .track .step .label{padding:0}
}

@media (max-width:560px){
  .nav{flex-direction:column; align-items:stretch; gap:10px}
  .brand{position:static; transform:none; margin:0}
  .links{justify-content:flex-start; flex-wrap:wrap; gap:12px}
  .langswitch{margin-left:auto}
  .hero-phone{transform:none !important}
  .hero-phone:hover{transform:none !important}
  .doc{padding:20px}
  .doc h1{font-size:28px}
  /* Stacked, the paragraph's `flex:1 1 320px` stops being a width and becomes a
     320px-tall box — a banner half the height of the phone. Reset the basis. */
  .consent{flex-direction:column; align-items:stretch}
  .consent p{flex:0 1 auto}
  .consent-actions .btn{flex:1 1 auto}
  .items li{flex-direction:column; gap:4px}
  .tag{width:auto; padding:3px 8px}
}
