.speech-page {
  max-width: 1200px;
  margin: auto;
  padding: 28px 24px 72px;
}
.speech-intro {
  max-width: 820px;
  margin: 36px 0;
}
.speech-intro h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.3;
  margin: 12px 0 20px;
}
.speech-intro p {
  line-height: 1.8;
}
.speech-muted {
  color: #666;
  font-size: 14px;
  line-height: 1.7;
}
.speech-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 40px;
}
.speech-page fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.speech-page legend,
.speech-page h2 {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 20px;
}
.speech-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.speech-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 600;
}
.speech-field small {
  color: #666;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}
.speech-field textarea,
.speech-field select {
  border: 1px solid #d9d4d0;
  border-radius: 8px;
  background: white;
  color: #292526;
  font: inherit;
  font-weight: 400;
  padding: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.speech-field textarea {
  resize: vertical;
  line-height: 1.65;
}
.speech-page :focus-visible {
  outline: 3px solid var(--brand-focus);
  outline-offset: 3px;
}
.speech-options {
  margin: 0 0 24px;
  border-bottom: 1px solid #e5dfdc;
  padding-bottom: 18px;
}
.speech-page summary {
  cursor: pointer;
  font-weight: 600;
  padding: 10px 0;
}
.speech-options .speech-fields {
  margin-top: 16px;
}
.speech-recall {
  background: #faf5ef;
  border-left: 3px solid #b77336;
  padding: 22px;
  margin-bottom: 30px;
}
.speech-recall h2 {
  font-size: 17px;
  margin-bottom: 10px;
}
.speech-recall ul {
  padding-left: 20px;
  margin: 0;
  line-height: 1.8;
}
.speech-result {
  border: 1px solid #e8ded9;
  background: #fffdfb;
  border-radius: 14px;
  padding: 26px;
  min-width: 0;
}
.speech-result > p,
.speech-result li,
.speech-result details p {
  line-height: 1.8;
}
.speech-result li {
  margin-bottom: 16px;
}
.speech-result .copy-box {
  margin: 20px 0;
}
.speech-result pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: none;
  overflow-y: visible;
  font-size: 14px;
  line-height: 1.85;
}
.speech-result .copy-heading {
  flex-wrap: wrap;
  gap: 12px;
}
.speech-result button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.speech-submit {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--brand-on-action);
  border-radius: 8px;
  padding: 14px 24px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.speech-page [hidden] {
  display: none !important;
}
.speech-submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
@media (max-width: 800px) {
  .speech-layout {
    grid-template-columns: 1fr;
  }
  .speech-page {
    padding: 20px 18px 40px;
  }
}
@media (max-width: 400px) {
  .speech-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .speech-result {
    padding: 18px;
  }
  .speech-submit {
    width: 100%;
  }
}
@media print {
  #speech-form,
  .speech-page .ui-resource-index,
  .speech-page .source-note,
  .speech-result button {
    display: none;
  }
  .speech-layout {
    display: block;
  }
  .speech-result pre {
    max-height: none;
    overflow: visible;
  }
}
