/*
 * The site's styles: one plain column of text, in light and dark. Each article is a list of
 * titles, each a link with its author beside it.
 *
 * Colors are tokens on :root that light-dark() switches with the reader's setting. No web fonts
 * and no scripts: the page uses the fonts the reader's device has for Japanese.
 */

:root {
  color-scheme: light dark;

  --text: light-dark(#1b1c20, #e8e9ed);
  --muted: light-dark(#5a5d68, #a9adb9);
  --background: light-dark(#ffffff, #121316);
  --border: light-dark(#e3e4e8, #2c2e35);
  --link: light-dark(#0b57d0, #8cb4ff);
  --focus: light-dark(#0b57d0, #8cb4ff);

  --gutter: 16px;
  --column: 40rem;

  font-family: system-ui, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  font-size: 100%;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--background);
  /* Long titles wrap instead of widening the page; kinsoku rules stay strict. */
  overflow-wrap: anywhere;
  line-break: strict;
}

h1 {
  font-size: 1.25rem;
  line-height: 1.45;
  margin: 0 0 1rem;
  word-break: auto-phrase;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Read by screen readers, not shown: such as the note that a link opens a new tab. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 0.5rem 1rem;
  background: var(--background);
  color: var(--text);
}

.skip-link:focus {
  top: 0.5rem;
}

.site-header-inner,
.site-main,
.site-footer-inner {
  width: 100%;
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-main {
  flex: 1;
  padding-block: 1.5rem 2.5rem;
}

.ad-note {
  color: var(--muted);
  font-size: 0.8rem;
}

/* The list of titles, and the archive's list of dates. */
.titles {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.titles li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.titles .author {
  color: var(--muted);
  font-size: 0.875rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer-inner {
  padding-block: 1.25rem;
}

.site-footer p {
  margin: 0 0 0.4em;
}
