/*
AI THEME CONTRACT V2
*/

:root {
  --bg: #f2f8ff;
  --surface: #ffffff;
  --surface-soft: #f8fcff;
  --line: #cfe0f2;
  --line-strong: #9dc4e7;
  --text: #1f2937;
  --heading: #034c99;
  --header: #034c99;
  --teal: #008080;
  --red-list: #c0392b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.theme-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  padding-top: 72px;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--header);
  border-radius: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12);
}

.header-inner {
  min-height: 72px;
  padding: 5px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #eef8ff;
  font-size: 24px;
  font-weight: 500;
}

.brand-mark {
  width: 22px;
  height: 22px;
  color: #eef8ff;
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.menu-dropdown {
  position: relative;
}

.menu-toggle {
  list-style: none;
  cursor: pointer;
  color: #eef8ff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  background: rgba(255,255,255,0.08);
}

.menu-toggle::-webkit-details-marker {
  display: none;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(82vw, 320px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(3, 76, 153, 0.08);
}

.menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.menu-list a {
  display: block;
  text-decoration: none;
  color: var(--heading);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.site-main {
  width: 100%;
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 12px 25px;
}

.first-after-header {
  margin-top: 30px;
}

.frame-block,
.frame-inner,
.soft-panel,
.article-toc,
.post-item,
.simple-card,
.empty-box,
.pagination-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.frame-block {
  padding: 16px;
  margin-bottom: 25px;
}

.frame-tight {
  padding: 0;
}

.frame-inner {
  padding: 16px;
  margin-top: 25px;
}

.page-h1,
.section-title,
.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--heading);
  line-height: 1.3;
  font-weight: 500;
  margin: 0;
}

.page-h1 {
  font-size: 28px;
}

.section-title {
  font-size: 22px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  position: relative;
}

.section-title::after,
.article-content h2::after,
.article-content h3::after,
.article-content h4::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  background: var(--teal);
  margin-top: 8px;
}

.text-body,
.article-content {
  font-size: 17px;
}

.text-body p,
.article-content p {
  margin: 0 0 16px;
}

.btn-main {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid transparent;
}

.btn-full {
  display: block;
  width: 100%;
}

.btn-teal {
  background: var(--teal);
  color: #ffffff;
}

.media-frame {
  overflow: hidden;
}

.media-43 {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.media-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.site-accordion summary {
  cursor: pointer;
  list-style: none;
  color: var(--heading);
  font-size: 18px;
  font-weight: 500;
}

.site-accordion summary::-webkit-details-marker {
  display: none;
}

.site-accordion summary::after {
  content: "+";
  float: right;
  color: var(--teal);
}

.site-accordion[open] summary::after {
  content: "−";
}

.accordion-panel {
  padding-top: 16px;
}

.clean-links-list {
  margin: 0;
  padding-left: 22px;
}

.clean-links-list li + li {
  margin-top: 10px;
}

.clean-links-list a {
  color: var(--heading);
  text-decoration: none;
}

.simple-card-list,
.post-list {
  display: grid;
  gap: 25px;
}

.simple-card {
  display: block;
  text-decoration: none;
  padding: 16px;
  color: inherit;
}

.simple-card-title {
  display: block;
  color: var(--heading);
  font-size: 20px;
  font-weight: 500;
}

.simple-card-desc {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 17px;
}

.simple-card-cta {
  display: inline-block;
  margin-top: 12px;
  color: var(--teal);
  font-weight: 500;
}

.subcat-thumb-wrap {
  display: block;
  margin-bottom: 14px;
}

.subcat-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
}

.post-item {
  padding: 16px;
}

.post-item-title {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 500;
}

.post-item-title a,
.text-link {
  color: var(--heading);
  text-decoration: none;
}

.post-item-excerpt {
  margin: 0 0 10px;
  font-size: 17px;
}

.article-wrap {
  padding: 16px;
}

.article-header {
  margin-bottom: 25px;
}

.post-image-frame {
  margin-bottom: 25px;
}

.article-content h2 {
  font-size: 24px;
  margin: 30px 0 14px;
}

.article-content h3 {
  font-size: 21px;
  margin: 26px 0 12px;
}

.article-content h4 {
  font-size: 18px;
  margin: 22px 0 10px;
}

.article-content ul,
.article-content ol,
.text-body ul,
.text-body ol {
  margin: 0 0 18px;
  padding-left: 28px;
}

.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
  margin-top: 10px;
  margin-bottom: 10px;
}

.article-content li,
.text-body li {
  margin-bottom: 8px;
}

.article-content ul li::marker,
.text-body ul li::marker,
.article-content ol li::marker,
.text-body ol li::marker {
  color: var(--red-list);
  font-weight: 700;
}

.article-content a,
.text-body a,
.clean-links-list a {
  color: #0f5fc0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content blockquote {
  margin: 22px 0;
  padding: 16px;
  background: #f3fbfb;
  border: 1px solid #b8e0e0;
  border-radius: 10px;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.article-content th,
.article-content td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.article-content figure {
  margin: 22px 0;
}

.article-content figcaption {
  margin-top: 8px;
  font-size: 15px;
  color: #5c6b78;
}

.article-content code {
  background: #eef6ff;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.95em;
}

.article-content pre {
  margin: 22px 0;
  padding: 16px;
  overflow: auto;
  background: #eef6ff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.article-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}

.article-toc {
  padding: 16px;
  margin: 22px 0;
  background: #f7fcff;
}

.article-toc-title {
  color: var(--heading);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

.article-toc ul {
  margin: 0;
  padding-left: 20px;
}

.article-toc li + li {
  margin-top: 8px;
}

.article-toc a {
  color: var(--heading);
  text-decoration: none;
  display: inline-block;
  padding: 2px 0;
}

.empty-box,
.pagination-wrap {
  padding: 16px;
}

.pagination-meta {
  color: var(--heading);
  margin-bottom: 12px;
}

.pagination-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pager-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  color: var(--heading);
  background: #f7fbff;
}

.pager-disabled {
  opacity: 0.5;
}

.site-footer {
  width: 100%;
  background: var(--header);
  color: #eef8ff;
  border-radius: 0;
  margin-top: 25px;
}

.footer-inner {
  padding: 18px 16px 22px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner p + p {
  margin-top: 10px;
}

.text-center {
  text-align: center;
}

@media (min-width: 768px) {
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
}
