#math-wiki .mw-content.mw-roadmap-content { max-width: 1540px; }
#math-wiki .mw-content.mw-roadmap-content { padding-top: 18px; }
#math-wiki .mw-roadmap-content [hidden] { display: none !important; }
#math-wiki .roadmap-intro { max-width: 76ch; }
#math-wiki .roadmap-intro h1 { margin: 12px 0 10px; }
#math-wiki .mw-roadmap-content a { color: #2465ac; text-decoration: underline; text-underline-offset: 3px; }
#math-wiki .mw-roadmap-content a:hover { color: #111; }
#math-wiki .roadmap-controls { margin: 18px 0 22px; padding: 14px 20px; background: #f2f4f5; border-radius: 12px; }
#math-wiki .roadmap-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
#math-wiki .roadmap-field label, #math-wiki .roadmap-field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
#math-wiki .roadmap-show-recommended { width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 5px; background: #96322f; color: #fff; font: inherit; cursor: pointer; }
#math-wiki .roadmap-show-recommended:hover { background: #7b2927; }
#math-wiki .roadmap-field .roadmap-template-help { font-size: 12px; color: #4e555b; margin: 6px 0 0; }
#math-wiki .roadmap-field select { display: block; width: 100%; min-height: 44px; padding: 8px; font: inherit; color: #111; background: #fff; border: 1px solid #767676; border-radius: 5px; }
#math-wiki .roadmap-control-notes { display: flex; align-items: center; gap: 24px; margin-top: 14px; }
#math-wiki .roadmap-check { display: flex; gap: 9px; align-items: center; font-size: 14px; cursor: pointer; }
#math-wiki .roadmap-check input { width: 18px; height: 18px; flex-shrink: 0; margin: 0; accent-color: #96322f; }
#math-wiki .roadmap-control-notes p { font-size: 13px; color: #4e555b; margin: 0; }
#math-wiki .roadmap-workspace { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }
#math-wiki .roadmap-workspace h2 { margin: 0 0 6px; font-size: 24px; }
#math-wiki .roadmap-workspace h3 { font-size: 18px; font-weight: 600; margin: 16px 0 10px; }
#math-wiki .roadmap-bank-intro, #math-wiki .roadmap-board-intro { font-size: 14px; color: #4e555b; margin-bottom: 14px; }
#math-wiki .roadmap-bank { min-width: 0; }
#math-wiki .roadmap-custom-form { margin: 2px 0 18px; }
#math-wiki .roadmap-custom-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
#math-wiki .roadmap-custom-entry { display: flex; flex-wrap: wrap; gap: 8px; }
#math-wiki .roadmap-custom-form input, #math-wiki .roadmap-custom-form select { min-width: 0; width: 100%; padding: 8px; min-height: 44px; border: 1px solid #767676; border-radius: 5px; font: inherit; }
#math-wiki .roadmap-custom-form input::placeholder { color: #59636b; opacity: 1; }
#math-wiki .roadmap-custom-entry button { min-height: 40px; padding: 7px 12px; border: 0; border-radius: 5px; background: #96322f; color: #fff; cursor: pointer; font-size: 14px; }
#math-wiki .roadmap-custom-entry button:hover { background: #7b2927; }
#math-wiki .roadmap-custom-form p { font-size: 12px; color: #4e555b; margin: 8px 0 0; }
#math-wiki .roadmap-custom-form .roadmap-node-error { color: #962421; }
#math-wiki .roadmap-custom-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; }
#math-wiki .roadmap-custom-form select { background: #fff; color: #111; }
#math-wiki #roadmap-other-subject-field { margin-top: 10px; }
#math-wiki .roadmap-custom-matches { list-style: none; padding: 0; margin: 8px 0; max-height: 260px; overflow-y: auto; }
#math-wiki .roadmap-custom-matches:empty { margin: 0; }
#math-wiki .roadmap-course-match { display: block; width: 100%; text-align: left; padding: 10px 8px; min-height: 44px; border: 0; border-bottom: 1px solid #dce0e3; background: #fff; color: #111; cursor: pointer; font: inherit; font-size: 13px; }
#math-wiki .roadmap-course-match strong, #math-wiki .roadmap-course-match span { display: block; }
#math-wiki .roadmap-course-match:hover { background: #f2f4f5; }
#math-wiki .roadmap-custom-form .roadmap-match-status { margin-top: 10px; }
#math-wiki .roadmap-custom-remove { display: block; min-height: 40px; padding: 6px 0; margin-top: 4px; border: 0; color: #2465ac; text-decoration: underline; text-underline-offset: 3px; background: transparent; cursor: pointer; font-size: 12px; }
#math-wiki .roadmap-bank-scroll { max-height: 950px; overflow-y: auto; padding: 0 12px 8px 0; scrollbar-color: #929ba2 #f2f4f5; scrollbar-width: thin; }
#math-wiki .roadmap-course-list { list-style: none; margin: 0; padding: 0; }
#math-wiki .roadmap-suggestion { border-bottom: 1px solid #dce0e3; padding: 12px 0 16px; }
#math-wiki .roadmap-pick { display: block; width: 100%; padding: 10px 12px; border: 1px solid #bac2c8; border-radius: 8px; color: #111; background: #fff; cursor: grab; text-align: left; font: inherit; }
#math-wiki .roadmap-pick strong, #math-wiki .roadmap-pick span, #math-wiki .roadmap-pick small { display: block; }
#math-wiki .roadmap-pick span { font-size: 14px; margin-top: 2px; }
#math-wiki .roadmap-pick small { font-size: 12px; color: #4e555b; margin-top: 8px; }
#math-wiki .roadmap-pick:hover { border-color: #96322f; background: #fcf5f4; }
#math-wiki .roadmap-pick[aria-pressed="true"] { background: #f7e5e3; border-color: #96322f; }
#math-wiki .roadmap-suggestion p { font-size: 13px; margin: 8px 0 6px; color: #424242; }
#math-wiki .roadmap-suggestion>a { font-size: 13px; }
#math-wiki .roadmap-board { min-width: 0; }
#math-wiki .roadmap-board-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#math-wiki .roadmap-board-tools { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
#math-wiki .roadmap-undo { padding: 6px; min-height: 40px; border: 0; background: transparent; color: #2465ac; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; }
#math-wiki .roadmap-save-status { font-size: 12px; color: #4e555b; }
#math-wiki .roadmap-selection { display: flex; gap: 12px; align-items: center; padding: 10px 14px; margin: 10px 0; background: #f2f4f5; border-radius: 8px; min-height: 52px; }
#math-wiki .roadmap-selection p { font-size: 14px; margin: 0; flex: 1; }
#math-wiki .roadmap-jump { display: inline-block; font-size: 13px; margin: 0 0 12px; }
#math-wiki .roadmap-years { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
#math-wiki .roadmap-year { min-width: 0; }
#math-wiki .roadmap-year>h3 { font-size: 19px; padding-bottom: 10px; border-bottom: 1px solid #b9c1c7; margin: 0; }
#math-wiki .roadmap-semester { margin-top: 14px; scroll-margin-top: 18px; }
#math-wiki .roadmap-semester+.roadmap-semester { margin-top: 24px; padding-top: 16px; border-top: 1px dashed #b9c1c7; }
#math-wiki .roadmap-semester h4 { margin: 0 0 10px; font-size: 15px; font-weight: 600; padding: 5px 8px; }
#math-wiki .roadmap-node-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
#math-wiki .roadmap-node { padding: 12px; border: 1px dashed #89959e; border-radius: 12px; background: #fff; min-width: 0; }
#math-wiki .roadmap-node.is-filled { border: 1px solid #96322f; background: #fcf5f4; }
#math-wiki .roadmap-node.is-drag-over { outline: 3px solid #2465ac; outline-offset: 2px; background: #edf4fc; }
#math-wiki .roadmap-node.is-moving { outline: 2px dashed #96322f; outline-offset: 3px; }
#math-wiki .roadmap-node-number { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #4e555b; }
#math-wiki .roadmap-node-number input { min-width: 0; width: 100%; font-family: inherit; font-weight: 600; font-size: 17px; line-height: 1.5; background: transparent; color: #111; border: 0; border-bottom: 1px solid #89959e; border-radius: 0; padding: 6px 2px; min-height: 40px; caret-color: #96322f; }
#math-wiki .roadmap-node-number input::placeholder { color: #59636b; font-size: 14px; font-weight: 400; opacity: 1; }
#math-wiki .roadmap-node .roadmap-node-title { font-size: 12px; line-height: 1.5; color: #4e555b; margin: 8px 0 0; min-height: 36px; }
#math-wiki .roadmap-node .roadmap-node-error { font-size: 12px; color: #962421; margin: 8px 0 0; }
#math-wiki .roadmap-node-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
#math-wiki .roadmap-node-actions button, #math-wiki .roadmap-node-actions a { font-size: 12px; }
#math-wiki .roadmap-node-actions a { display: inline-flex; align-items: center; min-height: 40px; }
#math-wiki .mw-roadmap-content button { font-family: inherit; }
#math-wiki .roadmap-node-actions button, #math-wiki .roadmap-cancel, #math-wiki .roadmap-add-node { min-height: 40px; padding: 4px 6px; background: transparent; border: 0; color: #2465ac; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#math-wiki .roadmap-node-actions .roadmap-place { width: 100%; background: #96322f; color: #fff; border-radius: 5px; text-decoration: none; margin-top: 10px; }
#math-wiki .roadmap-node-actions button[draggable] { cursor: grab; }
#math-wiki .roadmap-add-node { font-size: 12px; margin-top: 4px; }
#math-wiki .mw-roadmap-content button:disabled { color: #59636b; cursor: default; text-decoration: none; }
#math-wiki .roadmap-node-actions .roadmap-place:disabled { color: #424242; background: #e6e8ea; }
#math-wiki .roadmap-skip { position: absolute; left: 16px; top: -100px; padding: 12px; background: #fff; z-index: 30; }
#math-wiki .roadmap-skip:focus { top: 12px; }
#math-wiki .mw-roadmap-content :focus-visible, #math-wiki .roadmap-skip:focus-visible { outline: 3px solid #2465ac; outline-offset: 3px; }
#math-wiki .mw-roadmap-content ::selection { background: #e7c8c6; color: #111; }
#math-wiki .roadmap-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#math-wiki .roadmap-note { margin-top: 30px; padding-top: 20px; border-top: 1px solid #e0e3e5; }
#math-wiki .roadmap-note p { max-width: 90ch; color: #424242; font-size: 14px; }
@media (max-width: 1100px) {
  #math-wiki .roadmap-workspace { grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
  #math-wiki .roadmap-years { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
}
@media (max-width: 720px) {
  #math-wiki .roadmap-fields { grid-template-columns: 1fr; gap: 14px; }
  #math-wiki .roadmap-control-notes { flex-direction: column; gap: 12px; align-items: flex-start; }
  #math-wiki .roadmap-workspace { grid-template-columns: 1fr; gap: 30px; }
  #math-wiki .roadmap-bank-scroll { max-height: 360px; padding: 4px 8px 8px 4px; }
  #math-wiki .roadmap-bank-scroll:focus-visible { outline-offset: 0; }
}
@media (max-width: 420px) {
  #math-wiki .roadmap-years { grid-template-columns: 1fr; }
}

#math-wiki .roadmap-prior-courses { margin: 12px 0; font-size: 14px; }
#math-wiki .roadmap-prior-courses summary, #math-wiki .roadmap-node-prerequisites summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#math-wiki .roadmap-prior-courses label { display: block; font-weight: 600; margin: 12px 0 6px; }
#math-wiki .roadmap-prior-courses textarea { display: block; width: 100%; max-width: 640px; min-height: 64px; padding: 8px; border: 1px solid #767676; border-radius: 5px; resize: vertical; font: inherit; }
#math-wiki .roadmap-prior-courses textarea::placeholder { color: #59636b; opacity: 1; }
#math-wiki .roadmap-prior-courses p { max-width: 75ch; font-size: 12px; margin: 6px 0 10px; }
#math-wiki .roadmap-prior-courses button { min-height: 40px; padding: 7px 12px; border: 1px solid #767676; border-radius: 5px; background: #fff; color: #111; cursor: pointer; font: inherit; }
#math-wiki .roadmap-prior-courses button:hover { background: #f2f4f5; }
#math-wiki .roadmap-prerequisite-summary { font-size: 13px; margin: 12px 0; color: #4e555b; }
#math-wiki .roadmap-node-prerequisites { font-size: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #dce0e3; overflow-wrap: anywhere; }
#math-wiki .roadmap-node-prerequisites p { font-size: 12px; line-height: 1.5; margin: 0 0 8px; }
#math-wiki .roadmap-node-prerequisites ul { margin: 0 0 10px; padding-left: 16px; }
#math-wiki .roadmap-node-prerequisites li + li { margin-top: 6px; }
#math-wiki .roadmap-node-prerequisites .roadmap-prereq-heading { font-weight: 600; }
#math-wiki .has-prerequisite-warning .roadmap-node-prerequisites { color: #734000; border-top-color: #b99b75; }
#math-wiki .has-prerequisite-warning .roadmap-prereq-heading { padding: 5px 7px; background: #fff1d6; border-radius: 4px; }
#math-wiki .roadmap-node-prerequisites details p { margin-top: 8px; }
