/* CanBake web — Thai Tea design system tokens
   Source of truth: specs/004-design-system/design-system/tokens/ */

:root {
  --hojicha-0: #FFFCF6;
  --hojicha-50: #F7F1E8;
  --hojicha-100: #ECDDCB;
  --hojicha-600: #6E5236;
  --hojicha-700: #5D4530;
  --hojicha-800: #3A2A1D;
  --hojicha-900: #281D14;
  --thai-tea-100: #FCEAD2;
  --thai-tea-500: #E78A2C;
  --thai-tea-800: #8A4D10;

  --canvas: var(--hojicha-50);
  --paper: var(--hojicha-0);
  --border: var(--hojicha-100);
  --text: var(--hojicha-800);
  --text-secondary: var(--hojicha-700);
  --text-muted: var(--hojicha-600);
  --link: var(--thai-tea-800);
  --accent: var(--thai-tea-500);
  --accent-tint: var(--thai-tea-100);

  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans Thai", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: var(--hojicha-900);
    --paper: #32241A;
    --border: #4A3626;
    --text: #F5EBE0;
    --text-secondary: #DCC9B4;
    --text-muted: #C0A88F;
    --link: #F2A64F;
    --accent: #F2A64F;
    --accent-tint: #4A3626;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  background: var(--accent);
  color: var(--hojicha-900);
  font-size: 15px;
  font-weight: 700;
}

nav.site a {
  color: var(--link);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 0.5rem 0.25rem;
  display: inline-block;
  min-height: 44px;
  line-height: 28px;
}

nav.site a:hover,
nav.site a:focus-visible { text-decoration: underline; }

nav.site a + a { margin-left: 1rem; }

h1 {
  font-size: 34px;
  line-height: 40px;
  letter-spacing: -0.4px;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.2px;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

p, li { color: var(--text-secondary); }

a { color: var(--link); }

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

.lede {
  font-size: 17px;
  line-height: 26px;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.meta {
  font-size: 13px;
  line-height: 18px;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 15px;
}

.table-scroll { overflow-x: auto; }

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

th {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.card :first-child { margin-top: 0; }
.card :last-child { margin-bottom: 0; }

.notice {
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 15px;
}

.notice :first-child { margin-top: 0; }
.notice :last-child { margin-bottom: 0; }

footer.site {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 18px;
  color: var(--text-muted);
}

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

.lang-switch {
  font-size: 14px;
  font-weight: 500;
}

:lang(th) { line-height: 1.8; }
