body{
    font-family:Arial,Helvetica,sans-serif;
    background:#f3f5f7;
    margin:40px;
    line-height:1.5;
}

h1{
    text-align:center;
}

.container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:25px;
    align-items:start;
    width:100%;
}

.card{
    background:#ffffff;
    padding:20px;
    border-radius:14px;
    border:1px solid #e5eaf0;
    box-shadow:0 6px 18px rgba(0,0,0,.08);
    display:flex;
    flex-direction:column;
    gap:12px;
}

.card h2{

    margin-top:0;
    color:#1565c0;
}

.flow{

    display:flex;
    flex-direction:column;
    align-items:center;
    gap:12px;
    margin-top:20px;
}

.box{

    background:#1976d2;
    color:white;
    padding:6px;
    width:90%;
    border-radius:8px;
    text-align:center;
}

.arrow{

    font-size:28px;
}

table{

    width:100%;
    border-collapse:collapse;
}

th{

    background:#1976d2;
    color:white;
}

th,td{

    padding:10px;
    border:1px solid #ddd;
}

code{
    background:#eef2ff;
    color:#213c66;
    padding:2px 6px;
    border-radius:4px;
}

.card pre{
    background:#0f172a;
    color:#f8fafc;
    padding:14px;
    border-radius:10px;
    overflow:auto;
    margin:0;
    font-size:14px;
    line-height:1.5;
    display:block;
    width:90%;
    max-width:100%;
    box-sizing:border-box;
    flex-shrink:0;
    white-space:pre;
}

.card pre code{
    display:block;
    white-space:pre;
    overflow-x:auto;
}

.good{

    color:green;
    font-weight:bold;
}

.bad{

    color:red;
    font-weight:bold;
}

.accessibility-content ul{
    list-style-position: inside;
}

.accessibility-content li{
    margin: 6px 0;
}

.content-section{
    margin-bottom: 30px;
}

.content-section summary{
    font-size: 20px;
    font-weight: bold;
    color: #1565c0;
    padding: 15px 20px;
    background: #f0f4f8;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
    border-left: 4px solid #1565c0;
}

.content-section summary:hover{
    background: #e3f2fd;
}

.content-section summary::marker{
    color: #1565c0;
}

.flashcards-section{
    margin: 0 0 30px;
}

.flashcards-section h3{
    color: #1565c0;
    margin-bottom: 12px;
}

.flashcards-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

/* support both button.flashcard and details.flashcard */
.flashcard{
    border:none;
    background:white;
    border-radius:14px;
    padding:16px;
    text-align:left;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
    cursor:pointer;
    display:flex;
    flex-direction:column;
    gap:10px;
    min-height:120px;
}

details.flashcard{
    /* details uses default display; override to match button layout */
    display:flex;
    flex-direction:column;
    gap:10px;
}

details.flashcard summary{
    list-style:none;
    cursor:pointer;
    outline:none;
    /* make the summary fill the whole card so clicks anywhere toggle */
    display:block;
    padding:10px;
    margin: 2px; 
    width:90%;
}

/* ensure the details element doesn't double-pad (we move padding to summary) */
details.flashcard{
    padding:0;
}

.flashcard-question{
    font-weight:bold;
    color:#0f172a;
}

.flashcard-answer{
    color:#5475a3;
    display:none;
    margin: 2px;
    line-height:1.4;
    padding: 0px;
}

/* when using details, rely on the [open] attribute */
details.flashcard[open] .flashcard-answer{
    display:block;
}

/* also support JS-toggled class for backward compatibility */
.flashcard.is-open .flashcard-answer{
    display:block;
}

.flashcard.is-open{
    border:1px solid #1565c0;
}