/*
  RYUICHI H.

  This version deliberately follows the visual grammar of the
  GEDmill-generated reference site:
  - Verdana body text
  - Times New Roman headings
  - plain blue links
  - a cool, repeating mottled background
*/

:root {
  --background: #f1f4e9;
  --text: #000000;
  --link: #1344e9;
  --visited: #0c2d9a;
  --hover: #0000ff;
  --muted: #555555;
  --page-width: 800px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: var(--background);
  background-image: url("assets/pauerbach-texture.png");
  background-repeat: repeat;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background-color: transparent;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 10pt;
  line-height: 1.35;
  text-align: left;
}

img {
  border: none;
}

a {
  color: var(--link);
  background-color: inherit;
  text-decoration: none;
}

a:visited {
  color: var(--visited);
}

a:hover {
  color: var(--hover);
}

a:active {
  color: var(--visited);
}

a:focus-visible {
  outline: 1px dotted var(--link);
  outline-offset: 3px;
}

h1 {
  margin: 10px 0 4px;
  font-family: "Times New Roman", Times, serif;
  font-size: 26pt;
  font-weight: bold;
  line-height: 1.05;
  text-align: left;
}

h2 {
  margin: 0 0 4px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12pt;
  font-weight: normal;
  text-align: left;
}

p,
blockquote,
figure {
  margin-top: 0;
}

p {
  margin-bottom: 0;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 10pt;
  text-align: left;
}

.plain-link {
  color: inherit;
  text-decoration: none;
}

/* Entrance page, based on GEDmill's centered cover treatment */

.entrance-page {
  padding: 0 16px 36px;
}

.entrance {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding-top: 18px;
  text-align: center;
}

.site-name {
  margin: 10px 0 42px;
  text-align: center;
}

.inscription {
  margin: 0;
  text-align: center;
}

.poem-japanese {
  display: inline-flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 26px;
  margin: 0 auto 28px;
  font-family: "MS Mincho", "Yu Mincho", "Hiragino Mincho ProN",
               "Hiragino Mincho Pro", serif;
  font-size: 15pt;
  font-weight: normal;
  line-height: 1.72;
  letter-spacing: 0;
  text-align: center;
}

/* Japanese vertical text begins at the rightmost column. */
.poem-japanese .japanese-line:nth-child(1) { order: 3; }
.poem-japanese .japanese-line:nth-child(2) { order: 2; }
.poem-japanese .japanese-line:nth-child(3) { order: 1; }

.japanese-line {
  display: block;
  min-width: 1.2em;
  white-space: nowrap;
}

.poem-english {
  margin: 0 0 28px;
  padding: 0;
  font-style: normal;
  text-align: center;
}

.poem-english p {
  line-height: 1.5;
  text-align: center;
}

.attribution {
  padding-bottom: 28px;
  color: var(--text);
  font-size: 8pt;
  line-height: 1.5;
  text-align: center;
}

.lifespan {
  white-space: nowrap;
}

.enter-link {
  padding-bottom: 28px;
  font-size: 12pt;
  text-align: center;
}

/* Interior pages */

.page {
  width: min(calc(100% - 32px), var(--page-width));
  margin: 0 auto;
  padding: 12px 0 40px;
  position: relative;
}

.page-header {
  margin-bottom: 28px;
}

.subtitle {
  color: var(--text);
  font-size: 10pt;
  font-style: normal;
}

.primary-nav {
  display: block;
  margin: 0 0 40px;
}

.primary-nav a {
  display: block;
  width: max-content;
  margin-bottom: 7px;
  font-size: 12pt;
}

.utility-nav {
  margin: 0 0 22px;
  color: var(--text);
  font-size: 8pt;
}

.utility-nav a,
.utility-nav span {
  margin-right: 10px;
}

.utility-nav span {
  color: var(--muted);
}

.record {
  margin: 0 0 28px;
}

.record + .record {
  padding-top: 0;
  border-top: none;
}

.record h2 {
  margin-bottom: 8px;
}

.record p {
  margin-bottom: 8px;
}

.year-index {
  margin-bottom: 34px;
}

.entry-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
  text-align: left;
}

.entry-list li {
  display: block;
  margin-bottom: 6px;
}

.entry-list time {
  display: inline-block;
  width: 82px;
  color: var(--text);
  font-size: 10pt;
}

.entry-header {
  margin-bottom: 25px;
}

.entry-header h1 {
  max-width: none;
}

.entry-header p {
  color: var(--text);
  font-size: 10pt;
}

.entry-body,
.prose {
  max-width: 620px;
}

.entry-body p,
.prose p {
  margin-bottom: 12px;
}

.entry-image {
  margin: 20px 0;
}

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

.entry-image figcaption {
  margin-top: 4px;
  color: var(--text);
  font-size: 8pt;
}

.site-footer {
  margin-top: 40px;
  padding-top: 0;
  border-top: none;
  color: var(--text);
  font-size: 8pt;
}

.site-footer p {
  font-size: 8pt;
}

@media (max-width: 600px) {
  body {
    font-size: 9pt;
  }

  h1 {
    font-size: 23pt;
  }

  .site-name {
    margin-bottom: 30px;
  }

  .poem-japanese {
    gap: 21px;
    font-size: 14pt;
    line-height: 1.68;
  }

  .lifespan {
    white-space: normal;
  }

  .entry-list time {
    display: block;
    width: auto;
    margin-bottom: 1px;
    font-size: 8pt;
  }
}
