/* day1 — GitHub Pages */

:root {
  --bg: #f4f6f9;
  --bg-elevated: #ffffff;
  --text: #141820;
  --text-muted: #5c6470;
  --text-subtle: #8b939e;
  --accent: #0f766e;
  --accent-light: #14b8a6;
  --accent-soft: rgba(15, 118, 110, 0.08);
  --border: rgba(20, 24, 32, 0.08);
  --shadow: 0 1px 2px rgba(20, 24, 32, 0.04), 0 8px 24px rgba(20, 24, 32, 0.06);
  --shadow-hover: 0 2px 4px rgba(20, 24, 32, 0.06), 0 16px 40px rgba(20, 24, 32, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 720px;
  --policy-width: 680px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", monospace;
}

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

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

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  padding: 24px 24px 0;
  width: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 700;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--accent);
}

/* Main */

.site-main {
  flex: 1;
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  padding: 32px 24px 64px;
  width: 100%;
}

/* Hero */

.hero {
  text-align: center;
  padding: 48px 0 56px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero p {
  margin: 0 auto;
  max-width: 420px;
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Section */

.section {
  margin-bottom: 48px;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin: 0 0 16px;
}

/* App card */

.app-grid {
  display: grid;
  gap: 16px;
}

.app-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.app-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.15);
}

.app-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0d9488 0%, #2dd4bf 50%, #5eead4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.app-info {
  flex: 1;
  min-width: 0;
}

.app-info h3 {
  margin: 0 0 4px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.app-info .subtitle {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.app-info .desc {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.875rem;
  line-height: 1.5;
}

.app-link {
  flex-shrink: 0;
  align-self: center;
  padding: 8px 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
  white-space: nowrap;
}

/* Contact card */

.contact-card {
  padding: 28px 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.contact-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Document / Privacy policy */

.policy-page {
  max-width: calc(var(--policy-width) + 80px);
}

.doc-header {
  margin-bottom: 28px;
  padding: 32px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.doc-eyebrow {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.doc-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.doc-lead {
  margin: 0 0 20px;
  max-width: 36em;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.doc-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  font-size: 0.875rem;
}

.doc-meta-label {
  color: var(--text-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doc-meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.doc-meta a:hover {
  text-decoration: underline;
}

.doc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  position: sticky;
  top: 12px;
  z-index: 2;
  padding: 10px 0;
  background: linear-gradient(var(--bg) 70%, transparent);
}

.doc-toc a {
  padding: 9px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  box-shadow: var(--shadow);
}

.doc-toc a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.lang-block {
  margin-bottom: 32px;
  padding: 8px 28px 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 72px;
}

.lang-block:last-child {
  margin-bottom: 0;
}

.lang-tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  margin: 24px 0 8px;
  letter-spacing: 0.04em;
}

.policy-page .lang-block > h2 {
  margin: 2rem 0 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.policy-page .lang-block > h2:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.policy-page .lang-block > p {
  margin: 0 0 0.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.policy-page .lang-block > p:last-child {
  margin-bottom: 0;
}

.policy-page .lang-block > ul {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.policy-page .lang-block > ul > li {
  position: relative;
  margin: 0;
  padding: 10px 0 10px 1.35rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.6;
}

.policy-page .lang-block > ul > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.policy-page .lang-block > ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

.policy-page .lang-block strong {
  color: var(--text);
  font-weight: 600;
}

.table-wrap {
  margin: 0.75rem 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.policy-page .table-wrap table {
  margin: 0;
  min-width: 520px;
  font-size: 0.9rem;
}

.policy-page .table-wrap th,
.policy-page .table-wrap td {
  padding: 14px 16px;
  vertical-align: top;
  line-height: 1.55;
}

.policy-page .table-wrap th {
  width: 34%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

.policy-page .table-wrap tr:last-child td,
.policy-page .table-wrap tr:last-child th {
  border-bottom: none;
}

.policy-page .table-wrap td {
  color: var(--text-muted);
}

/* Markdown content */

.site-main h2 {
  margin: 2em 0 0.75em;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-main h2:first-child {
  margin-top: 0;
}

.site-main h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.0625rem;
  font-weight: 600;
}

.site-main p {
  margin: 0 0 1em;
  color: var(--text);
}

.site-main ul,
.site-main ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: var(--text);
}

.site-main li {
  margin-bottom: 0.35em;
}

.site-main li::marker {
  color: var(--accent);
}

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

.site-main a:hover {
  color: var(--accent-light);
}

.site-main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.site-main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1em 0;
}

.site-main th,
.site-main td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.site-main th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-main strong {
  font-weight: 600;
}

/* Footer */

.site-footer {
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  padding: 32px 24px 40px;
  width: 100%;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

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

.site-footer a:hover {
  color: var(--accent);
}

/* Responsive */

@media (max-width: 560px) {
  .app-card {
    flex-direction: column;
    align-items: stretch;
  }

  .app-link {
    align-self: flex-start;
  }

  .lang-block {
    padding: 4px 18px 24px;
  }

  .doc-header {
    padding: 24px 20px;
  }

  .doc-toc {
    position: static;
    background: none;
    padding: 0;
  }

  .policy-page .table-wrap th {
    width: 38%;
  }

  .hero {
    padding: 32px 0 40px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --bg-elevated: #1a1d26;
    --text: #e8eaed;
    --text-muted: #9aa0a8;
    --text-subtle: #6b7280;
    --accent: #2dd4bf;
    --accent-light: #5eead4;
    --accent-soft: rgba(45, 212, 191, 0.1);
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.25), 0 16px 40px rgba(0, 0, 0, 0.4);
  }

  .app-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}
