/* ==========================================================================
   Skills explorer and career mapper - the poster look for embedded activities
   --------------------------------------------------------------------------
   Loaded after ../../brand/ct.css, which supplies the fonts and colours.
   These pages are embedded in careers platforms, so the page background
   stays transparent and nothing here styles bare elements beyond the body.
   Contrast: see the list at the top of brand/ct.css.
   ========================================================================== */

:root {
  /* Names the pages' own scripts still use in inline styles. */
  --primary: #1F3BFF;
  --primary-glow: #E3E8FF;   /* cobalt on this is 6.2:1 */
  --text-main: #000;
  --text-muted: #4D4D4D;
  --border-color: #000;
  --card-bg: #FFF;
}

body { font: 16px/1.5 var(--ct-font); color: #000; background: transparent; margin: 0; padding: 24px 12px; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #000; outline-offset: 3px; }

.app-container { --pad: 36px; position: relative; max-width: 900px; margin: 0 auto; padding: var(--pad); background: #FFF; border: 2px solid #000; box-shadow: 4px 4px 0 #000; }

/* The title sits on a cobalt band that runs to the box's edges, with halftone
   dots fading in from one corner - the start-screen look from ct.css. */
.header-section {
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 32px;
  padding: var(--pad);
  color: #FFF;
  background:
    linear-gradient(125deg, var(--ct-cobalt) 40%, transparent 100%),
    radial-gradient(rgba(0, 0, 0, .22) 1.3px, transparent 1.7px) 0 0 / 11px 11px,
    var(--ct-cobalt);
  border-bottom: 2px solid #000;
}
.header-section h2 { margin: 0; font-family: var(--ct-serif); font-weight: 400; font-size: clamp(38px, 6vw, 60px); line-height: .98; letter-spacing: -0.015em; }
.highlight { padding: 0 8px; color: #000; background: var(--ct-sun); }
.header-section p { margin: 14px 0 0; max-width: 60ch; font-size: 17px; color: #E3E8FF; }
.header-section a { color: #fff; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Search: the box gets the hard shadow on focus instead of a glow. */
.search-wrapper { display: flex; gap: 12px; margin-bottom: 20px; }
.search-input { flex-grow: 1; min-width: 0; min-height: 56px; padding: 0 18px; font-size: 18px; color: #000; background: #FFF; border: 2px solid #000; border-radius: 0; outline: none; transition: box-shadow .12s ease; }
.search-input:focus { box-shadow: 4px 4px 0 #000; }

/* Every button: a black edge and a hard shadow that lifts on hover and presses flat. */
.search-btn, .suggestion-btn, .ksb-tab, .ksb-more-btn, .job-btn, .route-link, .progression-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 16px;
  font-weight: 700; font-size: 15px; line-height: 1.2;
  color: #000; background: #FFF; border: 2px solid #000; border-radius: 0; box-shadow: 4px 4px 0 #000;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.search-btn:hover:not(:disabled), .suggestion-btn:hover, .ksb-tab:hover, .ksb-more-btn:hover,
.job-btn:hover, .route-link:hover, .progression-cta:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.search-btn:active, .suggestion-btn:active, .ksb-tab:active, .ksb-more-btn:active,
.job-btn:active, .route-link:active, .progression-cta:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }
.ksb-tab.active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }

.search-btn { min-width: 160px; min-height: 56px; font-size: 17px; color: #FFF; background: #000; }
.search-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.suggestion-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 36px; }
@media (max-width: 768px) { .suggestion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Starter roles: full titles wrap onto a second line rather than being cut
   off, and the buttons run through the four colours. */
.suggestion-btn { justify-content: flex-start; text-align: left; overflow-wrap: anywhere; }
.suggestion-btn:nth-child(4n+1) { color: #FFF; background: var(--ct-cobalt); }
.suggestion-btn:nth-child(4n+2) { background: var(--ct-tomato); }
.suggestion-btn:nth-child(4n+3) { background: var(--ct-sun); }
.suggestion-btn:nth-child(4n+4) { background: var(--ct-mint); }

/* Never red: a problem gets a plain white box with a hard shadow. */
.error-box { display: none; margin-bottom: 20px; padding: 16px 18px; font-weight: 700; background: #FFF; border: 2px solid #000; box-shadow: 4px 4px 0 #000; }
.notice-box { margin-bottom: 20px; padding: 14px 16px; background: var(--ct-sun); border: 2px solid #000; }
.empty-note, .ksb-empty { padding: 16px; color: #4D4D4D; border: 2px dashed #000; }
.pathway-instruction { margin-bottom: 28px; padding: 14px 16px; font-weight: 700; background: var(--primary-glow); border: 2px solid #000; }

.results-dashboard { display: none; }

.role-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 2px solid #000; }
.role-header h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 6px; font-family: var(--ct-serif); font-weight: 400; font-size: clamp(32px, 4.5vw, 46px); line-height: 1; color: #000; }
.role-header p { margin: 0; color: #4D4D4D; }
.soc-code-text { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 700; color: #4D4D4D; }
.read-more-btn { padding: 0; font-weight: 700; color: #000; background: none; border: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Chips: square, 2px edge, small bold text. */
.grad-badge, .level-badge { display: inline-block; vertical-align: middle; padding: 2px 9px; font-family: var(--ct-font); font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #000; background: #FFF; border: 2px solid #000; border-radius: 0; }
.grad-yes { background: var(--ct-mint); }
.grad-no { background: #FFF; }
.level-badge { margin-left: 10px; }

/* Dialogs */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); }
.modal-content { position: relative; width: 90%; max-width: 520px; padding: 28px; color: #000; background: #FFF; border: 2px solid #000; box-shadow: 8px 8px 0 #000; }
.modal-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: #000; background: #FFF; border: 2px solid #000; box-shadow: 3px 3px 0 #000; cursor: pointer; }
.modal-title { margin: 0 48px 10px 0; font-family: var(--ct-serif); font-weight: 400; font-size: 32px; line-height: 1.05; color: #000; }
.modal-content.modal-wide { max-width: 720px; max-height: 82vh; display: flex; flex-direction: column; }
.modal-body-scroll { overflow-y: auto; margin-top: 6px; padding-right: 12px; }
.modal-body-scroll p { margin: 0 0 16px; color: #4D4D4D; }
.modal-body-scroll p:last-child { margin-bottom: 0; }
.modal-source { margin-top: 16px; padding-top: 14px; border-top: 2px solid #000; font-size: 14px; }
.modal-source a { color: #000; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* The standard: categories as pressed buttons, statements as a ruled list. */
.ksb-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.ksb-tab .ksb-count { margin-left: 6px; font-weight: 400; }
/* One colour per part of the standard: a swatch on its tab, the whole tab
   once chosen, and the markers down its list. */
.ksb-skills { --tone: var(--ct-cobalt); }
.ksb-knowledge { --tone: var(--ct-tomato); }
.ksb-behaviours { --tone: var(--ct-sun); }
.ksb-duties { --tone: var(--ct-mint); }
.ksb-tab::before { content: ''; width: 14px; height: 14px; background: var(--tone); border: 2px solid #000; }
.ksb-tab.active { background: var(--tone); }
.ksb-tab.active.ksb-skills { color: #FFF; }
.ksb-tab.active.ksb-skills::before { border-color: #FFF; }
.ksb-more-wrap { margin-top: 18px; }
.skills-grid { display: grid; border-top: 2px solid #000; }
.skill-card { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 2px solid #000; }
.skill-icon { flex: none; width: 14px; height: 14px; margin-top: 5px; font-size: 0; background: var(--tone, #000); border: 2px solid #000; }
.skill-text { margin: 0; font-size: 16px; line-height: 1.5; }
.skill-prefix { margin-right: 5px; font-weight: 700; }

/* Career mapper: the route. A thick line down the side with a square at each stage. */
.timeline-container { position: relative; margin-top: 10px; padding-left: 40px; }
.timeline-container::before { content: ''; position: absolute; left: 13px; top: 0; bottom: 0; width: 4px; background: #000; }
.timeline-node { position: relative; margin-bottom: 28px; }
.timeline-node:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -38px; top: 20px; z-index: 2; width: 26px; height: 26px; background: #FFF; border: 3px solid #000; border-radius: 0; }
.node-past .timeline-dot { background: #FFF; border-style: dashed; }
.node-current .timeline-dot { background: var(--ct-cobalt); }
.node-future .timeline-dot { background: #FFF; }
.timeline-card { padding: 22px; background: #FFF; border: 2px solid #000; }
.node-past .timeline-card { border-style: dashed; }
.node-current .timeline-card { box-shadow: 4px 4px 0 #000; }
.timeline-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #4D4D4D; }
.node-current .timeline-label { color: #000; }
.timeline-title { display: flex; align-items: center; flex-wrap: wrap; margin: 0 0 6px; font-family: var(--ct-serif); font-weight: 400; font-size: 28px; line-height: 1.1; color: #000; }
.job-btn { margin-top: 14px; }

.route-group { margin-bottom: 26px; }
.route-group-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid #000; }
.route-group-title { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ct-serif); font-size: 24px; font-weight: 400; letter-spacing: 0; text-transform: none; color: #000; }
.route-group-title::before { content: ''; width: 18px; height: 18px; background: var(--tone, #FFF); border: 2px solid #000; }
/* One colour per kind of route: ways in, onward moves, related roles.
   The chosen role itself is the cobalt card. */
.route-in { --tone: var(--ct-tomato); }
.route-on { --tone: var(--ct-sun); }
.route-related { --tone: var(--ct-mint); }
.route-group-note { font-size: 14px; color: #4D4D4D; }
.route-lane { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.route-card { display: flex; flex-direction: column; gap: 9px; padding: 16px; background: var(--tone, #FFF); border: 2px solid #000; box-shadow: 4px 4px 0 #000; }
.route-card .grad-badge, .route-card .level-badge { background: #FFF; }
.route-card-title { font-weight: 700; font-size: 17px; line-height: 1.3; }
.route-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.route-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.route-link { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.route-link.secondary { box-shadow: none; }
.route-flow { margin: -8px 0 16px; text-align: center; font-family: var(--ct-serif); font-size: 32px; line-height: 1; color: #000; }

.focus-card { margin-bottom: 16px; padding: 24px; color: #FFF; background: var(--ct-cobalt); border: 2px solid #000; box-shadow: 4px 4px 0 #000; }
.focus-card .grad-badge, .focus-card .level-badge, .focus-card .route-link { color: #000; }
.focus-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #E3E8FF; }
.focus-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 6px; font-family: var(--ct-serif); font-weight: 400; font-size: clamp(30px, 4vw, 42px); line-height: 1.05; }
.focus-card p { color: #E3E8FF; }
.focus-card :focus-visible { outline-color: #FFF; }
.suggest-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* Credit for the data, as the licence asks. */
.attribution-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 44px; padding-top: 22px; border-top: 2px solid #000; }
.se-logo { max-width: 180px; }
.ogl-text { font-size: 14px; color: #4D4D4D; }
.ogl-text a { color: #000; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media (max-width: 600px) {
  .app-container { --pad: 20px; }
  .search-wrapper { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
