/* www.fancy-viewer.com. Plain CSS, no framework (WEB-005). It keeps the look of the old Angular Material
   site: indigo toolbar, light-blue download buttons, Roboto. Phone layout below 761 px, by media query
   only (WEB-010). No style="" attributes anywhere, so the CSP needs no 'unsafe-inline' for styles. */

/* Roboto, self-hosted (no requests to Google Fonts): latin and cyrillic, 400/500/700.
   The browser downloads a file only when the page uses characters from its unicode-range. */
@font-face { font-family: Roboto; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/roboto-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/roboto-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/roboto-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/roboto-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/roboto-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/roboto-cyrillic-700-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }

:root {
  --primary: #3f51b5;            /* Material indigo 500 */
  --text: rgba(0, 0, 0, 0.87);
  --muted: rgba(0, 0, 0, 0.6);
  --divider: rgba(0, 0, 0, 0.12);
  /* black on lightskyblue is 12.2:1, black on #108bF9 (hover) is 6.1:1 (WCAG AA needs 4.5:1) */
  --button: lightskyblue;
  --button-hover: #108bf9;
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 14px/20px Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--primary); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.icon { width: 24px; height: 24px; flex: none; fill: currentColor; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10; padding: 8px 16px; background: #fff; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---- toolbar ---------------------------------------------------------------------------------- */

.toolbar {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; }
.site-nav { display: flex; align-items: center; }
.site-nav a {
  margin: 0 4px;
  padding: 8px 12px;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-decoration: none;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.1); }
.site-nav a:focus-visible, .brand:focus-visible { outline-color: #fff; }
.site-nav .lang-link { font-size: 20px; letter-spacing: 0.05em; }
.menu-button { display: none; }

.lang-hint { margin: 0; padding: 8px 48px 8px 16px; position: relative; background: #e8eaf6; text-align: center; font-size: 16px; }
.lang-hint-close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; font-size: 22px; line-height: 1; padding: 4px 8px; cursor: pointer; color: var(--text);
}

/* ---- common blocks ---------------------------------------------------------------------------- */

.divider { margin: 0; border: 0; border-top: 1px solid var(--divider); }
.hero-divider { margin-bottom: 24px; }

.section { max-width: 1200px; margin: 0 auto; padding: 0 16px 16px; }
.section-title { margin: 25px 0 16px; text-align: center; font-size: 24px; line-height: 32px; font-weight: 400; }
.text { margin: 0 10px 16px; font-size: 16px; line-height: 28px; }

.hero { padding: 0 16px 16px; text-align: center; }
.hero-title { margin: 25px auto 16px; max-width: 1000px; font-size: 24px; line-height: 32px; font-weight: 500; }
.hero-tagline { max-width: 720px; margin: 0 auto 20px; font-size: 16px; line-height: 1.5; }
.hero-details { margin: 10px 0 0; }
.hero-details a, .hero-details a:visited { color: var(--primary); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 4px;
  background: var(--button);
  color: #000;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { background: var(--button-hover); }
.hero-button { min-height: 48px; padding: 0 28px; font-size: 16px; white-space: normal; }

/* Screenshots. Desktop: the light one at the left, the dark one over it at the right (as before).
   The box keeps the height the old invisible spacer image gave it. */
.shots { position: relative; width: 90%; margin: 0 auto 16px; aspect-ratio: 2.274; }
.shot-dark { position: absolute; z-index: 2; top: 10%; left: 33%; width: 65%; }
.shot-light { position: absolute; z-index: 1; top: 10px; left: 0; width: 55%; }

/* ---- downloads -------------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
.downloads-table { width: 100%; border-collapse: collapse; }
.downloads-table th, .downloads-table td {
  padding: 0 8px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
}
.downloads-table th:first-child, .downloads-table td:first-child { padding-left: 24px; }
.downloads-table th:last-child, .downloads-table td:last-child { padding-right: 24px; }
.downloads-table th { height: 56px; color: var(--muted); font-size: 12px; font-weight: 500; }
.downloads-table td { height: 52px; }
/* The hash has a single break point (<wbr>) in the middle: one line when there is room, else two
   halves of 32 characters, never a stray last character on its own line. */
td.col-sha { font-family: monospace; white-space: normal; word-break: normal; }
/* File names on one line where the table has room for it; narrower, they wrap at the hyphens. */
@media (min-width: 1100px) { td.col-file { white-space: nowrap; } }
.downloads-status { margin-top: 16px; }

/* ---- features list ---------------------------------------------------------------------------- */

.features { list-style: none; margin: 0; padding: 0; }
.features h3 {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}
.features h3 .icon, .topic h2 .icon { color: var(--primary); }
.features p { margin: 0 0 16px 72px; font-size: 16px; line-height: 28px; white-space: pre-line; }

/* ---- topic pages ------------------------------------------------------------------------------ */

.topic { max-width: 900px; }
.topic h2 { display: flex; align-items: center; gap: 16px; margin: 24px 0 8px; font-size: 20px; line-height: 28px; font-weight: 500; }
.topic p { margin: 0 0 16px 40px; font-size: 16px; line-height: 28px; }
.topic .topic-more { margin: 32px 0 16px; text-align: center; }

/* ---- about, footer ---------------------------------------------------------------------------- */

/* "Support Ukraine" banner. Contrast: white on #0057B7 is 7.3:1, #1a1a1a on #FFD700 is 13:1. */
.ua-banner {
  display: block;
  max-width: 380px;
  margin: 8px 10px 32px;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ua-banner:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); }
.ua-banner:focus-visible { outline-offset: 3px; }
.ua-banner-top, .ua-banner-bottom { display: block; padding: 14px 16px; }
.ua-banner-top { background: #0057b7; color: #fff; font-size: 22px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.ua-banner-bottom { background: #ffd700; color: #1a1a1a; font-size: 16px; font-weight: 500; }

.site-footer { padding: 24px 16px; border-top: 1px solid var(--divider); color: var(--muted); text-align: center; line-height: 28px; }

/* ---- phones ----------------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .toolbar { height: 56px; }
  .brand { font-size: 20px; }

  /* With JavaScript the links fold into a menu; without it they stay visible under the toolbar. */
  .site-nav { position: absolute; top: 100%; right: 0; z-index: 20; flex-direction: column; align-items: stretch;
    min-width: 240px; padding: 8px 0; background: #fff; box-shadow: 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12); }
  .site-nav a { margin: 0; padding: 12px 16px; border-radius: 0; color: var(--text); font-size: 16px; letter-spacing: normal; }
  .site-nav a:hover { background: rgba(0, 0, 0, 0.04); }
  .site-nav a:focus-visible { outline-color: var(--primary); outline-offset: -2px; }
  .site-nav .lang-link { font-size: 16px; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: flex; }
  .js .menu-button {
    display: inline-flex; padding: 8px; border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer;
  }
  .js .menu-button:focus-visible { outline-color: #fff; }
  html:not(.js) .toolbar { height: auto; min-height: 56px; flex-wrap: wrap; }
  html:not(.js) .site-nav { position: static; flex-direction: row; flex-wrap: wrap; width: 100%; box-shadow: none; background: none; }
  html:not(.js) .site-nav a { color: #fff; padding: 8px; }

  .shots { width: 100%; aspect-ratio: auto; }
  .shot-dark, .shot-light { position: static; display: block; width: 100%; }

  .downloads-table .col-file, .downloads-table .col-sha { display: none; }
  .downloads-table th:first-child, .downloads-table td:first-child { padding-left: 8px; }
  .downloads-table th:last-child, .downloads-table td:last-child { padding-right: 8px; }

  .features h3 { gap: 16px; padding: 0 8px; }
  .features p { margin-left: 48px; }
  .topic p { margin-left: 0; }
}
