/* Tessera 168 — support & marketing site.
   One stylesheet for every page. The layout follows the reference site the
   app's owner picked; the colours are the app's own dark theme, so the site
   and the screenshots on it are lit the same way: near-black page, one yellow
   highlight, raised grey cards, pale pill buttons. Dark only — there is no
   light variant, because the shots are dark and a cream page around a black
   phone reads as a mistake. */

:root {
  color-scheme: dark;
  --paper: #101114;
  --ink: #f1f2ee;
  --ink-soft: #979ba6;
  --highlight: #f7cb4b;
  --card: #1a1c21;
  --line: #2b2f36;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* A phone must never be able to drag the page sideways. Every rule below is
   meant to fit inside the viewport on its own — this is the net under them,
   so one long word or a nowrap pill cannot turn the whole page into a
   horizontal scroller. `clip`, not `hidden`: `hidden` makes the body a scroll
   container and the sticky nav stops sticking. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Lexend, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 16px;
  padding: 28px 0 0;
}

/* Language switch and the email address, together, on the right. */
.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

.langs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.langs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.langs a:hover { color: var(--ink); }

.langs a[aria-current] {
  color: var(--ink);
  font-weight: 600;
}

.mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #1d2026;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  max-width: 100%;
}

/* The address is one unbreakable word, wider than a 320 pt phone once the
   pill's padding is round it. Let it break there rather than push the page. */
@media (max-width: 380px) {
  .mail { white-space: normal; overflow-wrap: anywhere; }
}

.mail:hover { background: #262a31; }

/* ---------- hero ---------- */

h1 {
  font-size: clamp(30px, 5.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
  max-width: 14ch;
}

h1 mark {
  background: var(--highlight);
  /* Dark ink on the yellow: `inherit` was near-white here, which is the one
     unreadable pair on the page. */
  color: #101114;
  padding: 0 0.12em;
  border-radius: 4px;
}

.lede {
  margin: 18px 0 0;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 18px;
}

h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 64px 0 22px;
}

h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 0;
}

/* ---------- cards ---------- */

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
}

.card--plain {
  background: transparent;
  padding: 0;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head .dot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: none;
}

.card p {
  margin: 0;
  color: #d6d8db;
}

.card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #d6d8db;
}

.card li { margin: 4px 0; }

.card .btn { margin-top: auto; }

/* ---------- buttons ---------- */

.btn {
  align-self: center;
  display: inline-block;
  margin-top: 22px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #101114;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover { background: #ffffff; }

.btn--soft {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid #3a3f48;
}

.btn--soft:hover { background: #1d2026; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
}

.btn-row .btn { margin-top: 0; align-self: flex-start; }

.note {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 12px 0 0;
}

/* ---------- the one big product block ---------- */

.hero-app {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  margin-top: 30px;
}

.hero-app img.shot {
  width: 100%;
  max-width: 262px;
  border-radius: 26px;
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto;
}

/* ---------- screenshots ---------- */

.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.shots figure { margin: 0; }

.shots img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  display: block;
}

.shots figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- support ---------- */

.support {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.support img {
  width: 120px;
  height: 120px;
  flex: none;
  display: block;
}

@media (max-width: 620px) {
  .support { flex-direction: column; align-items: flex-start; gap: 12px; }
  .support img { width: 96px; height: 96px; }
}

/* ---------- price ---------- */

.price, .card .price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 10px;
  font-weight: 700;
  font-size: 26px;
}

.price small {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- prose (privacy and terms pages) ---------- */

.h1-page { margin-top: 34px; }


.prose {
  max-width: 68ch;
  margin-top: 26px;
}

.prose h2 {
  font-size: 20px;
  text-transform: none;
  margin: 38px 0 10px;
}

.prose p, .prose li { color: #d6d8db; }

.prose ul { padding-left: 20px; }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: #1a1c21;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.prose .updated {
  color: var(--ink-soft);
  font-size: 15px;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 15px;
}

.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  /* A table sizes its columns from their longest word; without this one
     long word in a cell widens the table past a small phone's screen. */
  overflow-wrap: anywhere;
}

.prose th { background: #1a1c21; font-weight: 600; }

/* ---------- footer ---------- */

footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  padding: 22px 0 46px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

footer nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

footer nav a { text-decoration: none; }

footer nav a:hover { color: var(--ink); }

footer .sep { color: #4a4f58; }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
  .hero-app { grid-template-columns: 1fr; }
  .hero-app img.shot { max-width: 260px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .top-right { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  h1 { max-width: none; }
}

/* ==========================================================================
   Ioniclabs — the lab page (index.html, vi/index.html)

   The shape is sotalabs.io: a three-part header with the wordmark in the
   middle, one huge uppercase sentence with yellow blocks struck through it,
   then the apps as cards that do not line up — each column sits at its own
   height so the row reads as a shelf rather than a table. The colours stay
   the app's dark theme, because the screenshots on the app pages are dark and
   a cream page around a black phone reads as a mistake.
   ========================================================================== */

.lab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 16px;
  padding: 28px 0 0;
}

.lab-top .brand {
  font-size: 22px;
  letter-spacing: -0.01em;
}

/* The lab's mark is a shape with a hole in it, not a tile: no rounded box
   around it, and no background of its own. */
.lab-top .brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 0;
  flex: none;
}

.lab-top .top-right { justify-content: flex-end; }

/* ---------- the sentence ---------- */

.lab-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: start;
  margin: 76px 0 62px;
}

.lab-hero h1 {
  max-width: 15ch;
  font-size: clamp(32px, 5.6vw, 56px);
  line-height: 1.22;
}

.lab-hero h1 mark { padding: 0.06em 0.16em; }

.lab-hero .lede { margin-top: 22px; }

/* ---------- the shelf of apps ---------- */

.lab-shelf {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}

.lab-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: var(--shift, 0px);
}

.lab-label {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 6px 0 2px;
}

.app-card {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

a.app-card:hover {
  background: #21242b;
  border-color: var(--line);
  transform: translateY(-2px);
}

.app-card .name {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 700;
}

.app-card .name img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: none;
  display: block;
}

.app-card p {
  margin: 0;
  color: #d6d8db;
  font-size: 16px;
}

.app-card .go {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
}

.app-card .go span {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #101114;
}

.app-card--soon .go span {
  background: transparent;
  border: 1.5px solid #3a3f48;
  color: var(--ink-soft);
}

/* The one live app gets the wide card next to the sentence. */
.app-card--feature {
  background: transparent;
  padding: 0;
  gap: 14px;
}

.app-card--feature .name { font-size: 26px; }

.app-card--feature .name img { width: 44px; height: 44px; border-radius: 13px; }

.app-card--feature p { font-size: 17px; }

.tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  color: #101114;
  background: var(--highlight);
}

.tag--soon { background: #2b2f36; color: var(--ink-soft); }

.lab-foot {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  padding: 22px 0 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lab-foot nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.lab-foot a { text-decoration: none; }
.lab-foot a:hover { color: var(--ink); }

@media (max-width: 980px) {
  .lab-shelf { grid-template-columns: repeat(2, 1fr); }
  .lab-col { margin-top: 0; }
}

@media (max-width: 760px) {
  .lab-top { gap: 14px; }
  .lab-top .top-right { width: 100%; justify-content: flex-start; }
  .lab-hero { grid-template-columns: 1fr; gap: 40px; margin: 44px 0 44px; }
  .lab-hero h1 { max-width: none; }
  .lab-shelf { grid-template-columns: 1fr; }
  .lab-foot { justify-content: flex-start; }
}

/* ==========================================================================
   The app pages (apps/…/index.html)

   The shape here is capwords.app: a nav that floats as a pill instead of
   sitting on a bar, everything centred down one column, and a display serif
   with one italic phrase in the accent colour carrying each section. Same
   dark palette as the rest of the site, so the phones still belong.
   ========================================================================== */

.ap-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  margin: 22px auto 0;
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 14px;
  border-radius: 999px;
  background: rgba(26, 28, 33, 0.86);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 14px;
}

.ap-nav img.icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: block;
}

.ap-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.ap-nav a:hover { color: var(--ink); }

.ap-nav a.here { color: var(--ink); font-weight: 600; }

.ap-nav .cta {
  background: var(--ink);
  color: #101114;
  font-weight: 600;
  padding: 9px 18px;
}

.ap-nav .cta:hover { background: #fff; color: #101114; }

.ap-nav .bar {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 2px;
}

/* ---------- the centred column ---------- */

.ap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.ap section { margin: 110px 0; }

.ap-head { text-align: center; }

.ap-display {
  font-family: Fraunces, Lexend, Georgia, serif;
  font-weight: 600;
  font-size: clamp(34px, 5.6vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-transform: none;
  margin: 0 auto;
  max-width: 18ch;
}

.ap-display em {
  font-style: italic;
  color: var(--highlight);
}

h2.ap-display {
  font-size: clamp(28px, 4.2vw, 46px);
  max-width: 20ch;
}

.ap-sub {
  margin: 20px auto 0;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 18px;
}

.ap-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #1a1c21;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ap-hero { padding-top: 76px; }

.ap-hero .btn-row { justify-content: center; }

.ap-hero .btn-row .btn { align-self: center; }

/* the wide panel the phone stands in */

.ap-stage {
  margin-top: 54px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(247, 203, 75, 0.16), transparent 62%),
    linear-gradient(180deg, #191b21, #101114);
  padding: 46px 24px 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.ap-stage img {
  width: 100%;
  max-width: 290px;
  display: block;
  border-radius: 30px 30px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
}

/* ---------- screenshot row ---------- */

.ap-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.ap-row figure { margin: 0; }

.ap-row img {
  width: 100%;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.ap-row figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- feature and fact cards ---------- */

.ap-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 44px;
  text-align: left;
}

.ap-cards--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- faq ---------- */

.ap-faq {
  max-width: 760px;
  margin: 44px auto 0;
  text-align: left;
}

.ap-faq details {
  border-bottom: 1px solid var(--line);
}

.ap-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 34px 20px 0;
  font-weight: 600;
  position: relative;
}

.ap-faq summary::-webkit-details-marker { display: none; }

.ap-faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 17px;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-soft);
}

.ap-faq details[open] summary::after { content: "–"; }

.ap-faq p {
  margin: 0 0 22px;
  color: #d6d8db;
  max-width: 62ch;
}

/* ---------- footer with columns ---------- */

.ap-foot {
  border-top: 1px solid var(--line);
  margin-top: 110px;
  padding: 46px 0;
  /* undoing the site-wide footer rule, which centres and shouts */
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  font-size: 16px;
  color: var(--ink);
}

.ap-foot .cols {
  display: grid;
  /* Five columns since the promotion page joined: the signature, then the
     app, where to follow it, the legal pages and the lab. */
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
}

.ap-foot h4 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.ap-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

.ap-foot li { margin: 9px 0; }

.ap-foot a { text-decoration: none; color: #d6d8db; }

.ap-foot a:hover { color: var(--ink); }

.ap-foot .sign {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 18px;
}

.ap-foot .sign img { width: 34px; height: 34px; border-radius: 10px; display: block; }

.ap-foot .fine {
  margin-top: 34px;
  font-size: 13px;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .ap section { margin: 78px 0; }
  .ap-row { grid-template-columns: repeat(2, 1fr); }
  .ap-cards, .ap-cards--3 { grid-template-columns: 1fr; }
  .ap-foot .cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .ap-nav { gap: 2px; padding-left: 10px; font-size: 13px; }
  .ap-nav a { padding: 8px 9px; }
  .ap-nav .hide-sm { display: none; }
  .ap-hero { padding-top: 46px; }
  .ap-stage { padding: 30px 18px 0; border-radius: 24px; }
}

/* The smallest phones (320 pt): the pill still holds a name, the language
   and the call to action, so the divider goes and the button tightens. */
@media (max-width: 380px) {
  .ap-nav .bar { display: none; }
  .ap-nav .cta { padding: 8px 12px; }
}

/* An app with no screenshots yet stands its icon in the same panel the phone
   would have stood in. */
.ap-stage--art {
  padding: 64px 24px;
  align-items: center;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}

.ap-stage--art img {
  width: 104px;
  height: 104px;
  max-width: none;
  border: none;
  border-radius: 26px;
}

.ap-stage--art .tag { align-self: center; }

.ap-stage--art p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40ch;
}

/* ---------- the legal pages' header ----------
   Two rows and nothing else: the app it belongs to with the language switch
   beside it, and the address to write to underneath. No section links — the
   footer already carries those, and a page of terms should not offer a menu. */

.legal-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 28px 0 0;
}

.legal-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legal-top .langs { gap: 10px; }

.legal-top .langs a[aria-current] { color: var(--ink); }

/* ---------- the language switch ----------
   One control instead of two links: the language you are reading, and a small
   panel under it with both. Native <details>, so it works before any script
   loads; site.js only closes it when you click elsewhere. */

.lang {
  position: relative;
  font-size: 14px;
}

.lang > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #1d2026;
  color: var(--ink);
  white-space: nowrap;
}

.lang > summary::-webkit-details-marker { display: none; }

.lang > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 120ms ease;
}

.lang[open] > summary::after { transform: rotate(-135deg); margin-top: 2px; }

.lang > summary:hover { background: #262a31; }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 158px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #1a1c21;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: #d6d8db;
  white-space: nowrap;
}

.lang-menu a:hover { background: #262a31; color: var(--ink); }

.lang-menu a[aria-current] { color: var(--ink); font-weight: 600; }

.lang-menu a[aria-current]::after {
  content: "✓";
  color: var(--highlight);
  font-size: 13px;
}

/* Inside the app pages' floating pill the switch has no border of its own. */
.ap-nav .lang > summary {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 12px;
}

.ap-nav .lang > summary:hover { color: var(--ink); background: #262a31; }

/* A footnote under a card's body — the local-price note under the price. */
.card .note { margin-top: 14px; }
