/* DevDeck public site styles. Shared by the landing page and the legal pages so
   the app-hosted web content matches the Flutter app — the same near-black
   ground and the same blue, because these pages open inside the app's own
   webview and a second visual identity there reads as a different product. */

:root {
  color-scheme: dark;
  --bg: #08080a;
  --bg-soft: #1b1b21;
  --card: #121216;
  --card-border: #2a2a32;
  --text: #ececef;
  --muted: #9a9aa4;
  --accent: #4d8dff;
  --on-accent: #001a44;
  --shadow: none;
  --ghost-bg: rgba(77, 141, 255, 0.12);
  --icon-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  --tooltip-bg: #1b1b21;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f7f8fa;
  --bg-soft: #eff1f5;
  --card: #ffffff;
  --card-border: #dfe3ea;
  --text: #15161c;
  --muted: #61646e;
  --accent: #2563eb;
  --on-accent: #ffffff;
  --shadow: none;
  --ghost-bg: rgba(37, 99, 235, 0.08);
  --icon-shadow: 0 18px 46px rgba(21, 22, 28, 0.12);
  --tooltip-bg: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

body::before {
  display: none;
}

a {
  color: var(--accent);
}

.page {
  position: relative;
  padding: 56px 20px 72px;
}

.shell {
  max-width: 960px;
  margin: 0 auto;
}

.legal-page .shell {
  max-width: 920px;
}

.hero {
  margin-bottom: 24px;
}

.home-page .hero {
  margin-bottom: 0;
  padding-bottom: 36px;
}

.app-icon {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  box-shadow: var(--icon-shadow);
}

.home-page .app-icon {
  margin-inline-start: -2px;
}

.eyebrow {
  margin: 0 0 10px;
  display: inline-block;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.product-name {
  margin: 18px 0 10px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.home-page h1 {
  max-width: 760px;
  font-size: clamp(2.15rem, 4.6vw, 4rem);
  line-height: 1.05;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.16rem;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

p {
  margin: 0 0 12px;
  color: var(--text);
}

ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

li {
  margin: 0 0 8px;
}

strong {
  font-weight: 700;
}

/* Feature flags arrive in the URL from the app. Hide unavailable legal clauses
   before first paint so disabled Premium or ads never flash on screen. */
html[data-premium='off'] [data-requires-premium],
html[data-ads='off'] [data-requires-ads] {
  display: none;
}

html:not([data-premium='off']) [data-no-premium],
html:not([data-ads='off']) [data-no-ads] {
  display: none;
}

.subtitle {
  max-width: 68ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.lede {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
}

.updated {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

section {
  margin-top: 28px;
}

.home-page section {
  margin-top: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

.btn-ghost {
  background: var(--ghost-bg);
  border-color: var(--accent);
  color: var(--accent);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.accent-bar {
  width: 58px;
  height: 4px;
  margin-top: 36px;
  border-radius: 999px;
  background: var(--accent);
}

.platforms {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--card);
}

.home-page .platforms {
  margin-top: 16px;
}

.download-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.platforms-label {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.download-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.download-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.download-group {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--bg-soft);
}

.download-group-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platform-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.store-btn {
  justify-content: flex-start;
  min-width: 0;
  min-height: 54px;
  padding: 7px 13px;
  border-radius: 14px;
  line-height: 1.1;
  white-space: normal;
}

.store-btn svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.store-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.store-copy small {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.store-copy strong {
  font-size: 0.82rem;
}

.desktop-actions .btn {
  flex: 1 1 92px;
}

.btn-coming-soon {
  position: relative;
  cursor: not-allowed;
  border-color: var(--card-border);
  background: transparent;
  color: var(--muted);
  opacity: 0.72;
}

.btn-coming-soon::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(100% + 8px);
  padding: 5px 9px;
  transform: translate(-50%, 4px);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--tooltip-bg);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.btn-coming-soon:hover::after,
.btn-coming-soon:focus-visible::after {
  transform: translate(-50%, 0);
  opacity: 1;
}

.linux-download {
  position: relative;
  flex: 1 1 92px;
}

.linux-download summary {
  width: 100%;
  cursor: pointer;
  list-style: none;
}

.linux-download summary::-webkit-details-marker {
  display: none;
}

.linux-download[open] summary {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

.linux-chevron {
  transition: transform 140ms ease;
}

.linux-download[open] .linux-chevron {
  transform: rotate(180deg);
}

.linux-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  padding: 7px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--tooltip-bg);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.linux-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 11px;
  border-radius: 9px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.linux-menu a:hover,
.linux-menu a:focus-visible {
  background: var(--ghost-bg);
  color: var(--accent);
}

.linux-menu small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.feature-grid .card {
  border-radius: 22px;
  padding: 22px;
}

.feature-grid .card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-note {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 0.95rem;
}

/* Knowledge center, feature guides, and shared public navigation. */
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1100px, calc(100% - 40px));
  min-height: 70px;
  margin: 0 auto;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.nav-brand img {
  width: 34px;
  height: 34px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
}

.nav-link {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-cta {
  min-height: 40px;
  padding-inline: 16px;
}

.shell-narrow {
  max-width: 860px;
}

.shell-article {
  max-width: 820px;
}

.article-hero {
  margin-bottom: 32px;
}

.article-hero .lede {
  max-width: 70ch;
}

.faq-category {
  margin-top: 42px;
}

.faq-category h2 {
  margin-bottom: 14px;
  font-size: 1.28rem;
}

.faq-list {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: var(--card);
}

.faq-item + .faq-item {
  border-top: 1px solid var(--card-border);
}

.faq-item summary {
  position: relative;
  padding: 20px 54px 20px 22px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 750;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 22px;
  content: '+';
  color: var(--accent);
  font-size: 1.35rem;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-answer {
  padding: 0 22px 18px;
}

.faq-answer p {
  margin: 0 0 10px;
  color: var(--muted);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 270px;
  border-radius: 22px;
  padding: 24px;
}

.blog-card h2 {
  margin: 12px 0 10px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.blog-card p:not(.blog-meta) {
  color: var(--muted);
}

.blog-card > a {
  margin-top: 18px;
  font-weight: 800;
  text-decoration: none;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.blog-meta span:first-child {
  color: var(--accent);
}

.article-body h2 {
  margin: 32px 0 10px;
  font-size: 1.28rem;
}

.article-body p,
.article-body li {
  color: var(--muted);
}

.legal-callout {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--bg-soft);
  color: var(--muted);
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
}

.page-footer {
  padding: 0 20px 48px;
}

.page-footer .site-footer {
  margin-top: 0;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 24px 14px 56px;
  }

  .home-page .page {
    padding-top: 28px;
  }

  .home-page .hero {
    padding-bottom: 28px;
  }

  .app-icon {
    width: 76px;
    height: 76px;
    border-radius: 22px;
  }

  .card {
    border-radius: 22px;
    padding: 20px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .platforms {
    padding: 16px;
  }

  .download-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .download-groups {
    grid-template-columns: 1fr;
  }

  .store-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-btn {
    padding-inline: 10px;
  }

  .linux-menu {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .nav-container {
    width: calc(100% - 28px);
    min-height: 62px;
  }

  .nav-links {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    white-space: nowrap;
  }

  /* The row scrolls, so the last item is meant to be half-visible. A hard cut
     reads as a broken layout; a fade reads as "there is more this way". */
  .nav-links {
    min-width: 0;
    -webkit-mask-image: linear-gradient(to right, #000 84%, transparent);
    mask-image: linear-gradient(to right, #000 84%, transparent);
  }

  .nav-brand {
    flex: 0 0 auto;
  }

  .nav-cta {
    display: none;
  }

  .site-header .btn,
  .article-actions .btn {
    width: auto;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card {
    min-height: 0;
  }
}
