/* Slate Portal: components. Built only from tokens.css. Put class="sl" on <body>. */

*, *::before, *::after { box-sizing: border-box; }

.sl {
  margin: 0;
  min-height: 100vh;
  background: var(--sl-night);
  background-image: var(--sl-page);
  background-repeat: no-repeat;
  color: var(--sl-text);
  font-family: var(--sl-font-body);
  font-size: var(--sl-text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
:where(.sl) a { color: var(--sl-link); text-decoration: none; }
:where(.sl) a:hover { text-decoration: underline; }
.sl img, .sl svg { display: block; max-width: 100%; }
.sl ::selection { background: var(--sl-gel); color: var(--sl-snow); }

/* ---------- Layout ---------- */
.sl-container { width: 100%; max-width: var(--sl-container); margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }
.sl-narrow { max-width: var(--sl-narrow); margin: 0 auto; }
.sl-section { padding-top: var(--sl-space-8); padding-bottom: var(--sl-space-8); }
.sl-section--tight { padding-top: var(--sl-space-7); padding-bottom: var(--sl-space-7); }
.sl-center { text-align: center; }
.sl-stack > * + * { margin-top: var(--sl-space-4); }
.sl-portal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sl-space-4); }
.sl-portal--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .sl-portal { grid-template-columns: minmax(0, 1fr); } .sl-portal--2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Type ---------- */
.sl-hero-title, .sl-h1, .sl-h2, .sl-h3 {
  font-family: var(--sl-font-head);
  color: var(--sl-snow);
  text-transform: lowercase;
  letter-spacing: -0.01em;
  margin: 0;
}
.sl-hero-title { font-size: var(--sl-text-hero); font-weight: 400; line-height: 1.02; }
.sl-h1 { font-size: var(--sl-text-h1); font-weight: 400; line-height: 1.08; }
.sl-h2 { font-size: var(--sl-text-h2); font-weight: 400; line-height: 1.15; }
.sl-h3 { font-size: var(--sl-text-h3); font-weight: 500; line-height: 1.2; }
.sl-ruled { padding-bottom: var(--sl-space-2); border-bottom: 1px solid var(--sl-line-strong); margin-bottom: var(--sl-space-4); }
.sl-lead { font-size: var(--sl-text-lead); color: var(--sl-text); max-width: 36em; margin: 0; }
.sl-kicker { font-family: var(--sl-font-head); font-size: var(--sl-text-small); color: var(--sl-dim); letter-spacing: 0.02em; margin: 0; }
.sl-kicker b { color: var(--sl-moon); font-weight: 500; }
.sl-dim { color: var(--sl-dim); }
.sl-moon { color: var(--sl-moon); }
.sl-mono { font-family: var(--sl-font-mono); }

/* ---------- Buttons ---------- */
.sl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sl-space-2);
  min-height: 44px;
  padding: 0 var(--sl-space-5);
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: var(--sl-radius-pill);
  font-family: var(--sl-font-head);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}
.sl .sl-btn { text-decoration: none; }
.sl-btn::before {
  content: "";
  position: absolute;
  left: 6px; right: 6px; top: 2px;
  height: 46%;
  border-radius: var(--sl-radius-pill);
  background: var(--sl-gloss);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}
.sl-btn--gel { background: var(--sl-gel-fill); color: #fff; box-shadow: var(--sl-shadow-gel); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); }
.sl-btn--gel:hover { filter: brightness(1.08); }
.sl-btn--gel:active { background: var(--sl-gel-deep); }
.sl-btn--moon { background: var(--sl-moon-fill); color: var(--sl-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 0 rgba(0, 0, 0, 0.35); }
.sl-btn--ghost { background: var(--sl-panel); color: var(--sl-snow); box-shadow: var(--sl-shadow-panel); border-color: var(--sl-line-strong); }
.sl-btn--ghost::before { opacity: 0.18; }
.sl-btn--sm { min-height: 34px; padding: 0 var(--sl-space-4); font-size: 13px; }
.sl-btn--block { width: 100%; }
.sl-btn:focus-visible { outline: none; box-shadow: var(--sl-focus); }

/* ---------- Nav ---------- */
.sl-topbar { background: rgba(0, 0, 0, 0.25); border-bottom: 1px solid var(--sl-line); font-size: var(--sl-text-micro); color: var(--sl-dim); }
.sl-topbar .sl-container { display: flex; justify-content: flex-end; gap: var(--sl-space-4); padding-top: 5px; padding-bottom: 5px; }
.sl-nav { padding: var(--sl-space-5) 0; }
.sl-nav .sl-container { display: flex; align-items: center; justify-content: space-between; gap: var(--sl-space-5); flex-wrap: wrap; }
.sl-brand { display: flex; align-items: center; gap: var(--sl-space-3); color: var(--sl-snow); }
.sl .sl-brand:hover { text-decoration: none; }
.sl-brand-mark { width: 52px; height: 52px; border-radius: 12px; background: var(--sl-sky); box-shadow: var(--sl-shadow-panel), inset 0 0 0 1px var(--sl-line-strong); display: grid; place-items: center; flex: none; }
.sl-brand-name { font-family: var(--sl-font-head); font-size: 30px; line-height: 1; text-transform: lowercase; }
.sl-brand-sub { display: block; font-family: var(--sl-font-head); font-size: var(--sl-text-small); color: var(--sl-dim); margin-top: 3px; }
.sl-nav-links { display: flex; gap: var(--sl-space-2); flex-wrap: wrap; }
.sl-nav-links a { color: var(--sl-text); font-family: var(--sl-font-head); font-size: 15px; text-transform: lowercase; padding: 6px 12px; border-radius: var(--sl-radius-chip); }
.sl .sl-nav-links a:hover, .sl-nav-links a[aria-current] { background: rgba(255, 255, 255, 0.08); color: var(--sl-snow); text-decoration: none; }

/* ---------- Platform badges (the icon row) ---------- */
.sl-badges { display: flex; gap: var(--sl-space-2); flex-wrap: wrap; }
.sl-badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 78px; padding: var(--sl-space-2) var(--sl-space-1);
  border-radius: var(--sl-radius-chip);
  color: var(--sl-text); font-size: 11px; line-height: 1.2; text-align: center;
}
.sl .sl-badge:hover { background: rgba(255, 255, 255, 0.07); text-decoration: none; }
.sl-badge-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--sl-panel); box-shadow: var(--sl-shadow-panel); display: grid; place-items: center; }
.sl-badge b { color: var(--sl-snow); font-weight: 700; font-size: 12px; }

/* ---------- Hero split: text card beside drawn sky art ---------- */
.sl-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border-radius: var(--sl-radius-art); overflow: hidden; box-shadow: var(--sl-shadow-raised); border: 1px solid var(--sl-line); }
.sl-hero-text { background: linear-gradient(180deg, #E9ECF2, #B9BFCC); color: var(--sl-ink); padding: var(--sl-space-6); display: flex; flex-direction: column; gap: var(--sl-space-4); }
.sl-hero-text p { margin: 0; font-size: 17px; }
.sl-hero-art { position: relative; background: var(--sl-sky); min-height: 340px; }
.sl-hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sl-hero-caption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sl-space-4); padding: var(--sl-space-4); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55)); color: var(--sl-snow); font-size: var(--sl-text-small); }
.sl-thumbs { display: flex; gap: var(--sl-space-2); }
.sl-thumb { width: 48px; height: 38px; border-radius: 3px; background: var(--sl-sky); border: 2px solid rgba(255, 255, 255, 0.25); }
.sl-thumb[aria-current] { border-color: var(--sl-snow); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5); }
@media (max-width: 900px) { .sl-hero { grid-template-columns: minmax(0, 1fr); } .sl-hero-art { min-height: 260px; } }

/* ---------- Panels ---------- */
.sl-panel { background: var(--sl-panel); border: 1px solid var(--sl-line); border-radius: var(--sl-radius-panel); box-shadow: var(--sl-shadow-panel); padding: var(--sl-space-5); }
.sl-panel--well { background: var(--sl-well); box-shadow: var(--sl-shadow-well); }
.sl-panel-title { font-family: var(--sl-font-head); font-size: 24px; font-weight: 400; color: var(--sl-snow); text-transform: lowercase; margin: 0 0 var(--sl-space-3); padding-bottom: var(--sl-space-2); border-bottom: 1px solid var(--sl-line-strong); }

/* Plus-in-circle link list, the portal's index */
.sl-index { list-style: none; margin: 0; padding: 0; }
.sl-index li { display: flex; gap: var(--sl-space-2); align-items: baseline; padding: 3px 0; }
.sl-index li::before {
  content: "+";
  flex: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--sl-panel);
  box-shadow: inset 0 0 0 1px var(--sl-line-strong);
  color: var(--sl-moon);
  font: 700 12px/16px var(--sl-font-head);
  text-align: center;
  transform: translateY(2px);
}
.sl-index a { font-family: var(--sl-font-head); font-size: 17px; }

/* Plain dotted list for features */
.sl-dots { margin: 0; padding-left: 1.1em; }
.sl-dots li { padding: 2px 0; }
.sl-dots li::marker { color: var(--sl-moon); }

/* Dated news list */
.sl-news { list-style: none; margin: 0; padding: 0; }
.sl-news li { display: flex; justify-content: space-between; gap: var(--sl-space-3); padding: 7px 0; border-bottom: 1px dotted var(--sl-line-strong); }
.sl-news time { color: var(--sl-dim); font-family: var(--sl-font-mono); font-size: var(--sl-text-small); white-space: nowrap; }

/* ---------- Chips and stats ---------- */
.sl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--sl-radius-chip); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--sl-line); font-family: var(--sl-font-head); font-size: var(--sl-text-micro); color: var(--sl-text); white-space: nowrap; }
.sl-chip--moon { background: var(--sl-moon-fill); color: var(--sl-ink); border-color: rgba(0, 0, 0, 0.3); }
.sl-stat { font-family: var(--sl-font-head); font-size: clamp(32px, 3.6vw, 44px); color: var(--sl-snow); line-height: 1; }
.sl-stat small { display: block; font-family: var(--sl-font-body); font-size: var(--sl-text-small); color: var(--sl-dim); margin-top: 6px; }

/* ---------- Forms ---------- */
.sl-field { display: flex; flex-direction: column; gap: 6px; }
.sl-label { font-family: var(--sl-font-head); font-size: var(--sl-text-small); color: var(--sl-snow); }
.sl-hint { font-size: var(--sl-text-micro); color: var(--sl-dim); }
.sl-input, .sl-select {
  width: 100%;
  min-height: 42px;
  padding: 0 var(--sl-space-3);
  background: var(--sl-well);
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: var(--sl-radius-input);
  box-shadow: var(--sl-shadow-well);
  color: var(--sl-snow);
  font: inherit;
}
.sl-input::placeholder { color: var(--sl-dim); }
.sl-input:focus, .sl-select:focus { outline: none; border-color: var(--sl-gel); box-shadow: var(--sl-shadow-well), var(--sl-focus); }
.sl-check { display: flex; gap: var(--sl-space-2); align-items: flex-start; font-size: var(--sl-text-small); }
.sl-check input { accent-color: var(--sl-gel); margin-top: 3px; }
.sl-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sl-space-2); }
.sl-choice label { display: flex; flex-direction: column; gap: 2px; padding: var(--sl-space-3); border-radius: var(--sl-radius-input); background: var(--sl-panel); border: 1px solid var(--sl-line); box-shadow: var(--sl-shadow-panel); cursor: pointer; font-size: var(--sl-text-micro); color: var(--sl-dim); }
.sl-choice label b { font-family: var(--sl-font-head); font-weight: 500; font-size: 15px; color: var(--sl-snow); text-transform: lowercase; }
.sl-choice input { position: absolute; opacity: 0; pointer-events: none; }
.sl-choice label:has(input:checked) { border-color: var(--sl-gel); box-shadow: var(--sl-shadow-panel), var(--sl-focus); }
@media (max-width: 560px) { .sl-choice { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pricing ---------- */
.sl-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sl-space-4); align-items: stretch; }
@media (max-width: 900px) { .sl-plans { grid-template-columns: minmax(0, 1fr); } }
.sl-plan { display: flex; flex-direction: column; gap: var(--sl-space-4); }
.sl-plan--featured { position: relative; border-color: var(--sl-gel); box-shadow: var(--sl-shadow-raised), 0 0 0 1px var(--sl-gel); }
.sl-plan-price { font-family: var(--sl-font-head); font-size: 46px; color: var(--sl-snow); line-height: 1; }
.sl-plan-price small { font-size: 15px; color: var(--sl-dim); }
.sl-plan .sl-dots { flex: 1; }
.sl-table { width: 100%; border-collapse: collapse; font-size: var(--sl-text-small); }
.sl-table th, .sl-table td { padding: 10px 12px; text-align: left; border-bottom: 1px dotted var(--sl-line-strong); }
.sl-table th { font-family: var(--sl-font-head); font-weight: 500; color: var(--sl-snow); text-transform: lowercase; }
.sl-table td:not(:first-child), .sl-table th:not(:first-child) { text-align: center; }
.sl-table-wrap { overflow-x: auto; }
.sl-faq details { border-bottom: 1px dotted var(--sl-line-strong); padding: var(--sl-space-3) 0; }
.sl-faq summary { cursor: pointer; font-family: var(--sl-font-head); font-size: 17px; color: var(--sl-snow); list-style: none; display: flex; gap: var(--sl-space-2); }
.sl-faq summary::before { content: "+"; color: var(--sl-moon); font-weight: 700; }
.sl-faq details[open] summary::before { content: "\2212"; }
.sl-faq p { margin: var(--sl-space-2) 0 0 18px; }

/* ---------- Article ---------- */
.sl-article { font-size: 18px; line-height: 1.7; }
.sl-article h2 { font-family: var(--sl-font-head); font-weight: 400; font-size: var(--sl-text-h2); color: var(--sl-snow); text-transform: lowercase; margin: var(--sl-space-7) 0 var(--sl-space-3); padding-bottom: var(--sl-space-2); border-bottom: 1px solid var(--sl-line-strong); }
.sl-article p { margin: 0 0 var(--sl-space-4); }
.sl-article blockquote { margin: var(--sl-space-6) 0; padding: var(--sl-space-5); background: var(--sl-panel); border-left: 4px solid var(--sl-moon); border-radius: 0 var(--sl-radius-panel) var(--sl-radius-panel) 0; box-shadow: var(--sl-shadow-panel); font-family: var(--sl-font-head); font-size: 22px; color: var(--sl-snow); line-height: 1.4; }
.sl-article pre { background: var(--sl-well); box-shadow: var(--sl-shadow-well); border-radius: var(--sl-radius-input); padding: var(--sl-space-4); font-family: var(--sl-font-mono); font-size: 15px; color: var(--sl-snow); overflow-x: auto; white-space: pre; }
.sl-article figure { margin: var(--sl-space-6) 0; }
.sl-article figcaption { font-size: var(--sl-text-small); color: var(--sl-dim); margin-top: var(--sl-space-2); }
.sl-byline { display: flex; align-items: center; gap: var(--sl-space-3); font-size: var(--sl-text-small); color: var(--sl-dim); flex-wrap: wrap; }
.sl-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sl-moon-fill); color: var(--sl-ink); display: grid; place-items: center; font-family: var(--sl-font-head); font-weight: 700; }

/* ---------- Footer ---------- */
.sl-footer { background: rgba(0, 0, 0, 0.3); border-top: 1px solid var(--sl-line); padding: var(--sl-space-7) 0 var(--sl-space-6); font-size: var(--sl-text-small); color: var(--sl-dim); }
.sl-footer-grid { display: grid; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: var(--sl-space-5); }
@media (max-width: 900px) { .sl-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sl-footer h4 { font-family: var(--sl-font-head); font-weight: 500; color: var(--sl-snow); text-transform: lowercase; margin: 0 0 var(--sl-space-2); font-size: 15px; }
.sl-footer ul { list-style: none; margin: 0; padding: 0; }
.sl-footer li { padding: 2px 0; }
.sl-footer-base { margin-top: var(--sl-space-6); padding-top: var(--sl-space-4); border-top: 1px solid var(--sl-line); display: flex; justify-content: space-between; gap: var(--sl-space-4); flex-wrap: wrap; }

/* Light text card inside the hero */
.sl-hero-text .sl-hero-title, .sl-hero-text .sl-h1 { color: var(--sl-ink); }
.sl-hero-text .sl-kicker { color: var(--sl-panel-bottom); }
.sl-hero-text a:not(.sl-btn) { color: var(--sl-gel-deep); }
.sl-hero-caption a { color: var(--sl-snow); }
.sl-wordmark { font-family: var(--sl-font-head); font-size: 24px; color: var(--sl-snow); text-transform: lowercase; }
