/* AllCount Supply Co. - the site's one stylesheet.
   A plain, slightly dated company look: beige paper, grey bars, one amber stripe.
   Colours live in the :root block below. Change one there and every page follows. */

@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/CourierPrime-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --desk: #e3ded0;        /* the page behind the paper */
  --paper: #f7f5ef;       /* the main sheet */
  --paper-dim: #efebe1;   /* boxes on the sheet */
  --rule: #b8b2a2;        /* borders */
  --rule-dark: #8f897a;
  --ink: #222220;         /* body text */
  --ink-soft: #4d4b45;    /* small print (still 7:1 on paper) */
  --link: #1f4e8c;
  --link-visited: #4a3a7a;
  --bar: #2e2d2a;         /* the top bar */
  --bar-ink: #f2efe6;
  --bar-ink-soft: #d3ccb8;
  --amber: #f2b632;       /* the AllCount mark's amber: stripes and buttons only, never text on paper */
  --nav-top: #e6e2d7;
  --nav-bottom: #cfcabc;
  --strip: #3a3934;
  --strip-ink: #ebe6d6;
  --box-head: #ddd8cb;
  --red: #8e1b1b;
  --green: #1e5e2e;
  --night: #1b1a18;
  --night-ink: #edeadf;
  --typed: "Courier Prime", "Courier New", Courier, monospace;
  --sans: Verdana, Tahoma, "DejaVu Sans", "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: normal;
  line-height: 1.25;
  color: #1d1c1a;
}
h1 { font-size: 1.9rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.12rem; margin: 1.3rem 0 0.4rem; font-weight: bold; }
h4 { font-family: var(--sans); font-size: 1rem; margin: 1.1rem 0 0.3rem; }

p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.3rem; }

/* --- Skip link ---------------------------------------------------------------------------------- */
.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--paper);
  color: var(--link);
  padding: 10px 14px;
  border: 2px solid var(--link);
  z-index: 10;
}
.skip:focus { top: 8px; }

/* --- The sheet of paper ------------------------------------------------------------------------- */
.page {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--paper);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.03);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Top bar ------------------------------------------------------------------------------------ */
.masthead {
  background: var(--bar);
  border-bottom: 4px solid var(--amber);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: var(--bar-ink);
  text-decoration: none;
}
.brand:visited { color: var(--bar-ink); }
.brand:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.brand img { width: 52px; height: 52px; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.brand-slogan {
  font-family: var(--serif);
  font-style: italic;
  color: var(--bar-ink-soft);
  font-size: 1rem;
}

/* --- Main menu ---------------------------------------------------------------------------------- */
.mainnav {
  background: linear-gradient(var(--nav-top), var(--nav-bottom));
  border-bottom: 1px solid var(--rule-dark);
}
.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0 12px;
  display: flex;
  flex-wrap: wrap;
}
.mainnav li { margin: 0; }
.mainnav a {
  display: block;
  padding: 11px 14px;
  color: #1a2a44;
  text-decoration: none;
  font-size: 0.95rem;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}
.mainnav a:hover { text-decoration: underline; }
.mainnav a[aria-current="page"] {
  background: var(--paper);
  font-weight: bold;
  box-shadow: inset 0 -3px 0 var(--amber);
}

/* --- The status strip under the menu (home page) ------------------------------------------------ */
.status-strip {
  background: var(--strip);
  color: var(--strip-ink);
  font-family: var(--typed);
  font-size: 0.98rem;
  padding: 8px 20px;
  margin: 0;
}
.status-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}
.status-strip li { margin: 0; }
.status-strip b { color: var(--amber); font-weight: normal; }

/* --- Columns ------------------------------------------------------------------------------------ */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  padding: 26px 24px 32px;
  flex: 1 0 auto;
}
.layout.single { grid-template-columns: minmax(0, 780px); justify-content: center; }
.content > :first-child { margin-top: 0; }
.lede { font-size: 1.08rem; }

/* --- Boxes on the side -------------------------------------------------------------------------- */
.sidebox {
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  margin-bottom: 20px;
}
.sidebox h2 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--box-head);
  border-bottom: 1px solid var(--rule);
  margin: 0;
  padding: 7px 12px;
}
.sidebox-body { padding: 12px; font-size: 0.95rem; }
.sidebox-body > :last-child { margin-bottom: 0; }
.notices { list-style: none; padding: 0; }
.notices li {
  border-bottom: 1px dotted var(--rule-dark);
  padding: 0 0 8px;
  margin: 0 0 8px;
}
.notices li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.eotm { text-align: center; }
.eotm-month {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0;
}
.eotm-name { font-family: var(--serif); font-size: 1.3rem; margin: 2px 0 0; }
.eotm-dept { color: var(--ink-soft); margin: 0 0 6px; }
.eotm-line { font-style: italic; }
.eotm-small { font-size: 0.85rem; color: var(--ink-soft); }

/* --- The game box -------------------------------------------------------------------------------- */
.game-box {
  background: var(--night);
  color: var(--night-ink);
  border: 1px solid #000;
  border-top: 4px solid var(--amber);
  margin: 1.4rem 0 2rem;
}
.game-box img { width: 100%; }
.game-box-text { padding: 18px 20px 20px; }
.game-box h2 {
  color: #fffdf6;
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}
.game-box p { margin-bottom: 0.8rem; }
.game-box .kicker {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d9cfae;
  margin-bottom: 0.3rem;
}
.game-box .meta { color: #d2cdbf; font-size: 0.95rem; }
.game-box a:focus-visible { outline-color: var(--amber); }
.button,
.button:visited {
  display: inline-block;
  background: var(--amber);
  color: #1b1a18;
  font-weight: bold;
  text-decoration: none;
  padding: 11px 18px;
  border: 1px solid #a87b14;
  border-radius: 2px;
}
.button:hover { background: #ffc94d; text-decoration: underline; }
.button:focus-visible { outline: 3px solid #fffdf6; outline-offset: 2px; }
.game-box.compact { margin-top: 2.4rem; }
.game-box.compact .game-box-text { padding: 16px 18px; }

/* --- Services ------------------------------------------------------------------------------------ */
.services {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.services li {
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rule-dark);
  padding: 12px 14px;
  margin: 0;
}
.services h3 { margin-top: 0; }
.services p { margin: 0; }

/* --- Pictures with captions ---------------------------------------------------------------------- */
.photo {
  margin: 0 0 1.2rem;
  border: 1px solid var(--rule);
  background: #fff;
  padding: 6px;
}
.photo figcaption {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 6px 2px 0;
}

/* --- Facts (a list of label: value) -------------------------------------------------------------- */
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--paper-dim);
  font-size: 0.95rem;
}
.facts dt, .facts dd {
  margin: 0;
  padding: 6px 12px;
  border-bottom: 1px solid var(--rule);
}
.facts dt { font-weight: bold; background: #e7e2d5; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }

.values { counter-reset: none; }
.values li { margin-bottom: 0.5rem; }

/* --- A note from the studio (out of the story) --------------------------------------------------- */
.studio-note {
  border: 2px solid var(--link);
  background: #eef2f8;
  padding: 12px 16px;
  margin: 0 0 1.6rem;
}
.studio-note p { margin: 0 0 0.5rem; }
.studio-note p:last-child { margin: 0; }
.studio-note strong { color: #13325c; }

/* --- Job postings -------------------------------------------------------------------------------- */
.posting {
  border: 1px solid var(--rule);
  background: #fbfaf6;
  margin: 0 0 1.6rem;
}
.posting-head {
  background: var(--box-head);
  border-bottom: 1px solid var(--rule);
  padding: 10px 16px;
}
.posting-head h3 { margin: 0; font-size: 1.35rem; font-weight: normal; }
.posting-head .ref {
  font-family: var(--typed);
  color: var(--ink-soft);
  margin: 2px 0 0;
}
.posting-body { padding: 4px 16px 16px; }
.posting .facts { margin: 12px 0 0.6rem; }
.hr-note {
  font-family: var(--typed);
  background: #fffbe8;
  border: 1px dashed var(--rule-dark);
  padding: 10px 12px;
}
.apply { margin: 0; }
.apply a { overflow-wrap: anywhere; }
.stamp {
  display: inline-block;
  font-family: var(--typed);
  font-weight: bold;
  letter-spacing: 0.08em;
  border: 2px solid currentColor;
  padding: 0 8px;
  text-transform: uppercase;
}
.stamp.open { color: var(--green); }
.stamp.filled { color: var(--red); }
.closed-list { list-style: none; padding: 0; }
.closed-list li {
  border: 1px solid var(--rule);
  background: var(--paper-dim);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.closed-list h3 { margin: 0 0 0.3rem; }
.closed-list p { margin: 0.3rem 0 0; }
.steps li { margin-bottom: 0.5rem; }

/* --- The portal notice --------------------------------------------------------------------------- */
.system-notice {
  font-family: var(--typed);
  background: #20231f;
  color: #d9e6cf;
  border: 6px solid #9c978a;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
  line-height: 1.55;
}
.system-notice h1 {
  font-family: var(--typed);
  color: #f2f7ec;
  font-size: 1.35rem;
  margin: 0 0 0.8rem;
  letter-spacing: 0.04em;
}
.system-notice p { margin: 0 0 0.6rem; }
.system-notice p:last-child { margin: 0; }
.system-notice .alert { color: #ffd27a; }
.cursor::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  background: #d9e6cf;
  vertical-align: text-bottom;
  margin-left: 4px;
}
@media (prefers-reduced-motion: no-preference) {
  .cursor::after { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

.table-wrap { overflow-x: auto; margin: 0 0 1.4rem; }
table.log {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  background: var(--paper-dim);
}
table.log caption {
  text-align: left;
  font-weight: bold;
  padding: 0 0 6px;
}
table.log th, table.log td {
  border: 1px solid var(--rule);
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}
table.log thead th { background: var(--box-head); }
table.log td:first-child { font-family: var(--typed); white-space: nowrap; }

/* --- Contact desks ------------------------------------------------------------------------------- */
.desks { list-style: none; padding: 0; }
.desks li {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rule-dark);
  background: var(--paper-dim);
  padding: 12px 16px;
  margin-bottom: 14px;
}
.desks h2 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.desks p { margin: 0 0 0.4rem; }
.desks p:last-child { margin: 0; }
.mail { font-weight: bold; overflow-wrap: anywhere; }

/* --- 404 ----------------------------------------------------------------------------------------- */
.lost { text-align: left; }
.lost .code {
  font-family: var(--typed);
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 0.3rem;
}

/* --- Footer -------------------------------------------------------------------------------------- */
.site-footer {
  background: #d9d4c7;
  border-top: 1px solid var(--rule-dark);
  color: #2f2e2a;
  font-size: 0.9rem;
  padding: 16px 24px 20px;
}
.site-footer p { margin: 0 0 0.5rem; }
.site-footer .fiction {
  font-weight: bold;
  color: #23221f;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.footer-links li { margin: 0; }
.site-footer .small { color: #4a4843; font-size: 0.82rem; margin: 0; }

/* --- Phones -------------------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 18px 16px 24px; gap: 8px; }
  .brand { padding: 12px 16px; }
  .brand img { width: 44px; height: 44px; }
  .brand-name { font-size: 1.3rem; }
  .mainnav ul { padding: 0 4px; }
  .mainnav a { padding: 11px 10px; }
  .status-strip { padding: 8px 16px; }
  .site-footer { padding: 16px 16px 20px; }
  h1 { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { border-bottom: 0; padding-bottom: 0; background: transparent; }
  .facts dd { padding-top: 0; }
  .page { border: 0; box-shadow: none; }
  .system-notice { padding: 14px; border-width: 4px; font-size: 1rem; }
  table.log td:first-child { white-space: normal; }
  .system-notice h1 { font-size: 1.15rem; letter-spacing: 0; }
}
