@font-face {
  font-family: "Bowlby One";
  src: url("fonts/BowlbyOne-Regular.woff2?v=nut33b") format("woff2");
  font-weight: 400;
  font-display: optional;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular-Latin1.woff2?v=nut33b") format("woff2");
  font-weight: 400;
  font-display: optional;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Medium-Latin1.woff2?v=nut33b") format("woff2");
  font-weight: 500 700;
  font-display: optional;
}

:root {
  --bg: #f6f3ec;
  --surface: #fffdf6;
  --surface-2: #ebe6d8;
  --text: #1a1a1a;
  --muted: #5a5448;
  --border: #cfc8b8;
  --accent: #ff8a3d;
  --accent-text: #1a1a1a;
  /* Mực cam (NUT-149): chữ, link, viền control và nét dữ liệu mảnh cần >= 3:1 trên nền giấy; #ff8a3d chỉ dùng làm mảng màu. */
  --accent-ink: #b8400f;
  --accent-soft: #f6f3ec;
  --link: var(--accent-ink);
  --focus: var(--accent-ink);
  --high-bg: #dff0e5;
  --high-fg: #11502f;
  --med-bg: #f7ebcb;
  --med-fg: #644505;
  --low-bg: #f6dfda;
  --low-fg: #86281a;
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.06), 0 8px 24px rgba(26, 26, 26, 0.06);
  --shadow-lg: 0 2px 4px rgba(26, 26, 26, 0.05), 0 24px 60px rgba(255, 138, 61, 0.16);
  --glass: rgba(255, 253, 246, 0.74);
  --glass-strong: rgba(246, 243, 236, 0.86);
  --glass-border: rgba(26, 26, 26, 0.16);
  --glow: rgba(255, 138, 61, 0.18);
  --glow-2: rgba(255, 138, 61, 0.12);
  --band: #ff8a3d;
  --bezel: #1a1a1a;
  --grad-btn: linear-gradient(#ff8a3d, #ff8a3d);
  --serif: "Bowlby One", "Arial Black", Impact, sans-serif;
  --sans: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-synthesis: none;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2.1rem, 7.5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  /* NUT-169: cùng khung với seo.css và landing.css (--maxw 1120px, lề 16px) để header và nội dung trang chính sách thẳng mép với mọi trang khác. */
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 8px;
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.brand svg {
  width: 30px;
  height: 30px;
  flex: none;
}

.logo-bg {
  fill: #1a1a1a;
}

.logo-plate {
  fill: #ff8a3d;
}

.logo-stroke {
  fill: none;
  stroke: #7cf08a;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:not(.btn) {
  color: var(--text);
  text-decoration: none;
  padding: 8px 2px;
  font-size: 0.95rem;
}

.nav-links a:not(.btn):hover {
  text-decoration: underline;
}

.nav-links .menu {
  display: none;
}

.nav-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  content: "\25BE";
  margin-left: 4px;
}

.nav-menu ul {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 60;
  min-width: 200px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 4px;
}

.nav-menu ul a {
  display: block;
  padding: 12px 10px;
}

/* Cùng breakpoint với landing.css và seo.css: dưới 800px 4 link gộp vào menu <details>, nút Get started free không xuống dòng. */
@media (max-width: 800px) {
  .nav-links .opt {
    display: none;
  }
  .nav-links .menu {
    display: list-item;
  }
  .nav .btn.small {
    padding: 0 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* Dưới 480px không đủ chỗ cho chữ Remembite, menu và nút Get started free trên một hàng: chỉ giữ logo (link vẫn có aria-label). */
@media (max-width: 480px) {
  .nav .brand {
    gap: 0;
    font-size: 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 4px;
  border: 3px solid var(--text);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--text);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn.ghost {
  background: transparent;
  color: var(--link);
  border-color: var(--muted);
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: var(--link);
  transform: none;
}

.btn.small {
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.8rem;
  line-height: 1.15;
  box-shadow: 3px 3px 0 var(--text);
}

.hero {
  padding-block: 40px 56px;
  display: grid;
  gap: 40px;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    padding-block: 72px 80px;
    gap: 56px;
  }
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px;
}

.hero .btn {
  min-height: 50px;
  padding: 0 26px;
  font-size: 1rem;
}

.fine {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 6px;
}

.bubble {
  max-width: 92%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 0.97rem;
  line-height: 1.45;
  margin: 0;
}

.bubble.me {
  justify-self: end;
  background: var(--accent);
  color: var(--accent-text);
  border-bottom-right-radius: 6px;
}

.bubble.ai {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}

.result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.kcal {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 600;
}

.kcal small {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}

.rows {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  font-size: 0.92rem;
}

.rows li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
}

.rows .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}

.source {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 10px 0 0;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge.high {
  background: var(--high-bg);
  color: var(--high-fg);
}

.badge.medium {
  background: var(--med-bg);
  color: var(--med-fg);
}

.badge.low {
  background: var(--low-bg);
  color: var(--low-fg);
}

.section {
  padding-block: 56px;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 32px;
}

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

@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--link);
  font-weight: 700;
  margin-bottom: 12px;
}

.steps h3 {
  margin-bottom: 0.4em;
}

.faq {
  max-width: 46rem;
}

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

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

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 18px;
  color: var(--muted);
}

.pricing {
  max-width: 40rem;
}

.pricing p {
  font-size: 1.1rem;
}

.signup {
  max-width: 34rem;
}

.field {
  margin-bottom: 18px;
  border: 0;
  padding: 0;
  min-width: 0;
}

.field label,
.field legend {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  padding: 0;
}

input[type="email"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  min-height: 46px;
}

input[type="email"]:hover,
select:hover,
textarea:hover {
  border-color: var(--muted);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

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

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
}

.choice input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent-ink);
  color: var(--link);
  font-weight: 600;
}

.choice input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--accent-ink);
}

.status {
  margin-top: 14px;
  min-height: 1.5em;
  font-weight: 600;
}

.status.ok {
  color: var(--high-fg);
}

.status.err {
  color: var(--low-fg);
}

.counter {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.totals {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.totals-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.totals .kcal {
  font-size: 2.4rem;
}

.macros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: 8px 12px;
  margin: 14px 0 0;
  padding: 0;
}

.macros div {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 8px 12px;
}

.macros dt {
  font-size: 0.78rem;
  color: var(--muted);
}

.macros dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.totals.partial .kcal {
  font-size: 1.6rem;
}

.totals .notice {
  margin: 12px 0 0;
}

.totals .range {
  margin: 6px 0 0;
  color: var(--muted);
}

.next {
  margin-bottom: 16px;
}

.next h3 {
  font-family: var(--sans);
  font-size: 1.02rem;
  margin: 0 0 8px;
}

.next-actions,
.item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.item-actions {
  margin-top: 12px;
}

.next-links {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.notice .btn {
  margin-top: 8px;
}

.item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.item h3 {
  font-family: var(--sans);
  font-size: 1.02rem;
  margin: 0;
}

.item .typed {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 2px 0 0;
}

.item .nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 10px 0 0;
  font-variant-numeric: tabular-nums;
}

.item .nums strong {
  font-size: 1.1rem;
}

.small-print {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 8px 0 0;
}

.small-print ul {
  margin: 0;
  padding-left: 1.1em;
}

.question {
  margin: 14px 0 0;
  padding: 14px;
  border: 1.5px solid var(--accent-ink);
  border-radius: 12px;
  background: var(--accent-soft);
}

.question.secondary {
  border-color: var(--border);
  background: var(--surface-2);
}

.question legend {
  font-weight: 600;
  padding: 0 6px;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.option {
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--accent-ink);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
}

.option:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-text);
}

.option:disabled {
  opacity: 0.6;
  cursor: progress;
}

.option small {
  display: block;
  color: inherit;
  opacity: 0.8;
}

.notice {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--low-bg);
  color: var(--low-fg);
  font-weight: 600;
}

.prose {
  padding-block: 48px 72px;
}

.prose > * {
  max-width: 40rem;
}

/* NUT-137: mục lục "On this page" của trang chính sách: một khối kẻ trên/dưới, link xếp hàng như footer, mỗi link cao >= 24px. */
.toc {
  border-block: 1px solid var(--border);
  padding-block: 12px 8px;
  margin: 0 0 32px;
  font-size: 0.875rem;
}

.toc-h {
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 4px;
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc a {
  display: inline-block;
  padding-block: 4px;
}

/* NUT-148: trang chính sách dài (16+ mục): khoảng trên h2 lớn hơn khoảng dưới để mỗi tiêu đề dính với đoạn của nó.
   Chỉ privacy, terms, consumer-health-data nạp styles.css (trang SEO dùng seo.css), nên không chạm trang khác. */
.prose > h2 {
  margin-top: 48px;
  text-wrap: balance;
}

/* NUT-137: bảng trong trang chính sách; dưới 640px mỗi hàng thành một khối, nhãn cột lấy từ data-label.
   NUT-169: bảng và mục lục tràn hết khung; đoạn văn giữ 40rem, thẳng mép trái. */
.prose > .policy-table,
.prose > .toc {
  max-width: none;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.policy-table th,
.policy-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-top: 1px solid var(--border);
}

.policy-table thead th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.875rem;
  border-top: 0;
  padding-block: 0 8px;
}

.policy-table tbody td:first-child {
  font-weight: 600;
  width: 24%;
}

.policy-table tbody tr:last-child td {
  border-bottom: 1px solid var(--border);
}

@media (max-width: 639px) {
  .policy-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .policy-table,
  .policy-table tbody,
  .policy-table tr,
  .policy-table td {
    display: block;
    width: 100%;
  }

  .policy-table tr {
    border-top: 1px solid var(--border);
    padding-block: 12px;
  }

  .policy-table tbody tr:last-child {
    border-bottom: 1px solid var(--border);
  }

  .policy-table td,
  .policy-table tbody tr:last-child td {
    border: 0;
    padding: 0 0 8px;
  }

  .policy-table tbody td:first-child {
    width: 100%;
    font-weight: 600;
  }

  .policy-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 32px 48px;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.footer-links a {
  color: var(--text);
  display: inline-block;
  padding: 6px 0;
}

.site-footer p {
  max-width: 46rem;
  margin: 0 0 0.6em;
}

/* Landing (NUT-24). Quy ước: mọi trạng thái ẩn để chờ animation đều nằm dưới `.js`; không có lớp này nội dung hiện đủ. */
.landing main {
  position: relative;
  overflow-x: clip;
}

.landing .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 0;
}

.nav-bg {
  position: absolute;
  inset: 0;
  background: var(--glass-strong);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}

.js .nav-bg {
  opacity: 0;
}

.landing .nav {
  position: relative;
}

.progress {
  display: none;
}

.js .progress {
  display: block;
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent-ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.landing .btn:not(.ghost) {
  background-image: var(--grad-btn);
}

.landing .btn:hover {
  box-shadow: 2px 2px 0 var(--text);
}

.js .magnetic,
.js .tilt {
  will-change: transform;
}

.js [data-hero] {
  opacity: 0;
}

.js #hero-title {
  visibility: hidden;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
}

.hero-bg {
  position: absolute;
  inset: -5rem 0 auto 0;
  height: 51rem;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
}

.js .blob {
  will-change: transform;
}

.blob.b1 {
  width: 44rem;
  height: 44rem;
  right: -14rem;
  top: -18rem;
  background: radial-gradient(closest-side, var(--glow), transparent);
}

.blob.b2 {
  width: 34rem;
  height: 34rem;
  left: -12rem;
  top: 6rem;
  background: radial-gradient(closest-side, var(--glow-2), transparent);
}

.landing .hero {
  position: relative;
}

#hero-title {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hl-mask {
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.chat {
  max-width: 32rem;
  margin-inline: auto;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.chat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.chat-lights i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--border);
}

.chat-title {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.chat-pause {
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-pause:hover {
  border-color: var(--link);
}

.chat-body {
  display: grid;
  padding: 16px;
}

.js .chat-body {
  height: 31rem;
  overflow: hidden;
}

.thread {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.bubble.photo {
  display: grid;
  gap: 6px;
  width: 78%;
  padding: 6px;
}

.meal-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 13px;
}

.photo-say {
  padding: 0 8px 4px;
}

.seen p {
  margin: 0;
}

.seen .rows {
  margin-top: 6px;
}

.seen .rows li span:first-child {
  min-width: 0;
}

.seen .fine {
  margin-top: 8px;
  font-size: 0.78rem;
}

.q-from {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px dashed var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--muted);
}

.tool code {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--link);
}

.tool-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-ink);
}

.result-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ring {
  position: relative;
  flex: none;
  width: 70px;
  margin: 0;
  text-align: center;
}

.ring.small {
  width: 56px;
}

.ring svg {
  display: block;
  width: 100%;
  height: auto;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
}

.ring-track {
  stroke: var(--border);
}

.ring-fill {
  stroke: var(--accent-ink);
}

.ring figcaption {
  font-size: 0.7rem;
  color: var(--muted);
}

.stage {
  display: grid;
  gap: 28px;
  max-width: 32rem;
  margin-inline: auto;
}

.js .stage > * {
  grid-area: 1 / 1;
}

.js .phone-wrap {
  align-self: center;
  visibility: hidden;
  opacity: 0;
}

.phone-wrap {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.phone.hero-phone {
  width: min(100%, 280px);
  height: 27.5rem;
}

.today-screen {
  display: grid;
  gap: 10px;
  align-content: start;
  height: 100%;
  padding: 34px 12px 12px;
  font-size: 0.85rem;
}

.meals li {
  position: relative;
  align-items: center;
  isolation: isolate;
  padding: 6px;
}

.meals li > span:first-of-type {
  display: grid;
  line-height: 1.25;
}

.meals small {
  color: var(--muted);
  font-size: 0.72rem;
}

.row-flash {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 8px;
  background: var(--accent-soft);
  opacity: 0;
}

.week {
  margin: 0;
}

.week svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--muted);
}

.week .bar {
  fill: var(--band);
}

.week .bar.today {
  fill: var(--accent-ink);
}

.week text {
  font-family: var(--sans);
  font-size: 7px;
  fill: var(--muted);
}

.week figcaption {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.72rem;
}

.stage-close {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.stage-ctl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 32rem;
  margin: 14px auto 0;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.flow b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 4px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.72rem;
}

.flow li.on {
  color: var(--text);
}

.flow li.on b {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.hero-visual .size-opt .pick {
  opacity: 1;
}

.js .hero-visual .size-opt .pick {
  opacity: 0;
}

.feature {
  display: grid;
  gap: 24px;
  align-items: center;
  padding-block: 28px;
}

@media (min-width: 860px) {
  .feature {
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
    padding-block: 40px;
  }

  .feature.flip {
    grid-template-columns: 1.1fr 1fr;
  }

  .feature.flip .feature-text {
    order: 2;
  }
}

.feature-text {
  min-width: 0;
}

.feature-text h3 {
  font-size: clamp(1.4rem, 3.2vw, 1.8rem);
}

.feature-text p {
  max-width: 30rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.card {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.card h4 {
  margin: 0 0 0.4em;
  font-size: 1.05rem;
}

.trace-head,
.memory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.has-tip {
  position: relative;
}

.num-btn {
  margin: -4px -6px;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: help;
}

.num-btn:hover {
  background: var(--accent-soft);
}

.num-btn small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
}

.tip {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.js .tip {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(17rem, 78vw);
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
}

.js .tip::before {
  content: "";
  position: absolute;
  inset: -10px 0 auto 0;
  height: 10px;
}

.trace-rows .tip {
  left: auto;
  right: 0;
}

.range {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 6px;
}

.range-track {
  fill: var(--border);
}

.range-band {
  fill: var(--band);
}

.range-dot {
  fill: var(--accent-ink);
}

.trace-rows {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.trace-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.trace-rows .range,
.trace-rows .src {
  grid-column: 1 / -1;
}

html:not(.js) .trace-rows .has-tip {
  display: contents;
}

html:not(.js) .trace-rows .tip {
  grid-column: 1 / -1;
}

.trace-name {
  min-width: 0;
}

.trace-rows .num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.src {
  justify-self: start;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.memory-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.mem-rows {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mem-chip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--accent-soft);
}

.mem-chip .num {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.mem-total {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mem-say {
  margin: 12px 0;
  color: var(--muted);
}

.mem-say q {
  color: var(--text);
  font-weight: 600;
}

.mem-saved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.mem-saved .fine {
  margin: 0;
}

.pill {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.82rem;
}

.how-stage {
  display: grid;
  gap: 32px;
  align-items: center;
}

.how-stage .steps {
  grid-template-columns: 1fr;
  gap: 22px;
}

.how-stage .steps li {
  position: relative;
  isolation: isolate;
}

.how-stage .steps li::before {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--glass-border);
}

.step-hl {
  position: absolute;
  inset: -12px -16px;
  z-index: -1;
  border-radius: 16px;
  background: var(--accent-soft);
  opacity: 0;
}

@media (min-width: 860px) {
  .how-stage {
    grid-template-columns: 1fr minmax(260px, 320px);
    gap: 72px;
  }
}

@media (min-width: 860px) and (min-height: 640px) {
  .js .how-pin {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - 96px);
  }
}

.phone {
  position: relative;
  width: min(100%, 300px);
  height: clamp(400px, 56svh, 460px);
  justify-self: center;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 40px;
  background: var(--bezel);
  box-shadow: var(--shadow-lg);
}

.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  z-index: 3;
  width: 86px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 0 0 14px 14px;
  background: var(--bezel);
}

.screens {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 31px;
  background: var(--bg);
}

.screen {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 34px 12px 12px;
  font-size: 0.85rem;
}

.screen:not([data-screen="see"]) {
  display: none;
}

.js .screen {
  display: grid;
  visibility: hidden;
  opacity: 0;
}

.screen .bubble {
  max-width: 88%;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.app-bar {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
}

.list-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.app-logo {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--serif);
  font-weight: 700;
}

.list-text {
  display: grid;
  flex: 1;
  line-height: 1.25;
  font-size: 0.85rem;
}

.list-text small {
  color: var(--muted);
  font-size: 0.72rem;
}

.pill-btn {
  display: inline-grid;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--accent-ink);
  background: var(--surface);
  color: var(--link);
  font-size: 0.78rem;
  font-weight: 600;
}

.pill-btn.solid {
  background: var(--accent);
  color: var(--accent-text);
  text-align: center;
}

.pb-a,
.pb-b {
  grid-area: 1 / 1;
  text-align: center;
}

.pb-b {
  opacity: 0;
}

.sheet {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 8px;
  padding: 14px 14px 16px;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.1);
}

.sheet-title {
  margin: 0;
  font-weight: 700;
}

.perm {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.82rem;
}

.q-card {
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--accent-ink);
  background: var(--accent-soft);
}

.q-card .q {
  margin: 0 0 8px;
  font-weight: 600;
}

.q-card .fine {
  margin: 8px 0 0;
  font-size: 0.74rem;
}

.opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.size-opt {
  position: relative;
  display: grid;
  padding: 7px 4px;
  border-radius: 10px;
  border: 1.5px solid var(--accent-ink);
  background: var(--surface);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
}

.size-opt small,
.pick small {
  font-weight: 400;
  font-size: 0.68rem;
}

.size-opt small {
  color: var(--muted);
}

.size-opt .pick small {
  color: inherit;
}

.pick {
  position: absolute;
  inset: -1.5px;
  display: grid;
  align-content: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-style: normal;
  opacity: 0;
}

.day-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.day-top .fine {
  margin: 0;
  font-size: 0.74rem;
}

.day-rows {
  margin: 0;
}

.day-rows li {
  position: relative;
  padding-inline: 4px;
}

.faq-body {
  overflow: hidden;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.status-row .status {
  margin: 0;
}

.tick {
  display: none;
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--high-fg);
}

.status-row:has(.status.ok) .tick {
  display: inline-flex;
}

.tick svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tick circle,
.tick path {
  stroke-dasharray: 1;
}

/* ===== NUT-171: trang chính sách dùng template 2 cột như trang nội dung (seo.css khối NUT-171, .jc-docs/design/NUT-171/design.md).
   < 1024 px: một cột như cũ (mục lục ngang đầu bài). >= 1024 px: bài trái 1fr, cột phải 26rem dính: mục lục dọc, ảnh Account, CTA. */
.prose .article > * {
  max-width: 40rem;
}

.prose .article > h2 {
  margin-top: 48px;
  text-wrap: balance;
}

.prose .article > .policy-table,
.prose .article > .toc {
  max-width: none;
}

.doc-rail {
  display: none;
}

@media (min-width: 1024px) {
  .prose > .doc {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(22rem, 30vw, 26rem);
    column-gap: 48px;
  }
  .doc > .article {
    grid-area: 1 / 1;
    align-self: start;
  }
  .doc-rail {
    grid-area: 1 / 2;
    display: block;
  }
  .doc .article > .toc {
    display: none;
  }
  .rail-in {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-height: calc(100vh - 104px);
  }
  .doc-rail .toc {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin: -12px;
    padding: 12px 12px 12px 28px;
    border: 0;
    border-left: 1px solid var(--border);
    font-size: 0.82rem;
  }
  .doc-rail .toc-h {
    color: var(--accent-ink);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .doc-rail .toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .doc-rail .toc li + li a {
    border-top: 1px solid var(--border);
  }
  .doc-rail .toc a {
    position: relative;
    display: block;
    min-height: 24px;
    padding: 8px 0;
    color: var(--text);
    text-decoration: none;
    line-height: 1.4;
  }
  .doc-rail .toc a:hover {
    text-decoration: underline;
  }
  .doc-rail .toc a[aria-current] {
    font-weight: 500;
  }
  .doc-rail .toc a[aria-current]::after {
    content: "";
    position: absolute;
    left: -18px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--accent);
  }
  .rail-shot {
    flex: none;
    margin: 0;
  }
  /* NUT-171 vòng 2: ảnh Account cắt 4:5, khung như clip của seo.css (viền mực 2px, bo 12px, bóng cứng 4px), chữ trong ảnh đọc được. */
  .rail-shot img {
    display: block;
    width: min(100%, calc((100vh - 284px) * 0.8));
    height: auto;
    aspect-ratio: 4 / 5;
    background: var(--surface);
    border: 2px solid var(--text);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--text);
  }
  .doc.tall .doc-rail > .toc {
    margin-bottom: 20px;
  }
  .rail-shot figcaption {
    margin-top: 12px;
    font-size: 0.82rem;
  }
  .rail-shot .tag {
    padding: 1px 6px;
    margin-right: 6px;
    border: 1px solid var(--text);
    border-radius: 4px;
    background: var(--surface-2);
    font-size: 0.75rem;
    font-weight: 500;
  }
  .rail-cta {
    flex: none;
    display: grid;
    gap: 12px;
    justify-items: start;
    padding-top: 16px;
    border-top: 1px dashed var(--muted);
  }
  .rail-cta p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
  }
}
