/* HabitIt landing — static port of the former Next.js site. */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/Sora-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/PlusJakartaSans-latin.woff2) format("woff2");
}

:root {
  --font-sora: "Sora", system-ui, sans-serif;
  --font-jakarta: "Plus Jakarta Sans", system-ui, sans-serif;
  --ink: #17181a;
  --muted: #5a5e63;
  --muted-2: #62666b;
  --line: #ecebe6;
  --card-line: #efeee9;
  --green: #5bcb7d;
  --green-tint: #e8f6ed;
  --green-line: #cdead6;
  --green-text: #2c7a47;
  --purple: #b07fd9;
  --purple-tint: #ede4f7;
  --red: #e15b5b;
  --red-tint: #f8e2e2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-jakarta);
  color: var(--ink);
  background: #fbfbf8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--green);
  color: #fff;
}

img {
  display: block;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.sora {
  font-family: var(--font-sora);
}

/* ---------- logo ---------- */
.logo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5px;
  width: 26px;
  height: 26px;
}
.logo i {
  border-radius: 2.5px;
}
.logo i:nth-child(1), .logo i:nth-child(3) { background: #5bcb7d; }
.logo i:nth-child(2) { background: #1e3a24; }
.logo i:nth-child(4), .logo i:nth-child(6) { background: #b07fd9; }
.logo i:nth-child(5) { background: #2e2440; }
.logo i:nth-child(7), .logo i:nth-child(8) { background: #e15b5b; }
.logo i:nth-child(9) { background: #3a2020; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}
.brand span {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(251, 251, 248, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a,
.mobile-menu a {
  color: #54585d;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.btn-dark {
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 11px;
  transition: background 0.2s ease;
}
.btn-dark:hover {
  background: #2e2440;
}
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-burger .icon-close,
.nav.open .nav-burger .icon-open {
  display: none;
}
.nav.open .nav-burger .icon-close {
  display: block;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 28px 18px;
  border-top: 1px solid var(--line);
}
.mobile-menu a {
  font-size: 16px;
  padding: 10px 0;
}
.mobile-menu a.btn-dark {
  color: #fff;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  margin-top: 8px;
}

/* ---------- section headings ---------- */
.eyebrow {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.h2 {
  font-family: var(--font-sora);
  font-weight: 800;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.sec-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.sec-head .h2 {
  margin-bottom: 16px;
}
.sec-head p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 28px 80px;
  gap: 56px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-tint);
  border: 1px solid var(--green-line);
  color: var(--green-text);
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 24px;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 100px;
  background: var(--green);
}
.h1 {
  font-family: var(--font-sora);
  font-weight: 800;
  font-size: 60px;
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  text-wrap: balance;
}
.h1 em {
  font-style: normal;
  color: var(--green);
}
.hero-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 34px;
}
#download {
  margin-bottom: 30px;
  scroll-margin-top: 90px;
}
.rating {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #7a7e83;
  font-size: 14.5px;
}
.stars {
  display: flex;
  gap: 3px;
  color: var(--green);
}
.rating strong {
  color: #3a3d41;
}

.hero-visual {
  position: relative;
}
.hero-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(60% 60% at 70% 30%, rgba(91, 203, 125, 0.16), transparent 70%);
  filter: blur(10px);
}
.grid-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 30px 60px -28px rgba(40, 40, 30, 0.28);
}
.grid-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.grid-card-title {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 17px;
}
.grid-card-sub {
  font-size: 13px;
  color: #8a8e92;
}
.streak-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green-tint);
  color: var(--green-text);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 100px;
}
.streak-chip svg {
  display: block;
  flex-shrink: 0;
}
.habit-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 8px;
}
.habit-grid i {
  aspect-ratio: 1;
  border-radius: 6px;
}
.habit-grid .g { background: var(--green); }
.habit-grid .p { background: var(--purple); }
.habit-grid .r { background: var(--red); }
.habit-grid .g.e { background: var(--green-tint); }
.habit-grid .p.e { background: var(--purple-tint); }
.habit-grid .r.e { background: var(--red-tint); }
.grid-card-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
  color: #a7aaad;
}
.float-card {
  position: absolute;
  top: -22px;
  left: -26px;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 12px 15px;
  box-shadow: 0 18px 36px -20px rgba(40, 40, 30, 0.3);
}
.float-card div:first-child {
  font-size: 12px;
  color: #8a8e92;
  margin-bottom: 3px;
}
.float-card div:last-child {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 20px;
  color: var(--green);
}

/* ---------- store badges ---------- */
.badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.badges.center {
  justify-content: center;
}
.badges a {
  transition: transform 0.2s ease;
}
.badges a:hover {
  transform: translateY(-2px);
}
.badges img {
  height: 52px;
  width: auto;
}
.badges.lg img {
  height: 54px;
}

/* ---------- trust strip ---------- */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f6f6f1;
}
.trust .wrap {
  padding: 22px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 48px;
  align-items: center;
  justify-content: center;
  color: #878b8f;
  font-size: 14.5px;
  font-weight: 500;
}
.trust .dot {
  color: #d8d7cf;
}

/* ---------- grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

/* ---------- features ---------- */
#features {
  padding: 100px 28px 40px;
}
.features {
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 20px;
  padding: 28px;
}
.mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
}
.mini i {
  border-radius: 5px;
}
.mini .g { background: var(--green); }
.mini .gt { background: var(--green-tint); }
.mini .gd { background: #1e3a24; }
.mini .p { background: var(--purple); }
.mini .pt { background: var(--purple-tint); }
.mini .r { background: var(--red); }
.mini .rt { background: var(--red-tint); }
.card h3 {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 9px;
}
.card p {
  color: var(--muted-2);
  font-size: 15.5px;
  line-height: 1.55;
}

/* ---------- how it works ---------- */
#how {
  padding: 90px 28px;
}
#how .sec-head {
  max-width: 620px;
}
#how .sec-head .h2 {
  margin-bottom: 0;
}
.steps {
  gap: 24px;
}
.step {
  text-align: center;
  padding: 8px;
}
.step-n {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-family: var(--font-sora);
  font-weight: 800;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}
.step h3 {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 21px;
  margin-bottom: 10px;
}
.step p {
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.55;
  max-width: 300px;
  margin: 0 auto;
}

/* ---------- showcase (dark) ---------- */
#showcase {
  background: #17181a;
  color: #fff;
}
.show-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 100px 28px;
  gap: 64px;
  align-items: center;
}
#showcase .eyebrow {
  color: var(--green);
  margin-bottom: 16px;
}
#showcase .h2 {
  font-size: 40px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.show-copy > p {
  font-size: 17.5px;
  line-height: 1.6;
  color: #b9bcc0;
  margin-bottom: 28px;
}
.seg {
  display: inline-flex;
  background: #232427;
  border: 1px solid #303236;
  border-radius: 14px;
  padding: 5px;
  gap: 4px;
  margin-bottom: 30px;
}
.seg button {
  font-family: var(--font-jakarta);
  font-weight: 600;
  font-size: 15px;
  padding: 9px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  color: #b9bcc0;
}
.seg button[aria-pressed="true"] {
  background: var(--green);
  color: #0e2417;
}
.show-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.show-rows div {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #d6d8db;
  font-size: 16px;
}
.show-rows i {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  flex-shrink: 0;
}
.phone-col {
  display: flex;
  justify-content: center;
}
.phone-wrap {
  position: relative;
  width: 300px;
}
.phone-glow {
  position: absolute;
  inset: -44px;
  background: radial-gradient(60% 50% at 50% 40%, rgba(91, 203, 125, 0.22), transparent 70%);
}
.phone {
  position: relative;
  background: #0e0f10;
  border: 9px solid #232427;
  border-radius: 46px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1206 / 2622;
}
.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: opacity 0.5s ease;
}
/* Theme crossfade: section carries data-theme="light|dark". */
#showcase[data-theme="dark"] .light,
#showcase[data-theme="light"] .dark {
  opacity: 0;
}

.tour {
  padding: 0 28px 100px;
}
.tour-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.tour-head h3 {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.tour-head span {
  color: #8c9095;
  font-size: 15px;
}
.tour-grid {
  gap: 22px;
}
.tour-grid .screen {
  background: #0e0f10;
  border: 8px solid #232427;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.7);
}
.tour-grid figcaption {
  color: #a4a8ad;
  font-size: 14.5px;
  margin-top: 14px;
  text-align: center;
}

/* ---------- widgets ---------- */
#widgets {
  background: #f2f4f2;
  border-top: 1px solid #e7eae6;
  border-bottom: 1px solid #e7eae6;
}
#widgets .wrap {
  padding: 100px 28px;
}
#widgets .eyebrow {
  color: var(--green-text);
}
.widget-grid {
  gap: 36px;
  align-items: start;
  max-width: 880px;
  margin: 0 auto;
}
.widget-grid .phone {
  box-shadow: 0 34px 70px -34px rgba(30, 40, 30, 0.55);
}
.widget-grid img {
  width: 100%;
}
.widget-grid figcaption {
  text-align: center;
  color: #5e6267;
  font-size: 15px;
  margin-top: 18px;
  font-weight: 500;
}

/* ---------- pricing ---------- */
#pricing {
  max-width: 1080px;
  margin: 0 auto;
  padding: 100px 28px;
}
#pricing .sec-head {
  max-width: 600px;
  margin-bottom: 52px;
}
#pricing .sec-head .h2 {
  margin-bottom: 14px;
}
#pricing .sec-head p {
  line-height: normal;
}
.price-panel {
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 24px;
  padding: 44px;
  max-width: 760px;
  margin: 0 auto;
}
.plans {
  gap: 30px 40px;
}
.plan-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.plan-head i {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
.plan-head h3 {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 20px;
}
.plan ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.plan li {
  display: flex;
  gap: 11px;
  align-items: center;
  color: #3f4347;
  font-size: 15.5px;
}
.plan li::before {
  content: "✓";
  font-weight: 800;
  color: var(--check);
}
.price-cta {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  padding: 15px;
  border-radius: 14px;
  margin-top: 34px;
}

/* ---------- faq ---------- */
#faq {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 28px 100px;
}
#faq .h2 {
  font-size: 38px;
  line-height: normal;
  text-align: center;
  margin-bottom: 44px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq {
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 4px 22px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--font-sora);
  font-weight: 600;
  font-size: 17.5px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq-plus {
  font-size: 24px;
  color: var(--green);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.faq[open] .faq-plus {
  transform: rotate(45deg);
}
.faq p {
  padding: 0 0 18px;
  color: #5e6267;
  font-size: 15.5px;
  line-height: 1.6;
}
.faq[open] p {
  animation: faqIn 0.35s ease both;
}
@keyframes faqIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- final cta ---------- */
.final {
  padding: 0 28px 100px;
}
.final-panel {
  position: relative;
  overflow: hidden;
  background: var(--green-tint);
  border: 1px solid var(--green-line);
  border-radius: 28px;
  padding: 72px 40px;
  text-align: center;
}
.corner {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  width: 150px;
  opacity: 0.5;
}
.corner i {
  aspect-ratio: 1;
  border-radius: 7px;
}
.corner .g { background: var(--green); }
.corner .p { background: var(--purple); }
.corner .r { background: var(--red); }
.corner.tl {
  top: -30px;
  left: -10px;
}
.corner.br {
  bottom: -30px;
  right: -10px;
}
.final-body {
  position: relative;
}
.h2-cta {
  font-family: var(--font-sora);
  font-weight: 800;
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.final-body p {
  font-size: 19px;
  color: #3e6b4d;
  margin: 0 auto 34px;
  max-width: 480px;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: #f6f6f1;
}
.footer .wrap {
  padding: 40px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer .logo {
  width: 24px;
  height: 24px;
}
.footer .brand span {
  font-size: 18px;
  letter-spacing: normal;
}
.footer-links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #6e7276;
  text-decoration: none;
  font-size: 14.5px;
}
.copy {
  font-size: 14px;
  color: #9a9ea2;
}
.copy a {
  color: inherit;
}

/* ---------- legal pages ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 28px 100px;
}
.back {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}
.legal h1 {
  font-family: var(--font-sora);
  font-weight: 800;
  font-size: 42px;
  letter-spacing: -0.025em;
  margin: 20px 0 10px;
}
.updated {
  color: #9a9ea2;
  font-size: 14.5px;
  margin-bottom: 36px;
}
.legal-body h2 {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 34px 0 12px;
}
.legal-body p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 14px;
}
.legal-body ul {
  margin: 0 0 14px 20px;
}
.legal-body li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 8px;
}
.legal-body a {
  color: var(--green-text);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-3,
  .grid-2,
  .hero,
  .show-grid {
    grid-template-columns: 1fr;
  }
  .hero,
  .show-grid {
    gap: 40px;
  }
  .nav-links,
  .nav-right > .btn-dark {
    display: none;
  }
  .nav-burger {
    display: inline-flex;
  }
  .nav.open .mobile-menu {
    display: flex;
  }
  .h1 {
    font-size: 44px;
  }
  .h2,
  #showcase .h2,
  #faq .h2 {
    font-size: 32px;
  }
  .h2-cta {
    font-size: 36px;
  }
}

@media (max-width: 560px) {
  .h1 {
    font-size: 36px;
  }
}

/* ---------- language switcher (header) + toast ---------- */
.lang {
  position: relative;
}
.lang summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #54585d;
  padding: 8px 10px;
  border-radius: 10px;
  user-select: none;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang summary:hover,
.lang details[open] summary {
  color: var(--ink);
  background: rgba(23, 24, 26, 0.05);
}
.lang ul {
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 60;
  min-width: 200px;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(23, 24, 26, 0.12);
}
.lang li a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}
.lang li a:hover {
  background: #f6f6f1;
}
.lang li a[aria-current] {
  font-weight: 700;
  color: var(--green-text);
}
@media (max-width: 900px) {
  .nav-right {
    gap: 8px;
  }
}

.lang-toast {
  position: fixed;
  z-index: 70;
  inset-inline-start: 16px;
  inset-inline-end: 16px;
  bottom: 16px;
  margin: 0 auto;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(23, 24, 26, 0.16);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.lang-toast.show {
  opacity: 1;
  transform: none;
}
.lang-toast p {
  flex: 1 1 200px;
}
.lang-toast .actions {
  display: flex;
  gap: 8px;
}
.lang-toast button {
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.lang-toast button.yes {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .lang-toast {
    transition: none;
  }
}

/* ---------- per-language typography ---------- */
/* Tight negative tracking is tuned for Latin. It breaks Arabic joining and crowds CJK/Indic/Thai. */
html:lang(ja) *,
html:lang(ko) *,
html:lang(zh) *,
html:lang(ar) *,
html:lang(he) *,
html:lang(hi) *,
html:lang(th) * {
  letter-spacing: normal !important;
}
html:lang(ko) body {
  word-break: keep-all;
}
html:lang(ja) body,
html:lang(zh) body {
  line-break: strict;
}
/* Scripts with tall marks / stacked diacritics need more leading. */
html:lang(th) body,
html:lang(hi) body,
html:lang(ar) body {
  line-height: 1.7;
}
html:lang(th) .h1,
html:lang(th) .h2,
html:lang(hi) .h1,
html:lang(hi) .h2,
html:lang(ar) .h1,
html:lang(ar) .h2 {
  line-height: 1.25;
}
/* Long compounds (de, ru, tr, id, fi, nl) must not overflow narrow cards. */
body {
  overflow-wrap: break-word;
}
html:lang(de) body,
html:lang(ru) body,
html:lang(fi) body,
html:lang(nl) body {
  hyphens: auto;
}
/* never hyphenate headings or UI chrome */
h1,
h2,
h3,
.nav,
.btn-dark,
.lang-toast {
  hyphens: manual;
}

/* ---------- 404 ---------- */
.notfound {
  max-width: 560px;
  margin: 0 auto;
  padding: 88px 28px 120px;
  text-align: center;
}
.notfound-grid {
  display: grid;
  grid-template-columns: repeat(7, 26px);
  gap: 6px;
  justify-content: center;
  margin-bottom: 36px;
}
.notfound-grid i {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--green);
}
.notfound-grid i.p {
  background: var(--purple);
}
.notfound-grid i.r {
  background: var(--red);
}
.notfound-grid i.e {
  opacity: 0.18;
}
.notfound-code {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 10px;
}
.notfound h1 {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: clamp(32px, 6vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.notfound-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 32px;
}
.notfound .btn-dark {
  display: inline-block;
}
