/* ==========================================================================
   BIORITME — MINIMALIST SUBSTACK / LONG-FORM ESSAY STYLES
   Namespace: .br-*
   ========================================================================== */

:root {
  --br-bg: #faf9f6;
  --br-card-bg: #ffffff;
  --br-text-main: #242424;
  --br-text-body: #292929;
  --br-text-muted: #6b6b6b;
  --br-text-subtle: #8a8a8a;
  --br-primary: #1a56db;
  --br-accent: #059669;
  --br-border: #e5e5e5;
  --br-border-light: #f0f0f0;
  --br-serif: 'Newsreader', 'Georgia', 'Cambria', serif;
  --br-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --br-radius: 12px;
}

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

body.br-body {
  background-color: var(--br-bg);
  color: var(--br-text-body);
  font-family: var(--br-sans);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* READING PROGRESS BAR */
.br-progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 100;
}

.br-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1a56db 0%, #059669 100%);
  transition: width 0.1s ease;
}

/* MINIMAL HEADER */
.br-header {
  border-bottom: 1px solid var(--br-border);
  background-color: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 90;
}

.br-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.br-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--br-text-main);
}

.br-logo-symbol {
  width: 30px;
  height: 30px;
  background-color: #1a56db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
}

.br-logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.br-logo-edition {
  font-size: 11px;
  color: var(--br-text-muted);
  font-weight: 500;
  margin-left: 4px;
}

.br-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.br-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--br-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.br-nav a:hover, .br-nav a.br-active {
  color: var(--br-primary);
}

/* MAIN ESSAY CONTAINER (740px NARROW FOCUS) */
.br-article-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  flex: 1;
}

/* ARTICLE HEADER */
.br-article-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--br-border);
  padding-bottom: 32px;
}

.br-topic-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a56db;
  background-color: #e0e7ff;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.br-article-title {
  font-family: var(--br-serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--br-text-main);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.br-article-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--br-text-muted);
  font-weight: 400;
  margin-bottom: 24px;
}

.br-author-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.br-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1a56db;
}

.br-meta-text {
  font-size: 13px;
  line-height: 1.4;
}

.br-meta-name {
  font-weight: 700;
  color: var(--br-text-main);
}

.br-meta-details {
  color: var(--br-text-muted);
}

/* ESSAY BODY CONTENT */
.br-article-body {
  font-size: 18px;
  line-height: 1.85;
  color: var(--br-text-body);
}

.br-article-body p {
  margin-bottom: 24px;
}

/* DROP-CAP INITIAL */
.br-drop-cap::first-letter {
  font-family: var(--br-serif);
  float: left;
  font-size: 72px;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 12px;
  padding-bottom: 4px;
  color: #1a56db;
  font-weight: 800;
}

.br-article-body h2 {
  font-family: var(--br-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--br-text-main);
  margin: 40px 0 16px;
  line-height: 1.3;
}

.br-article-body h3 {
  font-family: var(--br-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--br-text-main);
  margin: 28px 0 12px;
}

.br-article-body ul, .br-article-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.br-article-body li {
  margin-bottom: 10px;
}

/* PULLQUOTE */
.br-pullquote {
  margin: 36px 0;
  padding: 24px 28px;
  border-left: 4px solid #1a56db;
  background-color: #f3f4f6;
  border-radius: 0 var(--br-radius) var(--br-radius) 0;
  font-family: var(--br-serif);
  font-size: 21px;
  line-height: 1.6;
  font-style: italic;
  color: #1f2937;
}

/* INLINE ARTICLE IMAGE WITH CAPTION */
.br-figure {
  margin: 36px 0;
}

.br-figure img {
  width: 100%;
  border-radius: var(--br-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.br-figcaption {
  font-size: 13px;
  color: var(--br-text-muted);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* CALLOUT NOTE BOX */
.br-callout {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #059669;
  border-radius: var(--br-radius);
  padding: 20px 24px;
  margin: 32px 0;
  font-size: 15px;
  color: #065f46;
}

.br-callout-title {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #047857;
}

/* IN-ARTICLE INTERACTIVE CIRCADIAN CALCULATOR WIDGET */
.br-interactive-box {
  background-color: #ffffff;
  border: 1px solid var(--br-border);
  border-radius: 16px;
  padding: 28px;
  margin: 40px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.br-box-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--br-border-light);
  padding-bottom: 14px;
}

.br-box-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--br-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.br-slider-control {
  margin-bottom: 24px;
}

.br-slider-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.br-slider-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--br-text-main);
}

.br-slider-val {
  font-size: 15px;
  font-weight: 800;
  color: #1a56db;
  background-color: #eff6ff;
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
}

.br-range {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.br-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1a56db;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(26, 86, 219, 0.4);
}

.br-circadian-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.br-timeline-card {
  background-color: #f9fafb;
  border: 1px solid var(--br-border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.br-timeline-time {
  font-size: 16px;
  font-weight: 800;
  color: #1a56db;
  margin-bottom: 4px;
}

.br-timeline-phase {
  font-size: 12px;
  font-weight: 700;
  color: var(--br-text-main);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.br-timeline-desc {
  font-size: 12px;
  color: var(--br-text-muted);
  line-height: 1.4;
}

/* HABIT PLEDGE CHECKLIST */
.br-pledge-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.br-pledge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: #f9fafb;
  border: 1px solid var(--br-border);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 600;
}

.br-pledge-item:hover {
  background-color: #ffffff;
  border-color: #cbd5e1;
}

.br-pledge-item.br-checked {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
  text-decoration: line-through;
}

.br-checkbox-box {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.br-pledge-item.br-checked .br-checkbox-box {
  background-color: #059669;
  border-color: #059669;
  color: #ffffff;
}

/* AUTHOR CARD AT END */
.br-author-box {
  background-color: #ffffff;
  border: 1px solid var(--br-border);
  border-radius: var(--br-radius);
  padding: 28px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.br-author-box-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1a56db;
  flex-shrink: 0;
}

.br-author-box-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--br-text-main);
  margin-bottom: 4px;
}

.br-author-box-title {
  font-size: 12px;
  font-weight: 600;
  color: #1a56db;
  margin-bottom: 8px;
}

.br-author-box-desc {
  font-size: 13px;
  color: var(--br-text-muted);
  line-height: 1.5;
}

/* SUBPAGE FORM & STYLES */
.br-form-group {
  margin-bottom: 18px;
}

.br-form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--br-text-main);
}

.br-form-input, .br-form-textarea, .br-form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--br-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background-color: #ffffff;
}

.br-form-input:focus, .br-form-textarea:focus, .br-form-select:focus {
  outline: none;
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

.br-btn-submit {
  background-color: #1a56db;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.br-btn-submit:hover {
  background-color: #1e40af;
}

/* MINIMAL FOOTER */
.br-footer {
  border-top: 1px solid var(--br-border);
  background-color: #ffffff;
  padding: 32px 24px;
  margin-top: auto;
}

.br-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.br-footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
  flex-wrap: wrap;
}

.br-footer-links a {
  font-size: 13px;
  color: var(--br-text-muted);
  text-decoration: none;
}

.br-footer-links a:hover {
  color: var(--br-primary);
}

.br-footer-copy {
  font-size: 12px;
  color: var(--br-text-subtle);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .br-article-title {
    font-size: 28px;
  }
  
  .br-article-wrapper {
    padding: 28px 16px 60px;
  }
  
  .br-circadian-timeline {
    grid-template-columns: 1fr;
  }
  
  .br-author-box {
    flex-direction: column;
    text-align: center;
  }
}
