/* 拾跡 WAYLEAF product site. Colours and type follow docs/brand.md (sections 4 and 5). */
@font-face {
  font-family: 'WAYLEAF WenKai';
  src: url('/fonts/wenkai-headings.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'WAYLEAF Jost';
  src: url('/fonts/jost-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #F1EBDD;
  --paper: #FBF8F1;
  --line: #DED5C2;
  --dashed: #B9AE97;
  --ink: #202722;
  --muted: #4F5A52;
  --primary: #285C4D;
  --primary-pressed: #1B4236;
  --copper: #B76A2D;
  --copper-text: #8E4F1E;
  --pin: #285C4D;
  --contour: #F1EBDD;
  --display: 'WAYLEAF WenKai', 'LXGW WenKai TC', 'Kaiti TC', 'BiauKai', serif;
  --latin: 'WAYLEAF Jost', 'Jost', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17201B;
    --paper: #1F2A24;
    --line: #34413A;
    --dashed: #4E5B53;
    --ink: #EDE6D6;
    --muted: #B9C2BA;
    --primary: #6FA58F;
    --primary-pressed: #8DBBA8;
    --copper: #E0A46E;
    --copper-text: #E0A46E;
    --pin: #F1EBDD;
    --contour: #17201B;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
}
main, header.site, footer.site {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { width: 28px; height: 37px; flex: none; }
.brand .pin { fill: var(--pin); }
.brand .contour { fill: none; stroke: var(--contour); stroke-width: 4.6; stroke-linejoin: round; }
.brand .core { fill: var(--copper); stroke: var(--copper); stroke-width: 1.5; stroke-linejoin: round; }
.brand .zh { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.08em; }
.brand .en { font-family: var(--latin); font-weight: 500; font-size: 12px; letter-spacing: 0.42em; color: var(--muted); }
.lang { font-size: 15px; }
.lang a, .lang span { margin-left: 10px; }
.lang span { color: var(--muted); }

.page {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 20px 24px;
  margin: 12px 0 24px;
}
@media (min-width: 600px) {
  .page { padding: 16px 40px 36px; }
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.4; }
h1 { font-size: 30px; margin: 20px 0 4px; }
h2 { font-size: 21px; margin: 32px 0 6px; padding-top: 16px; border-top: 1px dashed var(--dashed); }
h3 { font-size: 18px; margin: 24px 0 4px; }
:lang(en) h1, :lang(en) h2, :lang(en) h3 { font-family: var(--latin); font-weight: 500; letter-spacing: 0.01em; }
.updated { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.lede { font-size: 18px; }

p, ul, ol { margin: 0 0 12px; }
ul { padding-left: 1.3em; }
li { margin: 4px 0; }
li::marker { color: var(--copper); }
strong { font-weight: 600; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-pressed); }

.table-wrap { overflow-x: auto; margin: 8px 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.6; min-width: 520px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
/* On a phone each row is a small card: the first cell as its title, the others labelled. */
@media (max-width: 599px) {
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 2px 0; }
  td:first-child { font-weight: 600; }
  td + td::before { content: attr(data-label) '：'; color: var(--muted); }
  :lang(en) td + td::before { content: attr(data-label) ': '; }
}

.links { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; gap: 10px; }
.links a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  text-decoration: none;
  font-weight: 600;
}
.links a span { display: block; color: var(--muted); font-weight: 400; font-size: 15px; }
.en-block { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--dashed); }
.en-block h2 { border-top: 0; padding-top: 0; margin-top: 4px; }

footer.site { color: var(--muted); font-size: 14px; padding-bottom: 32px; }
footer.site p { margin: 0 0 4px; }
