/* The legal pages (public/terms/, public/privacy/ in English and their twins in the room's other languages under
   public/<language>/, as /vi/terms/): plain reading pages in the room's colours, no script. Linked from the [?] menu's
   About tab and under both pay buttons (abouttab.ts), each in the page's language (shared/langs.js legalPath). */
:root {
  --ink: #3b2a20;
  --ink-soft: #6b4a36;
  --cream: #fff7ec;
  --cream-2: #f6e7d5;
  --sand: #ead6bf;
  --coral-deep: #c45f2e;
  --wood: #9c5428;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream-2);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.6 "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

/* each text in its language's fonts: Chinese, Japanese, Korean and Thai in the device's own after Nunito, as in the room
   (src/styles/base.css). Set on every element, not only the page's, so that a language's name in the line of languages
   (lang="vi" on a Japanese page) is drawn in its own: in the Japanese fonts "Tiếng Việt" lost its stacked accents.
   Korean wraps between words, not inside one. */
:lang(en),
:lang(vi),
:lang(es) {
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

:lang(zh) {
  font-family: "Nunito", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", system-ui, sans-serif;
}

:lang(ja) {
  font-family: "Nunito", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP",
    "Noto Sans CJK JP", system-ui, sans-serif;
}

:lang(ko) {
  font-family: "Nunito", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
  word-break: keep-all;
}

:lang(th) {
  font-family: "Nunito", "Thonburi", "Leelawadee UI", "Noto Sans Thai", system-ui, sans-serif;
}

header,
main,
footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 12px;
}

.home {
  font-size: 22px;
  font-weight: 800;
  color: var(--wood);
  text-decoration: none;
}

nav {
  font-size: 15px;
  color: var(--ink-soft);
}

/* the same page in the other languages: a quiet line under the header, the page's own language not a link */
.langs {
  flex-basis: 100%;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.langs [aria-current] {
  font-weight: 700;
  color: var(--ink);
}

main {
  background: var(--cream);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 var(--sand);
  padding: 8px 28px 24px;
}

h1 {
  margin: 20px 0 0;
  font-size: 28px;
  line-height: 1.25;
  color: var(--wood);
}

.updated {
  margin: 4px 0 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

h2 {
  margin: 28px 0 6px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink);
  scroll-margin-top: 16px;
}

p,
li {
  margin: 6px 0;
}

ul {
  padding-left: 22px;
}

a {
  color: var(--coral-deep);
  text-underline-offset: 2px;
}

footer {
  padding-top: 16px;
  padding-bottom: 32px;
}

/* the section a link points at (the refunds from under a pay button) */
h2:target {
  color: var(--coral-deep);
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  main {
    border-radius: 18px;
    padding: 4px 18px 18px;
  }

  h1 {
    font-size: 24px;
  }
}
