/* Jones Wang：簡潔、可讀、無外部字型與框架。 */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1b1c1d;
  --muted: #5f6266;
  --line: #e2e0d9;
  --accent: #1d5c52;
  --accent-soft: #e3eeeb;
  --focus: #2f7d70;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314;
    --surface: #1a1b1d;
    --text: #ecebe7;
    --muted: #a3a6aa;
    --line: #2c2e31;
    --accent: #7cc4b6;
    --accent-soft: #1d2d2a;
    --focus: #9ad8cb;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--line);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

.shell {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-left)) 0 max(1.25rem, env(safe-area-inset-right));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.75rem 0 1.5rem;
}
.wordmark {
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-header ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--text); }
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

main { flex: 1; }

/* Hero / page heading */
.hero { padding: 4.5rem 0 3rem; }
.page-head { padding: 3.5rem 0 1rem; }

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 650;
}
h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  letter-spacing: -0.03em;
}
.page-head h1 { font-size: clamp(2rem, 5.5vw, 2.6rem); }

.lead {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  font-size: 1.15rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}
.page-head + .section { border-top: 0; }
.section p { margin: 0 0 0.75rem; }
.section > :last-child { margin-bottom: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.3rem;
}
.index {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.more {
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--accent);
  text-decoration: none;
}
.more::after { content: " →"; }
.more:hover { text-decoration: underline; }

.note,
.empty {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Entries */
.entries {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}
.entry {
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.entry h2,
.entry h3 {
  margin: 0;
  font-size: 1.05rem;
}
.entry p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.97rem;
}
.status,
.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

/* Private entry */
.private { padding: 4.5rem 0 3rem; }

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 0 max(2rem, env(safe-area-inset-bottom));
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .hero { padding: 3rem 0 2.25rem; }
  .page-head { padding: 2.5rem 0 0.75rem; }
  .site-header { padding: 1.25rem 0 1rem; }
  .site-header ul { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* Actions（登出等按鈕） */
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2rem;
}
.button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
}
.button:hover { border-color: var(--accent); color: var(--accent); }
