/* TrueWit Design System — component styles. Every value comes from tokens.css (generated from tokens.json);
   literals below are source measurements no token holds (15px step padding, 6px bar height, …). */

.tw-glyph { display: block; flex: none; }
.tw-glyph .tw-g-track { fill: var(--gray-20); }
.tw-icon { display: inline-block; flex: none; background-color: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }

/* ---------- Button ---------- */
.tw-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); height: var(--control-xl); padding: var(--space-20); border: 0; border-radius: var(--radius-16); font-family: var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.tw-btn--block { display: flex; width: 100%; }
.tw-btn__icon { display: inline-flex; width: var(--icon-m); height: var(--icon-m); align-items: center; justify-content: center; }
.tw-btn--primary { background: var(--blue-60); color: var(--white); }
.tw-btn--primary:hover { background: var(--blue-50); }
.tw-btn--primary:active { background: var(--blue-70); }
.tw-btn--secondary { background: transparent; color: var(--blue-60); box-shadow: inset 0 0 0 1px var(--blue-60); }
.tw-btn--secondary:active { color: var(--blue-70); box-shadow: inset 0 0 0 1px var(--blue-70); }
.tw-btn--dark { background: var(--gray-100); color: var(--white); }
.tw-btn--dark:active { background: var(--gray-80); }
.tw-btn--lime { height: var(--control-s); padding: 10px var(--space-16); border-radius: var(--radius-8); background: var(--lime-60); color: var(--gray-100); }
.tw-btn:disabled, .tw-btn[aria-disabled="true"] { background: var(--gray-40); color: var(--gray-50); box-shadow: none; cursor: not-allowed; }
.tw-btn:focus-visible, .tw-iconbtn:focus-visible, .tw-wallet:focus-visible, .tw-option:focus-visible, .tw-chip:focus-visible, .tw-plan:focus-visible, .tw-seg__item:focus-visible { outline: 2px solid var(--blue-60); outline-offset: 2px; }

/* ---------- IconButton ---------- */
.tw-iconbtn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: var(--control-m); height: var(--control-m); padding: var(--space-12); border: 0; border-radius: var(--radius-16); color: var(--gray-80); cursor: pointer; flex: none; }
.tw-iconbtn--muted { background: var(--gray-20); }
.tw-iconbtn--white { background: var(--white); }
.tw-iconbtn--white:active { background: var(--gray-20); }

/* ---------- WalletButton ---------- */
.tw-wallet { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: var(--space-6); width: 100%; height: var(--control-xl); border: 0; border-radius: var(--radius-16); background: var(--gray-100); color: var(--white); font-family: Roboto, var(--font-sans); font-weight: 500; cursor: pointer; }
.tw-wallet__lead { font-size: 18px; }
.tw-wallet__mark { display: inline-flex; align-items: center; gap: var(--space-4); }
.tw-wallet__pay { font-size: 22px; }

/* ---------- Quiz ---------- */
.tw-quizheader { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); }
.tw-step { box-sizing: border-box; display: inline-flex; align-items: center; height: var(--control-m); padding: 15px; border-radius: var(--radius-16); background: var(--gray-10); color: var(--gray-80); font-family: var(--font-sans); white-space: nowrap; }
.tw-progress { height: 6px; border-radius: var(--radius-3); background: var(--gray-10); overflow: hidden; }
.tw-progress__fill { height: 100%; border-radius: var(--radius-3); background: var(--blue-60); transition: width .3s ease; }

.tw-art { --art-base: var(--art-orange-base); --art-light: var(--art-orange-light); --art-glow: color-mix(in srgb, var(--art-base) 70%, transparent);
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex: none; color: var(--white);
  background: linear-gradient(180deg, var(--art-base) 59%, var(--art-light) 100%); }
.tw-art--md { width: 118px; height: 118px; border-radius: var(--radius-32); box-shadow: inset 0 0 0 1px var(--white-40), 0 6.44px 12.88px 0 rgba(0,0,0,.08), 0 0 25.76px 0 var(--art-glow); }
.tw-art--lg { width: 180px; height: 180px; border-radius: var(--radius-50); box-shadow: inset 0 0 0 2px var(--white-40), 0 8px 16px 0 rgba(0,0,0,.08), 0 0 32px 0 var(--art-glow); }
.tw-art--violet { --art-base: var(--art-violet-base); --art-light: var(--art-violet-light); }
.tw-art--green { --art-base: var(--art-green-base); --art-light: var(--art-green-light); }
.tw-art--blue { --art-base: var(--art-blue-base); --art-light: var(--art-blue-light); }
.tw-art--lime { --art-base: var(--art-lime-base); --art-light: var(--art-lime-light); --art-glow: rgba(237,255,0,.7); }
.tw-art__glyph { color: var(--white); filter: drop-shadow(0 6px 12px rgba(0,0,0,.16)); }

.tw-question { display: flex; flex-direction: column; gap: var(--space-16); background: var(--white); border-radius: var(--radius-32); font-family: var(--font-sans); }
.tw-question__art { display: flex; align-items: center; justify-content: center; min-height: 186px; }
.tw-question__text { display: flex; flex-direction: column; gap: var(--space-8); }
.tw-question__title { margin: 0; color: var(--gray-100); }
.tw-question__desc { margin: 0; color: var(--gray-50); }
.tw-question--center .tw-question__text { text-align: center; }

.tw-option { box-sizing: border-box; display: flex; align-items: center; gap: var(--space-8); width: 100%; min-height: var(--control-l); padding: var(--space-16); border: 0; border-radius: var(--radius-16); background: var(--gray-10); color: var(--gray-70); font-family: var(--font-sans); text-align: left; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.tw-option--two { min-height: 80px; gap: var(--space-16); }
.tw-option[aria-checked="true"] { background: var(--blue-10); box-shadow: inset 0 0 0 1px var(--blue-20); color: var(--blue-60); }
.tw-option__icon { display: inline-flex; flex: none; color: var(--gray-40); }
.tw-option[aria-checked="true"] .tw-option__icon { color: var(--blue-60); }
.tw-option__body { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: var(--space-4); }
.tw-option__title { display: flex; align-items: center; gap: var(--space-8); }
.tw-option__desc { color: var(--gray-60); }
.tw-option[aria-checked="true"] .tw-option__desc { color: var(--blue-60); }

.tw-check { display: inline-flex; flex: none; width: var(--icon-m); height: var(--icon-m); }
.tw-check--empty { color: var(--gray-20); }
.tw-check--selected, .tw-check--loading { color: var(--blue-60); }
.tw-check--loading .tw-glyph { animation: tw-spin 1s linear infinite; }
@keyframes tw-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tw-check--loading .tw-glyph { animation: none; } }

.tw-chip { box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--space-8); height: var(--control-m); padding: 0 14px 0 var(--space-16); border: 0; border-radius: var(--radius-16); background: var(--gray-10); color: var(--gray-80); font-family: var(--font-sans); white-space: nowrap; cursor: pointer; }
.tw-chip__icon { display: inline-flex; color: var(--gray-40); }
.tw-chip[aria-pressed="true"] { background: var(--blue-10); box-shadow: inset 0 0 0 1px var(--blue-20); color: var(--blue-60); }
.tw-chip[aria-pressed="true"] .tw-chip__icon { color: var(--blue-60); }
.tw-chip--feature { gap: var(--space-6); padding: 14px 14px 14px var(--space-16); color: var(--gray-60); cursor: default; }

.tw-dots { display: inline-flex; align-items: center; gap: var(--space-8); }
.tw-dot { width: 8px; height: 8px; border-radius: var(--radius-4); background: var(--gray-20); transition: width .2s ease; }
.tw-dot--active { width: 24px; background: var(--lime-60); box-shadow: inset 0 0 0 1px var(--white-40); }

/* ---------- Loader ---------- */
.tw-ring { position: relative; flex: none; font-family: var(--font-sans); }
.tw-ring svg { display: block; transform: rotate(-90deg); }
.tw-ring__track { stroke: var(--gray-10); }
.tw-ring__bar { stroke: var(--lime-60); transition: stroke-dashoffset .4s ease; }
.tw-ring__value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--gray-80); }

.tw-status { box-sizing: border-box; display: flex; align-items: center; gap: var(--space-12); min-height: var(--control-l); padding: var(--space-16); border-radius: var(--radius-16); background: var(--gray-10); color: var(--gray-80); font-family: var(--font-sans); }
.tw-status__label { flex: 1; min-width: 0; }
.tw-status__icon { display: inline-flex; flex: none; }

.tw-scrim { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 0 var(--space-16); background: var(--scrim); }
.tw-scrim--contained { position: absolute; }
.tw-sheet { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: var(--space-32); width: 100%; max-width: var(--content-mobile); padding: var(--space-40) var(--space-16) var(--space-16); border-radius: var(--radius-32); background: var(--white); font-family: var(--font-sans); }
.tw-sheet__text { display: flex; flex-direction: column; gap: var(--space-8); width: 100%; text-align: center; }
.tw-sheet__title { margin: 0; color: var(--gray-100); }
.tw-sheet__subtitle { margin: 0; color: var(--gray-50); }
.tw-sheet__list { display: flex; flex-direction: column; gap: var(--space-12); width: 100%; margin: 0; padding: 0; list-style: none; }
.tw-sheet__item { display: flex; align-items: center; gap: var(--space-8); color: var(--gray-80); }
.tw-sheet > .tw-btn { width: 100%; }

/* ---------- Forms ---------- */
.tw-field { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; font-family: var(--font-sans); }
.tw-field__label { color: var(--gray-70); }
.tw-input { box-sizing: border-box; display: flex; align-items: center; gap: 10px; height: var(--control-l); padding: 0 var(--space-16); border-radius: var(--radius-16); background: var(--gray-10); color: var(--gray-80); transition: box-shadow .15s ease; }
.tw-input input { flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font-family: var(--font-sans); caret-color: var(--blue-60); }
.tw-input input::placeholder { color: var(--gray-40); opacity: 1; }
.tw-input__icon { display: inline-flex; flex: none; color: var(--gray-40); }
.tw-input__clear { display: inline-flex; flex: none; padding: 0; border: 0; background: none; color: var(--gray-40); cursor: pointer; }
.tw-input--outline { background: var(--white); box-shadow: inset 0 0 0 1px var(--gray-20); }
.tw-input:focus-within, .tw-input--focused { box-shadow: inset 0 0 0 1px var(--blue-60), 0 0 0 4px var(--blue-20); }
.tw-input--error, .tw-input--error:focus-within { color: var(--red); box-shadow: inset 0 0 0 1px var(--red), 0 0 0 4px var(--red-soft); }
.tw-field__message { color: var(--gray-60); }
.tw-field__message--error { color: var(--red); }

.tw-seg { box-sizing: border-box; display: flex; gap: var(--space-4); height: var(--control-m); padding: var(--space-4); border-radius: var(--radius-16); background: var(--gray-10); font-family: var(--font-sans); }
.tw-seg__item { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: var(--space-4); padding: 7px var(--space-12); border: 0; border-radius: var(--radius-12); background: transparent; color: var(--gray-60); font-family: var(--font-sans); cursor: pointer; }
.tw-seg__item[aria-selected="true"] { background: var(--white); color: var(--gray-80); }
.tw-seg__icon { display: inline-flex; }

/* ---------- Paywall ---------- */
.tw-tag { box-sizing: border-box; display: inline-flex; align-items: center; flex: none; white-space: nowrap; font-family: var(--font-sans); }
.tw-tag--neutral { padding: 3px 11px; border: 1px solid transparent; border-radius: var(--radius-16); color: var(--gray-70);
  background: linear-gradient(var(--gray-10), var(--gray-10)) padding-box, linear-gradient(180deg, var(--gray-10), var(--white)) border-box; }
.tw-tag--glass { padding: 3px 11px; border: 1px solid transparent; border-radius: var(--radius-16); color: var(--gray-70);
  background: linear-gradient(var(--white-60), var(--white-60)) padding-box, linear-gradient(180deg, var(--gray-10), var(--white)) border-box; }
.tw-tag--recommend { padding: 0 var(--space-4); border-radius: var(--radius-12); background: var(--blue-20); color: var(--blue-60); text-transform: uppercase; }
.tw-tag--sale { padding: var(--space-2) var(--space-4); border-radius: var(--radius-12); background: var(--lime-60); color: var(--lime-100); }
.tw-tag--trial { padding: var(--space-4) 10px; border-radius: var(--radius-12); background: var(--white); color: var(--lime-100); }

.tw-plan { box-sizing: border-box; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-16); background: var(--gray-10); color: var(--gray-70); font-family: var(--font-sans); text-align: left; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.tw-plan__row { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--control-l); padding: var(--space-16); }
.tw-plan[aria-checked="true"] { background: var(--white); box-shadow: inset 0 0 0 1px var(--lime-60), 0 0 0 4px var(--lime-20); color: var(--lime-100); }
.tw-plan--best { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-8) var(--space-4) var(--space-4); }
.tw-plan--best[aria-checked="true"] { background: var(--lime-60); box-shadow: 0 0 0 4px var(--lime-20); }
.tw-plan__banner { display: flex; align-items: center; justify-content: center; gap: var(--space-4); text-transform: uppercase; }
.tw-plan__inner { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-16); border-radius: var(--radius-12); background: var(--white); }
.tw-plan__col { display: flex; flex-direction: column; }
.tw-plan__col--end { align-items: flex-end; text-align: right; }
.tw-plan__name { display: flex; align-items: center; gap: var(--space-4); }
.tw-plan__sub, .tw-plan__old { color: var(--lime-80); }

.tw-benefit { display: flex; align-items: flex-start; gap: var(--space-8); font-family: var(--font-sans); }
.tw-benefit__icon { display: inline-flex; flex: none; padding-top: var(--space-2); }
.tw-benefit__text { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-2) 0; }
.tw-benefit__title { color: var(--gray-80); }
.tw-benefit__subtitle { color: var(--gray-50); }

.tw-timer { box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--space-8); height: var(--control-m); padding: var(--space-12) var(--space-16) var(--space-12) var(--space-12); border-radius: var(--radius-16); background: var(--gray-20); color: var(--gray-70); font-family: var(--font-sans); font-variant-numeric: tabular-nums; }

.tw-rating { box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--space-8); height: 32px; padding: 3px var(--space-16) 3px 3px; border: 1px solid transparent; border-radius: var(--radius-16); font-family: var(--font-sans); white-space: nowrap;
  background: linear-gradient(var(--white-60), var(--white-60)) padding-box, linear-gradient(180deg, var(--gray-10), var(--white)) border-box; -webkit-backdrop-filter: blur(var(--blur-nav)); backdrop-filter: blur(var(--blur-nav)); }
.tw-rating__score { display: inline-flex; align-items: center; gap: var(--space-4); height: 24px; padding: var(--space-4) var(--space-8) var(--space-4) var(--space-4); box-sizing: border-box; border-radius: var(--radius-16); background: var(--gray-10); color: var(--gray-70); }
.tw-rating__score .tw-glyph { color: var(--orange); }
.tw-rating__label { color: var(--gray-70); }
.tw-rating__text { color: var(--gray-40); }
.tw-rating-inline { display: inline-flex; align-items: center; gap: var(--space-8); font-family: var(--font-sans); white-space: nowrap; }
.tw-rating-inline__score { display: inline-flex; align-items: center; gap: var(--space-4); color: var(--orange); }
.tw-rating-inline__sep { width: 4px; height: 4px; border-radius: var(--radius-3); background: var(--gray-30); }
.tw-rating-inline__text { color: var(--gray-80); }

/* ---------- Checkout ---------- */
.tw-summary { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-12) var(--space-16) 10px; border-radius: var(--radius-16); background: var(--lime-20); color: var(--gray-80); font-family: var(--font-sans); }
.tw-summary__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); }
.tw-summary__col { display: flex; flex-direction: column; }
.tw-summary__col--end { align-items: flex-end; text-align: right; }
.tw-summary__muted { color: var(--lime-80); }
.tw-summary__divider { height: 1px; background: var(--lime-80); opacity: .16; }
.tw-summary__due { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-8); }

.tw-trial { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-16); border-radius: var(--radius-16); background: var(--lime-20); font-family: var(--font-sans); }
.tw-trial__head { display: flex; align-items: center; justify-content: space-between; }
.tw-trial__plan { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.tw-trial__price { display: flex; flex-direction: column; align-items: flex-end; color: var(--gray-100); }
.tw-trial__muted { color: var(--lime-90); }
.tw-trial__divider { height: 1px; background: var(--lime-80); opacity: .16; }
.tw-trial__steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.tw-trial__step { display: flex; gap: var(--space-12); }
.tw-trial__rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 24px; }
.tw-trial__dot { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--radius-full); background: var(--white); box-shadow: inset 0 0 0 2px var(--lime-60); color: var(--white); }
.tw-trial__step--done .tw-trial__dot { background: var(--blue-60); box-shadow: none; }
.tw-trial__line { flex: 1; width: 2px; min-height: 12px; background: var(--lime-60); }
.tw-trial__step--done .tw-trial__line { background: var(--blue-60); }
.tw-trial__texts { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-2) 0 var(--space-16); }
.tw-trial__step:last-child .tw-trial__texts { padding-bottom: var(--space-2); }
.tw-trial__title { color: var(--lime-100); }
.tw-trial__sub { color: var(--lime-80); }

.tw-legal { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-16); border-radius: var(--radius-16); background: var(--gray-10); color: var(--gray-60); font-family: var(--font-sans); }
.tw-legal p { margin: 0; }
.tw-legal a { color: inherit; }

.tw-secure { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-6); color: var(--gray-50); font-family: var(--font-sans); }

.tw-footer { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: var(--space-12); padding: var(--space-16) var(--space-16) var(--space-32); background: var(--white); box-shadow: var(--shadow-bottom-panel); }
.tw-footer > .tw-btn, .tw-footer > .tw-wallet { width: 100%; }
.tw-footer--fixed { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; }

/* ---------- Landing ---------- */
.tw-siteheader { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); height: 60px; padding: var(--space-8) var(--space-8) var(--space-8) 14px; border-radius: var(--radius-16); background: var(--white-60); -webkit-backdrop-filter: blur(var(--blur-nav)); backdrop-filter: blur(var(--blur-nav)); font-family: var(--font-sans); }
.tw-siteheader__logo { display: inline-flex; align-items: center; height: 36px; }
.tw-siteheader__logo img { display: block; height: 36px; width: auto; }
