.plan-actions { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; align-items: center; margin: 1rem 0; }
.plan-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); align-items: start; margin-bottom: 3rem; }
.plan-editor { display: grid; gap: 1.35rem; }
.plan-notice { margin: 0 0 1.4rem; padding: .85rem 1rem; border-left: 3px solid var(--rust); background: #eee5d7; }
.plan-notice p { margin: 0; }
.plan-notice p + p { margin-top: .25rem; }
.plan-editor fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); }
.plan-editor legend { padding: 0 .4rem; font: 400 1.85rem/1 var(--serif); }
.plan-editor label { display: grid; gap: .25rem; align-content: start; font-weight: 600; }
.plan-editor input, .plan-editor select, .plan-editor textarea { width: 100%; min-width: 0; padding: .44rem .5rem; font: inherit; font-weight: 400; color: var(--ink); border: 1px solid #8f877b; background: #fffdf8; border-radius: 3px; }
.plan-editor input[type="file"] { font-size: .9rem; }
.plan-editor textarea { resize: vertical; }
.plan-editor [hidden] { display: none; }
.plan-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.plan-wide { grid-column: 1 / -1; }
.plan-methods h2 { font-size: 1.85rem; margin-bottom: .45rem; }
.plan-methods fieldset + fieldset, .plan-methods .plan-options { margin-top: 1rem; }
.plan-options { min-width: 0; border: 1px solid var(--line); padding: .75rem 1rem; }
.plan-options summary { cursor: pointer; font-weight: 600; }
.plan-options summary:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.plan-options[open] summary { margin-bottom: .8rem; }
.plan-options .plan-help { margin-top: 1rem; }
.plan-review-link { justify-self: start; font-weight: 600; }
.plan-help, .plan-status { font-size: .92rem; }
.plan-help p:last-child, .plan-status:empty { margin: 0; }
.plan-button { cursor: pointer; padding: .55rem .9rem; border: 1px solid var(--rust); border-radius: 3px; background: var(--rust); color: white; font: inherit; font-weight: 600; }
.plan-button:hover { background: var(--ink); border-color: var(--ink); }
.plan-button:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.plan-secondary { margin-top: .8rem; }
.plan-blank { max-width: 48rem; margin: 0 auto 3rem; }
.plan-sheet { padding: clamp(1rem, 3vw, 1.7rem); border: 1px solid var(--line); background: #fffdf8; overflow-wrap: anywhere; }
.plan-sheet h2 { font-size: clamp(2.4rem, 5vw, 3.4rem); }
.plan-sheet h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.plan-summary { display: grid; gap: .55rem; margin: 1rem 0 1.3rem; }
.plan-summary dt, .plan-routes strong { font-weight: 600; }
.plan-summary dd { min-height: 1.6em; margin: 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; }
.plan-blank [data-summary="contacts"] { min-height: 4em; }
.plan-routes { display: grid; gap: .55rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.plan-routes li { padding: .45rem .65rem; border: 1px solid var(--line); }
.plan-routes li > div { min-height: 2.4em; white-space: pre-wrap; }
.plan-blank .plan-routes li > div { min-height: 3.5em; }
.plan-write-in { display: block; font-size: .8em; color: var(--soft-ink); }
.plan-prompt { margin: 0; font-size: .92rem; }
@media (max-width: 850px) {
  .plan-workspace { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .subhead.plan-tools { padding-top: 2rem; }
  .subhead.plan-tools h1 { font-size: clamp(2.85rem, 10vw, 3.8rem); }
  .plan-fields { grid-template-columns: 1fr; }
}
@media print {
  @page { margin: .55in; }
  .plan-tools { display: none !important; }
  .plan-workspace { display: block; margin: 0; }
  .plan-blank { max-width: none; margin: 0; }
  .plan-sheet { padding: 0; border: 0; background: white; color: black; font-size: 10.5pt; }
  .plan-sheet h2 { font-size: 29pt; }
  .plan-sheet h3 { font-size: 16pt; break-after: avoid; }
  .plan-summary { grid-template-columns: 1fr 1fr; }
  .plan-routes li { break-inside: avoid; }
  .plan-summary dt { break-after: avoid; }
  .plan-routes li > div { min-height: 2.5em; }
}
.discovery { margin: 0 0 2rem; padding: clamp(1rem,3vw,2rem); border: 1px solid var(--line); background: #f0e8dc; }
.discovery-heading { max-width: 49rem; }
.discovery-heading h2 { font-size: clamp(2.1rem,4vw,3rem); }
.discovery label { display: grid; gap: .3rem; font-weight: 600; align-content: start; }
.discovery input, .discovery select, .discovery textarea { width: 100%; min-width: 0; padding: .5rem; font: inherit; color: var(--ink); background: #fffdf8; border: 1px solid #8f877b; border-radius: 3px; }
.discovery .plan-fields { margin: .8rem 0; }
.discovery-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
.discovery [hidden], .channel-print[hidden] { display: none; }
.discovery .source-credit { font-size: .9rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.discovery .plan-button:disabled { opacity: .6; cursor: default; }
.candidate-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; max-height: 38rem; overflow: auto; margin: 1rem 0; }
.candidate { padding: 1rem; background: #fffdf8; border: 1px solid var(--line); overflow-wrap: anywhere; }
.candidate h3 { font-size: 1.7rem; margin: 0 0 .3rem; }
.candidate-frequency { font-family: var(--mono); font-size: .95rem; }
.candidate p { margin: .4rem 0; }
.candidate a { font-size: .9rem; }
.candidate button { display: block; }
.rr-connection { margin: 1.2rem 0; }
.discovery-selected { margin-top: 1.6rem; }
.discovery-selected h3 { font-size: 2rem; }
.selected-channel { margin: 1rem 0; padding: 1rem; min-width: 0; background: #fffdf8; border: 1px solid var(--line); }
.selected-channel legend { font: 1.8rem/1.1 var(--serif); padding: 0 .4rem; }
.discovery .channel-review { display: flex; gap: .6rem; align-items: start; margin: 1rem 0; }
.discovery .channel-review input { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; margin-top: .3rem; }
.selected-channel .plan-actions > label { min-width: 10rem; }
.route-outline { background: #fffdf8; padding: .7rem; margin: 1rem 0; border: 1px solid var(--line); }
.route-outline svg { display: block; width: 100%; height: auto; max-height: 16rem; }
.route-checkpoints { overflow-x: auto; }
.candidate-route-position { font-weight: 700; color: #ae432b; }
.route-checkpoints table { width: 100%; font-size: .9rem; }
.route-checkpoints th, .route-checkpoints td { padding: .5rem; text-align: left; border-bottom: 1px solid var(--line, #d8cdbb); }
.channel-print { margin: 0 0 2rem; }
.channel-print h2 { font-size: 2.5rem; }
.channel-print li { margin: .6rem 0; }
@media(max-width:700px) { .candidate-list, .discovery-fields { grid-template-columns: 1fr; } }
@media print { .channel-print { break-before: page; } .channel-print li { break-inside: avoid; } .channel-sources p { overflow-wrap: anywhere; } }
