:root {
  color-scheme: light;
  --ink: #283627;
  --leaf: #3a5637;
  --paper: #f9f7ee;
  --line: #d9dece;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.65; }
header, main, footer { width: min(66rem, calc(100% - 2.5rem)); margin-inline: auto; }
header, footer { padding-block: 1.25rem; }
header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; border-bottom: 1px solid var(--line); }
main { padding-block: 2rem 3rem; }
footer { border-top: 1px solid var(--line); }
a { color: var(--leaf); text-underline-offset: .2em; }
a:hover { color: #172a14; }
:focus-visible { outline: 3px solid #996237; outline-offset: 3px; }
.brand { font-weight: 750; text-decoration: none; }
.brand span { color: #875434; }
h1, h2, h3, p { margin: 0 0 .75rem; }
h1, h2 { line-height: 1.12; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.hero { background: #e7ecd8; padding: clamp(1.5rem, 6vw, 4.5rem); border-radius: 1.25rem; }
.hero h1 { font-family: system-ui, sans-serif; font-size: clamp(3rem, 9vw, 6.5rem); letter-spacing: -.055em; }
.hero p, .intro { font-size: 1.15rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.pill { padding: .35rem .85rem; border: 1px solid #8a9a78; border-radius: 999px; text-decoration: none; }
.topic { margin-top: 2.25rem; scroll-margin-top: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; }
.card, .panel { background: #fffdf7; padding: clamp(1.15rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 1rem; }
.card p { margin-bottom: 0; }
.article, .panel { max-width: 46rem; margin-inline: auto; }
.category { margin-top: 1.5rem; font-weight: 700; color: var(--leaf); }
.article-body { margin-top: 1.5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
form label { display: block; margin: 0 0 1rem; font-weight: 650; }
input, textarea, select { display: block; width: 100%; padding: .65rem; border: 1px solid #8a9a78; border-radius: .4rem; font: inherit; color: inherit; background: white; }
textarea { resize: vertical; }
button, .button { display: inline-block; background: var(--leaf); color: white; border: 1px solid var(--leaf); border-radius: .45rem; padding: .55rem .9rem; font: inherit; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: #263e24; color: white; }
.secondary { background: transparent; color: var(--leaf); }
.listing { list-style: none; padding: 0; }
.listing li { display: flex; gap: .65rem 1rem; flex-wrap: wrap; padding: .85rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.error { color: #962b23; }

.skip-link {
  position: absolute;
  z-index: 1;
  top: .5rem;
  left: .5rem;
  transform: translateY(-150%);
  background: white;
  padding: .6rem 1rem;
}
.skip-link:focus { transform: translateY(0); }
.hero {
  display: grid;
  align-content: center;
  min-height: clamp(18rem, 48vw, 29rem);
  background: radial-gradient(ellipse at top right, #f6dfbc, transparent 60%), #e7ecd8;
}
.hero p { max-width: 34ch; margin-bottom: 0; }
.topics { display: flex; flex-wrap: wrap; gap: .65rem; margin-block: 1rem 1.35rem; }
.pill[aria-current="true"] { background: var(--leaf); color: white; }
.card { position: relative; overflow-wrap: anywhere; }
.card h3 { font-size: 1.25rem; line-height: 1.3; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p.card-topic { margin-bottom: .65rem; color: #465a43; font-weight: 700; font-size: .875rem; }
.card[data-topic="Học tập"] { border-top: .3rem solid #77936c; }
.card[data-topic="Nghỉ ngơi"] { border-top: .3rem solid #c08554; }
.card[data-topic="Kết nối"] { border-top: .3rem solid #9484a9; }
.preview-banner { padding: .75rem 1rem; background: #e7ecd8; border-radius: .45rem; }
