/* Trà đá website. One shared stylesheet, no JavaScript, no external requests.
   Colors are the app's Xanh trà palette (design/brand/palette.json), light and dark.
   Hex values live only here on :root; every component rule reads the custom properties. */

:root {
  color-scheme: light dark;
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --surface-variant: #F3F6F5;
  --text: #242B27;
  --text-secondary: #626D65;
  --primary: #356859;
  --primary-hover: #2D584C;
  --divider: #DEDFDF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121916;
    --surface: #1D2822;
    --surface-variant: #29362F;
    --text: #E4E9E4;
    --text-secondary: #A5B4AA;
    --primary: #97B7A5;
    --primary-hover: #A7C2B2;
    --divider: #3F4943;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--primary-hover);
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Header */

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

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

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 22%;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  font-size: 15px;
}

.site-nav a {
  text-decoration: none;
  padding: 4px 0;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 640px) {
  .site-nav {
    margin-left: auto;
  }
}

/* Content */

main {
  flex: 1;
  padding-top: 32px;
  padding-bottom: 56px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 12px;
}

h1 {
  font-size: 30px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 22px;
  margin-top: 40px;
}

h3 {
  font-size: 18px;
  margin-top: 28px;
  margin-bottom: 6px;
}

p,
ul,
ol {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 1.3em;
}

li {
  margin-bottom: 6px;
}

hr {
  border: 0;
  border-top: 1px solid var(--divider);
  margin: 48px 0;
}

.meta {
  color: var(--text-secondary);
  font-size: 15px;
}

.summary {
  background: var(--surface-variant);
  border-radius: 12px;
  padding: 14px 16px 14px 36px;
  margin-bottom: 24px;
}

.summary li:last-child {
  margin-bottom: 0;
}

/* The English half of a legal page sits under one h2, so its sections are h3. */

.en h3 {
  font-size: 20px;
  margin-top: 32px;
}

/* Home */

.hero {
  text-align: center;
  padding-top: 8px;
}

.hero img {
  width: 96px;
  height: 96px;
  border-radius: 22%;
  display: block;
  margin: 0 auto 20px;
}

.hero h1 {
  font-size: 34px;
}

.tagline {
  font-size: 20px;
  line-height: 1.45;
  color: var(--text-secondary);
  max-width: 30em;
  margin: 0 auto 20px;
}

.hero .intro {
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 10px;
}

.features li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 12px 16px;
}

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

/* 404 */

.notfound {
  text-align: center;
  padding-top: 40px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--divider);
  padding-top: 20px;
  padding-bottom: 32px;
  font-size: 15px;
  color: var(--text-secondary);
}

.site-footer p {
  margin: 0 0 8px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}
