@font-face { font-family: "Intel One Mono"; src: url("fonts/intel-one-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Intel One Mono"; src: url("fonts/intel-one-mono-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Intel One Mono"; src: url("fonts/intel-one-mono-400-italic-ext.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+02C8, U+02CC; }
@font-face { font-family: "Intel One Mono"; src: url("fonts/intel-one-mono-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

html {
  /* stop mobile Safari from inflating some lines' text in landscape */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #100d0a;
}

/* The tiled wall of work. Oversized so the tilt never shows an edge. */
.bg {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 150vmax;
  height: 150vmax;
  transform: translate(-50%, -50%) rotate(-19.47deg);
  background-repeat: repeat;
  background-position: center;
}

.card {
  position: fixed;
  left: 0;
  top: 41%;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  padding: 1.67em 2.83em 1.33em calc(2.75em + env(safe-area-inset-left, 0px));
  background: #100d0a;
  color: #fff;
  font-family: "Intel One Mono", ui-monospace, Menlo, monospace;
  /* everything in the card scales off this one size */
  font-size: clamp(13.5px, 0.7vw + 6px, 18px);
  line-height: 1.72;
  text-transform: lowercase;
}

.card p, .card ol { margin: 0; }
.card b { font-weight: 700; }

/* headword line */
.word { font-size: 1.58em; line-height: 1.4; }
.word .pos { color: rgb(255 255 255 / 0.5); font-size: 0.79em; }
.word .ipa { color: rgb(255 255 255 / 0.7); font-size: 0.79em; }

/* senses */
.card ol {
  margin-top: 0.83em;
  padding-left: 3.2em;
}
.card li { padding-left: 0.4em; }
.card .aside { display: block; color: rgb(255 255 255 / 0.5); font-size: 0.85em; line-height: 1.5; }
.card .aside a { color: #fff; }
.card li::marker { color: rgb(255 255 255 / 0.45); }

.card .foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2em;
  margin-top: 1.5em;
  font-size: 0.83em;
  color: rgb(255 255 255 / 0.5);
}
.foot a { color: #fff; }
.foot a[href^="mailto"] { font-size: 1.3em; font-style: normal; text-decoration: none; }

.card a { text-underline-offset: 2px; }
.card a:hover { color: #e3241b; }

@media (max-width: 440px) {
  .card { top: auto; bottom: 12%; font-size: 13px; padding: 1.3em 1.4em 1.1em 1.5em; }
  .card ol { padding-left: 2em; }
}

/* Phones see a much smaller window onto the wall, so shrink the work to show more of it. */
@media (max-width: 600px), (max-height: 500px) {
  .bg {
    width: 250vmax;
    height: 250vmax;
    transform: translate(-50%, -50%) rotate(-19.47deg) scale(0.6);
  }
}

/* Phones in landscape: very little height, so center the card and keep it compact. */
@media (max-height: 500px) and (min-width: 441px) {
  .card { top: 50%; transform: translateY(-50%); font-size: 12px; }
}
