:root{
  --bg:#f7f8fa; --card:#ffffff; --text:#111827; --muted:#6b7280; --primary:#2563eb; --border:#e5e7eb;
}

header{
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background-color: white;
  color: white;
  border-bottom: 1px solid #ccc;
}

nav a{
  margin-left: 20px;
  text-decoration: none;
  color: blue;
  font-weight: bold;
}

footer{
  background-color: #f7f8fa;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  border-top: 1px solid #ccc;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:var(--text);
  background:var(--bg);
}

.wrap{
  max-width:1000px;
  margin:40px auto;
  padding:0 16px;
}

.controls{
  display:grid;
  gap:12px;
  grid-template-columns:1fr minmax(220px, 360px);
  align-items:center;
}

.filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.btn{
  padding:8px 12px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  cursor:pointer;
}

.btn.active{
  background:var(--primary);
  color:#fff;
  border-color:var(--primary);
}

.search{
  display:flex;
  gap:8px;
  align-items:center;
}

.search input{
  flex:1;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
}

.pill{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:#eef2ff;
  color:#3730a3;
  font-size:12px;
  border:1px solid #c7d2fe;
}

.check-strip{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  padding:10px 12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
}

.check-strip label{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:14px;
}

.grid{
  display:grid;
  gap:14px;
  margin-top:16px;
}

.card{
  display:flex;
  gap:16px;
  padding:14px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  align-items:stretch;
}

.card img{
  width:160px;
  height:100px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid var(--border);
}

.content{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1;
  min-width:0;
}

.title{
  font-size:18px;
  font-weight:700;
}

.meta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:14px;
}

.tags{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.benefits{
  margin:0;
  padding-left:18px;
  line-height:1.5;
}

.empty{
  display:none;
  padding:24px;
  text-align:center;
  color:var(--muted);
}

@media (max-width:720px){
  .card{ flex-direction:column; }
  .card img{ width:100%; height:160px; }
}

.modal-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.35);
  z-index:1000;
  padding:16px;
}

.modal-overlay.show{
  display:flex;
}

.modal-card{
  width:min(560px, 100%);
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.15);
}

.modal-title{
  font-size:18px;
  font-weight:700;
  margin:0 0 12px;
}

.modal-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}

.modal-form input[type="email"]{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  width:100%;
}

.modal-form .btn{
  height:42px;
  border-radius:10px;
}

.modal-note{
  grid-column:1 / -1;
  font-size:12px;
  color:var(--muted);
  margin:4px 0 0;
}

.modal-msg{
  grid-column:1 / -1;
  font-size:14px;
  margin:6px 0 0;
}

.modal-close{
  position:absolute;
  top:8px;
  right:12px;
  border:1px solid var(--border);
  background:#fff;
  width:32px;
  height:32px;
  border-radius:999px;
  cursor:pointer;
  font-size:18px;
  line-height:30px;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}
