@import url("fonts.css");

/* External Currency Translation Cooperative - own stylesheet.
   This is a licensed cooperative and no organ of the Republic, so it loads
   none of the shared state frame. */

:root {
  --paper:  #fbf9f4;
  --shell:  #e4e8e4;
  --ink:    #1c2b2a;
  --ink-2:  #4d6260;
  --ink-3:  #7f918f;
  --line:   #cfd8d4;

  /* Republic side */
  --brass:      #a8762d;
  --brass-deep: #7d5518;
  --brass-pale: #f4ebda;

  /* Euro side */
  --sea:      #2b6a72;
  --sea-deep: #17444a;
  --sea-pale: #e0edee;

  --stop: #a8231b;
  --go:   #2f6b45;

  --sans: "Noto Sans", ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r: 12px;
}

/* ---------- ground ---------- */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--sea-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brass-deep);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 40;
  border-radius: 0 0 var(--r) 0;
}

.skip:focus {
  left: 0;
  top: 0;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.4rem;
}

/* ---------- masthead ---------- */

.head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.head .wrap {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.head .badge {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--brass);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 0 var(--brass-deep);
}

.head .badge svg {
  display: block;
  width: 34px;
  height: 34px;
}

.head .kicker {
  margin: 0 0 .1rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.head h1,
.head .name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.head .name a {
  color: inherit;
  text-decoration: none;
}

.head .licence {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-2);
}

/* ---------- navigation: pills, and the current page filled ---------- */

.nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.nav a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: .87rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: .38rem .8rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav a:hover {
  background: var(--sea-pale);
  color: var(--sea-deep);
}

.nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- sheet and running text ---------- */

main {
  display: block;
}

.sheet {
  background: var(--paper);
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.4rem 2.6rem;
}

.sheet > *:first-child {
  margin-top: 0;
}

.sheet > *:last-child {
  margin-bottom: 0;
}

h1.title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0-.04em;
  line-height: 1.08;
  margin: 0 0 0.7rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0-.02em;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
}

.lede {
  font-size: 1.16rem;
  color: var(--ink-2);
}

/* ---------- the translation slip: the seam, drawn ---------- */

.slip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--paper);
}

.slip > div {
  padding: 1.1rem 1.2rem;
  margin-top: 0;
}

.slip .home {
  background: var(--brass-pale);
}

.slip .away {
  background: #fff;
  border-left: 2px dashed var(--line);
}

.slip .side {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin: 0 0 .6rem;
}

.slip .home .side {
  color: var(--brass-deep);
}

.slip .away .side {
  color: var(--sea);
}

.slip dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.8rem;
  margin: 0;
  font-size: 0.88rem;
}

.slip dt {
  color: var(--ink-2);
}

.slip dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.84rem;
  text-align: right;
}

.slip .big {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}

.slip .foot {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.slip .foot p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-2);
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  padding: 0;
  counter-reset: st;
}

.steps li {
  counter-increment: st;
  position: relative;
  padding: 0 0 1.3rem 3.4rem;
  border-left: 2px solid var(--line);
  margin-left: 1.1rem;
}

.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  content: counter(st);
  position: absolute;
  left: -1.1rem;
  top: -.15rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--brass);
  color: var(--brass-deep);
  font-family: var(--mono);
  font-weight: 700;
  font-size: .9rem;
  display: grid;
  place-items: center;
}

.steps h3 {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
}

.steps p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.cards article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.05rem 1.15rem;
  transition: transform .12s ease, box-shadow .12s ease;
}

.cards article:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(28,43,42,0.09);
}

.cards h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.cards p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.cards .fig {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--brass-deep);
  margin-top: 0.5rem;
}

/* ---------- notices ---------- */

.note {
  border-radius: var(--r);
  padding: 1rem 1.15rem;
  margin: 1.4rem 0;
  font-size: .93rem;
  background: var(--sea-pale);
  border-left: 4px solid var(--sea);
}

.note.warn {
  background: #f7e8e6;
  border-left-color: var(--stop);
}

.note.law {
  background: var(--brass-pale);
  border-left-color: var(--brass);
}

.note p {
  margin: 0 0 0.5rem;
}

.note p:last-child {
  margin: 0;
}

.note h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

/* ---------- tables ---------- */

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

.tbl caption {
  text-align: left;
  font-size: 0.84rem;
  color: var(--ink-2);
  padding-bottom: 0.5rem;
}

.tbl th,
.tbl td {
  text-align: left;
  padding: 0.58rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.tbl thead th {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 2px solid var(--ink);
}

.tbl th.num {
  text-align: right;
}

.tbl td.num {
  font-family: var(--mono);
  text-align: right;
  white-space: nowrap;
}

.tbl tbody tr:hover {
  background: var(--sea-pale);
}

.scroll {
  overflow-x: auto;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .12rem .45rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.tag.easy {
  color: var(--go);
}

.tag.extra {
  color: var(--brass-deep);
}

.tag.no {
  color: var(--stop);
}

/* ---------- controls ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: flex-end;
  margin: 1rem 0;
}

.field {
  flex: 1 1 12rem;
  font-size: 0.9rem;
}

.field label {
  display: block;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: .25rem;
}

.field input,
.field select {
  font: inherit;
  width: 100%;
  padding: .48rem .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

button.act {
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: .48rem .95rem;
  border-radius: 999px;
}

button.act:hover {
  background: var(--sea-pale);
  border-color: var(--sea);
  color: var(--sea-deep);
}

.count {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  margin: 0.4rem 0 0;
}

.empty {
  font-size: 0.92rem;
  color: var(--ink-2);
  padding: 1.1rem 0;
}

/* ---------- footer ---------- */

.foot {
  background: var(--sea-deep);
  color: #bcd3d5;
  font-size: .87rem;
  border-top: 6px solid var(--brass);
  margin-top: 2.4rem;
}

.foot .wrap {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  padding-top: 2.1rem;
  padding-bottom: 2.4rem;
}

.foot h2 {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 .55rem;
}

.foot p {
  margin: 0 0 0.35rem;
  line-height: 1.5;
}

.foot a {
  color: #bcd3d5;
}

.foot a:hover {
  color: #fff;
}

.foot .fine {
  color: #85a5a8;
  font-size: 0.8rem;
}

/* ---------- narrow screens, print, reduced motion ---------- */

@media (max-width: 44rem) {
  body { font-size: 16px;
}

h1.title {
  font-size: 1.7rem;
}

.head .wrap {
  flex-wrap: wrap;
}

.slip {
  grid-template-columns: 1fr;
}

.slip .away {
  border-left: 0;
  border-top: 2px dashed var(--line);
}
}

@media print {
  .band, .nav, .foot { display: none;
}

body {
  background: #fff;
  font-size: 11pt;
}

.cards article, .slip, .board {
  break-inside: avoid;
}
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto;
}
* {
  transition: none !important;
  animation: none !important;
}
}
