:root {
  --bg: #111318;
  --bg-elev: #161a21;
  --fg: #f5f0e8;
  --amber: #e8a33d;
  --amber-soft: #f0b55a;
  --gray: #8a8f98;
  --border: #2a2e37;
  --maxw: 780px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.7 "DejaVu Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ===== Header (sticky) ===== */
header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(17, 19, 24, 0.82);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.brand {
  color: var(--amber);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: 0.08em;
}
.brand img { height: 1.4em; vertical-align: -0.3em; margin-right: 0.35em; border-radius: 50%; }
.tag { color: var(--gray); font-size: 0.92rem; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 5.5rem 1.5rem 5rem;
  text-align: center;
  background:
    linear-gradient(rgba(17, 19, 24, 0.45), rgba(17, 19, 24, 0.88)),
    url("https://pub-df13003cadd34fb2b4146108a7ee992f.r2.dev/img/1787142456763_3192ad8ec5.png") center/cover no-repeat;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin: 0 0 0.8rem;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.15;
}
.hero h1 .dot { color: var(--amber); }
.hero p {
  color: #c8ccd4;
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.12rem;
}
.hero .cta { margin-top: 1.8rem; }
.hero .cta a {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: var(--amber);
  color: #111318;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}
.hero .cta a:hover { background: var(--amber-soft); transform: translateY(-2px); }

/* ===== Layout ===== */
main { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.section-title {
  font-size: 0.82rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 1.2rem;
}

/* ===== Post cards (homepage) ===== */
.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.3rem; }
.posts li {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.posts li:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 163, 61, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.posts a { text-decoration: none; color: inherit; display: block; }
.posts .thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: #1d2027 center/cover no-repeat;
  border-bottom: 1px solid var(--border);
}
.posts .meta { padding: 1.1rem 1.3rem 1.3rem; }
.posts .t { display: block; font-size: 1.2rem; font-weight: 700; color: var(--fg); }
.posts .d { display: block; color: var(--gray); margin-top: 0.35rem; font-size: 0.95rem; }
.posts .more {
  display: inline-block;
  color: var(--amber);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.55rem;
}
.posts li:hover .more { color: var(--amber-soft); }

/* ===== Article ===== */
.cover {
  aspect-ratio: 21 / 9;
  background: #1d2027 center/cover no-repeat;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 1.6rem;
}
article h1 { font-size: 2.05rem; line-height: 1.22; margin: 0 0 0.6rem; }
article .lede { color: var(--gray); font-size: 1.1rem; margin: 0 0 2rem; }
article .date { color: var(--gray); font-size: 0.85rem; margin: 0 0 0.4rem; }
article h2 {
  font-size: 1.32rem;
  margin: 2.2rem 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
article h2::before { content: "▍"; color: var(--amber); margin-right: 0.4rem; }
article p { margin: 0.85rem 0; }
article a { color: var(--amber); }
article code { background: #1d2027; padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; }
article blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1.2rem;
  border-left: 3px solid var(--amber);
  background: var(--bg-elev);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
article ul, article ol { padding-left: 1.4rem; }
article li { margin: 0.4rem 0; }
article .source {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--gray);
  font-size: 0.85rem;
  font-style: italic;
}

/* ===== Footer ===== */
footer {
  color: var(--gray);
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
footer a { color: var(--amber); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ===== Animation ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero, main, footer { animation: fadeUp 0.5s ease both; }
main { animation-delay: 0.08s; }
footer { animation-delay: 0.16s; }

/* ===== Header cost link ===== */
.cost {
  margin-left: auto;
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(232, 163, 61, 0.4);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.cost:hover { background: rgba(232, 163, 61, 0.12); border-color: var(--amber); }

/* ===== Cost page ===== */
.total-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0 2rem;
}
.total-label { display: block; color: var(--gray); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; }
.total-num { display: block; font-size: 3rem; font-weight: 700; color: var(--amber); margin: 0.3rem 0; line-height: 1; }
.total-sub { display: block; color: var(--gray); font-size: 0.9rem; }

.cost-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 2rem; font-size: 0.92rem; }
.cost-table th, .cost-table td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cost-table th { color: var(--gray); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cost-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost-table .note { color: var(--gray); font-size: 0.85rem; }
.cost-table sup { color: var(--gray); font-size: 0.75em; }
.cost-table .subtotal td { font-weight: 700; color: var(--fg); border-top: 2px solid var(--amber); border-bottom: none; }

@media (max-width: 480px) {
  .tag { display: none; }
}
