:root{
  /* light theme */
  --bg:#f6f8fc;
  --border:#d7e1ef;
  --text:#0f172a;
  --muted:#556274;
  --shadow: 0 10px 30px rgba(2,6,23,.10);
  --radius:16px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;

  /* optional extra tokens (helps avoid hard-coded rgba everywhere) */
  --surface: rgba(255,255,255,.82);
  --surface2: rgba(255,255,255,.62);
  --surface3: rgba(248,250,252,.92);
  --accent:#2563eb;      /* blue-600 */
  --accentSoft: rgba(37,99,235,.12);
}

*{box-sizing:border-box}

body{
  margin:0;
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  font-family:var(--font);

  /* light background with subtle color */
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(37,99,235,.12), transparent 55%),
    radial-gradient(900px 700px at 90% 10%, rgba(16,185,129,.10), transparent 60%),
    var(--bg);

  color:var(--text);
}

a{color:inherit}

.wrap,
.article,
.topbar,
.bucketIntro,
.bucketBlock,
.overviewLayout { max-width: 100% !important; }

.wrap{max-width:1100px;margin:0 auto;padding:18px}

/* top bar */
.topbar{
  display:flex;gap:12px;align-items:center;justify-content:space-between;
  padding:14px 16px;border:1px solid var(--border);
  background:var(--surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
  margin-top: 14px;
  color:var(--text);
}

.left{display:flex;flex-direction:column;gap:4px;min-width:0}
.left h1{margin:0;font-size:18px;letter-spacing:.2px}
.left p{margin:0;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* buttons */
.btn{
  cursor:pointer;
  padding:10px 12px;border-radius:12px;border:1px solid var(--border);
  background: rgba(255,255,255,.92);
  color: var(--text);
  font-size:13px;
  transition:.12s transform,.12s border-color,.12s background;
  white-space:nowrap;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btn:hover{
  transform:translateY(-1px);
  border-color: rgba(37,99,235,.35);
  background: var(--accentSoft);
}
.btnrow{display:flex;gap:8px;align-items:center}

.article{
  max-width:1100px;
  margin: 18px auto 0;
  padding: 0 18px 60px;
}

.lede{
  color: rgba(15,23,42,.88);
  line-height:1.7;
  margin: 14px 0 0;
  font-weight:700;
}

.sectionTitle{
  margin: 22px 0 10px;
  font-size: 16px;
  font-weight: 900;
  color: rgba(30,64,175,.92);
  letter-spacing: .2px;
}

/* note box */
.noteBox{
  margin-top:14px;
  padding:14px 14px;
  border:1px solid rgba(2,6,23,.10);
  border-radius:16px;
  background: var(--surface2);
  color: rgba(15,23,42,.92);
  line-height:1.7;
}

/* bucket intro */
.bucketIntro{
  margin-top:14px;
  padding:14px 14px;
  border:1px solid rgba(2,6,23,.10);
  border-radius:16px;
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(37,99,235,.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.86));
  color: rgba(15,23,42,.92);
  line-height:1.75;
  font-weight:700;
}
.bucketIntro strong{color: rgba(15,23,42,.98)}
.bucketIntro a{color: var(--accent)}

/* bucket block */
.bucketBlock{
  margin-top:14px;
  border:1px solid rgba(2,6,23,.10);
  border-radius:16px;
  background: rgba(255,255,255,.72);
  box-shadow:var(--shadow);
  padding:12px;
}

.bucketHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 6px 12px;
  border-bottom:1px solid rgba(2,6,23,.08);
  margin-bottom:12px;
}

.bucketHead .bucketName{
  font-weight: 1000;
  letter-spacing:.2px;
  color: rgba(15,23,42,.98);
  font-size: 16px;
}

.bucketHead .bucketMeta{
  color: rgba(15,23,42,.70);
  font-weight:800;
  font-size: 12px;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 60%;
}

/* layout */
.overviewLayout{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  align-items:stretch;
}

.leftCol{
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap:12px;
}
.leftCol .tileLine{grid-column: 1 / -1; height: 100%;}

.rightCol{
  display:grid;
  grid-template-rows: auto auto auto 1fr;
  gap:12px;
  height:100%;
}

.rightBottomRow{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  height: 100%;
}

/* tiles */
.tile{
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(90,190,255,.22), transparent 55%),
    radial-gradient(120% 160% at 80% 20%, rgba(0,180,255,.12), transparent 60%),
    linear-gradient(180deg, rgba(9,35,65,.92), rgba(7,24,45,.92));
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  padding:12px;
  overflow:hidden;
  min-width:0;
}

.tileTall{min-height:190px}
.tileWide{min-height:112px}
.tileSmall{min-height:190px;display:flex;flex-direction:column}
.tileLine{min-height:240px}

.head{display:flex;align-items:center;justify-content:space-between;gap:10px}

.label{
  font-weight:800;
  color: #f6f8fc;
  font-size:14px;
}

.valueBig{
  margin-top:6px;
  font-size:28px;
  font-weight:900;
  color: rgba(15,23,42,.98);
  line-height:1.05;
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow:hidden;
}

.imgBox{
  margin-top:10px;
  border-radius:14px;
  border:1px solid rgba(2,6,23,.10);
  background: rgba(255,255,255,.70);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

.imgBoxTall{height:92px}
.imgBoxSmall{height:120px;margin-top:auto}
.img{width:100%;height:100%;object-fit:contain;display:block}

.sub{
  margin-top:6px;
  color: rgba(15,23,42,.86);
  font-weight:800;
  font-size:15px;
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow:hidden;
}

.sliderRow{
  display:grid;
  grid-template-columns: 1fr 62px;
  gap:12px;
  align-items:center;
  margin-top:10px;
}

.num{
  text-align:center;
  font-weight:900;
  color: rgba(15,23,42,.98);
  border-radius:12px;
  padding:10px 8px;
  background: rgba(255,255,255,.90);
  border:1px solid rgba(2,6,23,.10);
}

/* slider */
input[type="range"]{
  width:100%;
  height:6px;
  accent-color: var(--accent);
}

/* line tactics pitch */
.lineWrap{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:12px;
  margin-top:10px;
  align-items:stretch;
}

.linePitch{
  border-radius:14px;
  border:1px solid rgba(2,6,23,.10);
  background: rgba(255,255,255,.70);
  overflow:hidden;
  min-height:200px;
}

.rows{display:flex;flex-direction:column;gap:10px}

.rowbox{
  border-radius:14px;
  border:1px solid rgba(2,6,23,.10);
  background: rgba(255,255,255,.70);
  padding:12px 12px;
}

.rowtitle{
  color: rgba(180,83,9,.92); /* amber-ish */
  font-weight:900;
  letter-spacing:.2px;
  font-size:18px;
  margin-bottom:6px;
}

.rowvalue{
  color: rgba(15,23,42,.98);
  font-weight:900;
  font-size:20px;
  line-height:1.1;
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow:hidden;
}

/* error */
.error{
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(220,38,38,.28);
  background: rgba(220,38,38,.08);
  border-radius:16px;
  color: rgba(127,29,29,.92);
}

/* responsive */
@media (max-width: 768px){
  .topbar{
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .left{
    min-width: 0;
    width: 100%;
  }
  .left p{
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btnrow{
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .btn{ white-space: normal; }
  .bucketHead .bucketMeta{max-width:100%}

  .overviewLayout{ grid-template-columns: 1fr; }
  .leftCol{ grid-template-columns: 1fr; }
  .rightBottomRow{ grid-template-columns: 1fr; }
  .tileWide,
  .tileSmall,
  .tileTall,
  .tileLine,
  .leftCol,
  .rightCol,
  .rightBottomRow{
    height: auto !important;
    min-height: 0;
  }
  .tileWide{ min-height: 112px; }
  .tileSmall{ min-height: 190px; }
  .leftCol, .rightCol{ width: 100%; }
  .lineWrap{grid-template-columns:1fr}
  .tileTall,.tileSmall{width:100%}
}

/* footer */
footer{
  background: rgba(255,255,255,.75);
  color: rgba(15,23,42,.72);
  border-top: 1px solid rgba(2,6,23,.10);
}
footer a { color: var(--accent); }
