
/* MEDIAAD_DESIGN_V1
   Production UI shell inspired by the approved graphite + teal direction.
   No external fonts or third-party UI dependencies.
*/
:root{
  --md-bg:#f3f6f5;
  --md-bg-2:#eef3f1;
  --md-surface:#ffffff;
  --md-surface-soft:#f8faf9;
  --md-surface-teal:#edf8f5;
  --md-text:#15221f;
  --md-text-soft:#52635f;
  --md-muted:#71807c;
  --md-line:#dfe7e3;
  --md-line-strong:#cfdcd7;
  --md-primary:#0f766e;
  --md-primary-2:#168f84;
  --md-primary-dark:#0b5f59;
  --md-copper:#c27b38;
  --md-copper-soft:#fff4e7;
  --md-success:#208462;
  --md-warning:#b97613;
  --md-danger:#c74444;
  --md-info:#2b72b8;
  --md-radius-xs:8px;
  --md-radius-sm:12px;
  --md-radius:18px;
  --md-radius-lg:24px;
  --md-shadow-xs:0 4px 14px rgba(31,54,48,.045);
  --md-shadow:0 12px 34px rgba(31,54,48,.075);
  --md-shadow-lg:0 24px 70px rgba(31,54,48,.12);
  --md-sidebar:252px;
  --md-topbar:68px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--md-bg)}
body{
  margin:0!important;
  color:var(--md-text)!important;
  background:
    radial-gradient(circle at 88% -10%,rgba(15,118,110,.07),transparent 28rem),
    linear-gradient(180deg,#f8faf9 0,var(--md-bg) 42%,#f6f8f7 100%)!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
  line-height:1.5;
  text-rendering:optimizeLegibility;
}
body.md-lock-scroll{overflow:hidden}
a{color:var(--md-primary);text-decoration:none;transition:color .18s ease,opacity .18s ease}
a:hover{color:var(--md-primary-dark)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
img,video{max-width:100%}
::selection{background:rgba(15,118,110,.18)}
:focus-visible{outline:3px solid rgba(15,118,110,.23);outline-offset:2px}

/* Shared */
.md-brand{
  display:inline-flex;align-items:center;gap:11px;color:var(--md-text)!important;
  font-weight:820;letter-spacing:-.45px;font-size:21px;text-decoration:none!important
}
.md-brand-mark{
  position:relative;width:36px;height:34px;display:inline-block;flex:0 0 auto
}
.md-brand-mark:before,.md-brand-mark:after{
  content:"";position:absolute;top:4px;width:12px;height:27px;border-radius:4px 4px 7px 7px;
  transform:skew(-18deg)
}
.md-brand-mark:before{left:5px;background:linear-gradient(180deg,#0a6660,#123a43)}
.md-brand-mark:after{right:5px;background:linear-gradient(180deg,#173f49,#0f766e)}
.md-brand-sub{display:block;font-size:9px;color:#7b8985;font-weight:600;letter-spacing:.03em;margin-top:-4px}
.md-icon{width:19px;height:19px;display:block;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round}
.md-muted,.muted,.note{color:var(--md-muted)!important}
.md-kicker{
  color:var(--md-primary);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.11em
}
.md-chip{
  display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;
  background:#f1f5f3;color:#53635f;font-size:12px;font-weight:700;border:1px solid #e1e9e5
}
.md-chip--teal{background:var(--md-surface-teal);color:var(--md-primary-dark);border-color:#d2ebe5}
.md-chip--copper{background:var(--md-copper-soft);color:#9a5d20;border-color:#f1ddc8}
.md-divider{height:1px;background:var(--md-line);margin:18px 0}

/* Buttons */
button,.btn,input[type="submit"],a.btn{
  border:1px solid var(--md-line-strong)!important;
  border-radius:11px!important;
  min-height:40px;
  padding:9px 14px!important;
  background:#fff!important;
  color:#30403c!important;
  font-weight:700!important;
  box-shadow:none!important;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,background .15s ease!important
}
button:hover,.btn:hover,input[type="submit"]:hover,a.btn:hover{
  transform:translateY(-1px);border-color:#b9cbc5!important;box-shadow:var(--md-shadow-xs)!important
}
button[type="submit"],.btn-primary,.md-btn-primary,
a.btn[href*="/study"],a.btn[href*="/register"]{
  background:linear-gradient(135deg,var(--md-primary),var(--md-primary-2))!important;
  border-color:transparent!important;color:#fff!important;
  box-shadow:0 8px 20px rgba(15,118,110,.16)!important
}
.md-btn-danger,.danger button,button[value="rejected"],button[value="reject"]{
  color:var(--md-danger)!important;border-color:#efc9c9!important;background:#fff7f7!important
}
button:disabled,.btn:disabled{opacity:.48!important;cursor:not-allowed!important;transform:none!important}

/* Forms */
label{color:#43544f;font-weight:720}
input,select,textarea{
  width:100%;box-sizing:border-box;
  border:1px solid var(--md-line-strong)!important;
  border-radius:11px!important;
  background:#fff!important;color:var(--md-text)!important;
  padding:11px 12px!important;outline:none!important;
  transition:border-color .17s ease,box-shadow .17s ease,background .17s ease
}
input:focus,select:focus,textarea:focus{
  border-color:#79aaa4!important;
  box-shadow:0 0 0 4px rgba(15,118,110,.08)!important
}
input[readonly]{background:#f6f8f7!important;color:#43544f!important}
input[type="checkbox"],input[type="radio"]{width:auto!important;accent-color:var(--md-primary)}
textarea{min-height:100px;resize:vertical}
.md-password-wrap{position:relative}
.md-password-wrap input{padding-right:82px!important}
.md-password-toggle{
  position:absolute;right:7px;top:50%;transform:translateY(-50%)!important;
  min-height:32px!important;padding:5px 9px!important;border:0!important;background:transparent!important;
  color:var(--md-primary)!important;font-size:12px!important;box-shadow:none!important
}
.md-password-toggle:hover{transform:translateY(-50%)!important;box-shadow:none!important}
.md-copy-wrap{display:flex;gap:9px;align-items:stretch}
.md-copy-wrap input{min-width:0;flex:1}
.md-copy-wrap button{flex:0 0 auto}
.error,.err,.danger{
  color:var(--md-danger)!important
}
.error,.err,.msg,.notice,.warn,.security{
  border-radius:12px!important;padding:12px 14px!important;border:1px solid var(--md-line)!important;
  margin-block:12px!important
}
.error,.err{background:#fff4f4!important;border-color:#f0d3d3!important}
.msg{background:#eef8f3!important;color:#24654f!important;border-color:#d1eadf!important}
.notice,.security{background:#f1f7fb!important;color:#3e5f71!important;border-color:#dbe9f0!important}
.warn{background:#fff7e8!important;color:#8d621f!important;border-color:#efdfbd!important}

/* Generic content cards */
.wrap{
  width:min(1240px,calc(100% - 40px))!important;
  max-width:none!important;margin:0 auto!important;padding:28px 0 54px!important
}
.card,.panel,.wallet,.stat,.metric,.item,.setting{
  background:var(--md-surface)!important;
  border:1px solid var(--md-line)!important;
  border-radius:var(--md-radius)!important;
  box-shadow:var(--md-shadow-xs)!important
}
.card{
  padding:22px!important;margin-bottom:16px!important
}
.card:hover{border-color:#d7e2de!important}
.card h1,.card h2,.card h3,.panel h1,.panel h2,.panel h3{letter-spacing:-.35px}
h1,h2,h3,h4{color:var(--md-text);line-height:1.16}
.wrap>h1,.md-content h1{
  font-size:34px!important;letter-spacing:-1.15px!important;margin:6px 0 22px!important
}
h2{font-size:22px}
h3{font-size:17px}
p{color:#44544f}
.good{color:var(--md-success)!important}
.bad{color:var(--md-danger)!important}
.warn{color:#865b17!important}
.mono{font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace!important;font-size:.92em}

/* Tables */
table{
  width:100%!important;border-collapse:separate!important;border-spacing:0!important;
  background:#fff;border:1px solid var(--md-line);border-radius:14px;overflow:hidden
}
th{
  background:#f6f8f7!important;color:#667570!important;font-size:11px!important;
  letter-spacing:.045em;text-transform:uppercase;font-weight:800!important
}
th,td{padding:11px 12px!important;border-bottom:1px solid #e8eeeb!important;text-align:left!important;vertical-align:middle}
tr:last-child td{border-bottom:0!important}
tbody tr{transition:background .14s ease}
tbody tr:hover{background:#fbfdfc}
.num{text-align:right!important;font-variant-numeric:tabular-nums}
.md-table-scroll,.tables{overflow:auto;max-width:100%;border-radius:14px}
.md-table-scroll table,.tables table{min-width:680px}
.md-table-search{
  display:flex;align-items:center;gap:9px;margin-left:auto;width:min(340px,100%)
}
.md-table-search input{height:40px;background:#f7f9f8!important}
.md-empty-search{display:none;padding:18px;color:var(--md-muted);text-align:center}

/* Status badges */
.md-status{
  display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:999px;
  font-size:11px;font-weight:800;white-space:nowrap;border:1px solid transparent
}
.md-status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.md-status--success{color:#147659;background:#edf8f3;border-color:#d2eadf}
.md-status--warning{color:#9a6718;background:#fff7e8;border-color:#efdfbd}
.md-status--danger{color:#b43c3c;background:#fff1f1;border-color:#f1d0d0}
.md-status--info{color:#2a68a2;background:#eef6fd;border-color:#d7e6f4}
.md-status--neutral{color:#687671;background:#f2f5f4;border-color:#e0e7e4}

/* Application shell */
.md-app-shell{min-height:100vh;display:grid;grid-template-columns:var(--md-sidebar) minmax(0,1fr)}
.md-sidebar{
  position:sticky;top:0;height:100vh;z-index:40;
  padding:19px 14px 14px;background:rgba(255,255,255,.97);
  border-right:1px solid var(--md-line);
  display:flex;flex-direction:column;box-shadow:3px 0 18px rgba(37,58,52,.025)
}
.md-sidebar-head{padding:1px 10px 20px}
.md-sidebar-nav{display:grid;gap:4px}
.md-nav-section{
  margin:16px 10px 7px;color:#93a09c;font-size:10px;font-weight:850;letter-spacing:.11em;text-transform:uppercase
}
.md-nav-link{
  min-height:42px;display:flex;align-items:center;gap:11px;padding:9px 11px;border-radius:11px;
  color:#53645f!important;font-size:13px;font-weight:690;text-decoration:none!important;
  border:1px solid transparent;position:relative
}
.md-nav-link:hover{background:#f5f9f7;color:var(--md-primary-dark)!important}
.md-nav-link.active{
  color:var(--md-primary-dark)!important;background:linear-gradient(90deg,#e9f7f3,#f1f9f6);
  border-color:#d9eee8
}
.md-nav-link.active:before{
  content:"";position:absolute;left:-5px;top:10px;bottom:10px;width:3px;border-radius:4px;background:var(--md-primary)
}
.md-nav-link .md-icon{width:18px;height:18px}
.md-sidebar-foot{margin-top:auto;padding:14px 8px 3px;border-top:1px solid var(--md-line)}
.md-sidebar-foot form{margin:0!important}
.md-sidebar-foot button{width:100%;justify-content:flex-start!important}
.md-sidebar-meta{font-size:11px;color:#8a9894;padding:9px 2px}
.md-app-stage{min-width:0}
.md-topbar{
  height:var(--md-topbar);position:sticky;top:0;z-index:30;
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:0 26px;background:rgba(255,255,255,.88);backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(220,230,226,.92)
}
.md-topbar-left{display:flex;align-items:center;gap:12px;min-width:0}
.md-mobile-toggle{
  display:none;place-items:center;width:40px;height:40px;padding:0!important;min-height:40px!important
}
.md-topbar-title{font-size:14px;font-weight:800;color:#3b4b47;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.md-topbar-right{display:flex;align-items:center;gap:10px}
.md-locale-chip{
  min-height:36px;padding:7px 10px;border-radius:10px;background:#f6f8f7;border:1px solid var(--md-line);
  color:#5b6b66;font-size:12px;font-weight:800;text-transform:uppercase
}
.md-profile{
  display:flex;align-items:center;gap:9px;padding:5px 8px;border-radius:12px;
  border:1px solid transparent;color:#354641
}
.md-profile:hover{background:#f7f9f8;border-color:var(--md-line)}
.md-avatar{
  width:34px;height:34px;border-radius:11px;display:grid;place-items:center;
  color:#fff;background:linear-gradient(145deg,var(--md-primary),#0d5d65);
  font-size:12px;font-weight:850;box-shadow:0 5px 13px rgba(15,118,110,.17)
}
.md-profile-copy{display:grid;line-height:1.16}
.md-profile-copy strong{font-size:12px;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.md-profile-copy span{font-size:10px;color:#87948f}
.md-content{padding:0 26px 40px;min-width:0}
.md-content>.wrap{width:100%!important}
.md-page-banner{
  display:flex;align-items:flex-end;justify-content:space-between;gap:18px;
  padding:27px 0 17px
}
.md-page-banner h1{margin:0!important;font-size:31px!important;letter-spacing:-1px!important}
.md-page-banner p{margin:5px 0 0;color:var(--md-muted)}
.md-legacy-nav{display:none!important}
.md-dashboard-account-card{display:none!important}
.md-dashboard-account-card.md-has-warning{display:block!important}
.md-dashboard-account-card.md-has-warning>h1,
.md-dashboard-account-card.md-has-warning>p:first-of-type,
.md-dashboard-account-card.md-has-warning>.nav{display:none!important}
.md-dashboard-account-card.md-has-warning .warn{margin:0!important}
.md-backlink{
  display:inline-flex!important;align-items:center;gap:6px;margin:0 0 8px!important;
  color:#6d7d78!important;font-size:12px;font-weight:700
}

/* Cards get visual hierarchy */
.md-content .card:first-of-type:not(.md-dashboard-account-card){
  border-color:#d9e7e2!important
}
.stats,.wallets,.grid{
  gap:12px!important
}
.stat,.wallet,.metric,.item,.setting{
  padding:15px!important
}
.stat strong,.wallet strong,.metric strong{font-size:16px;color:#263632}
.metric>span,.stat>span{color:#7a8884;font-size:11px}
.ref{gap:9px!important}
.ref input{min-height:42px}
.progress{
  height:9px!important;background:#edf2f0!important;border-radius:999px!important;overflow:hidden!important
}
.progress>span{
  display:block;height:100%;background:linear-gradient(90deg,var(--md-primary),#55aa99)!important;border-radius:999px!important
}

/* Referral page */
body[data-md-route="referrals"] .wrap>.card:nth-of-type(1){
  background:linear-gradient(135deg,#fff,#f3faf7)!important
}
body[data-md-route="referrals"] .wrap>.card:nth-of-type(2){
  background:
    radial-gradient(circle at 88% 12%,rgba(194,123,56,.10),transparent 13rem),
    #fff!important
}
body[data-md-route="referrals"] .stats .stat:nth-child(1){border-top:3px solid #4cae92!important}
body[data-md-route="referrals"] .stats .stat:nth-child(2){border-top:3px solid #5d8fd9!important}
body[data-md-route="referrals"] .stats .stat:nth-child(n+3){border-top:3px solid var(--md-copper)!important}

/* Wallet + payouts */
body[data-md-route="wallet"] .wallets .wallet,
body[data-md-route="payouts"] .grid>div{
  background:linear-gradient(145deg,#fff,#f5faf8)!important
}
body[data-md-route="wallet"] .wallets .wallet strong{
  display:inline-flex;padding:5px 8px;border-radius:8px;background:#edf8f5;color:var(--md-primary-dark)
}

/* Studies */
body[data-md-route="studies"] .wrap{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;align-items:start
}
body[data-md-route="studies"] .wrap>p,
body[data-md-route="studies"] .wrap>h1{grid-column:1/-1}
body[data-md-route="studies"] .card{
  margin:0!important;min-height:220px;display:flex;flex-direction:column;position:relative;overflow:hidden
}
body[data-md-route="studies"] .card:after{
  content:"";position:absolute;width:110px;height:110px;border-radius:50%;right:-35px;top:-45px;background:rgba(15,118,110,.05)
}
body[data-md-route="studies"] .card h2{font-size:20px;margin-top:3px;position:relative;z-index:1}
body[data-md-route="studies"] .card .meta{margin-top:auto;padding-top:15px}
body[data-md-route="studies"] .card .btn{align-self:flex-start}

/* Study run: preserve production server-controlled JS identifiers */
body[data-md-route="study"]{
  background:
    radial-gradient(circle at 50% -5%,rgba(15,118,110,.09),transparent 35rem),
    #f4f7f5!important
}
body[data-md-route="study"] .wrap{
  width:min(900px,calc(100% - 30px))!important;padding-top:28px!important
}
body[data-md-route="study"] .card{
  border-radius:22px!important;padding:28px!important;box-shadow:var(--md-shadow)!important
}
body[data-md-route="study"] #material-card h1{font-size:32px!important;margin-bottom:10px!important}
body[data-md-route="study"] .material{font-size:16px;line-height:1.72}
body[data-md-route="study"] .option{
  width:100%!important;text-align:left!important;display:flex!important;align-items:center!important;
  border:1px solid var(--md-line-strong)!important;border-radius:13px!important;background:#fff!important;
  padding:13px 15px!important;min-height:48px!important;font-weight:650!important
}
body[data-md-route="study"] .option:hover{background:#f5faf8!important;border-color:#accdc4!important}
body[data-md-route="study"] .option.selected{
  background:#eaf7f3!important;border-color:#67aa9b!important;color:#0b5f59!important;
  box-shadow:0 0 0 3px rgba(15,118,110,.08)!important
}
body[data-md-route="study"] .answer-bar{
  display:flex;gap:12px;align-items:center;margin-top:19px;padding-top:17px;border-top:1px solid var(--md-line)
}
body[data-md-route="study"] .countdown{color:#8b6a30;font-size:12px}
body[data-md-route="study"] #complete-card{text-align:center;padding:40px!important}
body[data-md-route="study"] #complete-card:before{
  content:"✓";display:grid;place-items:center;width:56px;height:56px;border-radius:18px;
  margin:0 auto 14px;background:#eaf7f1;color:var(--md-success);font-size:27px;font-weight:900
}

/* Admin */
body.md-admin .md-sidebar{background:linear-gradient(180deg,#fff,#fafcfb)}
body.md-admin .md-brand-mark:after{background:linear-gradient(180deg,#2d4f59,var(--md-copper))}
body.md-admin .md-page-banner:after{
  content:"Administrator";display:inline-flex;padding:6px 9px;border:1px solid #eadbc9;
  border-radius:999px;background:#fff8ef;color:#9d642b;font-size:11px;font-weight:800
}
body.md-admin .card h2{font-size:18px}
body.md-admin .grid .metric,
body.md-admin .grid .item{min-height:92px}
body.md-admin .settings{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important
}
body.md-admin .setting{padding:15px!important}
body.md-admin .status{
  border-radius:13px!important;padding:11px 14px!important;background:#f4f8f6!important
}
body.md-admin .status.good{
  background:#eaf8f1!important;border:1px solid #d2eadf!important;color:#156d52!important
}

/* Auth */
.md-auth-page{min-height:100vh}
.md-auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(360px,.92fr) 1.08fr}
.md-auth-side{
  position:relative;overflow:hidden;padding:40px 48px;display:flex;flex-direction:column;justify-content:space-between;
  background:
    radial-gradient(circle at 14% 16%,rgba(15,118,110,.16),transparent 19rem),
    radial-gradient(circle at 92% 86%,rgba(194,123,56,.12),transparent 20rem),
    linear-gradient(145deg,#f5faf7,#edf4f1);
  border-right:1px solid #dce7e2
}
.md-auth-side:before,.md-auth-side:after{
  content:"";position:absolute;border:1px solid rgba(15,118,110,.12);border-radius:50%;pointer-events:none
}
.md-auth-side:before{width:320px;height:320px;right:-190px;top:15%}
.md-auth-side:after{width:430px;height:430px;left:-250px;bottom:-180px}
.md-auth-message{position:relative;z-index:1;max-width:520px}
.md-auth-message .md-kicker{margin-bottom:10px}
.md-auth-message h2{font-size:42px;letter-spacing:-1.6px;margin:0 0 15px}
.md-auth-message p{font-size:16px;color:#62736e;max-width:460px}
.md-auth-points{display:grid;gap:12px;margin-top:26px}
.md-auth-point{display:flex;align-items:flex-start;gap:10px;color:#53645f;font-size:13px}
.md-auth-point i{
  width:26px;height:26px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;
  background:#fff;color:var(--md-primary);box-shadow:var(--md-shadow-xs);font-style:normal;font-weight:900
}
.md-auth-foot{position:relative;z-index:1;color:#8b9995;font-size:11px}
.md-auth-panel{display:grid;place-items:center;padding:38px;background:rgba(255,255,255,.68)}
.md-auth-panel .box{
  width:min(490px,100%)!important;max-width:none!important;margin:0!important;
  background:#fff!important;padding:31px!important;border-radius:22px!important;
  border:1px solid var(--md-line)!important;box-shadow:var(--md-shadow-lg)!important
}
.md-auth-panel .box>h1{display:none}
.md-auth-panel .box>h2,.md-auth-panel .box>h1:first-child{
  font-size:29px!important;letter-spacing:-.8px;margin:8px 0 18px!important
}
.md-auth-panel .box label{display:block;margin:13px 0 6px!important;font-size:12px}
.md-auth-panel .box button[type="submit"]{width:100%;margin-top:17px!important}
.md-auth-panel .langs{
  display:flex!important;gap:6px!important;flex-wrap:wrap!important;margin-bottom:18px!important
}
.md-auth-panel .langs a{
  padding:5px 7px!important;border-radius:8px!important;background:#f5f7f6!important;
  color:#667570!important;border:1px solid var(--md-line)!important;font-size:10px!important;font-weight:800
}
.md-auth-panel .langs a.active{
  background:#eaf7f3!important;color:var(--md-primary-dark)!important;border-color:#cfe9e1!important
}

/* Public site */
.md-public{background:#f7faf8!important}
.md-public-header{
  height:72px;position:sticky;top:0;z-index:30;background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px);border-bottom:1px solid var(--md-line)
}
.md-public-nav{
  width:min(1220px,calc(100% - 36px));height:100%;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px
}
.md-public-links{display:flex;align-items:center;gap:25px;font-size:13px;font-weight:700;color:#61706c}
.md-public-actions{display:flex;gap:9px;align-items:center}
.md-public-main{overflow:hidden}
.md-hero{
  width:min(1220px,calc(100% - 36px));margin:auto;padding:72px 0 44px;
  display:grid;grid-template-columns:1fr .92fr;gap:56px;align-items:center
}
.md-hero h1{font-size:56px!important;line-height:1.02!important;letter-spacing:-2.5px!important;margin:15px 0!important}
.md-hero .md-lead{font-size:18px;color:#62736e;max-width:650px}
.md-hero-actions{display:flex;gap:10px;margin-top:25px;flex-wrap:wrap}
.md-trust-row{display:flex;gap:17px;flex-wrap:wrap;margin-top:24px;color:#70807b;font-size:12px}
.md-trust-row span{display:flex;gap:6px;align-items:center}
.md-trust-row span:before{content:"✓";color:var(--md-success);font-weight:900}
.md-hero-visual{
  position:relative;min-height:430px;border-radius:30px;
  background:
    radial-gradient(circle at 50% 38%,rgba(15,118,110,.11),transparent 12rem),
    linear-gradient(145deg,#eef8f5,#f9fbfa);
  border:1px solid #dbe8e3;box-shadow:var(--md-shadow);overflow:hidden
}
.md-hero-orbit{
  position:absolute;border:1px dashed rgba(15,118,110,.22);border-radius:50%;
  width:300px;height:300px;left:50%;top:50%;transform:translate(-50%,-50%)
}
.md-hero-person{
  position:absolute;width:130px;height:130px;border-radius:42% 42% 48% 48%;
  left:50%;top:50%;transform:translate(-50%,-44%);
  background:linear-gradient(145deg,#194b4a,#0f766e);
  box-shadow:0 25px 50px rgba(15,118,110,.2)
}
.md-hero-person:before{
  content:"";position:absolute;width:72px;height:72px;border-radius:50%;left:29px;top:-48px;
  background:linear-gradient(145deg,#d8a67d,#efc09c);box-shadow:0 0 0 11px #244d48
}
.md-float-card{
  position:absolute;min-width:150px;padding:14px;border-radius:16px;background:rgba(255,255,255,.94);
  border:1px solid var(--md-line);box-shadow:var(--md-shadow);font-size:12px;color:#61716c
}
.md-float-card strong{display:block;font-size:20px;color:var(--md-text);margin-top:3px}
.md-float-card--a{top:44px;left:32px}
.md-float-card--b{right:28px;top:96px}
.md-float-card--c{left:48px;bottom:43px}
.md-float-card--d{right:35px;bottom:54px}
.md-public-section{padding:52px 0}
.md-public-section>.md-container{width:min(1220px,calc(100% - 36px));margin:auto}
.md-section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:20px}
.md-section-head h2{font-size:34px;letter-spacing:-1.15px;margin:0}
.md-section-head p{margin:6px 0 0;color:#71807c}
.md-feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}
.md-feature{
  padding:22px;background:#fff;border:1px solid var(--md-line);border-radius:20px;box-shadow:var(--md-shadow-xs)
}
.md-feature-icon{
  width:44px;height:44px;display:grid;place-items:center;border-radius:13px;
  color:var(--md-primary);background:#eaf7f3;margin-bottom:16px
}
.md-feature h3{margin:0 0 8px;font-size:18px}
.md-feature p{margin:0;color:#6e7e79;font-size:13px}
.md-how{
  display:grid;grid-template-columns:repeat(3,1fr);gap:15px
}
.md-step{position:relative;padding:23px 20px 20px 66px;border-radius:18px;background:#fff;border:1px solid var(--md-line)}
.md-step-num{
  position:absolute;left:18px;top:20px;width:34px;height:34px;display:grid;place-items:center;
  border-radius:11px;background:#edf8f5;color:var(--md-primary-dark);font-weight:900
}
.md-cta{
  width:min(1220px,calc(100% - 36px));margin:24px auto 52px;padding:32px;
  display:flex;align-items:center;justify-content:space-between;gap:25px;border-radius:25px;
  color:#fff;background:
    radial-gradient(circle at 92% 15%,rgba(255,255,255,.15),transparent 12rem),
    linear-gradient(135deg,#0c655e,#174b51 62%,#9b6537);
  box-shadow:0 20px 48px rgba(23,77,72,.15)
}
.md-cta h2{margin:0 0 7px;color:#fff;font-size:29px}
.md-cta p{margin:0;color:#deeeea;max-width:670px}
.md-public-footer{border-top:1px solid var(--md-line);background:#fff}
.md-public-footer-inner{
  width:min(1220px,calc(100% - 36px));margin:auto;padding:30px 0;
  display:flex;align-items:center;justify-content:space-between;gap:20px;color:#7b8985;font-size:11px
}

/* Toast + confirmation dialog */
.md-toast{
  position:fixed;right:20px;bottom:20px;z-index:200;max-width:min(360px,calc(100% - 40px));
  padding:11px 14px;border-radius:12px;background:#18312d;color:#fff;
  box-shadow:var(--md-shadow-lg);font-size:12px;font-weight:700;
  opacity:0;transform:translateY(8px);pointer-events:none;transition:.2s
}
.md-toast.show{opacity:1;transform:translateY(0)}
.md-drawer-backdrop{
  display:none;position:fixed;inset:0;background:rgba(15,28,25,.32);z-index:38;backdrop-filter:blur(2px)
}
.md-confirm{
  border:0;padding:0;border-radius:20px;box-shadow:var(--md-shadow-lg);width:min(430px,calc(100% - 28px))
}
.md-confirm::backdrop{background:rgba(18,31,28,.36);backdrop-filter:blur(3px)}
.md-confirm-box{padding:23px;background:#fff}
.md-confirm-box h3{margin:0 0 8px}
.md-confirm-box p{margin:0;color:#6b7b76;font-size:13px}
.md-confirm-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}

/* Responsive */
@media(max-width:1080px){
  :root{--md-sidebar:224px}
  .md-profile-copy{display:none}
  .md-public-links{gap:15px}
  .md-hero{gap:30px}
}
@media(max-width:900px){
  .md-app-shell{display:block}
  .md-sidebar{
    position:fixed;left:0;top:0;bottom:0;width:min(290px,84vw);height:100vh;
    transform:translateX(-102%);transition:transform .22s ease;box-shadow:var(--md-shadow-lg)
  }
  body.md-sidebar-open .md-sidebar{transform:translateX(0)}
  body.md-sidebar-open .md-drawer-backdrop{display:block}
  .md-mobile-toggle{display:grid}
  .md-content{padding:0 18px 35px}
  .md-topbar{padding:0 18px}
  .wrap{width:100%!important}
  .md-auth-shell{grid-template-columns:1fr}
  .md-auth-side{display:none}
  .md-auth-panel{min-height:100vh;padding:24px}
  .md-hero{grid-template-columns:1fr;padding-top:48px}
  .md-hero-visual{min-height:380px}
  .md-public-links{display:none}
  .md-feature-grid,.md-how{grid-template-columns:1fr 1fr}
  body[data-md-route="studies"] .wrap{grid-template-columns:1fr}
  body.md-admin .settings{grid-template-columns:1fr!important}
}
@media(max-width:620px){
  .md-content{padding:0 12px 28px}
  .md-topbar{padding:0 12px;height:62px}
  .md-page-banner{padding:20px 0 13px}
  .md-page-banner h1{font-size:26px!important}
  .md-table-search{display:none}
  .card{padding:16px!important;border-radius:15px!important}
  .stats,.wallets,.grid{grid-template-columns:1fr!important}
  .md-auth-panel{padding:12px}
  .md-auth-panel .box{padding:23px 18px!important;border-radius:18px!important}
  .md-public-nav{width:min(100% - 22px,1220px)}
  .md-public-actions .md-secondary-action{display:none}
  .md-hero{width:min(100% - 22px,1220px);padding:39px 0 32px}
  .md-hero h1{font-size:40px!important;letter-spacing:-1.7px!important}
  .md-hero .md-lead{font-size:16px}
  .md-hero-actions{flex-direction:column}
  .md-hero-actions a{width:100%}
  .md-hero-visual{min-height:330px}
  .md-float-card{min-width:124px;padding:10px;font-size:10px}
  .md-float-card strong{font-size:16px}
  .md-float-card--a{left:14px;top:22px}
  .md-float-card--b{right:12px;top:70px}
  .md-float-card--c{left:17px;bottom:30px}
  .md-float-card--d{right:14px;bottom:38px}
  .md-feature-grid,.md-how{grid-template-columns:1fr}
  .md-section-head{align-items:flex-start;flex-direction:column}
  .md-public-section{padding:37px 0}
  .md-public-section>.md-container{width:min(100% - 22px,1220px)}
  .md-cta{width:min(100% - 22px,1220px);padding:24px;align-items:flex-start;flex-direction:column}
  .md-public-footer-inner{width:min(100% - 22px,1220px);align-items:flex-start;flex-direction:column}
  .md-copy-wrap{flex-direction:column}
  .md-copy-wrap button{width:100%}
  body[data-md-route="study"] .card{padding:19px!important}
}
