:root {
  --bg: #f8f4ee;
  --bg-deep: #eee7dd;
  --surface: rgba(255,255,255,.76);
  --surface-strong: rgba(255,255,255,.94);
  --text: #443a31;
  --text-strong: #201b17;
  --muted: #6f655c;
  --line: rgba(123,105,85,.20);
  --blue: #174ce0;
  --blue-dark: #1039b6;
  --warm: #a48765;
  --warm-dark: #866b4f;
  --warm-light: #c6b398;
  --shadow: 0 14px 34px rgba(75,62,47,.09), 5px 5px 1px rgba(91,76,58,.08);
  --shadow-hover: 0 20px 45px rgba(75,62,47,.13), 7px 7px 2px rgba(91,76,58,.09);
  --page: 1420px;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --pill: 999px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 4%, rgba(255,255,255,.95), transparent 26%),
    linear-gradient(135deg, #faf7f2, #f3eee7 55%, #fbf9f5);
  font-family: "Noto Sans Thai", "Manrope", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(23,76,224,.25);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.page-shell {
  width: min(calc(100% - 54px), var(--page));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: absolute;
  z-index: 50;
  top: 18px;
  left: 0;
  width: 100%;
}

.header-shell {
  width: min(calc(100% - 54px), var(--page));
  min-height: 74px;
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: center;
  gap: 30px;
  margin-inline: auto;
  padding: 10px 20px 10px 28px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 30px rgba(79,66,50,.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand { width: 220px; }
.brand img { width: 100%; height: auto; }

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
}
.main-nav a {
  min-width: 86px;
  padding: 9px 18px;
  border-radius: var(--pill);
  color: var(--text);
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: .18s ease;
}
.main-nav a:hover,
.main-nav a.is-active {
  color: var(--text-strong);
  background: rgba(230,220,207,.68);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}
.icon-button,
.profile-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--text-strong);
  background: transparent;
  cursor: pointer;
  transition: .18s ease;
}
.icon-button:hover,
.profile-button:hover {
  background: rgba(236,228,217,.74);
}
.icon-button svg,
.profile-button svg {
  width: 23px; height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 25px;
  border-radius: var(--pill);
  color: #fff;
  background: linear-gradient(135deg, var(--warm-light), var(--warm-dark));
  box-shadow: 0 8px 18px rgba(134,107,79,.22);
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(236,228,217,.74);
}
.mobile-menu-button > span:not(.sr-only) {
  display: block;
  width: 21px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text-strong);
}

/* Hero */
.hero {
  position: relative;
  min-height: 570px;
  padding: 115px 0 30px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-background {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 42%;
  background-image: url("/assets/images/hero-lab-background.png");
  background-size: cover;
  background-position: center;
  opacity: .88;
  mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 100%);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248,244,238,.99) 0 37%, rgba(248,244,238,.72) 49%, rgba(248,244,238,.06) 71%),
    radial-gradient(circle at 43% 43%, rgba(255,255,255,.9), transparent 28%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(500px, .92fr) minmax(530px, 1.08fr);
  align-items: center;
  gap: 40px;
  min-height: 430px;
}
.hero-copy { padding: 40px 0 22px 35px; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  color: #7b6a59;
  font-size: 17px;
  font-weight: 500;
}
.hero-kicker i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--text-strong);
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: clamp(42px, 4vw, 62px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.04em;
}
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-copy > p {
  margin: 20px 0 0;
  color: #6e6155;
  font-size: 17px;
  line-height: 1.75;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 25px;
}
.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 30px;
  border-radius: var(--pill);
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: 15px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #b89c77, #8b6f50);
  box-shadow: 0 10px 20px rgba(134,107,79,.23);
}
.button-primary:hover { box-shadow: 0 15px 25px rgba(134,107,79,.28); }
.button-outline {
  border: 1px solid rgba(145,116,82,.52);
  color: #896e51;
  background: rgba(255,255,255,.58);
}
.button-outline:hover { background: rgba(255,255,255,.9); }

.hero-visual {
  min-height: 420px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 60px 10px 0;
}
.hero-logo {
  width: min(620px, 87%);
  margin-top: -55px;
  filter: drop-shadow(0 10px 20px rgba(42,55,83,.08));
}
.hero-feature-strip {
  width: min(670px, 96%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
  padding: 18px 16px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 30px rgba(68,58,47,.10);
  backdrop-filter: blur(12px);
}
.hero-feature-strip article {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: center;
  gap: 11px;
  padding: 0 18px;
}
.hero-feature-strip article + article { border-left: 1px solid var(--line); }
.hero-feature-strip svg {
  width: 38px; height: 38px;
  fill: none;
  stroke: var(--warm);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-feature-strip strong {
  display: block;
  color: var(--text-strong);
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: 14px;
}
.hero-feature-strip span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

/* Content deck */
.content-deck {
  padding: 24px 0 18px;
  background: rgba(255,255,255,.25);
}
.deck-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.62);
  box-shadow: 0 10px 28px rgba(78,65,49,.05);
}
.deck-section { min-width: 0; padding: 20px 22px 22px; }
.deck-section + .deck-section { border-left: 1px solid var(--line); }
.section-mini-header {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.section-mini-header h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: #39322b;
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: 15px;
  font-weight: 700;
}
.blue-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
}
.section-mini-header > a {
  color: #756b60;
  font-size: 12px;
  white-space: nowrap;
}

.system-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}

.system-card,
.article-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.68);
  transition: transform .18s ease, box-shadow .18s ease;
}
.system-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.system-card {
  min-height: 265px;
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.system-icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 13px;
}
.system-icon svg {
  width: 34px; height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-blue { color: var(--blue); background: #e9efff; }
.icon-warm { color: #8e7559; background: #f2ece4; }
.system-card h3 {
  margin: 0;
  color: var(--text-strong);
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: 18px;
  line-height: 1.3;
}
.system-subtitle {
  margin: 3px 0 0;
  color: #61574e;
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}
.system-description {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.small-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  align-self: flex-start;
  margin-top: auto;
  padding: 0 20px;
  border: 1px solid rgba(155,128,96,.34);
  border-radius: var(--pill);
  color: #715d48;
  background: rgba(250,247,242,.8);
  font-size: 12px;
  font-weight: 600;
}

.article-image-link {
  position: relative;
  aspect-ratio: 16/9;
  display: block;
  overflow: hidden;
  background: #ede8e0;
}
.article-image-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.article-card:hover img { transform: scale(1.035); }
.article-tag {
  position: absolute;
  left: 10px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 700;
}
.tag-blue { background: var(--blue-dark); }
.tag-warm { background: #9a744e; }
.article-body { padding: 13px 14px 14px; }
.article-body h3 {
  min-height: 51px;
  margin: 0;
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.5;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: #8e8378;
  font-size: 11px;
}

/* Community */
.community {
  display: grid;
  grid-template-columns: 320px minmax(260px,1fr) auto auto;
  align-items: stretch;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(245,240,233,.85);
  box-shadow: 0 10px 28px rgba(78,65,49,.05);
}
.community-image { min-height: 170px; overflow: hidden; }
.community-image img { width: 100%; height: 100%; object-fit: cover; }
.community-copy {
  align-self: center;
  padding: 25px 30px;
}
.community-copy h2 {
  margin: 0;
  color: var(--text-strong);
  font-family: "Manrope", "Noto Sans Thai", sans-serif;
  font-size: 25px;
}
.community-copy p {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.community-points {
  display: grid;
  grid-template-columns: repeat(3, 120px);
  align-items: center;
}
.community-points article {
  min-height: 115px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 12px 14px;
  border-left: 1px solid var(--line);
  text-align: center;
}
.community-points svg {
  width: 35px; height: 35px;
  margin-bottom: 7px;
  fill: none;
  stroke: var(--warm);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.community-points strong {
  color: var(--text-strong);
  font-family: "Manrope", sans-serif;
  font-size: 13px;
}
.community-points span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.community-button {
  align-self: center;
  margin: 0 24px;
  padding-inline: 24px;
  white-space: nowrap;
}

.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 80px;
  padding-top: 76px;
  padding-bottom: 70px;
}
.about-kicker {
  color: var(--blue);
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
}
.about-strip h2 {
  max-width: 650px;
  margin: 9px 0 0;
  color: var(--text-strong);
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 400;
  line-height: 1.35;
}
.about-strip > p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

/* Footer */
.site-footer { padding: 0 0 20px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr .9fr .78fr 1fr 1.3fr;
  gap: 34px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.62);
}
.footer-brand img { width: 180px; }
.footer-brand p,
.update-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.footer-grid h3 {
  margin: 0 0 10px;
  color: var(--text-strong);
  font-family: "Manrope", sans-serif;
  font-size: 12px;
}
.footer-links,
.contact-list {
  display: grid;
  gap: 6px;
}
.footer-links.two-columns { grid-template-columns: 1fr 1fr; }
.footer-links a,
.contact-list a,
.contact-list > span {
  color: var(--muted);
  font-size: 12px;
}
.contact-list a,
.contact-list > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.social-row {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}
.social-row a {
  width: 29px; height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-strong);
  background: rgba(255,255,255,.8);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 700;
}
.subscribe-form {
  display: grid;
  grid-template-columns: 1fr 34px;
  margin-top: 12px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(255,255,255,.82);
}
.subscribe-form input {
  min-width: 0;
  height: 32px;
  padding: 0 11px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 11px;
  font-weight: 400;
}
.subscribe-form button {
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #b89c77, #8b6f50);
  cursor: pointer;
}
.subscribe-status {
  min-height: 19px;
  margin: 6px 4px 0;
  color: var(--blue-dark);
  font-size: 11px;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 90px;
  padding: 12px 4px 0;
  color: #8e8378;
  font-size: 11px;
}
.footer-bottom > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.footer-bottom i {
  width: 1px; height: 13px;
  background: var(--line);
}

/* Search dialog */
.search-dialog {
  width: min(620px, calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
}
.search-dialog::backdrop {
  background: rgba(44,38,32,.36);
  backdrop-filter: blur(7px);
}
.search-dialog-card {
  position: relative;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 22px;
  background: #faf7f2;
  box-shadow: var(--shadow-hover);
}
.search-dialog-card label {
  display: block;
  color: var(--text-strong);
  font-size: 25px;
  font-weight: 600;
}
.search-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 18px;
}
.search-field input {
  min-width: 0;
  height: 50px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: #fff;
}
.search-field button {
  padding: 0 24px;
  border: 0;
  border-radius: var(--pill);
  color: #fff;
  background: var(--warm-dark);
}
.search-dialog-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.dialog-close {
  position: absolute;
  top: 13px; right: 13px;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--text-strong);
  background: rgba(232,224,213,.72);
  font-size: 24px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1280px) {
  .header-shell { grid-template-columns: 210px 1fr auto; }
  .brand { width: 185px; }
  .main-nav { gap: 2px; }
  .main-nav a { min-width: 72px; padding-inline: 13px; }
  .hero-grid { grid-template-columns: minmax(430px,.9fr) minmax(480px,1.1fr); }
  .hero h1 { font-size: clamp(40px,4.2vw,55px); }
  .community { grid-template-columns: 260px minmax(240px,1fr) auto; }
  .community-points { grid-template-columns: repeat(3,105px); }
  .community-button { grid-column: 2 / -1; justify-self: end; margin: 0 22px 18px; }
}

@media (max-width: 1050px) {
  .site-header { top: 10px; }
  .header-shell {
    position: relative;
    grid-template-columns: 1fr auto auto;
    min-height: 66px;
    padding: 8px 12px 8px 18px;
  }
  .brand { width: 175px; }
  .mobile-menu-button { display: block; grid-column: 2; }
  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(250,247,242,.98);
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: grid; }
  .main-nav a { width: 100%; }
  .header-actions { grid-column: 3; }
  .hero { padding-top: 100px; }
  .hero-background { inset-left: 25%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 50px 20px 0; text-align: center; }
  .hero-kicker, .hero-buttons { justify-content: center; }
  .hero-copy > p { max-width: 700px; margin-inline: auto; }
  .hero-visual { min-height: 360px; padding-top: 45px; }
  .hero-logo { width: min(540px,75%); }
  .deck-grid { grid-template-columns: 1fr; }
  .deck-section + .deck-section { border-left: 0; border-top: 1px solid var(--line); }
  .community { grid-template-columns: 320px 1fr; }
  .community-points { grid-column: 1 / -1; grid-template-columns: repeat(3,1fr); }
  .community-points article { border-top: 1px solid var(--line); }
  .community-button { grid-column: 1 / -1; justify-self: center; margin: 20px; }
  .footer-grid { grid-template-columns: repeat(3,1fr); }
  .footer-brand { grid-column: span 1; }
}

@media (max-width: 760px) {
  .page-shell,
  .header-shell { width: min(calc(100% - 24px), var(--page)); }
  .header-actions .icon-button,
  .header-actions .profile-button { display: none; }
  .login-button { min-height: 38px; padding-inline: 18px; }
  .hero { min-height: auto; }
  .hero-background { inset: 330px 0 0 0; opacity: .52; mask-image: linear-gradient(to bottom,transparent,#000 18%); -webkit-mask-image: linear-gradient(to bottom,transparent,#000 18%); }
  .hero::before { background: linear-gradient(to bottom,rgba(248,244,238,.99) 0 55%,rgba(248,244,238,.42) 100%); }
  .hero-copy { padding: 45px 5px 0; }
  .hero-kicker { font-size: 14px; }
  .hero h1 { font-size: clamp(37px,10.5vw,52px); }
  .hero-copy > p { font-size: 16px; }
  .hero-copy > p br { display: none; }
  .hero-visual { min-height: 390px; padding-top: 80px; }
  .hero-logo { width: min(430px,88%); }
  .hero-feature-strip { grid-template-columns: 1fr; gap: 0; padding: 8px 15px; }
  .hero-feature-strip article { padding: 11px 5px; }
  .hero-feature-strip article + article { border-left: 0; border-top: 1px solid var(--line); }
  .system-grid, .article-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 0; }
  .article-body h3 { min-height: 0; }
  .community { grid-template-columns: 1fr; }
  .community-image { min-height: 210px; }
  .community-copy { padding: 24px; }
  .community-points { grid-column: auto; grid-template-columns: 1fr; }
  .community-points article { min-height: 105px; border-left: 0; }
  .community-button { grid-column: auto; width: calc(100% - 40px); }
  .about-strip { grid-template-columns: 1fr; gap: 24px; padding-top: 55px; padding-bottom: 55px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 480px) {
  .header-shell { grid-template-columns: 1fr auto; }
  .brand { width: 155px; }
  .mobile-menu-button { grid-column: 2; }
  .header-actions { display: none; }
  .hero-buttons { display: grid; }
  .button { width: 100%; }
  .section-mini-header { align-items: flex-start; }
  .section-mini-header h2 { font-size: 13px; }
  .section-mini-header > a { font-size: 10px; }
  .deck-section { padding: 17px 14px 18px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}


/* ============================================================
   COMPACT PASS — keeps the original homepage composition.
   Only scale, spacing and density are adjusted.
   ============================================================ */
:root{--page:1360px}
body{font-size:15px;line-height:1.58}
.page-shell{width:min(calc(100% - 38px),var(--page))}
.site-header{top:12px}
.header-shell{width:min(calc(100% - 38px),var(--page));min-height:64px;grid-template-columns:205px 1fr auto;gap:18px;padding:7px 12px 7px 20px;border-radius:16px}
.brand{width:178px}.main-nav{gap:4px}.main-nav a{min-width:72px;padding:7px 13px;font-size:12px}
.header-actions{gap:7px}.icon-button{width:36px;height:36px}.icon-button svg{width:19px;height:19px}.login-button{min-height:36px;padding:0 17px;font-size:11px}.mobile-menu-button{width:38px;height:38px}
.home-lang-switch{display:flex;padding:3px;border:1px solid var(--line);border-radius:var(--pill);background:rgba(255,255,255,.68)}
.home-lang-switch button{min-width:30px;height:28px;padding:0 7px;border:0;border-radius:var(--pill);color:var(--muted);background:transparent;font-family:"Manrope",sans-serif;font-size:10px;font-weight:700;cursor:pointer}
.home-lang-switch button.is-active{color:#fff;background:var(--blue)}
.hero{min-height:500px;padding:92px 0 20px}.hero-grid{grid-template-columns:minmax(470px,.92fr) minmax(500px,1.08fr);gap:24px;min-height:380px}
.hero-copy{padding:22px 0 15px 20px}.hero-kicker{gap:11px;margin-bottom:10px;font-size:14px}.hero-kicker i{width:6px;height:6px}
.hero h1{max-width:650px;font-size:clamp(38px,3.65vw,53px);line-height:1.1}.hero-copy>p{margin-top:14px;font-size:15px;line-height:1.65}
.hero-buttons{gap:12px;margin-top:19px}.button{min-height:43px;gap:12px;padding:0 22px;font-size:13px}
.hero-visual{min-height:340px;padding:48px 0 0}.hero-logo{width:min(535px,82%);margin-top:-38px}.hero-feature-strip{width:min(610px,96%);margin-top:22px;padding:11px 10px;border-radius:15px}
.hero-feature-strip article{grid-template-columns:36px minmax(0,1fr);gap:8px;padding:0 13px}.hero-feature-strip svg{width:31px;height:31px}.hero-feature-strip strong{font-size:12px}.hero-feature-strip span{font-size:10px}
.content-deck{padding:15px 0 12px}.deck-grid{border-radius:16px}.deck-section{padding:15px 16px 17px}.section-mini-header{min-height:27px;margin-bottom:11px}.section-mini-header h2{gap:8px;font-size:12px}.blue-dot{width:7px;height:7px}.section-mini-header>a{font-size:10px}
.system-grid,.article-grid{gap:9px}.system-card{min-height:218px;padding:14px}.system-icon{width:43px;height:43px;margin-bottom:9px;border-radius:11px}.system-icon svg{width:27px;height:27px}.system-card h3{font-size:15px}.system-subtitle{font-size:11px}.system-description{margin:9px 0 12px;font-size:11px;line-height:1.55}.small-button{min-height:31px;padding:0 14px;font-size:10px}
.article-body{padding:10px 11px 11px}.article-body h3{min-height:43px;font-size:13px;line-height:1.45}.article-tag{left:8px;bottom:7px;padding:3px 7px;font-size:8px}.article-meta{gap:8px;margin-top:8px;font-size:9px}
.community{grid-template-columns:260px minmax(230px,1fr) auto auto;margin-top:12px;border-radius:16px}.community-image{min-height:142px}.community-copy{padding:18px 21px}.community-copy h2{font-size:20px}.community-copy p{margin-top:5px;font-size:12px;line-height:1.65}.community-points{grid-template-columns:repeat(3,100px)}.community-points article{min-height:92px;padding:9px 10px}.community-points svg{width:28px;height:28px;margin-bottom:4px}.community-points strong{font-size:11px}.community-points span{font-size:9px}.community-button{margin:0 16px;padding-inline:17px;font-size:11px}
.about-strip{gap:55px;padding-top:45px;padding-bottom:42px}.about-kicker{font-size:11px}.about-strip h2{font-size:clamp(25px,2.65vw,38px)}.about-strip>p{font-size:14px;line-height:1.75}
.footer-grid{gap:24px;padding:19px 21px}.footer-brand img{width:150px}.footer-brand p,.update-copy{font-size:11px}.footer-grid h3{font-size:10px}.footer-links a,.contact-list a,.contact-list>span{font-size:10px}.social-row{margin-top:9px}.social-row a{width:26px;height:26px;font-size:9px}.subscribe-form{margin-top:8px}.subscribe-form input{height:32px;font-size:11px}.subscribe-form button{width:32px;height:32px}.footer-bottom{padding-top:9px;font-size:9px}
.home-search-results{display:grid;gap:7px;margin-top:12px}.home-search-results a{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;color:var(--text-strong);background:rgba(255,255,255,.74);font-size:12px}.home-search-results a span{color:var(--warm-dark);font-size:10px}
@media(max-width:1050px){.header-shell{grid-template-columns:1fr auto auto}.hero-grid{grid-template-columns:1fr}.hero-copy{padding-top:38px}.hero-visual{min-height:315px}.hero-logo{width:min(480px,72%)}.community{grid-template-columns:280px 1fr}.community-points{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.page-shell,.header-shell{width:min(calc(100% - 22px),var(--page))}.home-lang-switch{display:none}.hero{padding-top:88px}.hero-copy{padding:35px 3px 0}.hero h1{font-size:clamp(34px,10vw,46px)}.hero-copy>p{font-size:14px}.hero-visual{min-height:355px;padding-top:65px}.hero-feature-strip article{padding-block:8px}.deck-section{padding:14px 12px 16px}.community{grid-template-columns:1fr}.about-strip{gap:19px;padding-top:38px;padding-bottom:38px}}

/* Keep the bilingual control available on small screens. */
@media(max-width:760px){.home-lang-switch{display:flex}}
@media(max-width:480px){
  .header-shell{grid-template-columns:1fr auto auto}
  .header-actions{display:flex;grid-column:2}
  .header-actions .icon-button,.header-actions .login-button{display:none}
  .mobile-menu-button{grid-column:3}
}

/* ============================================================
   STICKY COMPACT PASS — stable controls and mobile-first density.
   ============================================================ */
.site-header { padding-top: 10px; }
.hero {
  min-height: 350px;
  padding: 12px 0 16px;
  overflow: hidden;
}
.hero-background {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 42%;
  opacity: .88;
  background-position: center;
  background-size: cover;
  mask-image: linear-gradient(to right,transparent 0,#000 18%,#000 100%);
  -webkit-mask-image: linear-gradient(to right,transparent 0,#000 18%,#000 100%);
  pointer-events: none;
}
.hero::before { background: linear-gradient(90deg,rgba(248,244,238,.97) 0 35%,rgba(248,244,238,.70) 52%,rgba(248,244,238,.10) 78%); }
.hero-grid { min-height: 330px; }
.hero-copy { padding: 10px 0 10px 20px; }
.hero-visual { min-height: 300px; padding-top: 36px; }
.hero-logo { margin-top: -30px; }
.hero-feature-strip { margin-top: 16px; }
.system-description { display: none; }
.system-grid { align-items: stretch; }
.system-card { min-height: 200px; height: 100%; }
.system-card h3,
.system-subtitle { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.small-button { margin-top: auto; }

.article-carousel { min-width: 0; overflow: hidden; }
.article-track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}
.article-track::-webkit-scrollbar { display: none; }
.article-slide {
  min-width: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface,rgba(255,255,255,.68));
}
.article-slide .article-image-link { height: 180px; aspect-ratio: auto; }
.article-slide-copy { min-height: 61px; padding: 10px 13px 9px; }
.article-slide-copy h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 14px;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.article-slide-copy .article-meta { margin-top: 5px; }
.article-dots {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 8px;
}
.article-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong,var(--line));
  cursor: pointer;
  transition: width .2s ease,background .2s ease;
}
.article-dots button.is-active { width: 20px; background: var(--blue); }

.about-strip {
  align-items: center;
  grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr);
  gap: 28px;
  margin-top: 10px;
  margin-bottom: 8px;
  padding: 17px 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.62);
}
.about-kicker { display: none; }
.about-strip h2 { margin: 0; font-size: clamp(20px,2vw,28px); line-height: 1.25; }
.about-strip > p { font-size: 12px; line-height: 1.6; }

@media(max-width:1050px){
  .hero { padding-top: 10px; }
  .hero-copy { padding-top: 20px; }
}

@media(max-width:760px){
  html,body { width: 100%; max-width: 100%; overflow-x: clip; }
  body { min-width: 0; }
  .site-header,.header-shell,main,.hero-stage,.hero,.content-deck,.deck-grid,.deck-section,.system-grid,.system-card,.article-section,.article-carousel,.article-track,.community,.site-footer,.footer-grid,.footer-bottom { min-width: 0; max-width: 100%; }
  img,svg { max-width: 100%; }
  .site-header { padding-top: 7px; }
  .header-shell { min-height: 58px; padding-block: 5px; }
  .brand { width: 145px; }
  .hero { min-height: auto; padding: 18px 0 26px; }
  .hero-background { inset: 0; opacity: .28; mask-image: none; -webkit-mask-image: none; }
  .hero::before { background: rgba(248,244,238,.88); }
  .hero-copy { padding: 14px 2px 0; }
  .hero-kicker { display: none; }
  .hero h1 { font-size: clamp(31px,9.5vw,42px); }
  .hero-copy > p { margin-top: 11px; font-size: 13px; line-height: 1.55; }
  .hero-buttons { margin-top: 15px; }
  .hero-visual { display: none; }

  .system-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 10px;
    padding: 11px 12px;
  }
  .system-icon { grid-row: 1 / 3; width: 38px; height: 38px; margin: 0; }
  .system-icon svg { width: 24px; height: 24px; }
  .system-card h3 { grid-column: 2; font-size: 14px; }
  .system-subtitle { grid-column: 2; margin: 0; font-size: 9px; }
  .small-button { grid-column: 3; grid-row: 1 / 3; margin: 0; padding-inline: 11px; }
  .article-slide .article-image-link { height: clamp(170px,50vw,220px); }
  .article-slide-copy { min-height: 66px; padding: 11px 12px 10px; }
  .article-slide-copy h3 { font-size: 13px; }

  .community-image { display: none; }
  .community-copy { padding: 15px 16px 9px; text-align: center; }
  .community-copy h2 { font-size: 18px; }
  .community-copy p { display: none; }
  .community-points { grid-template-columns: repeat(3,1fr); }
  .community-points article { min-height: 72px; padding: 8px 5px; border-left: 1px solid var(--line); }
  .community-points article:first-child { border-left: 0; }
  .community-points svg { width: 24px; height: 24px; margin-bottom: 2px; }
  .community-points span { display: none; }
  .community-button { min-height: 38px; margin: 12px auto 15px; }

  .about-strip { grid-template-columns: 1fr; gap: 5px; padding: 14px 16px; text-align: center; }
  .about-strip h2 { font-size: 19px; }
  .about-strip > p { font-size: 11px; line-height: 1.55; }
}

@media(max-width:480px){
  .header-shell { grid-template-columns: minmax(105px,1fr) auto auto auto; gap: 5px; padding-inline: 10px; }
  .brand { width: min(125px,34vw); }
  .header-actions { display: flex; grid-column: 2; gap: 4px; }
  .home-lang-switch { display: flex; }
  .home-lang-switch button { min-width: 25px; height: 25px; padding-inline: 4px; font-size: 9px; }
  .theme-toggle { width: 32px; height: 32px; flex-basis: 32px; }
  .mobile-menu-button { grid-column: 4; width: 32px; height: 32px; }
  .hero-buttons { grid-template-columns: 1fr 1fr; gap: 7px; }
  .hero-buttons .button { min-width: 0; min-height: 39px; padding-inline: 10px; font-size: 10px; }
  .section-mini-header > a { display: none; }
  .footer-grid > section:nth-child(3),
  .footer-grid > section:nth-child(4),
  .footer-grid > section:nth-child(5) { display: none; }
}

/* Unified hero/deck stage and minimal footer. */
.hero-stage {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-image: var(--hero-image-light);
  background-position: center;
  background-size: cover;
}
.hero-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg,rgba(248,244,238,.98) 0 34%,rgba(248,244,238,.76) 52%,rgba(248,244,238,.26) 100%);
  pointer-events: none;
}
.hero-stage > * { position: relative; z-index: 1; }
.hero-stage .hero-background { display: none; }
.hero-stage .hero { min-height: 275px; border-bottom: 0; background: transparent; }
.hero-stage .hero::before { display: none; }
.hero-stage .hero-grid { min-height: 245px; }
.hero-stage .hero-visual { min-height: 150px; padding: 0 0 0; }
.hero-stage .hero-feature-strip { margin-top: 0; }
.hero-stage .content-deck { padding-top: 8px; background: transparent; }

.deck-grid { grid-template-columns: minmax(0,7fr) minmax(290px,3fr); align-items: stretch; }
.deck-section { display: flex; flex-direction: column; }
.system-grid { flex: 1; }
.article-carousel { flex: 1; display: flex; min-height: 0; flex-direction: column; }
.article-track { flex: 1; min-height: 0; }
.article-slide { height: 100%; display: grid; grid-template-rows: minmax(0,1fr) auto; }
.article-slide .article-image-link { height: 100%; min-height: 180px; }

.login-button,
.systems-button,
.button,
.small-button,
.community-button { justify-content: center; text-align: center; }

.footer-grid-minimal {
  grid-template-columns: minmax(190px,1.05fr) minmax(250px,1.45fr) minmax(180px,.9fr) minmax(210px,1.1fr);
  align-items: center;
  gap: 18px;
  padding: 15px 18px;
}
.footer-grid-minimal > section { min-width: 0; }
.footer-grid-minimal .footer-column { align-self: center; }
.footer-grid-minimal .footer-brand img { width: 170px; }
.footer-motto {
  width: 170px;
  margin: 5px 0 0 !important;
  color: var(--text-strong) !important;
  font-family: "Manrope",sans-serif;
  font-size: 10px !important;
  font-weight: 650;
  line-height: 1.3 !important;
  text-align: center;
  white-space: nowrap;
}
.footer-column h3 { margin-bottom: 6px; }
.footer-links-inline,
.footer-contact .contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.footer-links-inline a,
.footer-contact a,
.footer-contact span { white-space: nowrap; }
.footer-bottom { padding-top: 7px; }

@media(max-width:1050px){
  .deck-grid { grid-template-columns: 1fr; }
  .deck-section + .deck-section { border-left: 0; border-top: 1px solid var(--line); }
  .footer-grid-minimal { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid-minimal .footer-brand { grid-column: 1 / -1; display: grid; justify-items: center; }
}

@media(max-width:760px){
  .hero-stage { background-position: 62% center; }
  .hero-stage::before { background: rgba(248,244,238,.88); }
  .hero-stage .hero { min-height: auto; }
  .hero-stage .hero-grid { min-height: 0; }
  .footer-grid-minimal { grid-template-columns: 1fr 1fr; gap: 13px 18px; }
  .footer-grid-minimal > section:nth-child(n) { display: block; }
  .footer-grid-minimal .footer-brand { grid-column: 1 / -1; display: grid; justify-items: center; }
}

@media(max-width:480px){
  .footer-grid-minimal { grid-template-columns: 1fr; padding: 14px 15px; text-align: center; }
  .footer-grid-minimal > section { display: block !important; }
  .footer-links-inline,
  .footer-contact .contact-list { justify-content: center; }
}

/* Responsive correction: readable cards, consistent gaps and one mobile layout. */
.system-description {
  display: block;
  min-height: 3.1em;
  margin: 8px 0 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.system-card { min-height: 218px; }
.system-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.system-card-actions .small-button { margin-top: 0; }
.system-detail-link {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.system-detail-link:hover { color: var(--blue); }
.hero-stage { padding-bottom: 15px; }
.community { margin-top: 24px; margin-bottom: 18px; }
.site-footer { padding-top: 8px; }

@media(max-width:760px){
  body { font-size: 13px; }
  .site-header { position: sticky !important; padding-top: 5px; }
  .header-shell {
    width: calc(100% - 12px);
    min-height: 52px;
    grid-template-columns: minmax(0,1fr) auto auto;
    grid-template-rows: 1fr;
    gap: 6px;
    padding: 5px 8px 5px 12px;
    border-radius: 13px;
  }
  .brand { grid-column: 1; grid-row: 1; width: 124px; }
  .header-actions { grid-column: 2; grid-row: 1; display: flex; gap: 4px; }
  .header-actions .icon-button,.header-actions .login-button { display: none; }
  .home-lang-switch { display: flex; }
  .home-lang-switch button { min-width: 25px; width: 25px; height: 25px; padding: 0; font-size: 8px; }
  .theme-toggle { width: 32px; height: 32px; flex-basis: 32px; }
  .mobile-menu-button { grid-column: 3; grid-row: 1; width: 34px; height: 34px; }

  .hero-stage { padding-bottom: 10px; background-position: 68% top; }
  .hero-stage .hero { padding: 12px 0 14px; }
  .hero-copy { width: 100%; min-width: 0; padding: 8px 2px 0; text-align: left; overflow: hidden; }
  .hero h1 { width: 100% !important; max-width: 100%; font-size: 29px; line-height: 1.18; white-space: nowrap; }
  .hero-copy > p { width: 100% !important; max-width: 100%; margin-top: 8px; font-size: 11px; line-height: 1.5; white-space: nowrap; }
  .hero-buttons { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 7px; margin-top: 12px; }
  .hero-buttons .button { width: 100%; min-width: 0; max-width: 100%; min-height: 36px; padding: 0 7px; gap: 5px; font-size: 9px; overflow: hidden; }
  .hero-buttons .button [data-fit-text] { min-width: 0; width: 100% !important; }

  .content-deck { padding: 6px 0 0; }
  .deck-grid { width: calc(100% - 12px); border-radius: 13px; }
  .deck-section { padding: 11px 10px 12px; }
  .section-mini-header { min-height: 22px; margin-bottom: 8px; }
  .section-mini-header h2 { font-size: 10px; }
  .section-mini-header > a { display: inline; font-size: 8px; }

  .system-grid { grid-template-columns: 1fr; gap: 7px; }
  .system-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) 64px;
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: 1px 9px;
    padding: 9px 10px;
    border-radius: 11px;
  }
  .system-icon { grid-column: 1; grid-row: 1 / 4; width: 34px; height: 34px; margin: 0; border-radius: 9px; }
  .system-icon svg { width: 21px; height: 21px; }
  .system-card h3 { grid-column: 2; grid-row: 1; font-size: 13px; }
  .system-subtitle { grid-column: 2; grid-row: 2; font-size: 8px; }
  .system-description {
    grid-column: 2; grid-row: 3;
    min-height: 0; margin: 3px 0 0;
    font-size: 9px; line-height: 1.4;
    -webkit-line-clamp: 2;
  }
  .system-card-actions { grid-column: 3; grid-row: 1 / 4; width: 64px; display: grid; justify-items: stretch; gap: 5px; margin: 0; }
  .system-detail-link { font-size: 8px; }
  .small-button { width: 32px; min-width: 32px; min-height: 32px; justify-self: end; padding: 0; gap: 0; font-size: 10px; }
  .small-button [data-fit-text],.small-button span:first-child { display: none; }
  .small-button span:last-child { display: block; width: auto; }

  .article-slide .article-image-link { height: clamp(150px,44vw,190px); min-height: 0; }
  .article-slide-copy { min-height: 57px; padding: 8px 10px; }
  .article-slide-copy h3 { font-size: 11px; }
  .article-dots { min-height: 18px; padding-top: 6px; }

  .community { width: calc(100% - 12px); margin-top: 14px; margin-bottom: 12px; border-radius: 13px; }
  .community-copy { padding: 11px 12px 6px; }
  .community-copy h2 { font-size: 15px; }
  .community-points article { min-height: 60px; }
  .community-points strong { font-size: 9px; }
  .community-button { min-height: 34px; margin: 9px auto 11px; font-size: 9px; }

  .footer-grid-minimal { width: calc(100% - 12px); gap: 10px 14px; padding: 12px; }
  .footer-grid-minimal .footer-brand img { width: 138px; }
  .footer-motto { width: 138px; font-size: 8px !important; }
  .footer-grid h3 { font-size: 8px; }
  .footer-links a,.contact-list a,.contact-list>span { font-size: 8px; }
  .footer-bottom { width: calc(100% - 12px); font-size: 8px; }
}

@media(max-width:390px){
  .brand { width: 108px; }
  .header-actions .home-lang-switch { display: none; }
  .hero-buttons { grid-template-columns: 1fr; }
  .footer-grid-minimal { grid-template-columns: 1fr; text-align: center; }
  .footer-links-inline,.footer-contact .contact-list { justify-content: center; }
}

/* Keep the homepage and inner-page subscription controls on one scale. */
.subscribe-form { grid-template-columns: 1fr 32px; padding: 1px; }
.subscribe-form input { height: 30px; padding-inline: 10px; font-size: 10px; font-weight: 400; }
.subscribe-form button { width: 30px; height: 30px; }
