/* CrossFTP site — modern, readable, mobile-first
   Opt-in stylesheet: link this instead of style.css + mobile.css
   when rolling pages onto the new design. */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  /* Material Design 3–inspired tonal palette (Blue seed + Teal secondary) */
  --ink: #1a1b1f;
  --ink-muted: #44474f;
  --ink-faint: #74777f;
  --paper: #f8f9ff;
  --paper-elevated: #ffffff;
  --line: #c4c6d0;
  --line-strong: #8e9099;
  --brand: #0b57d0;
  --brand-deep: #0842a0;
  --brand-soft: #d3e3fd;
  --brand-glow: rgba(11, 87, 208, 0.16);
  --brand-container: #d3e3fd;
  --brand-on-container: #041e49;
  --secondary: #006a6a;
  --secondary-soft: #6ff7f6;
  --secondary-container: #ccf8f7;
  --accent: #00639b;
  --code-bg: #1a1b1f;
  --code-ink: #e2e2e9;
  --code-muted: #c4c6d0;
  --shadow: 0 1px 2px rgba(26, 27, 31, 0.06), 0 8px 24px rgba(11, 87, 208, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --max: 1080px;
  --nav-width: 220px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", "Menlo", monospace;
  --space: clamp(1rem, 2.5vw, 1.75rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 55% at 8% -15%, rgba(11, 87, 208, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 5%, rgba(0, 106, 106, 0.1), transparent 50%),
    linear-gradient(180deg, #eef1ff 0%, var(--paper) 42%, #f0f2f8 100%);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--brand-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand);
}

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 2px;
}

/* —— Shell —— */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(248, 249, 255, 0.9);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--brand-deep);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
}

.brand__mark {
  line-height: 1.1;
}

.brand__mark span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--paper-elevated);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.1rem;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brand-deep);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--brand);
}

.site-nav__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
}

.site-nav__extra {
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
}

.site-nav__extra a {
  color: var(--ink-faint);
  font-size: 0.875rem;
}

.site-main {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem var(--space) 3rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  padding: 1.25rem var(--space);
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--ink-muted);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* —— Page intro —— */
.page-hero {
  margin-bottom: 2rem;
  padding: 1.5rem 0 0.25rem;
}

.page-hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.page-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.page-hero__lead {
  margin: 0;
  max-width: 42rem;
  font-size: 1.1rem;
  color: var(--ink-muted);
}

.page-hero__meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--brand-container);
  color: var(--brand-on-container);
  border: 1px solid rgba(11, 87, 208, 0.22);
}

/* —— Sections —— */
.section {
  margin: 2.25rem 0;
}

.section > h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section > .section__intro {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  max-width: 40rem;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  border: 0;
  margin: 2.5rem 0;
}

/* —— Download grid (interactive cards) —— */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.download-card:hover {
  border-color: rgba(11, 87, 208, 0.4);
  box-shadow: 0 1px 2px rgba(26, 27, 31, 0.06), 0 12px 28px var(--brand-glow);
}

.download-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.download-card__icons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.download-card__icons img {
  width: auto;
  height: 36px;
  object-fit: contain;
}

.download-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.download-card__body {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.download-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 87, 208, 0.28), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.btn--primary:hover {
  background: var(--brand-deep);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--brand-deep);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.file-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.upgrade-note {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(135deg, var(--brand-soft), var(--secondary-container));
  border: 1px solid rgba(11, 87, 208, 0.2);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.upgrade-note a {
  font-weight: 600;
}

/* —— Guide / troubleshooting —— */
.guide-block {
  margin: 0 0 1.75rem;
  padding: 1.25rem 1.35rem;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.guide-block > h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.guide-block > h3:target,
.guide-block:has(:target) {
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.guide-block p {
  margin: 0.65rem 0;
  color: var(--ink-muted);
}

.guide-block p:first-of-type {
  margin-top: 0;
}

.guide-block ul {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  color: var(--ink-muted);
}

.guide-block li {
  margin: 0.4rem 0;
}

.guide-step {
  margin: 1rem 0 0;
}

.guide-step__label {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.guide-subgroup {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--line);
}

.guide-subgroup h4 {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
}

/* —— Code —— */
code,
kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  font-weight: 500;
}

:not(pre) > code {
  padding: 0.12em 0.4em;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-on-container);
  border: 1px solid rgba(11, 87, 208, 0.18);
  white-space: nowrap;
}

pre,
.code-block {
  margin: 0.5rem 0 0.85rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius-sm);
  border: 1px solid #2a3648;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.55;
  -webkit-overflow-scrolling: touch;
}

pre code {
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

.code-block--inline-flow {
  white-space: pre-wrap;
  word-break: break-word;
}

/* —— Migrated page prose (legacy body content) —— */
.content-prose {
  max-width: none;
}

.content-prose > :first-child {
  margin-top: 0;
}

.content-prose__kicker {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.content-prose__kicker img {
  vertical-align: middle;
  margin-right: 0.35rem;
}

.content-prose h2,
.content-prose h3,
.content-prose h4,
.content-prose h5 {
  margin: 1.75rem 0 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
  background: none;
  border: none;
  padding: 0;
}

.content-prose h2 {
  font-size: 1.35rem;
}

.content-prose h3 {
  font-size: 1.15rem;
}

.content-prose h4,
.content-prose h5 {
  font-size: 1.02rem;
}

.content-prose p,
.content-prose li {
  color: var(--ink-muted);
}

.content-prose p {
  margin: 0.75rem 0;
}

.content-prose ul,
.content-prose ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}

.content-prose li {
  margin: 0.4rem 0;
}

.content-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.content-prose table {
  width: 100%;
  max-width: 100%;
  height: auto !important;
  border-collapse: collapse;
  margin: 1rem 0 1.25rem;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.content-prose td,
.content-prose th {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  color: var(--ink-muted);
  height: auto !important;
  width: auto !important;
}

.content-prose tr:last-child td {
  border-bottom: none;
}

.content-prose table[border],
.content-prose table[border="1"] {
  border: 1px solid var(--line);
}

.content-prose img {
  border-radius: 6px;
}

.content-prose form {
  margin: 1.25rem 0;
  padding: 1.15rem 1.25rem;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Purchase: center the 30-day evaluation form */
#eva_form {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

#eva_form table {
  width: 100%;
  margin: 0;
}

.content-prose input[type="text"],
.content-prose input[type="email"],
.content-prose input[type="password"],
.content-prose input:not([type]),
.content-prose select,
.content-prose textarea {
  width: 100%;
  max-width: 28rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: #fff;
  box-sizing: border-box;
}

.content-prose textarea {
  min-height: 8rem;
  resize: vertical;
}

.content-prose input[type="submit"],
.content-prose input[type="button"],
.content-prose button {
  appearance: none;
  margin-top: 0.35rem;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.content-prose input[type="submit"]:hover,
.content-prose input[type="button"]:hover,
.content-prose button:hover {
  background: var(--brand-deep);
}

.content-prose .separator {
  clear: both;
}

.content-prose iframe,
.content-prose stripe-buy-button {
  max-width: 100%;
}

/* Product cards (home) */
.product-grid {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-card__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.product-card__title img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.product-card__body {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.15rem;
}

.product-card__os {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.product-card__os img {
  height: 32px;
  width: auto;
}

.review-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.review-list li {
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-style: italic;
}

.review-list li a {
  font-style: normal;
  font-weight: 600;
}

@media (max-width: 800px) {
  .content-prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— Doc list —— */
.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.doc-list li {
  margin: 0;
}

.doc-list a {
  display: grid;
  grid-template-columns: minmax(7rem, auto) 1fr;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--paper-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.doc-list a:hover {
  border-color: rgba(11, 87, 208, 0.35);
  background: #fafcfd;
}

.doc-list__title {
  font-weight: 600;
  color: var(--brand-deep);
}

.doc-list__desc {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* —— Search —— */
.search-form {
  display: flex;
  gap: 0.4rem;
  margin-top: 1.5rem;
  max-width: 22rem;
}

.search-form input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--paper-elevated);
  color: var(--ink);
}

.search-form input[type="submit"] {
  padding: 0.55rem 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.search-form input[type="submit"]:hover {
  background: var(--brand-deep);
}

/* —— Mobile —— */
@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: var(--space);
    right: var(--space);
    top: calc(100% + 0.35rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: var(--paper-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-header {
    position: sticky;
  }

  .site-header__inner {
    position: relative;
    flex-wrap: wrap;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__group,
  .site-nav__extra {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border: 0;
  }

  .site-nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: var(--brand-soft);
    box-shadow: none;
  }

  .site-nav__extra {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--line);
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .doc-list a {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .page-hero {
    padding-top: 0.75rem;
  }

  .guide-block {
    padding: 1.05rem 1rem;
  }

  pre,
  .code-block {
    font-size: 0.8125rem;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .download-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .file-tag {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .download-card,
  .btn {
    transition: none;
  }
}
