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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: #1A1A1A;
  background: #F6F6EF;
  margin: 0;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  background: #E8580A;
  color: #fff;
  padding: 12px 0 8px;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 16px;
  font-size: 0.9rem;
}

.search-container {
  padding-top: 8px;
  padding-bottom: 4px;
}

.search-container .pagefind-ui__search-input {
  background: #fff;
  color: #1A1A1A;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 6px;
  font-size: 0.95rem;
}

.search-container .pagefind-ui__search-input::placeholder {
  color: #999;
}

.search-container .pagefind-ui__search-input:focus {
  border-color: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.search-container .pagefind-ui__search-clear {
  color: #666;
}

.search-container .pagefind-ui__results-area {
  background: #fff;
  border-radius: 6px;
  margin-top: 4px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-container .pagefind-ui__result {
  padding: 8px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.search-container .pagefind-ui__result:hover {
  background: #FFF5F0;
}

.search-container .pagefind-ui__result-link {
  display: block;
}

.search-container .pagefind-ui__result-nested {
  cursor: pointer;
}

.search-container .pagefind-ui__result-link {
  color: #0066CC;
  font-weight: 600;
}

.search-container .pagefind-ui__result-excerpt {
  color: #444;
}

.search-container .pagefind-ui__message {
  color: #1A1A1A;
  font-weight: 500;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.article-item {
  display: flex;
  gap: 12px;
  background: #fff;
  margin-bottom: 4px;
  padding: 16px;
  border-radius: 4px;
}

.article-rank {
  font-size: 1.2rem;
  font-weight: 700;
  color: #E8580A;
  min-width: 2.5rem;
  text-align: right;
}

.article-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 6px;
}

.article-title a {
  color: #0066CC;
  text-decoration: none;
}

.article-title a:visited { color: #551A8B; }
.article-title a:hover { text-decoration: underline; }

.article-meta {
  font-size: 0.8rem;
  color: #828282;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.meta-score {
  font-weight: 600;
  color: #E8580A;
}

.meta-link {
  color: #0066CC;
  text-decoration: underline;
  text-decoration-color: rgba(0,102,204,0.3);
  text-underline-offset: 2px;
}

.meta-link:hover {
  text-decoration-color: rgba(0,102,204,0.6);
}

.article-meta a {
  color: #828282;
  text-decoration: none;
}

.article-meta a.meta-link {
  color: #0066CC;
  text-decoration: underline;
  text-decoration-color: rgba(0,102,204,0.3);
}

.article-summary {
  margin-top: 8px;
  font-size: 0.9rem;
}

.article-summary summary {
  cursor: pointer;
  color: #555;
  font-size: 0.85rem;
}

.article-summary p {
  margin: 8px 0 0;
  color: #444;
  line-height: 1.8;
  background: #FFF8F4;
  border-left: 3px solid #E8580A;
  border-radius: 4px;
  padding: 10px 12px;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 24px 0 8px;
}

.site-description {
  color: #555;
  font-size: 1rem;
  margin: 0 0 24px;
}

.btn-latest {
  display: inline-block;
  background: #E8580A;
  color: #fff;
  padding: 10px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 8px;
}

.btn-latest:hover {
  background: #c94a07;
}

.date-nav {
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
}

.date-nav a {
  color: #0066CC;
  text-decoration: none;
}

.archive-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.archive-list a {
  color: #0066CC;
  text-decoration: none;
}

.latest-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.current-datetime {
  font-size: 0.85rem;
  font-weight: 400;
  color: #828282;
}

.hn-info-box {
  background: #fff;
  border: 1px solid #ddd;
  border-left: 4px solid #E8580A;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.hn-info-box summary {
  cursor: pointer;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.hn-info-box summary:hover {
  color: #E8580A;
}

.hn-info-content dl {
  margin: 12px 0 0;
}

.hn-info-content dt {
  font-weight: 600;
  color: #1A1A1A;
  margin-top: 10px;
}

.hn-info-content dt:first-child {
  margin-top: 0;
}

.hn-info-content dd {
  margin: 4px 0 0 0;
  color: #555;
  line-height: 1.7;
}

.site-footer {
  background: #1A1A1A;
  color: #aaa;
  padding: 24px 0;
  margin-top: 48px;
  font-size: 0.85rem;
}

.site-footer a { color: #ccc; }

.article-item.highlight {
  animation: highlightPulse 2.5s ease-out forwards;
}

@keyframes highlightPulse {
  0%, 30% { background: #FFF0E0; box-shadow: 0 0 0 4px rgba(232,88,10,0.35); }
  100% { background: #fff; box-shadow: none; }
}

@media (max-width: 600px) {
  .article-item { flex-direction: column; gap: 4px; }
  .article-rank { text-align: left; }
}
