@import url("fonts.css");

/* Podnik - federation of transport cooperatives.

   Podnik is a licensed cooperative federation and not an organ of the Republic,
   so it loads none of the shared state frame.

   The design is taken from the signage the federation already prints: an ink
   plate with a signal stripe under it, square enamel plates with the mode
   letter, and the route colours that appear on the vehicle sides. */

:root {
  --ink:     #14181b;
  --ink-2:   #4a5459;
  --ink-3:   #767f84;
  --enamel:  #e7eaec;
  --plate:   #ffffff;
  --rule:    #c6ccd0;
  --rule-2:  #dfe3e6;
  --signal:  #ffd100;

  /* Route colours. The letter after each is the designation prefix. */
  --tram:  #00734a; /* T */
  --bus:   #c0102a; /* B */
  --coach: #a25a00; /* C */
  --train: #0b4ea2; /* R */
  --metro: #6e2a8e; /* M */
  --ferry: #006f82; /* F */
  --pod:   #a8175c; /* P */

  --sans: "TeX Gyre Heros", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 62rem;
  --pad: 1.1rem;
}

/* ---------- ground ---------- */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0 0 0.85em;
}

a {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--signal);
  color: var(--ink);
  padding: 0.7rem 1rem;
  font-weight: 700;
  z-index: 20;
}

.skip:focus {
  left: 0;
}

/* ---------- masthead ---------- */

.head {
  background: var(--ink);
  color: var(--plate);
  border-bottom: 7px solid var(--signal);
}

.head .wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.head a {
  color: var(--plate);
  text-decoration: none;
}

.head :focus-visible {
  outline-color: var(--signal);
}

.mark {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: block;
}

.wordmark {
  margin: 0;
  font-size: clamp(1.9rem, 9vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-transform: uppercase;
}

.standfirst {
  margin: 0.3rem 0 0;
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.35;
  color: #b9c2c7;
  letter-spacing: 0.01em;
}

/* ---------- navigation ---------- */

.nav {
  background: var(--plate);
  border-bottom: 1px solid var(--rule);
}

.nav .wrap {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}

.nav a {
  flex: 0 0 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  text-decoration: none;
  color: var(--ink-2);
  border-bottom: 4px solid transparent;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--ink);
  background: #f4f6f7;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--signal);
}

/* ---------- blocks ---------- */

main {
  padding-bottom: 3rem;
}

.block {
  padding: 1.2rem 0 0rem;
}

.block > .wrap > h2 {
  margin: 0 0 0.85em;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sub {
  color: var(--ink-2);
  font-size: 0.98rem;
  margin: 0 0 1.2rem;
}

/* ---------- opening ---------- */

.opening {
  background: var(--plate);
  border-bottom: 1px solid var(--rule);
  padding: 2rem 0 2.2rem;
}

.opening h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.85rem, 8.2vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.lede {
  margin: 0;
  font-size: 1.06rem;
  color: var(--ink-2);
}

.figures {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.9rem;
  margin: 1.4rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--rule-2);
  list-style: none;
}

.figures li {
  font-family: var(--mono);
  font-size: 0.79rem;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.figures b {
  display: block;
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: none;
}

/* ---------- the six mode plates ---------- */

.modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mode {
  display: block;
  min-height: 112px;
  padding: 0.75rem 0.8rem 0.85rem;
  background: var(--c);
  color: var(--plate);
  text-decoration: none;
}

.mode:hover {
  filter: brightness(1.12);
}

.mode:focus-visible {
  outline-color: var(--ink);
  outline-offset: -5px;
}

.letter {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.mode-name {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mode-fig {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.73rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
}

.t-tram {
  --c: var(--tram);
}

.t-bus {
  --c: var(--bus);
}

.t-coach {
  --c: var(--coach);
}

.t-train {
  --c: var(--train);
}

.t-metro {
  --c: var(--metro);
}

.t-ferry {
  --c: var(--ferry);
}

.t-pod {
  --c: var(--pod);
}

/* ---------- service cards ---------- */

.services {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service {
  background: var(--plate);
  border-top: 5px solid var(--ink);
  padding: 1.05rem 1rem 1.1rem;
}

.service h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.service p {
  margin: 0 0 0.7rem;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.service p:last-child {
  margin-bottom: 0;
}

.go {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid var(--signal);
  padding-bottom: 1px;
}

.go:hover {
  border-bottom-color: var(--ink);
}

/* ---------- the works ---------- */

.works {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--plate);
}

.works li {
  display: grid;
  grid-template-columns: 3.9rem 1fr;
  gap: 0 0.85rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule-2);
}

.works li:last-child {
  border-bottom: 0;
}

.pfx {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--plate);
  background: var(--ink);
  padding: 0.24rem 0.3rem;
  text-align: center;
  align-self: start;
}

.works h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.seat {
  margin: 0.1rem 0 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.builds {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* ---------- notice ---------- */

.notice {
  background: var(--signal);
  color: var(--ink);
  padding: 1.05rem 1rem;
  font-size: 0.95rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice b {
  font-weight: 800;
}

/* ---------- footer ---------- */

.foot {
  background: var(--ink);
  color: #b9c2c7;
  border-top: 7px solid var(--signal);
  padding: 1.8rem 0 2.2rem;
  font-size: 0.88rem;
}

.foot a {
  color: var(--plate);
}

.foot :focus-visible {
  outline-color: var(--signal);
}

.foot h2 {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.foot-cols {
  display: grid;
  gap: 1.5rem;
}

.foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot li {
  margin-bottom: 0.1rem;
}

.foot li a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ---------- wider viewports ---------- */

@media (min-width: 34rem) {
  .modes { grid-template-columns: repeat(3, 1fr);
}

.services {
  grid-template-columns: repeat(2, 1fr);
}

.foot-cols {
  grid-template-columns: repeat(2, 1fr);
}

.works li {
  grid-template-columns: 4.2rem 15rem 1fr;
  align-items: baseline;
}

.builds {
  grid-column: 3;
  margin-top: 0;
}
}

@media (min-width: 52rem) {
  body { font-size: 18px;
}

.modes {
  grid-template-columns: repeat(7, 1fr);
}

.mode {
  min-height: 132px;
}

.services {
  grid-template-columns: repeat(4, 1fr);
}

.foot-cols {
  grid-template-columns: repeat(3, 1fr);
}

.opening {
  padding: 3rem 0 3rem;
}
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto;
}
* {
  transition: none !important;
  animation: none !important;
}
}

@media print {
  .nav, .foot { display: none;
}

body {
  background: #fff;
  font-size: 11pt;
}
}

/* ================= catalogue ================= */

.filters {
  background: var(--plate);
  border-bottom: 1px solid var(--rule);
  padding: 1.1rem 0 0.9rem;
}

.filter-grid {
  display: grid;
  gap: 0.7rem;
}

.f {
  margin: 0;
}

.f label {
  display: block;
  margin-bottom: 0.22rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.f input,
.f select,
.f button {
  width: 100%;
  min-height: 46px;
  padding: 0.5rem 0.6rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--plate);
  border: 2px solid var(--ink);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.f select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 1.05rem center, right 0.75rem center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.f button {
  background: var(--ink);
  color: var(--plate);
  font-weight: 700;
  cursor: pointer;
}

.f button:hover {
  background: var(--bus);
}

.f-actions {
  display: flex;
  align-items: flex-end;
}

.f-count {
  margin: 0.85rem 0 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.f-note {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.f-empty {
  margin: 2rem auto;
  padding: 1rem;
  background: var(--signal);
  font-weight: 700;
}

/* ---------- mode sections ---------- */

.mode-block {
  padding-bottom: 1.5rem;
}

.mode-block > .wrap:first-child {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-top: 1.4rem;
  background: linear-gradient(var(--enamel) 0 1.4rem, transparent 1.4rem);
}

.mode-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.5rem 0.7rem;
  background: var(--c);
  color: var(--plate);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.mode-head .mlet {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  font-size: 1.05rem;
}

.mode-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
}

/* ---------- model panels ---------- */

.models {
  display: grid;
  gap: 3px;
  margin: 3px 0 0;
  padding: 0;
  list-style: none;
}

.model {
  background: var(--plate);
  border-left: 6px solid var(--c);
  padding: 1rem 1rem 1.05rem;
}

.model-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.model-head .mlet {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  background: var(--c);
  color: var(--plate);
  font-size: 1.25rem;
  font-weight: 800;
}

.model h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mworks {
  margin: 0.12rem 0 0;
  font-size: 0.79rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.mnote {
  margin: 0.75rem 0 0;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.spec {
  margin: 0.9rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--rule-2);
  display: grid;
  gap: 0.45rem 1.2rem;
}

.sr {
  margin: 0;
}

.spec dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.spec dd {
  margin: 0.05rem 0 0;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 34rem) {
  .filter-grid { grid-template-columns: repeat(2, 1fr);
}

.spec {
  grid-template-columns: repeat(2, 1fr);
}
}

@media (min-width: 52rem) {
  .filter-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
  align-items: end;
}

.f-actions button {
  width: auto;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.spec {
  grid-template-columns: repeat(3, 1fr);
}

.mode-head {
  font-size: 1.2rem;
}
}

/* ---------- prose block ---------- */

.essay {
  background: var(--plate);
  padding: 1.15rem 1rem 1.2rem;
}

.essay p {
  font-size: 0.96rem;
  color: var(--ink-2);
}

.essay p:last-child {
  margin-bottom: 0;
}

.essay strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- numbered process ---------- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 3px;
}

.steps > li {
  counter-increment: step;
  background: var(--plate);
  padding: 1rem 1rem 1.05rem 3.4rem;
  position: relative;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.steps h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.steps p {
  margin: 0 0 0.5rem;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.steps p:last-child {
  margin-bottom: 0;
}

/* ---------- code ---------- */

pre.code {
  margin: 0;
  padding: 1rem;
  background: var(--ink);
  color: #e6ebee;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

pre.code b {
  color: var(--signal);
  font-weight: 500;
}

code.inline {
  font-family: var(--mono);
  font-size: 0.86em;
  background: #dfe4e7;
  padding: 0.1em 0.3em;
}

/* ---------- tables ---------- */

.tbl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--plate);
}

table.tbl {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.tbl th,
table.tbl td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-2);
}

table.tbl thead th {
  background: var(--ink);
  color: var(--plate);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-bottom: 0;
  position: sticky;
  top: 0;
}

table.tbl td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.tbl tbody tr:last-child td {
  border-bottom: 0;
}

.tbl-note {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- plain plate list ---------- */

.plates {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plates > li {
  background: var(--plate);
  border-left: 6px solid var(--ink);
  padding: 1rem 1rem 1.05rem;
}

.plates h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.plates p {
  margin: 0 0 0.5rem;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.plates p:last-child {
  margin-bottom: 0;
}

.plates .tag {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.2rem 0.4rem;
  background: var(--ink);
  color: var(--plate);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(2, 1fr);
}

.plates {
  grid-template-columns: repeat(2, 1fr);
}

.plates.wide {
  grid-template-columns: 1fr;
}
}
