/* Aptly marketing site: the document pages (help, changelog, privacy, terms, DPA, cookies, security).
   Shared tokens, navigation, footer and buttons are in site.css; the page head is in pages.css.
   The content of these pages is kept as written, so this file styles their existing class names. */

/* ---------- Page head ---------- */

/* These pages mark the accent in their heading with <em>. */
.page-head h1 em { font-style: italic; color: var(--leaf); }
.doc-head { padding: 56px 0 64px; }
.doc-meta { margin-top: 14px; font-size: 0.95rem; color: var(--on-forest-soft); }

/* ---------- Legal pages: one reading column ---------- */

.doc { max-width: 46rem; margin: 0 auto; padding: 64px var(--gutter) 96px; }

.doc h2 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.2; color: var(--ink); margin-bottom: 14px; }
.doc h3 { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 26px 0 8px; }
.doc p { font-size: 1.02rem; line-height: 1.75; color: var(--body); margin-bottom: 16px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc ul { list-style: disc; }
.doc ol { list-style: decimal; }
.doc li { font-size: 1.02rem; line-height: 1.7; color: var(--body); margin-bottom: 8px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .divider { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.doc .highlight-box, .content .highlight-box {
  background: var(--leaf-tint);
  border-left: 3px solid var(--green-mid);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 0 0 36px;
}
.doc .highlight-box p, .content .highlight-box p { margin-bottom: 0; font-size: 0.97rem; line-height: 1.65; color: #23400f; }
.doc .highlight-box strong, .content .highlight-box strong { color: #23400f; font-weight: 600; }

.doc table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.93rem; }
.doc th { text-align: left; padding: 10px 14px; background: var(--forest); color: var(--on-forest); font-weight: 600; }
.doc td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--body); line-height: 1.6; vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }

.doc code, .article-body code {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface);
  color: var(--green);
  padding: 2px 6px;
  border-radius: 4px;
}

.doc .parties-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px; margin-bottom: 32px; }
.doc .party-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.doc .party-name { font-size: 1rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.doc .party-detail { font-size: 0.88rem; line-height: 1.6; color: var(--muted); }

/* ---------- Pages with a contents column (terms, help) ---------- */

.page-layout, .body-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px var(--gutter) 96px;
}

.sidebar { position: sticky; top: 84px; }
.sidebar-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; padding: 0 10px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--body);
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
}
.sidebar-nav li a:hover { background: var(--leaf-tint); color: var(--green); }
.sidebar-nav li.active a { background: var(--leaf-tint); color: var(--green); font-weight: 600; }
.sidebar-nav .nav-icon { flex: none; width: 18px; text-align: center; font-size: 0.9rem; }
.sidebar-divider { height: 1px; background: var(--line); margin: 12px 10px; }
.sidebar-note { padding: 0 10px; font-size: 0.86rem; line-height: 1.6; color: var(--muted); }

/* Terms */
.content { min-width: 0; max-width: 46rem; }
.legal-section { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.legal-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.section-number { font-size: 0.82rem; font-weight: 600; color: var(--green-mid); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.legal-section .section-title { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.2; color: var(--ink); margin-bottom: 18px; }
.section-title em { font-style: italic; color: var(--green-mid); }
.content p { font-size: 1rem; line-height: 1.75; color: var(--body); margin-bottom: 14px; }
.content p:last-child { margin-bottom: 0; }
.content h4 { font-size: 0.95rem; font-weight: 600; color: var(--ink); margin: 22px 0 8px; }
.content ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.content ul li { font-size: 1rem; line-height: 1.7; color: var(--body); margin-bottom: 6px; }
.content .warn-box { background: var(--amber-tint); border-left: 3px solid #d49a1c; border-radius: 6px; padding: 16px 20px; margin: 16px 0; }
.content .warn-box p { font-size: 0.95rem; color: var(--amber-ink); margin-bottom: 0; }

/* ---------- Changelog ---------- */

.changelog-main { max-width: 46rem; margin: 0 auto; padding: 64px var(--gutter) 96px; }
.entry { padding: 28px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry-date { font-size: 0.86rem; font-weight: 600; color: var(--green-mid); font-variant-numeric: tabular-nums; }
.entry-title { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.2; color: var(--ink); margin: 6px 0 10px; }
.entry-body { font-size: 1.02rem; line-height: 1.7; color: var(--body); }

/* ---------- Help: search in the page head ---------- */

.search-wrap { position: relative; max-width: 560px; margin: 28px auto 0; }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 1.15rem; color: rgba(248, 247, 242, 0.5); pointer-events: none; }
.search-input {
  width: 100%;
  padding: 15px 48px 15px 50px;
  font: 400 1rem/1.3 var(--sans);
  color: #ffffff;
  background: rgba(248, 247, 242, 0.1);
  border: 1px solid rgba(248, 247, 242, 0.22);
  border-radius: 12px;
  transition: border-color 0.2s, background-color 0.2s;
}
.search-input::placeholder { color: rgba(248, 247, 242, 0.5); }
.search-input:focus { outline: 3px solid rgba(151, 196, 89, 0.45); outline-offset: 0; border-color: var(--leaf); background: rgba(248, 247, 242, 0.14); }
.search-clear { display: none; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1.3rem; line-height: 1; color: rgba(248, 247, 242, 0.6); }
.search-clear:hover { color: #ffffff; }
.search-hints { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.search-hint { font-size: 0.82rem; color: var(--on-forest-soft); background: rgba(248, 247, 242, 0.08); border: 1px solid rgba(248, 247, 242, 0.14); border-radius: 999px; padding: 4px 11px; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.search-hint:hover { background: rgba(248, 247, 242, 0.16); color: #ffffff; }

/* ---------- Help: topics and articles ---------- */

.main-content { min-width: 0; }
.section { margin-bottom: 48px; }
.section:last-of-type { margin-bottom: 0; }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-header .section-title { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.1; color: var(--ink); }

.article-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.article { border-bottom: 1px solid var(--surface); transition: background-color 0.12s; scroll-margin-top: 90px; }
.article:last-child { border-bottom: 0; }
.article:hover { background: #fdfcf9; }
.article-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; user-select: none; }
.article-thumb { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-size: 1rem; transition: background-color 0.15s, border-color 0.15s; }
.article:hover .article-thumb, .article.open .article-thumb { background: var(--leaf-tint); border-color: #c8e6b0; }
.article-header-text { flex: 1; min-width: 0; }
.article-title { font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--ink); margin-bottom: 2px; }
.article-meta { font-size: 0.84rem; color: var(--muted); }
.article-toggle { flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 1.05rem; line-height: 1; color: var(--muted); transition: transform 0.22s ease, background-color 0.15s, color 0.15s, border-color 0.15s; }
.article.open .article-toggle { transform: rotate(45deg); background: var(--leaf-tint); border-color: #c8e6b0; color: var(--green); }

.article-body { display: none; padding: 0 20px 22px 70px; border-top: 1px solid var(--surface); }
.article.open .article-body { display: block; }
.article-body p { font-size: 0.97rem; line-height: 1.7; color: var(--body); margin-top: 14px; }
.article-body h4 { font-size: 0.95rem; font-weight: 600; color: var(--ink); margin: 20px 0 6px; }
.article-body ul, .article-body ol { padding-left: 22px; margin-top: 8px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { font-size: 0.97rem; line-height: 1.65; color: var(--body); margin-bottom: 5px; }
.article-body strong { color: var(--ink); font-weight: 600; }

.article-body .tip, .article-body .warn { display: flex; align-items: flex-start; gap: 10px; border-radius: 10px; padding: 12px 16px; margin-top: 14px; }
.article-body .tip { background: var(--leaf-tint); border: 1px solid #c8e6b0; }
.article-body .warn { background: var(--amber-tint); border: 1px solid #f0c890; }
.article-body .tip-icon { flex: none; font-size: 0.9rem; margin-top: 2px; }
.article-body .tip p { margin-top: 0; font-size: 0.93rem; color: #23400f; }
.article-body .warn p { margin-top: 0; font-size: 0.93rem; color: var(--amber-ink); }

.article-body .steps { counter-reset: step; list-style: none; padding-left: 0; margin-top: 12px; }
.article-body .steps li { counter-increment: step; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; line-height: 1.6; }
.article-body .steps li::before { content: counter(step); flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--forest); color: var(--on-forest); font-size: 0.75rem; font-weight: 600; }

.badge-sample { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; margin: 0 2px; vertical-align: middle; }
.bs-green { background: var(--leaf-tint); color: var(--green); }
.bs-amber { background: var(--amber-tint); color: var(--amber-ink); }
.bs-red { background: var(--red-tint); color: var(--red); }
.bs-blue { background: var(--slate); color: var(--slate-ink); }
.bs-dark { background: var(--forest); color: var(--leaf); }

/* Search states */
.article.hidden, .section.hidden { display: none; }
mark { background: #fef08a; color: var(--ink); border-radius: 2px; padding: 0 1px; }
.no-results { display: none; text-align: center; padding: 64px 20px; }
.no-results p { font-size: 1.05rem; color: var(--body); margin-bottom: 8px; }
.no-results span { font-size: 0.93rem; color: var(--muted); }

.contact-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 48px; padding: 28px 32px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.contact-bar h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--ink); margin-bottom: 4px; }
.contact-bar p { font-size: 0.95rem; color: var(--muted); }
.contact-bar a { flex: none; display: inline-block; padding: 12px 22px; background: var(--forest); color: var(--on-forest); border-radius: 10px; font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: background-color 0.15s; }
.contact-bar a:hover { background: var(--green); color: var(--on-forest); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .page-layout, .body-layout { grid-template-columns: 1fr; gap: 0; padding-top: 40px; padding-bottom: 72px; }
  .sidebar { display: none; }
  .article-body { padding: 0 16px 18px; }
}

@media (max-width: 600px) {
  .doc-head { padding: 40px 0 48px; }
  .doc, .changelog-main { padding-top: 44px; padding-bottom: 72px; }
  .doc .parties-box { grid-template-columns: 1fr; }
  /* Wide tables scroll inside themselves, so the page never scrolls sideways. */
  .doc table { display: block; overflow-x: auto; font-size: 0.88rem; }
  .doc th, .doc td { padding: 8px 10px; }
  .contact-bar { padding: 22px 20px; }
}
