/* ==========================================================================
   Yaqgu design system: one stylesheet for yaqgu.com, /lab/ and every /tools/ page.
   Warm dark graphite surfaces, soft Google-grade contrast, editorial serif
   display type, and calm tonal highlight bars for private data.
   Fonts: Bricolage Grotesque (display), Plus Jakarta Sans (text), JetBrains Mono (labels).
   ========================================================================== */

:root {
  /* Calm, deep neutral surfaces in clear steps, so depth reads without heavy borders */
  --bg: #08090c;
  --bg-elevated: #0f1116;
  --bg-soft: rgba(232, 236, 244, .045);
  --surface: #14171e;
  --surface-2: #1b1f28;
  --line: rgba(232, 236, 244, .08);
  --line-strong: rgba(232, 236, 244, .15);

  /* Text: high contrast for reading, never pure white (less glare) */
  --ink: #eef1f6;
  --ink-2: #c4c9d3;
  --muted: #8f96a3;

  /* Elevation and focus */
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 18px 50px -12px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(91, 156, 255, .35);
  --warn: #f0b13c;
  --warn-soft: rgba(240, 177, 60, .1);
  --warn-line: rgba(240, 177, 60, .3);

  /* Trust & action accent: rich true blue hue */
  --lime: #a3cf38;
  --accent: #5b9cff;
  --accent-hover: #79afff;
  --accent-dark: #5b9cff;
  --accent-soft: rgba(91, 156, 255, .13);
  --on-accent: #081326;

  /* Safety & verification green */
  --ok: #34c77b;
  --ok-soft: rgba(52, 199, 123, .11);
  --ok-line: rgba(52, 199, 123, .28);

  /* Rich true-hue highlight bars: vivid color without neon glow or harsh brightness */
  --k-person: #ec5f9b;
  --k-org: #9d74f7;
  --k-email: #2cb8d6;
  --k-phone: #34c77b;
  --k-place: #e8b030;
  --k-money: #ed7c4c;
  --k-id: #a3cf38;
  --k-secret: #e55b5b;
  --k-net: #5b9cff;
  /* aliases */
  --mint: var(--k-phone); --cyan: var(--k-email); --violet: var(--k-org); --pink: var(--k-person); --amber: var(--k-place); --coral: var(--k-money);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 22px;
  --deep: #06070a; --deep-ink: #eceff4;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { background: radial-gradient(1100px 520px at 50% -12%, rgba(91, 156, 255, .085) 0%, transparent 68%), var(--bg); background-attachment: fixed; }
p, li { text-wrap: pretty; }
body { color: var(--ink); font: 400 16px/1.58 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; position: relative; }
body > :not(.yq-bg):not(.site-nav) { position: relative; z-index: 1; }
.yq-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { scrollbar-color: rgba(232, 234, 237, .18) transparent; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

/* ---------- type ---------- */
.display, h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; font-size: clamp(42px, 7.2vw, 96px); text-wrap: balance; }
h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.03em; line-height: 1.06; font-size: clamp(30px, 4.4vw, 56px); text-wrap: balance; }
h3, h4 { font-family: var(--font); font-weight: 600; letter-spacing: -.01em; line-height: 1.35; font-size: 17px; }
.accent, header.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; color: var(--ink-2); line-height: 1.55; max-width: 520px; }
.eyebrow { display: inline-block; font: 500 13px/1 var(--font); color: var(--accent); letter-spacing: .01em; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- the bar: hidden private data ---------- */
.x { --c: var(--k-person); position: relative; display: inline-block; white-space: nowrap; cursor: crosshair; }
.x::after { content: attr(data-t); position: absolute; inset: 15% -.35em 9%; display: grid; place-items: center; overflow: hidden; background: var(--c); color: #111317; border-radius: 5px; font: 500 clamp(9px, 1.15vw, 14px)/1 var(--font-mono); letter-spacing: .08em; box-shadow: 0 2px 10px rgba(0, 0, 0, .28); transform-origin: left; animation: bar .85s cubic-bezier(.7, 0, .2, 1) .85s both; transition: transform .32s cubic-bezier(.7, 0, .2, 1); }
.x:hover::after { animation: none; transform: scaleX(0); transform-origin: right; }
.x:nth-of-type(2)::after { animation-delay: 1.1s; } .x:nth-of-type(3)::after { animation-delay: 1.35s; }
@keyframes bar { from { transform: scaleX(0); } }
.k-person { --c: var(--k-person); } .k-org { --c: var(--k-org); } .k-email { --c: var(--k-email); } .k-phone { --c: var(--k-phone); }
.k-place { --c: var(--k-place); } .k-money { --c: var(--k-money); } .k-id { --c: var(--k-id); } .k-secret { --c: var(--k-secret); }

/* ---------- nav: full content-width frosted capsule ---------- */
.site-nav { position: sticky; top: 12px; z-index: 50; margin-top: 12px; padding: 0 32px; pointer-events: none; display: flex; justify-content: center; }
.nav-in.wrap { --nav-blur: 18px; --nav-sat: 165%; position: relative; overflow: hidden; width: 100%; max-width: 1136px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 48px; padding: 4px 10px 4px 22px; border-radius: 999px; pointer-events: auto; background: rgba(18, 20, 26, .68); backdrop-filter: blur(var(--nav-blur)) saturate(var(--nav-sat)); -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(var(--nav-sat)); border: 0; box-shadow: 0 10px 28px rgba(0, 0, 0, .42); transition: background .25s; }
.nav-in.wrap.is-scrolled { background: rgba(14, 16, 22, .80); }
.nav-in.wrap > * { position: relative; z-index: 2; }
.nav-glass { position: absolute !important; inset: 0; z-index: 1 !important; pointer-events: none; border-radius: inherit; overflow: hidden; }
.nav-wave { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo-word { display: inline-flex; font: 700 19px/1 var(--font-display); letter-spacing: -.045em; color: var(--ink); transition: opacity .16s; }
.logo:hover .logo-word { opacity: .82; }
.logo-word i { font-style: normal; color: inherit; }
.foot-logo { display: inline-flex; align-items: center; margin-bottom: 12px; }
.foot-logo .logo-word { font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { font: 500 13.5px/1 var(--font); color: var(--muted); padding: 8px 13px; border-radius: 999px; transition: color .16s, background .16s; }
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.nav-links a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .09); }
/* signed-in badge (assets/nav.js) */
.nav-in.has-me .nav-links { margin-left: auto; }
.me { display: flex; align-items: center; flex-shrink: 0; }
.me-btn { display: inline-flex; align-items: center; gap: 7px; padding: 3px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; transition: background .16s; }
.me-btn:hover, .me-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .08); }
.me-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.me-face { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); color: var(--accent); font: 600 14px/1 var(--font); box-shadow: 0 0 0 1px var(--line-strong); }
.me-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-pro { font: 600 11px/1 var(--font); letter-spacing: .02em; color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok-line); padding: 5px 8px; border-radius: 999px; margin-right: 4px; }
.me-menu { position: fixed !important; z-index: 60 !important; /* beats the page-wide "body > *" stacking rule */ width: 260px; max-width: calc(100vw - 16px); padding: 6px; border-radius: 16px; background: var(--bg-elevated); border: 1px solid var(--line-strong); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.me-menu[hidden] { display: none; }
.me-head { display: grid; gap: 3px; padding: 10px 12px 8px; }
.me-head b { font: 600 14.5px/1.3 var(--font); color: var(--ink); }
.me-head span { font: 400 12.5px/1.3 var(--font); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-status { display: grid; gap: 3px; margin: 2px 6px 6px; padding: 10px 11px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); font: 400 12.5px/1.45 var(--font); color: var(--muted); }
.me-status b { font: 600 13.5px/1.3 var(--font); color: var(--ink); }
.me-status.me-active, .me-status.me-cancelling { border-color: var(--ok-line); background: var(--ok-soft); }
.me-status.me-past_due { border-color: var(--warn-line); background: var(--warn-soft); }
.me-status.me-past_due b { color: var(--warn); }
.me-item.me-primary { color: var(--warn); font-weight: 600; }
.me-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); margin: 0 6px 0 2px; }
.me-signin { font: 600 13.5px/1 var(--font); color: var(--on-accent); background: var(--accent); padding: 9px 15px; border-radius: 999px; transition: background .16s; }
.me-signin:hover { background: var(--accent-hover); }
.me-signin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.me-item { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 500 13.5px/1.2 var(--font); cursor: pointer; }
.me-item:hover, .me-item:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
@media (max-width: 560px) {
  .nav-in.has-me .nav-links a:nth-child(n+3) { display: none; } /* make room for the badge / Sign in on phones */
  .me-signin { padding: 8px 12px; font-size: 13px; }
}
@media (max-width: 640px) {
  .me-face { width: 30px; height: 30px; }
  .me-pro { display: none; }
  .site-nav { top: 8px; margin-top: 8px; padding: 0 18px; }
  .nav-in.wrap { height: 42px; padding: 4px 8px 4px 16px; gap: 12px; }
  .logo-word { font-size: 17.5px; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 13px; padding: 7px 10px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; font: 500 14.5px/1 var(--font); padding: 13px 22px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-1); transition: background .16s, color .16s, border-color .16s, box-shadow .18s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: rgba(232, 236, 244, .3); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary, .btn-accent { background: linear-gradient(180deg, #6ea9ff, var(--accent)); border-color: transparent; color: var(--on-accent); font-weight: 600; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 18px -6px rgba(91, 156, 255, .55); }
.btn-primary:hover, .btn-accent:hover { background: linear-gradient(180deg, #82b6ff, var(--accent-hover)); border-color: transparent; color: var(--on-accent); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 10px 26px -8px rgba(91, 156, 255, .6); }

/* ---------- raised surface: the one card style for panels, sign-in and success pages ---------- */
.surface { background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--bg-elevated); border: 1px solid var(--line-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-2); }

/* ---------- sign-in and success pages ---------- */
.auth { min-height: 66vh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 56px 0; }
.auth-card { width: min(440px, calc(100vw - 36px)); padding: 38px 32px 30px; display: grid; gap: 16px; text-align: center; justify-items: center; }
.auth-card h1 { font-size: clamp(28px, 4.4vw, 36px); }
.auth-sub { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.auth-fine { color: var(--muted); font-size: 12.5px; line-height: 1.55; max-width: 340px; }
.auth-fine a, .auth-foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.auth-foot { color: var(--muted); font-size: 14px; }
.auth-note { color: var(--muted); }
.sso, .sso .buy-row { display: grid; gap: 10px; width: 100%; }
.sso-btn { width: 100%; min-height: 48px; background: #fff; color: #1f1f1f; border-color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.sso-btn:hover { background: #f1f3f4; border-color: #f1f3f4; color: #1f1f1f; }
.sso-btn svg { width: 18px; height: 18px; }
.done-mark { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); box-shadow: 0 0 0 8px rgba(52, 199, 123, .06); margin: 0 auto 4px; }
.done-mark svg { width: 28px; height: 28px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; margin-right: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- small notice (payment failed, Pro ended): bottom-left, never blocks the page ---------- */
.yq-notice { position: fixed !important; z-index: 70 !important; left: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px 12px 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.yq-notice-past_due { border-color: var(--warn-line); background: linear-gradient(180deg, var(--warn-soft), transparent), var(--surface); }
.yq-notice-body { display: grid; gap: 3px; min-width: 0; }
.yq-notice-body b { font: 600 14px/1.35 var(--font); color: var(--ink); }
.yq-notice-body span { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.yq-notice-act { font: 600 13px/1 var(--font); color: var(--on-accent); background: var(--accent); border: 0; border-radius: 999px; padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.yq-notice-past_due .yq-notice-act { background: var(--warn); color: #1d1404; }
.yq-notice-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.yq-notice-x:hover { background: var(--bg-soft); color: var(--ink); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 480px) { .yq-notice { grid-template-columns: 1fr auto; } .yq-notice-act { grid-column: 1 / -1; justify-self: start; } .yq-notice-x { grid-row: 1; grid-column: 2; } }
.btn-sm { font-size: 13.5px; padding: 9px 16px; }
.btn svg { width: 15px; height: 15px; }

/* ---------- trust & status pills ---------- */
.pill, .privacy, .badge { display: inline-flex; align-items: center; gap: 9px; font: 500 13.5px/1.2 var(--font); color: var(--ink-2); padding: 7px 14px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }
.pill .dot, .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 199, 123, .18); }
.privacy { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); } .privacy svg { width: 13.5px; height: 13.5px; }
.badge-live { color: var(--ok); }

/* ---------- sections ---------- */
section { padding: 112px 0; }
@media (max-width: 640px) { section { padding: 68px 0; } }
.section-soft { background: var(--bg-elevated); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 52px; display: grid; gap: 16px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ---------- cards & grids ---------- */
.card { border-top: 1px solid var(--line-strong); padding: 22px 0 0; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.card h3, .card h4 { margin-bottom: 8px; }
.grid { display: grid; gap: 40px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 28px; } }
.app-icon { --c: var(--accent); width: 44px; height: 44px; display: grid; place-items: center; color: var(--c); border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r); }
.app-icon svg { width: 22px; height: 22px; }
.tool-card { display: grid; gap: 12px; align-content: start; }
.tool-card .row { display: flex; justify-content: space-between; align-items: center; }
.tool-card.soon { opacity: .72; }
.tool-card .go { font: 600 14px var(--font); color: var(--accent); display: inline-flex; gap: 8px; align-items: center; }
.tool-card .go svg { width: 14px; height: 14px; }
.feature { display: grid; gap: 10px; }
.feature .ic { color: var(--accent); } .feature .ic svg { width: 22px; height: 22px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---------- the index: tools as a crisp interactive list ---------- */
.index { list-style: none; border-bottom: 1px solid var(--line); }
.index li { --c: var(--ok); border-top: 1px solid var(--line); }
.index .row { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1.3fr) 70px; gap: 20px; align-items: baseline; padding: 24px 16px 22px 0; isolation: isolate; border-radius: var(--r-sm); transition: color .2s; }
.index .row::before { content: ""; position: absolute; inset: 4px 0; border-radius: var(--r); z-index: -1; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform .38s cubic-bezier(.7, 0, .2, 1); }
.index .n, .index .s { font: 500 13px var(--font); color: var(--muted); transition: color .2s; }
.index .n { padding-left: 14px; }
.index .s { text-align: right; }
.index .s.live { color: var(--c); font-weight: 600; }
.index .t { font: 600 clamp(24px, 3.2vw, 38px)/1.08 var(--font-display); letter-spacing: -.03em; transition: color .2s; }
.index .d { color: var(--ink-2); font-size: 15.5px; transition: color .2s; }
.index a.row:hover::before { transform: scaleX(1); }
.index a.row:hover > * { color: #111317; }
.index .soon .t { color: var(--muted); } .index .soon .row { opacity: .78; }
.index .soon .row:hover::before { transform: scaleX(.01); }
@media (max-width: 760px) { .index .row { grid-template-columns: 34px 1fr auto; gap: 12px; padding-right: 10px; } .index .d { display: none; } .index .n { padding-left: 8px; } }

/* ---------- forms ---------- */
textarea, input[type="text"] { width: 100%; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--bg-elevated); color: var(--ink); font: 14.5px/1.6 var(--font); resize: vertical; transition: border-color .15s, background .15s; }
textarea::placeholder, input::placeholder { color: var(--muted); }
textarea:focus, input[type="text"]:focus { outline: none; border-color: var(--accent); }

/* ---------- tables / code ---------- */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
th, td { text-align: left; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); }
th { font: 500 13px var(--font); color: var(--muted); }
tr:last-child td { border-bottom: 0; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--surface); border: 1px solid var(--line); padding: 2px 6px; border-radius: var(--r-sm); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--deep); padding: 48px 0 36px; margin-top: 60px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid h4 { font: 500 13px var(--font); margin-bottom: 14px; color: var(--muted); }
.foot-grid ul { list-style: none; display: grid; gap: 7px; }
.foot-grid a { color: var(--ink-2); font-size: 14px; transition: color .15s; }
.foot-grid a:hover { color: var(--accent); }
.foot-brand img { height: 20px; width: auto; margin-bottom: 12px; }
.foot-brand p { color: var(--muted); font-size: 14px; max-width: 240px; }
.foot-bottom { margin-top: 44px; color: var(--muted); font: 400 13px var(--font); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .x::after { transform: scaleX(1); } }
