/* ManRed shared identity. Original layout and every connection control remain intact. */
:root {
  color-scheme: light;
  --ui-font: Arial, "Segoe UI", sans-serif;
  --bg: #f8f6fc;
  --panel: #ffffff;
  --panel-2: #eee9f5;
  --line: #ded8ee;
  --line-hot: #e73554;
  --ink: #28213f;
  --muted: #66637d;
  --ok: #256344;
  --bad: #a32438;
  --warn: #76500e;
  --accent: #e73554;
  --accent-2: #e73554;
  --warm: #76500e;
}
html { scroll-behavior: auto; }
body {
  background: radial-gradient(ellipse at 100% 0, #f6edf2 0, transparent 45%), var(--bg);
  font: 1rem/1.5 var(--ui-font);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
body:before {
  opacity: .35;
  background-image: linear-gradient(#e7355412 1px, transparent 1px),
    linear-gradient(90deg, #e7355412 1px, transparent 1px);
  background-size: 48px 48px;
}
body:after { display: none; }
main { max-width: 1440px; }
nav {
  background: #fffffff5;
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 26px #e735540c;
}
.brand { color: var(--ink); text-decoration: none; letter-spacing: 0; font-weight: 500; gap: 10px; }
.brand:before { display: none; }
.brand img { display: block; width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain; }
.brand .brand-copy { color: var(--ink); font-size: 1.5rem; line-height: 1.08; font-weight: 700; letter-spacing: -.035em; }
.brand-copy > span { color: var(--accent); }
.brand-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; }
.navlinks a { color: var(--ink); font-size: .875rem; }
.navlinks a:hover { background: var(--panel-2); color: var(--accent); }
.account-chip { background: var(--panel-2); border-color: var(--line); color: var(--muted); border-radius: 7px; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.card, .hero-metric { background: var(--panel); border-color: var(--line); box-shadow: 0 4px 15px #e7355408; border-radius: 10px; }
.card { transition: border-color .15s ease; }
.card h2, .card h3 { color: var(--ink); font-weight: 500; }
.card h2 { font-size: 1.25rem; }
.kicker { color: var(--muted); font-size: .75rem; font-weight: 400; letter-spacing: .04em; }
.hero-metric strong { font-weight: 500; }
.hero-intel { border-top: 2px solid #e73554; }
.hero-intel-row, .slot-section { background: var(--panel); border-color: var(--line); }
.hero-intel-slot { color: var(--ink); font-size: .875rem; }
.hero-intel-head > span, .hero-intel-foot, .hero-intel-empty { color: var(--muted); font-size: .75rem; }
.hero-intel-row { grid-template-columns: minmax(85px,120px) 124px minmax(0,1fr) 30px; }
.hero-intel-row code { font-size: .8125rem; }
.hero-intel-sources .intel-score { font-size: .8125rem; }
.hero-intel-sources .intel-score small { font-size: .75rem; }
.host-strip, .quality-strip, .quic-strip, .provider-dns-strip, .proxy-link, .external-fingerprint,
.intel-strip, .dns-cell, .pptp-exit-meta, .telemetry-item, .fp-coverage-item {
  background: var(--panel-2); border-color: var(--line); color: var(--ink);
}
.host-caption, .host-item > span, .host-item .muted, .service-name,
.section-head p, .microcopy, .resolver-provider, .slot-number,
.quality-caption, .fingerprint-preview, .fingerprint-result, .intel-meta,
.proxy-link > span, .intel-strip > div > span, .webrtc-path em,
.provider-dns-item span, .dns-cell span, .fp-coverage-item span,
.telemetry-item span, .quic-strip span, .quic-strip small {
  color: var(--muted);
}
.host-caption, .host-item > span, .service-name, .resolver-provider, .provider-dns-item span,
.dns-cell span, .fp-coverage-item span, .telemetry-item span, .quic-strip span,
.quic-strip small, .intel-strip > div > span, .webrtc-path em { font-size: .75rem; }
.host-item > strong, .host-item .neutral, .telemetry-item strong,
.fp-coverage-item strong, .external-fingerprint > span:first-child,
.provider-dns-item strong, .pptp-exit-item strong { color: var(--ink); }
.host-item > strong, .telemetry-item strong, .fp-coverage-item strong { font-size: .8125rem; font-weight: 400; }
.microcopy { font-size: .875rem; }
.section-head p, .fingerprint-preview, .quality-strip, .external-fingerprint { font-size: .8125rem; }
.slot-shell { padding: 0; }
.slot-shell > summary { background: var(--panel); }
.slot-shell[open] > summary { background: #eee9f5; border-left: 3px solid #e73554; padding-left: 11px; }
.slot-body { background: #eee9f5; }
.slot-title { font-weight: 500; }
.slot-section { border-radius: 8px; }
.pptp-card { border-left: 3px solid #e73554; }
.socks-card { border-left: 3px solid #6da18e; }
.pptp-exit-item span { color: var(--muted); font-size: .75rem; }
.pptp-exit-item strong { font-size: .875rem; font-weight: 400; }
.pptp-mtu-strip { border-color: var(--line); }
.pptp-mtu-strip strong { font-size: .8125rem; }
label { color: var(--ink); font-size: .875rem; font-weight: 400; }
input, select, .proxy-link input {
  background: #ffffff; color: var(--ink); border-color: #aab3c5; font-family: var(--ui-font); font-weight: 400;
}
input::placeholder { color: #647087; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #ef334026; }
input[readonly] { color: #3e4960; background: #eee9f5; }
button, .button {
  background: #b82638; color: #fff; font-weight: 400; box-shadow: none;
  transition: background .15s ease, border-color .15s ease;
}
button:hover, .button:hover { background: #9f2031; filter: none; transform: none; }
button:active { transform: none; }
.secondary, .quic-strip .button { background: #eef1f6; color: var(--ink); border: 1px solid #b3bdcf; box-shadow: none; }
.secondary:hover, .quic-strip .button:hover { background: #e3e8f1; }
.danger { background: #ffffff; color: #28213f; border: 1px solid #e73554; box-shadow: none; }
.danger:hover { background: #ffffff; }
.socks-grid { grid-template-columns: 132px 96px 148px 170px minmax(240px,1fr); }
.socks-grid label, .socks-grid label:last-child { grid-template-rows: minmax(21px,auto) 39px; }
.socks-grid label:last-child { grid-template-rows: minmax(21px,auto) 39px minmax(20px,auto); }
.socks-grid input, .socks-grid select { font-size: .875rem; }
.socks-toggle > span { white-space: nowrap; }
.socks-port, .socks-user, .socks-password { white-space: nowrap; }
code, .resolver-ip, .socks-user input, .socks-password input, .proxy-link input {
  font-family: var(--ui-font); font-variant-numeric: tabular-nums; letter-spacing: 0;
}
code { background: #eef1f7; border-color: #cdd4e1; color: #394861; font-size: .8125rem; }
.fingerprint-preview code, .external-fingerprint code { font-size: .75rem; }
th { color: var(--muted); font-size: .8125rem; font-weight: 400; letter-spacing: 0; }
td { font-size: .875rem; }
tbody tr:hover { background: var(--panel-2); }
.note-title { font-weight: 500; }
.intel-score-zero { color: #24643e; background: #e7f5ec; border-color: #a1c8af; }
.intel-score-low { color: #326147; background: #edf5ef; border-color: #b2cdbb; }
.intel-score-watch { color: #70531b; background: #fff5d9; border-color: #d8c284; }
.intel-score-review { color: #854519; background: #fff0e3; border-color: #d8b28f; }
.intel-score-likely { color: #963044; background: #ffebef; border-color: #d6a0ae; }
.intel-score-listed { color: #86233b; background: #f9dce5; border-color: #cd94a4; }
.intel-score-pending { color: #505b72; background: #eef1f7; border-color: #bcc6d8; }
.intel-score-error { color: #8a3f3f; background: #faeaea; border-color: #d8aaaa; }
.quality-dot.degraded { background: var(--warn); box-shadow: none; }
.quality-dot.maintenance { background: #367dad; box-shadow: none; }
.host-item .warn, .pptp-exit-item strong.warn, .telemetry-item strong.warn,
.quic-strip strong.warn { color: var(--warn); }
.host-item .neutral { color: var(--ink); }
@media (min-width: 1081px) {
  .host-strip { grid-template-columns: auto repeat(5, minmax(0, 1fr)) minmax(160px, 1.5fr); }
}
.flash { background: #fff3f6; border-color: #d5b3c1; color: var(--ink); box-shadow: none; }
.warning { background: #fff7e8; border-color: #d3bd8e; color: #755219; }
.login { max-width: 410px; margin: 6vh auto; padding: 24px; border-top: 2px solid #e73554; }
.login-emblem { display: block; width: 96px; height: 96px; object-fit: contain; margin: 0 auto 14px; }
.login .kicker { text-align: center; }
.login h2 { text-align: center; margin: 5px 0 20px; }
.login-help { color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
.login form { gap: 14px; }
.login button { min-height: 42px; }
@media (max-width: 1080px) {
  .hero-intel-row { grid-template-columns: minmax(70px,1fr) auto 30px; }
  .socks-grid { grid-template-columns: 132px 96px minmax(148px,1fr) minmax(170px,1fr); }
  .socks-grid label:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  main { padding: 8px 9px 40px; }
  .socks-grid { grid-template-columns: 1fr; }
  .socks-grid label:last-child { grid-column: auto; }
  .brand .brand-copy { font-size: 1.125rem; }
  .brand img { width: 36px; height: 36px; flex-basis: 36px; }
  .login { margin: 24px auto; padding: 20px; }
  .pptp-apply { justify-self: stretch; min-width: 0; }
  .hero-intel-sources { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { transition: none !important; animation: none !important; }
}

/* This class is set only by the existing health renderer/live refresh logic. */
.card.slot-shell.slot-healthy {
  --ink: #213b2b;
  --muted: #486352;
  --bg: #edf8f0;
  --panel: #fbfffc;
  --panel-2: #e4f0e8;
  --line: #a1bea9;
  --accent: #e73554;
  --ok: #256344;
  --bad: #a32438;
  --warn: #76500e;
  background: #eaf6ed;
  border-color: #9bc8a8;
}
.card.slot-shell.slot-healthy > summary,
.card.slot-shell.slot-healthy[open] > summary {
  color: var(--ink); background: #e4f3e8; border-left-color: #65a478;
}
.card.slot-shell.slot-healthy > .slot-body { background: var(--bg); }
.card.slot-shell.slot-healthy > .slot-body > .slot-section { background: var(--panel); }
.slot-healthy code { color: #394861; }
.slot-healthy .danger { background: #ffffff; color: #28213f; }
.slot-healthy .danger:hover { background: #ffffff; }
.slot-healthy .warning { background: #fff7e8; color: #755219; }
.slot-healthy .flash { background: #fff3f6; color: var(--ink); }
@media (max-width: 760px) {
  /* The old mobile stylesheet hid both exit IP and health text. */
  .slot-shell > summary { grid-template-columns: auto minmax(0,1fr) auto; }
  .slot-shell > summary .slot-state {
    display: flex; grid-column: 1 / -1; grid-row: 2; white-space: normal;
  }
  .slot-shell > summary .slot-endpoint {
    display: block; grid-column: 1 / -1; grid-row: 3; overflow-wrap: anywhere;
  }
  .slot-shell > summary:after { grid-column: 3; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}


/* Published Film Zero272 + logo background removal273; presentation only. */
:root,html.light,html[data-theme="light"]{--bg:#ffffff;--panel:#fff;--panel-2:#ffffff;--line:#ded8ee;--ink:#28213f;--muted:#66637d;--accent:#e73554;--accent-2:#e73554;color-scheme:light}
html.dark,html[data-theme="dark"]{--bg:#151b36;--panel:#202849;--panel-2:#252e52;--line:#373e63;--ink:#f7f5ff;--muted:#b5bad8;--accent:#e73554;--accent-2:#e73554;color-scheme:dark}
@media(prefers-color-scheme:dark){html:not(.light):not([data-theme="light"]){--bg:#151b36;--panel:#202849;--panel-2:#252e52;--line:#373e63;--ink:#f7f5ff;--muted:#b5bad8;--accent:#e73554;--accent-2:#e73554;color-scheme:dark}}
body{background:var(--bg);color:var(--ink)}nav,.card{background:var(--panel)}.slot-body,.slot-shell[open]>summary{background:var(--panel-2)}
button,.button,button:hover,.button:hover{background:#e73554;color:#fff;border-color:#e73554}
button span,.button span{color:inherit}.secondary,.quic-strip .button,.secondary:hover,.quic-strip .button:hover{background:var(--panel-2);color:var(--ink);border-color:var(--line)}
input,select,.proxy-link input{background:var(--panel);color:var(--ink);border-color:var(--line)}input::placeholder{color:var(--muted)}input:focus,select:focus{box-shadow:0 0 0 3px #e7355426}
.brand-copy>span,.brand:hover .brand-copy,.brand:focus-visible .brand-copy{color:#e73554}.brand-copy small{display:block;text-align:center;width:100%}

.brand img,.login-emblem{content:normal!important;opacity:0!important}

/* SITE275 readability adapted to verified Socks login DOM; visual only. */
.card.login form > button{font-size:19px;font-weight:700;line-height:1.25;min-height:48px;color:#fff}

/* SITE315: accepted flat M and white packet, no image/data/SVG route dependency. */
.brand,.card.login{position:relative}
.brand{isolation:isolate;--mr-logo-size:64px;--mr-packet-path:path("M11.466667 45.866667 L11.466667 15.239647 L32.000000 32.814491 L52.533333 15.239647 L52.533333 45.866667")}
.brand::after,.card.login::before{content:""!important;display:block!important;position:absolute!important;width:var(--mr-logo-size);height:var(--mr-logo-size);background:#e73554!important;clip-path:polygon(8.333333% 4.166667%,50% 40%,91.666667% 4.166667%,91.666667% 87.5%,72.5% 73.666667%,72.5% 43.333333%,50% 62.5%,27.5% 43.333333%,27.5% 73.666667%,8.333333% 87.5%);animation:none!important;pointer-events:none}
.brand::after{left:0;top:0;z-index:0}.card.login{--mr-logo-size:96px;--mr-packet-path:path("M17.200000 68.800000 L17.200000 22.859470 L48.000000 49.221736 L78.800000 22.859470 L78.800000 68.800000")}.card.login::before{left:calc(50% - 48px);top:24px}
.brand::before,.card.login::after{content:""!important;display:block!important;position:absolute!important;left:0;top:0;width:calc(var(--mr-logo-size)*.116667);height:calc(var(--mr-logo-size)*.016667);background:#fff!important;border-radius:999px;pointer-events:none;z-index:1;offset-path:var(--mr-packet-path);offset-anchor:center;offset-rotate:auto;animation:mr315-packet 6s linear infinite!important;box-shadow:none!important;filter:none!important}
.card.login::after{left:calc(50% - 48px);top:24px}
@keyframes mr315-packet{0%{offset-distance:0%;opacity:0}2%{opacity:1}98%{opacity:1}100%{offset-distance:100%;opacity:0}}
@media(max-width:760px){.brand{--mr-logo-size:36px;--mr-packet-path:path("M6.450000 25.800000 L6.450000 8.572301 L18.000000 18.458151 L29.550000 8.572301 L29.550000 25.800000")}}
@media(prefers-reduced-motion:reduce){.brand::before,.card.login::after{animation:none!important;offset-distance:50%;opacity:1}}

/* SITE334: mobile touch targets only; handlers and colours unchanged. */
@media(max-width:760px){button,.button{min-height:48px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center}}

/* SITE341: keep slot-action touch targets at 48px on mobile. */
@media(max-width:760px){.slot-body > .slot-actions > form > button{min-height:48px}}

/* SITE348: exact diagonal bisector; remove inherited diamond rotation. */
.brand::before,.card.login::after{transform:none!important;offset-position:0px 0px}

/* SITE404: pure white light surfaces; dark palette, brand and state dots preserved. */
html.light nav,html.light .card,html.light .slot-body,html.light .slot-section,html.light .slot-shell>summary,html.light input,html.light select,html.light code,html.light .secondary,html.light .danger,html.light .warning,html.light .flash,html.light .external-fingerprint,html.light .fp-coverage-item,html.light .pptp-exit-meta,html.light .provider-dns-strip,html.light .proxy-link,html.light .quality-strip,html.light .quic-strip,html.light .telemetry-item,html.light .geo-consensus,html.light .intel-score,html.light .panel-popup{background-color:#ffffff!important;background-image:none!important}
html.light .slot-healthy{--bg:#ffffff;--panel:#ffffff;--panel-2:#ffffff}
html[data-theme="light"] nav,html[data-theme="light"] .card,html[data-theme="light"] .slot-body,html[data-theme="light"] .slot-section,html[data-theme="light"] .slot-shell>summary,html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] code,html[data-theme="light"] .secondary,html[data-theme="light"] .danger,html[data-theme="light"] .warning,html[data-theme="light"] .flash,html[data-theme="light"] .external-fingerprint,html[data-theme="light"] .fp-coverage-item,html[data-theme="light"] .pptp-exit-meta,html[data-theme="light"] .provider-dns-strip,html[data-theme="light"] .proxy-link,html[data-theme="light"] .quality-strip,html[data-theme="light"] .quic-strip,html[data-theme="light"] .telemetry-item,html[data-theme="light"] .geo-consensus,html[data-theme="light"] .intel-score,html[data-theme="light"] .panel-popup{background-color:#ffffff!important;background-image:none!important}
html[data-theme="light"] .slot-healthy{--bg:#ffffff;--panel:#ffffff;--panel-2:#ffffff}
@media (prefers-color-scheme:light),(prefers-color-scheme:no-preference){
html:not(.dark):not([data-theme="dark"]) nav,html:not(.dark):not([data-theme="dark"]) .card,html:not(.dark):not([data-theme="dark"]) .slot-body,html:not(.dark):not([data-theme="dark"]) .slot-section,html:not(.dark):not([data-theme="dark"]) .slot-shell>summary,html:not(.dark):not([data-theme="dark"]) input,html:not(.dark):not([data-theme="dark"]) select,html:not(.dark):not([data-theme="dark"]) code,html:not(.dark):not([data-theme="dark"]) .secondary,html:not(.dark):not([data-theme="dark"]) .danger,html:not(.dark):not([data-theme="dark"]) .warning,html:not(.dark):not([data-theme="dark"]) .flash,html:not(.dark):not([data-theme="dark"]) .external-fingerprint,html:not(.dark):not([data-theme="dark"]) .fp-coverage-item,html:not(.dark):not([data-theme="dark"]) .pptp-exit-meta,html:not(.dark):not([data-theme="dark"]) .provider-dns-strip,html:not(.dark):not([data-theme="dark"]) .proxy-link,html:not(.dark):not([data-theme="dark"]) .quality-strip,html:not(.dark):not([data-theme="dark"]) .quic-strip,html:not(.dark):not([data-theme="dark"]) .telemetry-item,html:not(.dark):not([data-theme="dark"]) .geo-consensus,html:not(.dark):not([data-theme="dark"]) .intel-score,html:not(.dark):not([data-theme="dark"]) .panel-popup{background-color:#ffffff!important;background-image:none!important}
html:not(.dark):not([data-theme="dark"]) .slot-healthy{--bg:#ffffff;--panel:#ffffff;--panel-2:#ffffff}
}

/* SITE408: outlined destructive actions; functions/status untouched. */
html.light button.danger,html[data-theme="light"] button.danger,html:not(.dark):not([data-theme="dark"]) button.danger,html.light a.button.danger,html[data-theme="light"] a.button.danger,html:not(.dark):not([data-theme="dark"]) a.button.danger{background:#ffffff!important;color:#28213f!important;border:2px solid #e73554!important;box-shadow:none!important}
html.dark button.danger,html[data-theme="dark"] button.danger,html.dark a.button.danger,html[data-theme="dark"] a.button.danger{background:#151b36!important;color:#f7f5ff!important;border:2px solid #e73554!important;box-shadow:none!important}

/* SITE462: owner pure-white light backdrop; dark and logo animation unchanged. */
html:is(.light,[data-theme="light"]):not(.dark):not([data-theme="dark"]) body{background-color:#FFFFFF!important;background-image:none!important}
html:is(.light,[data-theme="light"]):not(.dark):not([data-theme="dark"]) body::before{background-image:none!important}
html:is(.light,[data-theme="light"]):not(.dark):not([data-theme="dark"]) :is(nav,.card,.hero-metric){box-shadow:none!important}
@media(prefers-color-scheme:light),(prefers-color-scheme:no-preference){
html:not(.dark):not([data-theme="dark"]) body{background-color:#FFFFFF!important;background-image:none!important}
html:not(.dark):not([data-theme="dark"]) body::before{background-image:none!important}
html:not(.dark):not([data-theme="dark"]) :is(nav,.card,.hero-metric){box-shadow:none!important}
}

/* Owner request: each SOCKS5 settings block is a native disclosure. */
details.socks-card > summary.socks-disclosure-head{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:0}
details.socks-card > summary.socks-disclosure-head::-webkit-details-marker{display:none}
details.socks-card > summary.socks-disclosure-head::after{content:"＋";font-size:20px;color:var(--muted)}
details.socks-card[open] > summary.socks-disclosure-head{margin-bottom:12px}
details.socks-card[open] > summary.socks-disclosure-head::after{content:"−"}
details.socks-card > summary.socks-disclosure-head:focus-visible{outline:2px solid var(--ok);outline-offset:4px;border-radius:4px}

/* Owner: fresh healthy slot is green throughout. Historical failures stay labelled. */
html:not(.dark):not([data-theme="dark"]) .card.slot-shell.slot-healthy{--accent:#256344;--line:#a1bea9;background:#edf8f0!important;border-color:#82b596!important}
html:not(.dark):not([data-theme="dark"]) .slot-shell.slot-healthy :is(.slot-body,.slot-section,.telemetry-item,.quality-strip,.provider-dns-strip,.pptp-exit-meta,.quic-strip){background:#f3fbf5!important;border-color:#a1bea9!important}
html:not(.dark):not([data-theme="dark"]) .card.slot-shell.slot-healthy>summary{background:#e4f3e8!important;border-left-color:#65a478!important}
.slot-shell.slot-healthy .pptp-card{border-left-color:#65a478!important}
.slot-shell.slot-healthy button.danger,.slot-shell.slot-healthy a.button.danger{border-color:#65a478!important}
.slot-shell.slot-healthy .quality-dot.down{background:#899c91;opacity:.75}
