/* =====================================================================
   LikedWin — Medium sahnesi (lws--medium, mdm-*)
   Kabuk: organik-hit ohs-* + sahne-motor lws-* (önce yüklenir). Burada
   yalnız Medium'a özel görünümler: sade serif okuma sayfası (alkış balonu,
   yanıtlar çekmecesi, kaydet menüsü), yazar profili, istatistikler.
   Medium sayfası site temasının token'larıyla çizilir (açık/koyu uyumlu);
   imza yeşili koyu temada açılır. Gradyan YOK.
   ===================================================================== */

.lws--medium {
    --lws-brand: #242424;
    --lws-brand-ink: #fff;
    --lws-brand-soft: rgba(36, 36, 36, .08);
    --mdm-green: #1a8917;
    --mdm-views: #cfe6cb;
    --mdm-serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Times New Roman", serif;
    --mdm-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
:root[data-theme="dark"] .lws--medium { --lws-brand: #f2f2f2; --lws-brand-ink: #121212; --lws-brand-soft: rgba(242, 242, 242, .1); --mdm-green: #45b34f; --mdm-views: #2b4a2e; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .lws--medium { --lws-brand: #f2f2f2; --lws-brand-ink: #121212; --lws-brand-soft: rgba(242, 242, 242, .1); --mdm-green: #45b34f; --mdm-views: #2b4a2e; }
}

/* ---------- Ortak: görünüm + Medium penceresi ---------- */
.mdm-v { display: flex; flex-direction: column; gap: 12px; }
.mdm-v .ohs-search__top { justify-content: space-between; flex-wrap: nowrap; }
.mdm-v .ohs-search__top .ohs-who { min-width: 0; }
.mdm-v .ohs-who__txt { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mdm-v .ohs-visits { flex: 0 0 auto; }
.mdm-win {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--mdm-sans);
    overflow: hidden;
}
.mdm-top {
    display: flex; align-items: center; gap: 16px;
    flex: 0 0 auto;
    height: 46px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
}
.mdm-logo { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mdm-serif); font-size: 21px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; }
.mdm-logo i { font-size: 24px; }
.mdm-search { display: inline-flex; align-items: center; gap: 8px; width: 190px; height: 32px; padding: 0 14px; border-radius: 20px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.mdm-search i { font-size: 12px; }
.mdm-top__r { display: flex; align-items: center; gap: 18px; margin-left: auto; color: var(--muted); font-size: 15px; }
.mdm-write { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.mdm-me { width: 28px; height: 28px; border-radius: 50%; background: #c9a77c; }

.mdm-ava {
    display: inline-grid; place-items: center;
    flex: 0 0 auto;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #3c6e57;
    color: #fff;
    font-size: 12px; font-weight: 700;
    overflow: hidden;
}
.mdm-ava svg, .mdm-ava img { width: 100%; height: 100%; object-fit: cover; }
.mdm-ava--s { width: 26px; height: 26px; font-size: 10px; }
.mdm-ava--l { width: 76px; height: 76px; font-size: 26px; }
.mdm-ava--c2 { background: #b4654a; }
.mdm-ava--c3 { background: #5a6fa8; }
.mdm-pill {
    display: inline-flex; align-items: center; justify-content: center;
    height: 34px; padding: 0 18px;
    border: 1px solid var(--mdm-green);
    border-radius: 99px;
    background: var(--mdm-green);
    color: #fff;
    font-size: 13.5px; font-weight: 500;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, transform .15s ease;
}
.mdm-pill.is-press { transform: scale(.94); }
.mdm-plus { left: 0; top: 0; z-index: 6; color: var(--mdm-green); }

/* ---------- Yazı sayfası ---------- */
.mdm-page { flex: 1 1 auto; min-height: 0; padding: 22px 0 0; overflow: hidden; }
.mdm-col { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.mdm-title { margin: 0 0 6px; font-family: var(--mdm-sans); font-size: 27px; font-weight: 700; line-height: 1.18; letter-spacing: -.02em; color: var(--ink); }
.mdm-sub { margin: 0 0 14px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.mdm-by { display: flex; align-items: center; gap: 10px; }
.mdm-by__t { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.mdm-by__t b { font-weight: 500; }
.mdm-by__t em { font-style: normal; font-weight: 500; color: var(--mdm-green); }
.mdm-by__t small { font-size: 12.5px; color: var(--muted); }
.mdm-bar {
    position: relative;
    display: flex; align-items: center; gap: 22px;
    margin: 14px 0 16px;
    padding: 9px 4px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--muted);
}
.mdm-clap, .mdm-resp { position: relative; display: inline-flex; align-items: center; gap: 7px; }
.mdm-clap b, .mdm-resp b { font-weight: 400; font-variant-numeric: tabular-nums; }
.mdm-clap__ico { position: relative; display: inline-grid; place-items: center; font-size: 18px; transition: color .2s ease, transform .15s ease; }
.mdm-clap.is-on .mdm-clap__ico { color: var(--ink); }
.mdm-clap.is-on b { color: var(--ink); }
.mdm-clap__ico::after {
    content: '';
    position: absolute;
    inset: -7px;
    border: 2px solid var(--mdm-green);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.mdm-clap.is-burst .mdm-clap__ico { animation: mdm-tap .3s ease; }
.mdm-clap.is-burst .mdm-clap__ico::after { animation: mdm-burst .45s ease-out; }
@keyframes mdm-tap { 40% { transform: scale(1.22); } }
@keyframes mdm-burst { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.4); } }
.mdm-bubble {
    position: absolute;
    left: -9px; bottom: calc(100% + 10px);
    display: grid; place-items: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--surface);
    font-size: 12.5px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    opacity: 0;
    transform: translateY(8px) scale(.7);
    transition: opacity .2s ease, transform .3s cubic-bezier(.2, .9, .3, 1.3);
    pointer-events: none;
}
.mdm-bubble.is-on { opacity: 1; transform: none; }
.mdm-resp i { font-size: 16px; }
.mdm-bar__r { position: relative; display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: 16px; }
.mdm-saveb { display: inline-grid; place-items: center; font-size: 17px; transition: transform .15s ease; }
.mdm-saveb.is-press { transform: scale(.88); }
.mdm-saveb.is-on { color: var(--ink); }
.mdm-saveb.is-on i { font-weight: 900; animation: lws-pop .4s cubic-bezier(.2, .9, .3, 1.4); }
.mdm-pop {
    position: absolute;
    bottom: calc(100% + 14px); right: -12px;
    z-index: 4;
    display: flex; flex-direction: column;
    width: 236px;
    padding: 6px 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
    visibility: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.mdm-pop.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .18s ease, transform .18s ease, visibility 0s; }
.mdm-pop__li { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: 13.5px; color: var(--ink); white-space: nowrap; }
.mdm-pop__li > i { font-size: 10.5px; color: var(--muted); }
.mdm-ck {
    display: grid; place-items: center;
    flex: 0 0 auto;
    width: 16px; height: 16px;
    border: 1px solid var(--muted);
    border-radius: 3px;
    transition: background .15s ease, border-color .15s ease;
}
.mdm-ck i { font-size: 9px; color: #fff; opacity: 0; }
.mdm-pop__li.is-on .mdm-ck { background: var(--mdm-green); border-color: var(--mdm-green); }
.mdm-pop__li.is-on .mdm-ck i { opacity: 1; animation: lws-pop .4s cubic-bezier(.2, .9, .3, 1.4); }
.mdm-pop__new { margin-top: 4px; padding: 9px 16px 3px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--mdm-green); }
.mdm-body { font-family: var(--mdm-serif); font-size: 16.5px; line-height: 1.62; color: var(--ink); }
.mdm-body p { margin: 0 0 14px; }
.mdm-body h4 { margin: 4px 0 6px; font-family: var(--mdm-sans); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.mdm-drop { float: left; margin: 6px 8px 0 0; font-size: 50px; font-weight: 700; line-height: .82; }

/* Alkış sayacı (HUD): kişi başı alkış + kanıt anları */
.mdm-hud { right: 14px; bottom: 14px; width: 262px; }
.mdm-hud__n { background: var(--lws-brand-soft); color: var(--ink); }
.mdm-hud__n b { font-variant-numeric: tabular-nums; }
.mdm-hud__bar { display: block; height: 5px; margin-top: 10px; border-radius: 3px; background: var(--line); overflow: hidden; }
.mdm-hud__bar i { display: block; height: 100%; background: var(--mdm-green); transform: scaleX(1); transform-origin: left center; }
.mdm-hud__marks { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; }
.mdm-hud__marks span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 6px; background: var(--ok-bg); color: var(--ok-fg); font-size: 10.5px; font-weight: 700; white-space: nowrap; transition: background var(--ease), color var(--ease); }
.mdm-hud__marks span.is-off { background: var(--surface-2); color: var(--muted-2); }
.mdm-hud__marks span.is-snap { animation: lws-pop .45s cubic-bezier(.2, .9, .3, 1.4); }

/* Yanıtlar çekmecesi */
.mdm-drawer {
    position: absolute;
    top: 46px; right: 0; bottom: 0;
    z-index: 3;
    display: flex; flex-direction: column; gap: 12px;
    width: 340px;
    padding: 14px 18px 0;
    border-left: 1px solid var(--line);
    background: var(--surface);
    box-shadow: -10px 0 30px rgba(0, 0, 0, .1);
    transform: translateX(104%);
    visibility: hidden;
    transition: transform .4s cubic-bezier(.3, .7, .2, 1), visibility 0s linear .4s;
}
.mdm-drawer.is-open { transform: none; visibility: visible; transition: transform .4s cubic-bezier(.3, .7, .2, 1), visibility 0s; }
.mdm-drawer__h { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; }
.mdm-drawer__h b { font-size: 17px; font-weight: 700; }
.mdm-drawer__h i { font-size: 15px; color: var(--muted); }
.mdm-cbox {
    display: flex; flex-direction: column; gap: 8px;
    flex: 0 0 auto;
    padding: 12px 14px 10px;
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 1px 8px rgba(0, 0, 0, .14);
}
.mdm-cbox__who { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.mdm-cbox__who b { font-weight: 500; }
.mdm-cbox__in { position: relative; min-height: 40px; font-family: var(--mdm-serif); font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.mdm-cbox__val .ohs-caret { background: var(--mdm-green); vertical-align: -2px; }
.mdm-cbox__in.is-focus .ohs-caret { display: inline-block; }
.mdm-cbox__ph { position: absolute; left: 0; top: 0; color: var(--muted); pointer-events: none; }
.mdm-cbox__in.is-filled .mdm-cbox__ph { display: none; }
.mdm-cbox__foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; font-size: 13px; color: var(--muted); }
.mdm-cbox__foot .mdm-pill { height: 30px; padding: 0 16px; font-size: 13px; }
.mdm-resps { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.mdm-resps li { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mdm-resps li.is-new { animation: mdm-in .4s ease; }
@keyframes mdm-in { from { opacity: 0; transform: translateY(-8px); } }
.mdm-resp__h { display: flex; align-items: center; gap: 9px; }
.mdm-resp__h > span:last-child { display: flex; flex-direction: column; }
.mdm-resp__h b { font-size: 13px; font-weight: 500; }
.mdm-resp__h small { font-size: 11.5px; color: var(--muted); }
.mdm-resp__t { font-family: var(--mdm-serif); font-size: 14px; line-height: 1.45; color: var(--ink); }
.mdm-resp__f { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mdm-resp__f span { margin-left: 12px; }

/* ---------- Yazar profili ---------- */
.mdm-pg { display: grid; grid-template-columns: minmax(0, 1fr) 232px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.mdm-pmain { display: flex; flex-direction: column; min-width: 0; padding: 22px 28px 0 32px; border-right: 1px solid var(--line); }
.mdm-pname { margin: 0 0 16px; font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); }
.mdm-ptabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.mdm-ptabs span { padding-bottom: 11px; }
.mdm-ptabs .is-on { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
.mdm-story { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mdm-story__t { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; min-width: 0; }
.mdm-story__t b { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--ink); }
.mdm-story__t small { font-family: var(--mdm-serif); font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mdm-story__m { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.mdm-story__m > i { color: #ffc017; font-size: 11px; }
.mdm-story__m span { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; }
.mdm-thumb { display: grid; place-items: center; flex: 0 0 auto; width: 104px; height: 70px; border-radius: 3px; background: var(--th); color: rgba(0, 0, 0, .38); font-size: 22px; }
.mdm-pside { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 22px; }
.mdm-pside__n { display: flex; flex-direction: column; gap: 2px; }
.mdm-pside__n > b { font-size: 15px; font-weight: 700; }
.mdm-pside__n small { font-size: 13.5px; color: var(--muted); }
.mdm-pside__n small b { font-weight: 400; font-variant-numeric: tabular-nums; }
.mdm-pside__n .is-bump { display: inline-block; }
.mdm-pside p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.mdm-pside__b { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mdm-follow.is-on { background: transparent; color: var(--mdm-green); }
.mdm-mail { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mdm-green); color: #fff; font-size: 14px; }

/* ---------- İstatistikler ---------- */
.mdm-sb { display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; min-height: 0; padding: 18px 30px 16px; }
.mdm-sh { display: flex; align-items: baseline; gap: 22px; }
.mdm-sh > b { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.mdm-stabs { display: flex; gap: 18px; font-size: 13.5px; color: var(--muted); }
.mdm-stabs span { padding-bottom: 6px; }
.mdm-stabs .is-on { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
.mdm-sstory { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mdm-sstory > span { min-width: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mdm-sstory small { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.mdm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mdm-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 16px; }
.mdm-kpi:first-child { padding-left: 0; }
.mdm-kpi + .mdm-kpi { border-left: 1px solid var(--line); }
.mdm-kpi b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mdm-kpi.is-main b { color: var(--mdm-green); }
.mdm-kpi small { font-size: 12.5px; color: var(--muted); }
.mdm-chart { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; }
.mdm-legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); }
.mdm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mdm-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--mdm-views); }
.mdm-legend i.is-r { background: var(--mdm-green); }
.mdm-bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 8px; flex: 1 1 auto; min-height: 0; }
.mdm-bar-c { display: flex; flex-direction: column; gap: 5px; min-height: 0; }
.mdm-bar-t { position: relative; flex: 1 1 auto; min-height: 0; }
.mdm-bar-t i {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: var(--h);
    border-radius: 2px 2px 0 0;
    background: var(--mdm-views);
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform .65s cubic-bezier(.2, .8, .2, 1);
    transition-delay: calc(var(--i) * .05s);
}
.mdm-bar-t i.is-r { left: 22%; right: 22%; background: var(--mdm-green); transition-delay: calc(var(--i) * .05s + .12s); }
.mdm-chart.is-grow .mdm-bar-t i { transform: scaleY(1); }
.mdm-bar-c small { font-size: 10.5px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.lws--medium .ohs-stats .ohs-win i { color: #6fd17a; }

/* ---------- Mobil ---------- */
@media (max-width: 620px) {
    .mdm-v { gap: 10px; }
    .mdm-top { height: 42px; gap: 10px; padding: 0 12px; }
    .mdm-logo { font-size: 19px; }
    .mdm-logo i { font-size: 21px; }
    .mdm-search, .mdm-write { display: none; }
    .mdm-top__r { gap: 14px; }

    .mdm-page { padding-top: 16px; }
    .mdm-col { padding: 0 14px; }
    .mdm-title { font-size: 21px; }
    .mdm-sub { margin-bottom: 10px; font-size: 13.5px; }
    .mdm-bar { gap: 16px; margin: 12px 0; padding: 8px 2px; }
    .mdm-bar__r { gap: 16px; }
    .mdm-bar__r > i:last-child { display: none; }
    .mdm-body { font-size: 15px; }
    .mdm-hud { left: 10px; right: 10px; bottom: 10px; width: auto; }
    .mdm-drawer { top: 42px; left: 0; width: auto; padding: 12px 14px 0; }

    .mdm-pg { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .mdm-pside { order: -1; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px 12px; align-items: center; padding: 16px 14px 12px; }
    .mdm-ava--l { width: 56px; height: 56px; font-size: 19px; }
    .mdm-pside p { grid-column: 1 / -1; }
    .mdm-pside__b { grid-column: 1 / -1; margin-top: 0; }
    .mdm-pside__b .mdm-follow { flex: 1 1 auto; }
    .mdm-pmain { padding: 0 14px; border-right: 0; }
    .mdm-pname { display: none; }
    .mdm-ptabs { gap: 18px; }
    .mdm-story { gap: 12px; padding: 12px 0; }
    .mdm-story__t b { font-size: 14.5px; }
    .mdm-story__t small { display: none; }
    .mdm-story__m span:last-child { display: none; }
    .mdm-thumb { width: 72px; height: 52px; font-size: 17px; }

    .mdm-sb { gap: 12px; padding: 14px 14px 12px; }
    .mdm-sh { gap: 14px; }
    .mdm-sh > b { font-size: 21px; }
    .mdm-kpi { padding: 0 8px; }
    .mdm-kpi b { font-size: 18px; }
    .mdm-kpi small { font-size: 11px; }
    .mdm-bars { gap: 4px; }
    .mdm-bar-c small { font-size: 9.5px; }
    .mdm-bar-c:nth-child(2n) small { visibility: hidden; }
}
