/* DWG OfficeZip — shared site styles (no build step, no external resources) */
:root {
  color-scheme: dark;
  --bg: #0a1424;
  --bg-deep: #07101d;
  --surface: #0f1d33;
  --surface-2: #14284a;
  --line: #22395c;
  --fg: #e9eff8;
  --muted: #a6b5ca;
  --accent: #f5b342;
  --accent-hover: #ffc663;
  --accent-ink: #1b1302;
  --accent-soft: rgba(245, 179, 66, .12);
  --t-free: #8c9bb0;
  --t-adfree: #5aa2ff;
  --t-premium: #f5b342;
  --t-super: #b48cff;
  --radius: 12px;
  --maxw: 920px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(1100px 520px at 50% -240px, #173a6b 0%, rgba(23, 58, 107, 0) 70%);
  background-repeat: no-repeat;
  font: 16px/1.65 var(--font);
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: .88em;
  overflow-wrap: anywhere;
}
strong { color: #fff; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 72px; }   /* anchors land below the sticky header */

/* moved up out of view rather than far left: a far-left offset makes right-to-left (Arabic) pages scroll sideways */
.skip {
  position: absolute; top: 0; inset-inline-start: 0; transform: translateY(-110%);
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-end-end-radius: 8px; z-index: 50; font-weight: 600;
}
.skip:focus { transform: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  /* solid, no backdrop-filter: blurring the page under a sticky header makes scrolling stutter on low-end phones */
  background: rgba(8, 17, 31, .97);
  border-bottom: 1px solid var(--line);
}
.bar {
  max-width: var(--maxw); margin: 0 auto;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
  color: var(--fg); text-decoration: none; font-weight: 700; letter-spacing: .1px;
}
.brand:hover { color: #fff; }
.brand img { width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; unicode-bidi: isolate; }
.bar-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.bar-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.bar-nav a:hover, .bar-nav a[aria-current="page"] { color: var(--accent); }
.lang-pick { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.lang-pick svg { width: 18px; height: 18px; flex: 0 0 auto; }
.lang-pick select {
  font: inherit; font-size: .88rem;
  color: var(--fg); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 8px; max-width: 9.5rem; cursor: pointer;
}
.lang-jump { display: flex; gap: 4px; font-size: .88rem; }
.lang-jump a {
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.lang-jump a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 520px) { .bar-nav .nav-support { display: none; } }
/* phones: keep the whole app name visible next to the language menu */
@media (max-width: 420px) {
  .bar { gap: 10px; }
  .lang-pick svg { display: none; }
  .lang-pick select { max-width: 7.5rem; }
}

/* ---------- layout ---------- */
/* width: 100% keeps the auto-margined flex item from growing to the width of a long unbreakable URL */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 28px 16px 64px; }
.doc { max-width: 820px; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.2px; }
h2 {
  font-size: 1.28rem; line-height: 1.3;
  margin: 44px 0 12px; padding-top: 20px;
  border-top: 1px solid var(--line);
}
h3 { font-size: 1.04rem; margin: 22px 0 6px; }
p, li { color: var(--fg); }
ul, ol { padding-inline-start: 22px; }
li { margin: 5px 0; }
.lead { color: var(--muted); font-size: 1.06rem; margin: 4px 0; }
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.small { font-size: .9rem; color: var(--muted); }
.note { margin-top: 14px; }
.box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px; margin: 16px 0;
}
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.lang-block { margin-top: 64px; padding-top: 8px; border-top: 2px solid var(--line); }
.lang-block > h1 { margin-top: 24px; }

/* ---------- landing ---------- */
.hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.hero > img {
  width: 96px; height: 96px; border-radius: 22px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06);
}
.hero > div { flex: 1 1 240px; min-width: 0; }
.hero h1 { font-size: 2.2rem; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 24px 0 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--accent);
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn.secondary { background: transparent; color: var(--fg); border-color: var(--line); font-weight: 600; }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.grid {
  display: grid; gap: 14px; margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card p { color: var(--muted); font-size: .93rem; margin: 0; }
.tiers {
  display: grid; gap: 14px; margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}
.tier {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; border-top: 3px solid var(--t-free);
}
.tier h3 { margin: 0 0 2px; font-size: 1.08rem; }
.tier .sub { color: var(--muted); font-size: .86rem; margin: 0 0 8px; }
.tier ul { padding-inline-start: 18px; margin: 8px 0 0; }
.tier li { font-size: .9rem; margin: 4px 0; }
.tier.adfree { border-top-color: var(--t-adfree); }
.tier.premium { border-top-color: var(--t-premium); }
.tier.super { border-top-color: var(--t-super); }
.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- store badges ---------- */
/* Official, unmodified badge artwork at the same height. Apple's rules: App Store badge first in the lineup, clear space
   of a quarter of the badge height around it (the gap and the caption margin), at least 40 px high on screen. */
.stores {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 14px 16px; margin: 26px 0 8px;
}
.store {
  flex: 0 0 auto;
  display: inline-flex; flex-direction: column; align-items: center;
  text-decoration: none; border-radius: 8px; line-height: 1.2;
}
.store img { display: block; height: 48px; width: auto; max-width: none; }
.store:focus-visible { outline-offset: 3px; }
/* A store whose app is not public yet (APP_STORE_URL / GOOGLE_PLAY_URL empty in site.js): the badge is not a link and
   carries a "Coming soon" caption under it; the badge itself stays unmodified (never faded). */
.store:not([href]) { cursor: default; }
.store-soon {
  margin-top: 12px; padding: 2px 10px;
  font-size: .76rem; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(245, 179, 66, .45); border-radius: 999px;
}
@media (max-width: 400px) {
  .stores { gap: 12px 11px; }
  .store img { height: 42px; }
  .store-soon { margin-top: 11px; }
}
.plat h3 { color: var(--accent); }
.tm { margin: 44px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

/* ---------- support: platform chooser and blocks ---------- */
.plat-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 20px 0 0; }
.plat-nav span { color: var(--muted); font-size: .92rem; }
.plat-nav a {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  color: var(--fg); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-weight: 600; font-size: .92rem;
}
.plat-nav a:hover { border-color: var(--accent); color: var(--accent); }
.soon-note { margin: 0 0 6px; color: var(--accent); font-size: .92rem; }

/* ---------- tables (stack on narrow screens) ---------- */
table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .94rem; }
th, td { border: 1px solid var(--line); padding: 9px 11px; text-align: start; vertical-align: top; }
th { background: var(--surface-2); color: #fff; }
td { background: rgba(15, 29, 51, .6); }
@media (max-width: 640px) {
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  table.stack td { border: 0; border-top: 1px solid var(--line); }
  table.stack td:first-child { border-top: 0; background: var(--surface-2); font-weight: 600; }
  table.stack td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: .76rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--muted);
  }
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  margin: 10px 0; padding: 0 16px;
}
/* own chevron inside the card (the default marker hangs outside the card's left edge) */
.faq summary {
  cursor: pointer; font-weight: 650; padding: 13px 0; padding-inline-start: 24px;
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: calc(13px + .825em);
  width: 7px; height: 7px; margin-top: -5px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg); transition: transform .15s ease;
}
[dir="rtl"] .faq summary::before { transform: rotate(135deg); }
.faq details[open] > summary::before { transform: rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.faq details > :last-child { margin-bottom: 14px; }
.path { font-weight: 600; color: #fff; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); }
.site-footer .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 16px 30px;
  color: var(--muted); font-size: .9rem;
}
.foot-links { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: var(--fg); text-decoration: none; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--accent); }
.site-footer p { color: var(--muted); margin: 4px 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-top: 48px; }
.notfound img { width: 88px; height: 88px; border-radius: 20px; }
