@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root{

  /* ===== color — warm-neutral dark, one quiet accent, no glow ===== */
  --bg:#0a0a09;
  --sidebar:#0d0d0c;
  --surface:#141412;
  --surface-2:#1a1a17;
  --surface-3:#212120;
  --border:rgba(242,242,237,.08);
  --border-strong:rgba(242,242,237,.16);

  --text:#f2f2ed;
  --muted:#96968d;
  --muted-dim:#5c5c56;

  --accent:#c9c39a;       /* warm dulled brass — used sparingly, never glowing */
  --accent-dim:rgba(201,195,154,.14);

  --white:#f2f2ed;

  /* ===== type ===== */
  --font-display:'Fraunces',serif;
  --font-body:'Inter',sans-serif;
  --font-mono:'IBM Plex Mono',monospace;

  /* ===== motion — restrained, no spring-bounce ===== */
  --speed:.15s;
  --speed-slow:.32s;
  --curve:cubic-bezier(.4,0,.2,1);

}


*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}


body{
  height:100vh;
  display:flex;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  overflow:hidden;
}

a{
  text-decoration:none;
  color:inherit;
}

button{
  font:inherit;
  color:inherit;
  background:none;
  border:none;
  cursor:pointer;
}

:focus-visible{
  outline:1.5px solid var(--accent);
  outline-offset:2px;
}


@media (prefers-reduced-motion:reduce){
  *{
    animation-duration:.001s !important;
    transition-duration:.001s !important;
  }
}

body.force-reduce-motion *{
  animation-duration:.001s !important;
  transition-duration:.001s !important;
}



/* ============ SIDEBAR ============ */
/* always legible — icon + label, no hover-to-reveal. */

.sidebar{
  width:216px;
  height:100vh;
  flex-shrink:0;
  background:var(--sidebar);
  border-right:1px solid var(--border);
  padding:22px 14px;
  position:relative;
  z-index:10;
  display:flex;
  flex-direction:column;
}

.side-content{
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
}


.brand{
  display:flex;
  align-items:baseline;
  gap:2px;
  margin-bottom:8px;
  padding:0 6px;
}

.mark{
  display:none;
}

.brand-name{
  font-family:var(--font-display);
  font-size:22px;
  font-weight:600;
  letter-spacing:-.01em;
  color:var(--text);
}

.brand-dot{
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--accent);
  margin-left:5px;
  margin-bottom:3px;
}

.brand-tag{
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted-dim);
  padding:0 6px 22px;
  border-bottom:1px solid var(--border);
  margin-bottom:18px;
}


nav{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.bottom{
  margin-top:auto;
  padding-top:14px;
}

.legal-container{
    margin-top:2px;
}


.legal-toggle{
    height:40px;
    border-radius:8px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 10px;
    color:var(--muted);
    transition:background var(--speed) var(--curve), color var(--speed) var(--curve);
}

.legal-toggle svg{
    width:16px;
    height:16px;
    opacity:.6;
    transition:opacity var(--speed) var(--curve);
}

.legal-toggle span{
    font-size:13px;
}

.legal-toggle:hover{
    background:var(--surface);
    color:var(--text);
}

.legal-toggle:hover svg{
    opacity:1;
}


/* actual legal links row (shown instead of toggle since sidebar is always expanded) */
.legal-row{
    display:flex;
    align-items:center;
    gap:6px;
    padding:8px 10px 2px;
}

.legal-toggle{
    display:none;
}

.legal-row a{
    font-family:var(--font-mono);
    font-size:10.5px;
    letter-spacing:.02em;
    color:var(--muted-dim);
    transition:color var(--speed) var(--curve);
}

.legal-row a:hover{
    color:var(--muted);
}

.legal-dot{
  font-size:10px;
  color:var(--muted-dim);
}


nav a,
.bottom > a{
  height:40px;
  border-radius:8px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 10px;
  color:var(--muted);
  cursor:pointer;
  position:relative;
  transition:background var(--speed) var(--curve), color var(--speed) var(--curve);
}

.icon-slot{
  position:relative;
  width:17px;
  height:17px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.icon-slot svg{
  width:17px;
  height:17px;
  flex-shrink:0;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.75;
  transition:opacity var(--speed) var(--curve);
}

.lock{
  position:absolute;
  top:-5px;
  right:-7px;
  width:11px;
  height:11px;
  border-radius:50%;
  background:var(--sidebar);
  border:1px solid var(--border-strong);
  display:flex;
  align-items:center;
  justify-content:center;
}

.lock svg{
  width:6px;
  height:6px;
  fill:none;
  stroke:var(--muted);
  stroke-width:1.8;
  opacity:1;
}

nav a span,
.bottom a span{
  font-size:13.5px;
  font-weight:500;
  white-space:nowrap;
}

nav a:hover,
.bottom a:hover{
  background:var(--surface);
  color:var(--text);
}

nav a:hover .icon-slot svg,
.bottom a:hover .icon-slot svg{
  opacity:1;
}

nav a.active,
.bottom a.active{
  background:var(--surface-2);
  color:var(--text);
}

nav a.active .icon-slot svg,
.bottom a.active .icon-slot svg{
  opacity:1;
  stroke:var(--accent);
}

nav a.active::before,
.bottom a.active::before{
  content:'';
  position:absolute;
  left:-14px;
  top:8px;
  bottom:8px;
  width:2px;
  border-radius:2px;
  background:var(--accent);
}



/* ============ MAIN / HOME ============ */

main{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow-y:auto;
}

main:has(.proxy-panel.active){
    padding:0;
    overflow:hidden;
    align-items:stretch;
    justify-content:stretch;
}

.panel{
  display:none;
}

.panel.active{
  display:flex;
}



.home{
  width:min(1180px,88%);
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:0;
  padding:64px 0 48px;
  position:relative;
  z-index:1;
}

/* generic centered panels: watch / games / music / ai / chat / settings / legal / dmca / privacy */
.simple-panel,
.settings-panel,
.doc-panel{
  width:min(560px,86%);
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:6px;
}

.simple-panel .panel-icon{
  width:56px;
  height:56px;
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:18px;
  position:relative;
}

.simple-panel .panel-icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:var(--text);
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.85;
}

.simple-panel .panel-icon.locked svg{
  opacity:.35;
}

.lock.big{
  width:20px;
  height:20px;
  position:absolute;
  top:-7px;
  right:-7px;
  background:var(--surface-2);
  border:1px solid var(--border-strong);
}

.lock.big svg{
  width:10px;
  height:10px;
}

.simple-panel h2,
.settings-panel h2,
.doc-panel h2{
  font-family:var(--font-display);
  font-size:28px;
  font-weight:600;
  letter-spacing:-.01em;
  color:var(--white);
}

.simple-panel p,
.doc-panel p{
  font-size:14.5px;
  line-height:1.6;
  color:var(--muted);
  max-width:380px;
}

.settings-panel{
  gap:24px;
  align-items:stretch;
  text-align:left;
}

.settings-panel h2{
  text-align:center;
}

.settings-list{
  display:flex;
  flex-direction:column;
  gap:1px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:var(--surface);
}

.settings-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:15px 16px;
  border-bottom:1px solid var(--border);
}

.settings-row:last-child{
  border-bottom:none;
}

.settings-row strong{
  display:block;
  font-size:13.5px;
  font-weight:600;
}

.settings-row span{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.switch{
  width:34px;
  height:20px;
  border-radius:100px;
  background:var(--surface-3);
  border:1px solid var(--border-strong);
  flex-shrink:0;
  position:relative;
  transition:background var(--speed) var(--curve);
}

.switch::before{
  content:'';
  position:absolute;
  top:2px;
  left:2px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--muted);
  transition:transform var(--speed) var(--curve), background var(--speed) var(--curve);
}

.switch.on{
  background:var(--accent-dim);
  border-color:var(--accent);
}

.switch.on::before{
  background:var(--accent);
  transform:translateX(14px);
}

.doc-panel p{
  max-width:440px;
}


/* ============ HOME — editorial header ============ */

.home-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:40px;
  padding-bottom:28px;
  border-bottom:1px solid var(--border);
  margin-bottom:36px;
}

.home-header .text{
  max-width:600px;
  flex-shrink:0;
}

.eyebrow-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}

.eyebrow-rule{
  width:22px;
  height:1px;
  background:var(--accent);
}

.eyebrow{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--muted);
}

.text h1{
  font-family:var(--font-display);
  font-size:56px;
  font-weight:600;
  letter-spacing:-.02em;
  line-height:1.02;
  color:var(--white);
}

.text h1 em{
  font-style:italic;
  font-weight:500;
  color:var(--accent);
}

#home-tagline{
  font-size:14.5px;
  line-height:1.6;
  color:var(--muted);
  margin-top:14px;
  max-width:420px;
  cursor:default;
  transition:opacity .2s ease, transform .2s ease;
}

.home-tagline.changing {
    opacity:0;
    transform:translateY(6px);
}

.home-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  flex-shrink:0;
  padding-bottom:4px;
}

.home-meta-line{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--muted-dim);
  letter-spacing:.02em;
  white-space:nowrap;
}

.home-meta-line strong{
  color:var(--muted);
  font-weight:500;
}


/* ============ HOME — content grid ============ */

.home-body{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:36px;
  align-items:start;
}

.home-col{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.section-label{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted-dim);
  margin-bottom:2px;
  padding-left:2px;
}

.action-primary{
  min-height:104px;
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  gap:16px;
  padding:20px;
  transition:border-color var(--speed) var(--curve), background var(--speed) var(--curve);
}

.action-primary:hover{
  background:var(--surface-2);
  border-color:var(--border-strong);
}

.action-primary .icon{
  width:42px;
  height:42px;
  border-radius:10px;
  background:var(--surface-3);
  border:1px solid var(--border-strong);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.action-primary .icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:var(--accent);
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.action-primary .copy strong{
  display:block;
  font-family:var(--font-display);
  font-size:19px;
  font-weight:600;
  letter-spacing:-.005em;
}

.action-primary .copy span{
  display:block;
  font-size:12.5px;
  color:var(--muted);
  margin-top:3px;
}


.action-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.action-card{
  min-height:84px;
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--border);
  padding:14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
  transition:border-color var(--speed) var(--curve), background var(--speed) var(--curve);
}

.action-card:hover{
  border-color:var(--border-strong);
  background:var(--surface-2);
}

.action-card svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:var(--text);
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.7;
}

.action-card strong{
  display:block;
  font-size:13px;
  font-weight:600;
  margin-top:10px;
}

.action-card span{
  display:block;
  font-size:11px;
  color:var(--muted-dim);
  margin-top:2px;
}

.index-num{
  position:absolute;
  top:14px;
  right:14px;
  font-family:var(--font-mono);
  font-size:10px;
  color:var(--muted-dim);
}


/* preview panel — replaces the old floating iframe-with-nothing-around-it */
.preview-panel{
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--border);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  height:100%;
}

.preview-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}

.preview-panel-head span{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--muted-dim);
}

.preview-dots{
  display:flex;
  gap:5px;
}

.preview-dots i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--surface-3);
  border:1px solid var(--border-strong);
  display:block;
}

.preview-wrap{
    height:360px;
    overflow:hidden;
}


.preview-frame{
    width:100%;
    height:100%;
    border:none;
    display:block;
}


/* ============ RESPONSIVE ============ */

@media (max-width:960px){

  body{
    flex-direction:column;
  }

  .sidebar{
    width:100%;
    height:auto;
    order:2;
    padding:8px 6px;
    border-right:none;
    border-top:1px solid var(--border);
  }

  .side-content{
    flex-direction:row;
    align-items:center;
    height:100%;
  }

  .brand,
  .brand-tag{
    display:none;
  }

  .legal-row{
    display:none;
  }

  nav{
    flex-direction:row;
    flex:1;
    justify-content:space-around;
    gap:0;
  }

  .bottom{
    margin-top:0;
  }

  nav a span,
  .bottom a span{
    display:none;
  }

  nav a,
  .bottom > a{
    padding:8px;
    height:auto;
  }

  nav a.active::before,
  .bottom a.active::before{
    left:10px;
    right:10px;
    top:auto;
    bottom:0;
    width:auto;
    height:2px;
  }

  main{
    order:1;
    padding:28px 20px;
  }

  .home{
    padding:24px 0 32px;
  }

  .home-header{
    flex-direction:column;
    align-items:flex-start;
    gap:20px;
  }

  .home-meta{
    align-items:flex-start;
  }

  .text h1{
    font-size:38px;
  }

  .home-body{
    grid-template-columns:1fr;
  }

  .preview-wrap{
    min-height:260px;
  }

  .simple-panel,
  .settings-panel,
  .doc-panel{
    width:100%;
  }
}

/* ============ CHANGELOG ============ */

.changelog-overlay{
  position:fixed;
  inset:0;
  z-index:300;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.6);
  backdrop-filter:blur(6px);
  opacity:0;
  transition:opacity var(--speed-slow) var(--curve);
}

.changelog-overlay.open{
  display:flex;
  opacity:1;
}

.changelog-modal{
  width:min(420px,88%);
  max-height:78vh;
  display:flex;
  flex-direction:column;
  background:var(--sidebar);
  border:1px solid var(--border-strong);
  border-radius:14px;
  overflow:hidden;
  position:relative;
  transform:translateY(10px);
  opacity:0;
  transition:transform var(--speed-slow) var(--curve), opacity var(--speed-slow) var(--curve);
}

.changelog-overlay.open .changelog-modal{
  transform:none;
  opacity:1;
}

.changelog-close{
  position:absolute;
  top:16px;
  right:16px;
  z-index:1;
  width:26px;
  height:26px;
  border-radius:7px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  transition:background var(--speed) var(--curve), color var(--speed) var(--curve);
}

.changelog-close:hover{
  background:var(--surface);
  color:var(--text);
}

.changelog-close svg{
  width:13px;
  height:13px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
}

/* ---- header: eyebrow + Fraunces title, echoes .home-header ---- */

.changelog-header{
  padding:26px 26px 20px;
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}

.changelog-eyebrow-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.changelog-eyebrow-rule{
  width:18px;
  height:1px;
  background:var(--accent);
}

.changelog-eyebrow{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--muted);
}

.changelog-header h2{
  font-family:var(--font-display);
  font-size:26px;
  font-weight:600;
  letter-spacing:-.015em;
  color:var(--white);
}

.changelog-version-tag{
  display:inline-block;
  margin-top:10px;
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.02em;
  color:var(--muted-dim);
}

/* ---- body: numbered rows instead of bullet list ---- */

.changelog-body{
  padding:6px 10px;
  overflow-y:auto;
}

.changelog-list{
  display:flex;
  flex-direction:column;
}

.changelog-row{
  display:flex;
  align-items:baseline;
  gap:14px;
  padding:13px 16px;
  border-radius:8px;
  transition:background var(--speed) var(--curve);
}

.changelog-row:hover{
  background:var(--surface);
}

.changelog-row-num{
  flex-shrink:0;
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--accent);
  opacity:.75;
}

.changelog-row-text{
  font-size:13.5px;
  line-height:1.5;
  color:var(--text);
}

/* ---- dev note: labeled aside, echoes .section-label pattern ---- */

.changelog-devnote{
  flex-shrink:0;
  padding:16px 26px 22px;
  border-top:1px solid var(--border);
}

.changelog-devnote-label{
  display:block;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted-dim);
  margin-bottom:8px;
}

.changelog-devnote p{
  font-size:12.5px;
  line-height:1.55;
  color:var(--muted);
}

@media (max-width:960px){

  .changelog-modal{
    width:92%;
  }

  .changelog-header{
    padding:22px 20px 16px;
  }

  .changelog-header h2{
    font-size:22px;
  }

  .changelog-devnote{
    padding:14px 20px 18px;
  }

}
/* ============ BETA TOAST ============ */

.beta-toast{
  position:fixed;
  top:16px;
  right:16px;
  z-index:250;

  display:flex;
  align-items:center;
  gap:12px;

  width:min(340px,86vw);
  padding:12px 12px 12px 14px;

  background:var(--sidebar);

  border:1px solid var(--border-strong);
  border-radius:12px;

  box-shadow:0 12px 28px rgba(0,0,0,.4);

  transform:translateY(-10px);
  opacity:0;
  pointer-events:none;

  transition:
    transform var(--speed-slow) var(--curve),
    opacity var(--speed-slow) var(--curve);
}


.beta-toast.show{
  transform:none;
  opacity:1;
  pointer-events:auto;
}


.beta-toast-icon{
  width:32px;
  height:32px;

  flex-shrink:0;

  border-radius:8px;

  display:flex;
  align-items:center;
  justify-content:center;

  background:var(--surface);
  border:1px solid var(--border);
}


.beta-toast-icon svg{
  width:15px;
  height:15px;

  fill:none;
  stroke:var(--accent);

  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}


.beta-toast-copy{
  flex:1;
  min-width:0;
}


.beta-toast-copy strong{
  display:block;

  font-family:var(--font-display);
  font-size:13px;

  font-weight:600;

  color:var(--white);
}


.beta-toast-copy span{
  display:block;

  margin-top:3px;

  font-size:12px;
  line-height:1.4;

  color:var(--muted);
}


.beta-toast-close{
  width:24px;
  height:24px;

  flex-shrink:0;

  border-radius:6px;

  display:flex;
  align-items:center;
  justify-content:center;

  color:var(--muted);

  transition:
    background var(--speed) var(--curve),
    color var(--speed) var(--curve);
}


.beta-toast-close:hover{
  background:var(--surface-2);
  color:var(--text);
}


.beta-toast-close svg{
  width:12px;
  height:12px;

  fill:none;
  stroke:currentColor;

  stroke-width:2;
  stroke-linecap:round;
}


@media (max-width:960px){

  .beta-toast{
    top:10px;
    left:10px;
    right:10px;
    width:auto;
  }

}

.redeem-modal{
  width:min(380px,88%);
}

.redeem-body{
  padding:20px 26px 26px;
  overflow:visible;
}

.redeem-form{
  display:flex;
  gap:8px;
}

.redeem-input{
  flex:1;
  height:40px;
  padding:0 12px;
  border-radius:8px;
  border:1px solid var(--border-strong);
  background:var(--surface);
  color:var(--text);
  font-family:var(--font-mono);
  font-size:13px;
  letter-spacing:.02em;
  transition:border-color var(--speed) var(--curve);
}

.redeem-input::placeholder{
  color:var(--muted-dim);
}

.redeem-input:focus{
  outline:none;
  border-color:var(--accent);
}

.redeem-submit{
  height:40px;
  padding:0 18px;
  border-radius:8px;
  background:var(--accent);
  color:var(--bg);
  font-size:13px;
  font-weight:600;
  flex-shrink:0;
  transition:opacity var(--speed) var(--curve);
}

.redeem-submit:hover{
  opacity:.88;
}

.redeem-submit:disabled{
  opacity:.5;
  cursor:default;
}

.redeem-status{
  margin-top:14px;
  font-size:12.5px;
  line-height:1.5;
}

.redeem-status.success{
  color:var(--accent);
}

.redeem-status.error{
  color:#e08585;
}

.nav-badge{
  margin-left:auto;
  flex-shrink:0;
  font-family:var(--font-mono);
  font-size:9px;
  font-weight:600;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
  background:var(--surface-3);
  border:1px solid var(--border-strong);
  padding:2px 6px;
  border-radius:5px;
  line-height:1.3;
}

nav a.active .nav-badge{
  color:var(--accent);
  border-color:var(--accent-dim);
}

/* hide badge text on mobile, dot only, since labels collapse too */
@media (max-width:960px){
  .nav-badge{
    width:6px;
    height:6px;
    padding:0;
    border-radius:50%;
    font-size:0;
    position:absolute;
    top:4px;
    right:4px;
    background:var(--accent);
    border:none;
  }
}