@charset "UTF-8";
/* 亮色主題 (基礎主題) */
:root {
  /* 亮色主題 (基礎主題) */
  --primary-color: #4a5568;
  --background-color: #ffffff;
  --text-color: #2d3748;
  --link-color: #3182ce;
  --link-hover-color: #2c5282;
  --border-color: #e2e8f0;
  --code-bg: #f7fafc;
  --blockquote-bg: #edf2f7;
  --blockquote-border: #cbd5e0;
  --footer-bg: #f7fafc;
  --header-bg: #f7fafc;
  --max-content-width: 800px;
}

[data-theme=dark] {
  --primary-color: #a0aec0;
  --background-color: #1a202c;
  --text-color: #e2e8f0;
  --link-color: #63b3ed;
  --link-hover-color: #90cdf4;
  --border-color: #4a5568;
  --code-bg: #2d3748;
  --blockquote-bg: #2d3748;
  --blockquote-border: #4a5568;
  --footer-bg: #2d3748;
  --header-bg: #2d3748;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: none;
}

html, body {
  transition-property: none !important;
}

#themeToggle,
.theme-transition-elements {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

[data-theme=dark],
[data-theme=light] {
  transition: none !important;
}

html {
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.6;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%;
  overflow-x: hidden;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.2rem;
}

h4 {
  font-size: 1.1rem;
  margin-top: 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
  -moz-transition: color 0.2s ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}
a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

p {
  margin-bottom: 1rem;
}

.underline {
  background-image: linear-gradient(transparent 90%, rgba(255, 59, 48, 0.6) 40%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 2px;
}

.verse {
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  font-style: italic;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.social-links a {
  color: var(--text-color);
  font-size: 1rem;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.social-links a svg {
  fill: currentColor;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
.social-links a:hover {
  color: var(--link-hover-color);
}
.social-links .sponsor-link {
  color: #e00c3c;
  display: inline-flex; /* 明確設置 */
  align-items: center;
}
.social-links .sponsor-link:hover {
  color: #c0392b;
}
.social-links .sponsor-link svg {
  margin-right: 0.3rem;
  fill: currentColor;
  width: 16px; /* 一致大小 */
  height: 16px;
}
@media (min-width: 481px) {
  .social-links a {
    font-size: 1.1rem;
  }
  .social-links a svg {
    width: 20px;
    height: 20px;
  }
}
@media (min-width: 769px) {
  .social-links a {
    font-size: 1.2rem;
  }
  .social-links a svg {
    width: 24px;
    height: 24px;
  }
}

blockquote {
  padding: 0;
  margin: 0 0 0.5em 0; /* 上邊距 0，下邊距 0.5em，左右 0 */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: inherit;
  font-style: italic;
}
blockquote p {
  margin: 0;
  padding: 0;
}
blockquote br {
  display: none;
}

blockquote + blockquote {
  margin-top: -2em; /* 負值拉近距離 */
}

blockquote p:first-child::before {
  content: "“";
  font-size: 1em;
  color: var(--primary-color);
  font-family: inherit;
  font-weight: bold;
  margin-right: 0;
}

blockquote p:last-child::after {
  content: "”";
  font-size: 1em;
  color: var(--primary-color);
  font-family: inherit;
  font-weight: bold;
  margin-left: 0;
}

pre {
  background-color: var(--code-bg);
  padding: 0.75rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 1rem;
}
pre.example {
  font-family: inherit;
  border: 1px solid var(--code-bg);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加陰影效果 */
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  background-color: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

ul, ol {
  margin: 1rem 0 1rem 1.2rem;
}

#preamble {
  background-color: var(--header-bg);
  padding: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}
#preamble .header-container {
  width: 100%;
  max-width: var(--max-content-width);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 0.75rem;
  flex-wrap: wrap;
}
#preamble .header-container h1 {
  font-size: 1.5rem;
  margin: 0;
}
#preamble .header-container h1 a {
  color: var(--primary-color);
  text-decoration: none;
}
#preamble .theme-toggle {
  margin-left: auto;
}
#preamble nav {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
}
#preamble nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  margin-left: 10px;
  padding: 0;
  flex-wrap: wrap;
}
#preamble nav ul li {
  margin: 0 0.75rem 0.5rem 0;
}
#preamble nav ul li:last-child {
  margin-right: 0;
}

.content {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 0.75rem 1.5rem;
}
.content header {
  margin-bottom: 1.5rem;
}
.content header .title {
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

#postamble {
  background-color: var(--footer-bg);
  padding: 0.75rem 0.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  width: 100%;
  display: flex;
  justify-content: center;
}
#postamble .footer-container {
  width: 100%;
  max-width: var(--max-content-width);
  display: flex;
  flex-direction: column;
  text-align: center;
}
#postamble .footer-container .copyright {
  margin-bottom: 0.5rem;
}
#postamble .footer-container p {
  margin-bottom: 0;
}

.footdef {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}
.footdef .footnum {
  position: absolute;
  left: 0;
  font-weight: bold;
}

#themeToggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#themeToggle:hover {
  background-color: var(--border-color);
}
#themeToggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary-color);
}
#themeToggle .sun-icon {
  display: none;
}
#themeToggle .moon-icon {
  display: block;
}

[data-theme=dark] #themeToggle .sun-icon {
  display: block;
}
[data-theme=dark] #themeToggle .moon-icon {
  display: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.25rem auto;
  border-radius: 4px;
}

figure {
  margin: 1.5rem 0;
  width: 100%;
}
figure img {
  margin: 0 auto;
}
figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--primary-color);
  text-align: center;
  font-style: italic;
}

aside {
  width: 100%;
  margin: 1rem 0;
  padding: 0.75rem;
  background-color: var(--blockquote-bg);
  border-radius: 4px;
  border-left: 3px solid var(--blockquote-border);
  font-size: 0.9rem;
}
aside h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

details {
  margin: 1.25rem 0;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}
details summary {
  cursor: pointer;
  font-weight: bold;
  padding: 0.5rem;
}
details summary:hover {
  color: var(--link-color);
}
details[open] summary {
  margin-bottom: 0.5rem;
}

progress {
  width: 100%;
  height: 0.8rem;
  border-radius: 4px;
  background-color: var(--code-bg);
  border: none;
}
progress::-webkit-progress-bar {
  background-color: var(--code-bg);
  border-radius: 4px;
}
progress::-webkit-progress-value {
  background-color: var(--link-color);
  border-radius: 4px;
}
progress::-moz-progress-bar {
  background-color: var(--link-color);
  border-radius: 4px;
}

mark {
  background-color: rgba(255, 220, 0, 0.4);
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

time {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-style: italic;
}

hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table th, table td {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
}
table th {
  background-color: var(--blockquote-bg);
  font-weight: bold;
  text-align: left;
}
table tr:nth-child(even) {
  background-color: var(--blockquote-bg);
}

#table-of-contents h2 {
  margin-top: -5px;
  font-size: 1rem;
}
#table-of-contents nav {
  margin-top: -1px;
  padding: 0;
}
#table-of-contents #text-table-of-contents {
  margin-top: 0;
}
#table-of-contents ul {
  margin-top: 0;
  margin-left: 0.8rem;
  padding-left: 0.8rem;
}
#table-of-contents ul ul {
  margin-left: 0.5rem;
  padding-left: 0.5rem;
}
#table-of-contents li {
  margin-bottom: 0.2rem;
}
#table-of-contents li a {
  font-size: 0.9rem;
  line-height: 1.3;
}

.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

.js-enabled #themeToggle {
  display: flex;
}

.content, #preamble, #postamble {
  transition: background-color 0.3s ease;
}

@media (min-width: 481px) {
  html {
    font-size: 15px;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
    margin-top: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
  }
  .content {
    padding: 0 1rem 1.75rem;
  }
  blockquote {
    padding: 1rem 1.25rem;
  }
  #preamble {
    padding: 0.75rem;
  }
  #preamble .header-container h1 {
    font-size: 1.75rem;
  }
  #preamble nav ul {
    justify-content: flex-start;
  }
  #postamble {
    padding: 1rem;
  }
  #postamble .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  #postamble .footer-container .copyright {
    margin-bottom: 0;
  }
  pre, code {
    font-size: 0.9rem;
  }
  #themeToggle svg {
    width: 22px;
    height: 22px;
  }
}
@media (min-width: 769px) {
  html {
    font-size: 18px;
  }
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
    margin-top: 2rem;
  }
  h3 {
    font-size: 1.5;
    margin-top: 1.5rem;
  }
  h4 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
  }
  .content {
    padding: 0 1rem 2rem;
  }
  .content header .title {
    font-size: 2.5rem;
  }
  #preamble {
    padding: 1rem;
    margin-bottom: 2rem;
  }
  #preamble .header-container {
    margin-bottom: 1rem;
  }
  #preamble .header-container h1 {
    font-size: 2.5rem;
  }
  #preamble nav ul li {
    margin-bottom: 0;
  }
  blockquote {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
  }
  pre {
    padding: 1rem;
    font-size: 1rem;
  }
  code {
    font-size: 1rem;
  }
  aside {
    float: right;
    width: 30%;
    margin: 0 0 1rem 1.5rem;
    padding: 1rem;
  }
  table {
    display: table;
  }
  table th, table td {
    padding: 0.75rem;
  }
  #themeToggle svg {
    width: 24px;
    height: 24px;
  }
  #postamble {
    padding: 1rem;
    margin-top: 2rem;
  }
}
@media (min-width: 1200px) {
  .content, #preamble .header-container, #preamble nav, #postamble .footer-container {
    max-width: 900px;
  }
}

/*# sourceMappingURL=main.css.map */
