/*
 * Alcony Legal Center
 *
 * Section 1 is copied from the Help Center (knowledgebase/index.html, inline
 * <style>) so both sites share tokens, type, and layout. If you change a token
 * there, change it here too. Section 2 adds what long-form legal text needs.
 */

/* ---------- 1. Shared with the Help Center ---------- */

:root {
  --ink: #3d3225;
  --muted: #5c4d3d;
  --soft: #6b5a48;
  --line: #d4c5a9;
  --input: #ddd4bc;
  --bg: #fafaf7;
  --paper: #ffffff;
  --panel: #ffffff;
  --cream: #fffcd6;
  --cream-dark: #f5f0e0;
  --accent: #7e886d;
  --accent-ink: #5d6650;
  --accent-light: #939d85;
  --warm: #fdb783;
  --warm-dark: #e5a06e;
  --rail: #3d3225;
  --shadow: 0 18px 45px rgba(84, 68, 53, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 28% 10%, rgba(253, 183, 131, 0.18), transparent 24%),
    radial-gradient(circle at 86% 6%, rgba(126, 136, 109, 0.14), transparent 24%),
    linear-gradient(180deg, #fffdf4 0%, var(--bg) 44%, #f5f0e0 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
  color: var(--accent-ink);
}

.brand:hover {
  text-decoration: none;
}

.mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mark img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.nav-label {
  margin: 24px 0 8px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
}

.nav-link:hover {
  background: rgba(126, 136, 109, 0.14);
  text-decoration: none;
}

main {
  min-width: 0;
  padding: 42px clamp(24px, 5vw, 72px) 72px;
}

.hero {
  padding: 26px 0 0;
  margin-bottom: 36px;
  min-width: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1 {
  max-width: 800px;
  margin: 10px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 0.96;
  letter-spacing: 0;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 700;
  overflow-wrap: break-word;
}

.lede {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
  overflow-wrap: break-word;
}

section {
  margin-top: 42px;
}

h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: 0;
}

h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 12px;
  border-radius: 2px;
  background: var(--accent);
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: 0;
}

p {
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.callout {
  padding: 18px;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: rgba(126, 136, 109, 0.12);
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
}

li {
  margin: 7px 0;
}

.tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(126, 136, 109, 0.15);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}

.footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 2. Legal Center additions ---------- */

.nav-link.is-current {
  background: rgba(126, 136, 109, 0.18);
  color: var(--accent-ink);
  font-weight: 650;
}

.toc .nav-link {
  padding: 5px 10px;
  color: var(--muted);
  font-size: 13px;
}

/* Draft banner: same treatment as the Help Center's .banner-free */
.banner-draft {
  margin-bottom: 20px;
  padding: 12px 18px;
  border: 1px solid var(--warm-dark);
  border-radius: 8px;
  background: rgba(253, 183, 131, 0.22);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

/* Hub: document cards */
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.doc-card h3 {
  margin: 0;
  color: var(--accent-ink);
}

.doc-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.doc-card .doc-date {
  margin-top: 8px;
  color: var(--soft);
  font-size: 12.5px;
  font-weight: 600;
}

/* Tables (same look as the Help Center pricing table) */
table.table {
  width: 100%;
  margin: 10px 0 18px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

table.table th,
table.table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

table.table thead th {
  background: rgba(126, 136, 109, 0.14);
  color: var(--accent-ink);
  font-weight: 750;
}

table.table tbody tr:last-child td {
  border-bottom: 0;
}

table.table tbody tr:nth-child(even) {
  background: rgba(126, 136, 109, 0.05);
}

.table-wrap {
  overflow-x: auto;
}

/* Document page header metadata */
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 22px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.doc-meta div {
  display: flex;
  flex-direction: column;
}

.doc-meta dt {
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.doc-meta dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.doc-actions {
  display: flex;
  flex-direction: row !important;
  gap: 8px;
  margin-left: auto;
  align-self: center;
}

.btn-print {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.btn-print:hover {
  border-color: var(--accent);
}

/* Long-form legal body */
.doc {
  max-width: 780px;
  font-size: 15.5px;
  line-height: 1.65;
}

.doc h2 {
  margin-top: 44px;
  font-size: 24px;
}

.doc > p,
.doc li {
  color: var(--muted);
}

.doc strong {
  color: var(--ink);
}

.doc ul,
.doc ol {
  margin: 0 0 14px;
}

.doc mark.pending {
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(253, 183, 131, 0.45);
  color: var(--ink);
}

.doc-history {
  max-width: 780px;
}

@media (max-width: 920px) {
  main {
    padding: 34px 22px 64px;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }

  h1 {
    max-width: 14ch;
    font-size: 36px;
    line-height: 1;
  }

  .lede {
    width: 100%;
    font-size: 17px;
  }

  .doc-actions {
    margin-left: 0;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .shell {
    display: block;
  }

  .sidebar,
  .doc-actions,
  .banner-draft,
  .footer {
    display: none;
  }

  main {
    padding: 0;
  }

  h1 {
    font-size: 30px;
  }

  .doc {
    max-width: none;
    font-size: 11pt;
  }

  .doc h2 {
    break-after: avoid;
  }

  .doc h2::before {
    display: none;
  }

  .doc a {
    color: inherit;
  }
}
