:root{
  --bg:#ffffff;
  --text:#111111;
  --muted:#5a5a5a;
  --line:#e6e6e6;
  --bbc-red:#b80000;
  --link:#1a0dab;
  --panel:#f6f6f6;
  --max:1100px;
  --sans: Arial, Helvetica, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background:var(--bg);
  color:var(--text);
}

.container{max-width:var(--max);margin:0 auto;padding:0 16px}

/* Top bar (BBC-ish) */
.topbar{
  background:#000;
  color:#fff;
  border-bottom:1px solid #111;
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
  flex-wrap:wrap;
}

.brand{display:flex;align-items:center;gap:10px}
.brand__logo{
  width:36px;height:36px;
  display:grid;place-items:center;
  background:#111;
  border:1px solid #222;
  font-weight:800;
  letter-spacing:.5px;
}
.brand__text{line-height:1}
.brand__title{font-weight:800;font-size:16px}
.brand__sub{font-size:12px;color:#cfcfcf;margin-top:2px}

/* Categories nav */
.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.tab{
  border:none;
  background:transparent;
  color:#fff;
  padding:8px 6px;
  font-weight:700;
  cursor:pointer;
  border-bottom:2px solid transparent;
}
.tab:hover{border-bottom-color:#666}
.tab.is-active{
  border-bottom-color:var(--bbc-red);
}

/* BBC NEWS masthead */
.masthead{
  border-bottom:1px solid var(--line);
  padding:22px 0 10px;
}
.masthead__news{
  text-align:center;
  font-weight:900;
  color:var(--bbc-red);
  letter-spacing:1px;
  font-size:44px;
  margin:0;
}
.masthead__strap{
  text-align:center;
  margin:6px 0 0;
  color:var(--muted);
  font-size:14px;
}

/* Controls block */
.main{padding:18px 0 28px}
.panel{
  border:1px solid var(--line);
  background:var(--panel);
  padding:14px;
}
.panel__header h1{
  margin:0 0 8px;
  font-size:18px;
}
.panel__header p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.4;
}
.panel__form{
  margin-top:12px;
  display:grid;
  gap:10px;
}
.field{display:grid;gap:6px}
.field__label{font-weight:700;font-size:13px}
.field__input{
  width:100%;
  padding:10px 10px;
  border:1px solid var(--line);
  border-radius:0;
  background:#fff;
  color:var(--text);
}
.field__input:focus{
  outline:2px solid #000;
  outline-offset:1px;
}

.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}
.btn{
  border-radius:0;
  padding:10px 14px;
  border:1px solid #000;
  cursor:pointer;
  font-weight:800;
  background:#000;
  color:#fff;
}
.btn:disabled{opacity:.6;cursor:not-allowed}
.btn--ghost{
  background:#fff;
  color:#000;
}

.meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.pill{
  font-size:12px;
  padding:6px 8px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--muted);
}

/* Results */
.status{
  padding:10px 0;
  min-height:20px;
  color:var(--muted);
}
.status.is-error{color:var(--bbc-red)}
.status.is-ok{color:#0b6623}

/* BBC-ish story layout: lead story + list */
.cards{
  display:grid;
  gap:14px;
  margin-top:6px;
}

/* Lead + secondary grid on desktop */
@media (min-width:900px){
  .cards{
    grid-template-columns: 2fr 1fr;
    align-items:start;
  }
}

.story-lead{
  border-top:3px solid var(--bbc-red);
  padding-top:10px;
}

.story-lead .card__title{
  font-size:26px;
  line-height:1.15;
}

.story-list{
  border-top:1px solid var(--line);
  padding-top:10px;
}

.card{
  background:#fff;
  border:none;
  border-bottom:1px solid var(--line);
  padding:10px 0;
}
.card:last-child{border-bottom:none}

.card__title{
  margin:0 0 6px;
  font-size:16px;
  line-height:1.25;
}
.card__title a{
  color:var(--text);
  text-decoration:none;
}
.card__title a:hover{text-decoration:underline}

.card__meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}
.card__tag{
  color:var(--muted);
  font-weight:700;
}

.card__summary{
  margin:0;
  color:var(--text);
  font-size:14px;
  line-height:1.4;
}

/* Footer */
.footer{
  border-top:1px solid var(--line);
  padding:14px 0;
  color:var(--muted);
  font-size:12px;
}
.footer__inner{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
