/* Shared styles for Tend's content pages (pricing, help, changelog, comparisons, guides, legal).
   The landing page keeps its own inline styles; the tokens below match it. No inline styles or
   scripts are needed on pages that use this file, so a strict Content-Security-Policy works. */

@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #090C12; --surface: #0E121A; --surface-2: #141924;
  --text: #F2F3F5; --sub: #B9C5D9; --faint: #7D8AA3;
  --ice: #A7BCFF; --blue: #4162FF;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.14);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 "DM Sans", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img, svg { max-width: 100%; }

a { color: var(--ice); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -48px; z-index: 10; background: var(--surface-2); color: var(--text); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 500 19px "Space Grotesk", sans-serif; color: var(--text); text-decoration: none; }
.brand svg { flex: none; }
.site-nav { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; }
.site-nav a { color: var(--sub); text-decoration: none; font-size: 14px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a.pill { color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; }
.site-nav a.pill:hover { border-color: var(--ice); }

/* Page heads */
.page-head { padding: 40px 0 16px; }
.page-head.center { text-align: center; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--sub); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 6px var(--blue); }
h1 { font: 300 clamp(36px, 6vw, 60px)/1.05 "Space Grotesk", sans-serif; letter-spacing: -.025em; margin: 14px 0 16px; }
.lead { font-size: clamp(17px, 2.2vw, 19px); color: var(--sub); max-width: 46ch; margin: 0 0 8px; }
.page-head.center .lead { margin-left: auto; margin-right: auto; }
.meta { color: var(--faint); font-size: 14px; margin: 12px 0 0; }

h2 { font: 400 clamp(24px, 3.2vw, 30px)/1.2 "Space Grotesk", sans-serif; letter-spacing: -.01em; margin: 56px 0 12px; }
h3 { font: 500 19px/1.3 "Space Grotesk", sans-serif; margin: 32px 0 8px; }
p, li, dd { color: var(--sub); }
strong, b { color: var(--text); font-weight: 500; }
code, kbd { font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--text); overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
ul, ol { padding-left: 1.3em; }
li { margin: 6px 0; }
li::marker { color: var(--faint); }

/* Readable column for help articles, guides and legal pages */
.prose { max-width: 720px; }
.prose > :first-child { margin-top: 0; }
.prose > h2:first-child { margin-top: 24px; }
.prose h2 { scroll-margin-top: 24px; }
.prose ol.steps { counter-reset: step; list-style: none; padding: 0; }
.prose ol.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin: 18px 0; }
.prose ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ice); font: 500 14px/27px "Space Grotesk", sans-serif; text-align: center; }

.breadcrumbs { font-size: 14px; color: var(--faint); margin: 8px 0 0; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.breadcrumbs li { margin: 0; color: var(--faint); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--faint); }
.breadcrumbs a { color: var(--sub); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 64px; align-items: start; padding-bottom: 32px; }
.toc { position: sticky; top: 24px; font-size: 14px; border-left: 1px solid var(--line); padding-left: 18px; margin-top: 8px; }
.toc p { margin: 0 0 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 8px 0; }
.toc a { color: var(--sub); text-decoration: none; }
.toc a:hover { color: var(--text); }

/* Cards and callouts */
.card { background: linear-gradient(180deg, rgba(20,25,36,.88), rgba(14,18,26,.82)); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card ul { margin: 8px 0 0; }
.note { border: 1px solid var(--line-2); border-left: 3px solid var(--ice); background: rgba(167,188,255,.05); border-radius: 12px; padding: 16px 18px; margin: 24px 0; }
.note p { margin: 0; }
.note p + p { margin-top: 8px; }
.note.beta { border-left-color: var(--blue); background: rgba(65,98,255,.08); }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.link-card { display: block; text-decoration: none; color: inherit; transition: border-color .25s; }
.link-card:hover { border-color: rgba(167,188,255,.45); color: inherit; }
.link-card h3, .link-card h2 { margin: 0 0 6px; font: 500 18px/1.3 "Space Grotesk", sans-serif; color: var(--text); }
.link-card p { margin: 0; font-size: 15px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0 0; }
.page-head.center .actions { justify-content: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 15px; line-height: 1.2; text-decoration: none; color: var(--text); border: 1px solid var(--line-2); background: transparent; }
.button:hover { color: var(--text); border-color: var(--ice); }
.button.primary { background: var(--blue); border-color: rgba(255,255,255,.2); color: #fff; }
.button.primary:hover { background: #3556E8; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 40px 0 0; }
.plan { display: flex; flex-direction: column; gap: 6px; }
.plan.featured { border-color: rgba(65,98,255,.6); background: linear-gradient(180deg, rgba(65,98,255,.14), rgba(14,18,26,.86)); }
.plan h2 { margin: 0; font: 500 18px "Space Grotesk", sans-serif; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan .price { font: 300 40px/1.1 "Space Grotesk", sans-serif; letter-spacing: -.02em; color: var(--text); margin: 10px 0 0; }
.plan .price span { font: 400 15px "DM Sans", sans-serif; color: var(--sub); letter-spacing: 0; }
.plan .founding { font-size: 14px; color: var(--sub); margin: 0; }
.plan .founding b { color: var(--ice); font-weight: 500; }
.plan p.what { font-size: 15px; margin: 10px 0 0; }
.plan .actions { margin-top: auto; padding-top: 18px; }
.plan .actions .button { width: 100%; }
.tag { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ice); border: 1px solid rgba(167,188,255,.4); border-radius: 999px; padding: 2px 8px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line-2); border-radius: 14px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { text-align: left; padding: 14px 16px 0; color: var(--faint); font-size: 13px; caption-side: bottom; padding-bottom: 14px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
thead th { font: 500 13px "DM Sans", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); background: rgba(255,255,255,.02); }
tbody th { font-weight: 500; color: var(--text); }
tbody td { color: var(--sub); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.ck { color: var(--ice); }
td.no { color: var(--faint); }

/* On narrow screens, tables become a stack of labeled rows (labels come from data-label). */
@media (max-width: 600px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: auto; }
  table.stack tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.stack tbody tr:last-child { border-bottom: 0; }
  table.stack tbody th { padding: 0 0 6px; border: 0; }
  /* The label floats into the cell's left padding; flow-root makes the cell tall enough for a label that
     wraps to more lines than its value, so labels never spill into the next row. */
  table.stack td { display: flow-root; padding: 3px 0 3px 7.25rem; border: 0; }
  table.stack td::before { content: attr(data-label); float: left; width: 6.75rem; margin-left: -7.25rem; padding-top: 2px; color: var(--faint); font-size: 13px; line-height: 1.45; }
  table.stack caption { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.stack tr.table-group { padding: 10px 16px; background: rgba(167,188,255,.04); }
  table.stack tr.table-group th { padding: 0; background: none; }
}
.table-group th { font: 500 12px "DM Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ice); background: rgba(167,188,255,.04); }

/* FAQ */
.faq { max-width: 760px; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; color: var(--text); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--faint); flex: none; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; max-width: 64ch; }

/* Changelog */
.release { border-top: 1px solid var(--line); padding: 32px 0 8px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
.release header h2 { margin: 0; font: 400 28px "Space Grotesk", sans-serif; }
.release header p { margin: 4px 0 0; color: var(--faint); font-size: 14px; }
.release h3 { margin: 0 0 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ice); font-family: "DM Sans", sans-serif; }
.release ul { margin: 0 0 24px; }

/* Sources */
.sources { font-size: 14px; }
.sources li { color: var(--faint); }

/* CTA block */
.cta-block { margin: 64px 0 0; text-align: left; }
.cta-block h2 { margin-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 48px 0 56px; color: var(--faint); font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-cols p { margin: 10px 0 0; color: var(--faint); max-width: 30ch; }
.footer-cols h2 { font: 500 12px "DM Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--sub); margin: 0 0 12px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 8px 0; }
.footer-cols a { color: var(--sub); text-decoration: none; }
.footer-cols a:hover { color: var(--text); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 40px; }

@media (max-width: 980px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .grid.two, .grid.three, .plans { grid-template-columns: minmax(0, 1fr); }
  .release { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .site-header { padding: 18px 0; }
  .site-nav { gap: 6px 16px; }
  .site-nav a.hide-sm { display: none; }
  h2 { margin-top: 44px; }
  th, td { padding: 10px 12px; }
  .card { padding: 20px; }
}
@media (max-width: 400px) {
  .site-nav a.pill { padding: 6px 12px; }
  table { font-size: 14px; }
}
