/* theme tokens from apps-src/oramissa/app.json */
:root{--accent:#E2C27A;--accent2:#F1DDA8;--btn1:#E8CB86;--btn2:#C9A458;--on-accent:#1A1405;--glow:rgba(226,194,122,.26);--tint:rgba(226,194,122,.11)}
/* Davie Studio app pages, classic format (the Rush Out page). Loaded after /assets/style.css and adds
   only what the shared styles lack. Source: site/appsite/app.css. appsite/gen.py copies it to
   /apps/<slug>/static/style.css with the app's theme tokens (app.json "theme") placed above this line.
   Tokens an app may set: --accent --accent2 --btn1 --btn2 --on-accent --glow --tint. */

/* ---------- theme hooks: the studio look unless a token says otherwise ---------- */
body { background-image: radial-gradient(1100px 620px at 78% -8%, var(--tint, rgba(61, 214, 208, .13)), transparent 60%),
  radial-gradient(900px 600px at -10% 20%, rgba(64, 96, 190, .16), transparent 60%),
  linear-gradient(180deg, var(--bg) 0%, var(--bg2) 55%, var(--bg) 100%); }
.btn.primary { background: linear-gradient(180deg, var(--btn1, #4fe3dc), var(--btn2, #2fb9b4)); color: var(--on-accent, #03201f); box-shadow: 0 10px 30px var(--glow, rgba(61, 214, 208, .28)); }
.btn.primary:hover { color: var(--on-accent, #03201f); }
.contact { background: linear-gradient(140deg, var(--tint, rgba(61, 214, 208, .10)), rgba(64, 96, 190, .10)); }
.contact > div { min-width: 0; }
.contact .btn { max-width: 100%; text-align: center; }
h1, h2, h3 { overflow-wrap: break-word; }

/* ---------- header: studio brand, app links, compact language menu ---------- */
.top .brand { white-space: nowrap; }
.nav { min-width: 0; }
.nav > a { white-space: nowrap; }
.lang-menu { position: relative; flex: none; margin-inline-start: 6px; }
.lang-menu summary { display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; -webkit-user-select: none; user-select: none; white-space: nowrap;
  font-size: 13px; font-weight: 700; line-height: 1; color: var(--soft); padding: 8px 12px; border: 1px solid var(--line2); border-radius: 999px; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--text); background: rgba(255, 255, 255, .06); }
.lang-menu summary:focus-visible, .lang-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-menu svg { flex: none; }
.lm-code { display: none; }
.lang-list { position: absolute; top: calc(100% + 12px); inset-inline-end: 0; z-index: 30; width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 560px);
  overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0; padding: 8px; list-style: none;
  border: 1px solid var(--line2); border-radius: 18px; background: #0b1222; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.lang-list a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--soft); font-size: 14px; font-weight: 500; line-height: 1.3; white-space: normal; }
.lang-list a:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.lang-list a[aria-current] { color: var(--on-accent, #03201f); background: var(--accent); font-weight: 700; }

/* ---------- hero ---------- */
.ap-hero { padding-left: 20px; padding-right: 20px; padding-bottom: 24px; }
.ap-hero > div { min-width: 0; }
.ap-hero h1 { font-size: clamp(34px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -1.8px; }
.ap-hero .lead { margin-bottom: 22px; }
.app-id { display: flex; align-items: center; gap: 14px; }
.app-id > div { min-width: 0; }
.app-id img { flex: none; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.app-id .eyebrow { letter-spacing: 1.6px; }
.app-name { margin: 4px 0 0; font-weight: 750; color: var(--text); }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.badges a { display: block; line-height: 0; border-radius: 10px; }
.badges a.btn { display: inline-flex; line-height: inherit; }
.badges img.apple { height: 52px; width: auto; }
/* The Google badge ships with built-in padding; this matches the visible size of the Apple badge. */
.badges img.play { height: 77px; width: auto; margin: -12px -12px; }
.badges a:focus-visible, .toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.soon { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 9px 16px; border: 1px solid rgba(245, 165, 36, .5); border-radius: 999px;
  background: rgba(245, 165, 36, .1); color: var(--amber); font-weight: 700; font-size: 15px; line-height: 1.35; }
.soon-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { display: flex; align-items: center; gap: 8px; padding-block: 5px; padding-inline: 6px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--text); font-size: 15px; font-weight: 600; }
.chips img { width: 38px; height: 38px; }
.chips li:not(:has(img)) { padding-inline-start: 16px; }
.art { display: grid; place-items: center; }
/* Two phone screenshots (hero "phones"): the shared rules let the tilted pair stick out of the page, by a few pixels
   on desktop widths and by up to 35px on 320-375px phones. The margin makes room for the tilt; the sizes for
   narrow screens are further down. */
.ap-hero .phones { margin-inline-end: 8px; }
.art img { width: min(100%, 440px); height: auto; filter: drop-shadow(0 18px 60px var(--glow, rgba(61, 214, 208, .28))); }

/* ---------- sections and blocks ---------- */
.sec-head { flex-wrap: wrap; }
.sec-head > div { min-width: 0; }
.blk + .blk { margin-top: 26px; }
.steps, .cards { list-style: none; margin: 0; padding: 0; }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.steps .card, .cards .card { padding: 22px; }
.steps .card > *, .cards .card > * { margin-left: 0; margin-right: 0; }
.step { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: var(--on-accent, #03201f); background: var(--accent); }
.cards .card::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--accent); }
.cards .card p { color: var(--text); font-size: 16px; }

/* real screenshots, in phone frames */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.shots figure { margin: 0; }
.shot { border-radius: 30px; padding: 7px; background: #0b1222; border: 1px solid var(--line2); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.shot img { border-radius: 24px; width: 100%; height: auto; }
.shots figcaption { margin-top: 14px; color: var(--soft); font-size: 15px; }
.shots figcaption b { display: block; color: var(--text); font-size: 17px; margin-bottom: 2px; }
/* illustrations: no phone frame, never presented as screenshots */
.art-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.art-grid figure { margin: 0; min-width: 0; }
.art-grid img { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--line2); box-shadow: 0 18px 44px rgba(0, 0, 0, .4); }
.art-grid figcaption { margin-top: 12px; color: var(--soft); font-size: 14px; line-height: 1.45; overflow-wrap: break-word; }
.art-grid figcaption b { display: block; color: var(--text); font-size: 15.5px; line-height: 1.3; margin-bottom: 3px; }
.art-note { margin: 14px 0 0; color: var(--soft); font-size: 13px; }

.perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.perk { display: flex; gap: 14px; align-items: flex-start; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 18px 20px; }
.perk img { flex: none; width: 56px; height: 56px; }
.perk > div { min-width: 0; }
.perk h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.2px; line-height: 1.3; }
.perk p { margin: 0; color: var(--soft); font-size: 15px; }
.perk strong { color: var(--text); }
/* a label over a block (perks "title"), e.g. to say that the boxes below are Pro benefits */
.blk-title { display: table; margin: 0 0 14px; padding: 4px 13px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 13px; font-weight: 700; line-height: 1.5; }
.blk[id] { scroll-margin-top: 86px; }

.text p { margin: 0 0 12px; max-width: 780px; color: var(--soft); font-size: 17px; }
.text p:last-child { margin-bottom: 0; }
.list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 12px; }
.list li { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 14px 18px; color: var(--soft); font-size: 15.5px; }
.note { margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 14px 18px; color: var(--soft); font-size: 15px; }
.note.blk + .note.blk { margin-top: 10px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.plan { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 24px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 44px var(--tint, rgba(61, 214, 208, .13)); }
.plan h3 { margin: 0 0 14px; font-size: 21px; letter-spacing: -.4px; }
.plan.featured h3 { color: var(--accent); }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { position: relative; margin: 0 0 9px; padding-inline-start: 28px; color: var(--soft); }
.plan li:last-child { margin-bottom: 0; }
.plan li::before { content: ""; position: absolute; inset-inline-start: 3px; top: .42em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.facts { display: flex; flex-wrap: wrap; margin: 26px 0 0; }
.facts div { flex: 1 1 140px; min-width: 0; overflow-wrap: break-word; }
.facts b { margin-bottom: 3px; color: var(--soft); }
.facts .wide { flex-basis: 100%; }
.facts .names { display: block; margin-top: 6px; color: var(--soft); font-size: 15px; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.timeline li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 16px 18px; }
.timeline .when { color: var(--accent); font-weight: 800; font-size: 15px; line-height: 1.4; overflow-wrap: break-word; }
.timeline h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.2px; line-height: 1.35; }
.timeline p { margin: 0; color: var(--soft); font-size: 15px; }
.timeline .src { margin-top: 6px; font-size: 13.5px; }
.timeline .src a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- document pages (privacy, terms, support, delete) ---------- */
.app-hero > div { min-width: 0; }
.app-hero img { flex: none; }
.app-hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: -1.2px; }
/* the app name over the heading links to the app's home page (the header hides that link on phones) */
.app-hero .eyebrow a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.app-hero .eyebrow a:hover { color: var(--text); }
.app-hero .eyebrow a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.doc-intro { padding-top: 18px; }
.doc-intro .lead { max-width: 780px; margin-bottom: 10px; }
.doc-date { margin: 0; color: var(--soft); font-size: 14px; }
.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
.toc { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 14px; }
.toc b { display: block; margin-bottom: 10px; color: var(--text); }
.toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--line2); }
.toc a { display: block; padding-block: 5px; padding-inline-start: 14px; color: var(--soft); line-height: 1.35; }
.toc a:hover { color: var(--text); }
.ap-prose { min-width: 0; }
.ap-prose section { padding: 0; scroll-margin-top: 86px; }
.ap-prose h2 { margin-bottom: 10px; line-height: 1.25; }
.ap-prose section:first-child h2 { margin-top: 0; }
.ap-prose a { text-decoration: underline; text-underline-offset: 2px; }
.ap-prose .blk + .blk { margin-top: 12px; }
.ap-prose .text p { font-size: 16px; }
.ap-prose .list { display: block; list-style: disc; padding-inline-start: 22px; }
.ap-prose .list li { border: 0; border-radius: 0; background: none; padding: 0; margin: 0 0 6px; font-size: 16px; }
.ap-prose .faq { margin-top: 14px; }

/* ---------- footer ---------- */
footer span { min-width: 0; overflow-wrap: anywhere; }
footer .foot-note { display: block; margin-top: 18px; font-size: 13px; }
footer .foot-note p { margin: 0 0 4px; max-width: 780px; }

/* ---------- visit-count notice (the shared .consent) on app pages ----------
   The shared stylesheet fixes the notice to the bottom of the window. Until the visitor chose, it then lay over the end
   of the page for good (the footer links and the disclaimer could not be reached) and over the open language menu on
   short phones. Here it is sticky: it still rides at the bottom of the window, but at the end of the page it comes to
   rest under the footer, in room of its own. It also sits below the header layer, so the language menu opens over it. */
.consent { position: sticky; left: auto; right: auto; bottom: 16px; z-index: 15; width: calc(100% - 32px); margin: 16px auto; }
/* While the notice shows, the open language list ends above it and scrolls inside. 230px (and 320px on phones, below)
   is the header, the gaps and the tallest notice measured over the 26 languages: 124px on wide screens, 219px at 320px.
   A browser without :has() keeps the normal height; the list then opens over the notice and stays fully usable. */
body:has(.consent:not([hidden])) .lang-list { max-height: min(70vh, 560px, max(180px, calc(100vh - 230px))); max-height: min(70vh, 560px, max(180px, calc(100dvh - 230px))); }

/* ---------- right-to-left pages ---------- */
[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .faq summary::after { float: left; }
/* Mirrored phone pair, desktop layout only: at 900px and below the shared rules centre the pair with their own
   left/right offsets, which these more specific rules would otherwise override (off-centre, cut off at 320px). */
@media (min-width: 901px) {
  [dir="rtl"] .phone.front { right: auto; left: 150px; transform: rotate(4deg); }
  [dir="rtl"] .phone.back { right: auto; left: 0; transform: rotate(-6deg); }
}

/* ---------- scripts where tight or wide letter spacing and tight lines harm reading ---------- */
:is(h1, h2, h3, .eyebrow, .facts b, .app-name):is(:lang(ar), :lang(fa), :lang(hi), :lang(bn), :lang(th), :lang(ja), :lang(ko), :lang(zh), :lang(ta), :lang(ml)) { letter-spacing: 0; }
:is(h1, h2):is(:lang(ar), :lang(fa), :lang(hi), :lang(bn), :lang(th), :lang(vi), :lang(ja), :lang(ko), :lang(zh), :lang(ta), :lang(ml)) { line-height: 1.3; }
:is(h1, h2, h3, .lead, p, li, figcaption):lang(ko) { word-break: keep-all; }
.top .brand, .lang-menu summary, .lang-list a { letter-spacing: normal; }

/* ---------- narrower screens ---------- */
@media (max-width: 1000px) {
  .art-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .art img { width: min(72%, 300px); }
  /* the centred phone pair: 180px phones as in the shared rules, smaller below about 420px so nothing leaves the window */
  .ap-hero .phones { --pw: min(180px, 43vw); height: calc(var(--pw) * 2.22); margin-inline-end: auto; }
  .ap-hero .phone { width: var(--pw); border-radius: calc(var(--pw) * .21); }
  .ap-hero .phone img { border-radius: calc(var(--pw) * .167); }
  .ap-hero .phone.front { left: calc(50% - var(--pw) * .944); }
  .ap-hero .phone.back { right: calc(50% - var(--pw) * .972); }
  .shots { grid-template-columns: repeat(4, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .shots figure { scroll-snap-align: start; }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; max-height: none; }
}
@media (max-width: 720px) {
  .lm-name { display: none; }
  .lm-code { display: inline; }
  .top .wrap { gap: 10px; }
  .nav > a { padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; }
  .lang-menu { margin-inline-start: 2px; }
}
@media (max-width: 640px) {
  section { padding: 44px 0; }
  .art-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .art-grid figure { scroll-snap-align: start; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .contact { padding: 24px; }
  .app-hero { gap: 16px; padding-top: 34px; }
  .app-hero img { width: 72px; height: 72px; border-radius: 17px; }
  .consent { bottom: 10px; width: calc(100% - 20px); margin: 10px auto; }
  body:has(.consent:not([hidden])) .lang-list { max-height: max(180px, calc(100vh - 320px)); max-height: max(180px, calc(100dvh - 320px)); }
}
@media (max-width: 380px) {
  .top .wrap { padding: 0 14px; gap: 8px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .nav { gap: 0; }
  .nav > a { padding: 8px 6px; font-size: 13px; }
  .lang-menu summary { padding: 8px 9px; gap: 5px; }
}
