/* Minimal, sharp, white background, black type */

:root{
  --bg: #ffffff;
  --text: #000000;
  --line: #000000;
  --muted: #555555;
  --accent: #ffd400; /* single allowed colour */

  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

*{
  box-sizing: border-box;
}

html, body{
  height: 100%;
  font-family: var(--sans);
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.3;
}

/* ---- Page Layout ------------------------------------------------------ */

.wrap{
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: 7fr 3fr; /* left 70% / right 30% */
}

/* LEFT: Card Mechanic */

.cardsArea{
  padding: 48px;
  border-right: 3px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* constraint cards */

.cards{
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card{
  border: 3px solid var(--line);
  padding: 40px;
  background: #fff;
}

.tag{
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 10px;
  margin-bottom: 22px;
  border: 2px solid var(--line);
  background: var(--accent);
  color: #000;
}

.constraint{
  font-family: var(--sans);
  font-size: clamp(40px, 4vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 24px 0;
}

.desc{
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 60ch;
}

/* RIGHT: Controls + History */

.sidePanel{
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
}

/* Controls (top right) */

.controls{
  padding: 28px;
  border-bottom: 3px solid var(--line);
  display: grid;
  gap: 18px;
}

label{
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

select{
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 2px solid var(--line);
  background: #fff;
  color: #000;
  border-radius: 0;
  outline: none;
}

select:focus{
  border-color: var(--accent);
}

button{
  padding: 14px;
  font-weight: 700;
  text-transform: uppercase;
  border: 3px solid var(--line);
  background: #fff;
  cursor: pointer;
  border-radius: 0;
}

button.primary{
  background: var(--accent);
  border-color: var(--line);
}

button:hover{
  background: #000;
  color: #fff;
}

/* History (bottom right) */

.historySection{
  padding: 28px;
  overflow-y: auto;
}

.historySection h2{
  font-family: var(--sans);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.history{
  display: flex;
  font-family: var(--sans);
  flex-direction: column;
  gap: 12px;
}

.histItem{
  border: 2px solid var(--line);
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.drawAction{
  margin-top: 32px;
}

.drawAction button{
  width: 100%;
  font-size: 18px;
}

.actionPanel{
  padding: 28px;
  border-bottom: 3px solid var(--line);
  display: grid;
  gap: 14px;
}

.optionsDrawer{
  border: 2px solid var(--line);
  padding: 12px;
  font-family: var(--sans);
}

.optionsDrawer > summary::-webkit-details-marker{
  display: none;
}

.optionsDrawer[open] > summary{
  margin-bottom: 12px;
}

/* --- Options Drawer Arrow -------------------------------------------- */

.optionsDrawer > summary{
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* remove default marker */
.optionsDrawer > summary::-webkit-details-marker{
  display: none;
}

/* arrow */
.optionsDrawer > summary::after{
  content: "→";
  font-size: 18px;
  transition: transform 0.2s ease;
}

/* rotate when open */
.optionsDrawer[open] > summary::after{
  transform: rotate(90deg);
}

/* hint text under label */
.optionsDrawer .hint{
  display: block;
  margin-top: 6px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---- Responsive ------------------------------------------------------- */

@media (max-width: 900px){

  .wrap{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
  }

  .cardsArea{
    border-right: none;
    border-bottom: 3px solid var(--line);
  }

  .sidePanel{
    height: auto;
  }

}