/* Multiply My Traffic - sign-in pages (login, forgot / reset password) and the logged-in member shell.
   Loaded after mmt-modern.css. External file on purpose: the PHP template engine strips {...} blocks from templates. */

/* ---------- sign-in pages ---------- */
.auth { display: flex; justify-content: center; padding: 28px 0 64px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); }
.auth-card .lede { font-size: 1.02rem; margin-bottom: 18px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; font-size: .96rem; }
.auth-alt { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; color: var(--ink-soft); font-size: .98rem; }
.is-hidden { display: none; }
.notice-ok { background: #eafaf3; border-color: #b9e8d3; color: #0b5d43; }
.notice-ok a { color: #0b5d43; }
.notice-err { background: #fdeceb; border-color: #f4b8b4; color: #8a1c14; }
.notice-err a { color: #8a1c14; }

/* ---------- site shell for member + public legacy pages (templates/main.html, main.not.logged.in.html) ----------
   Mobile first: the menu is closed behind a Menu button on phones/tablets and wraps (no scrollbar) on desktop. */
body.member { background: var(--paper); overflow-x: hidden; }
.member-head { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.member-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.member-head .head-actions { gap: 10px; }
.nav-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: 700 .95rem var(--font-body); cursor: pointer; }
.nav-toggle:hover { background: var(--blue-wash); }
.nav-toggle .bars { position: relative; display: inline-block; width: 18px; height: 2px; background: currentColor; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.mmt-nav-bar { display: none; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-open .mmt-nav-bar { display: block; }
.mmt-nav { font-size: 0; max-width: 1120px; margin: 0 auto; padding: 6px 20px 12px; }
.mmt-nav a { display: block; font-size: 1.02rem; font-weight: 600; line-height: 1.25; text-decoration: none; color: var(--ink); padding: 13px 8px; border-radius: 8px; }
.mmt-nav a + a { border-top: 1px solid var(--line); }
.mmt-nav a:hover { background: var(--blue-wash); color: var(--blue-deep); }
.mmt-nav strong { font-size: 0; }
.member-main { padding: 18px 0 48px; }
.member-foot { padding: 26px 0 40px; color: var(--ink-soft); font-size: .9rem; text-align: center; }
.member-foot a { color: var(--ink-soft); }

/* content card: one type scale for every page, including old pages that still carry inline fonts, sizes and fixed widths */
.mmt-content { background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 18px 14px; overflow-x: auto; font-size: 1rem; line-height: 1.6; color: var(--ink); }
.mmt-content, .mmt-content * { font-family: var(--font-body) !important; }
.mmt-content h1, .mmt-content h2, .mmt-content h3, .mmt-content h4 { font-family: var(--font-display) !important; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); margin: 0 0 .6em; }
.mmt-content h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); font-weight: 800; }
.mmt-content h2 { font-size: clamp(1.3rem, 4vw, 1.6rem); font-weight: 700; }
.mmt-content h3, .mmt-content h4 { font-size: 1.15rem; font-weight: 700; }
.mmt-content font, .mmt-content span[style*="font-size"], .mmt-content p[style*="font-size"], .mmt-content div[style*="font-size"], .mmt-content td[style*="font-size"] { font-size: inherit !important; }
.mmt-content p { margin: 0 0 1em; }
.mmt-content a { color: var(--blue); }
.mmt-content a:hover { color: var(--blue-deep); }
.mmt-content img, .mmt-content iframe, .mmt-content video, .mmt-content embed, .mmt-content object { max-width: 100%; height: auto; }
.mmt-content table { max-width: 100%; border-collapse: collapse; }
.mmt-content td, .mmt-content th { padding: 6px 8px; vertical-align: top; }
.mmt-content hr { border: 0; border-top: 1px solid var(--line); }
.mmt-content input[type=text], .mmt-content input[type=password], .mmt-content input[type=email], .mmt-content input[type=url], .mmt-content input[type=number], .mmt-content select, .mmt-content textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; background: var(--white); color: var(--ink); }
.mmt-content textarea { width: 100%; }
.mmt-content input[type=submit], .mmt-content input[type=button], .mmt-content button { font: inherit; font-weight: 700; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; cursor: pointer; }
.mmt-content input[type=submit]:hover, .mmt-content input[type=button]:hover, .mmt-content button:hover { background: var(--blue-deep); }

@media (min-width: 640px) {
  .mmt-content { padding: 26px; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .mmt-nav-bar { display: block; }
  .mmt-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 8px 20px; }
  .mmt-nav a { display: inline-block; font-size: .96rem; color: var(--ink-soft); padding: 8px 14px; border-radius: 999px; }
  .mmt-nav a + a { border-top: 0; }
  .member-main { padding-top: 26px; }
}

/* ---------- buy ad credits + create password (member content) ---------- */
.page-title { font-size: clamp(1.6rem, 5vw, 2.1rem); margin: 0 0 6px; }
.page-sub { color: var(--ink-soft); margin: 0 0 20px; max-width: 46em; }
.plan-section { margin: 26px 0 8px; }
.plan-section h2 { font-size: 1.3rem; margin: 0 0 4px; }
.plan-section p.note { color: var(--ink-soft); margin: 0 0 14px; font-size: .98rem; }
.plan-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.plan { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.plan .amt { font: 800 1.6rem var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.plan .amt small { font: 600 .9rem var(--font-body); color: var(--ink-soft); letter-spacing: 0; }
.plan .credits { font-weight: 700; }
.plan .views { color: var(--ink-soft); font-size: .95rem; }
.plan .pay { margin-top: auto; padding-top: 10px; }
.plan .pay img { max-width: 100%; height: auto; }
.plan .pay form { margin: 0; }
.pass-card { max-width: 440px; }

@media (min-width: 640px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .mmt-content { padding: 28px; }
}
@media (min-width: 960px) {
  .plan-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- after-login welcome / admin message (templates/after_login_modern.html) ---------- */
.mmt-content a.btn { color: #fff; text-decoration: none; }
.mmt-content a.btn:hover { color: #fff; }
.mmt-content .btn { width: auto; display: inline-flex; padding: 0 22px; }
.msg-body .lede { color: var(--ink-soft); font-size: 1.05rem; max-width: 40em; }
.steps { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 14px 16px 14px 58px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 1rem var(--font-display); display: grid; place-items: center; }
.steps strong { display: block; font-size: 1.08rem; margin-bottom: 2px; }
.steps p { margin: 0 0 6px; color: var(--ink-soft); }
.steps a { font-weight: 700; }
.callout { border-radius: 12px; background: var(--blue-wash); padding: 14px 16px; margin: 18px 0; }
.callout h3 { margin: 0 0 6px; font-size: 1.05rem; }
.callout ul { margin: 6px 0 0; padding-left: 1.2em; }
.callout li { margin: 4px 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }

/* ---------- welcome splash (after_login message 8) ---------- */
.welcome { max-width: 860px; margin: 0 auto; }
.welcome-hero { border-radius: 16px; background: linear-gradient(165deg, #1a2fa8, #2745e6); color: #fff; padding: 24px 20px 22px; margin: 0 0 22px; }
.welcome-hero .chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 5px 12px; font-size: .88rem; font-weight: 700; }
.welcome-hero .chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #5ff0bd; }
.welcome-hero h1 { color: #fff; margin: 14px 0 8px; font-size: clamp(1.7rem, 6vw, 2.5rem); }
.welcome-hero p { color: #dbe3ff; margin: 0 0 18px; max-width: 34em; font-size: 1.05rem; }
.welcome-hero .btn-row { margin-top: 4px; }
.mmt-content .welcome-hero a.btn-ghost-light { color: #fff; background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.mmt-content .welcome-hero a.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); }
.welcome h2 { font-size: 1.35rem; margin: 26px 0 12px; }
.steps li { background: var(--white); box-shadow: 0 1px 2px rgba(18, 32, 58, .05); }
.steps .ico { display: none; }
.tiles { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0 0 8px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); }
.tile svg { width: 28px; height: 28px; stroke: var(--blue); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.tile strong { display: block; margin-bottom: 2px; }
.tile p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.fine { color: var(--ink-soft); font-size: .92rem; margin: 18px 0 0; }
@media (min-width: 640px) { .welcome-hero { padding: 30px 32px; } .tiles { grid-template-columns: repeat(3, 1fr); } }

/* ---------- old member pages on phones: same content, fluid layout (CSS only) ---------- */
@media (max-width: 720px) {
  .mmt-content table, .mmt-content table[width], .mmt-content div[style*="width"] { max-width: 100% !important; }
  .mmt-content table[width] { width: 100% !important; }
  .mmt-content td[width], .mmt-content th[width] { width: auto !important; }
  .mmt-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* forms laid out in tables: label above field */
  .mmt-content table:has(input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], select, textarea) { display: table; table-layout: auto; }
  .mmt-content table:has(input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], select, textarea) > tbody,
  .mmt-content table:has(input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], select, textarea) > thead,
  .mmt-content table:has(input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], select, textarea) > tfoot { display: block; }
  .mmt-content table:has(input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], select, textarea) tr { display: block; margin-bottom: 6px; }
  .mmt-content table:has(input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], select, textarea) td { display: block; width: 100% !important; text-align: left !important; padding: 3px 0; }
  .mmt-content input[type=text], .mmt-content input[type=password], .mmt-content input[type=email], .mmt-content input[type=url], .mmt-content input[type=number], .mmt-content select, .mmt-content textarea { width: 100%; max-width: 100%; }
  .mmt-content input[size] { width: 100%; }
  .mmt-content pre, .mmt-content code { white-space: pre-wrap; word-break: break-word; }
  .mmt-content p, .mmt-content li, .mmt-content td { overflow-wrap: anywhere; }
  /* inline widths and negative margins from the old pages (for example a 650 px textarea inside a box with margin 0 -115px) */
  .mmt-content [style*="width"] { max-width: 100% !important; box-sizing: border-box; }
  .mmt-content textarea[style*="width"], .mmt-content input[style*="width"], .mmt-content select[style*="width"] { width: 100% !important; }
  .mmt-content div[style*="margin"] { margin-left: 0 !important; margin-right: 0 !important; }
  .mmt-content [style*="float"] { float: none !important; }
  .mmt-content [style*="position: absolute"], .mmt-content [style*="position:absolute"] { position: static !important; }
}
