/* Shared shell for every page under butlerai.duchuynh.dev. */
:root {
  --bg: #f6f5f3;
  --surface: #ffffff;
  --border: #e2ded8;
  --text: #1b1a18;
  --muted: #6b6862;
  --accent: #7a5c3e;
  --accent-text: #ffffff;
  --danger-bg: #fdf3f1;
  --danger-border: #e8c9c1;
  --danger-text: #8a3a25;
  --ok-bg: #f0f6f0;
  --ok-border: #c8ddc8;
  --ok-text: #2f5c33;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16151a;
    --surface: #1e1d23;
    --border: #34323a;
    --text: #edeaf0;
    --muted: #a09daa;
    --accent: #c8a883;
    --accent-text: #20180f;
    --danger-bg: #2c1c19;
    --danger-border: #5a3830;
    --danger-text: #f0b3a2;
    --ok-bg: #1a2620;
    --ok-border: #33513f;
    --ok-text: #a8d9b8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

/* Language switching: only elements matching the active language are shown. */
html[data-lang="vi"] [data-l="en"],
html[data-lang="en"] [data-l="vi"] { display: none !important; }

.wrap { max-width: 960px; margin: 0 auto; padding: 32px 20px 64px; }

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand a { color: inherit; text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; }

.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }

nav.pages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  margin: -16px 0 28px;
}
nav.pages a[aria-current="page"] { color: var(--muted); text-decoration: none; }

h1 { font-size: 28px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 17px; margin: 0 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 15px; margin: 18px 0 6px; }
p { margin: 0 0 14px; }
.lede { color: var(--muted); margin-bottom: 28px; }
.updated { color: var(--muted); font-size: 14px; margin: -6px 0 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.card :last-child { margin-bottom: 0; }
ul { margin: 0 0 14px; padding-left: 20px; }
li { margin-bottom: 6px; }
li:last-child { margin-bottom: 0; }

.note {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 15px;
}
.note p:last-child { margin-bottom: 0; }

.cta {
  display: inline-block;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 20px;
}

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; margin: -2px 0 8px; }
input[type="email"], input[type="text"], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 18px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; }
.check input { margin-top: 5px; flex: none; }
.check label { font-weight: 400; font-size: 14px; margin: 0; }

button.submit {
  width: 100%;
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  cursor: pointer;
}
button.submit[disabled] { opacity: 0.55; cursor: progress; }

.status { margin-top: 16px; border-radius: var(--radius); padding: 14px 16px; font-size: 15px; }
.status.ok { background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-text); }
.status.err { background: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--danger-text); }
.status[hidden] { display: none; }

footer {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-top: 32px;
}
footer a { color: inherit; }
a { color: var(--accent); }
