/* Tủ Xanh introduction (company/tu-xanh-page.ts). The app's own visual language, "the inside of the
   fridge" (the app's docs/DESIGN.md): a pale green canvas, a fridge panel whose sections are shelves,
   rails with a top edge, and price tags in one colour per meaning. Flat: no gradients or shadows. */

.tx {
  --tx-canvas: #edf1eb;
  --tx-panel: #fafcf9;
  --tx-line: #d3ddd6;
  --tx-rail: #e1e9e3;
  --tx-rail-edge: #c5d2ca;
  --tx-crisper: #e6eee8;
  --tx-handle: #b5c4ba;
  --tx-ink: #16211b;
  --tx-text: #3f4e46;
  --tx-muted: #4f5f56;
  --tx-dark: #2b3a32;
  --tx-red: #cc3a24;
  --tx-red-text: #bf2f1b;
  --tx-amber: #ffe7b0;
  --tx-amber-text: #7a4600;
  --tx-head: 1.16;
  margin-top: calc(-1 * var(--header));
  padding-top: var(--header);
  background: var(--tx-canvas);
  color: var(--tx-ink);
  overflow-x: clip;
}
html[lang="vi"] .tx {
  /* room for stacked tone marks above and below the line */
  --tx-head: 1.22;
}
html[lang="ko"] .tx {
  --tx-head: 1.26;
}
html[lang="ko"] .tx :is(h1, h2, p, li, summary, figcaption) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.tx :focus-visible {
  outline: 2px solid var(--tx-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.tx-wrap {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

/* Hero: one sentence and the fridge itself, large */
.tx-hero {
  padding-block: 28px 56px;
}
.tx-hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
.tx-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.tx-name .product-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
}
.tx h1 {
  margin: 24px 0 20px;
  max-width: 12em;
  font-size: clamp(36px, 3.6vw + 20px, 68px);
  line-height: var(--tx-head);
  letter-spacing: -0.032em;
  font-weight: 700;
  text-wrap: balance;
}
html[lang="ko"] .tx h1,
html[lang="ko"] .tx h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
}
.tx-lead {
  max-width: 30em;
  font-size: clamp(17px, 0.5vw + 15px, 20px);
  line-height: 1.7;
  color: var(--tx-text);
}
.tx .tx-stores {
  margin-top: 28px;
}
.tx .store-soon {
  opacity: 1;
  color: var(--tx-dark);
  border: 1px dashed #93a59a;
  font-size: 14px;
  padding: 9px 16px;
}
.tx .store-button {
  --sb-bg: var(--tx-ink);
}
.tx-langs {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tx-muted);
}

/* A simple device frame around the real screen */
.tx-screen {
  margin: 0;
  justify-self: center;
  width: min(330px, 100%);
}
.tx-hero-screen {
  width: min(390px, 100%);
}
.tx-device {
  padding: 8px;
  border-radius: 46px;
  background: var(--tx-ink);
}
.tx-device img {
  width: 100%;
  border-radius: 38px;
  background: var(--tx-canvas);
}
.tx-screen figcaption,
.tx-family figcaption,
.tx-notice-wrap figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--tx-muted);
}

/* The fridge: sections are its shelves, each ending on a rail */
.tx-fridge {
  padding: 0 20px 20px;
  border: 1px solid var(--tx-line);
  border-radius: 30px;
  background: var(--tx-panel);
}
.tx-step {
  display: grid;
  gap: 36px;
  padding-top: 48px;
}
.tx-step::after {
  content: "";
  height: 14px;
  margin-top: 12px;
  border-top: 2px solid var(--tx-rail-edge);
  border-radius: 12px;
  background: var(--tx-rail);
}
.tx h2 {
  margin-bottom: 18px;
  max-width: 15em;
  font-size: clamp(27px, 1.6vw + 20px, 44px);
  line-height: var(--tx-head);
  letter-spacing: -0.026em;
  font-weight: 700;
  text-wrap: balance;
}
.tx-step-copy p,
.tx-dates p {
  max-width: 33em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--tx-text);
}
.tx-step-copy p + p {
  margin-top: 14px;
}
.tx-step-visual {
  display: grid;
  justify-items: center;
}

/* Shelves drawn in HTML: food standing above its tag on a rail */
.tx-shelves {
  display: grid;
  gap: 16px;
  max-width: 360px;
  margin-top: 32px;
}
.tx-shelf-title {
  margin-bottom: 2px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 800;
  color: var(--tx-dark);
}
.tx-shelf--today .tx-shelf-title {
  color: var(--tx-red-text);
}
.tx-shelf--soon .tx-shelf-title {
  color: var(--tx-amber-text);
}
.tx-rail {
  position: relative;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0 6px 5px;
  list-style: none;
}
/* the rail runs from just above the tags to below them; every tag on a rail is as tall as the tallest */
.tx-rail::before {
  content: "";
  position: absolute;
  inset: 55px 0 0;
  border-top: 2px solid var(--tx-rail-edge);
  border-radius: 12px;
  background: var(--tx-rail);
}
.tx-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 1 88px;
  min-width: 0;
}
.tx-food {
  width: 56px;
  height: 56px;
}
.tx-tag {
  display: grid;
  flex: 1;
  align-content: center;
  width: 100%;
  min-height: 44px;
  padding: 5px 6px;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  line-height: 17px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.tx-tag > span {
  font-weight: 700;
}
.tx-tag > b {
  font-weight: 700;
  color: var(--tx-muted);
}
.tx-tag--today {
  background: var(--tx-red);
  color: #fff;
}
.tx-tag--today > b {
  color: #fff;
  font-weight: 800;
}
.tx-tag--soon {
  background: var(--tx-amber);
}
.tx-tag--soon > b {
  color: var(--tx-amber-text);
  font-weight: 800;
}

/* The morning notice, as a page of a day calendar */
.tx-notice-wrap {
  width: min(460px, 100%);
  margin: 0;
  padding: 24px 16px 20px;
  border-radius: 28px;
  background: var(--tx-canvas);
}
.tx-notice-when {
  margin: 0 4px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--tx-dark);
}
.tx-notice {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--tx-line);
  border-radius: 22px;
  background: #fff;
}
.tx-day {
  display: flex;
  flex: none;
  flex-direction: column;
  justify-content: space-between;
  width: 64px;
  font-size: 13px;
  font-weight: 700;
  line-height: 17px;
}
.tx-day-n {
  font-size: 52px;
  line-height: 56px;
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.tx-notice-text {
  flex: 1;
  min-width: 0;
  padding-left: 14px;
  border-left: 2px solid var(--tx-ink);
  font-size: 15px;
  line-height: 21px;
}
.tx-notice-app {
  display: flex;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--tx-muted);
}
.tx-notice-app img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}
.tx-notice-app span:first-of-type {
  font-weight: 700;
}
.tx-notice-clock {
  margin-left: auto;
}
.tx-notice-title {
  margin-bottom: 2px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
}

/* One fridge, three phones, three languages */
.tx-family {
  width: min(460px, 100%);
  margin: 0;
}
.tx-phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tx-phones > li {
  display: grid;
  grid-template-rows: 1fr auto;
}
.tx-phones > li > p {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}
.tx-mini {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 6px 8px;
  border: 1px solid var(--tx-line);
  border-radius: 24px;
  background: var(--tx-canvas);
}
.tx-mini .tx-rail {
  padding-inline: 4px;
}
.tx-mini .tx-tag {
  /* the same height on every phone, for the longest name */
  min-height: 61px;
  padding-inline: 4px;
}
.tx-mini .tx-tile {
  flex-basis: 100%;
}


/* How dates are decided: the crisper drawer at the bottom of the fridge */
.tx-dates {
  position: relative;
  margin-top: 48px;
  padding: 34px 20px 28px;
  border: 1px solid var(--tx-rail-edge);
  border-radius: 18px;
  background: var(--tx-crisper);
}
.tx-dates::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 44px;
  height: 5px;
  margin-left: -22px;
  border-radius: 3px;
  background: var(--tx-handle);
}
.tx-dates h2 {
  font-size: clamp(22px, 1vw + 18px, 30px);
  margin-bottom: 12px;
}
.tx-dates p {
  max-width: 46em;
}

/* Questions and answers */
.tx-faq {
  display: grid;
  gap: 8px 48px;
  padding-block: 72px 40px;
}
.tx-faq-list details {
  border-top: 1px solid var(--tx-rail-edge);
}
.tx-faq-list details:last-child {
  border-bottom: 1px solid var(--tx-rail-edge);
}
.tx-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}
.tx-faq summary::-webkit-details-marker {
  display: none;
}
.tx-faq summary::after {
  content: "+";
  flex: none;
  font-weight: 500;
  color: var(--tx-muted);
}
.tx-faq details[open] summary::after {
  content: "−";
}
.tx-faq details p {
  max-width: 40em;
  padding: 0 2px 22px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--tx-text);
}
.tx-faq details a,
.tx-links a,
.tx-credit {
  color: var(--tx-ink);
}
.tx-faq details a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Help, policies and the store state */
.tx-end {
  display: grid;
  gap: 32px;
  padding-block: 40px 80px;
}
.tx-end h2 {
  font-size: 22px;
  margin-bottom: 16px;
}
.tx-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tx-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--tx-rail-edge);
  border-radius: 999px;
  background: var(--tx-panel);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.tx-links a:hover {
  border-color: var(--tx-ink);
}
.tx-credit {
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--tx-muted);
}

@media (max-width: 400px) {
  .tx-mini .tx-tag {
    min-height: 78px;
  }
  .tx-notice {
    gap: 10px;
    padding: 14px;
  }
  .tx-day {
    width: 48px;
  }
  .tx-day-n {
    font-size: 40px;
    line-height: 44px;
  }
  .tx-notice-text {
    padding-left: 10px;
  }
}

/* Small, CSS-only motion: the food settles onto the shelf */
@media (prefers-reduced-motion: no-preference) {
  .tx-shelves .tx-food,
  .tx-phones .tx-food {
    animation: tx-settle 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .tx-shelves .tx-tile:nth-child(2) .tx-food {
    animation-delay: 0.08s;
  }
  @keyframes tx-settle {
    from {
      transform: translateY(-6px);
      opacity: 0;
    }
  }
}

@media (min-width: 760px) {
  .tx-wrap {
    width: min(1160px, calc(100% - 64px));
  }
  .tx-hero {
    padding-block: 48px 72px;
  }
  .tx-fridge {
    padding: 0 40px 40px;
    border-radius: 40px;
  }
  .tx-step {
    gap: 40px;
    padding-top: 72px;
  }
  .tx-step::after {
    margin-top: 24px;
  }
  .tx-dates {
    padding: 40px 40px 34px;
  }
  .tx-faq {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    padding-block: 96px 56px;
  }
  .tx-end {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 48px;
    border-top: 1px solid var(--tx-rail-edge);
    padding-top: 48px;
  }
}
@media (min-width: 960px) {
  .tx-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: 56px;
  }
  .tx-step {
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    align-items: center;
    gap: 56px;
  }
  .tx-step::after {
    grid-column: 1 / -1;
  }
  .tx-step--flip {
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  }
  .tx-step--flip .tx-step-visual {
    order: -1;
  }
}
@media (min-width: 1100px) {
  .tx-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 390px);
    gap: 72px;
  }
  .tx-step {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    gap: 72px;
    padding-inline: 32px;
  }
  .tx-step--flip {
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  }
}
