:root{
  --content-accent:#2a5bd7;
  --content-accent-soft:#eef3ff;
  --content-green:#1f7a60;
  --content-amber:#9a6700;
  --content-rose:#9f3a52;
}

a{
  color:inherit;
  text-decoration:none;
}

.content-shell{
  width:min(1160px,calc(100% - 32px));
  margin:0 auto;
}

.content-hero{
  padding:26px 0 18px;
}

.crumb{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:14px;
  margin-bottom:14px;
}

.crumb a:hover{
  color:var(--accent);
}

.content-hero h1{
  margin:0;
  font-size:clamp(32px,5vw,52px);
  line-height:1.12;
  letter-spacing:0;
}

.content-hero p{
  width:min(820px,100%);
  margin:16px 0 0;
  color:var(--muted);
  font-size:17px;
  line-height:1.8;
}

.mode-tabs{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin:18px 0 28px;
}

.mode-tab{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:54px;
  padding:0 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:var(--muted);
  font-weight:800;
  box-shadow:0 8px 20px rgba(27,39,94,.05);
}

.mode-tab[aria-current="page"]{
  border-color:rgba(42,91,215,.45);
  background:var(--content-accent-soft);
  color:var(--content-accent);
}

.learn-search{
  margin:0 0 24px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow);
}

.learn-search-label{
  display:block;
  margin-bottom:8px;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

.learn-search-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.learn-search-input{
  box-sizing:border-box;
  width:100%;
  min-height:46px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fbfcff;
  color:var(--ink);
  font:inherit;
  font-size:16px;
  outline:none;
}

.learn-search-input:focus{
  border-color:rgba(42,91,215,.55);
  box-shadow:0 0 0 4px rgba(42,91,215,.10);
}

.learn-search-clear{
  flex:0 0 auto;
  min-height:46px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--muted);
  font-weight:800;
  cursor:pointer;
}

.learn-search-clear:hover{
  border-color:rgba(42,91,215,.35);
  color:var(--content-accent);
}

.learn-search-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0 0;
}

.learn-search-tag{
  min-height:34px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fbfcff;
  color:var(--muted);
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.learn-search-tag:hover{
  border-color:rgba(42,91,215,.35);
  color:var(--content-accent);
}

.learn-search-tag[aria-pressed="true"]{
  border-color:rgba(42,91,215,.55);
  background:var(--content-accent-soft);
  color:var(--content-accent);
}

.learn-search-status{
  min-height:1.5em;
  margin:8px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.section{
  padding:6px 0 36px;
}

.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
  flex-wrap:wrap;
}

.section-head h2{
  margin:0;
  font-size:26px;
  line-height:1.25;
}

.section-head p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
}

.card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.card-grid.figure-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.content-card{
  min-height:100%;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow);
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.content-card:hover{
  transform:translateY(-3px);
  border-color:rgba(42,91,215,.35);
  box-shadow:0 14px 34px rgba(27,39,94,.12);
}

.content-card[hidden]{
  display:none;
}

.card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.tag{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:var(--content-accent-soft);
  color:var(--content-accent);
  font-size:12px;
  font-weight:800;
}

.tag.green{
  background:#edf8f4;
  color:var(--content-green);
}

.tag.blue{
  background:#eef3ff;
  color:var(--content-accent);
}

.tag.amber{
  background:#fff8e6;
  color:var(--content-amber);
}

.tag.rose{
  background:#fff0f3;
  color:var(--content-rose);
}

.arrow{
  color:var(--accent);
  font-size:20px;
  line-height:1;
}

.content-card h3{
  margin:0;
  font-size:21px;
  line-height:1.25;
}

.content-card p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.75;
}

.content-card.compact{
  min-height:168px;
  gap:12px;
}

.content-card.compact h3{
  font-size:20px;
}

.model-id{
  display:none;
  margin-top:auto;
  color:var(--muted);
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:12px;
  overflow-wrap:anywhere;
}

.card-visual{
  height:118px;
  border:1px solid #e7eaf3;
  border-radius:8px;
  background:#fbfcff;
  overflow:hidden;
}

.card-visual svg{
  width:100%;
  height:100%;
  display:block;
}

.note-band{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
  margin:8px 0 42px;
}

.note-panel{
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow);
  padding:18px;
}

.note-panel h2{
  margin:0 0 10px;
  font-size:22px;
}

.note-panel p{
  margin:0;
  color:var(--muted);
  line-height:1.8;
  font-size:14px;
}

@media (max-width: 920px){
  .mode-tabs,
  .card-grid,
  .card-grid.figure-grid,
  .note-band{
    grid-template-columns:1fr;
  }
}

@media (max-width: 640px){
  .content-shell{
    width:min(100%,calc(100% - 24px));
  }

  .content-hero p{
    font-size:15px;
  }

  .learn-search-row{
    flex-direction:column;
    align-items:stretch;
  }
}
