/* Self-contained styles for FlipClock - Alarm Digital Clock help pages. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #24292f;
  --muted: #57606a;
  --border: #d0d7de;
  --border-muted: #d8dee4;
  --subtle: #f6f8fa;
  --link: #0969da;
  --btn-bg: #ffffff;
  --btn-fg: #24292f;
  --focus: #0969da;
  --toolbar: #f6f8fa;
  --current: #0969da;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --fg: #e6edf3;
  --muted: #adbac7;
  --border: #30363d;
  --border-muted: #21262d;
  --subtle: #161b22;
  --link: #58a6ff;
  --btn-bg: #21262d;
  --btn-fg: #e6edf3;
  --focus: #58a6ff;
  --toolbar: #161b22;
  --current: #58a6ff;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Microsoft JhengHei", "Yu Gothic UI", "Malgun Gothic", "Nirmala UI", "Leelawadee UI", "Segoe UI Historic", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 16px;
  background: var(--toolbar);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 600;
  margin-inline-end: auto;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.links a {
  color: var(--fg);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.links a:hover {
  color: var(--link);
}

.links a[aria-current="page"] {
  color: var(--current);
  border-bottom-color: var(--current);
  font-weight: 600;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lang-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-size: 14px;
}

select,
button {
  font: inherit;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 40px;
  padding: 6px 10px;
}

button {
  cursor: pointer;
}

select:focus,
button:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.markdown-style {
  max-width: 960px;
  margin: 0 auto 60px;
  padding: 8px 16px 48px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.markdown-style h1,
.markdown-style h2,
.markdown-style h3,
.markdown-style h4 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.markdown-style h1 {
  margin-top: 16px;
  padding-bottom: 0.3em;
  font-size: 2em;
  border-bottom: 1px solid var(--border-muted);
}

.markdown-style h2 {
  padding-bottom: 0.3em;
  font-size: 1.5em;
  border-bottom: 1px solid var(--border-muted);
}

.markdown-style h3 {
  font-size: 1.25em;
}

.markdown-style h4 {
  font-size: 1em;
}

.markdown-style p,
.markdown-style ul,
.markdown-style ol {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-style ul,
.markdown-style ol {
  padding-inline-start: 2em;
}

.markdown-style li + li {
  margin-top: 0.25em;
}

.markdown-style a {
  color: var(--link);
  text-decoration: none;
}

.markdown-style a:hover {
  text-decoration: underline;
}

.markdown-style strong {
  font-weight: 600;
}

.markdown-style .status {
  color: var(--muted);
}

@media (max-width: 640px) {
  .brand {
    flex: 1 1 100%;
  }

  .markdown-style {
    padding: 4px 14px 40px;
  }

  .markdown-style h1 {
    font-size: 1.6em;
  }

  .markdown-style h2 {
    font-size: 1.3em;
  }

  select,
  button {
    min-height: 44px;
  }
}
