/* significainteractive.com: the legal, account and checkout pages
 *
 * The home and app pages are built from the design kit (assets/system.css and
 * the rest); these pages keep their own markup and take the same look from
 * here: one face (Plus Jakarta Sans, display weight 500 with tight tracking),
 * the same header proportions, round corners, pill buttons and each app's own
 * colours (body.sparky, body.calobi, body.aics), so a link from an app page lands on a
 * page that looks like it. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans-v1.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* The studio: off-white, near-black ink and its blue, as on the home page. */
:root {
  --page: #FAFAF9;
  --surface: #FFFFFF;
  --ink: #16181D;
  --ink-2: #3E424B;
  --ink-3: #6A6C6F;
  --hairline: #E7E5E4;
  --accent: #2F5BEA;
  --accent-2: #2F5BEA;
  --accent-ink: #FAFAF9;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px;
  color-scheme: light;
}

/* Sparky Boost: the app's navy and cyan, dark like the app. */
.sparky {
  --page: #0F131D;
  --surface: #171B26;
  --ink: #DFE2F1;
  --ink-2: #C3C7D6;
  --ink-3: #9599A8;
  --hairline: #262A35;
  --accent: #00E5FF;
  --accent-2: #00F5A0;
  --accent-ink: #0F131D;
  color-scheme: dark;
}

/* MomoCal: the app's cream and leaf green, light like the app. */
.calobi {
  --page: #FFF8F1;
  --surface: #FFFFFF;
  --ink: #1F2A24;
  --ink-2: #3F4A43;
  --ink-3: #6C716A;
  --hairline: #EDE3D7;
  --accent: #137A44;
  --accent-2: #FF9F5A;
  --accent-ink: #FFF8F1;
  color-scheme: light;
}

/* AI Company Simulator: the game page's graphite and orange, dark like the page. */
.aics {
  --page: #18191B;
  --surface: #222427;
  --ink: #EFF0F1;
  --ink-2: #D2D4D7;
  --ink-3: #9C9EA3;
  --hairline: #2E3034;
  --accent: #FF6A45;
  --accent-2: #2BD47D;
  --accent-ink: #18191B;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(80rem, 100% - 2 * clamp(1.5rem, 5vw, 5rem)); margin: 0 auto; }
.doc { width: min(44rem, 100% - 3rem); margin: 0 auto; }

/* ---- Header & footer: the home and app pages' proportions ---------------- */

.topbar { background: var(--page); border-bottom: 1px solid var(--hairline); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 72px; }
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; min-width: 0; }
.logo:hover { color: inherit; }
.logo b { font-size: 1.375rem; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the studio's ring, as in the home page's header (the letter inside is kept for screen readers) */
.mark {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 5px solid var(--accent); background: none;
  font-size: 0; color: transparent; overflow: hidden;
}
/* an app's own icon: its rounded square, never a circle */
.logo img { width: 28px; height: 28px; border-radius: 22%; display: block; flex: none; }
.topbar nav { display: flex; gap: 1.5rem; font-size: .9375rem; font-weight: 500; }
.topbar nav a { text-decoration: none; color: var(--ink); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .2s ease; padding-bottom: 2px; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--ink); background-size: 100% 1px; }

footer.site {
  border-top: 1px solid var(--hairline);
  margin-top: clamp(4rem, 10vw, 7.5rem);
  padding: 2rem 0 2.5rem;
  color: var(--ink-3);
  font-size: .875rem;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; align-items: baseline; }
footer.site nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
footer.site a { color: var(--ink-2); }

/* ---- Type ------------------------------------------------------------------ */

h1, h2, h3 { line-height: 1.15; letter-spacing: -.028em; text-wrap: balance; font-weight: 500; }
h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); margin: 0 0 .75rem; letter-spacing: -.036em; line-height: 1.04; }
h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); margin: 3rem 0 .75rem; }
h3 { font-size: 1.125rem; letter-spacing: -.01em; margin: 1.75rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
strong, b { font-weight: 600; }
.lead { font-size: clamp(1.125rem, 2.2vw, 1.25rem); line-height: 1.5; color: var(--ink); max-width: 40rem; }
.muted { color: var(--ink-3); }
small, .small { font-size: .875rem; }

.tag {
  display: inline-block;
  padding: .15rem .65rem;
  border-radius: 999px;
  font-size: .8125rem; font-weight: 500;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

/* ---- Legal pages --------------------------------------------------------- */

main.doc { padding-top: clamp(3rem, 8vw, 6rem); }
.doc .updated { color: var(--ink-3); font-size: .875rem; margin-bottom: 2.5rem; }
.doc h2 { scroll-margin-top: 1.5rem; }

.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.55; }
th, td { text-align: left; vertical-align: top; padding: .75rem .75rem .75rem 0; border-bottom: 1px solid var(--hairline); }
th { font-weight: 500; color: var(--ink-3); font-size: .8125rem; }
td:first-child { font-weight: 500; min-width: 9rem; }

.toc { padding: 1.25rem 1.5rem; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface); }
.toc ol { margin: 0; }
.toc li { margin-bottom: .2rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---- MomoCal: mascot, buttons, forms and the upgrade page ------------------ */

.mascot { width: 160px; height: 160px; display: block; margin: 0 auto 1.5rem; }
[hidden] { display: none !important; }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 48px; padding: .75rem 1.5rem;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-size: 1rem; font-weight: 500; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; filter: none; transform: none; }
.btn.secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline); }
.btn.secondary:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: .22em; cursor: pointer; }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 1.5rem; }
.stack > * + * { margin-top: .75rem; }
.field {
  display: block; width: 100%;
  min-height: 48px; padding: .75rem 1rem;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--surface); color: inherit; font: inherit; font-size: 1rem;
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.or { text-align: center; color: var(--ink-3); font-size: .875rem; }
.error { color: #C2362F; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.plan {
  text-align: left;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--surface); color: inherit; font: inherit;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.plan:hover { border-color: var(--ink-3); }
.plan[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.plan .name { display: block; font-weight: 500; }
.plan .price { display: block; margin-top: .3rem; font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.plan .per { display: block; color: var(--ink-3); font-size: .875rem; }
.plan .tag { margin-top: .45rem; background: color-mix(in srgb, var(--accent-2) 22%, transparent); color: #8A4210; }

@media (prefers-reduced-motion: reduce) {
  .btn, .plan, .topbar nav a { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}
