/* Arcopolis Support (support.arcologylabs.com). Shared by every page.
   Tokens follow the Arcology Labs apex (landing/index.html): cream light
   theme, charcoal dark theme, red accent, system sans type, no webfonts. */

:root {
  color-scheme: light dark;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI",
    Inter, Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #1b1b1b;
  --muted: #5f5a52;
  --line: #d9dee5;
  --line-strong: #c7ced8;
  --accent: #b0342c;
  --accent-soft: rgba(176, 52, 44, 0.1);
  --accent-line: rgba(176, 52, 44, 0.45);
  --on-accent: #ffffff;
  --warn-bg: #fff6e5;
  --warn-line: #e3b35c;
  --header-bg: rgba(246, 245, 241, 0.9);
  --shadow-sm: 0 1px 2px rgba(15, 20, 30, 0.07);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-pill: 999px;
  --max-w: 50rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181b21;
    --surface: #1c1f26;
    --surface-2: #20242c;
    --text: #ffffff;
    --muted: #aeb4bf;
    --line: #2a2f38;
    --line-strong: #343b4a;
    --accent: #ff4d4d;
    --accent-soft: rgba(255, 77, 77, 0.14);
    --accent-line: rgba(255, 77, 77, 0.5);
    --on-accent: #14161a;
    --warn-bg: #2a2418;
    --warn-line: #8a6a2c;
    --header-bg: rgba(24, 27, 33, 0.9);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  word-break: break-word;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.7rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 1.9rem;
  height: auto;
  flex: 0 0 auto;
}

.brand-mark .mark-tri,
.brand-mark .mark-dot {
  fill: #ff3b30;
}

@media (prefers-color-scheme: dark) {
  .brand-mark .mark-dot {
    fill: #ffffff;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 0.15rem;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

/* Layout */

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
}

.hero {
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem) 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 40rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.button:hover {
  filter: brightness(1.05);
}

section.section {
  padding: 2.25rem 0 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
}

section.section > p,
section.section > ul,
section.section > ol {
  max-width: 44rem;
}

ul,
ol {
  padding-left: 1.3rem;
}

li + li {
  margin-top: 0.35rem;
}

ol.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.4rem;
  margin-top: 0.8rem;
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

a.card:hover {
  border-color: var(--accent-line);
}

.card strong {
  display: block;
  margin-bottom: 0.2rem;
}

.card span {
  color: var(--muted);
  font-size: 0.95rem;
}

.note,
.warn {
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  max-width: 44rem;
}

.note {
  background: var(--surface);
  border: 1px solid var(--line);
}

.warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
}

.note p,
.warn p {
  margin: 0;
}

.note p + p,
.warn p + p {
  margin-top: 0.5rem;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 0.5rem 0 0;
}

.toc p {
  margin: 0 0 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.toc ul {
  margin: 0;
  padding-left: 1.1rem;
  columns: 2 14rem;
  column-gap: 1.5rem;
}

/* Tables become stacked rows on narrow screens. */

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.97rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 36rem) {
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    left: -9999px;
  }

  tr {
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 0;
  }

  td {
    border: 0;
    padding: 0.2rem 0;
  }

  td:first-child {
    font-weight: 600;
  }
}

/* FAQ */

.faq-search {
  margin: 1rem 0 0.75rem;
  max-width: 44rem;
}

.faq-search label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.faq-search input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.faq-list {
  max-width: 44rem;
}

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
}

details.faq-item summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 600;
  list-style-position: inside;
}

details.faq-item .faq-body {
  padding: 0 1rem 0.9rem;
}

details.faq-item .faq-body p {
  margin: 0;
}

details.faq-item .faq-body p + p {
  margin-top: 0.5rem;
}

.faq-empty {
  max-width: 44rem;
}

/* Contact */

.contact-email {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.footer-links a {
  color: var(--muted);
}

@media (max-width: 30rem) {
  .header-inner {
    padding-top: 0.55rem;
    padding-bottom: 0.45rem;
  }

  .site-nav {
    font-size: 0.88rem;
    margin-left: -0.45rem;
  }

  .site-nav a {
    padding: 0.35rem 0.45rem;
  }
}
