/* Neobuster Studio: one stylesheet for every page. Text colours stay at 4.5:1 or more on their background. */
:root {
  --bg: #fbf9f6;
  --surface: #ffffff;
  --text: #1d1b19;
  --muted: #57524b;
  --line: #e7e1d8;
  --accent: #b03f1a;
  --accent-soft: #fdeee6;
  --radius: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151413;
    --surface: #1f1d1b;
    --text: #f2efea;
    --muted: #c2bbb2;
    --line: #36312c;
    --accent: #ff9c76;
    --accent-soft: #3a2419;
    color-scheme: dark;
  }
}

/* One language at a time once the script has picked it; without the script both show. */
html[data-lang="vi"] [data-l="en"],
html[data-lang="en"] [data-l="vi"] { display: none !important; }
html:not([data-lang]) span[data-l="en"]::before { content: " / "; }
.lang-switch { display: none; }
html[data-lang] .lang-switch { display: inline-flex; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; }
:lang(ko) { word-break: keep-all; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 600px) { .wrap { padding: 0 24px; } }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.lang-switch button {
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1;
  color: var(--muted); background: transparent; border: 0; border-radius: 999px;
  padding: 8px 12px; min-width: 44px; min-height: 36px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* Studio home */
.hero { padding: 56px 0 32px; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; margin: 0; }
.section-title { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 32px 0 14px; }

.app-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
@media (max-width: 420px) { .app-card { flex-direction: column; gap: 12px; } }
.app-icon { width: 72px; height: 72px; flex: none; border-radius: 18px; }
.app-card h3 { margin: 0; font-size: 1.35rem; }
.app-card h3 a { color: var(--text); text-decoration: none; }
.app-card h3 a:hover { text-decoration: underline; }
.app-card p { margin: 4px 0 0; }
.chip {
  display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text); font-size: 0.85rem; font-weight: 600;
}
.links { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }

.contact { margin: 40px 0 56px; }
.contact p { margin: 0; }
.contact .mail { font-size: 1.2rem; font-weight: 700; }

/* App page */
.app-hero { display: flex; gap: 20px; align-items: center; padding: 48px 0 8px; }
.app-hero .app-icon { width: 96px; height: 96px; border-radius: 24px; }
.app-hero h1 { margin: 0; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.1; letter-spacing: -0.02em; }
.app-hero .tagline { margin: 6px 0 0; color: var(--muted); font-size: 1.1rem; }
.features { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.features b { display: block; }
.note { color: var(--muted); }

/* Sub-navigation of an app's pages */
.appnav { border-bottom: 1px solid var(--line); }
.appnav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding-top: 10px; padding-bottom: 10px; font-weight: 600; font-size: 0.95rem; }
.appnav .home { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; margin-right: 6px; }
.appnav .home img { width: 24px; height: 24px; border-radius: 6px; }
.appnav a[aria-current="page"] { color: var(--text); text-decoration: none; border-bottom: 2px solid var(--accent); }

/* Legal pages */
.prose { max-width: 720px; padding: 36px 0 56px; }
.prose h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 6px; }
.prose h2 { font-size: 1.2rem; margin: 30px 0 8px; }
.prose .updated { color: var(--muted); margin: 0 0 20px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.lang-block + .lang-block { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 32px; }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 22px; padding-bottom: 32px; }
.foot p { margin: 0; }
.foot a { color: var(--muted); }

.notfound { padding: 72px 0; }
.notfound h1 { font-size: 2rem; margin: 0 0 8px; }
