/* =============================================
   wallhaven.info — Shared Stylesheet
   Reference / guide theme
   ============================================= */

:root {
  --bg:          #fafaf8;
  --surface:     #ffffff;
  --surface2:    #f3f2ee;
  --border:      #e4e2db;
  --accent:      #1a5fb4;
  --accent-light:#eef3fc;
  --text:        #1c1c1a;
  --muted:       #585854;
  --light-muted: #8a8a84;
  --header-bg:   #1a1c24;
  --code-bg:     #f0eeea;
  --toc-accent:  #1a5fb4;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.78;
  font-size: 16px;
  min-height: 100vh;
}

/* ---- HEADER ---- */
header {
  background: var(--header-bg);
  border-bottom: 2px solid rgba(255,255,255,.06);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1140px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 24px; width: auto; display: block; }
.logo-domain {
  font-family: system-ui, sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: #5b8af5; margin-left: 8px;
}
nav { display: flex; gap: 2px; }
nav a {
  font-family: system-ui, sans-serif;
  font-size: 13px; color: #8a8a96;
  text-decoration: none; padding: 6px 11px;
  border-radius: 5px; transition: color .15s;
}
nav a:hover { color: #fff; }
nav a.cta {
  color: #5b8af5; border: 1px solid rgba(91,138,245,.3);
  padding: 5px 12px;
}
nav a.cta:hover { background: rgba(91,138,245,.1); color: #7ba2f7; }

/* ---- PAGE LAYOUT (sidebar + article) ---- */
.page-wrap {
  max-width: 1140px; margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 52px;
}

/* ---- SIDEBAR ---- */
.sidebar { font-family: system-ui, sans-serif; }
.toc { position: sticky; top: 80px; }
.toc-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--light-muted); margin-bottom: 10px;
}
.toc ul { list-style: none; }
.toc li { margin-bottom: 1px; }
.toc a {
  font-size: 13px; color: var(--muted);
  text-decoration: none; display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--border);
  transition: all .15s; line-height: 1.4;
}
.toc a:hover { color: var(--accent); border-left-color: var(--accent); }
.toc-group { margin-top: 16px; }
.sidebar-cta {
  margin-top: 28px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px;
}
.sidebar-cta h4 {
  font-family: Georgia, serif;
  font-size: .9rem; margin-bottom: 6px;
}
.sidebar-cta p {
  font-size: 12px; color: var(--muted);
  line-height: 1.5; margin-bottom: 10px;
}
.sidebar-cta a {
  display: block; text-align: center;
  background: var(--accent); color: #fff;
  text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 6px;
  transition: background .15s;
}
.sidebar-cta a:hover { background: #1348a0; }

/* ---- ARTICLE ---- */
article { min-width: 0; }
.article-header {
  margin-bottom: 32px; padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.article-kicker {
  font-family: system-ui, sans-serif;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); margin-bottom: 10px;
}
h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 700; line-height: 1.2;
  letter-spacing: -.02em; margin-bottom: 10px;
}
.article-meta {
  font-family: system-ui, sans-serif;
  font-size: 13px; color: var(--light-muted);
}
.article-meta a { color: var(--accent); text-decoration: none; }
.article-meta a:hover { text-decoration: underline; }

/* ---- ARTICLE SECTIONS ---- */
.article-section { margin-bottom: 48px; }
h2 {
  font-size: 1.45rem; font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: 14px; padding-top: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 8px; }
h4 {
  font-family: system-ui, sans-serif;
  font-size: .9rem; font-weight: 700;
  margin: 16px 0 6px; color: var(--text);
}
p { color: var(--muted); margin-bottom: 14px; }
p strong { color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 8px 0 14px 22px; color: var(--muted); }
li { margin-bottom: 6px; line-height: 1.6; }

/* ---- INFO BOX ---- */
.info-box {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px; margin: 20px 0;
  font-family: system-ui, sans-serif;
  font-size: .88rem; color: var(--text);
  line-height: 1.5;
}
.info-box strong { display: block; margin-bottom: 4px; }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; margin: 18px 0; }
table { width: 100%; border-collapse: collapse; font-family: system-ui, sans-serif; font-size: .86rem; }
th {
  text-align: left; padding: 10px 14px;
  background: var(--surface2); border-bottom: 2px solid var(--border);
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em; color: var(--light-muted);
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
tr:last-child td { border-bottom: none; }
td strong { color: var(--text); }
tr:hover td { background: var(--surface2); }

/* ---- CODE ---- */
code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .83em; background: var(--code-bg);
  padding: 2px 6px; border-radius: 4px; color: var(--text);
}
pre {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 18px 20px;
  overflow-x: auto; margin: 16px 0;
}
pre code { background: none; padding: 0; font-size: .84rem; line-height: 1.65; }

/* ---- WALLPAPER STRIP ---- */
.wp-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin: 20px 0;
}
.wp-card {
  border-radius: 8px; overflow: hidden; aspect-ratio: 16/9;
  background: var(--border); text-decoration: none; display: block;
  transition: transform .15s; box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.wp-card:hover { transform: scale(1.03); }
.wp-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #eae8e2 0%, #d5d2cc 100%);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.8} 50%{opacity:1} }

/* ---- FAQ ---- */
.faq-list { margin-top: 14px; }
details {
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; background: var(--surface);
}
summary {
  padding: 14px 18px; cursor: pointer;
  font-family: system-ui, sans-serif;
  font-weight: 600; font-size: .9rem;
  display: flex; justify-content: space-between; align-items: center;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-size: 1.2rem; font-weight: 300; }
details[open] summary::after { content: '−'; }
.faq-body {
  padding: 0 18px 14px;
  font-family: system-ui, sans-serif;
  font-size: .9rem; color: var(--muted); line-height: 1.6;
}

/* ---- FOOTER ---- */
footer {
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,.05);
  padding: 32px 24px;
  font-family: system-ui, sans-serif;
}
.footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 2px; }
.footer-links a {
  font-size: 13px; color: #5a5a64; text-decoration: none;
  padding: 4px 9px; border-radius: 5px; transition: color .15s;
}
.footer-links a:hover { color: #aaa; }
.footer-copy { font-size: 12px; color: #3a3a44; }

/* ---- RESPONSIVE ---- */
@media (max-width: 800px) {
  .page-wrap { grid-template-columns: 1fr; gap: 0; }
  .sidebar { display: none; }
}
@media (max-width: 640px) {
  nav { display: none; }
  h1 { font-size: 1.65rem; }
  .wp-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
