/* Static legal + support pages (/privacy, /terms, /support).
   Standalone on purpose: no app bundle, no web fonts, no third-party requests.
   Tokens mirror src/styles/global.css (flat black, white type, greys, hairlines). */

:root {
  --bg: #000;
  --line: #2a2a2a;
  --line-row: #1e1e1e;
  --fg: #fff;
  --fg-2: #e6e6e6;
  --fg-3: #d0d0d0;
  --dim: #9a9a9a;
  --faint: #6a6a6a;
  --gutter: 16px;
  --col: 480px;
  --sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #050505;
}
body {
  margin: 0;
  background: #050505;
  color: var(--fg-3);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
.page {
  max-width: var(--col);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}
@media (min-width: 482px) {
  .page {
    border-inline: 1px solid #1a1a1a;
  }
}
/* laptops and up: a wider reading column (≈ 40 CJK characters a line), same page otherwise */
@media (min-width: 768px) {
  .page {
    max-width: 760px;
    padding: 48px 56px 72px;
    border-inline: 0;
  }
  body {
    font-size: 16px;
  }
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: #5a5a5a;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--fg);
}
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.mono,
code {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92em;
}

/* top: back to the site + the three pages */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.96px;
}
.top a {
  color: var(--dim);
  text-decoration: none;
  padding: 10px 0;
}
.top a:hover,
.top a[aria-current='page'] {
  color: var(--fg);
}
.top__home {
  white-space: nowrap;
}
.top nav {
  display: flex;
  gap: 14px;
}

h1 {
  margin: 32px 0 4px;
  color: var(--fg);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
}
.meta {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.48px;
}
h2 {
  margin: 32px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.96px;
}
h3 {
  margin: 20px 0 4px;
  color: var(--fg-2);
  font-size: 15px;
  font-weight: 500;
}
p,
ul {
  margin: 0 0 12px;
}
ul {
  padding-left: 1.1em;
}
li {
  margin-bottom: 6px;
}
strong {
  color: var(--fg-2);
  font-weight: 500;
}

/* the one sentence that must not be missed (not affiliated / not endorsed) */
.notice {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid #3a3a3a;
  color: var(--fg-2);
}

/* English version below the Chinese one */
.en {
  margin-top: 56px;
  padding-top: 8px;
  border-top: 1px solid var(--fg);
}
.en > h1 {
  margin-top: 24px;
}

.foot {
  margin-top: 48px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}
.foot a {
  color: var(--dim);
  text-decoration: none;
}
.foot a:hover {
  color: var(--fg);
}
.foot nav {
  margin-bottom: 6px;
}

/* contact form on /support */
.contact {
  display: grid;
  gap: 6px;
  margin: 16px 0 8px;
}
.contact label {
  margin-top: 10px;
  color: var(--fg-2);
  font-size: 0.93em;
}
.contact label [lang='en'],
.contact button [lang='en'] {
  color: var(--dim);
  margin-left: 4px;
}
.contact input,
.contact select,
.contact textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #3a3a3a;
  border-radius: 0;
  background: #0c0c0c;
  color: var(--fg);
  font: inherit;
  /* 16px keeps iOS Safari from zooming the page when a field takes focus */
  font-size: 16px;
  line-height: 1.5;
}
.contact textarea {
  resize: vertical;
  min-height: 132px;
}
.contact input:focus-visible,
.contact select:focus-visible,
.contact textarea:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 0;
  border-color: var(--fg);
}
.contact button {
  justify-self: start;
  margin-top: 16px;
  padding: 10px 22px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: #000;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.contact button [lang='en'] {
  color: #444;
}
.contact button:disabled {
  opacity: 0.5;
  cursor: default;
}
.contact__status {
  min-height: 1.75em;
  margin: 8px 0 0;
  color: var(--fg-2);
}
.contact__status[data-state='error'] {
  color: #ff9d8a;
}
/* a field people never see; software that fills every field gives itself away */
.contact__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
