/* tidigar.com: one dark theme for every page, the home page, the
   plans, the guides, the specifications and the converters. */
:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-synthesis: none;
  --page: #0a0d14;
  --surface: #111622;
  --surface-raised: #161d2c;
  --surface-sunken: #0d121c;
  --line: #222b3d;
  --line-strong: #2f3a51;
  --ink: #e8edf5;
  --muted: #9aa7bc;
  --faint: #6c7a91;
  --blue: #6b8cff;
  --blue-dark: #8fa8ff;
  --violet: #a78bfa;
  --glow: radial-gradient(60% 60% at 70% 30%, #4f6bff33, transparent 70%);
  --shadow: 0 30px 80px #00000066, 0 8px 24px #00000040;
  --radius: 18px;
  color: var(--ink);
  background: var(--page);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* The hero's glow reaches past the page's sides. */
body > main {
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* Header and footer, shared by every page. */
.site-header,
footer {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 10;
  min-height: 72px;
  padding-block: 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
}

@media (min-width: 761px) {
  .site-header nav a {
    position: relative;
  }

  .site-header nav a + a::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    width: 1px;
    height: 14px;
    background: var(--line);
    transform: translateY(-50%);
  }
}

nav a:hover,
footer a:hover,
.text-link:hover {
  color: var(--ink);
}

.site-header > .button {
  justify-self: end;
}

footer {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 36px 32px;
  padding: 40px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.footer-identity .brand {
  color: var(--ink);
}

.footer-identity ul {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.footer-identity a:not(.brand) {
  display: block;
  width: fit-content;
}

.footer-sitemap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  text-align: left;
  font-size: 12px;
  font-weight: 400;
}

.footer-group h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0;
}

.footer-group ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-group h2 a {
  color: inherit;
}

.footer-group a {
  padding: 0;
  display: block;
  width: fit-content;
  overflow-wrap: anywhere;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-bottom span {
  margin-right: auto;
}

.footer-identity a:focus-visible,
.footer-sitemap a:focus-visible,
.footer-bottom a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

@media (max-width: 1050px) {
  footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .footer-sitemap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Buttons and links. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  box-shadow: 0 10px 30px #6b8cff40;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px #6b8cff59;
}

.button-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
  box-shadow: none;
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.text-link {
  color: var(--blue-dark);
  font-weight: 600;
}

.eyebrow {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Availability labels sit beside card titles, outside description text. */
.feature-badge {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.feature-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.card-heading .feature-badge {
  flex: none;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.extend-list > a > .card-heading {
  font-size: 18px;
  color: var(--ink);
}

/* The home page. */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: -120px -20vw 0;
  z-index: -1;
  background: var(--glow);
  pointer-events: none;
}

.home-hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.home-hero h1 span {
  background: linear-gradient(120deg, #fff 10%, var(--blue-dark) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-lede {
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.55;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
}

.home-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Three frames of one plan, one under the other, playing the demo. */
.hero-stack {
  display: grid;
  gap: 12px;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.hero-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  color-scheme: dark;
}

/* The hero's frames load one after another; each stays a black box until
   its plan has loaded. */
.hero-stack .hero-frame {
  background: #000;
}
.hero-frame iframe[data-tidigar-src] {
  visibility: hidden;
}

/* The home page loads the embed script for the hero's story, which would
   size every frame to its plan; these frames keep the heights they were
   drawn for. */
#hero-board {
  height: 210px !important;
}
#hero-plan {
  height: 390px !important;
}
#hero-flow {
  height: 150px !important;
}
.chat-frame iframe {
  height: 480px !important;
}

.home-section {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0;
}

.home-section > .plan-grid + p {
  margin-top: 24px;
}

.home-section > header {
  max-width: 640px;
  margin-bottom: 40px;
}

.home-section h2 {
  margin: 12px 0 14px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.home-section header p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

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

.plan-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  padding: 10px 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.plan-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.plan-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  margin-bottom: 8px;
  border-radius: 10px;
  object-fit: cover;
  object-position: left top;
}

.plan-card strong,
.plan-card small {
  padding-inline: 6px;
}

.plan-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.promise-grid article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
}

.doc-page .promise-grid h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.promise-grid h3 {
  margin: 14px 0 10px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.promise-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.promise-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: #6b8cff1f;
  color: var(--blue-dark);
}

.promise-icon svg {
  width: 22px;
  height: 22px;
}

.home-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.home-plans article {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
}

.home-plans article.is-best {
  border-color: var(--blue);
  background: var(--glow), var(--surface-raised);
}

.home-plans h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.home-plans p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.home-plans .home-plan-price strong {
  color: var(--ink);
  font-size: 28px;
  letter-spacing: -0.01em;
}

.home-plans .button {
  align-self: start;
  margin-top: auto;
}

.home-plans-more {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.home-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--glow), var(--surface);
}

.home-band h2 {
  margin: 10px 0 12px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.home-band p {
  max-width: 56ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.platforms span {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

/* Making a roadmap with an AI assistant: the steps beside a
   conversation that ends in the roadmap it made, which plays as it scrolls
   into view where browsers support scroll-driven animation. */
.agent-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.agent-lede {
  max-width: 46ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.agent-steps {
  display: grid;
  gap: 14px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.agent-steps li {
  position: relative;
  padding-left: 44px;
  color: var(--muted);
  line-height: 1.55;
  counter-increment: step;
}

.agent-steps li::before {
  content: counter(step);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #6b8cff1f;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
}

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

.agent-more {
  color: var(--faint);
  line-height: 1.6;
}

.agent-chat {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff0a, #ffffff03);
  box-shadow: var(--shadow);
  view-timeline: --chat;
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
}

.chat-user {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: #4f6bff33;
}

.chat-user p {
  margin: 0;
}

.chat-user:has(.chat-copy) {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding-right: 8px;
}

.chat-copy {
  display: grid;
  flex: none;
  width: 28px;
  height: 28px;
  margin: -2px 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.chat-copy:hover,
.chat-copy:focus-visible {
  background: #ffffff1a;
  color: var(--ink);
}

.chat-copy svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-copy .copied-icon,
.chat-copy[data-copied] .copy-icon {
  display: none;
}

.chat-copy[data-copied] .copied-icon {
  display: block;
}

.chat-agent {
  justify-self: start;
  border-bottom-left-radius: 6px;
  background: var(--surface-raised);
  color: var(--muted);
}

.chat-agent a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .agent-chat > * {
      animation: chat-in linear both;
      animation-timeline: --chat;
    }

    .chat-user {
      animation-range: entry 0% entry 50%;
    }

    .chat-agent {
      animation-range: entry 50% entry 90%;
    }

    .chat-frame {
      animation-range: entry 80% cover 50%;
    }
  }
}

@keyframes chat-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* The plan-history page: slides to a played plan, and the story behind it. */
.history-figure {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}

.doc-page .history-figure li {
  position: relative;
  margin: 0;
}

/* An arrow from each step to the next. */
.history-figure li + li::before {
  content: '→';
  position: absolute;
  top: 34%;
  left: -30px;
  color: var(--blue-dark);
  font-size: 20px;
}

.history-figure svg {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
}

.doc-page .history-figure p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 640px) {
  .history-figure {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .history-figure li + li::before {
    content: none;
  }
}

.history-story {
  margin: 0 0 32px;
}

.history-story summary {
  color: var(--blue-dark);
  cursor: pointer;
}

.history-story pre {
  margin-top: 12px;
}

/* The agent guide's page. */
.agent-banner {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.agent-person {
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: #cfd7e4;
  line-height: 1.6;
}

.agent-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-page .agent-files li {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 15px;
}

.agent-files span {
  color: var(--muted);
  font-size: 14px;
}

.agent-guide {
  overflow-wrap: anywhere;
}

.doc-page blockquote {
  margin: 0 0 20px;
  padding-left: 16px;
  border-left: 3px solid var(--line-strong);
}

/* Documents, plans, guides and specifications. */
.doc-page {
  width: min(820px, calc(100% - 32px));
  margin: 24px auto 96px;
  line-height: 1.65;
}

.publish-screenshot {
  max-width: 560px;
  margin: 28px auto 36px;
}

.publish-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.publish-screenshot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.doc-page h1 {
  margin: 8px 0 16px;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.doc-page h2 {
  margin: 48px 0 12px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.doc-page h3 {
  margin: 32px 0 8px;
  font-size: 19px;
}

.doc-page p,
.doc-page li {
  margin: 0 0 14px;
  color: #cfd7e4;
  font-size: 17px;
}

.doc-page li {
  margin: 6px 0;
}

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

.doc-page a:not(.button):not(.plan-card) {
  color: var(--blue-dark);
  text-decoration: underline;
  text-decoration-color: #8fa8ff66;
  text-underline-offset: 3px;
}

.doc-page .release-date {
  color: var(--muted);
  font-size: 15px;
}

.doc-page .release-divider {
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.doc-intro {
  color: var(--muted) !important;
  font-size: 20px !important;
}

.template-embed {
  margin: 32px 0;
}

.template-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color-scheme: dark;
}

.embed-views {
  display: grid;
  gap: 16px;
}

.template-embed p {
  margin: 12px 0 0;
  font-size: 15px;
}

.doc-page code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-raised);
  font:
    0.9em ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}

.doc-page .story-example {
  display: block;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.doc-page pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-sunken);
}

.doc-page pre code {
  padding: 0;
  background: none;
  font-size: 13px;
  line-height: 1.5;
}

/* The embed code is what readers copy, so it reads at body size and its
   long lines wrap instead of scrolling. */
.doc-page pre.embed-code {
  padding: 20px 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.doc-page pre.embed-code code {
  font-size: 15px;
  line-height: 1.6;
}

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

.doc-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

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

/* Pricing: a feature column and one centered column per plan. */
.pricing-table {
  min-width: 760px;
  margin: 28px 0 8px;
}

.doc-page .pricing-table td,
.pricing-table thead th:not(:first-child) {
  width: 16%;
  text-align: center;
}

.doc-page .pricing-table th[scope='row'] {
  font-weight: 500;
}

.pricing-table thead th {
  font-size: 16px;
  font-weight: 750;
}

.pricing-table th span,
.pricing-table td span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 640px) {
  /* The features stay in view while the plans scroll beside them. */
  .pricing-table {
    min-width: 620px;
    font-size: 14px;
  }

  .doc-page .pricing-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 150px;
    background: var(--page);
  }
}

.pricing-table tbody tr:last-child > * {
  border-bottom: 0;
  font-size: 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Client-only converters: Mermaid Gantt and spreadsheet rows. */
.tool-page {
  width: min(940px, calc(100% - 32px));
}

.tool-converter {
  margin: 32px 0;
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-converter label {
  display: block;
  margin: 0 0 8px;
  font-weight: 750;
}

.tool-converter input[type='text'],
.tool-converter textarea,
.tool-mapping select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-sunken);
  color: var(--ink);
  font: inherit;
}

.tool-converter input[type='text'] {
  margin-bottom: 18px;
}

.tool-converter textarea {
  padding: 14px 16px;
  font:
    14px/1.55 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  resize: vertical;
}

.tool-converter input[type='text']:focus,
.tool-converter textarea:focus {
  border-color: var(--blue);
  outline: 3px solid #6b8cff33;
}

.tool-form-actions,
.tool-result-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.tool-form-actions span {
  color: var(--muted);
  font-size: 14px;
}

.tool-result-heading {
  justify-content: space-between;
  margin: 0 0 24px;
}

.tool-result-heading h2 {
  margin: 2px 0 0;
}

.tool-live-result {
  margin-top: 32px;
}

.tool-preview {
  margin-bottom: 0;
}

.tool-preview iframe {
  height: min(70vh, 640px);
  min-height: 480px;
}

.tool-message,
.tool-warnings {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.tool-error {
  border-color: #7f2a2a;
  background: #2a1214;
  color: #ffb4b4;
}

.tool-warnings {
  margin-bottom: 24px;
}

.tool-warnings h3 {
  margin-top: 0;
}

.tool-mapping {
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.tool-mapping legend {
  padding: 0 6px;
  font-weight: 750;
}

.tool-mapping > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.tool-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.tool-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tool-column strong,
.tool-column small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-column small {
  color: var(--muted);
}

.tool-mapping select {
  padding: 6px 8px;
  border-radius: 8px;
}

.tool-mapping-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 16px;
  font-size: 15px;
}

.tool-mapping-options label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-mapping-options label[hidden] {
  display: none;
}

.tool-open {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 20px;
}

/* A QR code needs a light ground to scan. */
.tool-qr {
  flex: none;
  max-width: 100%;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
}

.tool-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.tool-open-text h3 {
  margin: 0 0 6px;
}

.tool-open-text p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

/* A phone has the embed's own Tidigar mark; nothing to scan. */
@media (hover: none) and (pointer: coarse) {
  .tool-open {
    display: none;
  }
}

.tool-contract {
  margin-top: 56px;
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding-top: 8px;
  }

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

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

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

  .home-band {
    grid-template-columns: 1fr;
    padding: 30px 24px;
  }
}

@media (max-width: 760px) {
  .site-header {
    width: min(100% - 28px, 1200px);
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 8px 20px;
  }

  nav a {
    padding-block: 8px;
  }

  .home-hero,
  .home-section {
    width: calc(100% - 28px);
  }

  .home-section {
    padding: 32px 0;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-block: 40px;
  }
}

@media (max-width: 540px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tool-form-actions,
  .tool-result-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-result-heading .button,
  .tool-form-actions .button {
    width: 100%;
  }

  .tool-open {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* The publishing overview's cards and the style pictures of its guides. */
.publish-grid {
  margin: 32px 0;
}

.publish-grid .plan-card img {
  aspect-ratio: 16 / 9;
  object-position: center top;
}

.style-grid,
.style-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.style-grid figure,
.style-pair figure {
  margin: 0;
}

.style-grid img,
.style-pair img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.style-grid figcaption,
.style-pair figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 560px) {
  .publish-grid,
  .style-grid,
  .style-pair {
    grid-template-columns: 1fr;
  }
}

/* The documents the Extend page introduces, each with a picture of the
   example plan in its format. */
.extend-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.doc-page .extend-list a:not(.button) {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  padding: 10px 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.doc-page .extend-list a:not(.button):hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.extend-list > a > strong,
.extend-list > a > span {
  padding-inline: 6px;
}

.extend-list > a > strong {
  font-size: 18px;
}

.extend-list > a > span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.extend-preview {
  height: 180px;
  margin-bottom: 8px;
  overflow: hidden;
  padding: 14px;
  border-radius: 10px;
  background: var(--surface-sunken);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.doc-page .extend-preview pre {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
}

.doc-page .extend-preview pre code {
  font-size: 11.5px;
}

.extend-preview-agents {
  display: grid;
  align-content: start;
  gap: 10px;
}

.doc-page .extend-preview .chat-message {
  margin: 0;
  font-size: 13px;
}

.extend-preview .chat-agent span {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.extend-preview-share-links {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.extend-preview .extend-qr svg {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 6px;
}

.doc-page .extend-link {
  padding: 0;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.extend-preview-calendar {
  padding: 10px;
}

.extend-preview svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .extend-list {
    grid-template-columns: 1fr;
  }
}

.brand-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.brand-tile {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  font-size: 14px;
}

.brand-tile img {
  display: block;
  width: 96px;
  height: 96px;
  margin: 40px auto;
}

.brand-tile .brand-icon {
  border-radius: 22px;
}

.brand-tile-light {
  background: #fff;
  color: #3a4558;
}

.brand-tile-light a {
  color: #1068fc;
}

.brand-tile figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.brand-tile-light figcaption {
  border-top-color: #dbe2ee;
  color: #3a4558;
}

.brand-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.brand-swatches div {
  display: grid;
  gap: 2px;
  font-size: 14px;
}

.brand-swatches span {
  height: 72px;
  margin-bottom: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.brand-swatches .sw-00bcfe {
  background: #00bcfe;
}

.brand-swatches .sw-0a0d14 {
  background: #0a0d14;
}

.brand-swatches .sw-1068fc {
  background: #1068fc;
}

.brand-swatches .sw-111622 {
  background: #111622;
}

.brand-swatches .sw-222b3d {
  background: #222b3d;
}

.brand-swatches .sw-6b8cff {
  background: #6b8cff;
}

.brand-swatches .sw-9aa7bc {
  background: #9aa7bc;
}

.brand-swatches .sw-a78bfa {
  background: #a78bfa;
}

.brand-swatches .sw-e8edf5 {
  background: #e8edf5;
}

.brand-swatches code {
  color: var(--muted);
}

.doc-page .brand-specimen {
  margin: 24px 0 8px;
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

/* The mark that grows from a T and stretches its middle dot to the left. The
   same animation is in assets/brand/tidigar-mark-animated.svg. */
.brand-hero-mark {
  width: 104px;
  height: 104px;
}

.bm-s {
  animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-timing-function: linear(
    0,
    0.192,
    0.399,
    0.599,
    0.775,
    0.919,
    1.028,
    1.102,
    1.145,
    1.163,
    1.161,
    1.145,
    1.121,
    1.093,
    1.066,
    1.04,
    1.019,
    1.002,
    0.99,
    0.982,
    0.979,
    0.978,
    0.979,
    0.982,
    0.986,
    0.99,
    0.993,
    0.996,
    0.999,
    1.001,
    1.002,
    1.003,
    1.003,
    1.003,
    1.003,
    1.002,
    1.002,
    1.001,
    1.001,
    1,
    1
  );
  animation-fill-mode: backwards;
  animation-duration: 1.1s;
  transform-box: fill-box;
  transform-origin: center;
}

.bm-bar {
  animation-name: bm-grow;
}
.bm-dot {
  animation-name: bm-pop;
}
.bm-d1 {
  animation-delay: 0.3s;
}
.bm-d2 {
  animation-delay: 0.5s;
}
.bm-body {
  animation-name: bm-fill;
  animation-delay: 1.3s;
  animation-duration: 1.2s;
  transform-origin: 100% 50%;
}
.bm-cap {
  animation-name: bm-reach, bm-show;
  animation-duration: 1.2s, 0s;
  animation-delay: 1.3s, 1.3s;
  animation-timing-function:
    linear(
      0,
      0.192,
      0.399,
      0.599,
      0.775,
      0.919,
      1.028,
      1.102,
      1.145,
      1.163,
      1.161,
      1.145,
      1.121,
      1.093,
      1.066,
      1.04,
      1.019,
      1.002,
      0.99,
      0.982,
      0.979,
      0.978,
      0.979,
      0.982,
      0.986,
      0.99,
      0.993,
      0.996,
      0.999,
      1.001,
      1.002,
      1.003,
      1.003,
      1.003,
      1.003,
      1.002,
      1.002,
      1.001,
      1.001,
      1,
      1
    ),
    linear;
  animation-fill-mode: backwards, both;
}

@keyframes bm-grow {
  from {
    transform: scaleX(0.05) scaleY(0.6);
  }
}
@keyframes bm-pop {
  from {
    transform: scale(0);
  }
}
@keyframes bm-reach {
  from {
    transform: translateX(51px);
  }
}
@keyframes bm-show {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes bm-fill {
  from {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-s {
    animation: none;
  }
}

.doc-page .brand-hero-mark {
  display: block;
  margin: 8px 0 0;
}

.pricing-currency {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-currency select {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid currentColor;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
}

/* The editor's subscription choice: free, the year as the best value in
   the middle, and the month; stacked on a phone. */
.pricing-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin: 28px 0 0;
}

.pricing-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.pricing-plan.is-best {
  border: 2px solid var(--blue);
  padding: 23px 19px 19px;
  background: var(--surface-raised);
}

.pricing-plan-badge {
  position: absolute;
  top: -12px;
  left: 18px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.doc-page .pricing-plan h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}

.doc-page .pricing-plan-note {
  margin: 2px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.doc-page .pricing-plan-price {
  display: grid;
  gap: 2px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.pricing-plan-price strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.pricing-plan-price .pricing-plan-minimum {
  margin-top: 6px;
  color: var(--ink);
}

.doc-page .pricing-plan ul {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.4;
}

.pricing-plan li {
  position: relative;
  padding-left: 24px;
}

.pricing-plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue-dark);
  font-weight: 700;
}

.pricing-plan li.is-missing {
  color: var(--faint);
}

.pricing-plan li.is-missing::before {
  content: '–';
  color: var(--faint);
}

.pricing-plan .button {
  width: 100%;
  min-height: 44px;
}

.doc-page .pricing-plan-after {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.doc-page .pricing-terms {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.doc-page .pricing-more {
  display: grid;
  gap: 10px;
  margin: 32px 0;
  padding: 0;
  list-style: none;
}

.pricing-more li {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
}

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

@media (max-width: 760px) {
  .pricing-plans {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}
