#pep26-app,
#pep26-app * {
  box-sizing: border-box;
}

#pep26-app {
  --pep26-ink: #182331;
  --pep26-muted: #5f6d7a;
  --pep26-line: #d9e0e7;
  --pep26-soft: #f5f7f9;
  --pep26-soft-blue: #edf5fb;
  --pep26-blue: #2474a8;
  --pep26-blue-dark: #194e70;
  --pep26-green: #26745c;
  --pep26-warm: #9a6122;
  max-width: 1120px;
  margin: 32px auto;
  color: var(--pep26-ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.58;
}

#pep26-app h1,
#pep26-app h2,
#pep26-app h3,
#pep26-app p {
  margin-top: 0;
}

.pep26-page-header {
  padding: 42px 34px;
  border-radius: 16px 16px 0 0;
  color: #fff;
  background: linear-gradient(135deg, #152737 0%, #255a78 100%);
  text-align: center;
}

.pep26-page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
}

.pep26-page-header p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255,255,255,.88);
  font-size: 1.02rem;
}

.pep26-form-card {
  padding: 34px;
  background: #fff;
  border: 1px solid var(--pep26-line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 14px 42px rgba(18, 38, 53, .10);
}

.pep26-intro-note {
  margin-bottom: 28px;
  padding: 18px 20px;
  border-left: 5px solid var(--pep26-blue);
  border-radius: 8px;
  background: var(--pep26-soft-blue);
}

.pep26-intro-note strong {
  color: var(--pep26-blue-dark);
}

.pep26-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}

.pep26-mode-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.pep26-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pep26-mode-option span {
  display: block;
  min-height: 100%;
  padding: 16px 18px;
  border: 2px solid #d7e0e6;
  border-radius: 10px;
  background: #fff;
  color: #294254;
  font-weight: 700;
  text-align: center;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.pep26-mode-option input:checked + span {
  border-color: #1e6c99;
  background: #edf6fb;
  box-shadow: 0 0 0 3px rgba(30,108,153,.1);
}

.pep26-mode-panel[hidden] {
  display: none !important;
}

.pep26-id-panel {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid #d7e0e6;
  border-radius: 10px;
  background: #f8fbfd;
}

.pep26-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.pep26-field {
  grid-column: span 6;
}

.pep26-field.pep26-full {
  grid-column: 1 / -1;
}

.pep26-field.pep26-third {
  grid-column: span 4;
}

.pep26-field label,
.pep26-time-label {
  display: block;
  margin-bottom: 7px;
  color: #293746;
  font-size: .91rem;
  font-weight: 700;
}

.pep26-required {
  color: #b32929;
}

.pep26-help {
  display: block;
  margin-top: 6px;
  color: var(--pep26-muted);
  font-size: .79rem;
  line-height: 1.4;
}

#pep26-app input,
#pep26-app select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #bdc8d2;
  border-radius: 8px;
  background: #fff;
  color: var(--pep26-ink);
  font: inherit;
}

#pep26-app input:focus,
#pep26-app select:focus {
  outline: 3px solid rgba(36, 116, 168, .15);
  border-color: var(--pep26-blue);
}

.pep26-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.pep26-region-text-wrap[hidden],
.pep26-region-select-wrap[hidden] {
  display: none !important;
}

.pep26-form-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pep26-primary-button,
.pep26-secondary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.pep26-primary-button {
  min-width: 230px;
  padding: 15px 28px;
  color: #fff;
  background: var(--pep26-blue);
  box-shadow: 0 5px 15px rgba(36,116,168,.25);
  font-size: 1rem;
}

.pep26-primary-button:hover,
.pep26-secondary-button:hover {
  transform: translateY(-1px);
}

.pep26-primary-button:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}

.pep26-output {
  margin-top: 34px;
}

.pep26-output-placeholder {
  padding: 34px;
  border: 1px dashed #b9c5cf;
  border-radius: 12px;
  color: var(--pep26-muted);
  background: var(--pep26-soft);
  text-align: center;
}

.pep26-error {
  padding: 20px 22px;
  border-left: 5px solid #b32929;
  border-radius: 8px;
  color: #762121;
  background: #fff1f1;
}

.pep26-error p {
  margin: 8px 0 0;
}

/* Generated report */
.pep26-report {
  overflow: hidden;
  border: 1px solid var(--pep26-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(18, 38, 53, .10);
}

.pep26-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--pep26-line);
  background: #fff;
}

.pep26-secondary-button {
  padding: 10px 15px;
  border: 1px solid #aebbc6;
  color: #243746;
  background: #fff;
}

.pep26-report-cover {
  padding: 44px 38px 38px;
  border-bottom: 5px solid var(--pep26-blue);
  background: linear-gradient(180deg, #eef4f8 0%, #fff 72%);
  text-align: center;
}

.pep26-cover-kicker,
.pep26-feature-kicker {
  color: var(--pep26-blue-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pep26-report-cover h1 {
  margin: 8px 0 4px;
  color: var(--pep26-ink);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.pep26-cover-subtitle {
  color: var(--pep26-muted);
  font-size: .95rem;
}

.pep26-cover-tone-label {
  margin-top: 25px;
  color: var(--pep26-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pep26-cover-tone,
.pep26-core-tone {
  margin-top: 3px;
  color: var(--pep26-blue-dark);
  font-size: clamp(2rem, 5vw, 3.7rem);
  font-weight: 500;
  letter-spacing: .07em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.pep26-cover-meta {
  margin-top: 9px;
  color: var(--pep26-muted);
}

.pep26-overview-grid,
.pep26-data-grid,
.pep26-two-column,
.pep26-three-column,
.pep26-process-flow,
.pep26-friction-sequence,
.pep26-cycle-grid,
.pep26-method-grid {
  display: grid;
  gap: 15px;
}

.pep26-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 30px;
  text-align: left;
}

.pep26-data-grid,
.pep26-two-column,
.pep26-process-flow,
.pep26-method-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pep26-three-column,
.pep26-friction-sequence,
.pep26-cycle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pep26-card {
  padding: 17px;
  border: 1px solid var(--pep26-line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
}

.pep26-card h3 {
  margin: 0 0 7px;
  color: var(--pep26-blue-dark);
  font-size: .92rem;
}

.pep26-card code,
.pep26-method-grid code {
  overflow-wrap: anywhere;
  font-size: .83rem;
}

.pep26-inline-tone {
  letter-spacing: .04em;
}

.pep26-summary-panel {
  max-width: 900px;
  margin: 24px auto 0;
  padding: 22px 24px;
  border-radius: 10px;
  background: #162938;
  color: #fff;
  text-align: left;
}

.pep26-summary-panel h2 {
  margin-bottom: 8px;
  color: #fff;
  font-size: 1.25rem;
}

.pep26-summary-panel p:last-child {
  margin-bottom: 0;
}

.pep26-report-content {
  padding: 10px 38px 38px;
}

.pep26-report-section,
.pep26-methodology {
  padding: 33px 0;
  border-bottom: 1px solid var(--pep26-line);
}

.pep26-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 18px;
}

.pep26-section-number {
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--pep26-blue-dark);
  font-weight: 800;
}

.pep26-section-heading h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.pep26-framework-label {
  margin-top: 3px;
  color: var(--pep26-muted);
  font-size: .78rem;
}

.pep26-highlight,
.pep26-practice,
.pep26-feature-block {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 9px;
}

.pep26-highlight {
  border-left: 5px solid var(--pep26-green);
  background: #edf7f3;
}

.pep26-practice {
  border-left: 5px solid var(--pep26-warm);
  background: #fff8ed;
}

.pep26-feature-block {
  border: 1px solid #c8d9e5;
  background: var(--pep26-soft-blue);
}

.pep26-feature-block h3 {
  margin: 6px 0 8px;
  font-size: 1.35rem;
}

.pep26-tone-feature {
  text-align: center;
}

.pep26-pronunciation {
  margin: 6px 0 15px;
  color: var(--pep26-muted);
}

.pep26-tone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-top: 18px;
}

.pep26-tone-card {
  padding: 18px;
  border: 1px solid var(--pep26-line);
  border-radius: 9px;
  background: #fff;
}

.pep26-tone-domain {
  color: var(--pep26-muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pep26-tone-syllable {
  margin: 3px 0;
  color: var(--pep26-blue-dark);
  font-size: 2rem;
  font-weight: 600;
}

.pep26-tone-equation {
  margin-bottom: 10px;
  color: #3c4b58;
  font-size: .84rem;
  font-weight: 700;
}

.pep26-small-note {
  margin-top: 12px;
  color: var(--pep26-muted);
  font-size: .8rem;
  line-height: 1.45;
}

.pep26-table-wrap {
  overflow-x: auto;
  margin-top: 17px;
}

.pep26-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.pep26-table th,
.pep26-table td {
  padding: 12px 13px;
  border: 1px solid var(--pep26-line);
  text-align: left;
  vertical-align: top;
}

.pep26-table th {
  color: #fff;
  background: var(--pep26-blue-dark);
}

.pep26-report-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 38px;
  color: rgba(255,255,255,.83);
  background: #162938;
  font-size: .82rem;
}

@media (max-width: 860px) {
  .pep26-overview-grid,
  .pep26-three-column,
  .pep26-friction-sequence,
  .pep26-cycle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #pep26-app {
    margin: 16px 8px;
  }

  .pep26-page-header,
  .pep26-form-card,
  .pep26-report-cover,
  .pep26-report-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .pep26-mode-switch {
    grid-template-columns: 1fr;
  }

  .pep26-field,
  .pep26-field.pep26-third {
    grid-column: 1 / -1;
  }

  .pep26-overview-grid,
  .pep26-data-grid,
  .pep26-two-column,
  .pep26-three-column,
  .pep26-process-flow,
  .pep26-friction-sequence,
  .pep26-cycle-grid,
  .pep26-method-grid,
  .pep26-tone-grid {
    grid-template-columns: 1fr;
  }

  .pep26-report-actions,
  .pep26-report-footer {
    flex-direction: column;
  }
}



/* v26.3 grammar and mode-clarity components */
.pep26-opening-summary {
  margin: 26px 0 8px;
}
.pep26-subsection-heading {
  margin: 30px 0 16px;
  padding-top: 22px;
  border-top: 1px solid var(--pep26-line);
}

.pep26-subsection-heading h3 {
  margin: 0 0 7px;
  color: var(--pep26-blue-dark);
  font-size: 1.3rem;
}

.pep26-subsection-heading p {
  margin: 0;
  color: var(--pep26-muted);
}

.pep26-number-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.pep26-number-card {
  align-content: start;
}

.pep26-number-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}

.pep26-number-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: var(--pep26-blue-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.pep26-number-heading strong,
.pep26-number-heading small {
  display: block;
}

.pep26-number-heading small {
  margin-top: 2px;
  color: var(--pep26-muted);
  font-size: .82rem;
}

.pep26-relation-label {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--pep26-blue-dark);
  background: var(--pep26-soft-blue);
  font-size: .78rem;
  font-weight: 700;
}

.pep26-resonance-table th:nth-child(1) { width: 13%; }
.pep26-resonance-table th:nth-child(2) { width: 17%; }
.pep26-resonance-table th:nth-child(3) { width: 36%; }
.pep26-resonance-table th:nth-child(4) { width: 34%; }

@media (max-width: 850px) {
  .pep26-number-grid {
    grid-template-columns: 1fr;
  }
}

/*
 * PRINT / SAVE-PDF RULES
 * The cover occupies the first page. Logical content groups begin on new pages
 * before sections 5, 8, and 11. Individual cards stay together,
 * while long sections are allowed to flow naturally rather than creating blank pages.
 */
@page {
  size: Letter;
  margin: .9in .95in;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  #pep26-generated-report,
  #pep26-generated-report * {
    visibility: visible !important;
  }

  #pep26-generated-report {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #111 !important;
    background: #fff !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10.5pt !important;
    line-height: 1.4 !important;
  }

  .pep26-report-actions {
    display: none !important;
  }

  .pep26-report-cover {
    min-height: 8.55in;
    padding: .28in .08in .16in !important;
    border-bottom: 3px solid #194e70 !important;
    background: #fff !important;
    break-after: page;
    page-break-after: always;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pep26-report-content {
    padding: 0 .04in !important;
  }

  .pep26-report-section,
  .pep26-methodology {
    padding: .22in 0 !important;
    border-bottom: 1px solid #c8c8c8 !important;
    break-inside: auto;
    page-break-inside: auto;
  }

  .pep26-print-break-before {
    break-before: page !important;
    page-break-before: always !important;
  }

  .pep26-section-heading,
  .pep26-section-heading h2,
  .pep26-feature-kicker,
  .pep26-table thead {
    break-after: avoid;
    page-break-after: avoid;
  }

  .pep26-card,
  .pep26-tone-card,
  .pep26-number-card,
  .pep26-feature-block,
  .pep26-highlight,
  .pep26-practice,
  .pep26-summary-panel,
  .pep26-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pep26-table thead {
    display: table-header-group;
  }

  .pep26-table tfoot {
    display: table-footer-group;
  }

  .pep26-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pep26-data-grid,
  .pep26-two-column,
  .pep26-process-flow,
  .pep26-method-grid,
  .pep26-tone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pep26-three-column {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .pep26-friction-sequence,
  .pep26-cycle-grid,
  .pep26-number-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pep26-card,
  .pep26-tone-card {
    padding: 10px !important;
  }

  .pep26-summary-panel,
  .pep26-table th,
  .pep26-section-number,
  .pep26-report-footer {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pep26-summary-panel {
    background: #edf3f7 !important;
    color: #111 !important;
    border: 1px solid #b6c4cf !important;
  }

  .pep26-summary-panel h2 {
    color: #111 !important;
  }

  .pep26-table th {
    color: #fff !important;
    background: #194e70 !important;
  }

  .pep26-report-footer {
    margin-top: .22in;
    padding: 11px 14px !important;
    color: #fff !important;
    background: #162938 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .pep26-cover-tone,
  .pep26-core-tone {
    font-size: 26pt !important;
  }

  .pep26-report h1 {
    font-size: 24pt !important;
  }

  .pep26-report h2 {
    font-size: 15pt !important;
  }

  .pep26-report h3 {
    font-size: 11pt !important;
  }

  .pep26-report p,
  .pep26-report li,
  .pep26-report td {
    orphans: 3;
    widows: 3;
  }
}

/* v26.5 plugin enhancements */
.pep26-header-icon{width:68px;height:68px;margin:0 auto 14px;color:#fff;opacity:.95}.pep26-header-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}
.pep26-privacy-note{display:flex;gap:14px;align-items:flex-start;margin:-8px 0 28px;padding:16px 18px;border:1px solid #b8d7c9;border-radius:10px;background:#f0f8f4;color:#254d40}.pep26-privacy-note svg{width:27px;height:27px;flex:0 0 27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.pep26-privacy-note strong{display:block;margin-bottom:2px}
.pep26-calculation-note{margin:0 0 24px;padding:20px 22px;border:1px solid #c9dbe6;border-radius:10px;background:#f5f9fc}.pep26-calculation-note h4{margin:0 0 10px;color:var(--pep26-blue-dark);font-size:1.05rem}.pep26-calculation-note p{margin:8px 0}
.pep26-copyright{flex-basis:100%;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.2);text-align:center;font-size:.78rem;opacity:.9}
@media(max-width:680px){.pep26-privacy-note{align-items:flex-start}.pep26-header-icon{width:58px;height:58px}}
@media print{.pep26-privacy-note{display:none!important}.pep26-copyright{color:#333;border-top:1px solid #bbb}}


/* v26.6.2 visual refinement: section markers remain numeric; SVG icons support controls and summaries. */
.pep26-mode-option span{display:flex;align-items:center;justify-content:center;gap:9px}
.pep26-option-icon{width:21px;height:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pep26-primary-button,.pep26-secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.pep26-button-icon{width:19px;height:19px;flex:0 0 19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pep26-summary-panel h2{display:flex;align-items:center;gap:9px}
.pep26-heading-icon{width:23px;height:23px;flex:0 0 23px}
