/* ===== Layout: long-form reading ===== */
.blog-container {
    max-width: 760px;
}

.post-content {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.post-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.5rem; }
.post-content h3 { margin-top: 2rem; margin-bottom: .75rem; font-size: 1.25rem; }
.post-content p  { margin-bottom: 1.25rem; }

.post-content img,
.post-content svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
}

.post-content blockquote {
    border-left: 3px solid var(--bs-border-color);
    padding-left: 1rem;
    color: var(--bs-secondary-color);
}

.post-content table {
    width: 100%;
    margin-bottom: 1.25rem;
    border-collapse: collapse;
}
.post-content th,
.post-content td {
    border: 1px solid var(--bs-border-color);
    padding: .5rem .75rem;
}

/* ===== Code ===== */
.post-content code {
    font-size: .9em;
}
.post-content :not(pre) > code {
    background: var(--bs-tertiary-bg);
    padding: .15em .35em;
    border-radius: .25rem;
}
.post-content .codehilite {
    border-radius: .5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    background: var(--bs-tertiary-bg);
}
.post-content .codehilite pre { margin: 0; background: transparent; }

/* Pygments token colors: xem INTEGRATION.md — output của pygmentize
   (light + dark) được append vào cuối file này. */

/* ===== Sequence diagram theme variables =====
   Áp dụng khi SVG được nhúng inline vào nội dung bài viết.
   Khi dùng qua <img>, SVG tự fallback bằng prefers-color-scheme. */
[data-bs-theme="light"] .sso-seq {
    --sq-line: #5F5E5A;
    --sq-text: #444441;
    --sq-purple-bg: #EEEDFE; --sq-purple-bd: #534AB7; --sq-purple-tx: #26215C;
    --sq-gray-bg:   #F1EFE8; --sq-gray-bd:   #5F5E5A; --sq-gray-tx:   #2C2C2A;
    --sq-teal-bg:   #E1F5EE; --sq-teal-bd:   #0F6E56; --sq-teal-tx:   #04342C;
    --sq-coral-bg:  #FAECE7; --sq-coral-bd:  #993C1D; --sq-coral-tx:  #4A1B0C;
}
[data-bs-theme="dark"] .sso-seq {
    --sq-line: #9c9a92;
    --sq-text: #c2c0b6;
    --sq-purple-bg: #26215C; --sq-purple-bd: #AFA9EC; --sq-purple-tx: #CECBF6;
    --sq-gray-bg:   #2C2C2A; --sq-gray-bd:   #B4B2A9; --sq-gray-tx:   #D3D1C7;
    --sq-teal-bg:   #04342C; --sq-teal-bd:   #5DCAA5; --sq-teal-tx:   #9FE1CB;
    --sq-coral-bg:  #4A1B0C; --sq-coral-bd:  #F0997B; --sq-coral-tx:  #F5C4B3;
}


pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
[data-bs-theme=light] .codehilite .hll { background-color: #ffffcc }
[data-bs-theme=light] .codehilite { background: #f8f8f8; }
[data-bs-theme=light] .codehilite .c { color: #3D7B7B; font-style: italic } /* Comment */
[data-bs-theme=light] .codehilite .err { border: 1px solid #F00 } /* Error */
[data-bs-theme=light] .codehilite .k { color: #008000; font-weight: bold } /* Keyword */
[data-bs-theme=light] .codehilite .o { color: #666 } /* Operator */
[data-bs-theme=light] .codehilite .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
[data-bs-theme=light] .codehilite .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
[data-bs-theme=light] .codehilite .cp { color: #9C6500 } /* Comment.Preproc */
[data-bs-theme=light] .codehilite .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
[data-bs-theme=light] .codehilite .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
[data-bs-theme=light] .codehilite .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
[data-bs-theme=light] .codehilite .gd { color: #A00000 } /* Generic.Deleted */
[data-bs-theme=light] .codehilite .ge { font-style: italic } /* Generic.Emph */
[data-bs-theme=light] .codehilite .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
[data-bs-theme=light] .codehilite .gr { color: #E40000 } /* Generic.Error */
[data-bs-theme=light] .codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
[data-bs-theme=light] .codehilite .gi { color: #008400 } /* Generic.Inserted */
[data-bs-theme=light] .codehilite .go { color: #717171 } /* Generic.Output */
[data-bs-theme=light] .codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
[data-bs-theme=light] .codehilite .gs { font-weight: bold } /* Generic.Strong */
[data-bs-theme=light] .codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
[data-bs-theme=light] .codehilite .gt { color: #04D } /* Generic.Traceback */
[data-bs-theme=light] .codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
[data-bs-theme=light] .codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
[data-bs-theme=light] .codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
[data-bs-theme=light] .codehilite .kp { color: #008000 } /* Keyword.Pseudo */
[data-bs-theme=light] .codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
[data-bs-theme=light] .codehilite .kt { color: #B00040 } /* Keyword.Type */
[data-bs-theme=light] .codehilite .m { color: #666 } /* Literal.Number */
[data-bs-theme=light] .codehilite .s { color: #BA2121 } /* Literal.String */
[data-bs-theme=light] .codehilite .na { color: #687822 } /* Name.Attribute */
[data-bs-theme=light] .codehilite .nb { color: #008000 } /* Name.Builtin */
[data-bs-theme=light] .codehilite .nc { color: #00F; font-weight: bold } /* Name.Class */
[data-bs-theme=light] .codehilite .no { color: #800 } /* Name.Constant */
[data-bs-theme=light] .codehilite .nd { color: #A2F } /* Name.Decorator */
[data-bs-theme=light] .codehilite .ni { color: #717171; font-weight: bold } /* Name.Entity */
[data-bs-theme=light] .codehilite .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
[data-bs-theme=light] .codehilite .nf { color: #00F } /* Name.Function */
[data-bs-theme=light] .codehilite .nl { color: #767600 } /* Name.Label */
[data-bs-theme=light] .codehilite .nn { color: #00F; font-weight: bold } /* Name.Namespace */
[data-bs-theme=light] .codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
[data-bs-theme=light] .codehilite .nv { color: #19177C } /* Name.Variable */
[data-bs-theme=light] .codehilite .ow { color: #A2F; font-weight: bold } /* Operator.Word */
[data-bs-theme=light] .codehilite .w { color: #BBB } /* Text.Whitespace */
[data-bs-theme=light] .codehilite .mb { color: #666 } /* Literal.Number.Bin */
[data-bs-theme=light] .codehilite .mf { color: #666 } /* Literal.Number.Float */
[data-bs-theme=light] .codehilite .mh { color: #666 } /* Literal.Number.Hex */
[data-bs-theme=light] .codehilite .mi { color: #666 } /* Literal.Number.Integer */
[data-bs-theme=light] .codehilite .mo { color: #666 } /* Literal.Number.Oct */
[data-bs-theme=light] .codehilite .sa { color: #BA2121 } /* Literal.String.Affix */
[data-bs-theme=light] .codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
[data-bs-theme=light] .codehilite .sc { color: #BA2121 } /* Literal.String.Char */
[data-bs-theme=light] .codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */
[data-bs-theme=light] .codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
[data-bs-theme=light] .codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
[data-bs-theme=light] .codehilite .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
[data-bs-theme=light] .codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
[data-bs-theme=light] .codehilite .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
[data-bs-theme=light] .codehilite .sx { color: #008000 } /* Literal.String.Other */
[data-bs-theme=light] .codehilite .sr { color: #A45A77 } /* Literal.String.Regex */
[data-bs-theme=light] .codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
[data-bs-theme=light] .codehilite .ss { color: #19177C } /* Literal.String.Symbol */
[data-bs-theme=light] .codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
[data-bs-theme=light] .codehilite .fm { color: #00F } /* Name.Function.Magic */
[data-bs-theme=light] .codehilite .vc { color: #19177C } /* Name.Variable.Class */
[data-bs-theme=light] .codehilite .vg { color: #19177C } /* Name.Variable.Global */
[data-bs-theme=light] .codehilite .vi { color: #19177C } /* Name.Variable.Instance */
[data-bs-theme=light] .codehilite .vm { color: #19177C } /* Name.Variable.Magic */
[data-bs-theme=light] .codehilite .il { color: #666 } /* Literal.Number.Integer.Long */
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
[data-bs-theme=dark] .codehilite .hll { background-color: #49483e }
[data-bs-theme=dark] .codehilite { background: #272822; color: #F8F8F2 }
[data-bs-theme=dark] .codehilite .c { color: #959077 } /* Comment */
[data-bs-theme=dark] .codehilite .err { color: #ED007E; background-color: #1E0010 } /* Error */
[data-bs-theme=dark] .codehilite .esc { color: #F8F8F2 } /* Escape */
[data-bs-theme=dark] .codehilite .g { color: #F8F8F2 } /* Generic */
[data-bs-theme=dark] .codehilite .k { color: #66D9EF } /* Keyword */
[data-bs-theme=dark] .codehilite .l { color: #AE81FF } /* Literal */
[data-bs-theme=dark] .codehilite .n { color: #F8F8F2 } /* Name */
[data-bs-theme=dark] .codehilite .o { color: #FF4689 } /* Operator */
[data-bs-theme=dark] .codehilite .x { color: #F8F8F2 } /* Other */
[data-bs-theme=dark] .codehilite .p { color: #F8F8F2 } /* Punctuation */
[data-bs-theme=dark] .codehilite .ch { color: #959077 } /* Comment.Hashbang */
[data-bs-theme=dark] .codehilite .cm { color: #959077 } /* Comment.Multiline */
[data-bs-theme=dark] .codehilite .cp { color: #959077 } /* Comment.Preproc */
[data-bs-theme=dark] .codehilite .cpf { color: #959077 } /* Comment.PreprocFile */
[data-bs-theme=dark] .codehilite .c1 { color: #959077 } /* Comment.Single */
[data-bs-theme=dark] .codehilite .cs { color: #959077 } /* Comment.Special */
[data-bs-theme=dark] .codehilite .gd { color: #FF4689 } /* Generic.Deleted */
[data-bs-theme=dark] .codehilite .ge { color: #F8F8F2; font-style: italic } /* Generic.Emph */
[data-bs-theme=dark] .codehilite .ges { color: #F8F8F2; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
[data-bs-theme=dark] .codehilite .gr { color: #F8F8F2 } /* Generic.Error */
[data-bs-theme=dark] .codehilite .gh { color: #F8F8F2 } /* Generic.Heading */
[data-bs-theme=dark] .codehilite .gi { color: #A6E22E } /* Generic.Inserted */
[data-bs-theme=dark] .codehilite .go { color: #66D9EF } /* Generic.Output */
[data-bs-theme=dark] .codehilite .gp { color: #FF4689; font-weight: bold } /* Generic.Prompt */
[data-bs-theme=dark] .codehilite .gs { color: #F8F8F2; font-weight: bold } /* Generic.Strong */
[data-bs-theme=dark] .codehilite .gu { color: #959077 } /* Generic.Subheading */
[data-bs-theme=dark] .codehilite .gt { color: #F8F8F2 } /* Generic.Traceback */
[data-bs-theme=dark] .codehilite .kc { color: #66D9EF } /* Keyword.Constant */
[data-bs-theme=dark] .codehilite .kd { color: #66D9EF } /* Keyword.Declaration */
[data-bs-theme=dark] .codehilite .kn { color: #FF4689 } /* Keyword.Namespace */
[data-bs-theme=dark] .codehilite .kp { color: #66D9EF } /* Keyword.Pseudo */
[data-bs-theme=dark] .codehilite .kr { color: #66D9EF } /* Keyword.Reserved */
[data-bs-theme=dark] .codehilite .kt { color: #66D9EF } /* Keyword.Type */
[data-bs-theme=dark] .codehilite .ld { color: #E6DB74 } /* Literal.Date */
[data-bs-theme=dark] .codehilite .m { color: #AE81FF } /* Literal.Number */
[data-bs-theme=dark] .codehilite .s { color: #E6DB74 } /* Literal.String */
[data-bs-theme=dark] .codehilite .na { color: #A6E22E } /* Name.Attribute */
[data-bs-theme=dark] .codehilite .nb { color: #F8F8F2 } /* Name.Builtin */
[data-bs-theme=dark] .codehilite .nc { color: #A6E22E } /* Name.Class */
[data-bs-theme=dark] .codehilite .no { color: #66D9EF } /* Name.Constant */
[data-bs-theme=dark] .codehilite .nd { color: #A6E22E } /* Name.Decorator */
[data-bs-theme=dark] .codehilite .ni { color: #F8F8F2 } /* Name.Entity */
[data-bs-theme=dark] .codehilite .ne { color: #A6E22E } /* Name.Exception */
[data-bs-theme=dark] .codehilite .nf { color: #A6E22E } /* Name.Function */
[data-bs-theme=dark] .codehilite .nl { color: #F8F8F2 } /* Name.Label */
[data-bs-theme=dark] .codehilite .nn { color: #F8F8F2 } /* Name.Namespace */
[data-bs-theme=dark] .codehilite .nx { color: #A6E22E } /* Name.Other */
[data-bs-theme=dark] .codehilite .py { color: #F8F8F2 } /* Name.Property */
[data-bs-theme=dark] .codehilite .nt { color: #FF4689 } /* Name.Tag */
[data-bs-theme=dark] .codehilite .nv { color: #F8F8F2 } /* Name.Variable */
[data-bs-theme=dark] .codehilite .ow { color: #FF4689 } /* Operator.Word */
[data-bs-theme=dark] .codehilite .pm { color: #F8F8F2 } /* Punctuation.Marker */
[data-bs-theme=dark] .codehilite .w { color: #F8F8F2 } /* Text.Whitespace */
[data-bs-theme=dark] .codehilite .mb { color: #AE81FF } /* Literal.Number.Bin */
[data-bs-theme=dark] .codehilite .mf { color: #AE81FF } /* Literal.Number.Float */
[data-bs-theme=dark] .codehilite .mh { color: #AE81FF } /* Literal.Number.Hex */
[data-bs-theme=dark] .codehilite .mi { color: #AE81FF } /* Literal.Number.Integer */
[data-bs-theme=dark] .codehilite .mo { color: #AE81FF } /* Literal.Number.Oct */
[data-bs-theme=dark] .codehilite .sa { color: #E6DB74 } /* Literal.String.Affix */
[data-bs-theme=dark] .codehilite .sb { color: #E6DB74 } /* Literal.String.Backtick */
[data-bs-theme=dark] .codehilite .sc { color: #E6DB74 } /* Literal.String.Char */
[data-bs-theme=dark] .codehilite .dl { color: #E6DB74 } /* Literal.String.Delimiter */
[data-bs-theme=dark] .codehilite .sd { color: #E6DB74 } /* Literal.String.Doc */
[data-bs-theme=dark] .codehilite .s2 { color: #E6DB74 } /* Literal.String.Double */
[data-bs-theme=dark] .codehilite .se { color: #AE81FF } /* Literal.String.Escape */
[data-bs-theme=dark] .codehilite .sh { color: #E6DB74 } /* Literal.String.Heredoc */
[data-bs-theme=dark] .codehilite .si { color: #E6DB74 } /* Literal.String.Interpol */
[data-bs-theme=dark] .codehilite .sx { color: #E6DB74 } /* Literal.String.Other */
[data-bs-theme=dark] .codehilite .sr { color: #E6DB74 } /* Literal.String.Regex */
[data-bs-theme=dark] .codehilite .s1 { color: #E6DB74 } /* Literal.String.Single */
[data-bs-theme=dark] .codehilite .ss { color: #E6DB74 } /* Literal.String.Symbol */
[data-bs-theme=dark] .codehilite .bp { color: #F8F8F2 } /* Name.Builtin.Pseudo */
[data-bs-theme=dark] .codehilite .fm { color: #A6E22E } /* Name.Function.Magic */
[data-bs-theme=dark] .codehilite .vc { color: #F8F8F2 } /* Name.Variable.Class */
[data-bs-theme=dark] .codehilite .vg { color: #F8F8F2 } /* Name.Variable.Global */
[data-bs-theme=dark] .codehilite .vi { color: #F8F8F2 } /* Name.Variable.Instance */
[data-bs-theme=dark] .codehilite .vm { color: #F8F8F2 } /* Name.Variable.Magic */
[data-bs-theme=dark] .codehilite .il { color: #AE81FF } /* Literal.Number.Integer.Long */
