:root {
  --text: #1b2e2c;
  --muted: #5c7873;
  --bg: #f6f8f3;
  --surface: #eaf1ec;
  --accent: #157a6d;
  --accent-2: #dd7a3a;
  --header: #0e3b38;
  --border: #d9e3dc;
}

* { box-sizing: border-box; }

body {
  font-family: Georgia, "Times New Roman", serif;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.sidebar {
  flex: 0 0 12rem;
  font-family: system-ui, sans-serif;
}

.sidebar h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 2rem 0 0.5rem;
}

.sidebar h2 a {
  display: inline;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.sidebar h2 a:hover { color: var(--accent); }

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li { border-top: 1px solid var(--border); }
.sidebar li:last-child { border-bottom: 1px solid var(--border); }

.sidebar a {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
}

.sidebar a:hover { color: var(--accent); }

main { min-width: 0; flex: 1; }

.nav-toggle { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  flex: 0 0 auto;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
}

h1, h2, h3 {
  font-family: system-ui, sans-serif;
  line-height: 1.25;
}

h1 { font-size: 1.75rem; margin: 1.5rem 0 0.5rem; }
h2 { font-size: 1.25rem; margin-top: 2rem; clear: both; }

a { color: var(--accent); }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.75rem 1.25rem;
  margin: 0 calc(50% - 50vw) 1rem;
  background: var(--header);
}
@media screen and (min-width: 1025px) {
  .brand {
    margin-left:20%
  }
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.5rem;
}

.brand img { display: block; max-width: 100%; }

.brand-name { margin-left: 1rem; }

.search {
  display: flex;
  gap: 0.4rem;
  flex: 1 1 16rem;
  max-width: 20rem;
}

.search input {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  width: 100%;
  min-width: 0;
}

.search input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.search button {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.search button:hover { background: var(--accent-2); border-color: var(--accent-2); }

nav {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

nav a { color: var(--muted); }
nav a:hover { color: var(--accent); }

footer nav { margin-bottom: 0.5rem; }

.carousel {
  position: relative;
  margin: 1rem 0 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--header);
}

.carousel-track {
  display: grid;
  grid-template-areas: "slide";
}

.carousel-slide {
  grid-area: slide;
  display: block;
  position: relative;
  height: 22rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1.5rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  color: #fff;
}

.carousel-caption .meta { color: rgba(255, 255, 255, 0.75); }

.carousel-caption h2 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.35rem;
  color: #fff;
}

.carousel-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.carousel-dots {
  position: absolute;
  right: 1rem;
  bottom: 0.75rem;
  display: flex;
  gap: 0.4rem;
}

.carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.3);
  padding: 0;
  cursor: pointer;
}

.carousel-dot.is-active { background: #fff; }

@media (max-width: 40rem) {
  .carousel-slide { height: 16rem; }
  .carousel-caption h2 { font-size: 1.1rem; }
}

.topic-list,
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1rem 0 1.5rem;
}

.topic-list a,
.tag-list a {
  display: block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
}

.topic-list a:hover,
.tag-list a:hover { color: var(--accent); border-color: var(--accent); }

.tag-list a::before {
  content: "#";
  color: var(--muted);
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.article-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.article-list li:first-child { padding-top: 0; }

.article-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.article-thumb {
  flex: none;
  width: 120px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-row-body {
  flex: 1;
  min-width: 0;
}

.article-list a {
  font-family: system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.article-list a:hover { color: var(--accent); }

.article-row-body a,
.article-row-body .meta {
  display: block;
}

.article-row-body .meta { margin-top: 0.2rem; }

.article-list p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta {
  font-family: system-ui, sans-serif;
  color: var(--muted);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0;
}

.article-row-body .meta { display: flex; }

.views {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.eye-icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

article p { margin: 1rem 0; }

img { max-width: 100%; }

.author-photo {
  width: 260px;
  height: 260px;
  object-fit: cover;
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
}

.product-shot {
  float: left;
  margin: 0.35rem 1.5rem 1rem 0;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .product-shot {
    float: none;
    display: block;
    margin: 0.5rem 0 1rem;
  }
}

figure { margin: 1.5rem 0; }

figcaption {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-family: system-ui, sans-serif;
  background: var(--surface);
  color: var(--text);
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 40rem) {
  .layout { flex-direction: column; align-items: stretch; }
  .sidebar { flex-basis: auto; width: 100%; }
  main { width: 100%; }

  header { justify-content: space-between; padding: 0.75rem 1rem; flex-wrap: wrap; }
  .brand { justify-content: flex-start; width: auto; flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; }
  .brand img.logo { height: 32px; width: auto; flex: 0 0 auto; }
  .brand img.site-name { height: 16px; width: auto; flex: 0 1 auto; min-width: 0; }

  .hamburger { display: flex; }

  .search {
    display: none;
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-right: 0 !important;
  }

  .sidebar { display: none; }

  .nav-toggle:checked ~ header .search { display: flex; }
  .nav-toggle:checked ~ .layout .sidebar { display: block; }

  table { display: block; overflow-x: auto; white-space: nowrap; }
}
