/* FEKT 1.0 (Mahen), the colour code: what makes the FEKT tracker its own, on top of the shared Hulko CSS (app.css,
   look.css stay as the FIT tracker has them, so an update can be copied over). Loaded last.
   A FEKT-blue header band, flat cool ground, white cards in hairlines with 6px corners, and on every course card a
   resistor whose colour bands give its credits. Signal orange marks the next deadline and nothing else */
html{overflow-x:clip}
body{background:var(--paper)}
::selection{background:color-mix(in srgb,var(--pri) 22%,transparent)}
h2,h3,.sumtitle,.uptitle{letter-spacing:-.01em}
.wrap{isolation:isolate}

/* the header band: FEKT blue the full width of the window, behind the mark, the programme line and the tools */
.wrap>.top{position:relative;margin-top:-20px;padding:22px 0 24px;color:var(--on-band)}
.wrap>.top::before{content:"";position:absolute;z-index:-1;inset:0 calc(50% - 50vw);background:var(--band)}
.wrap>.top .wm{color:var(--on-band)}
.wrap>.top{--wmark:#00356c}
.wrap>.top .subline,.wrap>.top .subline *{color:color-mix(in srgb,var(--on-band) 82%,transparent)}
.wrap>.top .gear{background:color-mix(in srgb,var(--on-band) 8%,transparent);border-color:color-mix(in srgb,var(--on-band) 38%,transparent);color:var(--on-band)}
.wrap>.top .gear:hover{background:color-mix(in srgb,var(--on-band) 16%,transparent)}
.wrap>.top .gear:focus-visible{outline:2px solid var(--on-band);outline-offset:2px}
.wm .hx{fill:var(--accent)}
.wrap>.top .wm .hx{fill:var(--rbody)}

/* sheets and controls: 6px corners, one hairline, no shadow; an open course card draws its frame in ink */
details.course,details.course[data-vs],.summary,.upnext,.plan,.panel,.nextline,.mbox,.mbox.sets{border-radius:6px;box-shadow:none}
details.course[open]{box-shadow:none;border-color:color-mix(in srgb,var(--ink) 38%,var(--line))}
details.course[data-vs="planned"]{border-style:dashed}
.btn,.gear,.chip,.footrep,.upitem,.crstep,.ghome{border-radius:6px}
.gear{box-shadow:none}
.chip{box-shadow:none;border:1px solid var(--line)}
.seg{border-radius:7px;border:1px solid var(--line);padding:2px;background:var(--card)}
.seg button,.seg.slide .thumb{border-radius:5px}
.seg button[aria-pressed="true"],.seg.slide .thumb{box-shadow:none}
.seg.slide .thumb{top:2px;bottom:2px;left:2px;width:calc((100% - 4px) / var(--n,2))}
.nextline .k{border-radius:4px}
.secret,.slider{border-radius:7px}
.pill,.pvchip,.grades .gm{border-radius:4px}
select,input[type=text],input.optq,input.dtin[type=date]{border-radius:5px}
.advgrid li,.advgrid li *{border-radius:6px}
.advgrid li{box-shadow:none!important}
.ghome{margin-top:-14px;background:none}
.ghome:hover{background:var(--blue-soft)}

/* due soon or at risk is a warning, in amber, whatever colour theme is on */
.next .due.soon,.updue.soon,details.course:has(.next .due.soon) .code,details.course[data-vs="risk"] .code{color:var(--warn)}
details.course[data-vs="risk"] .cbar b{background:var(--warn)}

/* the next deadline, and only it, in signal orange: its sheet framed by an orange hairline, its label and date in orange ink */
.nextline{border-color:var(--sig)}
.nextline .k{background:none;color:var(--sig-ink);padding:0;font-size:12.5px;letter-spacing:.01em}
.nextline .updue,.nextline .updue.soon{color:var(--sig-ink)}
.uplist>li:first-child .updue{color:var(--sig-ink)}

/* the resistor: a metal-film body on its lead wire; the first band(s) are the credits in the colour code (violet = 7,
   brown black = 10), the last is the tolerance band: gold once passed, silver while it runs, none when failed */
.course .code{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.res{position:relative;display:inline-flex;align-items:center;gap:4px;height:18px;padding:0 12px 0 11px;margin-left:2px;border-radius:9px;
  background:var(--rbody)}
.res::before,.res::after{content:"";position:absolute;top:8px;width:10px;height:2px;background:var(--lead)}
.res::before{right:100%}.res::after{left:100%}
.res i{width:5px;height:100%;flex:none}
.res i.tol{margin-left:7px;background:var(--silver)}
.res i.tol.gold{background:var(--gold)}
.res i.tol.none{background:none}
details.course[data-vs="planned"] .res{opacity:.55}

/* a course's points: a flat bar on one scale, the pass marks as thin ink ticks */
.cbar{height:8px;border-radius:2px;background:color-mix(in srgb,var(--ink) 9%,var(--card))}
.cbar b{border-radius:2px}
.cbar i{width:2px;margin-left:-1px;border-radius:0;background:var(--ink);opacity:.8}
.bar{border-radius:3px}
.bar .done,.bar .prog,.bar.met .done,:root:not([data-race]) .bar .prog{border-radius:3px}

/* the footer's credits as a component's label: name, author, version and the way to report a problem in ruled cells */
.tblock{display:grid;grid-template-columns:auto 1fr auto;margin-top:10px;width:min(100%,640px);text-align:left;
  background:var(--card);border:1px solid var(--line);border-radius:6px;overflow:hidden}
.tblock>*{margin:0!important;padding:7px 12px;border-color:var(--line);text-align:left}
.tblock .tbname{grid-row:1/3;display:grid;align-content:center;border-right:1px solid;font-size:15px;font-weight:800;color:var(--on-band);background:var(--band);line-height:1.15}
.tblock .tbname span{font-size:11px;font-weight:600;color:color-mix(in srgb,var(--on-band) 80%,transparent)}
.tblock .madeby{grid-column:2;border-bottom:1px solid;font-size:12.5px}
.tblock .unoff{grid-column:2}
.tblock .appver{grid-column:3;grid-row:1;border-left:1px solid;border-bottom:1px solid;font-size:12px;opacity:1}
.tblock .footrep{grid-column:3;grid-row:2;border-left:1px solid;border-radius:0}
.tblock .footrep:hover{background:var(--blue-soft)}
.tblock .users{grid-column:1/-1;border-top:1px solid}
@media (max-width:560px){
  .tblock{grid-template-columns:1fr auto}
  .tblock .tbname{grid-row:auto;grid-column:1/-1;border-right:0;border-bottom:1px solid;display:flex;align-items:baseline;gap:8px}
  .tblock .madeby,.tblock .unoff{grid-column:1/-1}
  .tblock .unoff{border-bottom:1px solid}
  .tblock .appver{grid-column:1;grid-row:auto;border-left:0;border-bottom:0}
  .tblock .footrep{grid-column:2;grid-row:auto}
}

/* version history: flat FEKT blue for a major, 6px corners */
.logitem,.logmain,.logmajor,.loggrp>summary,.lv,.lmaj,.tag{border-radius:6px}
.logitem.major .lv,.logitem.sub .lv,.lmaj{background:var(--v4b)}
.logmajor{background:var(--v4b);animation:none;box-shadow:none}
.lmaj.sub,.logitem.sub .lv{background:none;color:var(--accent)}
.logmajor::after{display:none}

/* programme and specialisation: radio rows on the welcome's "Your programme" page, a note while none is picked */
.welspec{display:grid;gap:6px;margin:0;padding:8px 0 2px;border:0;border-top:1px solid var(--line);min-width:0}
.welspec legend{float:left;width:100%;display:grid;gap:1px;padding:0 0 4px;font-size:14px;font-weight:600}
.welspec legend small{font-size:12px;font-weight:400;color:var(--muted)}
.specopt{display:grid;grid-template-columns:auto 2.6em 1fr;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:6px;background:var(--card);font-size:13.5px;line-height:1.3;cursor:pointer;transition:background-color .15s,border-color .15s}
.specopt:hover{background:var(--blue-soft)}
.specopt:has(input:checked){border-color:var(--pri);background:var(--accent-soft)}
.specopt:has(input:focus-visible){outline:2px solid var(--ink);outline-offset:2px}
.specopt input{margin:0;accent-color:var(--pri)}
.specopt b{font-weight:800;font-variant-numeric:tabular-nums}
.specopt .wide{grid-column:2/-1;color:var(--muted)}
#set-spec{max-width:min(100%,300px)}
.specnote{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 14px;padding:10px 14px;border:1px dashed color-mix(in srgb,var(--ink) 35%,var(--line));border-radius:6px;font-size:14px}
.setgrp,.setfold,.setin{border-radius:6px}
/* the programme list on the welcome: twelve rows, so a little tighter, with room for codes like BPC-AMT */
.progopt{grid-template-columns:auto 5.4em 1fr;padding:6px 10px}
.welspec+.welspec{margin-top:6px}
.pvchip b.mono{font-weight:800}

/* flat fills only: planned and in-progress credits as flat tints, not stripes */
.bar .prog{background:color-mix(in srgb,var(--fill) 42%,transparent)}
.pseg.pln{background:color-mix(in srgb,var(--muted) 30%,transparent)}
.sw.pln{background:color-mix(in srgb,var(--muted) 38%,transparent)}
/* no coloured halos: a failed course and the deadline in danger keep their red outline, without the glow */
.bar.danger::after{box-shadow:none}
@keyframes failflash{20%{box-shadow:0 0 0 2px var(--bad)}}
.strikes .sb.x{box-shadow:none!important}
/* December: the lights wear white and FEKT blues (red and green belong to the resistors), and the snow falls behind the sheets */
.xlights::before{background-image:radial-gradient(circle at 12px 8px,#ffffff 4px,transparent 5px),radial-gradient(circle at 60px 8px,#a7c6e6 4px,transparent 5px)}
.xlights::after{background-image:radial-gradient(circle at 36px 8px,#6fa8e8 4px,transparent 5px),radial-gradient(circle at 84px 8px,#dfe9f5 4px,transparent 5px)}
.xsnow{z-index:-1}
