@font-face {
    font-family: 'DejaVuSansMono';
    src: url('/font/DejaVuSansMono.woff2');
}

:root {
  --bg: #141d21;
  --header: #223447;
  --card: #192734;
  --border: #38444d;
  --text: #6de1f2;
  --link: #2be597;
  --link-hover: #36916f;
  --accent: #d94b34;
  --header-text: #f0fac5;
  --date: #2296df;
}

* {
    font-size: 16px;
}

@media (max-width: 500px) { 
  * {
    font-size: 13px; 
  }
}  

body {
  border: 2px solid var(--date);
}

body, html {
  font-family: DejaVuSansMono, monospace, sans-serif;
  max-width: 900px;  
  padding: 1%;
  margin: 0 auto;
  background: var(--bg);
  color: var(--text);
} 

img {
  border: none;
  transition: border-color 0.2s, border-width 0.2s; 
  border: 2px solid var(--date);
}

p {
  margin-top: 0px;
  text-align: justify;
}

sup {
  vertical-align: 0.3em;
  font-size: 0.65em;
}   

div.heading {
  font-weight: bold;      
  text-transform: uppercase;
}

div.heading-text {
  border: 2px solid var(--accent);
  padding: 5px;
}

div.heading-text-header {
  border: 2px solid var(--accent);
  padding: 5px;
  font-size: 1.2em;
}

div.main-date {
  margin-bottom: 2ch;
  text-transform: uppercase;
  border: 2px solid var(--date);
  padding:3px;
  width: 210px;
  font-weight: bold;
  text-align: center;
}

tr {
  color: var(--accent);
}

header, .header {
  background: var(--header);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding: 1.5ch 2ch;
  transition: background 0.2s, color 0.2s;
}

.content{
  border: 2px solid var(--date);
  padding: 2%;
}

h1, h2, h3, h4, h5, h6, .heading {
  color: var(--header-text);
  border: none;
  margin-top: 1ch;
  margin-bottom: 1ch;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: bold;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.meta, .date, .subtitle, .subtle {
  color: var(--date);
  font-size: 0.95em;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: bold;
}

div.top-page {
  border: 2px solid var(--date); 
  padding: 1%;
}

.date {
  width: 200px;
  padding-right: 1em;
  font-size: 16px;
}
@media (max-width: 500px) {
  .date  {
    font-size: 13px;
  }
}
img:hover {
  border-color: var(--date);
  border-width: 2px;
  box-shadow: 0 0 0 2px var(--date);
}

/* Gallery grid styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2em;
  margin: 2.5em 0 2em 0;
  justify-items: center;
}
.gallery-item img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 0;
  border: 2px solid var(--date); /* Always 2px to reserve space */
  box-sizing: border-box; /* Include border in size */
  display: block;
  margin: 0 auto;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow: none;
}

.gallery-item img:hover {
  border-color: var(--date);
  box-shadow: 0 0 0 2px var(--date);
}

table.content-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

table.content-table td {
    padding: 2px 8px;
    vertical-align: top;
}

table.content-table td:first-child {
    width: 200px; 
    white-space: nowrap;
    padding-right: 1em;
}
@media (max-width: 600px) {
    table.content-table td:first-child {
        width: 160px;
    }
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.img-row-inline img {
  display: inline-block !important;
}

.img-row-inline picture {
  margin-right: 1ch;
}
.img-row-inline picture:last-child {
  margin-right: 0;
}

.year-divider td {
  padding: 0.5em 0;
  border-bottom: 1px solid var(--accent);
}

.year-divider span {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: bold;
  padding: 2px 8px;
  font-size: 0.9em;
  letter-spacing: 0.5px;
  border: 1px solid var(--accent);
}

.nav-bar {
  border: 2px solid var(--date);
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 6px;
  align-items: center; 
  width: 47ch;
  margin: 0 auto;
}  

@media (max-width: 500px) { 
  .nav-bar {
    width: 42ch;
    gap: 7px;
  }
}

.nav-bar a {
  text-decoration: none;
  border: 1px solid var(--date);
  padding: 2px 8px;
  background: var(--date);
  color: var(--bg);
  transition: background 0.2s, border 0.2s;

}
.nav-bar a:hover {
  background: var(--text);
  border: 1px solid var(--text);
}

hr {
  color: var(--date);
}

/* --- CROSSHAIRY W ROGACH --- */
/* div.content i div.top-page muszą mieć position: relative */

div.content,
div.top-page {
  position: relative;
}

.ch {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 2;
}

.ch::before,
.ch::after {
  content: '';
  position: absolute;
  background: var(--date);
}

.ch::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    var(--date) 30%,
    transparent 30%,
    transparent 70%,
    var(--date) 70%
  );
}

.ch::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--date) 30%,
    transparent 30%,
    transparent 70%,
    var(--date) 70%
  );
}

.ch.tl { top: 4px;  left: 4px;  }
.ch.tr { top: 4px;  right: 4px; }
.ch.bl { bottom: 4px; left: 4px;  }
.ch.br { bottom: 4px; right: 4px; }

/* --- KOD SYSTEMOWY NA NAGŁÓWKACH TOC --- */

.sys-code {
  float: right;
  font-size: 0.75em;
  color: var(--date);
  border: 1px solid var(--date);
  padding: 1px 5px;
  letter-spacing: 0.1em;
  font-weight: normal;
}

/* --- HOVER NA WIERSZACH TABELI --- */

table.content-table tr:not(.year-divider):hover td {
  background: rgba(34, 150, 223, 0.08);
  color: var(--header-text);
}

table.content-table tr:not(.year-divider):hover td.date {
  color: var(--accent);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--date);
  padding: 3px 10px;
  margin-top: 2ch;
  font-size: 0.8em;
  letter-spacing: 0.15em;
  color: var(--date);
  text-transform: uppercase;
}
 
.nav-sep {
  color: var(--date);
  font-weight: normal;
  user-select: none;
}
 
.date-label {
  color: var(--date);
  letter-spacing: 0.1em;
  font-size: 0.9em;
}
 
.title-heading .heading-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
 
.title-heading .sys-code {
  float: none; 
  flex-shrink: 0;
  margin-left: 1ch;
  font-size: 0.7em;
}
