:root{
  --bg:#fbfaf7;
  --panel:#fffdfa;
  --ink:#151712;
  --green:#344C34;
  --line:#e5ddd4;
}

*{
  box-sizing:border-box;
}

html{
  width:100%;
  min-width:1640px;
  margin:0;
  background:var(--bg);
}

body{
  width:100%;
  min-width:1640px;
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:Roboto,Arial,Helvetica,sans-serif;
  font-size:14px;
}

a{
  text-decoration:none;
  color:inherit;
}

button{
  font:inherit;
  cursor:pointer;
}

.site{
  width:1640px;
  margin:0 auto;
  background:var(--bg);
  overflow:hidden;
}

/* Keep compatibility if this page is tested before shared base.css is installed */
.topbar{
  height:86px;
  display:grid;
  grid-template-columns:220px 1fr 550px;
  align-items:center;
  padding:0 74px;
  border-bottom:1px solid #ece7e0;
  background:#fffdfa;
}

.brand img{
  width:147px;
  display:block;
}

.main-nav{
  height:100%;
  display:flex;
  justify-content:center;
  gap:58px;
}

.main-nav a{
  height:100%;
  display:flex;
  align-items:center;
  font-weight:700;
  position:relative;
  white-space:nowrap;
}

.main-nav a.active:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:16px;
  height:2px;
  background:var(--green);
}

.header-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:22px;
}

.search{
  width:294px;
  height:40px;
  border-radius:22px;
  background:#f3f0ec;
  padding:0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#4d4e49;
  font-size:14px;
}

.header-tools button{
  border:0;
  background:transparent;
  font-size:25px;
  padding:0;
}

.upscale-main{
  position:relative;
  padding:14px 36px 18px;
}

.upscale-main:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:640px;
  height:1988px;
  background:url("../images/Fern_Artwork.png") left top/auto 1988px no-repeat;
  opacity:.34;
  pointer-events:none;
}

.upscale-main>*{
  position:relative;
  z-index:1;
}

.panel{
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.9);
}

.page-title{
  width:1568px;
  height:106px;
  margin:0 auto 14px;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.title-left{
  display:flex;
  align-items:center;
  gap:15px;
}

.title-icon{
  width:65px;
  height:65px;
  border-radius:11px;
  background:#edf4ff;
  display:grid;
  place-items:center;
}

.title-icon img{
  width:65px;
  height:65px;
  object-fit:contain;
}

.page-title h1{
  font-size:22px;
  margin:0 0 6px;
}

.page-title p{
  font-size:14px;
  margin:0;
}

.how-button{
  border:1px solid var(--line);
  border-radius:8px;
  padding:12px 15px;
  background:#fff;
  font-weight:700;
  font-size:14px;
}

.workspace{
  width:1568px;
  margin:0 auto;
  display:grid;
  grid-template-columns:360px 850px 340px;
  gap:9px;
  align-items:stretch;
}

.left-panel,.preview-panel,.output-panel{
  min-height:760px;
}

.left-panel{
  padding:20px 18px;
}

.left-panel h2,.preview-panel h2,.output-panel h2{
  font-size:17px;
  margin:0 0 7px;
  color:#344C34;
  line-height:1.15;
  font-weight:700;
}

.left-panel h3,.output-panel h3{
  font-size:14px;
  margin:0 0 8px;
}

.left-panel p,.output-panel p,.preview-panel p{
  font-size:14px;
  line-height:1.45;
  margin:0 0 10px;
  color:#444;
}

.upload-block,.factor-block{
  padding-bottom:15px;
  margin-bottom:15px;
  border-bottom:1px solid #e8e1d9;
}

.dropzone{
  height:160px;
  border:1px dashed #c8c0b7;
  border-radius:7px;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.dropzone>img{
  width:42px;
  height:42px;
  object-fit:contain;
}

.dropzone strong{
  font-size:14px;
  margin-top:7px;
}

.dropzone span{
  font-size:14px;
  margin-top:3px;
}

.dropzone small{
  font-size:14px;
  margin-top:8px;
  color:#666;
}

.file-row{
  height:62px;
  margin-top:10px;
  display:grid;
  grid-template-columns:50px 1fr;
  gap:8px;
  align-items:center;
}

.file-thumb{
  width:50px;
  height:48px;
  border:1px solid #e5ddd4;
  object-fit:cover;
}

.file-row b,.file-row span{
  display:block;
}

.file-row b{
  font-size:14px;
}

.file-row span{
  font-size:14px;
  margin-top:3px;
  color:#555;
}

.factor-buttons{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.factor{
  height:64px;
  border:1px solid #ddd6ce;
  border-radius:7px;
  background:#fff;
}

.factor b,.factor span{
  display:block;
}

.factor b{
  font-size:20px;
  color:#344C34;
}

.factor span{
  font-size:14px;
  color:#666;
}

.factor.active{
  border:2px solid var(--green);
  background:#f6faf6;
}

.green-button{
  width:100%;
  min-height:42px;
  margin-top:12px;
  border:0;
  border-radius:5px;
  background:var(--green);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  font-size:14px;
  font-weight:700;
}

.green-button img{
  width:18px;
  height:18px;
  object-fit:contain;
}

.about-block p{
  font-size:14px;
}

.preview-panel{
  padding:20px 18px;
}

.preview-heading{
  height:56px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
}

.zoom-control{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:14px;
}

.zoom-control input{
  width:120px;
  accent-color:var(--green);
}

.zoom-control button{
  height:25px;
  min-width:31px;
  border:1px solid #ddd6ce;
  border-radius:5px;
  background:#fff;
  font-size:14px;
}

.compare-box{
  height:650px;
  border:1px solid #d8d1c9;
  border-radius:8px;
  overflow:hidden;
  position:relative;
  background:#fff;
}

.compare-box img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
}

.before-img{
  clip-path:inset(0 50% 0 0);
}

.after-img{
  clip-path:inset(0 0 0 50%);
}

.compare-line{
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:2px;
  background:#fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.25);
}

.compare-handle{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:36px;
  height:36px;
  border-radius:50%;
  background:#fff;
  border:1px solid #aaa;
  display:grid;
  place-items:center;
  font-size:17px;
  font-weight:700;
}

.output-panel{
  padding:20px 18px;
}

.output-preview{
  height:210px;
  border:1px solid #e3ddd6;
  border-radius:7px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#344C34;
  font-size:14px;
  line-height:1.45;
}

.download-button{
  margin-top:12px;
}

.info-block,.what-block,.ai-note{
  padding-top:14px;
  margin-top:14px;
  border-top:1px solid #e8e1d9;
}

.info-block dl{
  display:grid;
  grid-template-columns:1fr auto;
  gap:5px;
  margin:0;
  font-size:14px;
}

.info-block dt{
  font-weight:700;
}

.info-block dd{
  margin:0;
  color:#555;
}

.what-block ul{
  list-style:disc;
  margin:0;
  padding-left:18px;
}

.what-block li{
  font-size:14px;
  margin:0 0 6px;
  padding-left:0;
  position:static;
}

.what-block li::before{
  content:none;
}

.ai-note p{
  font-size:14px;
  margin:0;
}

.benefits{
  width:1568px;
  margin:10px auto 0;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.benefits article{
  height:66px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}

.benefits img{
  width:40px;
  height:40px;
  object-fit:contain;
}

.benefits b,.benefits span{
  display:block;
}

.benefits b{
  font-size:17px;
}

.benefits span{
  font-size:14px;
  margin-top:3px;
  color:#555;
}

/* Before / After comparison slider interaction */
.compare-box{
  cursor:ew-resize;
  touch-action:none;
  user-select:none;
}

.compare-box img{
  pointer-events:none;
  user-select:none;
}

.compare-line,
.compare-handle{
  pointer-events:none;
}

.compare-handle{
  cursor:ew-resize;
}
