:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --ink: #1f2937;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --line: #e5e7eb;
  --line-2: #f3f4f6;
  --bg: #ffffff;
}

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

html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

body {
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--teal);
}

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

/* ---------- Layout ---------- */
.site-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 16px 0;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.site-logo:hover {
  color: var(--teal-dark);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fafafa;
  padding: 32px 24px;
  margin-top: 60px;
  text-align: center;
}

.footer-nav {
  max-width: 720px;
  margin: 0 auto 8px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 12px;
  color: var(--ink-3);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--teal-dark);
}

.copyright {
  font-size: 11px;
  color: var(--ink-3);
}

/* ---------- Home: Hero ---------- */
.home-hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
  border-bottom: 0.5px solid var(--line);
  margin-bottom: 2.5rem;
}

.home-hero__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.home-hero__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
}

.home-hero__desc {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.8;
}

/* ---------- Home: Section ---------- */
.home-section {
  margin-bottom: 2.5rem;
}

.home-section__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 12px;
}

/* ---------- Home: Nav cards ---------- */
.nav-cards {
  display: grid;
  gap: 10px;
}

.nav-card {
  display: block;
  border: 0.5px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-left-color 0.15s;
}

.nav-card:hover {
  background: var(--teal-50);
  border-left-color: var(--teal-dark);
  color: inherit;
}

.nav-card__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.nav-card__desc {
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- Home: Soft grid ---------- */
.soft-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.soft-card {
  display: block;
  background: #f9fafb;
  border-top: 3px solid var(--teal);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.soft-card:hover {
  background: var(--teal-50);
  color: inherit;
}

.soft-card__name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.soft-card__desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}

@media (max-width: 480px) {
  .soft-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Home: Article list ---------- */
.article-list {
  border: 0.5px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.article-list__item {
  display: block;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--line);
  border-left: 3px solid var(--teal);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-left-color 0.15s;
}

.article-list__item:last-child {
  border-bottom: none;
}

.article-list__item:hover {
  background: #f9fafb;
  border-left-color: var(--teal-dark);
  color: inherit;
}

.article-list__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.article-list__desc {
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- Article (post page) ---------- */
article {
  padding: 24px 0 80px;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--teal-dark);
  background: var(--teal-50);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.tag.cat {
  background: var(--teal);
  color: #fff;
}

article > h1 {
  font-size: 30px;
  line-height: 1.5;
  font-weight: 900;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  color: #111827;
}

.meta {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--ink-3);
  font-size: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.meta .author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
}

.meta .dot {
  width: 3px;
  height: 3px;
  background: var(--line);
  border-radius: 50%;
  display: inline-block;
}

/* ---------- TOC ---------- */
.toc {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 32px 0;
  background: #fff;
}

.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.toc-title::before {
  content: "";
  display: block;
  width: 3px;
  height: 14px;
  background: var(--teal);
}

.toc-toggle {
  font-size: 12px;
  color: var(--teal-dark);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 3px;
}

.toc-toggle:hover {
  background: var(--teal-50);
}

.toc-list {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0;
}

.toc-list > li {
  counter-increment: toc;
  margin: 2px 0;
}

.toc-list > li > a {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  align-items: baseline;
}

.toc-list > li > a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--teal);
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  min-width: 24px;
  letter-spacing: -0.02em;
}

.toc-list > li > a:hover {
  color: var(--teal-dark);
}

.toc-list ul {
  list-style: none;
  padding-left: 36px;
  margin: 2px 0 4px;
}

.toc-list ul li a {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
}

.toc-list ul li a::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 14px;
  width: 8px;
  height: 1px;
  background: var(--line);
}

.toc-list ul li a:hover {
  color: var(--teal-dark);
}

/* ---------- Post content: headings ---------- */
.post-content h2 {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 800;
  color: #111827;
  border-left: 4px solid var(--teal);
  background: var(--teal-50);
  padding: 14px 18px;
  margin: 48px 0 20px;
  border-radius: 0 4px 4px 0;
  scroll-margin-top: 24px;
}

.post-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--teal);
  line-height: 1.6;
  scroll-margin-top: 24px;
}

.post-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 20px 0 8px;
}

/* ---------- Post content: text ---------- */
.post-content p {
  margin: 0 0 16px;
}

.post-content p + p {
  margin-top: 0;
}

.post-content strong {
  font-weight: 700;
  background: linear-gradient(transparent 60%, var(--teal-100) 60%);
  padding: 0 2px;
}

.post-content a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.post-content a:hover {
  color: var(--teal);
}

/* ---------- Post content: tables (compare style) ---------- */
.post-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  margin: 20px 0 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.post-content table th,
.post-content table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}

.post-content table th:last-child,
.post-content table td:last-child {
  border-right: none;
}

.post-content thead th {
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
  border-bottom: none;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.post-content thead th:last-child {
  border-right: none;
}

.post-content tbody tr:nth-child(even) {
  background: var(--teal-50);
}

.post-content tbody tr:last-child td {
  border-bottom: none;
}

.post-content tbody td:first-child {
  font-weight: 700;
  background: #f9fafb;
  color: var(--ink);
  font-size: 12px;
}

.post-content tbody tr:nth-child(even) td:first-child {
  background: #e6faf6;
}

/* ---------- Post content: unordered lists (checks style) ---------- */
.post-content ul:not(.affiliate-links) {
  list-style: none;
  margin: 16px 0 24px;
  padding: 18px 20px;
  background: var(--teal-50);
  border-radius: 6px;
  border: 1px solid var(--teal-100);
}

.post-content ul:not(.affiliate-links) li {
  position: relative;
  padding: 6px 0 6px 32px;
  font-size: 14px;
  line-height: 1.8;
}

.post-content ul:not(.affiliate-links) li + li {
  border-top: 1px dashed var(--teal-100);
}

.post-content ul:not(.affiliate-links) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 18px;
  height: 18px;
  background: var(--teal);
  border-radius: 3px;
}

.post-content ul:not(.affiliate-links) li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 17px;
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* ---------- Post content: ordered lists (steps style) ---------- */
.post-content ol {
  list-style: none;
  counter-reset: step;
  margin: 20px 0 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.post-content ol > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 16px;
  align-items: start;
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}

.post-content ol > li:last-child {
  border-bottom: none;
}

.post-content ol > li::before {
  content: counter(step);
  text-align: center;
  padding-top: 2px;
  color: var(--teal);
  font-weight: 800;
  font-size: 22px;
  font-family: "Noto Sans JP", sans-serif;
  border-right: 1px solid var(--line);
  line-height: 1.4;
  align-self: stretch;
}

/* ---------- Affiliate links (CTA buttons) ---------- */
.affiliate-links {
  list-style: none;
  padding: 0;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.affiliate-links li {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.affiliate-links li::before,
.affiliate-links li::after {
  content: none;
  display: none;
}

.affiliate-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid transparent;
  letter-spacing: 0.04em;
  transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.affiliate-links li a:active {
  transform: translateY(1px);
}

.affiliate-links li:first-child a {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.affiliate-links li:first-child a:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}

.affiliate-links li:not(:first-child) a {
  background: #fff;
  color: var(--teal-dark);
  border-color: var(--teal);
}

.affiliate-links li:not(:first-child) a:hover {
  background: var(--teal-50);
}

/* ---------- Disclaimer ---------- */
.disclaimer {
  margin-top: 48px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 6px;
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.8;
}

.disclaimer p {
  margin: 0;
}

.disclaimer p + p {
  margin-top: 8px;
}

.disclaimer strong {
  color: var(--ink-2);
  font-weight: 700;
  background: none;
  padding: 0;
}

.disclaimer a {
  color: var(--ink-2);
}

/* ---------- Page (static pages) ---------- */
.page {
  padding: 2rem 0;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 2rem;
  color: #111827;
}

.page-content p {
  margin: 0 0 1.2rem;
  line-height: 1.9;
}

.page-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-left: 12px;
  border-left: 3px solid var(--teal);
  line-height: 1.5;
}

.page-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 1.5rem 0 0.8rem;
  color: var(--ink);
}

.page-content a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content a:hover {
  color: var(--teal);
}

.page-content ul {
  margin: 0 0 1.2rem 1.5rem;
}

.page-content li {
  margin-bottom: 0.4rem;
}

/* ---------- List page ---------- */
.list-page {
  padding: 2rem 0;
}

.list-header {
  margin-bottom: 2rem;
}

.list-title {
  font-size: 22px;
  font-weight: 700;
}

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding: 4rem 0;
}

.error-page h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 1rem;
}

.error-page a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  article > h1 {
    font-size: 24px;
  }

  .post-content h2 {
    font-size: 19px;
    padding: 12px 14px;
  }

  .post-content h3 {
    font-size: 16px;
  }

  .page-title {
    font-size: 22px;
  }

  .home-hero {
    padding: 2rem 0;
  }

  .home-hero__title {
    font-size: 20px;
  }

  .toc {
    padding: 16px 18px;
  }

  .toc-list ul {
    padding-left: 28px;
  }

  .post-content ol > li {
    grid-template-columns: 44px 1fr;
    column-gap: 12px;
    padding: 14px 16px 14px 0;
  }

  .post-content ol > li::before {
    font-size: 18px;
  }
}
