/* ===========================================================
   Sanjay's Study Notes — shared stylesheet
   Theme matches the LibraryManagementSystem project (darkslateblue)
   =========================================================== */

:root {
    --brand: darkslateblue;
    --brand-light: #7b6fb0;
    --ink: #1f2330;
    --muted: #5b6070;
    --line: #e2e2ec;
    --bg: #f6f6fb;
    --card: #ffffff;
    --code-bg: #2b2b3a;
    --code-ink: #f2f2f7;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    margin: 0;
}

/* ---------- top bar ---------- */
.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    background: var(--brand);
    color: #fff;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.topbar a {
    color: #fff;
    text-decoration: none;
    opacity: .85;
    font-size: 15px;
}
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar .brand {
    font-weight: 700;
    font-size: 18px;
    margin-right: auto;
    opacity: 1;
}

/* ---------- layout ---------- */
.wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

h1 { color: var(--brand); font-size: 32px; margin: 8px 0 4px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 28px; }

h2 {
    color: var(--brand);
    font-size: 24px;
    margin: 44px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--line);
}
h3 { color: var(--ink); font-size: 19px; margin: 26px 0 8px; }

p { margin: 10px 0; }

/* ---------- code ---------- */
code {
    background: #ececf5;
    color: #4b3f8f;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: .92em;
}
pre {
    background: var(--code-bg);
    color: var(--code-ink);
    padding: 16px 18px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
pre code { background: none; color: inherit; padding: 0; }
.tok-tag { color: #ff9d7a; }
.tok-attr { color: #9ad0ff; }
.tok-str { color: #b7e58b; }
.tok-com { color: #7d829a; font-style: italic; }
.tok-sel { color: #ffd479; }
.tok-prop { color: #9ad0ff; }

/* ---------- callout boxes ---------- */
.box {
    border-radius: 10px;
    padding: 14px 18px;
    margin: 18px 0;
    border-left: 5px solid var(--brand);
    background: var(--card);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.box .box-title {
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.box.concept { border-left-color: var(--brand); }
.box.concept .box-title { color: var(--brand); }
.box.why { border-left-color: #2a9d6a; background: #f0faf4; }
.box.why .box-title { color: #1f7d52; }
.box.tip { border-left-color: #d9982a; background: #fdf7ea; }
.box.tip .box-title { color: #a9741a; }
.box.gotcha { border-left-color: #d64550; background: #fdf0f1; }
.box.gotcha .box-title { color: #b0323c; }

/* ---------- figure / diagrams ---------- */
figure {
    margin: 24px 0;
    text-align: center;
}
figure svg {
    max-width: 100%;
    height: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
}
figcaption {
    color: var(--muted);
    font-size: 14px;
    margin-top: 8px;
    font-style: italic;
}

/* ---------- tables inside notes ---------- */
table.ref {
    border-collapse: collapse;
    width: 100%;
    margin: 18px 0;
    font-size: 15px;
}
table.ref th, table.ref td {
    border: 1px solid var(--line);
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
}
table.ref th {
    background: var(--brand);
    color: #fff;
}
table.ref tr:nth-child(even) td { background: #f3f3fa; }

/* ---------- index cards ---------- */
.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 24px;
}
.card {
    flex: 1 1 240px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    transition: transform .12s ease, box-shadow .12s ease;
    display: block;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(75,63,143,.18);
    border-color: var(--brand-light);
}
.card .num {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 9px;
    text-align: center;
    line-height: 34px;
    font-weight: 700;
    margin-bottom: 10px;
}
.card h3 { margin: 6px 0; color: var(--brand); }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .status { font-size: 13px; color: #2a9d6a; font-weight: 600; margin-top: 8px; }
.card.soon { opacity: .55; }
.card.soon .status { color: var(--muted); }

/* ---------- misc ---------- */
kbd {
    background: #ececef;
    border: 1px solid #c8c8d0;
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 1px 7px;
    font-family: "Consolas", monospace;
    font-size: .85em;
}
.pill {
    display: inline-block;
    background: #ececf5;
    color: var(--brand);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin: 2px 0;
}
ul.tight li, ol.tight li { margin: 4px 0; }
hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* ===========================================================
   Roadmap timeline
   =========================================================== */
.progress-summary {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px 24px;
    margin: 24px 0 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.progress-summary .bar {
    height: 14px;
    background: #ececf5;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 8px;
}
.progress-summary .bar span {
    display: block;
    height: 100%;
    width: 17%;                 /* ~1.5 of 9 phases */
    background: linear-gradient(90deg, #2a9d6a, var(--brand));
    border-radius: 999px;
}
.progress-summary .meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
}

.stage-label {
    margin: 34px 0 6px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--brand-light);
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--line);
    border-radius: 3px;
}
.phase {
    position: relative;
    padding: 0 0 18px 62px;
    min-height: 46px;
}
.phase .dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    background: #fff;
    border: 3px solid var(--line);
    color: var(--muted);
    z-index: 1;
}
.phase.done .dot { background: #2a9d6a; border-color: #2a9d6a; color: #fff; }
.phase.current .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px rgba(75,63,143,.18); }

.phase .body {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.phase.current .body { border-color: var(--brand); border-left-width: 5px; }
.phase.done .body { opacity: .85; }
.phase.todo .body { opacity: .7; }
.phase .body h3 { margin: 0 0 4px; font-size: 18px; }
.phase.done .body h3 { color: #1f7d52; }
.phase.current .body h3 { color: var(--brand); }
.phase .learn { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.phase .gain { margin: 8px 0 0; font-size: 14px; }
.phase .gain b { color: var(--brand); }
.phase .tag {
    float: right;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.phase.done .tag { background: #e5f5ec; color: #1f7d52; }
.phase.current .tag { background: #ece9f7; color: var(--brand); }
.phase.todo .tag { background: #eee; color: #8a8fa3; }
