@font-face {
  font-family: "Open Sans";
  src: url("brand/open-sans-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #212529;
  --heading: #4d4d4d;
  --muted: #5d645b;
  --line: #dfe2da;
  --bg: #f7f8f4;
  --surface: #fff;
  --soft: #f1f4ee;
  --brand-green: #8cc63f;
  --brand-green-hover: #a3d45f;
  --deep: #3d601a;
  --green: #edf6e2;
  --brand-blue: #4c9ed0;
  --blue-soft: #edf4f8;
  --amber: #fff1d6;
  --red: #fcecec;
  --radius: 8px;
  --gutter: clamp(18px, 4.6vw, 64px);
  font: 15px/1.5 "Open Sans", system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid #257bb2;
  outline-offset: 3px;
}
a { color: var(--deep); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 8px; z-index: 5; padding: 7px 12px; background: white; }
.icon {
  width: 17px;
  height: 17px;
  vertical-align: middle;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex: none;
}

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-width { width: min(100% - var(--gutter) * 2, 1280px); margin-inline: auto; }
.site-utility { background: #20221e; color: #e5e7e1; font-size: 11.5px; }
.site-utility .site-width { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.site-navigation { background: #393b36; color: #f2f2f2; }
.site-navigation .site-width {
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: block; flex: none; line-height: 0; }
.brand img { display: block; width: 148px; height: auto; }
.workspace-nav { display: flex; gap: clamp(9px, 1.8vw, 23px); align-items: center; }
.workspace-nav a {
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  color: #f0f0f0;
  text-decoration: none;
  font-size: 14px;
}
.workspace-nav a:hover { color: white; border-bottom-color: #858585; }
.workspace-nav a[aria-current] { color: white; border-bottom-color: var(--brand-blue); font-weight: 600; }
.site-header :focus-visible, .academy-hero :focus-visible { outline-color: #9ed6f8; }
main { flex: 1; padding-bottom: 40px; }
.board-content { padding-top: clamp(20px, 3vw, 34px); }
h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.16; font-weight: 300; }
h2 { font-weight: 600; color: var(--heading); }
.subtitle, .muted { color: var(--muted); }

.academy-hero {
  display: grid;
  align-items: center;
  min-height: clamp(305px, 27vw, 382px);
  color: white;
  background-color: #263a2d;
  background-image:
    linear-gradient(90deg, #122018f5 0%, #15251be8 23%, #15251bb3 41%, #18281a36 63%, transparent 82%),
    url("brand/academy-cover.webp");
  background-position: center, center 48%;
  background-size: cover;
}
.academy-hero-content { padding-block: clamp(34px, 4.5vw, 62px); }
.academy-hero h1 {
  max-width: 19ch;
  font-size: clamp(35px, 4.25vw, 63px);
  line-height: 1.08;
  letter-spacing: -.038em;
}
.academy-hero p {
  max-width: 43ch;
  margin: 15px 0 24px;
  color: #f3f5ee;
  font-size: 15px;
  line-height: 1.65;
}
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #cbd1c6;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.button:hover { background: var(--soft); border-color: #adb6a6; }
.button.primary { background: var(--brand-green); border-color: var(--brand-green); color: #17220e; font-weight: 600; }
.button.primary:hover { background: var(--brand-green-hover); border-color: var(--brand-green-hover); }
.button.quiet { color: var(--heading); }
.academy-hero .button { min-height: 42px; padding-inline: 15px; }
.academy-hero .button.quiet { color: #fff; background: #18261b66; border-color: #f0f5e8a3; }
.academy-hero .button.quiet:hover { background: #18261bd9; border-color: #fff; }
.button.small { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.link {
  padding: 4px;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--deep);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.link:hover { text-decoration: underline; background: var(--green); }

.mode {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 15px;
  background: var(--blue-soft);
  border: 1px solid #d6e4ed;
  border-left: 3px solid var(--brand-blue);
  border-radius: var(--radius);
  color: #3d4c55;
  font-size: 12px;
}
.mode strong { margin: 0 5px; color: var(--ink); }
.mode .icon { width: 14px; height: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.stat, .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat { padding: 13px 15px; }
.stat > span { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.tile {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #246483;
  background: var(--blue-soft);
}
.tile.green, .tag.green { color: var(--deep); background: var(--green); }
.tile.amber, .tag.amber { color: #775012; background: var(--amber); }
.tile.red, .tag.red { color: #942d2d; background: var(--red); }
.stat b { display: block; font-size: 30px; font-weight: 600; line-height: 1.15; margin: 7px 0 2px; }
.stat small { font-size: 11px; color: var(--muted); }
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 15px;
}
.toolbar nav { display: flex; gap: 5px; overflow: auto; }
.toolbar nav button {
  white-space: nowrap;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
  padding: 11px;
}
.toolbar nav button:hover { background: var(--soft); }
.toolbar nav button:focus-visible { outline-offset: -3px; }
.toolbar nav button[aria-current] { color: var(--ink); border-color: var(--brand-blue); }
select, input[type=date] {
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #cbd1c6;
  border-radius: var(--radius);
  padding: 7px 9px;
  max-width: 100%;
}
.toolbar select { max-width: 190px; }

.columns { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); gap: 15px; }
.panel { overflow: hidden; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 15px 16px 11px; }
.panel h2 { margin: 0; font-size: 18px; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.list { margin: 0; padding: 0; list-style: none; }
.row { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-top: 1px solid var(--line); min-width: 0; }
.record { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.record strong { display: block; font-size: 13px; line-height: 1.32; }
.sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.row .time { white-space: nowrap; font-size: 12.5px; }
.daybox {
  min-width: 43px;
  padding: 5px 3px;
  display: grid;
  justify-items: center;
  border-radius: var(--radius);
  color: var(--deep);
  background: var(--green);
  line-height: 1.14;
  font-size: 17px;
  font-weight: 600;
}
.daybox small { text-transform: uppercase; font-size: 9px; letter-spacing: .06em; }
.tag { display: inline-flex; padding: 3px 7px; border-radius: var(--radius); background: var(--soft); color: #42493c; font-size: 11px; font-weight: 600; white-space: nowrap; }
.empty { padding: 20px 15px; color: var(--muted); font-size: 13px; }
.controls { padding: 0 15px 11px; display: flex; gap: 7px; flex-wrap: wrap; }
.tablewrap { overflow: auto; }
.records { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
.records th, .records td { padding: 9px 11px; border-top: 1px solid var(--line); }
.records th { background: var(--soft); color: var(--muted); font-size: 11px; }
.records td:first-child { min-width: 140px; }
.records td .link { padding-left: 0; }
.nowrap { white-space: nowrap; }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.weekday { background: var(--soft); text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; padding: 5px; }
.day { min-height: 85px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); padding: 6px; min-width: 0; font-size: 11px; }
.day:nth-child(7n) { border-right: 0; }
.day.other { background: #fafbf8; color: var(--muted); }
.day.today { background: var(--green); }
.event { display: block; width: 100%; margin-top: 3px; border: 0; border-radius: 4px; background: var(--green); color: var(--deep); padding: 3px 4px; font-size: 10px; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.event.past { background: var(--blue-soft); color: #395b6b; }
.event:hover { filter: brightness(.92); }
.agenda { border-top: 1px solid var(--line); }
.agenda h3 { margin: 12px 15px 7px; font-size: 14px; }

footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding: 12px 0 17px; }
dialog { width: min(670px, calc(100vw - 25px)); max-height: 90vh; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 15px 60px #0003; color: var(--ink); padding: 18px 21px 21px; }
dialog::backdrop { background: #0009; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
dialog h2 { margin: 0; font-size: 22px; }
dialog h3 { margin: 15px 0 5px; font-size: 15px; }
dialog p, dialog li { font-size: 13px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.drop { display: block; padding: 14px; border: 1px dashed #9aad87; background: var(--green); border-radius: var(--radius); margin: 12px 0; }
.drop strong { display: block; margin-bottom: 6px; }
.drop input { max-width: 100%; font-size: 13px; }
.alert { margin: 7px 0; border: 1px solid #ecc4c4; border-radius: var(--radius); background: #fff1f1; padding: 8px 10px; color: #772626; font-size: 12px; }
.alert.good { color: #375719; background: var(--green); border-color: #d2e5c1; }
.alert.warn { color: #6c470e; background: #fff8e9; border-color: #ecd3a0; }
.alert ul { margin: 4px 0; padding-left: 17px; }

@media (max-width: 800px) {
  .columns { grid-template-columns: 1fr; }
  .stat { padding: 12px; }
}
@media (max-width: 620px) {
  .site-navigation .site-width { min-height: 66px; gap: 10px; }
  .brand img { width: 105px; }
  .workspace-nav { gap: 9px; }
  .workspace-nav a { font-size: 12px; line-height: 1.28; max-width: 105px; }
  .academy-hero {
    min-height: 330px;
    align-items: end;
    background-image:
      linear-gradient(0deg, #122018 0%, #122018f5 43%, #15251bbb 66%, #15251b16 100%),
      url("brand/academy-cover.webp");
    background-position: center, 58% 42%;
  }
  .academy-hero-content { padding-block: 77px 28px; }
  .academy-hero h1 { max-width: 18ch; }
  .academy-hero p { margin-block: 12px 18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .day { min-height: 60px; padding: 3px; }
  .event { font-size: 9px; padding: 2px; }
}
@media (max-width: 440px) {
  .toolbar { flex-wrap: wrap; }
  .toolbar nav button { font-size: 12px; padding: 8px; }
  .row { padding: 8px; }
  .calendar .event span { display: none; }
  .calendar .event { height: 8px; }
}
