/* ===== 萩高STUDIES static articles ===== */
.article-page {
  background: #f8fafc;
}

.article-header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.article-header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--c-text-soft);
  font-size: 13px;
  font-weight: 700;
}

.article-header-nav a:hover {
  color: var(--c-blue);
  background: var(--c-blue-50);
}

.article-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  color: var(--c-text-muted);
  font-size: 12px;
}

.article-breadcrumb a:hover {
  color: var(--c-blue);
  text-decoration: underline;
}

.article-card {
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.article-hero {
  padding: clamp(26px, 5vw, 52px) clamp(22px, 6vw, 64px) 30px;
  border-bottom: 1px solid var(--c-border-soft);
  background: linear-gradient(150deg, #fff 35%, #fff1f4 100%);
}

.article-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.article-category {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #861a36;
  background: #fbd7e0;
  font-size: 11px;
  font-weight: 800;
}

.article-title-main {
  max-width: 780px;
  margin: 0;
  color: var(--c-text);
  font-size: clamp(27px, 4.4vw, 43px);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--c-text-muted);
  font-size: 12px;
}

.article-body {
  padding: clamp(28px, 5vw, 56px) clamp(22px, 6vw, 68px) 54px;
  color: #273142;
  font-size: 16px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body > :last-child {
  margin-bottom: 0;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body figure,
.article-body table,
.article-body pre,
.article-body audio,
.article-body video,
.article-body iframe {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5 {
  scroll-margin-top: 96px;
  color: #172033;
  font-weight: 800;
  line-height: 1.55;
}

.article-body h2 {
  margin: 2.4em 0 .8em;
  padding: 0 0 .55em 16px;
  border-bottom: 2px solid #fbd7e0;
  border-left: 5px solid var(--c-blue);
  font-size: clamp(22px, 3vw, 28px);
}

.article-body h3 {
  margin: 2em 0 .7em;
  padding-bottom: .4em;
  border-bottom: 1px solid var(--c-border);
  font-size: clamp(19px, 2.6vw, 23px);
}

.article-body h4 {
  margin: 1.8em 0 .6em;
  font-size: 18px;
}

.article-body a {
  color: #9b1c3d;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: #6f1028;
}

.article-body ul,
.article-body ol {
  padding-left: 1.6em;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li + li {
  margin-top: .35em;
}

.article-body blockquote {
  padding: 18px 22px;
  border-left: 4px solid var(--c-blue);
  border-radius: 0 10px 10px 0;
  color: var(--c-text-soft);
  background: var(--c-blue-50);
}

.article-body img {
  width: auto;
  height: auto;
  margin-right: auto;
  margin-left: auto;
  border-radius: 10px;
}

.article-body figure {
  max-width: 100%;
}

.article-body figcaption,
.article-body .wp-caption-text {
  margin-top: 8px;
  color: var(--c-text-muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.article-body .aligncenter {
  margin-right: auto;
  margin-left: auto;
}

.article-body .alignleft {
  float: left;
  margin: .4em 1.5em 1em 0;
}

.article-body .alignright {
  float: right;
  margin: .4em 0 1em 1.5em;
}

.article-body::after {
  display: block;
  clear: both;
  content: "";
}

.article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  white-space: nowrap;
}

.article-body th,
.article-body td {
  padding: 10px 13px;
  border: 1px solid var(--c-border);
  text-align: left;
}

.article-body th {
  background: var(--c-bg-soft);
  font-weight: 800;
}

.article-body pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 18px;
  border-radius: 10px;
  color: #e5e7eb;
  background: #172033;
  font-size: 13px;
  line-height: 1.7;
}

.article-body code {
  padding: .15em .35em;
  border-radius: 5px;
  background: #f3f4f6;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: .9em;
}

.article-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.article-body iframe,
.article-body video {
  width: 100%;
  max-width: 100%;
  min-height: min(52vw, 480px);
  border: 0;
  border-radius: 10px;
  background: #111827;
}

.article-body audio {
  width: 100%;
}

.article-body .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

/* ===== KeyPulse Analyzer article ===== */
.article-body .keypulse-lead {
  color: #475467;
  font-size: 18px;
  line-height: 1.9;
}

.article-body .keypulse-note,
.article-body .keypulse-caution,
.article-body .keypulse-highlight,
.article-body .keypulse-conclusion {
  margin: 1.8em 0;
  padding: 20px 22px;
  border-radius: 12px;
}

.article-body .keypulse-note {
  border: 1px solid #cddbec;
  border-left: 5px solid #3157d5;
  background: #f4f8fd;
}

.article-body .keypulse-caution {
  border: 1px solid #f1d5aa;
  border-left: 5px solid #e87500;
  background: #fff8ed;
}

.article-body .keypulse-note > :first-child,
.article-body .keypulse-caution > :first-child,
.article-body .keypulse-highlight > :first-child,
.article-body .keypulse-conclusion > :first-child {
  margin-top: 0;
}

.article-body .keypulse-note > :last-child,
.article-body .keypulse-caution > :last-child,
.article-body .keypulse-highlight > :last-child,
.article-body .keypulse-conclusion > :last-child {
  margin-bottom: 0;
}

.article-body .keypulse-privacy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
  margin-bottom: 0;
}

.article-body .keypulse-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 1.6em 0;
}

.article-body .keypulse-stat {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-bg-soft);
}

.article-body .keypulse-stat dt {
  color: var(--c-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.article-body .keypulse-stat dd {
  margin: 2px 0 0;
  color: #172033;
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 800;
  line-height: 1.4;
}

.article-body .keypulse-small,
.article-body .keypulse-footnote {
  color: var(--c-text-muted);
  font-size: 13px;
}

.article-body .keypulse-ranking,
.article-body .keypulse-compare {
  min-width: 620px;
  font-variant-numeric: tabular-nums;
}

.article-body .keypulse-ranking th:nth-child(n+3),
.article-body .keypulse-ranking td:nth-child(n+3),
.article-body .keypulse-compare th:nth-child(n+2),
.article-body .keypulse-compare td:nth-child(n+2) {
  text-align: right;
}

.article-body .keypulse-compare tbody tr:first-child {
  color: #172033;
  background: #f2f5ff;
  font-weight: 800;
}

.article-body .keypulse-highlight {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #172033;
}

.article-body .keypulse-highlight::after {
  position: absolute;
  right: 15px;
  bottom: -26px;
  color: rgba(255, 255, 255, .08);
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  content: "N";
}

.article-body .keypulse-highlight p {
  position: relative;
  z-index: 1;
  max-width: 670px;
  font-size: 18px;
  font-weight: 700;
}

.article-body .keypulse-highlight strong {
  color: #fff;
}

.article-body .keypulse-chart-narrow {
  max-width: 620px;
  margin-right: auto;
  margin-left: auto;
}

.article-body .keypulse-conclusion {
  border: 1px solid #efc3ce;
  background: #fff5f7;
}

.article-body .keypulse-conclusion h2 {
  margin-top: 0;
  border-bottom-color: #efc3ce;
}

.article-body .keypulse-footnote {
  padding-top: 18px;
  border-top: 1px solid var(--c-border);
}

@media (max-width: 720px) {
  .article-body .keypulse-lead {
    font-size: 16px;
  }

  .article-body .keypulse-privacy-list {
    grid-template-columns: 1fr;
  }

  .article-body .keypulse-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-body .keypulse-note,
  .article-body .keypulse-caution,
  .article-body .keypulse-highlight,
  .article-body .keypulse-conclusion {
    padding: 18px;
  }
}

@media (max-width: 390px) {
  .article-body .keypulse-stats {
    grid-template-columns: 1fr;
  }
}

.article-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 22px clamp(22px, 6vw, 68px);
  border-top: 1px solid var(--c-border);
  background: var(--c-bg-soft);
}

.article-footer-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  color: var(--c-text-soft);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.article-footer-actions a:hover {
  border-color: #efb1c0;
  color: var(--c-blue);
}

/* ===== 読者の反応 ===== */
.article-reaction-brief {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  margin-top: 18px;
  color: var(--c-text-muted);
  font-size: 12px;
  line-height: 1.7;
}

.article-reaction-brief[hidden] {
  display: none;
}

.article-reaction-brief a {
  color: #7f1d38;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-reactions {
  scroll-margin-top: 28px;
  padding: clamp(30px, 5vw, 48px) clamp(22px, 6vw, 68px);
  border-top: 1px solid var(--c-border);
  background: #fcfbf9;
  color: #273142;
}

.article-reactions-heading {
  margin: 0;
  color: #172033;
  font-family: "Noto Serif JP", "Yu Mincho", "YuMincho", serif;
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.55;
}

.article-reactions-note {
  margin: 7px 0 0;
  color: var(--c-text-muted);
  font-size: 12px;
}

.article-reaction-loading {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.article-reaction-loading[hidden] {
  display: none;
}

.article-reaction-loading p {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 13px;
}

.article-reaction-skeleton {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #ece9e4 25%, #f7f5f1 45%, #ece9e4 65%);
  background-size: 300% 100%;
  animation: article-reaction-loading 1.4s ease-in-out infinite;
}

.article-reaction-skeleton:nth-child(2) {
  width: 78%;
}

@keyframes article-reaction-loading {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.article-reaction-form {
  margin-top: 22px;
}

.article-reaction-form[hidden],
.article-reaction-results[hidden],
.article-reaction-load-error[hidden],
.article-reaction-status[hidden] {
  display: none;
}

.article-reaction-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.article-reaction-choice {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 50px;
  padding: 10px 13px;
  border: 1px solid #d8d4cd;
  border-radius: 8px;
  color: #303846;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.article-reaction-choice:hover {
  border-color: #b98c97;
  background: #fffafb;
}

.article-reaction-choice:focus-visible,
.article-reaction-submit:focus-visible,
.article-reaction-retry:focus-visible,
.article-reaction-brief a:focus-visible {
  outline: 3px solid rgba(165, 31, 66, .25);
  outline-offset: 2px;
}

.article-reaction-choice.is-selected {
  border-color: #8f2440;
  background: #fff1f4;
  box-shadow: inset 0 0 0 1px #8f2440;
}

.article-reaction-choice:disabled {
  cursor: wait;
  opacity: .66;
}

.article-reaction-choice-check {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid #aaa59d;
  border-radius: 4px;
  color: #fff;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.article-reaction-choice.is-selected .article-reaction-choice-check {
  border-color: #8f2440;
  background: #8f2440;
}

.article-reaction-status {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #a09a90;
  color: var(--c-text-soft);
  background: #f2f0ec;
  font-size: 13px;
  line-height: 1.65;
}

.article-reaction-status[data-type="success"] {
  border-left-color: #627d68;
  color: #35533c;
  background: #edf4ee;
}

.article-reaction-status[data-type="error"] {
  border-left-color: #a47d37;
  color: #654b1f;
  background: #fbf5e8;
}

.article-reaction-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 46px;
  margin-top: 14px;
  padding: 10px 20px;
  border: 1px solid #8d1d3b;
  border-radius: 7px;
  color: #fff;
  background: #8d1d3b;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.article-reaction-submit:hover:not(:disabled) {
  background: #74172f;
}

.article-reaction-submit:disabled {
  border-color: #c9c6c1;
  color: #77736c;
  background: #e9e7e3;
  cursor: not-allowed;
}

.article-reaction-submit.is-loading {
  cursor: wait;
}

.article-reaction-results {
  margin-top: 32px;
  padding-top: 25px;
  border-top: 1px solid #dedad3;
}

.article-reaction-results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 14px;
  margin-bottom: 17px;
}

.article-reaction-results h3 {
  margin: 0;
  color: #283140;
  font-size: 16px;
  font-weight: 800;
}

.article-reaction-total {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 11px;
}

.article-reaction-results-list {
  display: grid;
  gap: 15px;
}

.article-reaction-result-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.55;
}

.article-reaction-result-label {
  color: #343c49;
  font-weight: 600;
}

.article-reaction-result-numbers {
  flex: 0 0 auto;
  color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}

.article-reaction-result-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e4dd;
}

.article-reaction-result-bar {
  display: block;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: #9b5266;
  transition: width .35s ease;
}

.article-reaction-load-error {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #dfcfac;
  border-radius: 8px;
  color: #5e4a25;
  background: #fbf7ed;
  font-size: 13px;
  line-height: 1.7;
}

.article-reaction-load-error p {
  margin: 0;
}

.article-reaction-retry {
  min-height: 44px;
  margin-top: 10px;
  padding: 8px 15px;
  border: 1px solid #8b7040;
  border-radius: 7px;
  color: #5e4a25;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.article-reaction-noscript {
  margin: 18px 0 0;
  color: var(--c-text-muted);
  font-size: 13px;
}

html {
  scroll-behavior: smooth;
}

.article-archive-hero {
  padding: 44px 0 30px;
}

.article-archive-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.4;
}

.article-archive-lead {
  margin: 8px 0 0;
  color: var(--c-text-muted);
  font-size: 14px;
}

.article-archive-search {
  display: flex;
}

.article-archive-search .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.article-archive-search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  outline: none;
  background: #fff;
  font: inherit;
}

.article-archive-search input:focus {
  border-color: #d55d7d;
  box-shadow: 0 0 0 3px rgba(165, 31, 66, .12);
}

.article-archive-tools {
  display: grid;
  gap: 13px;
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .8);
  box-shadow: var(--shadow-sm);
}

.article-archive-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.article-archive-filter {
  display: grid;
  flex: 1 1 220px;
  gap: 5px;
  color: var(--c-text-soft);
  font-size: 12px;
  font-weight: 700;
}

.article-archive-filter select {
  width: 100%;
  min-height: 44px;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  color: var(--c-text);
  outline: none;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.article-archive-filter select:focus {
  border-color: #d55d7d;
  box-shadow: 0 0 0 3px rgba(165, 31, 66, .12);
}

.article-archive-reset {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #d7a1af;
  border-radius: 10px;
  color: #7f1d38;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.article-archive-reset:hover {
  border-color: #a51f42;
  background: #fff6f8;
}

.article-archive-reset:focus-visible,
.article-archive-taxonomy:focus-visible {
  outline: 3px solid rgba(165, 31, 66, .2);
  outline-offset: 2px;
}

.article-archive-list {
  display: grid;
  gap: 12px;
  padding: 8px 0 64px;
}

.article-archive-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.article-archive-item[hidden] {
  display: none;
}

.article-archive-item time {
  color: var(--c-text-muted);
  font-size: 12px;
}

.article-archive-item h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
}

.article-archive-item h2 a:hover {
  color: var(--c-blue);
  text-decoration: underline;
}

.article-archive-taxonomies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.article-archive-taxonomy {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid #efc3ce;
  border-radius: 999px;
  color: #7f1d38;
  background: #fff5f7;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.article-archive-taxonomy:hover {
  border-color: #d55d7d;
  background: #fde8ed;
}

.article-archive-taxonomy.is-tag {
  border-color: #cddbec;
  color: #31547b;
  background: #f4f8fd;
}

.article-archive-taxonomy.is-tag:hover {
  border-color: #8dabcf;
  background: #eaf2fb;
}

.article-archive-item .article-archive-excerpt {
  margin: 9px 0 0;
  color: var(--c-text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.article-archive-empty {
  padding: 36px;
  border: 1px dashed var(--c-border);
  border-radius: 14px;
  color: var(--c-text-muted);
  background: #fff;
  text-align: center;
}

@media (max-width: 720px) {
  .article-header-nav a:not(:first-child) {
    display: none;
  }

  .article-title-main {
    font-size: 27px;
  }

  .article-body {
    font-size: 15px;
  }

  .article-body .alignleft,
  .article-body .alignright {
    float: none;
    margin-right: auto;
    margin-left: auto;
  }

  .article-archive-item {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .article-archive-tools {
    padding: 13px;
  }

  .article-archive-filter-row {
    display: grid;
  }

  .article-archive-filter {
    min-width: 0;
  }

  .article-archive-reset {
    width: 100%;
  }

  .article-reactions {
    padding-right: 20px;
    padding-left: 20px;
  }

  .article-reaction-choices {
    grid-template-columns: 1fr;
  }

  .article-reaction-choice {
    min-height: 52px;
    font-size: 14px;
  }

  .article-reaction-submit {
    width: 100%;
  }

  .article-reaction-result-heading {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .article-reaction-skeleton {
    animation: none;
  }

  .article-reaction-choice,
  .article-reaction-result-bar {
    transition: none;
  }
}

@media (forced-colors: active) {
  .article-reaction-choice.is-selected,
  .article-reaction-choice.is-selected .article-reaction-choice-check,
  .article-reaction-result-bar {
    forced-color-adjust: none;
    border-color: Highlight;
    color: HighlightText;
    background: Highlight;
  }
}
