:root{
  --bg:#f2f2f2;
  --ink:#222;
  --muted:#666;
  --rule:#cfcfcf;
  --rule2:#bdbdbd;
  --bar:#8e8e8e;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family: "Arial", "Times New Roman", serif;
}

.wrap{ max-width: 1120px; margin: 0 auto; padding: 18px; }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.brand{
  font-weight:800;
  letter-spacing:.2px;
}
.controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
input, select{
  font-family: system-ui, Arial, sans-serif;
  padding:10px 12px;
  border:1px solid #ddd;
  border-radius:10px;
  background:#fff;
}

.meta{
  font-family: system-ui, Arial, sans-serif;
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 14px;
}

/* --- PDF-like block --- */
.sheet{
  background:#fff;
  border:1px solid #dedede;
  margin: 14px 0 22px;
}

/* grey bar header like PDF */
.sheet-header{
  background: var(--bar);
  color:#fff;
  padding: 14px 18px;
  font-size: 44px;
  line-height: 1;
  font-weight: 500;
}

/* two-column layout */
.sheet-body{
  display:grid;
  grid-template-columns: 58% 42%;
  gap: 0;
}

/* left image column */
.left{
  padding: 16px 16px 0 16px;
}

/* Force 1:1 image boxes (prevents overflow) */
.hero,
.texture{
  width: 100%;
  aspect-ratio: 1 / 1;      /* <-- square */
  height: auto;             /* aspect-ratio controls height */
  object-fit: cover;         /* crop to fill the square */
  object-position: center;   /* keep crop centered */
  display: block;
  overflow: hidden;
  background: #eee;
  border: 1px solid #e6e6e6;
}

.swatches-left{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 per row */
  gap: 8px;
}

.swatches-left img{
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 150px;
  object-fit: cover;
  border: 1px solid #e3e3e3;
  background: #eee;
}

/* right info column */
.right{
  padding: 18px 18px 16px 18px;
}

.range-title{
  text-transform: uppercase;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: .3px;
  margin: 2px 0 4px;
}

.colours{
  font-family: "Georgia", "Times New Roman", serif;
  color:#444;
  font-size: 18px;
  margin: 0 0 10px;
}
.colours b{ font-weight: 800; }

/* tables */
.type-block{ margin-top: 10px; }

.type-head{
  display:grid;
  grid-template-columns: 55% 18% 27%;   /* EXACT same as table columns */
  align-items:end;
  padding-top: 10px;
  border-top: 3px solid var(--rule2);
  margin-top: 12px;
}

/* Make header labels sit exactly above their columns */
.type-head div:nth-child(2){
  text-align: center;
  justify-self: center;
}

.type-head div:nth-child(3){
  text-align: right;
  justify-self: end;   /* THIS is the key */
}


.type-name{
  font-weight:700;
  font-size: 16px;
}
.type-cols{
  font-family: system-ui, Arial, sans-serif;
  font-weight: 700;
  color:#555;
  font-size: 14px;
}

.table{
  width:100%;
  border-collapse: collapse;
  margin-top: 6px;
  table-layout: fixed;     /* IMPORTANT: locks column widths */
}

.table td{
  padding: 3px 0;
  vertical-align: top;
}

/* alignment only, NOT widths (colgroup now controls widths) */
.table td:nth-child(2){ text-align:center; }
.table td:nth-child(3){ text-align:right; }



/* optional bottom-right images like PDF thumbnails */
.thumbs{
  margin-top: 10px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 320px;
}
.thumbs img{
  width:100%;
  height: 120px;
  object-fit: cover;
  border: 1px solid #e3e3e3;
  background:#eee;
}

/* responsive */
@media (max-width: 980px){
  .sheet-header{ font-size: 34px; }
  .sheet-body{ grid-template-columns: 1fr; }
  .hero{ height: 340px; }
  .texture{ height: 260px; }
}