/* two font families: Verdana for interface/labels, Times for body copy.

  layout should use flex
  we're emulating tabular html design but follow best practices
  marquee is not actually valid html 5 anymore, so we emulate it with .ticker
*/

:root {
  --ink: #000000;
  --gold: #ffcc00; /* change this if we don't become a DSSO (this is ucf gold, we've used ffcf0 before)*/
  --paper: #ffffff;
  --paper-dim: #f1f1f1;
  --desk: #e8e8e0;      /* page background outside the shell */
  --band: #f2f2ec;      /* nav + footer bands */
  --link: #0000cc;
  --link-hover: #cc0000;
  --rule: #cccccc;      /* structural rules */
  --hair: #ededed;      /* table row hairlines */
  --meta: #777777;      /* datelines, captions */
  --dim: #999999;
  --ui: Verdana, Geneva, Arial, sans-serif;
  --body: "Times New Roman", Times, serif;
  --shell: 760px;
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--desk);
  color: var(--ink);
  font-family: var(--ui);
}

a { color: var(--link); }
a:hover, a:focus { color: var(--link-hover); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 10;
}
.skip-link:focus { left: 8px; top: 8px; }

/* -- shell -- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  background: var(--paper);
  border-left: 1px solid var(--dim);
  border-right: 1px solid var(--dim);
  min-height: 100vh;
}

/* -- masthead -- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 10px;
  background: var(--ink);
}

.masthead-title {
  margin: 0;
  font: bold 22px/1.15 var(--body);
  color: var(--paper);
}

.masthead-sub {
  font: 11px/1.5 var(--ui);
  color: var(--gold);
  margin-top: 2px;
}

.masthead-id {
  text-align: right;
  font: 10px/1.5 var(--ui);
  color: var(--dim);
  white-space: nowrap;
}

.goldrule { height: 4px; background: var(--gold); }

.photo-strip { height: clamp(60px, 17.4vw, 150px); overflow: hidden; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; object-position: center;}

/* -- navigation -- */

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--band);
  border-bottom: 1px solid var(--rule);
  padding: 7px 14px;
  font: 11px/1.9 var(--ui);
  list-style: none;
  margin: 0;
}

.nav a { text-decoration: underline; }

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: bold;
  text-decoration: none;
}

.nav-item-disabled {
  color: #888888;
}

.nav-sep { color: var(--dim); }

/* -- ticker -- */

.ticker {
  background: var(--ink);
  padding: 4px 0;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.ticker-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  margin: 0;
  font: 11px/1.7 var(--ui);
  color: var(--gold);
  animation: ticker 26s linear infinite;
}

.ticker:hover .ticker-text,
.ticker:focus-within .ticker-text {
  animation-play-state: paused;
}

.ticker-text a {
  color: var(--paper);
  text-decoration: underline;
}

.ticker-text a:hover,
.ticker-text a:focus {
  color: var(--gold);
  text-decoration: none;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-text {
    animation: none;
    padding-left: 14px;
    white-space: normal;
  }
}

/* -- content -- */

.content { padding: 18px 16px 24px; }

.page-title {
  margin: 0 0 2px;
  font: bold 17px/1.25 var(--body);
}

.dateline {
  font: 10px/1.5 var(--ui);
  color: var(--meta);
  border-bottom: 1px solid #dddddd;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.section-head {
  margin: 24px 0 9px;
  font: bold 12px/1.4 var(--ui);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
}

.prose-block p {
  margin: 0 0 12px;
  font: 14px/1.75 var(--body);
  text-wrap: pretty;
}

.prose-block p:last-child { margin-bottom: 22px; }

.new-flag {
  color: var(--link-hover);
  font-size: 10px;
  letter-spacing: 0;
  animation: blink 2.4s steps(1, end) infinite;
}

/* -- tables -- */

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.table caption { text-align: left; }

.table th {
  text-align: left;
  padding: 5px 10px 5px 0;
  border-bottom: 1px solid var(--dim);
  font: bold 10px/1.6 var(--ui);
  text-transform: uppercase;
  color: #555555;
}

.table td {
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--hair);
  font: 13px/1.6 var(--body);
  vertical-align: top;
}

.table td:last-child { padding-right: 0; }

.table-label {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: bold;
  width: 38%;
}

.table-role { width: 38%; }

.table-date {
  white-space: nowrap;
  font: 11px/1.7 var(--ui);
  color: #666666;
}

/* -- footer -- */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid var(--rule);
  background: var(--band);
}

.footer-legal { font: 10px/1.8 var(--ui); color: #666666; margin: 0; }
.footer-counter { text-align: right; white-space: nowrap; }

.counter-label { font: 10px/1.6 var(--ui); color: #666666; margin-bottom: 4px; }

.counter-digits {
  display: inline-block;
  background: var(--ink);
  padding: 3px 5px;
  font: bold 15px/1 "Courier New", Courier, monospace;
  color: #00ff00;
  letter-spacing: 3px;
}

.counter-since { font: 9px/1.6 var(--ui); color: var(--dim); margin-top: 4px; }

/* -- badges -- */

.badges {
  border-top: 1px solid #dddddd;
  padding: 12px 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: var(--band);
  list-style: none;
  margin: 0;
}

.badge {
  border: 1px solid var(--dim);
  background: var(--paper);
  padding: 5px 8px;
  font: 9px/1.35 var(--ui);
  color: #333333;
  text-align: center;
}

.badge-knightconnect { background: var(--paper); }
.badge-knightconnect b { color: var(--link); }

.badge a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.badge a:hover,
.badge a:focus {
  text-decoration: underline;
}


.badge-gold { background: var(--gold); color: var(--ink); }

.badge-construction {
  border-color: var(--link-hover);
  color: #fcd4d4;
  text-shadow: 0 0 2px #ff0000, 0 0 3px #ff0000, 0 0 10px #cc0000;
  box-shadow: 0 0 2px #ff3333, 
            0 0 3px #ff3333, 
            0 0 10px #ff3333;
  background: repeating-linear-gradient(
    45deg,
    var(--ink) 0 6px,
    var(--gold) 6px 12px
  );
  animation: blink 1.4s steps(1, end) infinite;
}

@keyframes blink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: .2; }
}

@media (prefers-reduced-motion: reduce) {
  .badge-construction, .new-flag { animation: none; }
}

/* -- narrow screens -- */

@media (max-width: 620px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }
  .masthead-id { text-align: left; }

  .footer {
    flex-direction: column;
  }
  .footer-counter { text-align: left; }

  .table-label,
  .table td { display: block; width: auto; }
  .table td { border-bottom: none; padding-bottom: 2px; }
  .table tr { display: block; border-bottom: 1px solid var(--hair); padding: 6px 0; }
  .table thead { display: none; }
}
