/* Shared suggest-a-tool dialog (pd-suggest-dialog.js). Scoped to .psd; same palette as the guide pages. */
html.psd-lock { overflow: hidden; }
.psd {
  --a: #3ee6b5; --a-rgb: 62, 230, 181; --r: #ff8a6b;
  --ln: rgba(170, 205, 215, .11); --ln2: rgba(170, 205, 215, .2);
  --tx: #eef4f2; --tx2: #aebbb7; --mut: #8a9b96;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  width: min(720px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0;
  overflow: hidden; border: 1px solid var(--ln2); border-radius: 20px; color: var(--tx2);
  background: linear-gradient(180deg, #131f28, #0d151c); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(var(--a-rgb), .06);
  font-family: Inter, system-ui, sans-serif;
}
.psd[open] { display: flex; animation: psd-in .28s cubic-bezier(.2, .7, .2, 1); }
.psd::backdrop { background: rgba(4, 7, 10, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.psd *, .psd *::before, .psd *::after { box-sizing: border-box; }
.psd :where(h2, p, fieldset, legend) { margin: 0; padding: 0; }
.psd fieldset { border: 0; min-width: 0; display: grid; gap: 14px; }
.psd [hidden] { display: none !important; }
.psd-box { display: flex; flex-direction: column; width: 100%; max-height: calc(100dvh - 34px); overflow-y: auto; overscroll-behavior: contain; }
.psd-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; }
.psd-kicker { color: var(--a); font: 500 11.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.psd-title { margin-top: 6px !important; color: #f3f8f6; font: 600 clamp(1.3rem, 3vw, 1.6rem)/1.15 "Space Grotesk", Inter, system-ui, sans-serif; letter-spacing: -.02em; }
.psd-sub { margin-top: 8px !important; max-width: 36rem; color: var(--tx2); font-size: .94rem; line-height: 1.55; }
.psd-x { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--ln2); border-radius: 11px; background: rgba(255, 255, 255, .02); color: #c9d6d2; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.psd-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.psd-x:hover { border-color: rgba(var(--a-rgb), .5); color: #fff; background: rgba(var(--a-rgb), .08); }
.psd-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ln); border-bottom: 1px solid var(--ln); }
.psd-tab { min-height: 50px; padding: 0 16px; border: 0; background: none; color: #b7c5c1; font: 600 .96rem/1.2 Inter, system-ui, sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.psd-tab + .psd-tab { border-left: 1px solid var(--ln); }
.psd-tab[aria-selected="true"] { color: #effff9; background: rgba(var(--a-rgb), .07); box-shadow: inset 0 -2px 0 var(--a); }
.psd-form { display: grid; gap: 14px; padding: 20px 24px 24px; }
.psd-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.psd-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.psd-field { display: grid; gap: 6px; min-width: 0; }
.psd-field > span { color: #c9d6d2; font: 500 13.5px/1.3 Inter, system-ui, sans-serif; }
.psd-field > span b { color: var(--a); font-weight: 600; }
.psd-field > span em, .psd-more summary em { margin-left: 6px; color: var(--mut); font-style: normal; font-weight: 400; }
.psd-field input:not([type="radio"]), .psd-field select, .psd-field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--ln2); border-radius: 10px;
  background: rgba(11, 17, 23, .8); color: var(--tx); font: 400 15px/1.45 Inter, system-ui, sans-serif; outline: none; transition: border-color .2s, box-shadow .2s;
}
.psd-field textarea { resize: vertical; }
.psd-field ::placeholder { color: #6c7d78; }
.psd-field select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #8a9b96 50%), linear-gradient(135deg, #8a9b96 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.psd-field select option { background: #0f171e; color: var(--tx); }
.psd-field input:focus, .psd-field select:focus, .psd-field textarea:focus { border-color: rgba(var(--a-rgb), .6); box-shadow: 0 0 0 3px rgba(var(--a-rgb), .12); }
.psd-field [aria-invalid="true"] { border-color: var(--r) !important; box-shadow: 0 0 0 3px rgba(255, 138, 107, .14) !important; }
.psd-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.psd-radios label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--ln2); border-radius: 10px; color: #d5e2de; font-size: 14px; cursor: pointer; }
.psd-radios input { width: 16px; height: 16px; margin: 0; accent-color: #3ee6b5; }
.psd-radios input[aria-invalid="true"] { outline: 2px solid var(--r); outline-offset: 2px; }
.psd-radios label:has(input:checked) { border-color: rgba(var(--a-rgb), .6); background: rgba(var(--a-rgb), .1); }
.psd-more { border: 1px solid var(--ln); border-radius: 12px; padding: 12px 14px; }
.psd-more summary { color: #c9d6d2; font: 500 13.5px/1.3 Inter, system-ui, sans-serif; cursor: pointer; }
.psd-more[open] summary { margin-bottom: 2px; }
.psd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.psd-foot { align-items: flex-end; }
.psd-cap { display: grid; gap: 6px; min-width: 0; }
.psd-cap-l { color: #c9d6d2; font: 500 13.5px/1.3 Inter, system-ui, sans-serif; }
.psd-cap-l b { color: var(--a); font-weight: 600; }
.psd-captcha { min-height: 65px; min-width: 300px; }
.psd-cap-wait { display: flex; align-items: center; gap: 10px; width: 300px; height: 65px; padding: 0 16px; border: 1px dashed var(--ln2); border-radius: 8px; color: var(--mut); font-size: 13.5px; }
.psd-cap-wait::before { content: ""; width: 16px; height: 16px; flex: none; border: 2px solid rgba(var(--a-rgb), .25); border-top-color: var(--a); border-radius: 50%; animation: psd-spin .8s linear infinite; }
.psd-captcha.is-failed { max-width: 420px; padding: 12px 14px; border: 1px solid rgba(255, 138, 107, .45); border-radius: 8px; background: rgba(255, 138, 107, .06); color: #ffc4b6; font-size: 13.5px; line-height: 1.5; }
@keyframes psd-spin { to { transform: rotate(360deg); } }
.psd-send {
  min-height: 46px; padding: 0 28px; border: 1px solid rgba(var(--a-rgb), .6); border-radius: 12px; background: rgba(var(--a-rgb), .16);
  color: #d9fcf0; font: 600 15px/1 Inter, system-ui, sans-serif; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s;
}
.psd-send:hover { background: var(--a); color: #062019; box-shadow: 0 10px 24px -12px rgba(var(--a-rgb), .9); }
.psd-send:disabled { opacity: .6; cursor: progress; }
.psd-status { min-height: 1.4em; color: var(--tx2); font-size: .94rem; }
.psd-status.is-ok { color: #8ff0cf; }
.psd-status.is-err { color: #ffb4a3; }
.psd-note { color: var(--mut); font-size: .82rem; line-height: 1.5; }
.psd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.psd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.psd :focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
.psd-tab:focus-visible { outline-offset: -2px; }
@keyframes psd-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .psd { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .psd-box { max-height: 100dvh; }
  .psd-head { padding: 18px 16px 14px; }
  .psd-form { padding: 16px 16px 24px; }
  .psd-row2, .psd-row3 { grid-template-columns: minmax(0, 1fr); }
  .psd-captcha, .psd-cap-wait { min-width: 0; width: 100%; }
  .psd-cap { flex: 1 1 100%; }
  .psd-send { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .psd[open], .psd-cap-wait::before { animation: none; } }
