body{max-width:900px;margin:auto}
.site-header{padding:24px 16px}
.site-nav{text-align:right;margin-top:10px;font-size:.95em}
.site-nav a{margin-right:14px}
.post-summary{margin-bottom:28px}
.post-date{font-size:.9em}
article img{max-width:100%;height:auto}
.search-form{margin-top:12px;max-width:420px}
.search-form .w3-row{display:flex;gap:0}
.search-form input[type="search"]{width:100%;border-right:0}
td,th {padding:0 .66em}
img {max-width:100%}


.photo-fig {
float: right;
width: clamp(140px, 28vw, 250px);
margin: 0 0 1em 1em;
}
.photo-fig img {
width: 100%;
height: auto;
display: block;
}
.photo-fig figcaption {
font-size: 0.85rem;
color: #555;
text-align: center;
}

.photo-fig.wide {
  width: clamp(200px, 40vw, 400px);
}

/* On small screens, drop the float and center it */
@media (max-width: 600px) {
.photo-fig {
    float: none;
    width: min(100%, 320px);
    margin: 0 auto 1em;
}
}

  
.video-container {
  width: 100%;             /* Fills the width of its parent element */
  max-width: 800px;        /* Optional: Prevents the video from getting too massive on large monitors */
  margin: 0 auto;          /* Optional: Centers the video container */
  aspect-ratio: 16 / 9;    /* Maintains the perfect widescreen ratio automatically */
}

.video-container iframe {
  width: 100%;
  height: 100%;
}

.error-message {
    background-color: #ffebee;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}


.search-container {
    margin-bottom: 20px;
}

.search-input {
    padding: 8px;
    border-radius: 4px;
    box-sizing: border-box;
}

.link-item {
    display: none;
}

.link-item.visible {
    display: inline-block;
}

.search-wrapper {
    position: relative;
    display: inline-block;
}

.search-input {
    padding-right: 2rem; /* room for the × */
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
}

.clear-search:hover {
    color: #000;
}

article video, video {
    max-width: 100%;
    height: auto;
    display: block;
}
