:root {
  --article-bg: #f7f7fb;
  --article-panel: #fff;
  --article-text: #25202e;
  --article-muted: #746e7f;
  --article-border: #e7e3ed;
  --article-primary: #7045b8;
  --article-soft: #f0eafa;
  --article-danger: #bd3e58;
  --article-shadow: 0 16px 45px rgba(43, 32, 69, .08);
}
[data-theme="dark"] { --article-bg:#121119;--article-panel:#1d1b27;--article-text:#f6f3fb;--article-muted:#aaa4b5;--article-border:#383241;--article-primary:#ad82ee;--article-soft:#302642;--article-shadow:none; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--article-text); background: var(--article-bg); font-family: "Cairo", sans-serif; }
button, textarea { font-family: inherit; }
.article-shell { width: min(980px, calc(100% - 34px)); min-height: 70vh; margin: 0 auto; padding: 54px 0 80px; }
.article-state { padding: 75px 20px; border: 1px dashed var(--article-border); border-radius: 18px; color: var(--article-muted); background: var(--article-panel); text-align: center; }
.article-page { padding: clamp(23px, 5vw, 58px); border: 1px solid var(--article-border); border-radius: 23px; background: var(--article-panel); box-shadow: var(--article-shadow); }
.article-back { color: var(--article-primary); text-decoration: none; font-size: 13.2px; font-weight: 800; }
.article-header { max-width: 790px; margin: 42px auto 34px; text-align: center; }
.article-category { display: inline-block; padding: 5px 12px; border-radius: 20px; color: var(--article-primary); background: var(--article-soft); font-size: 12px; font-weight: 800; }
.article-header h1 { margin: 17px 0 15px; font-size: clamp(29px, 6vw, 48px); line-height: 1.5; }
.article-excerpt { margin: 0; color: var(--article-muted); font-size: 18px; line-height: 2; }
.article-meta { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; color: var(--article-muted); font-size: 12px; }
.article-cover { height: clamp(280px, 52vw, 520px); margin: 0 0 42px; border-radius: 18px; background: linear-gradient(135deg,#342247,#8254c7) center/cover no-repeat; }
.article-cover { overflow: hidden; }
.article-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.article-cover[hidden], .article-cover img[hidden], .article-related[hidden], .article-related-card img[hidden] { display: none; }
.article-body a { color: var(--article-primary); text-underline-offset: 4px; overflow-wrap: anywhere; }
.article-related { margin-top: 45px; padding-top: 25px; border-top: 1px solid var(--article-border); }
.article-related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.article-related-card { min-width: 0; overflow: hidden; border: 1px solid var(--article-border); border-radius: 14px; color: var(--article-text); text-decoration: none; }
.article-related-card img { width: 100%; height: 145px; object-fit: cover; display: block; }
.article-related-card h3 { margin: 14px; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.article-related-card:focus-visible { outline: 3px solid var(--article-primary); outline-offset: 3px; }
@media (max-width: 720px) { .article-related-grid { grid-template-columns: 1fr; } .article-related-card img { height: 190px; } }
.article-layout { display: grid; grid-template-columns: 68px minmax(0, 720px); justify-content: center; gap: 28px; }
.article-share-rail { position: sticky; top: 95px; height: fit-content; display: grid; gap: 9px; }
.article-share-rail button { min-height: 64px; padding: 8px 4px; display: grid; place-items: center; border: 1px solid var(--article-border); border-radius: 12px; color: var(--article-muted); background: var(--article-panel); cursor: pointer; }
.article-share-rail span { color: var(--article-primary); font-size: 24px; }.article-share-rail b { font-size: 12px; }.article-share-rail small { font-size: 9.6px; }
.article-share-rail button.active { color: var(--article-primary); border-color: var(--article-primary); background: var(--article-soft); }
.article-body { font-size: 18px; line-height: 2.15; }
.article-body p { margin: 0 0 22px; color: var(--article-muted); }
.article-body h2 { margin: 43px 0 15px; font-size: 30px; line-height: 1.6; }
.article-body h3 { margin: 31px 0 12px; color: var(--article-primary); font-size: 22.8px; }
.article-body ul { margin: 0 0 24px; padding-right: 24px; color: var(--article-muted); }
.article-body li { margin-bottom: 7px; }.article-body li::marker { color: var(--article-primary); }
.article-tags { margin-top: 38px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--article-border); }
.article-tags span { padding: 5px 10px; border-radius: 20px; color: var(--article-primary); background: var(--article-soft); font-size: 10.8px; font-weight: 700; }
.article-actions-mobile { display: none; margin-top: 22px; gap: 8px; }
.article-actions-mobile button { flex: 1; min-height: 43px; border: 1px solid var(--article-border); border-radius: 10px; color: var(--article-text); background: var(--article-panel); font-weight: 700; }
.comments-section { max-width: 790px; margin: 60px auto 0; padding-top: 35px; border-top: 1px solid var(--article-border); }
.comments-heading { display: flex; align-items: end; justify-content: space-between; }.comments-heading span { color: var(--article-primary); font-size: 12px; font-weight: 800; }.comments-heading h2 { margin: 2px 0; font-size: 30px; }.comments-heading > b { color: var(--article-muted); font-size: 14.4px; }
.comment-form { margin: 20px 0 28px; padding: 17px; border-radius: 14px; background: var(--article-soft); }
.comment-form label { display: block; margin-bottom: 8px; font-size: 13.2px; font-weight: 800; }
.comment-form textarea { width: 100%; resize: vertical; padding: 12px; border: 1px solid var(--article-border); border-radius: 10px; outline: none; color: var(--article-text); background: var(--article-panel); font-size: 14.4px; line-height: 1.9; }
.comment-form > div { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }.comment-form small { color: var(--article-muted); font-size: 10.8px; }.comment-form button { padding: 9px 17px; border: 0; border-radius: 9px; color: #fff; background: var(--article-primary); font-size: 12px; font-weight: 800; cursor: pointer; }
.comments-list { display: grid; gap: 11px; }
.comment-item { padding: 15px; border: 1px solid var(--article-border); border-radius: 13px; }
.comment-user { display: flex; align-items: center; gap: 9px; }.comment-avatar { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--article-primary); font-weight: 800; }.comment-user strong { display: block; font-size: 13.2px; }.comment-user small { color: var(--article-muted); font-size: 9.6px; }
.comment-item p { margin: 11px 0 0; color: var(--article-muted); white-space: pre-wrap; font-size: 13.2px; line-height: 2; }
.comment-delete { margin-right: auto; border: 0; color: var(--article-danger); background: transparent; font-size: 10.8px; cursor: pointer; }
.comment-empty { padding: 30px; border: 1px dashed var(--article-border); border-radius: 12px; color: var(--article-muted); text-align: center; font-size: 13.2px; }
.article-toast { position: fixed; z-index: 3000; right: 50%; bottom: 24px; padding: 11px 18px; border-radius: 10px; color: #fff; background: #21192d; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(50%, 14px); transition: .2s; }.article-toast.show { opacity: 1; transform: translate(50%, 0); }
.article-confirm{position:fixed;inset:0;z-index:2900;display:none;place-items:center;padding:20px}.article-confirm.open{display:grid}.article-confirm-backdrop{position:absolute;inset:0;background:rgba(12,10,22,.62);backdrop-filter:blur(3px)}.article-confirm-dialog{position:relative;z-index:1;width:min(460px,100%);padding:24px;border-radius:18px;background:var(--card-bg,#fff);box-shadow:0 24px 70px rgba(0,0,0,.25);display:grid;gap:12px}.article-confirm-dialog>button{position:absolute;top:12px;left:12px;width:32px;height:32px;border:0;border-radius:50%;background:rgba(120,100,160,.12);font-size:22px;cursor:pointer}.article-confirm-dialog p{margin:0;color:var(--primary,#6c5ce7);font-weight:800;font-size:13px}.article-confirm-dialog h2{margin:0;font-size:22px}.article-confirm-dialog span{color:var(--text-secondary,#636e72);font-size:14px;line-height:1.8}.article-confirm-dialog div{display:flex;justify-content:flex-end;gap:8px}.article-confirm-cancel,.article-confirm-danger{border:0;border-radius:10px;padding:10px 16px;font:700 13px "Cairo";cursor:pointer}.article-confirm-cancel{background:rgba(120,100,160,.12);color:inherit}.article-confirm-danger{background:#c43e56;color:#fff}
@media (max-width: 720px) { .article-shell { width: min(100% - 20px, 980px); padding-top: 18px; }.article-page { padding: 21px 16px; }.article-header { margin-top: 30px; }.article-layout { display: block; }.article-share-rail { display: none; }.article-actions-mobile { display: flex; }.article-cover { margin-bottom: 28px; }.comment-form > div { align-items: stretch; flex-direction: column; }.comment-form button { width: 100%; } }
