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

:root {
  --fg: #1a1a1a;
  --fg-2: #555;
  --fg-3: #888;
  --fg-4: #bbb;
  --border: rgb(0 0 0 / 0.1);
  --bg: #fff;
  --bg-hover: rgb(0 0 0 / 0.025);
  --bg-subtle: #f5f5f5;
  --accent: #1a6847;
}

body {
  font-family: sans-serif;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* --- Header --- */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;

  & h1 {
    font-size: 0.8125rem;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-2);
  }
}

.sr-control {
  display: flex;
  align-items: center;
  gap: 8px;

  & label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.6875rem;
    color: var(--fg-3);
    user-select: none;
    letter-spacing: 0.02em;
  }

  & input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
  }
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 0.5625rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent);

  &[data-state="off"] {
    background: var(--fg-4);
  }
}

/* --- Hint --- */

.hint {
  margin-bottom: 32px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-radius: 2px;
  font-size: 0.75rem;
  color: var(--fg-3);
  line-height: 1.6;
}

/* --- Article List --- */

.article-list {
  list-style: none;
}

.article-item {
  & a {
    display: block;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
    transition: background 0.1s;

    &:hover {
      background: var(--bg-hover);
      margin: 0 -12px;
      padding-left: 12px;
      padding-right: 12px;
    }
  }

  &:first-child a {
    border-top: 1px solid var(--border);
  }

  & h2 {
    font-size: 0.9375rem;
    font-weight: bold;
    letter-spacing: -0.01em;
    line-height: 1.4;
    margin-bottom: 6px;
  }

  & p {
    font-size: 0.8125rem;
    color: var(--fg-2);
    line-height: 1.6;
    margin-bottom: 6px;
  }

  & time {
    font-size: 0.6875rem;
    color: var(--fg-3);
    letter-spacing: 0.02em;
  }
}

/* --- Detail --- */

.detail-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);

  & h1 {
    font-size: 1.375rem;
    font-weight: bold;
    letter-spacing: -0.02em;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  & time {
    font-size: 0.75rem;
    color: var(--fg-3);
    letter-spacing: 0.02em;
  }
}

.detail-body {
  & p {
    margin-bottom: 20px;
    font-size: 0.9375rem;
    line-height: 1.85;
    color: var(--fg);
  }

  & h2 {
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: -0.01em;
    margin-top: 40px;
    margin-bottom: 12px;
  }

  & code {
    font-size: 0.8125rem;
    padding: 2px 6px;
    background: var(--bg-subtle);
    border-radius: 2px;
  }
}

.back-link {
  display: inline-block;
  margin-top: 40px;
  color: var(--fg-3);
  font-size: 0.8125rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;

  &:hover {
    color: var(--fg);
  }

  &::before {
    content: "\2190\a0";
  }
}
