/* Public and signed-in documentation share one editorial reading system. */
body[data-docs-page] .main-area > .topbar { display: none; }

.docs-content {
  width: min(100%, 1280px);
  padding-top: clamp(20px, 3vw, 38px);
  padding-bottom: 96px;
}

.docs-public-header .product-nav { margin-left: auto; }
.docs-public-header .product-nav a[aria-current='page'] { color: var(--text); border-color: var(--text); }
.docs-public-header [data-theme-toggle] { flex: none; }

.docs-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.72fr);
  align-items: stretch;
  gap: clamp(28px, 5vw, 72px);
  overflow: hidden;
  padding: clamp(30px, 4.5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.docs-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 112px;
  height: 3px;
  background: var(--accent);
}

.docs-eyebrow,
.docs-quickstart-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.docs-hero-text { align-self: center; }
.docs-hero-text h1 {
  max-width: 660px;
  margin: 20px 0 16px;
  color: var(--text);
  font-size: clamp(2.45rem, 5vw, 4.25rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 1.06;
}
.docs-hero-text > p:not(.docs-eyebrow) {
  max-width: 615px;
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.35vw, 1.13rem);
  line-height: 1.65;
}

.docs-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.docs-hero-actions .btn { min-height: 44px; display: inline-flex; align-items: center; gap: 14px; padding: 0 18px; font-size: 0.9rem; }
.docs-hero-actions .btn span { font-size: 1.1rem; }

.docs-quickstart {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 27px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-inset);
}
.docs-quickstart-label { color: var(--muted); }
.docs-quickstart ol { list-style: none; margin: 12px 0 0; padding: 0; }
.docs-quickstart li { display: flex; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.docs-quickstart li:last-child { padding-bottom: 0; border-bottom: 0; }
.docs-quickstart li > span { flex: 0 0 25px; padding-top: 2px; color: var(--accent); font: 700 0.75rem/1.5 var(--font-mono); }
.docs-quickstart li strong { display: block; color: var(--text); font-size: 0.92rem; }
.docs-quickstart li small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }

.docs-subnav {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  margin: 22px 0 36px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  scrollbar-width: thin;
}
.docs-subnav-label { flex: 0 0 auto; padding: 0 13px 0 9px; color: var(--muted); font-size: 0.69rem; font-weight: 750; letter-spacing: 0.09em; }
.docs-subnav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}
.docs-subnav a:hover { background: var(--surface-inset); color: var(--text); }
.docs-subnav a.is-active { background: var(--accent-soft); color: var(--accent); }
.docs-subnav .docs-nav-setup { gap: 6px; margin-left: auto; color: var(--accent); }
.docs-subnav a:focus-visible,
.docs-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.docs-section { margin: 0 0 48px; }
.docs-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 17px; }
.docs-section-head h2 { margin: 0; color: var(--text); font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 650; letter-spacing: -0.035em; }
.docs-section-head p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.docs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.docs-section--start .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.docs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 205px;
  gap: 8px;
  padding: 23px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.docs-card::after { content: '↗'; position: absolute; top: 23px; right: 23px; color: var(--muted); font-size: 1.1rem; line-height: 1; transition: color 160ms ease, transform 160ms ease; }
.docs-card:hover { border-color: var(--accent-muted); box-shadow: var(--shadow-sm); transform: translateY(-2px); color: var(--text); }
.docs-card:hover::after { color: var(--accent); transform: translate(2px, -2px); }
.docs-card-icon { display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; margin-bottom: 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-inset); color: var(--accent); }
.docs-card-icon svg { width: 19px; height: 19px; }
.docs-card strong { color: var(--text); font-size: 1.03rem; font-weight: 660; letter-spacing: -0.022em; }
.docs-card small { max-width: 340px; color: var(--text-secondary); font-size: 0.84rem; line-height: 1.55; }
.docs-card-tag { margin-top: auto; padding-top: 14px; color: var(--muted); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.docs-card-tag.is-security { color: var(--warn); }
.docs-card-tag.is-guide { color: var(--accent); }

/* Article pages keep the guide navigation above a comfortable reading column. */
.docs-layout { min-width: 0; }
.docs-layout .docs-subnav { margin-top: 0; }
.docs-article {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  line-height: 1.7;
}
.docs-article::before { content: 'SESSIONLY AI  /  DOCUMENTATION'; display: block; margin-bottom: 13px; color: var(--accent); font-size: 0.69rem; font-weight: 750; letter-spacing: 0.12em; }
.docs-article h1 { max-width: 840px; margin: 0 0 15px; color: var(--text); font-size: clamp(2.1rem, 4vw, 3.25rem); font-weight: 650; letter-spacing: -0.055em; line-height: 1.13; }
.docs-article h2 { margin: 34px 0 11px; color: var(--text); font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 650; letter-spacing: -0.03em; line-height: 1.3; }
.docs-article h3 { margin: 25px 0 8px; color: var(--text); font-size: 1.05rem; font-weight: 650; }
.docs-article p,
.docs-article li { max-width: 850px; color: var(--text-secondary); font-size: 0.96rem; line-height: 1.75; }
.docs-article p { margin: 0 0 16px; }
.docs-article ul,
.docs-article ol:not(.docs-steps) { margin: 0 0 22px; padding-left: 1.35rem; }
.docs-article li { margin-bottom: 8px; }
.docs-article a { color: var(--accent); text-underline-offset: 3px; }
.docs-article code { padding: 0.12em 0.36em; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-inset); color: var(--text); font: 0.83em/1.5 var(--font-mono); overflow-wrap: anywhere; }
.docs-article pre { max-width: 100%; margin: 17px 0 25px; padding: 19px 21px; overflow-x: auto; border: 1px solid #2d3c52; border-radius: 10px; background: #101a2b; color: #e5edf9; font: 0.83rem/1.65 var(--font-mono); tab-size: 2; }
.docs-article pre code { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: pre; overflow-wrap: normal; }
.docs-lead { max-width: 780px; margin-bottom: 24px !important; color: var(--text) !important; font-size: 1.08rem !important; line-height: 1.65 !important; }
.docs-badge { display: inline-block; margin: 1px 0 20px; padding: 6px 10px; border: 1px solid var(--warn-border); border-radius: 6px; background: var(--warn-soft); color: var(--warn); font-size: 0.78rem; font-weight: 650; }
.docs-callout { max-width: 850px; margin: 23px 0; padding: 17px 19px; border: 1px solid var(--accent-muted); border-left: 3px solid var(--accent); border-radius: 9px; background: var(--accent-soft); color: var(--text-secondary); font-size: 0.91rem; line-height: 1.65; }
.docs-callout strong { color: var(--text); }
.docs-callout.is-warning { border-color: var(--warn-border); border-left-color: var(--warn); background: var(--warn-soft); }
.docs-callout.is-warning strong { color: var(--warn); }
.docs-table-wrap { max-width: 100%; overflow-x: auto; margin: 20px 0 26px; border: 1px solid var(--line); border-radius: 9px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.docs-table th,
.docs-table td { padding: 12px 15px; border-bottom: 1px solid var(--line); color: var(--text-secondary); text-align: left; vertical-align: top; }
.docs-table th { background: var(--surface-inset); color: var(--muted); font-size: 0.7rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-yes { color: var(--success); font-weight: 650; }
.docs-partial { color: var(--warn); font-weight: 650; }
.docs-steps { max-width: 870px; counter-reset: doc-step; list-style: none; margin: 23px 0 28px; padding: 0; }
.docs-steps li { counter-increment: doc-step; position: relative; margin: 0 0 0 15px; padding: 0 0 24px 35px; border-left: 1px solid var(--line); }
.docs-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.docs-steps li::before { content: counter(doc-step, decimal-leading-zero); position: absolute; top: 0; left: -16px; display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; border: 1px solid var(--accent-muted); border-radius: 50%; background: var(--surface); color: var(--accent); font: 700 0.69rem/1 var(--font-mono); }
.docs-steps h2 { margin-top: 0; }

@media (max-width: 1000px) {
  .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-hero { grid-template-columns: minmax(0, 1fr) minmax(255px, 0.8fr); gap: 24px; }
  .docs-quickstart { padding: 20px; }
}

@media (max-width: 720px) {
  .docs-content { padding-top: 14px; padding-bottom: 52px; }
  .docs-hero { grid-template-columns: 1fr; padding: 28px 22px; gap: 25px; }
  .docs-hero-text h1 { margin-top: 13px; }
  .docs-quickstart { padding: 18px 20px; }
  .docs-subnav { margin: 16px 0 27px; }
  .docs-subnav-label { display: none; }
  .docs-subnav .docs-nav-setup { margin-left: 0; }
  .docs-section { margin-bottom: 34px; }
  .docs-section-head { display: block; }
  .docs-section-head p { margin-top: 3px; }
  .docs-grid,
  .docs-section--start .docs-grid { grid-template-columns: 1fr; }
  .docs-card { min-height: 174px; padding: 19px 21px; }
  .docs-article { padding: 27px 21px 36px; border-radius: 13px; }
  .docs-article p,
  .docs-article li { font-size: 0.93rem; }
  .docs-article pre { margin-left: -6px; margin-right: -6px; padding: 15px; font-size: 0.76rem; }
}

@media (prefers-reduced-motion: reduce) {
  .docs-card,
  .docs-card::after,
  .docs-subnav a { transition: none; }
  .docs-card:hover { transform: none; }
}
