.seo-tool-page {
  background: #f7f7f3;
}

.tool-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - 1280px) / 2));
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(30, 36, 40, 0.1);
  backdrop-filter: blur(16px);
}

.tool-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.tool-nav a:hover,
.tool-nav a:focus-visible,
.tool-nav a[aria-current="page"] {
  color: var(--accent-dark);
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 0.74fr);
  gap: clamp(42px, 7vw, 100px);
  align-items: center;
  max-width: 1280px;
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: 64px 24px 72px;
}

.tool-hero-copy {
  max-width: 650px;
}

.tool-hero-copy h1 {
  max-width: 720px;
  font-size: 56px;
  line-height: 1.18;
}

.tool-hero-copy > p:not(.eyebrow, .tool-lead) {
  max-width: 600px;
  color: #59636a;
  font-size: 16px;
}

.tool-lead {
  margin: 24px 0 14px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.75;
}

.tool-lead strong {
  color: var(--accent-dark);
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 30px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.trust-points span::before {
  content: "✓";
  margin-right: 6px;
  color: var(--accent);
}

.grader-panel {
  width: 100%;
  padding: 28px;
  background: #fff;
  border: 1px solid #d7e0dd;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(26, 46, 45, 0.13);
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5eae8;
}

.panel-heading .eyebrow {
  margin: 0;
}

.panel-heading h2 {
  font-size: 28px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: #30383d;
  font-size: 13px;
  font-weight: 800;
}

.field small {
  color: #798287;
  font-size: 11px;
  font-weight: 600;
}

.required-field > span::after {
  content: "必須";
  margin-left: 8px;
  padding: 2px 6px;
  color: #fff;
  background: var(--accent);
  border-radius: 3px;
  font-size: 10px;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid #cbd6d3;
  border-radius: 5px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid rgba(0, 127, 104, 0.15);
  border-color: var(--accent);
}

.optional-fields[hidden] {
  display: none;
}

.text-toggle {
  margin: -2px 0 18px;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

.text-toggle::after {
  content: "+";
  display: inline-block;
  margin-left: 8px;
}

.text-toggle[aria-expanded="true"]::after {
  content: "−";
}

.tool-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 0 22px;
  color: #fff;
  background: var(--accent-dark);
  border: 1px solid var(--accent-dark);
  border-radius: 5px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.tool-submit:hover,
.tool-submit:focus-visible {
  background: var(--accent);
}

.tool-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-note {
  margin: 12px 0 0;
  color: #737c81;
  font-size: 11px;
  line-height: 1.65;
}

.tool-status {
  margin-top: 16px;
  padding: 12px 14px;
  color: #8b341b;
  background: #fff3ed;
  border-left: 4px solid #d16a44;
  font-size: 13px;
}

.tool-status.is-loading {
  color: var(--accent-dark);
  background: #edf6f3;
  border-left-color: var(--accent);
}

.tool-result,
.comparison-result {
  max-width: 1140px;
  margin: 0 auto 96px;
  padding: 48px;
  background: #fff;
  border: 1px solid #d7e0dd;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 96px;
}

.tool-result[hidden],
.comparison-result[hidden] {
  display: none;
}

.score-summary {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding-bottom: 34px;
  border-bottom: 1px solid #e3e9e7;
}

.score-ring {
  display: grid;
  place-content: center;
  width: 154px;
  height: 154px;
  background: conic-gradient(var(--warm) var(--score-angle, 0deg), #e4ebe8 0);
  border-radius: 50%;
  box-shadow: inset 0 0 0 12px #fff;
  text-align: center;
}

.score-ring strong {
  display: block;
  font-size: 48px;
  line-height: 1;
}

.score-ring span {
  color: #5e676c;
  font-size: 12px;
  font-weight: 800;
}

.rank-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.score-summary h2 {
  font-size: 40px;
}

.score-summary p:last-child {
  color: #59636a;
}

.metric-list {
  display: grid;
  gap: 14px;
  margin: 36px 0;
}

.metric-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 60px;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
}

.metric-track {
  height: 9px;
  overflow: hidden;
  background: #e5ece9;
  border-radius: 999px;
}

.metric-fill {
  display: block;
  width: var(--metric-width, 0%);
  height: 100%;
  background: var(--warm);
  border-radius: inherit;
}

.metric-row output {
  text-align: right;
}

.result-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.result-insights section {
  padding: 22px;
  border: 1px solid #dfe6e3;
  border-radius: 6px;
}

.result-insights h3 {
  font-size: 18px;
}

.result-insights ul,
.result-insights p {
  margin-bottom: 0;
  color: #59636a;
}

.result-gate {
  margin-top: 30px;
  padding: 28px;
  text-align: center;
  background: #eef5f2;
  border: 1px solid #d4e2dd;
  border-radius: 6px;
}

.result-gate p {
  margin-top: 0;
}

.inline-submit {
  width: auto;
  min-width: 240px;
}

.secondary-tool-link {
  display: block;
  width: fit-content;
  margin: 14px auto 0;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-notice {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  color: #6c757a;
  font-size: 12px;
}

.legal-notice p {
  margin: 0;
}

.legal-notice a {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-weight: 800;
}

.decision-flow {
  max-width: 1140px;
  margin: 0 auto 100px;
  padding: 0 24px;
}

.decision-flow h2,
.seo-article h2,
.related-tools h2,
.comparison-result-heading h2 {
  font-size: 38px;
}

.decision-flow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #ccd7d3;
  border-bottom: 1px solid #ccd7d3;
}

.decision-flow li {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 26px 20px;
  border-right: 1px solid #ccd7d3;
}

.decision-flow li:last-child {
  border-right: 0;
}

.decision-flow li strong {
  color: var(--accent-dark);
  font-size: 20px;
}

.decision-flow li span {
  color: #626c71;
  font-size: 13px;
}

.seo-article {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  justify-content: center;
  gap: 70px;
  padding: 96px 24px;
  background: #fff;
  border-top: 1px solid #e1e6e4;
  border-bottom: 1px solid #e1e6e4;
}

.seo-article > section {
  grid-column: 2;
  padding-bottom: 60px;
}

.seo-article > section:last-child {
  padding-bottom: 0;
}

.seo-article section > p:not(.eyebrow),
.seo-article li {
  color: #4f5a60;
}

.article-toc {
  position: sticky;
  top: 104px;
  grid-column: 1;
  grid-row: 1 / span 5;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 20px 0;
  border-top: 2px solid var(--accent-dark);
  border-bottom: 1px solid #d9e1de;
  font-size: 13px;
}

.article-toc a {
  color: #637076;
}

.axis-explanations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid #dce4e1;
}

.axis-explanations div {
  padding: 20px 18px;
  border-right: 1px solid #dce4e1;
  border-bottom: 1px solid #dce4e1;
}

.axis-explanations div:nth-child(even) {
  border-right: 0;
}

.axis-explanations h3 {
  font-size: 17px;
}

.axis-explanations p {
  margin-bottom: 0;
  font-size: 13px;
}

.article-list {
  padding-left: 20px;
}

.seo-article details {
  padding: 18px 0;
  border-bottom: 1px solid #dce4e1;
}

.seo-article summary {
  font-weight: 800;
  cursor: pointer;
}

.seo-article details p {
  margin-bottom: 0;
}

.related-tools {
  display: grid;
  grid-template-columns: 1fr repeat(2, minmax(260px, 0.8fr));
  gap: 18px;
  align-items: stretch;
  max-width: 1140px;
  margin: 0 auto;
  padding: 96px 24px;
}

.related-tools .eyebrow,
.related-tools h2 {
  grid-column: 1;
}

.related-tools h2 {
  align-self: start;
}

.related-tools a {
  display: grid;
  gap: 8px;
  padding: 24px;
  border: 1px solid #ccd8d4;
  border-radius: 6px;
}

.related-tools a:hover {
  border-color: var(--accent);
  background: #f1f7f5;
}

.related-tools a span {
  color: #697277;
  font-size: 13px;
}

.tool-footer {
  padding-inline: max(24px, calc((100vw - 1280px) / 2));
}

.tool-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.comparison-hero {
  grid-template-columns: minmax(0, 0.84fr) minmax(460px, 0.8fr);
}

.comparison-hero .tool-hero-copy h1 {
  font-size: 46px;
}

.comparison-hero .tool-hero-copy h1 span {
  display: block;
  white-space: nowrap;
}

.sample-ranking {
  display: grid;
  max-width: 450px;
  margin-top: 30px;
  border-top: 1px solid #cad6d2;
}

.sample-ranking span {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #cad6d2;
  font-size: 14px;
  font-weight: 800;
}

.sample-ranking b {
  display: grid;
  place-content: center;
  width: 26px;
  height: 26px;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 50%;
  font-size: 12px;
}

.sample-ranking strong {
  color: var(--accent-dark);
  text-align: right;
}

.candidate-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.candidate-fields .field {
  min-width: 0;
}

.candidate-fields input {
  min-width: 0;
}

.comparison-result-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.comparison-result-heading > p:last-child {
  color: #59636a;
  font-size: 17px;
}

.ranking-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ranking-card {
  padding: 22px;
  border: 1px solid #d9e2df;
  border-radius: 6px;
}

.ranking-card:first-child {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.ranking-position {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.ranking-card:first-child .ranking-position {
  color: #e9c34c;
}

.ranking-card h3 {
  margin-top: 12px;
  font-size: 24px;
}

.ranking-score {
  margin: 12px 0;
  font-size: 32px;
  font-weight: 900;
}

.ranking-card p:last-child {
  margin-bottom: 0;
  color: #657076;
  font-size: 13px;
}

.ranking-card:first-child p:last-child {
  color: rgba(255, 255, 255, 0.78);
}

.comparison-matrix {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid #dce4e1;
}

.comparison-candidate-metrics {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.comparison-candidate-metrics h3 {
  font-size: 16px;
}

.compact-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.compact-metric {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  background: #f1f5f3;
  border-radius: 4px;
  font-size: 11px;
}

.compact-metric b {
  color: var(--accent-dark);
}

.comparison-article {
  display: block;
  max-width: none;
}

.comparison-article > section {
  max-width: 760px;
  margin: 0 auto;
}

@media (max-width: 980px) {
  .tool-hero,
  .comparison-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .tool-hero-copy {
    max-width: 760px;
  }

  .seo-article {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .article-toc,
  .seo-article > section {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }

  .decision-flow ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-flow li:nth-child(2) {
    border-right: 0;
  }

  .decision-flow li:nth-child(-n + 2) {
    border-bottom: 1px solid #ccd7d3;
  }

  .related-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-tools .eyebrow,
  .related-tools h2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .tool-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px 16px 12px;
  }

  .tool-header .brand-mark {
    width: 38px;
    height: 38px;
  }

  .tool-nav {
    width: 100%;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 2px;
    font-size: 12px;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .tool-hero {
    gap: 34px;
    padding: 44px 16px 56px;
  }

  .tool-hero-copy h1 {
    font-size: 38px;
  }

  .comparison-hero .tool-hero-copy h1 {
    font-size: 28px;
  }

  .sample-ranking {
    display: none;
  }

  .tool-lead {
    font-size: 18px;
  }

  .grader-panel {
    padding: 20px;
  }

  .panel-heading {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .candidate-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tool-result,
  .comparison-result {
    margin: 0 16px 72px;
    padding: 24px 18px;
  }

  .score-summary {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
  }

  .score-ring {
    width: 112px;
    height: 112px;
    box-shadow: inset 0 0 0 9px #fff;
  }

  .score-ring strong {
    font-size: 36px;
  }

  .score-summary h2 {
    font-size: 28px;
  }

  .metric-row {
    grid-template-columns: 96px minmax(0, 1fr) 48px;
    gap: 8px;
    font-size: 11px;
  }

  .result-insights,
  .ranking-cards {
    grid-template-columns: 1fr;
  }

  .legal-notice {
    flex-direction: column;
  }

  .decision-flow {
    margin-bottom: 72px;
    padding: 0 16px;
  }

  .decision-flow h2,
  .seo-article h2,
  .related-tools h2,
  .comparison-result-heading h2 {
    font-size: 30px;
  }

  .decision-flow ol {
    grid-template-columns: 1fr;
  }

  .decision-flow li,
  .decision-flow li:nth-child(2) {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #ccd7d3;
  }

  .decision-flow li:last-child {
    border-bottom: 0;
  }

  .seo-article {
    padding: 72px 16px;
  }

  .axis-explanations {
    grid-template-columns: 1fr;
  }

  .axis-explanations div,
  .axis-explanations div:nth-child(even) {
    border-right: 0;
  }

  .related-tools {
    grid-template-columns: 1fr;
    padding: 72px 16px;
  }

  .related-tools .eyebrow,
  .related-tools h2 {
    grid-column: 1;
  }

  .comparison-candidate-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .compact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-footer {
    padding-inline: 16px;
  }
}

@media (max-width: 350px) {
  .comparison-hero .tool-hero-copy h1 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .score-ring,
  .metric-fill {
    transition: none;
  }
}
