.inner-page {
  background: var(--paper);
}

.inner-page .site-header {
  position: relative;
  z-index: 10;
}

.page-hero {
  position: relative;
  min-height: 460px;
  padding: clamp(72px, 9vw, 132px) clamp(24px, 7vw, 108px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  color: var(--foam);
  background: var(--ink);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: radial-gradient(#f7f5ee 0.65px, transparent 0.65px);
  background-size: 7px 7px;
}

.page-hero > div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.page-hero h1 {
  max-width: 930px;
  margin-bottom: 28px;
  font-size: clamp(3.4rem, 7vw, 7rem);
}

.page-hero p {
  max-width: 740px;
  margin-bottom: 0;
  color: #b8b9b2;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.65;
}

.page-shell {
  width: min(100%, 1420px);
  margin-inline: auto;
  padding: clamp(70px, 9vw, 130px) clamp(24px, 7vw, 108px);
}

.page-shell.compact {
  width: min(100%, 1040px);
}

.lead-block {
  max-width: 880px;
  margin-bottom: clamp(50px, 7vw, 90px);
}

.lead-block h2,
.content-section h2,
.tool-panel h2 {
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 4.2vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.lead-block p,
.content-section > p,
.content-prose p,
.content-prose li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.content-section {
  padding-top: clamp(56px, 7vw, 94px);
  margin-top: clamp(56px, 7vw, 94px);
  border-top: 1px solid var(--line);
}

.content-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.tool-panel {
  padding: clamp(28px, 5vw, 58px);
  background: var(--foam);
  border: 1px solid var(--line);
  box-shadow: 10px 10px 0 #ddd9ce;
}

.tool-panel h2 {
  font-size: clamp(2rem, 3.3vw, 3.4rem);
}

.tool-panel > p {
  max-width: 780px;
  color: var(--muted);
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.field-control,
.field-textarea {
  width: 100%;
  padding: 16px 18px;
  color: var(--ink);
  background: var(--foam);
  border: 1px solid #b9b7ad;
  border-radius: 0;
  outline: 0;
}

.field-textarea-short {
  min-height: 120px;
}

.field-textarea-medium {
  min-height: 175px;
}

.field-control:focus,
.field-textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent);
}

.field-textarea {
  min-height: 260px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
}

.field-note,
.tool-error,
.tool-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.tool-error {
  min-height: 1.2em;
  color: var(--blocked);
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.action-button,
.secondary-button {
  min-height: 55px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  background: var(--accent);
  border: 1px solid var(--accent);
  cursor: pointer;
}

.secondary-button {
  background: transparent;
  border-color: var(--ink);
}

.action-button:hover,
.secondary-button:hover {
  background: #f2c761;
}

.action-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.tool-result {
  padding-top: 36px;
  margin-top: 36px;
  border-top: 2px solid var(--ink);
}

.result-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 25px;
}

.result-header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 500;
}

.result-header p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.result-list,
.validation-list,
.source-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.result-list li,
.validation-list li {
  padding: 17px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}

.result-list strong,
.validation-list strong {
  display: block;
  margin-bottom: 2px;
}

.result-list small,
.validation-list small {
  color: var(--muted);
}

.result-note {
  padding: 20px;
  margin: 26px 0 0;
  color: #5e5140;
  background: #f2e5c1;
  border-left: 4px solid var(--accent-deep);
}

.split-tools {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.split-tools > section {
  padding: clamp(25px, 4vw, 46px);
  background: var(--foam);
}

.stacked-fields {
  display: grid;
  gap: 20px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.code-block {
  padding: 24px;
  overflow-x: auto;
  color: #edece5;
  background: var(--ink);
  border-left: 5px solid var(--accent);
}

.code-block code,
.inline-code {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

.inline-code {
  padding: 2px 5px;
  background: #e9e5d9;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.check-card {
  min-height: 245px;
  padding: 30px clamp(22px, 3vw, 42px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.check-card:nth-child(even) {
  border-right: 0;
}

.check-card h2,
.check-card h3 {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.4vw, 2.3rem);
  font-weight: 500;
  line-height: 1.1;
}

.check-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.68;
}

.directory {
  border-top: 2px solid var(--ink);
}

.bot-entry {
  padding: clamp(28px, 4vw, 48px) 0;
  display: grid;
  grid-template-columns: 0.34fr 0.22fr 1fr;
  gap: clamp(24px, 4vw, 65px);
  border-bottom: 1px solid var(--line);
}

.bot-entry h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1rem;
}

.bot-kind {
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.bot-entry p {
  margin-bottom: 12px;
  color: var(--muted);
}

.bot-entry a,
.source-list a,
.content-prose a {
  text-underline-offset: 3px;
}

.bot-entry code {
  display: inline-block;
  padding: 4px 7px;
  font-family: var(--mono);
  font-size: 0.7rem;
  background: #e9e5d9;
}

.review-note {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.82rem;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.principle-grid article {
  padding: clamp(25px, 4vw, 42px);
  background: var(--foam);
}

.principle-grid h3 {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
}

.principle-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.content-prose {
  max-width: 780px;
}

.content-prose h2 {
  margin: 62px 0 20px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.content-prose h2:first-child {
  margin-top: 0;
}

.content-prose h3 {
  margin: 38px 0 14px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
}

.content-prose ul,
.content-prose ol {
  padding-left: 24px;
}

.source-list li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.source-list strong,
.source-list span {
  display: block;
}

.source-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dark-cta {
  padding: clamp(36px, 5vw, 62px);
  margin-top: clamp(60px, 8vw, 110px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  color: var(--foam);
  background: var(--ink);
}

.dark-cta h2 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
}

.dark-cta p {
  max-width: 650px;
  margin: 0;
  color: #adafa7;
}

.dark-cta .action-button {
  flex: none;
}

@media (max-width: 900px) {
  .page-hero {
    grid-template-columns: 1fr;
  }

  .split-tools,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .bot-entry {
    grid-template-columns: 0.4fr 0.25fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-hero {
    min-height: 0;
    padding: 66px 20px;
  }

  .page-hero h1 {
    font-size: clamp(3.1rem, 15vw, 5rem);
  }

  .page-shell {
    padding: 68px 20px;
  }

  .form-row,
  .check-grid,
  .bot-entry {
    grid-template-columns: 1fr;
  }

  .form-row .action-button {
    width: 100%;
  }

  .result-header,
  .result-list li,
  .validation-list li,
  .dark-cta {
    display: block;
  }

  .result-header p,
  .result-list .access,
  .validation-list .status,
  .dark-cta .action-button {
    margin-top: 14px;
  }

  .check-card,
  .check-card:nth-child(even) {
    min-height: 0;
    border-right: 0;
  }

  .bot-entry {
    gap: 13px;
  }

  .dark-cta .action-button {
    width: 100%;
  }
}
