/* quayle.ch — visual style taken from the original 2018 site.
   Black page, white italic Arial text, grey links that turn red on hover. */

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

html {
  color-scheme: dark;
}

body {
  margin: 8px;
  min-height: 100vh;
  background-color: #000;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-style: italic;
  font-weight: bold;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -4rem;
  z-index: 10;
  padding: 0.35rem 0.7rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-style: italic;
  font-weight: bold;
}

.skip-link:focus {
  top: 8px;
}

h1,
h2,
p,
caption {
  margin: 0;
  font-size: 1em;
  font-weight: bold;
  font-style: italic;
  color: #fff;
}

header {
  margin: 0 0 0.65em;
}

.contact p + p {
  margin-top: 0.85em;
}

.contact {
  margin: 0 0 2.6em;
}

a:link {
  color: #999;
  text-decoration: none;
}

a:visited,
a:active {
  color: #fff;
  text-decoration: none;
}

a:hover {
  color: #f00;
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #f00;
  outline-offset: 3px;
}

/* Link table: same four columns as the original (image, name, spacer, description). */
table.links {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border: 0;
  border-collapse: separate;
  border-spacing: 2px;
  text-align: left;
}

table.links caption {
  caption-side: top;
  padding: 0 0 1.1em;
  text-align: center;
  color: #fff;
}

table.links td {
  padding: 2px;
  vertical-align: middle;
  font-style: italic;
  font-weight: bold;
}

table.links td.thumb {
  width: 190px;
}

table.links td.thumb a {
  display: block;
  position: relative;
  width: 190px;
  max-width: 100%;
  line-height: 0;
}

table.links td.thumb img {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
  border: 0;
}

/* Empty marked slot when a picture is missing or fails to load.
   The broken-image icon is hidden. */
table.links td.thumb img.missing {
  display: none;
}

table.links td.thumb a:has(img.missing)::after,
table.links td.thumb a:not(:has(img))::after {
  content: "image";
  display: block;
  width: 190px;
  max-width: 100%;
  min-height: 120px;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px #333;
  color: #555;
  font-size: 0.85em;
  font-style: italic;
  font-weight: bold;
  line-height: 120px;
  text-align: center;
}

table.links td.spacer {
  width: 0.7em;
}

table.links td.desc {
  color: #fff;
}

table.links td.name {
  white-space: nowrap;
}

/* E-mail reveal, styled to fit the old black page. */
.email-box {
  margin-top: 1.1em;
}

#show-email {
  display: none;
}

html.js #show-email {
  display: inline-block;
}

button {
  appearance: none;
  display: inline-block;
  margin: 0;
  padding: 0.35em 0.8em;
  min-height: 2.25em;
  border: 1px solid #999;
  border-radius: 0;
  background: #000;
  color: #999;
  font-family: Arial, Helvetica, sans-serif;
  font-style: italic;
  font-weight: bold;
  font-size: 1em;
  line-height: 1.2;
  cursor: pointer;
}

button:hover {
  color: #f00;
  border-color: #f00;
  text-decoration: underline;
}

#email-panel {
  display: inline-block;
  margin-top: 0.85em;
  padding: 0.6em 0.9em;
  border: 1px solid #999;
  background: #000;
  text-align: center;
}

#email-panel[hidden] {
  display: none;
}

.email-address {
  margin: 0 0 0.55em;
  color: #fff;
  font-style: italic;
  font-weight: bold;
  word-break: break-all;
}

.email-address:focus {
  outline: none;
}

.email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em 0.9em;
  margin: 0;
  justify-content: center;
  align-items: center;
}

.noscript-note {
  margin-top: 0.7em;
  color: #999;
}

footer {
  margin: 2.5em 0 1em;
  color: #999;
  font-size: 0.9em;
}

footer p {
  color: #999;
  margin: 0 0 0.2em;
}

@media (max-width: 640px) {
  table.links,
  table.links tbody,
  table.links tr,
  table.links td {
    display: block;
    width: auto;
    max-width: 100%;
  }

  table.links {
    border-spacing: 0;
  }

  table.links caption {
    padding-bottom: 0.9em;
  }

  table.links tr {
    margin: 0 0 1.6em;
    text-align: center;
  }

  table.links td {
    padding: 0.2em 0;
    text-align: center;
  }

  table.links td.spacer {
    display: none;
  }

  table.links td.name {
    white-space: normal;
  }

  table.links td.thumb,
  table.links td.thumb a {
    width: 190px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
