html { 
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
 }

body {
    background-color: white;
    font-family: "MS Gothic", "Apple SD Gothic Neo", "Hiragino Sans", sans-serif;
    margin: 0;
}

div { outline: 0px solid red; } /* debug */

hr {
  border: none;
  height: 2px;
  margin-top: 10px;
  margin-bottom: 0;
  background-color:dimgray ;
  width: calc(100% - 20px);
}

.parent {
    font-size: 16px;
    display: grid;
    align-content: start;
    grid-template-columns: minmax(0, 1fr) minmax(50px, 1fr) minmax(200px, 3fr) minmax(50px, 1fr) minmax(0, 1fr);
    grid-template-rows: 25px auto auto minmax(1000px, auto); /* Adjusted for flow */
    grid-column-gap: 10px;
    grid-row-gap: 10px;
}

.topWhiteSpace { grid-area: 1 / 1 / 1 / 6; }

.title { 
    grid-area: 2 / 2 / 2 / 5;
    text-align: center;
    font-size: xx-large;
    font-weight: 750;
}

.leftWhiteSpace { grid-area: 2 / 1 / 8 / 1; overflow-y: hidden; }

.leftBody { 
    grid-area: 4 / 2 / 4 / 2;
    align-content: top;
    margin-right: 5px;
    background-color: lightsteelblue;
    display: flex;
    flex-direction: column;
    min-height: 100%; /* Ensures it fills the grid cell height */
}

.centreBody { 
    grid-area: 4 / 3 / 4 / 5;
    display: grid;
    grid-template-areas: "content"; /* This stacks your 4 items */
}

.rightWhiteSpace { grid-area: 2 / 5 / 4 / 5; overflow-y: hidden; }

.optionButton { 
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-top: 10px;
    background-color: lightsteelblue;
    border-color: lightsteelblue;
    border-style: outset;
    text-align: right;
    cursor: pointer;
    transition-duration: 0.1s;
    color: inherit;
    font-family: inherit;
    font-weight: 100;
    box-sizing: border-box;
}

.topButton {
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-bottom: 10px;
    margin-top: auto;
    background-color: lightsteelblue;
    border-color: lightsteelblue;
    border-style: outset;
    text-align: right;
    cursor: pointer;
    transition-duration: 0.1s;
    color: inherit;
    font-family: inherit;
    font-weight: 100;
    box-sizing: border-box;
    text-decoration: none;
}

.optionButton:last-child { margin-bottom: 10px; }

.titleBody { 
    text-align: left;
    font-size: x-large;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* --- THE SWAP LOGIC --- */

/* 1. Hide the radio buttons used for tracking state */
.swap-input { display: none; }

/* 2. Hide all content divs by default */
.content-item { 
    grid-area: content; 
    display: none; 
}

/* 3. Show the correct div based on which radio is checked */
#opt-home:checked ~ .parent .item-home,
#opt-1:checked ~ .parent .item-1,
#opt-2:checked ~ .parent .item-2,
#opt-3:checked ~ .parent .item-3,
#opt-4:checked ~ .parent .item-4 {
    display: block;
}
