/* Subpages: the reading layout (privacy) and the Agent product page. Builds on site.css. */

/* ── Reading layout ───────────────────────────────────────────── */
.doc { padding: clamp(40px, 6vw, 72px) 0 clamp(96px, 10vw, 140px); }
.doc__grid { display: grid; grid-template-columns: 232px minmax(0, 720px); gap: clamp(40px, 6vw, 88px); justify-content: center; align-items: start; }

.toc { position: sticky; top: 88px; max-height: calc(100vh - 112px); overflow: auto; }
.toc summary {
  list-style: none; cursor: default;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
  margin-bottom: 12px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px;
  font-size: 13.5px; line-height: 1.45; color: var(--text-3);
  border-left: 1px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--text-2); }
.toc a.is-active { color: var(--text); border-left-color: var(--brand-2); }

.doc__head { padding-bottom: 32px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc__head h1 { color: var(--text); font-size: clamp(2.1rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 650; text-wrap: balance; }
.doc__meta { margin-top: 14px; color: var(--text-3); font-size: 14px; }

.prose { min-width: 0; color: var(--text-2); font-size: 16px; line-height: 1.75; }
.prose section { padding-top: 48px; scroll-margin-top: 80px; }
.prose h2 { color: var(--text); font-size: 22px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; margin-bottom: 14px; }
.prose h3 { color: var(--text); font-size: 16px; font-weight: 600; margin: 28px 0 10px; }
.prose p + p { margin-top: 12px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--brand-2); text-decoration: underline; text-decoration-color: rgba(67, 167, 220, 0.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--brand-2); }
.prose ul { margin: 12px 0; display: grid; gap: 8px; }
.prose ul li { position: relative; padding-left: 20px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }

.policy-section.highlight {
  margin-top: 48px; padding: 28px 28px 30px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.policy-section.highlight h2 { margin-top: 0; }
.policy-note {
  margin-top: 16px !important; padding: 14px 16px;
  font-size: 14.5px; line-height: 1.65;
  background: rgba(67, 167, 220, 0.06); border: 1px solid rgba(67, 167, 220, 0.16); border-radius: var(--radius-sm);
}
.policy-table-wrapper { margin-top: 8px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.policy-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.policy-table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.policy-table td { vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.policy-table tr:last-child td { border-bottom: 0; }
.policy-table td:first-child { color: var(--text); font-weight: 550; white-space: nowrap; }
.policy-section.contact p { margin-top: 6px; }
.policy-footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); display: grid; gap: 4px; }

/* ── Agent page ───────────────────────────────────────────────── */
.page-hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 96px); }
.page-hero .hero__bg { background: radial-gradient(700px 420px at 50% 30%, var(--brand-glow), transparent 70%); }
.page-hero .hero__bg::after {
  -webkit-mask-image: radial-gradient(760px 460px at 50% 32%, #000 20%, transparent 75%);
  mask-image: radial-gradient(760px 460px at 50% 32%, #000 20%, transparent 75%);
}
.page-hero__inner { position: relative; display: grid; justify-items: center; text-align: center; }
.page-hero .lede { margin-left: auto; margin-right: auto; }
.page-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 36px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; gap: 10px; }
.btn--lg svg { width: 18px; height: 18px; }
.btn-outline {
  display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: 15px; transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.03); }
.meta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 28px; font-size: 13.5px; color: var(--text-3); }
.meta-row li { display: inline-flex; align-items: center; gap: 8px; }
.meta-row li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-2); opacity: 0.7; }

.page-hero__visual { position: relative; width: min(440px, 100%); margin: 64px auto 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step__num { font-family: var(--mono); font-size: 12px; color: var(--brand-2); letter-spacing: 0.02em; }
.step h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 14px; }
.step p { color: var(--text-2); font-size: 15px; margin-top: 10px; }
.step a { color: var(--brand-2); }
.step strong { color: var(--text); font-weight: 600; }

.flagship { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat {
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.feat h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-top: 18px; display: flex; align-items: center; gap: 8px; }
.feat p { color: var(--text-2); font-size: 15px; margin-top: 10px; }
.feat strong { color: var(--text); font-weight: 600; }
.feat a { color: var(--brand-2); }
.feat code, .step code { font-family: var(--mono); font-size: 0.85em; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--text); }
.ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(67, 167, 220, 0.12); color: var(--brand-2); }
.ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico--danger { background: rgba(239, 93, 93, 0.12); color: #ff8a8a; }
.ico--warn { background: rgba(242, 169, 59, 0.12); color: var(--warn); }
.badge { font-size: 11px; font-weight: 650; letter-spacing: 0.03em; padding: 2px 8px; border-radius: 6px; color: var(--ok); background: rgba(63, 197, 143, 0.12); }

.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin-top: 56px; border-top: 1px solid var(--line); }
.more .feat { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 28px 0; }
.more .feat h3 { margin-top: 14px; font-size: 16.5px; }
.more .feat p { font-size: 14.5px; }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spec { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 8px 24px 12px; }
.spec h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); padding: 18px 0 10px; }
.spec dl > div { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.spec dt { color: var(--text-2); }
.spec dd { color: var(--text); text-align: right; font-weight: 500; }
.spec dd.ok { color: var(--ok); }
.spec dd.ok::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.3l2.8 2.8L12.5 5' fill='none' stroke='%233fc58f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.specs__col { display: grid; gap: 16px; align-content: start; }

.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.road { padding: 26px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.road h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin-top: 14px; }
.road p { color: var(--text-2); font-size: 14.5px; margin-top: 8px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: var(--brand-2); background: rgba(67, 167, 220, 0.12); }
.pill--plan { color: var(--text-2); background: rgba(255, 255, 255, 0.06); }

.download { text-align: center; }
.download .body { margin-left: auto; margin-right: auto; }
.download .meta-row { margin-top: 20px; }
.pro-note {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  max-width: 620px; margin: 32px auto 0; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text-2); font-size: 14.5px;
}
.pro-note svg { flex: none; width: 18px; height: 18px; margin-top: 3px; fill: none; stroke: var(--brand-2); stroke-width: 2; stroke-linecap: round; }
.pro-note strong { color: var(--text); }
.pro-note a { color: var(--brand-2); font-weight: 600; white-space: nowrap; }

/* ── Changelog ────────────────────────────────────────────────── */
.changelog__wrap { max-width: 1000px; }
.changelog__head { border-bottom: 0; padding-bottom: 8px; }
.changelog__intro { color: var(--text-2); font-size: 17px; margin-top: 16px; max-width: 36em; }

.changelog-timeline { margin-top: 40px; }
.changelog-entry {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 56px;
  padding: 40px 0; border-top: 1px solid var(--line);
}
.changelog-entry > * { grid-column: 2; }
.changelog-entry-header {
  grid-column: 1; grid-row: 1 / span 12; align-self: start;
  position: sticky; top: 92px;
  display: grid; justify-items: start; gap: 6px;
}
.changelog-version { color: var(--text); font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
.changelog-date { color: var(--text-3); font-size: 14px; }
.changelog-badge {
  margin-top: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  padding: 3px 10px; border-radius: 999px; color: var(--brand-2); background: rgba(67, 167, 220, 0.12);
  white-space: nowrap;
}
.changelog-badge-patch { color: var(--text-2); background: rgba(255, 255, 255, 0.06); }

.changelog-group + .changelog-group { margin-top: 26px; }
.changelog-group-title {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
  margin-bottom: 10px;
}
.changelog-list { display: grid; gap: 8px; }
.changelog-list li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.changelog-list li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-2); opacity: 0.7; }

.changelog-entry.is-patch { padding: 26px 0; }
.changelog-entry.is-patch .changelog-version { font-size: 16px; color: var(--text-2); }
.changelog-patch-versions { color: var(--text); font-family: var(--mono); font-size: 13.5px; }
.changelog-patch-text { color: var(--text-2); font-size: 15px; margin-top: 4px; }

.changelog-footer-note {
  margin-top: 24px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-2); font-size: 14.5px; line-height: 1.7;
}
.changelog-footer-note a { color: var(--brand-2); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .doc__grid { grid-template-columns: minmax(0, 720px); }
  .toc { position: static; max-height: none; }
  .toc__box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
  .toc summary { cursor: pointer; margin: 0; display: flex; justify-content: space-between; align-items: center; }
  .toc summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(45deg) translateY(-2px); transition: transform 0.2s; }
  .toc__box[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .toc__box[open] summary { margin-bottom: 12px; }
  .steps, .flagship, .roadmap { grid-template-columns: 1fr 1fr; }
  .more { grid-template-columns: 1fr 1fr; }
  .specs { grid-template-columns: 1fr; }
  .changelog-entry { grid-template-columns: 1fr; padding: 32px 0; }
  .changelog-entry > * { grid-column: 1; }
  .changelog-entry-header {
    grid-row: auto; position: static; margin-bottom: 18px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  }
  .changelog-entry-header .changelog-badge { margin-top: 0; }
}
@media (max-width: 640px) {
  .steps, .flagship, .roadmap, .more { grid-template-columns: 1fr; }
  .policy-section.highlight { padding: 22px 18px; }
  .spec { padding: 6px 18px 10px; }
  .spec dl > div { flex-direction: column; gap: 2px; }
  .spec dd { text-align: left; }
}
