/* keepupkorean.com: the colors of the app (src/theme.ts, docs/design/brand.md), the system font,
   light and dark by the system's setting. Built into site/dist by scripts/site-build.ts. */

:root {
  color-scheme: light dark;
  --ground: #FBF7F3;
  --surface: #FFFFFF;
  --surface-muted: #F3EDE6;
  --text: #221A14;
  --text-muted: #73675C;
  --border: #EADFD4;
  --accent: #C2500C;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #16120F;
    --surface: #221C18;
    --surface-muted: #2D2621;
    --text: #F5EEE8;
    --text-muted: #A89B90;
    --border: #3A312A;
    --accent: #FF8A3D;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

:lang(ko) {
  word-break: keep-all;
}

.site-header,
main,
.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  height: 32px;
  width: auto;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.langs a {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
}

.langs a:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.langs a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-muted);
  font-weight: 600;
}

main {
  padding-bottom: 48px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  scroll-margin-top: 16px;
}

h1 {
  font-size: 32px;
  margin: 16px 0 4px;
}

h2 {
  font-size: 23px;
  margin: 40px 0 12px;
}

h3 {
  font-size: 19px;
  margin: 28px 0 8px;
}

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

ul,
ol {
  padding-left: 24px;
}

li {
  margin: 4px 0;
}

li > ul,
li > ol {
  margin: 4px 0 0;
}

li > p {
  margin: 0 0 8px;
}

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

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

strong {
  font-weight: 600;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-muted);
}

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

.updated {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}

/* Tables scroll sideways on a phone instead of widening the page. */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  line-height: 1.45;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  min-width: 120px;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-muted);
  font-weight: 600;
}

.align-center {
  text-align: center;
}

.align-right {
  text-align: right;
}

/* The store pages: every language one after another. */
.lang-section + .lang-section {
  margin-top: 56px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.home h1 {
  font-size: 40px;
  margin-top: 24px;
}

.tagline {
  font-size: 20px;
  margin-bottom: 8px;
}

.home .lang-section + .lang-section {
  margin-top: 32px;
  padding-top: 24px;
}

.not-found h1 {
  font-size: 56px;
  margin-top: 32px;
}

.site-footer {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 15px;
}

.page-links {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.page-links li {
  margin: 0;
}

.site-footer .page-links a {
  color: var(--text-muted);
}

.site-footer .page-links a:hover {
  color: var(--text);
}

.contact {
  margin: 0;
}

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

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 21px;
  }
}
