/* Earn-first credits page: existing Permutis tokens work in light and dark mode. */
.ce-page { max-width: 1160px; padding-top: 36px; padding-bottom: 70px; }
.ce-page [hidden] { display: none !important; }
.ce-page p { color: var(--text); line-height: 1.7; }
.ce-page a:focus-visible, .ce-page button:focus-visible, .ce-page input:focus-visible, .ce-page select:focus-visible, .ce-page summary:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
.ce-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; padding: 64px 0 60px; }
.ce-eyebrow { display: flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.ce-eyebrow::before { content: ''; width: 9px; height: 9px; background: var(--green); border-radius: 50%; }
.ce-hero h1 { margin: 22px 0; color: var(--text); font-size: clamp(2.25rem, 4.4vw, 3.75rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 750; text-wrap: balance; }
.ce-hero p { font-size: 1.05rem; max-width: 540px; }
.ce-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 28px; }
.ce-primary { display: inline-flex; justify-content: center; align-items: center; padding: 14px 22px; border-radius: 12px; background: var(--green); color: var(--bg); font-weight: 750; text-decoration: none; }
html[data-theme="light"] .ce-primary { color: var(--text-on-dark); }
.ce-text-link { color: var(--text); text-decoration: underline; text-underline-offset: 5px; font-weight: 650; }
.ce-example { position: relative; padding: 32px; border: 1px solid var(--border-strong); background: linear-gradient(155deg,var(--surface-2),var(--surface)); border-radius: 28px; box-shadow: 0 20px 65px color-mix(in srgb, var(--bg) 50%, transparent); }
.ce-example::before { content:''; position:absolute; inset: -12px 18px 12px; border: 1px solid var(--border); border-radius: 28px; z-index: -1; transform: rotate(-4deg); }
.ce-example-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.ce-example-amount { font-size: clamp(3rem, 7vw, 5rem); font-weight: 750; letter-spacing: -.05em; line-height: 1.1; margin: 24px 0 8px; }
.ce-example h2 { font-size: 1.1rem; margin: 0; }
.ce-example-math { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-strong); gap: 10px; }
.ce-example-math strong { display:block; font-size: 1.4rem; }
.ce-example-math span { font-size: .8rem; }
.ce-strip { display: grid; grid-template-columns: repeat(3,1fr); padding: 22px 0; gap: 20px; border-block: 1px solid var(--border-strong); }
.ce-strip p { margin: 0; font-weight: 650; font-size:.9rem; display:flex; align-items:center; gap:12px; }
.ce-strip p::before { content: '✓'; border: 1px solid var(--green); border-radius:50%; min-width:25px; height:25px; display:grid; place-items:center; }
.ce-section { padding: 65px 0 0; scroll-margin-top: 100px; }
.ce-section-head { display:flex; justify-content:space-between; gap:24px; align-items:end; margin-bottom:24px; }
.ce-section h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height:1.2; letter-spacing:-.025em; margin:10px 0; }
.ce-section-head p { max-width:500px; margin:0; font-size:.94rem; }
.ce-step-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.ce-step { padding:25px; border:1px solid var(--border); background:var(--surface); border-radius:18px; }
.ce-step-no { font-family:monospace; font-size:.85rem; border-bottom:2px solid var(--green); padding-bottom:6px; display:inline-block; }
.ce-step h3 { font-size:1.05rem; margin:25px 0 8px; }
.ce-step p { font-size:.9rem; margin:0; }
.ce-simulator { display:grid; grid-template-columns:1fr 1fr; gap:36px; padding:32px; margin-top:24px; background:var(--surface-2); border:1px solid var(--border); border-radius:20px; }
.ce-simulator label { display:block; font-weight:650; margin:15px 0; }
.ce-simulator input[type="range"] { width:100%; accent-color:var(--green); height:26px; cursor:pointer; }
.ce-range-ends { display:flex; justify-content:space-between; font-size:.8rem; }
.ce-sim-result { border-inline-start:1px solid var(--border-strong); padding-inline-start:36px; display:flex; flex-direction:column; justify-content:center; }
.ce-sim-result output { font-size:3.4rem; font-weight:750; letter-spacing:-.045em; }
.ce-sim-result p { font-size:.85rem; margin:8px 0 0; }
.ce-rewards { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-top:20px; }
.ce-reward { padding:18px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.ce-reward strong { display:block; font-size:1.6rem; margin-bottom:8px; }
.ce-note { font-size:.83rem; margin-top:15px; }
.ce-terms { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.ce-terms article { border-top:2px solid var(--border-strong); padding:20px 0; }
.ce-terms h3 { font-size:1.05rem; }
.ce-terms p { font-size:.9rem; }
.ce-optional { margin-top:55px; border:1px solid var(--border-strong); border-radius:20px; padding:24px; background:var(--surface); scroll-margin-top:100px; }
.ce-optional summary { font-size:1.15rem; font-weight:650; cursor:pointer; }
.ce-optional .cr-buy-grid { grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); }
.ce-optional .cr-pkg-card { box-shadow:none; background:var(--bg); }
.ce-optional .cr-pkg-btn { background:transparent; border:1px solid var(--border-strong); color:var(--text); }
.ce-wallet { margin-top:50px; scroll-margin-top:100px; }
.ce-wallet .cr-hero { border-radius:20px; }
.ce-wallet .msg-gate { padding:24px 0; min-height:0; }
.ce-wallet .msg-gate-card { text-align:start; max-width:none; width:100%; }
.ce-wallet .cr-hero-icon, .ce-wallet .msg-gate-icon { display:none; }
.ce-live-rules { padding:18px; border-inline-start:3px solid var(--green); background:var(--surface); border-radius:0 12px 12px 0; }
.ce-page .cr-hero-hint,.ce-page .cr-pkg-per-credit,.ce-page .cr-pkg-unit { color:var(--text); }
.ce-page .cr-buy-modal { color:var(--text); }
@media (max-width: 800px) {
  .ce-hero { grid-template-columns:1fr; gap:30px; padding-top:30px; }
  .ce-example { max-width:none; }
  .ce-step-grid { grid-template-columns:1fr; }
  .ce-step { display:grid; grid-template-columns:35px 1fr; column-gap:15px; }
  .ce-step-no { grid-row:span 2; align-self:start; }
  .ce-step h3 { margin:0 0 8px; }
  .ce-section-head { display:block; }
  .ce-strip { grid-template-columns:1fr; gap:12px; }
}
@media (max-width: 520px) {
  .ce-page { padding-inline:18px; }
  .ce-hero { padding-bottom:32px; }
  .ce-section { padding-top:40px; }
  .ce-example,.ce-simulator { padding:23px; }
  .ce-simulator,.ce-terms { grid-template-columns:1fr; gap:20px; }
  .ce-sim-result { border-inline-start:0; border-top:1px solid var(--border-strong); padding-inline-start:0; padding-top:20px; }
  .ce-optional { padding:20px; }
  .ce-actions { gap:16px; }
  .ce-primary { width:100%; }
}
@media(prefers-reduced-motion:reduce) { .ce-page * { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }

.ce-addon-form { margin-top:24px; padding:24px; background:var(--surface); border:1px solid var(--border-strong); border-radius:18px; }
.ce-addon-form label { display:block; margin:16px 0 8px; }
.ce-addon-form select { width:100%; }
.ce-page button.ce-primary { border:0; cursor:pointer; }
.ce-page button:disabled { opacity:.55; cursor:default; }
.ce-reward button { margin-top:16px; }
