
.ds-single {
  background: var(--ds-bg, #0b0b0f);
  color: var(--ds-text, #f5f3ee);
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Forces total layout flattening */
  border-bottom-left-radius: 0 !important;  /* Ensures no bottom curve leakages */
  border-bottom-right-radius: 0 !important; /* Ensures no bottom curve leakages */
  overflow: hidden;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

/* Global Box-Sizing Safety Layer */
.ds-single *, .ds-single *::before, .ds-single *::after {
  box-sizing: border-box;
}

/* Modern Viewport Full-Width Breakout Execution Rule */
@media (min-width: 768px) {
  .ds-single {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
  }
}

/* System Exception Handling Alerts Layout */
.ds-single__error {
  padding: 32px;
  text-align: center;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  max-width: 840px;
  margin: 40px auto;
}

/* Fixed Top Progress Tracker Overlay Layer */
.ds-single__progress {
  position: sticky;
  top: 0;
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  z-index: 100;
}
.ds-single__progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b48c5a 0%, #e2c9a9 50%, #b48c5a 100%);
  box-shadow: 0 0 8px rgba(180, 140, 90, 0.6);
  transition: width 0.12s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* ==========================================================================
   2. Header & Title Component (The Layout Anchor)
   ========================================================================== */
.ds-single__head {
  position: relative;
  padding: clamp(100px, 14vw, 180px) 0 clamp(56px, 7vw, 88px);
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  background-color: #121218;
  background-size: cover;
  background-position: center;
}

.ds-single__head-overlay {
  position: absolute; 
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(11, 11, 15, 0.25) 0%, 
    rgba(11, 11, 15, 0.7) 50%, 
    #0b0b0f 100%
  );
  z-index: 1;
}

.ds-single__head-inner {
  position: relative;
  max-width: 840px; 
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px); 
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 2;
}

/* Category Pill Styling Layout */
.ds-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 6px 14px;
  background: rgba(180, 140, 90, 0.15);
  border: 1px solid rgba(180, 140, 90, 0.3);
  color: #e2c9a9;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ds-single__title {
  font-family: var(--ds-font-display, serif);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 56px); 
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}

.ds-single__subtitle {
  font-size: clamp(18px, 2.5vw, 22px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-weight: 400;
}

.ds-single__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ds-text-dim, #a09fa5);
  font-size: 14px;
  margin-top: 8px;
}

.ds-single__avatar {
  width: 36px; 
  height: 36px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  object-fit: cover;
}

.ds-single__author-name {
  color: #f5f3ee;
  font-weight: 500;
}

.ds-single__sep {
  color: rgba(255,255,255,0.15);
}

/* ==========================================================================
   3. Centralized Body Layout Canvas Block
   ========================================================================== */
.ds-single__body-wrapper {
  background: #0b0b0f;
  width: 100%;
  border-bottom-left-radius: 0 !important;  /* Safeguard for bottom wrapper edge */
  border-bottom-right-radius: 0 !important; /* Safeguard for bottom wrapper edge */
}

.ds-single__body {
  max-width: 840px; 
  width: 100%;
  margin: 0 auto;
  padding: 48px clamp(16px, 4vw, 32px) 80px; 
  font-size: clamp(16px, 2vw, 18px); 
  line-height: 1.85;
  color: rgba(245, 243, 238, 0.88);
}

/* Content Element Rules */
.ds-single__body :where(h2, h3, h4) {
  font-family: var(--ds-font-display, serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  color: #ffffff;
}
.ds-single__body h2 { font-size: clamp(26px, 3.5vw, 34px); line-height: 1.25; }
.ds-single__body h3 { font-size: clamp(20px, 2.5vw, 26px); line-height: 1.3; }

.ds-single__body p { 
  margin: 0 0 1.6em; 
}

.ds-single__body a { 
  color: #e2c9a9; 
  text-decoration: underline; 
  text-underline-offset: 5px;
  transition: color 0.2s ease;
}
.ds-single__body a:hover {
  color: #ffffff;
}

/* Shared Width Layout Media Rules */
.ds-single__body img { 
  border-radius: var(--ds-radius-sm, 8px); 
  margin: 2.5em 0;
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.ds-single__body blockquote {
  margin: 2.5em 0;
  padding: 24px clamp(20px, 4vw, 32px);
  border-left: 3px solid #b48c5a;
  background: var(--ds-surface, #13131a);
  border-radius: 0 var(--ds-radius-sm, 8px) var(--ds-radius-sm, 8px) 0;
  color: #f5f3ee;
  font-style: italic;
}
.ds-single__body blockquote p:last-child {
  margin-bottom: 0;
}

.ds-single__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.88em;
  color: #e2c9a9;
  word-break: break-word;
}

.ds-single__body pre {
  background: #060608;
  border: 1px solid var(--ds-border, rgba(255,255,255,0.08));
  border-radius: var(--ds-radius-sm, 8px);
  padding: 20px;
  overflow-x: auto;
  font-size: 14.5px;
  margin: 2.5em 0;
  width: 100%;
}

.ds-single__body ul, 
.ds-single__body ol { 
  padding-left: 1.5em; 
  margin-bottom: 1.6em;
}
.ds-single__body li {
  margin-bottom: 0.6em;
}

/* ==========================================================================
   4. Structural Engagement Footer Section Layout
   ========================================================================== */
.ds-single__foot {
  max-width: 840px; 
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.ds-single__share {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--ds-border, rgba(255, 255, 255, 0.08));
}

.ds-single__share-label { 
  color: var(--ds-text-mute, #706f75); 
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.ds-single__share-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ds-single__share-link,
.ds-single__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 99px;
  background: var(--ds-surface, #13131a);
  border: 1px solid var(--ds-border, rgba(255, 255, 255, 0.08));
  color: var(--ds-text, #f5f3ee);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ds-single__share-link:hover,
.ds-single__copy-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.ds-single__copy-btn.is-copied { 
  background: #10b981; 
  color: #060608; 
  border-color: transparent; 
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Premium Dynamic Contextual Conversion Card Module */
.ds-single__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(24px, 5vw, 40px);
  background: linear-gradient(135deg, #13131a 0%, #1a1a24 100%);
  border: 1px solid rgba(180, 140, 90, 0.15);
  border-radius: var(--ds-radius, 16px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  width: 100%;
}

.ds-single__cta-content h3 {
  color: #ffffff;
  font-family: var(--ds-font-display, serif);
  font-weight: 500;
  font-size: clamp(22px, 3vw, 26px);
  margin: 0 0 8px;
}
.ds-single__cta-content p { 
  margin: 0; 
  color: var(--ds-text-dim, #a09fa5); 
  font-size: 15px; 
  line-height: 1.55;
}

/* Updated Action Button State Colors */
.ds-btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: #ffffff; /* Changed color to crisp white */
  color: #000000;    /* Changed text label color to pure black */
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.12); /* Cleaned up drop shadow luminosity */
}
.ds-btn--primary:hover {
  background: #f0f0f0; /* Soft off-white look on hover transitions */
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Responsive Adaptive Viewports Media Breaks Layout Corrections */
@media (max-width: 768px) {
  .ds-single__cta { 
    flex-direction: column; 
    align-items: stretch; 
    text-align: center;
    gap: 24px;
  }
  .ds-single__share-group {
    width: 100%;
  }
  .ds-single__share-link,
  .ds-single__copy-btn {
    flex: 1;
    justify-content: center;
    min-width: 130px;
  }
}