/* Chalkroll site. Same palette as the app (app/lib/core/theme). No web fonts
   from third parties: the fonts ship with the site, so a visit to the privacy
   policy does not send the visitor's address to anyone else. */

@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --paper: #faf8f2;
  --tile: #ffffff;
  --ink: #17251e;
  --ink-2: #55625a;
  --rule: #e6e2d5;
  --link: #1e5a46;
  --board: #1d4b3c;
  --chalk: #f5f2e8;
  --chalk-2: #bfd4c8;
  --tick: #fbe38a;
  --note: #fff7d6;
  --note-ink: #3a2f00;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #122019;
    --tile: #1a2a22;
    --ink: #e8eee9;
    --ink-2: #a8b8ae;
    --rule: #2c3f35;
    --link: #8fd3b4;
    --board: #0d1712;
    --chalk: #eef2e9;
    --chalk-2: #a2b8ab;
    --tick: #f3d66b;
    --note: #2e2a14;
    --note-ink: #fff1b8;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
}

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

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

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--tile);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Board header */
.board {
  background: var(--board);
  color: var(--chalk);
}
.board-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--chalk);
  text-decoration: none;
  font: 800 24px/1 "Bricolage Grotesque", "Figtree", sans-serif;
  letter-spacing: -0.01em;
}
.brand svg {
  width: 36px;
  height: 36px;
  flex: none;
}
.board-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
}
.lang-switch a {
  display: inline-block;
  color: var(--chalk);
  border: 1px solid var(--chalk-2);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.lang-switch a:hover {
  border-color: var(--tick);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-weight: 600;
  font-size: 15px;
}
.nav a {
  color: var(--chalk-2);
  text-decoration: none;
  padding: 6px 0;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--chalk);
  text-decoration: underline;
  text-decoration-color: var(--tick);
  text-decoration-thickness: 2px;
}

/* Hero (home page only) */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}
.hero h1 {
  font: 800 clamp(34px, 7vw, 52px)/1.05 "Bricolage Grotesque", "Figtree",
    sans-serif;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.hero p {
  color: var(--chalk-2);
  font-size: 19px;
  margin: 0;
  max-width: 34em;
}

/* Content */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}
h1,
h2,
h3 {
  font-family: "Bricolage Grotesque", "Figtree", sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
main h1 {
  font-size: clamp(30px, 6vw, 40px);
  margin: 0 0 8px;
}
main h2 {
  font-size: 23px;
  margin: 40px 0 10px;
  scroll-margin-top: 16px;
}
main h3 {
  font-size: 18px;
  margin: 24px 0 6px;
}
.meta {
  color: var(--ink-2);
  font-size: 15px;
  margin: 0 0 24px;
}
p,
li {
  max-width: 42em;
}
ul,
ol {
  padding-left: 1.3em;
}
li + li {
  margin-top: 4px;
}

.summary,
.card {
  background: var(--tile);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 20px 0;
}
.summary h2,
.card h2 {
  margin-top: 4px;
  font-size: 20px;
}
.note {
  background: var(--note);
  color: var(--note-ink);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 16px 0;
}

.toc {
  border-left: 3px solid var(--rule);
  padding-left: 16px;
  margin: 24px 0 8px;
}
.toc ol {
  margin: 8px 0 0;
}
.toc a {
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}
th {
  font-weight: 700;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  min-height: 32px;
  margin-top: 12px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--board);
  color: var(--chalk);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.features li {
  background: var(--tile);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0;
}
.features strong {
  display: block;
  margin-bottom: 2px;
}

footer {
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 15px;
}
.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}
.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

/* Korean pages. The site's fonts have no Hangul, so Korean text uses the
   phone's own Korean font; Latin letters keep Figtree and Bricolage. */
html:lang(ko) body {
  font-family: "Figtree", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
html:lang(ko) h1,
html:lang(ko) h2,
html:lang(ko) h3 {
  font-family: "Bricolage Grotesque", "Pretendard", "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  letter-spacing: 0;
  line-height: 1.3;
}

@media print {
  .board,
  footer,
  .skip,
  .lang-switch,
  .toc {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  main {
    padding: 0;
  }
  a {
    color: #000;
  }
}
