/* KeyDBX 網站共用樣式。不載入外部字型或資源。 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f5f7;
  --text: #1c1d21;
  --muted: #5b5f68;
  --border: #dde0e5;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --warning-bg: #fff4d6;
  --warning-border: #e3b341;
  --warning-text: #5c4400;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1c1e22;
    --text: #eceef1;
    --muted: #a3a8b2;
    --border: #30333a;
    --accent: #7eaaf2;
    --accent-text: #111214;
    --warning-bg: #3a2f10;
    --warning-border: #8a6d1d;
    --warning-text: #f3dea0;
  }
}

*,
*::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: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  border-bottom: 1px solid var(--border);
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

nav.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav.site li + li {
  margin-top: 0;
}

nav.site a {
  text-decoration: none;
}

nav.site a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

main {
  padding-top: 24px;
  padding-bottom: 40px;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0.5rem 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.25rem;
}

p,
ul,
ol {
  margin: 0.5rem 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 12px;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.features li {
  margin: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.features h3 {
  margin: 0 0 0.25rem;
}

.features p {
  margin: 0;
}

.notice {
  margin: 1rem 0;
  padding: 12px 16px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 10px;
  color: var(--warning-text);
}

.button {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

details {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site .wrap {
  padding-top: 16px;
  padding-bottom: 24px;
}

footer.site p {
  margin: 0.25rem 0;
}
