.workbook-intro {
  padding-block: 42px 48px;
  max-width: 1000px;
}
.workbook-intro h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.35;
  margin: 18px 0;
  color: #0e5777;
  max-width: 21ch;
}
.workbook-intro > p {
  font-size: 21px;
  line-height: 1.95;
  max-width: 760px;
  color: #526e7d;
}
.workbook-process {
  list-style: none;
  display: flex;
  gap: 30px;
  padding: 0;
  flex-wrap: wrap;
  margin-top: 30px;
}
.workbook-process li {
  display: flex;
  gap: 10px;
  align-items: center;
}
.workbook-process b {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eaf4f8;
  color: #0e5777;
  display: grid;
  place-items: center;
}
.workbook-directory {
  padding-bottom: 70px;
  max-width: 1050px;
}
.workbook-group {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 40px;
  border-top: 1px solid #cddfe8;
  padding-block: 30px;
}
.workbook-group > h2 {
  font-size: 24px;
  color: #0e5777;
}
.workbook-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding: 24px 0;
  color: #173e52;
}
.workbook-entry + .workbook-entry {
  border-top: 1px solid #e1ecf1;
}
.workbook-entry h3 {
  font-size: 25px;
  margin: 0 0 8px;
}
.workbook-entry p {
  margin: 0;
  line-height: 1.8;
  color: #526e7d;
}
.workbook-entry > span {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  color: #0d688f;
  font-weight: 700;
}
.workbook-entry:hover h3 {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.workbook-crosslinks {
  border-top: 1px solid #cddfe8;
  padding-block: 35px 70px;
  max-width: 1050px;
}
.workbook-crosslinks > a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0e5777;
  min-height: 48px;
  font-size: 20px;
}
.workbook-crosslinks p {
  color: #526e7d;
  line-height: 1.9;
}
.tool-privacy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #edf6f8;
  padding: 16px 20px;
  border-radius: 12px;
  max-width: 760px;
  color: #0e5777;
}
.tool-privacy app-icon {
  margin-top: 4px;
}
.editor-intro {
  padding-bottom: 24px;
}
.tool-workspace {
  max-width: 1000px;
  padding-bottom: 70px;
}
.tool-stepbar {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid #d6e5ec;
  padding: 18px 0;
  margin-bottom: 35px;
  color: #526e7d;
}
.tool-stepbar span {
  padding: 10px 0;
}
.tool-stepbar .active {
  color: #0e5777;
  font-weight: 700;
  border-bottom: 3px solid #e85d8e;
}
.tool-form-heading,
.tool-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 0 30px;
}
.tool-form-heading h2,
.tool-preview-head h2 {
  font-size: 28px;
  margin: 0;
}
.tool-form-heading button {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.tool-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tool-fields > label,
.record-fields > label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.tool-fields label > span,
.record-fields label > span {
  font-weight: 700;
  color: #173e52;
}
.tool-fields label small {
  font-size: 13px;
  color: #526e7d;
  font-weight: 400;
  margin-inline-start: 5px;
}
.tool-fields input,
.tool-fields textarea,
.tool-fields select {
  width: 100%;
  min-width: 0;
  font: inherit;
  color: #173e52;
  background: #fff;
  border: 1px solid #a5bdca;
  border-radius: 9px;
  padding: 12px 14px;
  min-height: 48px;
}
.tool-fields textarea {
  resize: vertical;
  line-height: 1.8;
}
.tool-fields .wide,
.tool-table,
.tool-fields > .tool-actions {
  grid-column: 1/-1;
}
.tool-table {
  padding: 22px;
  border: 1px solid #cddfe8;
  border-radius: 14px;
  min-width: 0;
  margin: 0;
}
.tool-table legend {
  font-size: 23px;
  font-weight: 700;
  color: #0e5777;
  padding-inline: 10px;
}
.tool-table > p {
  color: #526e7d;
  font-size: 15px;
}
.tool-record {
  border-top: 1px solid #dce8ee;
  padding: 16px 0 24px;
}
.record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}
.record-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.tool-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.tool-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.tool-errors {
  padding: 20px 24px;
  border: 1px solid #d4a29a;
  border-radius: 12px;
  background: #fff7f4;
  scroll-margin-top: 20px;
}
.tool-errors h2 {
  font-size: 24px;
}
.tool-example-note {
  padding: 12px 16px;
  background: #fff8e9;
  color: #755315;
  border-radius: 9px;
}
.tool-bottom-note {
  border-top: 1px solid #d6e5ec;
  margin-top: 35px;
  padding-top: 25px;
  color: #526e7d;
  line-height: 1.8;
}
.tool-paper {
  padding: 35px;
  border: 1px solid #cddfe8;
  border-radius: 16px;
  background: #fff;
  overflow-wrap: anywhere;
}
.tool-paper > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 2px solid #e85d8e;
  padding-bottom: 20px;
  margin-bottom: 25px;
  color: #526e7d;
}
.tool-paper > header img {
  width: 105px;
  height: auto;
}
.tool-paper > h2 {
  font-size: 32px;
  color: #0e5777;
}
.tool-paper > section {
  margin-top: 25px;
}
.tool-paper h3 {
  font-size: 19px;
  color: #0e5777;
  margin-bottom: 8px;
}
.answer-text {
  white-space: pre-wrap;
  line-height: 1.9;
}
.preview-table-wrap {
  overflow-x: auto;
}
.tool-paper table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  min-width: 480px;
}
.tool-paper th,
.tool-paper td {
  text-align: right;
  vertical-align: top;
  border: 1px solid #d6e5ec;
  padding: 10px;
}
.tool-paper th {
  background: #eff6f9;
}
.paper-limits {
  border-top: 1px solid #d6e5ec;
  padding-top: 18px;
  margin-top: 28px;
  font-size: 14px;
  color: #526e7d;
  line-height: 1.8;
}
#tool-form-heading,
#tool-preview {
  scroll-margin-top: 24px;
}
@media (max-width: 700px) {
  .workbook-intro {
    padding-block: 30px;
  }
  .workbook-intro > p {
    font-size: 19px;
  }
  .workbook-group {
    grid-template-columns: 1fr;
    gap: 0;
    padding-block: 20px;
  }
  .workbook-group > h2 {
    font-size: 21px;
    margin-bottom: 6px;
  }
  .workbook-entry {
    gap: 15px;
    align-items: flex-start;
    flex-direction: column;
  }
  .workbook-entry h3 {
    font-size: 23px;
  }
  .workbook-entry > span {
    font-size: 15px;
  }
  .tool-fields,
  .record-fields {
    grid-template-columns: 1fr;
  }
  .tool-form-heading,
  .tool-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .tool-form-heading h2,
  .tool-preview-head h2 {
    font-size: 26px;
  }
  .tool-paper {
    padding: 20px;
  }
  .tool-table {
    padding: 15px;
  }
  .tool-actions {
    gap: 15px;
  }
  .tool-actions > .primary {
    width: 100%;
    justify-content: center;
  }
  .tool-stepbar {
    gap: 20px;
    font-size: 15px;
  }
  .tool-fields textarea,
  .tool-fields input,
  .tool-fields select {
    font-size: 17px;
  }
  .tool-paper > header img {
    width: 85px;
  }
}
@media print {
  body:has(app-tool-editor) .site-header,
  body:has(app-tool-editor) .topbar,
  body:has(app-tool-editor) .education-notice,
  body:has(app-tool-editor) app-evidence,
  body:has(app-tool-editor) .site-footer,
  body:has(app-tool-editor) .skip-link,
  .editor-intro,
  .tool-stepbar,
  .tool-form-heading,
  .tool-fields,
  .tool-actions,
  .tool-preview-head,
  .tool-bottom-note,
  .tool-errors,
  .tool-workspace > app-source-links {
    display: none !important;
  }
  .tool-paper {
    border: 0;
    border-radius: 0;
    padding: 0;
  }
  .tool-workspace {
    width: 100%;
    padding: 0;
  }
  .tool-paper p {
    font-size: 11pt;
  }
  .tool-paper > section {
    break-inside: auto;
  }
  .tool-paper h3 {
    break-after: avoid;
  }
  .tool-paper th,
  .tool-paper td {
    font-size: 9pt;
  }
  .tool-paper table {
    min-width: 0;
  }
  .tool-paper .inline-sources a::after {
    content: ' — ' attr(href);
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 8pt;
  }
}

.discard-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #102e46b3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.discard-dialog {
  background: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 80px #0b253b40;
}
.discard-dialog h2 {
  font-size: 1.6rem;
  margin: 0 0 14px;
}
.discard-dialog p {
  line-height: 1.9;
}
.discard-dialog > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}
.tool-paper-credit{border-top:1px solid #dcebf1;margin-top:24px;padding-top:15px;font-size:.85rem;line-height:1.9;color:#526e7d}.tool-paper-credit a{text-decoration:underline;text-underline-offset:4px}
