/* Public chrome follows index.html; utility cards follow the finished Recon,
   dashboard and Academy pages. All colors and controls use the shared foundation. */
.plan-page {
  --pr-font-sans: "Instrument Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pr-font-display: var(--pr-font-sans);
  margin: 0;
  font-size: 14px;
}
a { text-underline-offset: 4px; }
.plan-shell, .plan-nav, .footer-shell { width: min(calc(100% - 64px), 1120px); margin-inline: auto; }
.plan-header { position: relative; z-index: 10; }
.plan-nav { min-height: 72px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--pr-text-strong) !important; text-decoration: none; font-size: 1rem; font-weight: 650; letter-spacing: -.035em; }
.brand svg { width: 27px; height: 27px; color: #dce1e7; }
.desktop-links { display: flex; gap: 6px; margin-inline: auto; }
.desktop-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 7px; font-size: .8rem; text-decoration: none; }
.desktop-links a:hover { background: var(--pr-surface-2); }
.nav-actions, .actions { display: flex; flex-wrap: wrap; gap: 9px; }
.nav-actions { flex-shrink: 0; }
.nav-actions .pr-btn { min-height: 40px; padding: 0 14px; font-size: .8rem; }
.mobile-menu { display: none; margin-left: auto; }
.mobile-menu summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--pr-border); border-radius: 8px; background: var(--pr-surface-2); color: var(--pr-text); list-style: none; cursor: pointer; font-size: .8rem; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary svg { width: 18px; height: 18px; }
.mobile-menu summary:focus-visible { outline: 2px solid var(--pr-focus); outline-offset: 3px; box-shadow: var(--pr-shadow-focus); }
.mobile-menu[open] summary { border-color: var(--pr-border-strong); }
.mobile-links { position: absolute; top: calc(100% - 4px); left: 16px; right: 16px; padding: 8px; border: 1px solid var(--pr-border); border-radius: 10px; background: var(--pr-surface-1); box-shadow: var(--pr-shadow-md); }
.mobile-links a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 7px; text-decoration: none; }
.mobile-links a:hover { background: var(--pr-surface-3); }
.skip { position: fixed; top: 10px; left: 12px; z-index: 50; padding: 10px 14px; border: 1px solid var(--pr-focus); border-radius: 7px; background: var(--pr-surface-2); color: var(--pr-text-strong); transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; color: var(--pr-text-muted); font: 500 .65rem/1.5 var(--pr-font-mono); }
.breadcrumb a { color: inherit; text-decoration: none; }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 64px; align-items: center; padding: 36px 0 32px; }
.eyebrow { display: block; color: var(--pr-text-muted); font: 500 .64rem/1.5 var(--pr-font-mono); letter-spacing: .09em; }
.hero-intro > .eyebrow { display: flex; align-items: center; gap: 10px; }
.hero-intro > .eyebrow::before { content: ""; width: 20px; height: 1px; background: var(--pr-color-brand); }
h1 { margin: 16px 0; color: var(--pr-text-strong); font: 620 clamp(2rem, 3.4vw, 3rem)/1.07 var(--pr-font-display); letter-spacing: -.045em; }
h1 span { color: var(--pr-text-muted); }
.hero-intro > p { max-width: 600px; font-size: .95rem; line-height: 1.7; }
p { margin: 8px 0 16px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 20px; color: var(--pr-text-muted); font: 500 .63rem/1.4 var(--pr-font-mono); }
.hero-meta span + span { border-left: 1px solid var(--pr-border-strong); padding-left: 16px; }
.hero-workflow { padding-left: 28px; border-left: 1px solid var(--pr-border); }
.hero-workflow ol { list-style: none; padding: 0; margin: 18px 0 0; }
.hero-workflow li { display: flex; gap: 14px; margin-top: 18px; }
.hero-workflow li > span { color: var(--pr-text-muted); font: 500 .63rem/1.8 var(--pr-font-mono); }
.hero-workflow strong { color: var(--pr-text); font-size: .82rem; font-weight: 580; }
.hero-workflow p { margin: 3px 0 0; font-size: .78rem; }
.notice { display: flex; gap: 12px; padding: 17px 20px; border: 1px solid var(--pr-border); border-radius: 10px; background: var(--pr-surface-1); }
.notice-mark { flex: 0 0 20px; height: 20px; margin-top: 2px; border: 1px solid var(--pr-border-strong); border-radius: 50%; text-align: center; color: var(--pr-text-muted); font: 500 .75rem/18px var(--pr-font-mono); }
.notice strong { color: var(--pr-text); font-size: .82rem; font-weight: 580; }
.notice p { margin: 4px 0 0; font-size: .8rem; line-height: 1.65; }
.workspace { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 22px; align-items: start; margin: 24px 0 32px; scroll-margin-top: 20px; }
.panel { min-width: 0; border: 1px solid var(--pr-border); border-radius: 14px; background: var(--pr-surface-1); box-shadow: var(--pr-shadow-sm); }
.panel-heading { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 16px 22px; border-bottom: 1px solid var(--pr-border); border-radius: 14px 14px 0 0; background: #0b0d10; }
.step-index { color: #d98b92; background: var(--pr-color-brand-soft); border: 1px solid var(--pr-color-brand-border); border-radius: 5px; padding: 3px 6px; font: 500 .65rem/1.5 var(--pr-font-mono); }
h2 { margin: 0; color: var(--pr-text-strong); font: 600 1.08rem/1.35 var(--pr-font-display); letter-spacing: -.025em; }
.panel-heading h2 { font-size: .92rem; }
.panel-body { padding: 22px; }
.panel-body > p { font-size: .82rem; }
label { display: block; margin: 22px 0 8px; color: var(--pr-text-muted); font-size: .78rem; font-weight: 560; }
select { width: 100%; min-height: 46px; padding: 10px 12px; background: #101318; font: 400 .84rem/1.5 var(--pr-font-sans); cursor: pointer; }
select:user-invalid { border-color: var(--pr-state-error); }
select:hover { border-color: #48515f; }
fieldset { margin: 26px 0; border: 0; padding: 0; min-width: 0; }
legend { color: var(--pr-text-muted); font-size: .78rem; font-weight: 560; }
fieldset label { display: flex; align-items: center; gap: 10px; min-height: 46px; margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--pr-border); border-radius: 8px; background: #101318; color: var(--pr-text); font-size: .82rem; cursor: pointer; }
fieldset label:has(input:checked) { border-color: var(--pr-color-brand-border); background: var(--pr-color-brand-soft); }
fieldset label:hover { border-color: var(--pr-border-strong); }
.plan-page input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--pr-color-brand-strong); }
.form-panel .actions { display: grid; grid-template-columns: minmax(0,1fr) auto; }
.form-panel .actions + p { margin: 18px 0 0; font-size: .75rem; line-height: 1.6; }
.pr-btn, .cta { font-family: var(--pr-font-sans); font-size: .8rem; font-weight: 600; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 15px; border: 1px solid var(--pr-border-strong); border-radius: var(--pr-radius-md); background: var(--pr-surface-2); color: var(--pr-text); text-decoration: none; text-align: center; line-height: 1.4; }
.cta:hover { background: var(--pr-surface-3); color: var(--pr-text-strong); border-color: #48515f; }
.cta.primary { background: var(--pr-color-brand-strong); border-color: var(--pr-color-brand-strong); color: var(--pr-text-on-accent); }
.cta.primary:hover { background: #d93240; }
#plan-status { min-height: 24px; margin: 18px 0 0; padding-left: 10px; border-left: 2px solid var(--pr-border-strong); color: var(--pr-text-muted); font-size: .78rem; }
#plan-status:empty { min-height: 0; border: 0; margin: 0; }
#empty-plan { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; margin-top: 24px; padding: 32px 24px; border: 1px dashed var(--pr-border-strong); border-radius: 10px; background: #0b0d10; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border: 1px solid var(--pr-border); border-radius: 10px; color: var(--pr-text-muted); background: var(--pr-surface-2); }
.empty-icon svg { width: 24px; height: 24px; }
h3 { margin: 0 0 10px; color: var(--pr-text-strong); font: 580 .95rem/1.4 var(--pr-font-display); letter-spacing: -.015em; }
#empty-plan p { max-width: 340px; margin: 0; font-size: .82rem; line-height: 1.7; }
#plan-output:not(:empty) { margin-top: 28px; }
#plan-output > p { color: var(--pr-text-muted); font-size: .78rem; }
#plan-output > h3 { margin-top: 22px; }
#plan-output ol, #plan-output ul { padding-left: 20px; color: var(--pr-text); font-size: .84rem; line-height: 1.8; }
#plan-output li { padding-left: 3px; margin-bottom: 12px; }
#plan-output li::marker { color: var(--pr-text-muted); }
.check { margin-top: 18px; padding: 22px; border: 1px solid var(--pr-border); border-radius: 10px; background: #101318; }
.check h3 { margin-bottom: 9px; }
.check .badge { display: inline-flex; margin: 0 0 12px; padding: 3px 8px; border: 1px solid var(--pr-border-strong); border-radius: 999px; color: var(--pr-text-muted); font: 500 .63rem/1.5 var(--pr-font-mono); }
.check h4 { margin: 20px 0 7px; color: var(--pr-text-muted); font: 500 .64rem/1.5 var(--pr-font-mono); letter-spacing: .06em; text-transform: uppercase; }
.check p { margin: 0; color: var(--pr-text-muted); font-size: .82rem; line-height: 1.8; }
.learning { margin: 32px 0; padding: 28px; border: 1px solid var(--pr-border); border-radius: 12px; background: var(--pr-surface-1); }
.learning > .eyebrow { margin-bottom: 12px; }
.learning h2 { font-size: 1.25rem; }
.learning p { max-width: 800px; font-size: .86rem; line-height: 1.8; }
.learning a:not(.cta) { color: var(--pr-text); }
.learning .actions { margin: 22px 0; }
.learning .actions + p { font-size: .77rem; }
.learning-guide { margin-bottom: 64px; background: transparent; }
.learning-guide h3 { margin-top: 24px; }
/* Homepage footer structure, with the same line mark and legal identity. */
.pr-footer { background: #07090c; }
.footer-shell { padding: 64px 0 28px; }
.footer-layout { display: grid; grid-template-columns: minmax(230px,1.4fr) repeat(4,minmax(100px,.75fr)); gap: 32px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-logo { width: 30px; height: 30px; color: #dce1e7; }
.footer-logo svg { width: 100%; height: 100%; display: block; }
.footer-name { color: var(--pr-text-strong); font: 650 1rem/1 var(--pr-font-sans); letter-spacing: -.025em; }
.footer-summary { max-width: 285px; margin: 20px 0 0; font-size: .85rem; line-height: 1.8; }
.footer-social { margin-top: 16px; font-size: .8rem; }
.footer-group-title { margin: 0 0 20px; color: var(--pr-text-muted); font: 500 .65rem/1.5 var(--pr-font-mono); letter-spacing: .12em; text-transform: uppercase; }
.footer-group ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-group a { display: inline-flex; align-items: center; min-height: 32px; font-size: .8rem; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 32px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--pr-border); }
.footer-company, .footer-use-note { margin: 0; font-size: .72rem; line-height: 1.8; }
.footer-use-note { max-width: 340px; text-align: right; }
.footer-meta-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: .75rem; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .plan-nav { gap: 16px; }
  .desktop-links a { padding: 0 7px; font-size: .75rem; }
  .hero { gap: 32px; }
  .footer-layout { grid-template-columns: minmax(230px,1.4fr) repeat(2,minmax(100px,1fr)); row-gap: 32px; }
}
@media (max-width: 900px) {
  .desktop-links, .nav-actions { display: none; }
  .mobile-menu { display: block; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .form-panel .panel-body { display: block; }
  #empty-plan { min-height: 260px; }
}
@media (max-width: 768px) {
  .plan-shell, .plan-nav, .footer-shell { width: calc(100% - 32px); }
  .hero { grid-template-columns: minmax(0,1fr); gap: 28px; padding: 28px 0; }
  .hero-workflow { display: none; }
  h1 { font-size: clamp(2rem,5.8vw,2.65rem); }
  .footer-layout { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px 24px; }
  .footer-identity { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 20px; }
  .footer-use-note { text-align: left; }
}
@media (max-width: 480px) {
  .plan-nav { min-height: 64px; }
  .breadcrumb { margin-top: 20px; font-size: .6rem; gap: 8px; }
  .hero-meta { gap: 8px 12px; font-size: .6rem; }
  .hero-meta span + span { padding-left: 12px; }
  .notice { padding: 16px; gap: 10px; }
  .panel-heading, .panel-body { padding: 18px 16px; }
  .workspace { gap: 20px; }
  .results-panel .actions { display: grid; grid-template-columns: minmax(0,1fr); }
  #empty-plan { min-height: 240px; padding: 24px 16px; }
  .check { padding: 18px 14px; }
  .learning { padding: 24px 18px; }
  .learning .actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .footer-shell { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { .pr-btn { transition: none; } }
@media (forced-colors: active) { .step-index, .badge, .empty-icon { border-color: CanvasText; } }

/* Progressive enhancement: keep native select semantics and platform fallback.
   Supported browsers render the picker in the top layer without custom JS. */
@supports (appearance: base-select) {
  #plan-form select,
  #plan-form select::picker(select) { appearance: base-select; }
  #plan-form select { align-items: center; gap: 12px; }
  #plan-form select::picker-icon { color: var(--pr-text-muted); }
  #plan-form select:open { border-color: var(--pr-color-brand); }
  #plan-form select:open::picker-icon { color: var(--pr-focus); }
  #plan-form select::picker(select) {
    box-sizing: border-box;
    min-width: anchor-size(width);
    max-width: calc(100vw - 32px);
    max-height: min(360px, 55dvh);
    overflow-y: auto;
    margin-block: 6px;
    padding: 6px;
    border: 1px solid var(--pr-border-strong);
    border-radius: 10px;
    background: var(--pr-surface-2);
    color: var(--pr-text);
    box-shadow: var(--pr-shadow-lg);
    font: 400 .84rem/1.5 var(--pr-font-sans);
    scrollbar-color: var(--pr-border-strong) var(--pr-surface-2);
  }
  #plan-form option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--pr-text);
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
  }
  #plan-form option[value=""] { color: var(--pr-text-muted); }
  #plan-form option:hover { background: var(--pr-surface-3); color: var(--pr-text-strong); }
  #plan-form option:checked:not([value=""]) {
    border-color: var(--pr-color-brand-border);
    background: var(--pr-color-brand-soft);
    color: #e8a0a6;
  }
  #plan-form option:focus-visible {
    outline: 2px solid var(--pr-focus);
    outline-offset: -2px;
    background: var(--pr-color-brand-soft);
    color: var(--pr-text-strong);
  }
  #plan-form option::checkmark { color: var(--pr-focus); }
}
@media (forced-colors: active) {
  #plan-form option:checked { border-color: Highlight; }
}
