.pd-page { margin: 0; background: #fff; color: var(--aw-ink); font: 15px/1.55 var(--aw-font); letter-spacing: 0; }
.pd-page *, .pd-page *::before, .pd-page *::after { box-sizing: border-box; letter-spacing: 0; }
.pd-page [hidden] { display: none !important; }
.pd-page button, .pd-page input, .pd-page select, .pd-page textarea { font: inherit; }
.pd-page button { cursor: pointer; }
.pd-page button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.pd-page :focus-visible { outline: 3px solid #8caeff; outline-offset: 3px; }
.pd-page svg { width: 18px; height: 18px; flex-shrink: 0; }
.pd-header { min-height: 84px; display: flex; gap: 24px; justify-content: space-between; align-items: center; padding: 18px max(24px, calc((100% - 1180px)/2)); border-bottom: 1px solid var(--aw-line); background: #fff; }
.pd-header img, .pd-footer img { display: block; object-fit: contain; }
.pd-header nav { display: flex; align-items: center; gap: 26px; font-size: 13px; }
.pd-header a { color: var(--aw-ink); text-decoration: none; }
.pd-preview { color: var(--aw-teal); background: #eff8f5; padding: 5px 9px; border-radius: 4px; white-space: nowrap; }
.pd-shell { max-width: 1180px; width: calc(100% - 48px); margin: auto; padding: 24px 0 64px; }
.pd-heading { text-align: center; padding: 0 12px 27px; margin-bottom: 28px; border-bottom: 1px solid var(--aw-line); }
.pd-eyebrow { color: var(--aw-blue); font-size: 13px; margin: 0 0 10px; }
.pd-heading h1 { font-size: 30px; line-height: 1.3; font-weight: 500; margin: 0 0 12px; }
.pd-heading > p:last-child { color: var(--aw-text); margin: 0; }
.pd-workspace { display: grid; grid-template-columns: minmax(0, .4fr) minmax(0, .6fr); gap: 30px; align-items: start; }
.pd-form-panel, .pd-result-panel { min-width: 0; border: 1px solid var(--aw-line); border-radius: 8px; background: #fff; box-shadow: 0 10px 32px #15263908; overflow: hidden; }
.pd-result-panel { border-color: #d4dfea; }
.pd-panel-heading { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 23px; background: #f8fafc; border-bottom: 1px solid var(--aw-line); }
.pd-panel-heading h2 { font-size: 21px; line-height: 1.3; font-weight: 500; margin: 0; }
.pd-state { font-size: 11px; color: var(--aw-muted); text-align: right; }
.pd-page fieldset { border: 0; padding: 24px; margin: 0; min-width: 0; }
.pd-page label, .pd-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.pd-page input:not([type=checkbox]):not([type=file]), .pd-page select, .pd-page textarea { width: 100%; border: 1px solid #becbd9; background: #fff; color: var(--aw-ink); border-radius: 5px; padding: 11px 12px; min-width: 0; }
.pd-page textarea { resize: vertical; line-height: 1.55; display: block; }
.pd-page input::placeholder, .pd-page textarea::placeholder { color: #748292; opacity: 1; }
.pd-field, .pd-case { margin-bottom: 20px; }
.pd-field-optional { margin-left: 8px; color: var(--aw-muted); font-size: 11px; font-weight: 400; }
.pd-case > button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; text-align: left; border: 1px solid #bbcff9; border-radius: 6px; background: #f3f7ff; color: var(--aw-ink); }
.pd-case small { display: block; font-size: 11px; color: var(--aw-blue); margin-bottom: 5px; }
.pd-case strong { display: block; font-size: 15px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.pd-case svg { color: var(--aw-blue); }
#prompt-form details { border-top: 1px solid var(--aw-line); }
#prompt-form summary { padding: 13px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; list-style: none; }
#prompt-form summary::-webkit-details-marker { display: none; }
#prompt-form summary svg { color: var(--aw-blue); }
#prompt-form summary small { font-size: 11px; color: var(--aw-muted); margin-left: 8px; font-weight: 400; }
#prompt-form details[open] > summary svg { transform: rotate(180deg); }
.pd-details-body { padding-bottom: 18px; }
.pd-help { color: var(--aw-muted); font-size: 12px; line-height: 1.5; margin: 10px 0 0; }
.pd-warning { padding: 12px; background: #fff7e9; border-left: 2px solid #e4b451; color: #70531d; font-size: 12px; }
.pd-page .pd-upload { display: flex; position: relative; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #aebfce; border-radius: 5px; padding: 13px; margin: 14px 0 0; cursor: pointer; }
.pd-upload input { position: absolute; width: 100%; height: 100%; inset: 0; opacity: 0; cursor: pointer; }
.pd-upload:focus-within { outline: 3px solid #8caeff; outline-offset: 2px; }
.pd-file-list { list-style: none; padding: 0; margin: 12px 0; }
.pd-file-list li { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--aw-line); font-size: 12px; }
.pd-file-list li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pd-file-list small { display: block; color: var(--aw-muted); }
#material-fields summary > span { min-width: 0; overflow-wrap: anywhere; }
#material-fields summary small { display: block; margin-left: 0; margin-top: 3px; }
#material-fields .pd-help { margin-bottom: 10px; }
#material-privacy { margin: 0 0 18px; }
.pd-icon, .pd-secondary, .pd-primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none; }
.pd-page .pd-icon { width: 36px; height: 36px; flex-shrink: 0; padding: 6px; color: var(--aw-text); background: transparent; border: 1px solid var(--aw-line); border-radius: 5px; }
.pd-page .pd-primary { background: var(--aw-blue); color: #fff; min-height: 52px; padding: 13px 21px; border: 1px solid var(--aw-blue); border-radius: 8px; font-size: 14px; font-weight: 500; box-shadow: 0 9px 22px #155eef20; }
.pd-page .pd-primary:hover:not(:disabled) { background: var(--aw-blue-dark); }
.pd-page .pd-secondary { padding: 9px 13px; min-height: 38px; border: 1px solid #d5dfe8; border-radius: 5px; background: #fff; color: var(--aw-ink); font-size: 13px; }
.pd-page .pd-secondary:hover:not(:disabled), .pd-icon:hover:not(:disabled) { background: #f3f7fc; }
.pd-form-actions { padding-top: 14px; text-align: center; }
.pd-form-actions > button { display: flex; margin: 12px auto 0; }
.pd-form-actions .pd-consent { text-align: left; }
#form-message, #execution-message { font-size: 13px; color: #a44318; margin: 0 0 14px; text-align: left; }
#form-message:empty, #execution-message:empty { display: none; }
.pd-tabs { display: flex; padding: 0 23px; border-bottom: 1px solid var(--aw-line); gap: 22px; }
.pd-tabs button { display: flex; align-items: center; gap: 8px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--aw-muted); padding: 15px 0 13px; font-size: 14px; }
.pd-tabs button[aria-selected=true] { color: var(--aw-blue); border-bottom-color: var(--aw-blue); }
#prompt-pane, #result-pane { padding: 24px; }
.pd-empty { min-height: 332px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 14px 4px; }
.pd-empty h3 { font-size: 19px; font-weight: 500; margin: 18px 0 8px; }
.pd-empty p { color: var(--aw-text); margin: 0 0 20px; font-size: 14px; max-width: 42ch; }
.pd-empty-icon { display: inline-flex; padding: 12px; background: #eef4ff; color: var(--aw-blue); border-radius: 7px; }
.pd-empty-icon svg { width: 25px; height: 25px; }
.pd-empty-icon.mint { background: #edf8f4; color: var(--aw-teal); }
.pd-example-list { width: 100%; display: grid; gap: 8px; }
.pd-example-list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 6px 0; background: transparent; color: var(--aw-blue); text-align: left; font-size: 13px; }
.pd-example-list svg { width: 15px; }
#prompt-editor .pd-label { display: flex; justify-content: space-between; gap: 8px; }
#character-count { color: var(--aw-muted); font-size: 11px; font-weight: 400; }
.pd-page #generated-prompt { background: #fbfcfd; min-height: 400px; max-height: 800px; font: 13px/1.7 var(--aw-font); }
.pd-output-actions { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.pd-execute { padding: 20px 24px; border-bottom: 1px solid var(--aw-line); background: #f8fafc; }
.pd-page .pd-consent { display: flex; gap: 10px; align-items: flex-start; color: var(--aw-text); font-size: 12px; font-weight: 400; margin-bottom: 16px; }
.pd-consent input { flex-shrink: 0; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--aw-blue); }
.pd-execute-actions { display: flex; gap: 12px; flex-wrap: wrap; }
#execution-message { margin-top: 12px; margin-bottom: 0; }
#answer { overflow-wrap: anywhere; font-size: 14px; line-height: 1.8; }
#answer > :first-child { margin-top: 0; }
#answer h1, #answer h2, #answer h3, #answer h4 { font-size: 18px; line-height: 1.4; font-weight: 500; margin: 24px 0 12px; }
#answer p { margin: 0 0 16px; }
#answer ul, #answer ol { padding-left: 22px; }
#answer li { margin: 6px 0; }
#answer blockquote { margin: 16px 0; border-left: 3px solid var(--aw-teal); padding-left: 16px; color: var(--aw-text); }
#answer pre { white-space: pre-wrap; background: #f8fafc; padding: 14px; border: 1px solid var(--aw-line); border-radius: 5px; }
.pd-table-scroll { max-width: 100%; overflow-x: auto; margin: 18px 0; }
#answer table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 13px; line-height: 1.55; }
#answer th, #answer td { padding: 12px; border: 1px solid var(--aw-line); min-width: 140px; vertical-align: top; overflow-wrap: break-word; }
#answer th { background: #eef4ff; text-align: left; font-weight: 500; }
#references { font-size: 12px; overflow-wrap: anywhere; margin-top: 16px; }
#references a, #answer a { color: var(--aw-blue); }
.pd-footer { border-top: 1px solid var(--aw-line); max-width: 1180px; margin: auto; padding: 40px 24px; font-size: 13px; color: var(--aw-text); }
.pd-footer nav { display: flex; gap: 20px; }
.pd-footer a { color: inherit; }
.pd-page dialog { max-width: 900px; width: calc(100% - 40px); max-height: 88dvh; padding: 28px; border: 1px solid var(--aw-line); border-radius: 8px; color: var(--aw-ink); box-shadow: 0 24px 70px #15263930; }
.pd-page dialog::backdrop { background: #15263966; }
.pd-dialog-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.pd-dialog-heading h2 { margin: 0; font-size: 25px; line-height: 1.25; font-weight: 500; }
.pd-page .pd-search { display: flex; position: relative; }
.pd-search > svg { position: absolute; left: 13px; top: 15px; color: var(--aw-muted); }
#catalog-search { padding-left: 41px; }
.pd-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.pd-filter-row select { margin-top: 5px; font-size: 13px; }
#catalog-count { color: var(--aw-muted); font-size: 12px; margin: 18px 0 12px; }
#catalog-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-case-option { display: flex; flex-direction: column; gap: 7px; padding: 16px; border: 1px solid var(--aw-line); border-radius: 6px; background: #fff; color: var(--aw-ink); text-align: left; min-width: 0; }
.pd-case-option:hover, .pd-case-option[aria-current=true] { border-color: #9dbcf8; background: #f5f8ff; }
.pd-case-option small { color: var(--aw-teal); font-size: 11px; }
.pd-case-option strong { font-size: 14px; line-height: 1.4; font-weight: 500; }
.pd-case-option > span { color: var(--aw-muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
#more-cases { display: flex; margin: 22px auto 0; }
#journeys { display: grid; gap: 0; }
.pd-page .pd-journey { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--aw-line); background: #fff; color: var(--aw-ink); text-align: left; font-size: 14px; }
.pd-journey svg { color: var(--aw-teal); }
.pd-page .pd-journey[aria-pressed=true] { color: var(--aw-blue); background: #eef4ff; }
.pd-page .pd-journey:hover { background: #f4f8fb; }
#prompt-form #guided-start { border-top: 0; }
#prompt-form #need-picker { margin-top: 12px; }
.pd-page .pd-need { width: 100%; display: block; padding: 12px 8px; text-align: left; color: var(--aw-ink); background: #fff; border: 0; border-bottom: 1px solid var(--aw-line); font-size: 13px; line-height: 1.5; }
.pd-page .pd-need:hover, .pd-page .pd-need[aria-pressed=true] { color: var(--aw-blue); background: #f3f7ff; }
.pd-page .pd-catalog-link { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 5px 0; border: 0; background: none; color: var(--aw-blue); font-size: 13px; text-align: left; }
.pd-selected-case { margin: 24px 0 20px; padding-top: 20px; border-top: 1px solid var(--aw-line); }
.pd-selected-case small { color: var(--aw-teal); font-size: 11px; }
.pd-selected-case h3 { font-size: 17px; font-weight: 500; line-height: 1.4; margin: 6px 0 0; }
#catalog-filters { margin-top: 14px; font-size: 13px; color: var(--aw-text); }
#catalog-filters summary { cursor: pointer; }
#result-pane[aria-busy=true] .pd-empty-icon { animation: pd-pulse 1.2s ease-in-out infinite alternate; }
@keyframes pd-pulse { to { opacity: .4; } }
.pd-skip { position: fixed; top: -100px; z-index: 10; padding: 12px; background: #fff; }
.pd-skip:focus { top: 0; }
@media (max-width: 800px) {
  .pd-header { padding: 18px 20px; min-height: 76px; }
  .pd-header img { width: 168px; height: 30px; }
  .pd-header nav > a { display: none; }
  .pd-shell { width: calc(100% - 32px); padding-top: 26px; padding-bottom: 36px; }
  .pd-heading { padding: 0 0 24px; }
  .pd-heading h1 { font-size: 26px; }
  .pd-workspace { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .pd-page fieldset, #prompt-pane, #result-pane, .pd-execute { padding: 20px; }
  .pd-panel-heading { padding: 14px 20px; }
  .pd-empty { min-height: 280px; }
  .pd-page dialog { padding: 20px; width: calc(100% - 24px); max-height: 92dvh; }
  .pd-filter-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #catalog-list { grid-template-columns: 1fr; }
  .pd-preview { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .pd-page * { scroll-behavior: auto !important; animation: none !important; } }
#pd-output-title { scroll-margin-top: 24px; }

/* One discovery surface, then short input pages with persistent orientation. */
.pd-shell { padding-top: 18px; padding-bottom: 32px; }
.pd-heading { text-align: left; padding: 0; margin-bottom: 14px; border: 0; }
.pd-heading .pd-eyebrow { margin-bottom: 4px; }
.pd-heading h1 { font-size: 26px; margin-bottom: 5px; }
.pd-heading > p:last-child { font-size: 14px; }
.pd-progress { position: sticky; top: 0; z-index: 3; background: #fff; scroll-margin-top: 12px; display: flex; align-items: center; gap: 14px; min-height: 54px; border-block: 1px solid var(--aw-line); margin-bottom: 22px; }
.pd-progress button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 0; border: 0; background: none; color: var(--aw-text); font-size: 13px; white-space: nowrap; }
.pd-progress button > span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--aw-line); border-radius: 50%; color: var(--aw-text); font-size: 12px; }
.pd-progress button[aria-current=step] { color: var(--aw-blue); font-weight: 600; }
.pd-progress button[aria-current=step] > span { color: #fff; background: var(--aw-blue); border-color: var(--aw-blue); }
.pd-progress > svg { width: 14px; transform: rotate(-90deg); color: var(--aw-muted); }
#current-task { margin: 0 0 0 auto; max-width: 48%; font-size: 12px; color: var(--aw-text); }
.pd-discovery { min-height: 400px; padding: 4px 0 22px; }
.pd-discovery h2 { font-size: 22px; font-weight: 500; margin: 0 0 18px; }
.pd-discovery > .pd-search { max-width: 760px; margin: 0 0 22px; }
.pd-page #quick-search { min-height: 52px; padding-left: 44px; font-size: 15px; border-color: #9aaec5; }
.pd-discovery .pd-search > svg { top: 17px; color: var(--aw-blue); }
.pd-discovery details { border: 0; }
.pd-discovery summary { font-size: 13px; color: var(--aw-text); list-style: none; margin-bottom: 12px; }
.pd-discovery summary::-webkit-details-marker { display: none; }
#journeys { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pd-discovery .pd-journey { border: 1px solid var(--aw-line); border-radius: 6px; min-height: 68px; padding: 14px 16px; line-height: 1.4; }
.pd-discovery .pd-journey[aria-pressed=true] { border-color: var(--aw-blue); background: #f0f5ff; }
.pd-journey:nth-child(3n+1) svg { color: var(--aw-blue); }
.pd-journey:nth-child(3n) svg { color: #8a601d; }
#need-picker { margin-top: 22px; }
#need-picker > summary { font-weight: 600; color: var(--aw-ink); }
#need-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.pd-discovery .pd-need { min-height: 52px; padding: 12px 0; font-size: 14px; }
#quick-results { max-width: 760px; }
.pd-quick-result { display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 3px 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--aw-line); background: #fff; color: var(--aw-ink); padding: 13px 8px; }
.pd-quick-result strong { font-size: 14px; font-weight: 500; }
.pd-quick-result small { font-size: 12px; color: var(--aw-muted); grid-column: 1; }
.pd-quick-result svg { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--aw-blue); }
.pd-quick-result:hover { background: #f5f8fb; }
.pd-workspace { grid-template-columns: minmax(0, .46fr) minmax(0, .54fr); gap: 24px; }
.pd-panel-heading { min-height: 60px; padding: 12px 20px; }
.pd-panel-heading h2 { font-size: 19px; }
#input-position { display: block; color: var(--aw-blue); font-size: 12px; margin-bottom: 3px; }
.pd-state { font-size: 12px; }
.pd-page #input-fields { padding: 18px 20px 20px; min-height: 396px; display: flex; flex-direction: column; }
#input-fields > #case-fields { flex: 1 0 auto; min-height: 358px; }
#case-fields { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pd-selected-case { margin: 0 0 18px; padding: 0 0 12px; border-top: 0; border-bottom: 1px solid var(--aw-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pd-selected-case h3 { display: none; }
.pd-selected-case .pd-catalog-link { margin: 0; font-size: 12px; }
.pd-field { margin-bottom: 15px; }
.pd-form-actions { margin-top: auto; padding-top: 14px; text-align: left; }
.pd-form-actions .pd-help { margin: 0 0 12px; }
.pd-page-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-top: 10px; }
#page-count { font-size: 12px; color: var(--aw-muted); }
.pd-page #next-input { min-height: 44px; min-width: 122px; border-radius: 6px; box-shadow: none; }
.pd-form-actions .pd-consent { margin-bottom: 10px; }
.pd-page #generate-result { min-height: 46px; width: 100%; border-radius: 6px; box-shadow: none; }
.pd-page .pd-text-action { display: inline-flex; align-items: center; min-height: 36px; padding: 5px 0; border: 0; background: none; color: var(--aw-blue); font-size: 13px; }
#build-prompt { margin: 6px 0 0; width: 100%; justify-content: center; }
.pd-execute { padding: 12px 20px; }
.pd-execute:not(:has(button:not([hidden]))):not(:has(p:not([hidden]):not(:empty))) { display: none; }
.pd-execute .pd-help { margin-top: 0; }
.pd-execute-actions:not(:empty) { margin-bottom: 6px; }
.pd-empty { min-height: 230px; padding: 6px 0; }
.pd-empty h3 { font-size: 18px; }
.pd-empty p { margin-bottom: 0; }
.pd-result-panel { position: sticky; top: 76px; }
.pd-page #generated-prompt { height: 320px; min-height: 260px; }
@media (max-width: 800px) {
  .pd-heading h1 { font-size: 24px; }
  .pd-progress { gap: 10px; flex-wrap: wrap; padding: 5px 0; margin-bottom: 18px; }
  .pd-progress button { font-size: 12px; gap: 6px; }
  .pd-progress > svg { display: none; }
  #current-task { flex-basis: 100%; max-width: none; margin: 0 0 5px; }
  #journeys { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pd-discovery .pd-journey { min-height: 88px; padding: 12px; align-items: flex-start; font-size: 13px; }
  .pd-discovery .pd-journey svg { margin-top: 2px; }
  #need-choices { grid-template-columns: minmax(0, 1fr); }
  .pd-discovery { min-height: 340px; }
  .pd-workspace { grid-template-columns: minmax(0, 1fr); }
  #workspace[data-stage="2"] .pd-result-panel, #workspace[data-stage="3"] .pd-form-panel { display: none; }
  .pd-result-panel { position: static; }
  .pd-page #input-fields { min-height: 340px; padding: 16px; }
  #input-fields > #case-fields { min-height: 308px; }
  .pd-selected-case small { max-width: 60%; }
}
