/* matura.mk — layout and components modelled on the GOV.UK Design System (MIT licence) */
:root {
  --text: #0b0c0c;
  --secondary: #505a5f;
  --border: #b1b4b6;
  --border-light: #e3e3e3;
  --grey-bg: #f3f2f1;
  --link: #1d70b8;
  --link-hover: #003078;
  --visited: #4c2c92;
  --focus: #ffdd00;
  --brand: #12436d;
  --button: #00703c;
  --button-dark: #002d18;
  --error: #d4351c;
  --wrap: 1020px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--grey-bg); }
body {
  margin: 0; background: #fff; color: var(--text);
  font: 19px/1.32 Arial, "Helvetica Neue", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 15px; }
@media (min-width: 641px) { .wrap { padding: 0 30px; } }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .1578em; }
a:visited { color: var(--visited); }
a:hover { color: var(--link-hover); text-decoration-thickness: 3px; }
a:focus { outline: 3px solid transparent; color: var(--text); background: var(--focus); box-shadow: 0 -2px var(--focus), 0 4px var(--text); text-decoration: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { position: static; display: block; padding: 10px 15px; }

/* Header */
.header { background: var(--brand); color: #fff; border-bottom: 10px solid #1d70b8; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 15px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { color: #fff !important; text-decoration: none; font-weight: 700; font-size: 26px; letter-spacing: -.01em; line-height: 1; }
.logo span { font-weight: 400; font-size: 16px; margin-left: 10px; opacity: .85; letter-spacing: 0; }
.logo:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.header-links a { color: #fff; font-size: 16px; margin-left: 20px; }
.header-links a:first-child { margin-left: 0; }

.service-nav { border-bottom: 1px solid var(--border); background: #fff; }
.service-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 30px; }
.service-nav a { display: block; padding: 14px 0 11px; font-weight: 700; font-size: 16px; text-decoration: none; color: var(--link); border-bottom: 4px solid transparent; }
.service-nav a:visited { color: var(--link); }
.service-nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.service-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--link); }

/* Page */
main { padding: 30px 0 50px; display: block; }
@media (min-width: 641px) { main { padding-top: 40px; } }
.caption { display: block; color: var(--secondary); font-size: 19px; margin-bottom: 5px; }
h1, .h1 { font-size: 32px; line-height: 1.09; font-weight: 700; margin: 0 0 30px; }
h2, .h2 { font-size: 24px; line-height: 1.15; font-weight: 700; margin: 45px 0 20px; }
h3, .h3 { font-size: 19px; line-height: 1.32; font-weight: 700; margin: 30px 0 15px; }
@media (min-width: 641px) { h1 { font-size: 48px; line-height: 1.04; } h2 { font-size: 36px; line-height: 1.11; } h3 { font-size: 24px; line-height: 1.25; } }
p { margin: 0 0 20px; }
.lead { font-size: 20px; line-height: 1.3; }
@media (min-width: 641px) { .lead { font-size: 24px; line-height: 1.25; } }
.secondary { color: var(--secondary); }
.small { font-size: 16px; }
ul.list, ol.list { margin: 0 0 20px; padding-left: 20px; }
ul.list li, ol.list li { margin-bottom: 5px; }
.list-plain { list-style: none; padding: 0; margin: 0 0 20px; }
.list-plain li { margin-bottom: 10px; }
hr.section-break { border: 0; border-top: 1px solid var(--border-light); margin: 30px 0; }

.row { display: grid; grid-template-columns: 1fr; gap: 0 30px; }
@media (min-width: 769px) { .row { grid-template-columns: 2fr 1fr; } }

/* Start button */
.button {
  display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 Arial, sans-serif; color: #fff !important;
  background: var(--button); border: 2px solid transparent; border-radius: 0; padding: 10px 14px 9px;
  box-shadow: 0 2px 0 var(--button-dark); text-decoration: none; cursor: pointer; margin: 0 0 32px;
}
.button:hover { background: #005a30; text-decoration: none; }
.button:focus { background: var(--focus); color: var(--text) !important; box-shadow: 0 2px 0 var(--text); border-color: var(--focus); }
.button-start { font-size: 24px; padding: 12px 18px 11px; }
.button svg { width: 20px; height: 20px; }
.button-secondary { background: var(--grey-bg); color: var(--text) !important; box-shadow: 0 2px 0 #929191; }
.button-secondary:hover { background: #dbdad9; }

/* Tables */
.table { width: 100%; border-collapse: collapse; margin: 0 0 40px; font-size: 19px; }
.table caption { text-align: left; font-weight: 700; font-size: 24px; margin-bottom: 15px; }
.table th, .table td { text-align: left; padding: 10px 20px 10px 0; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.table thead th { font-weight: 700; border-bottom-color: var(--border); }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table .num { white-space: nowrap; }
.table .meta { color: var(--secondary); font-size: 16px; }
@media (max-width: 640px) {
  .table thead { position: absolute; left: -9999px; }
  .table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
  .table th, .table td { display: block; border: 0; padding: 2px 0; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--secondary); }
}
.tag { display: inline-block; font-size: 14px; font-weight: 700; padding: 2px 8px 1px; background: #d2e2f1; color: #0c2d4a; letter-spacing: .02em; }
.tag-grey { background: #e5e6e7; color: #282d30; }
.tag-green { background: #cce2d8; color: #005a30; }
.tag-purple { background: #dbd5e9; color: #3d2375; }

/* Warning + inset */
.warning { position: relative; padding: 10px 0 10px 50px; margin: 0 0 30px; font-weight: 700; }
.warning-icon {
  position: absolute; left: 0; top: 50%; margin-top: -17px; width: 35px; height: 35px; border-radius: 50%;
  background: var(--text); color: #fff; font: 700 28px/35px Arial, sans-serif; text-align: center;
}
.inset { padding: 15px; margin: 30px 0; border-left: 10px solid var(--border); }
.inset p:last-child { margin: 0; }

/* Sidebar (related content) */
.related { border-top: 2px solid var(--link); padding-top: 15px; margin-top: 45px; }
@media (min-width: 769px) { .related { margin-top: 0; } }
.related h2 { font-size: 24px; margin: 0 0 15px; }
.related + .related { margin-top: 40px; }
.related ul { list-style: none; padding: 0; margin: 0; font-size: 16px; }
.related li { margin-bottom: 10px; }

/* Attachments */
.attachment { display: grid; grid-template-columns: 99px 1fr; gap: 0 20px; margin: 0 0 30px; }
.attachment-thumb {
  width: 99px; height: 140px; border: 1px solid var(--border); background: #fff; position: relative;
  display: flex; align-items: flex-end; padding: 8px;
}
.attachment-thumb::before { content: ""; position: absolute; left: 12px; right: 12px; top: 16px; height: 60px;
  background: repeating-linear-gradient(#e3e3e3 0 4px, transparent 4px 10px); }
.attachment-thumb span { font: 700 14px/1 Arial, sans-serif; color: #fff; background: var(--error); padding: 3px 5px; }
.attachment h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.3; }
@media (min-width: 641px) { .attachment h3 { font-size: 24px; } }
.attachment p { margin: 0 0 5px; font-size: 16px; color: var(--secondary); }
@media (max-width: 640px) { .attachment { grid-template-columns: 66px 1fr; } .attachment-thumb { width: 66px; height: 93px; } .attachment-thumb::before { height: 34px; top: 10px; left: 8px; right: 8px; } }

/* Breadcrumbs / back link */
.breadcrumbs { font-size: 16px; margin: 15px 0 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumbs li { margin: 0 0 5px; }
.breadcrumbs li + li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 10px 1px 8px;
  border: solid var(--secondary); border-width: 1px 1px 0 0; transform: rotate(45deg); }
.breadcrumbs a { color: var(--text); }

/* Player */
.player { border: 1px solid var(--border); background: #fff; margin: 0 0 20px; }
.player-inner { position: relative; aspect-ratio: 4 / 3; width: min(100%, calc((100vh - 200px) * 4 / 3)); min-width: min(100%, 300px); margin: 0 auto; }
.player-inner > * { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.player:fullscreen { display: grid; place-items: center; background: #fff; border: 0; }
.player:fullscreen .player-inner { width: min(100vw, calc(100vh * 4 / 3)); }

/* Footer */
.footer { background: var(--grey-bg); border-top: 1px solid var(--border); padding: 25px 0 35px; font-size: 16px; color: #0b0c0c; }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px 20px; }
.footer a, .footer a:visited { color: var(--text); }
