:root {
  --bg: #f6f1e6;
  --bg-sidebar: #f1ebdd;
  --navy: #16304f;
  --navy-2: #0f2137;
  --gold: #a9803f;
  --text: #2b2a26;
  --muted: #7a7261;
  --line: #e2d9c4;
  --sidebar-w: 280px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
}

a { color: var(--navy); }
a:hover { color: var(--gold); }

.layout {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* Sidebar */
.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  text-decoration: none;
  display: block;
  margin-bottom: 18px;
}

.brand-name {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.brand-tag {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
}

.sidebar-intro {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 32px;
}

.side-nav {
  font-family: var(--sans);
  flex: 1;
}

.side-group {
  margin-bottom: 28px;
}

.side-group h3 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.side-group a {
  display: block;
  font-size: 15px;
  color: var(--navy);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: none;
}

.side-group a:hover {
  color: var(--gold);
}

.sidebar-footer {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  margin: 24px 0 0;
}

/* Nav toggle (mobile) */
.nav-toggle { display: none; }
.nav-toggle-btn {
  display: none;
}

/* Main content */
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.content-inner {
  width: 100%;
  max-width: 680px;
  padding: 56px 32px 80px;
}

.page-title {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 36px;
}

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.2;
  color: var(--navy);
}

.post-title {
  font-size: 44px;
  font-weight: 600;
  margin: 0 0 10px;
}

.post-meta {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

article.post p {
  margin: 0 0 1.3em;
}

article.post em, article.post i {
  color: var(--gold);
  font-style: italic;
}

article.post img {
  max-width: 100%;
  height: auto;
}

.year-heading {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 40px 0 12px;
}

.year-heading:first-of-type { margin-top: 0; }

ul.post-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

ul.post-list li {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

ul.post-list a {
  color: var(--navy);
  text-decoration: none;
  font-size: 19px;
}

ul.post-list a:hover { color: var(--gold); }

ul.post-list time {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.post-nav {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 15px;
}

.post-nav a { text-decoration: none; }

@media (max-width: 860px) {
  .layout { flex-direction: column; }

  .nav-toggle-btn {
    display: block;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 20;
    background: var(--navy);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    text-align: center;
    line-height: 40px;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 15;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  }

  .nav-toggle:checked ~ .sidebar {
    transform: translateX(0);
  }

  .content { padding-top: 64px; }
  .content-inner { padding: 24px 20px 60px; }
  .page-title { font-size: 32px; }
  .post-title { font-size: 32px; }
  body { font-size: 18px; }
}

/* Avatar / brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

/* Full post stream (homepage) */
.post-stream-item {
  margin-bottom: 8px;
}

.stream-title {
  font-size: 34px;
  font-weight: 600;
  margin: 0 0 8px;
}

.stream-title a {
  color: var(--navy);
  text-decoration: none;
}

.stream-title a:hover {
  color: var(--gold);
}

.post-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

.pager {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 15px;
  margin: 20px 0 60px;
}

.pager a {
  text-decoration: none;
  color: var(--navy);
}

.pager a:hover {
  color: var(--gold);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
}

.share-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
}

.share-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.share-btn:hover {
  border-color: var(--gold);
  color: var(--gold-2, var(--gold));
  background: rgba(169, 128, 63, 0.08);
}

.subscribe-box {
  margin: 16px 0 24px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}

.subscribe-box-label {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.subscribe-btn {
  display: inline-block;
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.subscribe-btn:hover {
  background: var(--navy-2);
}

/* Peamine äri-CTA: tasuta talendidiagnostika (elaritamm.com) */
.cta-box {
  margin: 16px 0 24px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--gold);
  border-radius: 10px;
  text-align: center;
}

.cta-box-label {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cta-box-text {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.cta-box-btn {
  display: inline-block;
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--gold);
  border-radius: 999px;
  padding: 9px 14px;
  transition: background 0.15s, color 0.15s;
}

.cta-box-btn:hover {
  background: var(--navy);
  color: #fff;
}

.random-box {
  margin: 16px 0 24px;
  padding: 14px 16px;
  background: rgba(169, 128, 63, 0.08);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}

.random-box-label {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.random-btn {
  display: inline-block;
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.random-btn:hover {
  background: var(--navy-2);
}

.search-box {
  margin: 0 0 24px;
  position: relative;
}

.search-box-label {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--sans);
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
}

.search-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  margin-top: 6px;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.search-result {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover {
  background: rgba(169, 128, 63, 0.08);
}

.search-result-title {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.search-result-date {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.search-empty {
  margin: 0;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
