/* ==========================================================================
   DS REFINEMENT PROJECT — SCOPED STYLES (project-ds.html)
   ========================================================================== */

/* --- ACCENT OVERRIDE --- */
:root {
    --ds-green: #32FC9C;
    --ds-green20: rgba(50, 252, 156, 0.2);
    --ds-green10: rgba(50, 252, 156, 0.1);
    --ds-green05: rgba(50, 252, 156, 0.05);
    --ds-orange: #FF662E;
    --ds-surface: #181818;
    --ds-border: rgba(255, 255, 255, 0.07);
    --ds-text-muted: rgba(255, 247, 237, 0.45);
    --ds-text-dim: rgba(255, 247, 237, 0.25);
    --ds-cream: #fff7ed;
}

/* ---- HERO RIGHT CONTEXT BOX ---- */
.ds-context-box {
    background: #191919;
    border: 0.5px solid var(--ds-border);
    border-radius: 16px;
    padding: 24px;
}

.ds-ctx-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ds-text-dim);
    margin-bottom: 12px;
    font-family: var(--font-mono, monospace);
}

.ds-ctx-para {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ds-text-muted);
}

.ds-ctx-para strong {
    color: var(--ds-cream);
    font-weight: 500;
}

.ds-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.ds-tag {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 0.5px solid;
}

.ds-tag-g {
    border-color: rgba(50, 252, 156, 0.3);
    color: rgba(50, 252, 156, 0.8);
}

.ds-tag-o {
    border-color: rgba(255, 102, 46, 0.3);
    color: rgba(255, 102, 46, 0.8);
}

.ds-tag-w {
    border-color: rgba(255, 247, 237, 0.15);
    color: rgba(255, 247, 237, 0.4);
}

/* NDA eyebrow badge */
.ds-nda-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--ds-green);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 500;
}

.ds-nda-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ds-green);
    flex-shrink: 0;
}

/* ---- PROBLEM GRID (Context section) ---- */
.ds-prob-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
    padding: 24px 0 24px;
}

.ds-prob-card {
    background: var(--ds-surface);
    border-radius: 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    padding: 20px;
}

.ds-prob-card.bad {
    border-left: 2px solid var(--ds-orange);
}

.ds-prob-card.good {
    border-left: 2px solid var(--ds-green);

}

.ds-pl {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 12px;
}

.ds-prob-card.bad .ds-pl {
    color: var(--ds-orange);
}

.ds-prob-card.good .ds-pl {
    color: var(--ds-green);
}

.ds-plist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ds-plist li {
    font-size: 16px;
    color: var(--secondary-cream);
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
}

.ds-plist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.ds-prob-card.bad .ds-plist li::before {
    background: rgba(255, 102, 46, 0.5);
}

.ds-prob-card.good .ds-plist li::before {
    background: rgba(50, 252, 156, 0.5);
}

/* Stats row */
.ds-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ds-sbox {
    background: var(--ds-surface);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 20px 12px;
    text-align: center;
}

.ds-snum {
    font-size: 30px;
    font-weight: 600;
    color: var(--secondary-cream);
}

.ds-snum .ds-acc {
    color: var(--ds-orange);
}

.ds-sdesc {
    font-size: 14px;
    color: var(--secondary-cream);
    margin-top: 6px;
}

/* ---- TOKEN ARCHITECTURE ---- */
.ds-token-box {
    margin-top: 24px;
    background: var(--surface-card);
    border-radius: 14px;
    border: 1px solid var(--border-light);
    padding: 24px;
}

.ds-tok-desc {
    font-size: 16px;
    color: var(--secondary-cream);
    line-height: 1.7;
    margin-bottom: 24px;
}

.ds-tok-arch {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ds-tok-col {
    flex: 1;
}

.ds-tok-hd {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary-cream);
    margin-bottom: 10px;
    padding: 0 4px;
    font-family: var(--font-mono, monospace);
}

.ds-tok-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ds-tok-chip {
    font-size: 11px;
    padding: 7px 12px;
    border-radius: 6px;
    border: 0.5px solid;
    font-family: var(--font-mono, monospace);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-tok-p {
    border-color: var(--border-orange);
    color: var(--ds-orange);
    background: var(--bg-orange-weakest);
}

.ds-tok-s {
    border-color: var(--border-green);
    color: var(--ds-green);
    background: var(--bg-green-weakest);
}

.ds-tok-c {
    border-color: var(--border-orange);
    color: var(--ds-orange);
    background: rgba(255, 128, 81, 0.05);
}

.ds-tok-arr {
    color: rgba(255, 255, 255, 0.15);
    font-size: 20px;
    margin-top: 42px;
    flex-shrink: 0;
}

/* ---- COMPONENTS GRID ---- */
.ds-comp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 24px;
}

.ds-comp-card {
    background: var(--ds-surface);
    border-radius: 14px;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.ds-comp-header {
    padding: 14px 18px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ds-comp-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-cream);
}

.ds-badge {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
}

.ds-badge-new {
    background: var(--ds-green10);
    color: rgba(50, 252, 156, 0.85);
    border: 0.5px solid rgba(50, 252, 156, 0.25);
}

.ds-badge-imp {
    background: rgba(255, 128, 81, 0.1);
    color: rgba(255, 128, 81, 0.85);
    border: 0.5px solid rgba(255, 128, 81, 0.25);
}

.ds-comp-body {
    padding: 16px 18px;
}

.ds-states {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ds-ubtn {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    border: 0.5px solid;
    cursor: default;
}

.ds-btn-brand-pri {
    background: var(--fg-brand-default);
    border-color: var(--fg-brand-default);
    color: var(--fg-neutral-strongest);
}

.ds-btn-brand-sec {
    background: transparent;
    border-color: var(--fg-brand-default);
    color: var(--fg-brand-default);
}

.ds-btn-brand-ter {
    background: transparent;
    border-color: transparent;
    color: var(--fg-brand-default);
}

.ds-btn-brand-dis {
    background: var(--bg-neutral-strong);
    border-color: var(--border-neutral-default);
    color: var(--fg-neutral-weak);
    opacity: 0.6;
}

.ds-comp-note {
    font-size: 14px;
    color: var(--secondary-cream);
    margin-top: 10px;
}

/* Input states */
.ds-input {
    display: block;
    width: 100%;
    background: #111;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: rgba(255, 247, 237, 0.4);
    margin-bottom: 6px;
    font-family: inherit;
}

.ds-input.focused {
    border-color: rgba(128, 189, 255, 1);
    color: rgb(155, 155, 155);
}

.ds-input.error {
    border-color: rgba(255, 102, 46, 0.4);
    color: rgba(255, 102, 46, 0.7);
}

/* Data table preview */
.ds-table {
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
}

.ds-table-head {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 8px 14px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    font-size: 10px;
    color: var(--ds-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ds-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 8px 14px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
}

.ds-table-row:last-child {
    border-bottom: none;
}

.ds-cell-muted {
    color: rgba(255, 247, 237, 0.45);
}

.ds-cell-dim {
    color: rgba(255, 247, 237, 0.3);
}

.ds-cell-green {
    color: rgba(50, 252, 156, 0.75);
}

.ds-cell-orange {
    color: rgba(255, 102, 46, 0.7);
}

/* Summary metric block */
.ds-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ds-metric-cell {
    background: #111;
    border-radius: 8px;
    padding: 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
}

.ds-metric-label {
    font-size: 10px;
    color: var(--ds-text-dim);
    margin-bottom: 6px;
}

.ds-metric-val-bar {
    height: 18px;
    border-radius: 4px;
    background: rgba(255, 247, 237, 0.06);
    width: 70%;
}

.ds-metric-val-bar.green {
    background: rgba(50, 252, 156, 0.08);
    width: 55%;
}

/* ---- MOCKUP SCREENS ---- */
.ds-mockup-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    align-items: start;
}

.ds-mockup-text {
    font-size: 16px;
    color: var(--secondary-cream);
    line-height: 1.7;
}

.ds-mockup-text strong {
    color: var(--ds-cream);
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.ds-nda-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px 14px;
    color: rgba(255, 247, 237, 0.35);
    margin-top: 14px;
}

.ds-nda-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 128, 81, 0.6);
}

.ds-screens-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    align-items: start;
}


.ds-screen {
    background: var(--ds-surface);
    border-radius: 14px;
    border: 0.5px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.ds-screen-bar {
    background: #1f1f1f;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
}

.ds-screen-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.ds-screen-title {
    font-size: 10px;
    color: var(--ds-text-dim);
    margin-left: 4px;
    font-family: var(--font-mono, monospace);
}

.ds-screen-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ds-sk {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.ds-sk.w90 {
    width: 90%;
}

.ds-sk.w70 {
    width: 70%;
}

.ds-sk.w50 {
    width: 50%;
}

.ds-sk.w35 {
    width: 35%;
}

.ds-sk-panel {
    border-radius: 8px;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.ds-sk-inner {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ds-sk-blur {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-sk-lbl {
    font-size: 9px;
    color: rgba(255, 247, 237, 0.3);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2px 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ds-screen-caption {
    font-size: 11px;
    color: var(--ds-text-dim);
    padding: 0 14px 14px;
    line-height: 1.5;
}

/* Dashboard mockup specifics */
.ds-dash-content {
    padding: 14px;
}

.ds-dash-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.ds-d-card {
    background: rgba(255, 255, 255, 0.03);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    padding: 10px;
}

.ds-d-label {
    font-size: 9px;
    color: var(--ds-text-dim);
    margin-bottom: 5px;
}

.ds-d-val {
    height: 16px;
    border-radius: 3px;
    background: rgba(255, 247, 237, 0.06);
    width: 60%;
}

.ds-d-chart {
    height: 48px;
    background: rgba(255, 255, 255, 0.02);
    border: 0.5px solid rgba(255, 255, 255, 0.05);
    border-radius: 7px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-d-table-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.04);
}

.ds-d-table-row:last-child {
    border-bottom: none;
}

.ds-d-cell {
    font-size: 9px;
    background: rgba(255, 247, 237, 0.04);
    border-radius: 2px;
    width: 30%;
    height: 8px;
}

/* ---- FILE STRUCTURE ---- */
.ds-ftree-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.ds-ftree-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 10px;
}

.ds-ftree-label.bad-l {
    color: var(--ds-orange);
}

.ds-ftree-label.good-l {
    color: var(--ds-green);
}

.ds-tree {
    background: #111;
    border-radius: 10px;
    border: 0.5px solid rgba(255, 255, 255, 0.07);
    padding: 16px 18px;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
}

.ds-tl {
    padding: 3px 0;
    color: rgba(255, 247, 237, 0.35);
    display: flex;
    gap: 6px;
    align-items: center;
}

.ds-tl.file {
    color: rgba(255, 247, 237, 0.65);
    font-weight: 500;
}

.ds-tl.green {
    color: var(--ds-green);
}

.ds-ti {
    margin-left: 16px;
}

/* ---- RESULT METRICS ---- */
.ds-res-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.ds-rbox {
    background: var(--ds-surface);
    border-radius: 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    padding: 20px;
}

.ds-rl {
    font-size: 11px;
    color: var(--ds-text-dim);
    margin-bottom: 8px;
}

.ds-rv {
    font-size: 22px;
    font-weight: 600;
    color: var(--ds-cream);
}

.ds-rbar {
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 14px;
}

.ds-rfill {
    height: 100%;
    border-radius: 2px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {

    .ds-prob-grid,
    .ds-comp-grid,
    .ds-mockup-intro,
    .ds-ftree-wrap,
    .ds-res-grid {
        grid-template-columns: 1fr;
    }

    .ds-screens-grid {
        grid-template-columns: 1fr;
    }

    .ds-tok-arch {
        flex-direction: column;
    }

    .ds-tok-arr {
        transform: rotate(90deg);
        margin: 0 auto;
    }

    .ds-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ds-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ================================================================
   DS HERO (project-specific hero, stands apart from strike-hero)
   ================================================================ */
.ds-hero {
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 80px 0 0;
}

/* Override hero-right for DS page — make it equal width, not shrink */
.ds-hero .hero-right {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.ds-hero .hero-right .ds-context-box {
    width: 100%;
}

/* ================================================================
   SECTION TITLE GROUP — label + big title
   ================================================================ */
.section-title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
    margin-top: 0;
}

.section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ds-green);
    font-weight: 600;
    font-family: var(--font-mono, monospace);
}

/* Override the global section-title for DS sections — use cream not orange */
.ds-hero~nav~main .content-section .section-title,
.case-content .section-title-group+.section-title,
.section-title-group~h2.section-title {
    color: var(--ds-cream, #fff7ed);
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 600;
    margin: 0 0 0;
}

/* Target h2 inside section-title-group directly */
.section-title-group h2 {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 600;
    color: var(--secondary-cream, #fff7ed);
    margin: 0;
    line-height: 1.2;
}

/* ================================================================
   SECTION DIVIDER
   ================================================================ */
.section-divider {
    width: 100%;
    height: 0.5px;
    background: rgba(255, 255, 255, 0.06);
    margin: 16px 0 48px;
}

/* ================================================================
   BADGE — Rebuilt variant (orange-ish, differentiates from New)
   ================================================================ */
.ds-badge-rebuilt {
    background: rgba(255, 128, 81, 0.1);
    color: rgba(255, 128, 81, 0.85);
    border: 0.5px solid rgba(255, 128, 81, 0.25);
}

/* ================================================================
   DS CONTENT SECTION — remove default bottom margin, add padding-top
   ================================================================ */
.case-content .content-section {
    margin-bottom: 0;
    padding: 48px 0 32px;
}

/* ================================================================
   DS SK — add missing .w60 width
   ================================================================ */
.ds-sk.w60 {
    width: 60%;
}